Sep 11, 2015 #1 hpl2001 Programmer Dec 18, 2001 105 CA Hello: Is it possible to open a form without preloading the data? I don't want the query to run until the user clicks on a search button. TIA Holly
Hello: Is it possible to open a form without preloading the data? I don't want the query to run until the user clicks on a search button. TIA Holly
Sep 11, 2015 #2 dhookom Programmer Jun 24, 2003 22,519 US Your form's record source can be set to return no records. When the search button is clicked, reset the record source. Duane Hook'D on Access MS Access MVP Upvote 0 Downvote
Your form's record source can be set to return no records. When the search button is clicked, reset the record source. Duane Hook'D on Access MS Access MVP
Sep 11, 2015 Thread starter #3 hpl2001 Programmer Dec 18, 2001 105 CA Great. Would you be able to show me what the code would look like to reset the record source? The source is a query. Upvote 0 Downvote
Great. Would you be able to show me what the code would look like to reset the record source? The source is a query.
Sep 11, 2015 1 #4 dhookom Programmer Jun 24, 2003 22,519 US Your record source could be set to something like: SELECT * FROM [YourQueryNameHere] WHERE 1 = 2; Then when you are ready, change the record source to something like: SELECT * FROM [YourQueryNameHere]; You can also open the form with a filter like: [MyNeverNegativeField] = -1 Duane Hook'D on Access MS Access MVP Upvote 0 Downvote
Your record source could be set to something like: SELECT * FROM [YourQueryNameHere] WHERE 1 = 2; Then when you are ready, change the record source to something like: SELECT * FROM [YourQueryNameHere]; You can also open the form with a filter like: [MyNeverNegativeField] = -1 Duane Hook'D on Access MS Access MVP
Sep 11, 2015 Thread starter #5 hpl2001 Programmer Dec 18, 2001 105 CA That works great. Thank you so much! Holly Upvote 0 Downvote