A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

refresh subform



 
 
Thread Tools Display Modes
  #1  
Old August 25th, 2008, 09:52 PM posted to microsoft.public.access.forms
twalsh
external usenet poster
 
Posts: 28
Default refresh subform

I have a main form with a textbox which is the criteria in a simple Select
Query

A subfrom on this main form is based on the Select Query.

How can i change the value in the text box and requery to update the data in
the subform?
  #2  
Old August 25th, 2008, 10:50 PM posted to microsoft.public.access.forms
Klatuu
external usenet poster
 
Posts: 7,074
Default refresh subform

Modify the subform's record source query to be filtered by the content of the
text box and in the after update event of the text box, requery the subform.

So you would have a criteria in the query like
Forms!MyMainFormName!MyTextBox Name

And then in the After Update event.

Me.MySubformControlName.Form.Requery
--
Dave Hargis, Microsoft Access MVP


"twalsh" wrote:

I have a main form with a textbox which is the criteria in a simple Select
Query

A subfrom on this main form is based on the Select Query.

How can i change the value in the text box and requery to update the data in
the subform?

  #3  
Old November 19th, 2008, 07:31 PM posted to microsoft.public.access.forms
Felix
external usenet poster
 
Posts: 90
Default refresh subform

I have similar problem.
the difference is my textbox contain date with automatically default to
today's date. Everytime I add data into subform's table, the new data did not
appear unless I enter new date on the textbox to fire up the after update
event or press F5 key to refresh the form. The textbox not necessarily need
to update if the same date still be using.

My question is:
How do I make the textbox automatically update the value (can be defaulted
to today's date) so it will fire-up the after update event?
is there any other way to do the trick?

thanks,
Felix




"Klatuu" wrote:

Modify the subform's record source query to be filtered by the content of the
text box and in the after update event of the text box, requery the subform.

So you would have a criteria in the query like
Forms!MyMainFormName!MyTextBox Name

And then in the After Update event.

Me.MySubformControlName.Form.Requery
--
Dave Hargis, Microsoft Access MVP


"twalsh" wrote:

I have a main form with a textbox which is the criteria in a simple Select
Query

A subfrom on this main form is based on the Select Query.

How can i change the value in the text box and requery to update the data in
the subform?

 




Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 05:30 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.