Text Box As Combo Row Source

  • Thread starter Thread starter Wayne
  • Start date Start date
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
 
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
 
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
 
Back
Top