Refresh Table records

bilbonvidia

New member
Local time
Today, 22:23
Joined
Jan 18, 2007
Messages
7
I have a form entering records into a table. The only way I can seem to get the new records entered using the form to appear in the table is by closing it and re-opeing it. Is there a way I can get the table to refresh with new records automatically?

Thank you
 
by default, (as far as I know) when you click or tab out of a new record Access automatically adds the record to the table, so you shouldn't need to close and reopen the form.
What is the form's Record Source?
 
Me.Requery can be used to refresh the database in your form.

Im sure theres much better ways to do it, but you can have it continuously refreshing by doing the following: (this syntax may not be exact, I dont have access on this pc and this is coming from memory)

1) Type a line that says 'TimerInterval = 250' in the Form_Load or Form_Open section of the code.
2) Type a line that says 'Me.Requery' in the Form_Timer section of the code

What this does, is every fourth of a second your form will refresh the database in spite of what you are doing. Like I said, this is a pretty cheesy way to do it, but im a noobie and this works for me 8)

If you dont need it to be happening all the time, all you need to do is find out what event you can add 'Me.Requery' to, that the user will be activating when the database needs to be refreshed.

Hope this helps a little.
 
I think I might have misunderstood the question, heh. The above is a way to get updated records (say records moved via queries mid form operation) to show up in your fields in your form.
 
If you're cycling through the same record (Single Form instead of Continuous Forms), which is normal for a form style entry, you either need to make your own "New" command button, or you need to keep the Navigation Buttons property set to "Yes" in the form's design view. (That's the thing at the bottom of the form that looks like rewind/fast forward buttons with the current record number in the middle.)

In other words, what method of navigating through your records currently exist? Moving off of one record and on to another, which closing and re-opening a form will do, will refresh the recordset. If they can't navigate through the recordset on your form, set the aforementioned navigation buttons property to Yes or build your own structure for handling it.
 

Users who are viewing this thread

Back
Top Bottom