Close and Refresh Form

  • Thread starter Thread starter Julia
  • Start date Start date
J

Julia

I have a very basic employee database that we are using
for the front reception desk. The database has two forms -
the first only shows name, dept and extension BUT does
allow the user to click onto a command button that opens
the individual persons full record. This let's the user
see more information and add,edit,delete the records as
required.

This works fine untill you change/delete information

The first form does not update as it is in effect still
open behind the second (full details).

Is there a quick way to command access to close the first
form and open the second?
 
-----Original Message-----
I have a very basic employee database that we are using
for the front reception desk. The database has two forms -
the first only shows name, dept and extension BUT does
allow the user to click onto a command button that opens
the individual persons full record. This let's the user
see more information and add,edit,delete the records as
required.

This works fine untill you change/delete information

The first form does not update as it is in effect still
open behind the second (full details).

Is there a quick way to command access to close the first
form and open the second?
.
you could add this code to the procedure of the command
button on the first form: DoCmd.Close
insert it BEFORE the code that opens the second form.

or
are you using a command button to close the second form?
if so, you could leave the first form open, and add this
code to the procedure of the second form's command button:
Forms!FirstForm.Requery
insert it either before or after the code that closes the
second form.
 
In the code for the CommandButton_Click Event, you can add the following
statement after the statement that opens the second Form:

DoCmd.Close acForm, Me.Name, acSaveNo

Check Access VB Help on the Close Method.
 
Back
Top