B
babs
Below is the code that I have tied to the after update event of Client id. I
only want to see the pickupyd and delivyd for the given Clientid for the drop
down list of the form. For some reason the pickupyd field is a number field
NOT text and my drop down is not displaying correctly- getting 1 2 3
instead of the actual pickupyd(number) ex. 889 or 7348. Not sure why- is it
something to do with the syntax below????? No idea.
Private Sub cboClientId_AfterUpdate()
Dim lSql As String
Dim mSql As String
'This function sets the RowSource of ClientId, based on the value selected
in ClientId
lSql = "SELECT Distinct Pickupyd,Clientid " & "FROM tbltanksrate " & "WHERE
ClientId = """ & Me.cboClientId & """ " & "ORDER BY Pickupyd"
Me.cboPickupYd.RowSource = lSql
mSql = "SELECT Distinct Delivyd,Clientid " & "FROM tbltanksrate " & "WHERE
ClientId = """ & Me.cboClientId & """ " & "ORDER BY Delivyd"
Me.cboDelivYd.RowSource = mSql
End Sub
Thanks,
Barb
only want to see the pickupyd and delivyd for the given Clientid for the drop
down list of the form. For some reason the pickupyd field is a number field
NOT text and my drop down is not displaying correctly- getting 1 2 3
instead of the actual pickupyd(number) ex. 889 or 7348. Not sure why- is it
something to do with the syntax below????? No idea.
Private Sub cboClientId_AfterUpdate()
Dim lSql As String
Dim mSql As String
'This function sets the RowSource of ClientId, based on the value selected
in ClientId
lSql = "SELECT Distinct Pickupyd,Clientid " & "FROM tbltanksrate " & "WHERE
ClientId = """ & Me.cboClientId & """ " & "ORDER BY Pickupyd"
Me.cboPickupYd.RowSource = lSql
mSql = "SELECT Distinct Delivyd,Clientid " & "FROM tbltanksrate " & "WHERE
ClientId = """ & Me.cboClientId & """ " & "ORDER BY Delivyd"
Me.cboDelivYd.RowSource = mSql
End Sub
Thanks,
Barb