|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
form reset
hi all,
- i have a form which is used by the user to insert the data in the tables. Now the problem is that when ever the user fills in the form and submits the old values remain in the fields now i want that when ever user press the submit button on the form (then after successfull insertion in table) the form resets i.e. intialized to default values of the values which were in the beginning when form was opened. - i have form in which differnt criteria's are present whenever the user selects a criteria i.e records between two dates then a query should execute and the result of that query should be posted to a report is that possible if yes then how. Thanks in anticipation |
|
#2
|
|||
|
|||
|
For your first question, I believe what you are wanting to do is go to a new record that contains all your default values. Assuming that you have added all the default values to each of the controls, then when the user presses the button to save the current record, just add the command DoCmd.GoToRecord , , acNewRec at the end of the events in your code. This would move the record on your form to a new record with all the default values showing. In effect giving the reset appearance.
For your second question, create your query and in the grid below the date that you wish to sort by, enter the following: Between [Forms]![NameOfForm]![StartDate] And [Forms]![NameOfForm]![EndDate] Change the name of the form and controls with your own. Then set your report's RecordSource to this query. lwells |
![]() |
| Viewing: Dev Articles Community Forums > Databases > Microsoft Access Development > form reset |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|