theKruser
Registered User.
- Local time
- Today, 01:59
- Joined
- Aug 6, 2008
- Messages
- 122
I am trying to refresh one form from another.
I have a table (tblZ) and two forms, frmA and frmB. frmA has a command button (cmdA), an unbound list box (lstA) and a subform (sbfA). The AfterUpdate property of lstA refreshes sbfA. The OnClick property of cmdA opens frmB.
frmB is a modal pop up that adds a record into tblZ. frmB has a command button (cmdB) that closes frmB.
What I would like is to find a way to refresh frmA on clicking cmdB. I have tried the following in the OnClick property:
1. [Forms]![frmA].Refresh
2. [Forms]![frmA].Requery
3. [Forms]![frmA].[lstA].Refresh
4. [Forms]![frmA].[lstA].Requery
5. [Forms]![frmA]![lstA].Refresh
6. [Forms]![frmA]![lstA].Requery
7. Me.Dirty = False
DoCmd.Close acForm, "frmA"
DoCmd.OpneForm "frmA", acNormal, , , acFormEdit
As you can probably ascertain, none of these have worked. I have also tried adding Me.Refresh on the OnLoad, GotFocus, and OnActivate properties of frmA to no avail.
Any help would be greatly appreciated. Thank you in advance for your help. Have a good day.
I have a table (tblZ) and two forms, frmA and frmB. frmA has a command button (cmdA), an unbound list box (lstA) and a subform (sbfA). The AfterUpdate property of lstA refreshes sbfA. The OnClick property of cmdA opens frmB.
frmB is a modal pop up that adds a record into tblZ. frmB has a command button (cmdB) that closes frmB.
What I would like is to find a way to refresh frmA on clicking cmdB. I have tried the following in the OnClick property:
1. [Forms]![frmA].Refresh
2. [Forms]![frmA].Requery
3. [Forms]![frmA].[lstA].Refresh
4. [Forms]![frmA].[lstA].Requery
5. [Forms]![frmA]![lstA].Refresh
6. [Forms]![frmA]![lstA].Requery
7. Me.Dirty = False
DoCmd.Close acForm, "frmA"
DoCmd.OpneForm "frmA", acNormal, , , acFormEdit
As you can probably ascertain, none of these have worked. I have also tried adding Me.Refresh on the OnLoad, GotFocus, and OnActivate properties of frmA to no avail.
Any help would be greatly appreciated. Thank you in advance for your help. Have a good day.