A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Refresh form after macro updates fields



 
 
Thread Tools Display Modes
  #1  
Old January 13th, 2010, 08:59 PM posted to microsoft.public.access.forms
rachael
external usenet poster
 
Posts: 78
Default Refresh form after macro updates fields

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?


  #2  
Old January 19th, 2010, 04:52 PM posted to microsoft.public.access.forms
NuBie via AccessMonster.com
external usenet poster
 
Posts: 67
Default Refresh form after macro updates fields

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/For...forms/201001/1

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 02:04 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.