Data acces forms

  • Thread starter Thread starter Arne
  • Start date Start date
A

Arne

I have 2 data tables, vendorlist and Transactionlist. I
have created a lookup box for vender name to enter
transactions. How do I display fields from vendorlist
table to my transaction Entry form when I pull-up a
record in the lookup box [Vendor name] and save it to the
transactionlist table. It should display the record
before it is saved in the transactionlist table.
 
I use a simple method to do this. If I understand you correctly you want to
populate fields on this form that are bound to the table Transactionlist.
And also have a combo box to display vendors. If this is correct then you
can set the row source property of the compobox to include the fields from
vendorlist that you want to use. the other property that you would need to
change is column count, set it to the number of fields selected in the row
source. Next you access these values in code by referencing the combobox
name and column number re: cboVendor.column(0) , cboVendor.column(1) etc.
code would look something like this:
Me.VendorName = cboVendor.column(0)
Me.VendorAddress = cboVendor.column(1)
column 0 is the first field selected in the row source query builder, column
1 is the second, etc.
HTH
 
Back
Top