R
redFred
I found this code a while back and cannot get it right. Please help!
Private Sub cboClient_AfterUpdate()
Dim sRS As String
If IsNull(Me.cboClient.Value) Then
sRS = ""
Else
sRS = "Select InvNum,Service,StartDate,EndDate,JobLabor from [tbl 2
Job] " & "Where ClientID = " & Me.cboClient
End If
Me.cboInvNum.RowSource = sRS
End Sub
When I select the client, it populates that box correctly, Then, when I
click into the invoice box to select I get the Access Input Box, with the
selected client in the message area and its asking me -- something? If I
input the client code I get the results correctly in the second box.
ClientID is text, box is cboClient
InvNum is numeric, box in cboInvNum
So, my surmise is I am not telling it which client -- at least not doing so
correctly.
Can anyone see what I have done wrong?
Thanks,
Private Sub cboClient_AfterUpdate()
Dim sRS As String
If IsNull(Me.cboClient.Value) Then
sRS = ""
Else
sRS = "Select InvNum,Service,StartDate,EndDate,JobLabor from [tbl 2
Job] " & "Where ClientID = " & Me.cboClient
End If
Me.cboInvNum.RowSource = sRS
End Sub
When I select the client, it populates that box correctly, Then, when I
click into the invoice box to select I get the Access Input Box, with the
selected client in the message area and its asking me -- something? If I
input the client code I get the results correctly in the second box.
ClientID is text, box is cboClient
InvNum is numeric, box in cboInvNum
So, my surmise is I am not telling it which client -- at least not doing so
correctly.
Can anyone see what I have done wrong?
Thanks,