Populating forms

  • Thread starter Thread starter VAA
  • Start date Start date
V

VAA

Guest
I need to find out how to populate a blank form with the results of a query i.e. by selecting an item in a combo box and populating the form with the results.

Thanks,
VAA
 
just set the record source under the form properties. If you set the record source to a query you can enter a criteria in the query so that only records matching that criteria are retrieved. Your criteris will be set to the Combobox so that only records matching the value on the combo box are retrieved.

You can also set it through code"
Dim SQL as string
SQL = "Select * from Table Where Somefield = " & combobox.value
Form.Datasource = SQL
Form.Requery
 

Users who are viewing this thread

Back
Top Bottom