T
tracktraining
Hi ,
I have several queries that I already wrote. I am in the progress of
creating a user interface form. I want to call the queries and display the
results on a subform. I have written a short code (see below), but i keep
getting an error (Error Message: Run_time error '2467'. The expression you
entered refers to an object that is closed or doesn't exist). Is the code
below correct? Any suggestions/advices on how to make this work?
Private Sub Read_Click()
Dim qd As QueryDef
Set qd = CurrentDb.QueryDefs("SearchQuery")
qd.Parameters("Document ID") = Me.SearchDocID
Me.SearchResults.Form.RecordSource = "SearchQuery"
Me.SearchResults.Requery
End Sub
THANKS SO MUCH.
Tracktraining
I have several queries that I already wrote. I am in the progress of
creating a user interface form. I want to call the queries and display the
results on a subform. I have written a short code (see below), but i keep
getting an error (Error Message: Run_time error '2467'. The expression you
entered refers to an object that is closed or doesn't exist). Is the code
below correct? Any suggestions/advices on how to make this work?
Private Sub Read_Click()
Dim qd As QueryDef
Set qd = CurrentDb.QueryDefs("SearchQuery")
qd.Parameters("Document ID") = Me.SearchDocID
Me.SearchResults.Form.RecordSource = "SearchQuery"
Me.SearchResults.Requery
End Sub
THANKS SO MUCH.
Tracktraining