By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
432,508 Members | 1,823 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 432,508 IT Pros & Developers. It's quick & easy.

Refreshing Page

P: n/a
I have a form that contains a macro button which on clicking, opens a
subform over the main form. I have in the macro "Where Condition" the
following:
[QuoteNo]=[Forms]![frm_ViewQuote]![QuoteNo]

The subform has related fields as found in the main form for the selected
QuoteNo (hence the use of the above expression.
Once I have filled out the subform fields I would close the subform.
Q: I can't make the main form reflect the changes made in the subform for
the respective fields where the changes took place. I don't want to close
the main form and then go back into it... I know this works but I'm hoping a
quick refresh of the main form page or something could quickly provide the
changes as soon as the subform closes down.
thanks
Nov 13 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
In the subform .AfterUpdate event:

<uncompiled code>

Private MySubform.AfterUpdate()
Me.Parent.Requery
End Sub

</uncompiled code>

KingRon @ Chi

Nov 13 '05 #2

P: n/a
jv
The way to do that is to open the second form in Dialog Mode and then
do a refresh on the main form once the second form is closed. I would
remove the macro and place the following code in the On_Click event
procedure of the button:

DoCmd.OpenForm "SecondFormName", , , "[QuoteNo]=" &
[Forms]![frm_ViewQuote]![QuoteNo] , , acDialog
Me.Refresh

The above code assumes that that your QuoteNo is a numeric field. If
it is a text field then change the Where parameter to "[QuoteNo]='" &
[Forms]![frm_ViewQuote]![QuoteNo] & "'"

Good luck.

Julie

Nov 13 '05 #3

P: n/a
jv
I also assumed that when you said subform, you meant popup form.
Otherwise you wouldn't use a macro with a Where Condidtion to open it.
Forgive me if I assumed wrong.

Nov 13 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.