Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Refreshing a form
Message
De
28/08/2001 11:49:52
 
 
À
Tous
Information générale
Forum:
Microsoft Office
Catégorie:
Access
Titre:
Refreshing a form
Divers
Thread ID:
00549874
Message ID:
00549874
Vues:
38
I have a temp table with the same structure as a permanent table. I based a form on the temp table and used it as a data entry form.

When the user clicks on the "OK" button:
1. the record is appended to the permanent table
2. the temp table is zapped

In order to get the form to refresh (clear out all of the textboxes for the next record) my macro had to look like this:
1. GoToRecord ' go next
2. OpenQuery ' append to permanent table
3. OpenQuery ' dele record from temp table
4. Requery

(without the GoToRecord statement the values entered stayed in the textboxes when the first record was entered and "OK" was clicked to start the second record)

Since the temp table is empty when the form is opened, if the user doesn't start to enter a record and hits "OK", the macro halts on the first step stating it 'can't go to specified record'. If the user starts entering a record and then hits "OK" everything is fine. Is there any other way to 'refresh' the form?
Here's to alcohol...the cause of ... and solution to ... all of life's problems - - Homer J. Simpson
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform