I am using Access 97.
I have a form open, which contains a listbox and a single button, designed to open a record, based on the selection the user names in the listbox. The listbox has two pieces of information, a Vendor ID, and a Vendor Name, supplied by a table(which contains more than those two items). When a user selects the vendor he wants a record for, he should be able to hit the button and open a new form, filled in with the record specific to that Vendor ID. For some reason though, the form will open, but it will be blank.
Here is my code on the button:
Private Sub OpenSelected_Click()
DoCmd.OpenForm "Vendor Information", , , "VendorID" = Me.NameList.Column(0)
End Sub
I have played around with all differen formattings for the where statement. The column(0) is the column with the Vendor ID. The column with the Vendor ID is also the bound column, and I have tried Me.NameList.BoundColumn, but that does not work either.
Anyones ideas would be greatly appreciated. I have searched many many websites and only found that this process should work.
Thank you
Garrett Kaste
Phoenix America Inc.
I have a form open, which contains a listbox and a single button, designed to open a record, based on the selection the user names in the listbox. The listbox has two pieces of information, a Vendor ID, and a Vendor Name, supplied by a table(which contains more than those two items). When a user selects the vendor he wants a record for, he should be able to hit the button and open a new form, filled in with the record specific to that Vendor ID. For some reason though, the form will open, but it will be blank.
Here is my code on the button:
Private Sub OpenSelected_Click()
DoCmd.OpenForm "Vendor Information", , , "VendorID" = Me.NameList.Column(0)
End Sub
I have played around with all differen formattings for the where statement. The column(0) is the column with the Vendor ID. The column with the Vendor ID is also the bound column, and I have tried Me.NameList.BoundColumn, but that does not work either.
Anyones ideas would be greatly appreciated. I have searched many many websites and only found that this process should work.
Thank you
Garrett Kaste
Phoenix America Inc.