Connecting Tech Pros Worldwide Help | Site Map

Refreshing Page

 
LinkBack Thread Tools Search this Thread
  #1  
Old November 13th, 2005, 02:04 PM
G25532
Guest
 
Posts: n/a
Default Refreshing Page

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



  #2  
Old November 13th, 2005, 02:04 PM
King Ron
Guest
 
Posts: n/a
Default Re: Refreshing Page

In the subform .AfterUpdate event:

<uncompiled code>

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

</uncompiled code>

KingRon @ Chi

  #3  
Old November 13th, 2005, 02:04 PM
jv
Guest
 
Posts: n/a
Default Re: Refreshing Page

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

  #4  
Old November 13th, 2005, 02:04 PM
jv
Guest
 
Posts: n/a
Default Re: Refreshing Page

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.

 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,840 network members.