Datasheet subform with Dynamic Querydef

dungstar

Registered User.
Local time
Today, 04:47
Joined
Mar 13, 2002
Messages
72
I have a QBF (query by form) that creates a dynamic querydef. I want to display the results in a datasheet view subform. Is there a way to do this?

A way around this would be to create an Access query with the dynamic query. Is there a way to modify an existing Access query with a querydef or create and overwrite an Access query with a querydef?

Thanks in advance for your help!
 
I would think this can be done. I am using a querydef also and displaying the results in a subreport via code. Do you want an example of this?

Hayley
 
Yes, please. Thank you for your help.
 
Still haven't figured it out! Please help!

I'm trying to display a dynamic querydef in a subform: datasheet view instead of having it open a table view or using a listbox.

I tried this:
Me.frmDatasheetView.RecordSource = "Search Results"
(where "Search Results" is the Dynamic querydef)
Doesn't work: "RecordSource" is not available to the subform (but IS available for the main form.)

Please help! Thank you!
 
I figured it out. I was missing a single word: "form"

Me.frmDatasheetView.FORM.RecordSource = "Search Results"
 

Users who are viewing this thread

Back
Top Bottom