Refresh a form after importing (1 Viewer)

gschimek

Registered User.
Local time
Yesterday, 19:12
Joined
Oct 2, 2006
Messages
102
So I feel like this should be easy but I'm not finding an answer by searching.

I have a form that's using a query as a record source. Normally that query is empty, as it's just linked to a temporary table, so when I open the form, generally I'm on record 1 of 1.

On that form is a button that imports data from a text file. I want to find a way to refresh the data on the form after importing, so that it shows the new records without having to close and reopen the form. So where I was on record 1 of 1 before importing, I want it to show that I'm on record 1 of 25.

Any ideas?
 

Galaxiom

Super Moderator
Staff member
Local time
Today, 10:12
Joined
Jan 20, 2009
Messages
12,853
Use the Requery method of the form.
 

gschimek

Registered User.
Local time
Yesterday, 19:12
Joined
Oct 2, 2006
Messages
102
Hmm. I could have sworn I'd already tried that. But I tried it again and that did the trick. Thanks.
 

Galaxiom

Super Moderator
Staff member
Local time
Today, 10:12
Joined
Jan 20, 2009
Messages
12,853
Maybe you did Refresh? That just shows changes to existing records. Requery is required to show new records.
 

Users who are viewing this thread

Top Bottom