Access2000_JS1
Registered User.
- Local time
- Today, 07:01
- Joined
- Dec 10, 2005
- Messages
- 24
The snipet below returns only a single record. I want all the records. I am not sure how to get the results from the query or the syntax.
This is what I want:
Select location from client_loc
where clientID = FORMS!job.ClientId
Thanks
---------------------------------
Private Sub ClientId_AfterUpdate()
GetValidLocations
End Sub
Private Sub GetValidLocations()
Dim varName As Variant ' declare a variable for the name
' Check if either combo box is null
If (IsNull(Me.ClientId)) Then
varName = ""
Else
' Look up the title
varName = DLookup("[Location]", "client_loc", "[clientID] = FORMS!job.ClientId")
End If
If (varName = "" Or IsNull(varName)) Then
Me.location = "(None found)"
' Otherwise, put name into the text box
Else
Me.location = varName
End If
End Sub
This is what I want:
Select location from client_loc
where clientID = FORMS!job.ClientId
Thanks
---------------------------------
Private Sub ClientId_AfterUpdate()
GetValidLocations
End Sub
Private Sub GetValidLocations()
Dim varName As Variant ' declare a variable for the name
' Check if either combo box is null
If (IsNull(Me.ClientId)) Then
varName = ""
Else
' Look up the title
varName = DLookup("[Location]", "client_loc", "[clientID] = FORMS!job.ClientId")
End If
If (varName = "" Or IsNull(varName)) Then
Me.location = "(None found)"
' Otherwise, put name into the text box
Else
Me.location = varName
End If
End Sub