Reload form

  • Thread starter Thread starter Robert Neville
  • Start date Start date
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.
 
Hi Robert,

assuming you have a commandbutton to carry out your text
file import routine try adding the following line after
the import code.

Me.Requery

hth

chas
 
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.
 
Back
Top