More Combo Boxes and DLooUp Help
More Combo Boxes and DLooUp Help
(OP)
I was going through the previous question but I don't think that applies to me much. I have a table with my customers in it (tblCustomers) which have among other fields CustID and CustName. I have a data entry form (frmOrders) where there is a combo box (cmbCustID) that looks at the [tblCustomers]![CustID] for the Id Number and a text box [txtCustName]. I want to choose the CustID from the Combo Box and have the Customer Name appear on txtCustName so there wont be any errors. Thank You.
RE: More Combo Boxes and DLooUp Help
cmbCustID row source =
Select CustID, CustName from tblCustomers
cmbCustID After Update event =
txtCustName = cmbCustID.Column(1)
(column counting starts at zero)
Regards
Shep
RE: More Combo Boxes and DLooUp Help
RE: More Combo Boxes and DLooUp Help
Does it compile OK?
Does the combo row source work?
Does it perform the combo drop down OK?
Does it raise an error when you select?
Does anything appear in the text box?
Does it just not do anything?
Have you done what I suggested without any typos / slight amendments?
Shep
RE: More Combo Boxes and DLooUp Help
The combo row source works ok
It performs the combo drop down ok
It doesn't raise an error when I select
Nothing appears in the text box
Nope, it doesn't do anything
The only thing it does when I put in to the event row is this: =[txtCustName]=[cmbCustID].[Column](1)
Any ideas?
RE: More Combo Boxes and DLooUp Help
This should take you thru to the VBA editor with the following...
Private Sub Combo0_AfterUpdate()
End Sub
Put txtCustName = cmbCustID.Column(1) between the 2 lines so you get...
Private Sub Combo0_AfterUpdate()
txtCustName = cmbCustID.Column(1)
End Sub
Shep