Hello,
I've searched through all the threads and I just can't seem to solve this issue:
I need to text boxes to update correctly after a selection is made in my combo box.
Table1: Invoice
PrimaryField: InvoiceID || Property: Autonum
Table2: InvoiceExp
PrimaryField: ExpenseID || Property: AutoNum
Field: InvoiceID || Property: Text
Field: VendorID || Property: Number
Field: ConsultantID || Property: Number
Invoice.InvoiceID has a one to many relationship with InvoiceExp.InvoiceID
In the InvoiceExp table, for the field InvoiceID, I designated it as a combo box with the Table/Query that does the following:
SELECT tblInvoice.InvoiceID, tblInvoice.InvoiceNum, tblVendor.VendorCompName, tblConsultant!ConsultantFN & " " & tblConsultant!ConsultantLN AS Consultant FROM tblVendor INNER JOIN (tblConsultant INNER JOIN tblInvoice ON tblConsultant.ConsultantID=tblInvoice.ConsultantID) ON tblVendor.VendorID=tblConsultant.VendorID;
In my form, frmInvExp, the combo box "InvoiceID" has the following under the AfterUpdate event:
Private Sub InvoiceID_AfterUpdate()
Me![InvoiceNum] = Me![InvoiceID].Column(1)
Me![VendorID] = Me![InvoiceID].Column(2)
Me![ConsultantID] = Me![InvoiceID].Column(3)
End Sub
However, in my form, instead of the Name of the Vendor, it displays the VendorID number, and instead of the Name of the Consultant, it displays the ConsultantID number. What did I do wrong?
I've searched through all the threads and I just can't seem to solve this issue:
I need to text boxes to update correctly after a selection is made in my combo box.
Table1: Invoice
PrimaryField: InvoiceID || Property: Autonum
Table2: InvoiceExp
PrimaryField: ExpenseID || Property: AutoNum
Field: InvoiceID || Property: Text
Field: VendorID || Property: Number
Field: ConsultantID || Property: Number
Invoice.InvoiceID has a one to many relationship with InvoiceExp.InvoiceID
In the InvoiceExp table, for the field InvoiceID, I designated it as a combo box with the Table/Query that does the following:
SELECT tblInvoice.InvoiceID, tblInvoice.InvoiceNum, tblVendor.VendorCompName, tblConsultant!ConsultantFN & " " & tblConsultant!ConsultantLN AS Consultant FROM tblVendor INNER JOIN (tblConsultant INNER JOIN tblInvoice ON tblConsultant.ConsultantID=tblInvoice.ConsultantID) ON tblVendor.VendorID=tblConsultant.VendorID;
In my form, frmInvExp, the combo box "InvoiceID" has the following under the AfterUpdate event:
Private Sub InvoiceID_AfterUpdate()
Me![InvoiceNum] = Me![InvoiceID].Column(1)
Me![VendorID] = Me![InvoiceID].Column(2)
Me![ConsultantID] = Me![InvoiceID].Column(3)
End Sub
However, in my form, instead of the Name of the Vendor, it displays the VendorID number, and instead of the Name of the Consultant, it displays the ConsultantID number. What did I do wrong?