Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

RowSource Problem

Status
Not open for further replies.

georgp

Technical User
Mar 28, 2002
96
US
Hi,

I have a combobox with the following - working - VBA code, which restricts the dropbox selection to the items related to combobox cbo_Fld0:

cbo_Lot0.RowSource = "SELECT Distinct LotName from tbl_ProdLot Where [ProdNo] = " & cbo_Fld0.Column(2)

However, if I try to put the code into the property window of the control, the 'cbo_Fld0.Column(2)' expression is not accepted.
What is the correct syntax?

Thanks, georgp
 
Try putting your code in the AfterUpdate event of the combo box. If you need further direction, post back.


Steve Lewy
Solutions Developer
steve@lewycomputing.com.au
(dont cut corners or you'll go round in circles)
 
Sorry, further clarification; put the code in the afterupdate event of the cbo_Fld0 field.

Steve Lewy
Solutions Developer
steve@lewycomputing.com.au
(dont cut corners or you'll go round in circles)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top