Reload form

R

Robert Neville

My database has a form that allows the user to select a file and run
some code behind the form. The Microsoft Common Dialog object allows
the user to browser the file hierarchy. When the user selects a text
file, the code parses the data and inserts it into table repositories.
The form also contains text controls and sub-forms linked to the table
repositories for manual verification. The import process completes its
duties, yet does not repaint the form or sub-form. You have to close
and form and reopen before you may view the import data.

How do I refer to the form objects and repaint the forms after running
the code?

Should I place the code in the OnCurrent event?

Should I reload the form after the import process?

Please help me avoid hours search for these simple answers in the help
files or internet.
 
N

Neil

Robert,

Place,

Forms!FormName.Requery

as the last line of your import code (obviously replacing FormName with the
name of your form). This should then refresh the values on your form.

HTH,

Neil.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top