Hi,
I am creating a generic search form [FormSearch], which allows users to select different data options and then display the results of the query in a new form [FormAnswer].
When the search button is clicked on FormSearch I:
- construct my SQL Query, which works okay
- set the recordsource of FormAnswer to the query statement using code FormAnswer.RecordSource = strQuery
- Open the FormAnswer form
On the FormAnswer form I have bound the fields to the relevant fields of the table, which I am querying.
My problem is that the records returned by the quer are not being displayed on the FormAnswer form. I'm not sure why. the fields on the form are bound and I have set the record source before I open the form.
Is there something else I need to do when setting the record source for a new form I am opening?
Any help / ideas would be greatly appreciated.
Thanks
I am creating a generic search form [FormSearch], which allows users to select different data options and then display the results of the query in a new form [FormAnswer].
When the search button is clicked on FormSearch I:
- construct my SQL Query, which works okay
- set the recordsource of FormAnswer to the query statement using code FormAnswer.RecordSource = strQuery
- Open the FormAnswer form
On the FormAnswer form I have bound the fields to the relevant fields of the table, which I am querying.
My problem is that the records returned by the quer are not being displayed on the FormAnswer form. I'm not sure why. the fields on the form are bound and I have set the record source before I open the form.
Is there something else I need to do when setting the record source for a new form I am opening?
Any help / ideas would be greatly appreciated.
Thanks