|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Forms....
When a form is opened it displays the last inputted data that was entered on the form. How do I get the form to display a blank form when the user opens the form. People from the office are writing over the current data!
Thanks. |
|
#2
|
|||
|
|||
|
Put this in the On Current event of your form
Code:
docmd.GoToRecord ,,acNewRec |
|
#3
|
|||
|
|||
|
When i go to open the form it now says it cannot open "docmd" macro.
I take it as though i need to make a macro to clear the fields? |
|
#4
|
|||
|
|||
|
I read this somewhere else....
Quote:
Im willing to try this out but need a bit of advice on the location of these properties on the subform and forms. Basically a finger pointing to say "its here!" Thanks. |
|
#5
|
|||
|
|||
|
In the properties of your form, find the On Current property. Place your curser into the text box. To the right of the text box you will see a drop down arrow appear. Next to the drop down arrow is the elipse (a button with three dots "..."). Click on the elipse button and a window will open. Select Code Builder, this will open the code window where you will place the code supplied by ansentry. Copy the code given and paste it between the Private Sub and End Sub. The curser will already be in the correct location for you to paste the code. Then close the code window and save your form. Now when you open your form, the form will be at a new record for data entry.
lwells |
|
#6
|
|||
|
|||
|
Magic.
![]() |
|
#7
|
|||
|
|||
|
Ive just noticed....
When i open the form it takes me to a new blank record, although when i try to navigate through previous records by using the previous or next buttons it doesnt display the previous record but just remains on the blank record. How do i enable it to browse through previous records? Thanks again! |
|
#8
|
|||
|
|||
|
Danny_Access
Post a copy of your db (take out any info you don't want people to see) and let us have a look at your problem. |
|
#9
|
|||
|
|||
|
I cant upload it as it wont allow databases. Id zip and upload it but we dont have winzip!
Any chance i can email it to you? If not i basically just need to be able to navigate through previous records and this new code will only display blank records.... Cheers. ![]() |
|
#10
|
|||
|
|||
|
Danny,
Check the forms property Data Entry. If you have this set to Yes, then you won't be able to navigate back through the records. Check to make sure you have this set to NO and then when you open your form, you will be at a new record but will still be able to navigate back through old records. Also the code DoCmd.GoToRecord , , acNewRec actually needs to be placed in the Open event of the form not the Current Event. I didn't catch that earlier when previously posted by ansentry. lwells Last edited by lwells : January 10th, 2005 at 03:28 PM. |
|
#11
|
|||
|
|||
|
Sorry, ( I have just declared myself idiot of the year) iwells is correct re the location of the code.
I hope it is working now for you. |
|
#12
|
|||
|
|||
|
Yep it works now.
![]() I think i take idiot of the year award. Thanks again. ![]() |
![]() |
| Viewing: Dev Articles Community Forums > Databases > Microsoft Access Development > Forms.... |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|