User Profile

Collapse

Profile Sidebar

Collapse
John Desselle
John Desselle
Last Activity: Jan 8 '11, 03:15 PM
Joined: Dec 10 '10
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • I've gotten it to work. I am positive it's not the smoothest or cleanest solution, but it works:
    Code:
    Private Sub cboZip_AfterUpdate()
        
        If IsNull(Me.cboZip) Then
            strCity = ""
            strState = ""
            Else
        
        strCity = DLookup("[City]", "[tblZIPS]", "ZipID = " & cboZip & "")
        strState = DLookup("[State]",
    ...
    See more | Go to post

    Leave a comment:


  • I've updated the code to make it a little faster, and easier to understand, but am still getting error if I remove the entry in cboZip.

    Code:
    Private Sub cboZip_AfterUpdate()
    
        strCity = DLookup("[City]", "[tblZIPS]", "ZipID = " & cboZip & "")
        strState = DLookup("[State]", "[tblZIPS]", "ZipID = " & cboZip & "")
    ...
    See more | Go to post

    Leave a comment:


  • DLookup - removing criteria if fields are not needed

    I have a simple ZipCode - City/State dlookup function in my database:
    Code:
    Private Sub cboZip_AfterUpdate()
        strCity = DLookup("[City]", "[tblZIPS]", "[ZIP] = " & [ZIP])
        strState = DLookup("[State]", "[tblZIPS]", "[ZIP] = " & [ZIP])
        strZipCode = DLookup("[Zip]", "[tblZIPS]", "[ZIP] = " & [ZIP])
    ...
    See more | Go to post
No activity results to display
Show More
Working...