If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Clearing Values in a form
Hello,
I have created a form with several text boxes in it. There is also a command button that runs a report. In this report are various calculations based on the form. When I close my report it takes me back to the form with the values I just plugged in. What I want to do is to have a button on this form which clears all values and allows me to start over and run another report. Is there something that does this? Thanks, Haji |
#2
|
|||
|
|||
Clearing Values in a form
You would have to add code to a button. Basically...
Private Sub ResetButton_Click() Field1 = "" Field2 = "" : : End Sub Rick B "Haji" wrote in message ... Hello, I have created a form with several text boxes in it. There is also a command button that runs a report. In this report are various calculations based on the form. When I close my report it takes me back to the form with the values I just plugged in. What I want to do is to have a button on this form which clears all values and allows me to start over and run another report. Is there something that does this? Thanks, Haji |
#3
|
|||
|
|||
Clearing Values in a form
Try something along the lines of
Dim ctl As Control For each ctl in Me.Controls If ctl.ControlType = acTextBox Then ctl.Value = "" End If Next Hope This Helps Gerald Stanley MCSD -----Original Message----- Hello, I have created a form with several text boxes in it. There is also a command button that runs a report. In this report are various calculations based on the form. When I close my report it takes me back to the form with the values I just plugged in. What I want to do is to have a button on this form which clears all values and allows me to start over and run another report. Is there something that does this? Thanks, Haji . |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Creating a Form. Should I use Control or Form Toolbar? | Amy | General Discussion | 7 | July 1st, 2004 02:36 PM |
How to syncronize a datasheet form and single form? | Sandra | Using Forms | 9 | June 16th, 2004 05:24 AM |
form doesn't update!!!!! | manish | Using Forms | 4 | June 15th, 2004 11:24 AM |
surely a form with a ListBox can be used in a query? | 1.156 | Running & Setting Up Queries | 14 | June 2nd, 2004 04:54 PM |
Form Does Not Go To New Record | Steve | New Users | 1 | May 12th, 2004 03:15 AM |