Refresh form after macro updates fields

R

Rachael

I'm using Access 07. I have a form Employees based on a table of the same
name. I also have a form Policies also based on a table of that same name.

Table Employees contains basic personal information on employees, while
Policies contains insurance policy information. The policies table also
contains some of the same info as the Employees table (name, DOB, etc ...) An
employee may have multiple policies.

On the data entry form Employees, the user enters the basic employee info
(name, DOB, SSN, etc ...) then clicks a button to open the entry form for
Policies.
On the Policies entry form, there is a button (Update) that runs a macro
that includes a series of queries to update the fields that are common to
both tables where the SSN is the same. This works fine. Then the user can
proceed with entering the individual policy information.

What I want to happen is that once the user updates the common fields (name,
DOB, etc ...), I want the page to refresh so the user can see the updated
information, making sure it all is there, before proceeding to enter the
policy information. Currently, the user has to exit the Policies form and
re-enter (or move to another record and come back) to see the updated info.

Is there a simple way to refresh the page once the macro runs the queries to
update certain fields?
 
N

NuBie via AccessMonster.com

have you tried to bookmark your form and set the record back to the bookmark
after requery?

varBookmark = Me.Bookmark
DoCmd.RunMacro <yourMacro>
Me.Requery
Me.Bookmark = varBookmark
 

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