Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problems referencing subforms. They seem not to be active

Status
Not open for further replies.

KMITCH

MIS
May 1, 2000
42
US
MS Access 97<br><br>Got some great responses to my crosstab question yesterday,<br>so I'm turning up the heat.<br><br>I noticed that executing 'Me.Refresh' causes subforms<br>to return to record 1 of X. In my desire to save my<br>users from confusion over this, I wanted to execute:<br><br>Frm2CurRec = [Forms]![frmOESMatch].CurrentRecord <br><br>in order to save the record number of the subform so<br>that I could return to this record after the refresh<br>via: <br><br>DoCmd.GoToRecord acDataForm, &quot;frmOESMatch&quot;, acGoTo, Frm2CurRec<br><br>My problem is that, when I attempt to reference the <br>frmOESMatch subform, Access returns an error message<br>indicating that the form is not open or active.&nbsp;&nbsp;I can<br>confirm this by executing 'Forms.Count', which returns<br>a value of 1 even though I have a form open which contains<br>2 subforms( I would have expected a count of 3).&nbsp;&nbsp;<br><br>So, I guess the basic question here is whether or not<br>subforms can be referenced in any way from a global<br>perspective.<br><br>Also, if my approach to the problem is completely off<br>base, feel free to point that out as well.<br><br>Thanks,<br>Keith
 
I usually use:<br><br>Me.SubformName.Requery<br><br>I just tried it on a form/subform, and it requeried the subform, but did not adjust the<br>subform. I had this on a command button, but you could put it on any event. <br><br>See if that will work.<br><br>Hope this helps.<br>
 
Thanks.&nbsp;&nbsp;I'll give it a try. - Keith
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top