Text Box As Combo Row Source

W

Wayne

I want to use the contents of a text box on a bound form
in the WHERE clause of the Row Source of a combo box on
the same form. Here is the Row Source:

SELECT Equipment.AccountNumber, Equipment.Description FROM
Equipment WHERE Equipment.AccountNumber=Me.AccountNumber

What will make this work?

Thanks
 
R

Rick Brandt

Wayne said:
I want to use the contents of a text box on a bound form
in the WHERE clause of the Row Source of a combo box on
the same form. Here is the Row Source:

SELECT Equipment.AccountNumber, Equipment.Description FROM
Equipment WHERE Equipment.AccountNumber=Me.AccountNumber

What will make this work?

SQL don't no nuttin about "Me".

SELECT Equipment.AccountNumber, Equipment.Description FROM Equipment WHERE
Equipment.AccountNumber=Forms!FormName.AccountNumber
 
F

fredg

I want to use the contents of a text box on a bound form
in the WHERE clause of the Row Source of a combo box on
the same form. Here is the Row Source:

SELECT Equipment.AccountNumber, Equipment.Description FROM
Equipment WHERE Equipment.AccountNumber=Me.AccountNumber

What will make this work?

Thanks

Does this help:

Leave the ComboBox RowSource blank.
Place the following in the Form's Current event:

ComboName.Rowsource = "SELECT Equipment.AccountNumber,
Equipment.Description FROM Equipment WHERE Equipment.AccountNumber = "
& Me!AccountNumber
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top