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. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
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
|
|||
|
|||
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 | |
|
|