M
Mike
Hi,
I have a form with an unbound combobox (row source type table/query, row
source set to a table), then a subform with a datasheet. Selection in
combobox deturmines records displayed in the datasheet, this works fine.
On the main/parent form I have a button, on clicking this I want to replace
the contents of the datasheet with the results of a query. The datasheet
has 6 fields (one of which may be hidden depending on the combobox
selection), the query returns one (or more) fields.
I am trying to use
Me.Subform1.Form.RecordSource = "myQuery"
to display the contents of the query in the datasheet, but I keep getting
prompted to "Enter Parameter Value" (the field being referred to is the
rowsource for the combobox on the main form).
When the query is run outside of the combobox no prompt for parameter value
occurs.
When I run the query from the form I will also be disabling the combobox, so
it doesn't matter (for my purposes what value is in the combo.
What am I doing wrong ? (am a newbie to access)
thanks for any help.
Mike
I have a form with an unbound combobox (row source type table/query, row
source set to a table), then a subform with a datasheet. Selection in
combobox deturmines records displayed in the datasheet, this works fine.
On the main/parent form I have a button, on clicking this I want to replace
the contents of the datasheet with the results of a query. The datasheet
has 6 fields (one of which may be hidden depending on the combobox
selection), the query returns one (or more) fields.
I am trying to use
Me.Subform1.Form.RecordSource = "myQuery"
to display the contents of the query in the datasheet, but I keep getting
prompted to "Enter Parameter Value" (the field being referred to is the
rowsource for the combobox on the main form).
When the query is run outside of the combobox no prompt for parameter value
occurs.
When I run the query from the form I will also be disabling the combobox, so
it doesn't matter (for my purposes what value is in the combo.
What am I doing wrong ? (am a newbie to access)
thanks for any help.
Mike