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  

requerying a subform



 
 
Thread Tools Display Modes
  #1  
Old March 24th, 2008, 03:35 PM posted to microsoft.public.access.forms
Paul Doree[_2_]
external usenet poster
 
Posts: 11
Default requerying a subform

Hi,

I have a main form with two sub forms on it.

The recordsource of the second subform has in it's criteria a reference to
the JobID of the first i.e. forms!MainForm!Subform1!JobID. If I put a
button on the main form and requery Subform1 from it all is well - Subform2
results update to reflect the job selected in Subform1

What I need, though, and I'm struggling to find, is the syntax to requery
the second subform from the on current event of the first subform.

Help appreciated

Paul


  #2  
Old March 24th, 2008, 03:54 PM posted to microsoft.public.access.forms
ruralguy via AccessMonster.com
external usenet poster
 
Posts: 1,172
Default requerying a subform

If you have the LinkChild/MasterFields set up correctly then the requery
should take place automatically by Access.

Paul Doree wrote:
Hi,

I have a main form with two sub forms on it.

The recordsource of the second subform has in it's criteria a reference to
the JobID of the first i.e. forms!MainForm!Subform1!JobID. If I put a
button on the main form and requery Subform1 from it all is well - Subform2
results update to reflect the job selected in Subform1

What I need, though, and I'm struggling to find, is the syntax to requery
the second subform from the on current event of the first subform.

Help appreciated

Paul


--
RuralGuy (RG for short) aka Allan Bunch MS Access MVP - acXP WinXP Pro
Please post back to this forum so all may benefit.

Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...forms/200803/1

  #3  
Old March 24th, 2008, 04:37 PM posted to microsoft.public.access.forms
Ron2006
external usenet poster
 
Posts: 936
Default requerying a subform

The key is that you don't have the criteria expressed in the query
itself.

Instead you place the field names of the parent field and the child-
subform field in the master/child parts of the Data tab of the subform
as it resides on the mainform (the parent form).

If you do it that way no re-query is required.

Ron
 




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 08:52 PM.


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