Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help with Refreshing form's data

Status
Not open for further replies.

RiderJon

Programmer
Aug 26, 2002
190
FR
Hello all,

I am trying to refresh form data. But it doesn't work

Since my record source for the main form, frmMain, is a "group by" query & a table, tbl1, I cannot update tbl1. So, I have a command button on this main form, frmMain, that opens another form, frm2, which allows me to edit information on table, tbl1.

The current form's record source is a table "tbl1" and a query "qry2".

The form, frm2's record source is tbl1.

On the main form, frmMain, I have a refresh button with the following code attached to "on click" event. I see the screen flickering but the data doesn't get refreshed.

DoCmd.DoMenuItem acFormBar, acRecordsMenu, 5, , acMenuVer70


However, when I close and reopen the form, frmMain, the current data is refreshed?

Is it because I am modifying the data using a second form, while the frmMain with same record source?

Thank you.


RiderJon
"I might have created ctrl+alt+del,
But Bill made it famous" - Dr. Dave
 
Try changing the code on the refresh button to

Forms!WhateverTheFormIWantToRefresh.Requery

 
vba .... thanx .... it worked

RiderJon
"I might have created ctrl+alt+del,
But Bill made it famous" - Dr. Dave
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top