Refresh form after macro updates fields

  • Follow


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?


0
Reply Utf 1/13/2010 8:59:14 PM

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


Rachael wrote:
>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?

-- 
spread the WORD

Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/Forums.aspx/access-forms/201001/1

0
Reply NuBie 1/19/2010 4:52:47 PM


1 Replies
1443 Views

(page loaded in 0.06 seconds)

Similiar Articles:
















7/21/2012 11:37:38 PM


Reply: