Using a combobox to filter data in a subform/query

  • Hi,

    I  do not know if i am posting my question in the correct forum. But anyway, here's my question..

    I am creating a database for inventory. I have created all of the tables Users, and Iventory items.

    I have a form, on this form i want to have a combo box that looks up Users names. After selcting a particullar user, a query should run and show only records for that particullar person..

    I tried using this statement on the query but i get an error " Forms!Form Name!Combo Box"..

    How do i get around this. I used Access 2003 to create the forms and the tables r on an SQL Server 2003

     

    Thanks

  • hi,

    you should need to to access the column having the User Id.

    Forms!Form Name!Combo Box.columns(0)

    Where 0 is the index of the column holding the user id. may be in your case is a different column. but it clear your concept how to use the combo box value.

    Cheers

    cheers

  • It would be good to know exactly what that error message is.  I'm going to assume that the error message said something about the Forms!Form Name!Combo Box could not be found, or it was looking for the value.  If there are any spaces in any of the names (which you do show in your example) then you will need brackets around that name.  For example:  Forms![Form Name]![Combo Box]

    HTH, Vic

    [font="Comic Sans MS"]Vic[/font]
    www.vicrauch.com

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply