Clear parameter query form without a command button

  • Thread starter Thread starter GD
  • Start date Start date
G

GD

I am using text boxes on a form as query parameters. How do I get the text
boxes to reset (or return to blank) after the query is run. Can someone give
me an example of the code I need?
 
I think I'm missing something...

If you are using a form to collect parameters for a query, how does the
query know to run?

If you are using a command button to run the query, then add the code that
empties the parameter controls to the command button's Click event procedure
after the code that runs the query.

--
Regards

Jeff Boyce
www.InformationFutures.net

Microsoft Office/Access MVP


Microsoft IT Academy Program Mentor
http://microsoftitacademy.com/
 
Can you give me an example of how that code should read? Here's how it reads
so far:

Private Sub Command62_Click()
DoCmd.OpenQuery "qryLast2months", acViewNormal, acEdit
End Sub
 
An example:


GD said:
Can you give me an example of how that code should read? Here's how it
reads
so far:

Private Sub Command62_Click()
DoCmd.OpenQuery "qryLast2months", acViewNormal, acEdit

Me!txtYourFirstTextBox = Null
Me!txtYourSecondTextBox = Null
...

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
Works great!! Thanks, Jeff!
--
GD


Jeff Boyce said:
An example:




Me!txtYourFirstTextBox = Null
Me!txtYourSecondTextBox = Null
...


Regards

Jeff Boyce
Microsoft Office/Access MVP
 
Back
Top