Keep Query from Running? (1 Viewer)

mcgilla

Registered User.
Local time
Today, 13:06
Joined
Sep 17, 2010
Messages
31
I have a form based on a query that I've developed over the past couple of days. When I first started, the form opened cleanly with no prompts needed. I could select my criteria, do a refresh and everything looks ok. The problem came when I selected new criteria, it wouldn't always update to the new record.

So, refresh became requery, and now it opens differently. When I open the form it prompts me for the three different criteria I've always needed for the query, and then opens up the blank form ready for me to then start selecting the necessary information. I want to suppress those three prompts on load.

Didn't find anything here with either supress or keep query form loading...
 

CBrighton

Surfing while working...
Local time
Today, 18:06
Joined
Nov 9, 2010
Messages
1,012
If the query used as the record source no linger needs these criteria then remove it from the query.

Or create a second copy of the query without those criteria for use in this form (that way the query continues to work the same in any other functions it may have).
 

mcgilla

Registered User.
Local time
Today, 13:06
Joined
Sep 17, 2010
Messages
31
If the query used as the record source no linger needs these criteria then remove it from the query.

Or create a second copy of the query without those criteria for use in this form (that way the query continues to work the same in any other functions it may have).

You made me think. Instead of having the query as the recordsource setup in the properties. I used the Form_Open event to set the recordsource. I have to setup a dummy trial now to make sure the data transfers ok.

Code:
Form_Open
'This is basically what I've done
Me.Recordsource = "Select...."
 
End Sub
 

CBrighton

Surfing while working...
Local time
Today, 18:06
Joined
Nov 9, 2010
Messages
1,012
As long as you are using the same query (or SQL copied from it) then that shouldn't make a difference.

Unless you have these parameters set in the query properties but not actually used as criteira. In which case either copying the SQL or deleting the parameters will resolve it.
 

Users who are viewing this thread

Top Bottom