Suppose I have two tables and a query:
tblCompanies
tblClients
I already have some code that works for the AfterUpdate procedure of Customer
But now I would like to assign the value of FullName (from qrySortContacts) to the Field of Client in the table for the orders.
The problem is that until now the value of ClientID is assigned to the field Client. It is the right ClientID, however I would like to have the client's FullName shown there.
Regards,
Robbin
tblCompanies
tblClients
These are related via a query:
qrySortContacts
I have a form to add orders. In this form both a customer and a client need to be chosen. I would like to restrict the options for Clients on the basis of the choice for Customer. Only those clients that work at the Customer chosen, can be chosen as Client.
I have a form to add orders. In this form both a customer and a client need to be chosen. I would like to restrict the options for Clients on the basis of the choice for Customer. Only those clients that work at the Customer chosen, can be chosen as Client.
I already have some code that works for the AfterUpdate procedure of Customer
Code:
Private Sub Customer_AfterUpdate()
strSQL = "SELECT ContactID, FullName, CompanyID FROM qrySortContacts " _
& "WHERE CompanyID = '" & Me.Customer & "'"
Me.Client.RowSource = strSQL
Me.Client.Requery
End Sub
But now I would like to assign the value of FullName (from qrySortContacts) to the Field of Client in the table for the orders.
The problem is that until now the value of ClientID is assigned to the field Client. It is the right ClientID, however I would like to have the client's FullName shown there.
Regards,
Robbin