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  

REQUERY SUBFORM



 
 
Thread Tools Display Modes
  #1  
Old April 14th, 2008, 07:35 PM posted to microsoft.public.access.forms
-debi-[_2_]
external usenet poster
 
Posts: 16
Default REQUERY SUBFORM

Good Day,

Main Form [frmDATE]
Sub Form [frmCOUNT]


On the subform ON Enter, I have DoCmd.Requery, which works fine after I
click on the subform.

When I try to requey the subform from the mainform using a Macro Requery
[forms]![frmCOUNT], it says it's either not in the current form or it can't
find that form name.

I have combo boxes in my subform that work fine for entering data, but if I
just want to go record by record from the main form, the sub form doesn't
show the proper data unless I click on it to use the requery in the ON Enter.

Please help. Thank you! -debi-
  #2  
Old April 14th, 2008, 09:06 PM posted to microsoft.public.access.forms
boblarson
external usenet poster
 
Posts: 886
Default REQUERY SUBFORM

To requery a subform you have to reference the CONTROL that houses the
subform on the main form. And, you have to use .Form. to tell Access you
want the property, or method, of the subform and not the subform container.

Me.YourSubformContainerControlName.Form.Requery


--
Bob Larson
Access World Forums Super Moderator

Tutorials at http://www.btabdevelopment.com

__________________________________


"-debi-" wrote:

Good Day,

Main Form [frmDATE]
Sub Form [frmCOUNT]


On the subform ON Enter, I have DoCmd.Requery, which works fine after I
click on the subform.

When I try to requey the subform from the mainform using a Macro Requery
[forms]![frmCOUNT], it says it's either not in the current form or it can't
find that form name.

I have combo boxes in my subform that work fine for entering data, but if I
just want to go record by record from the main form, the sub form doesn't
show the proper data unless I click on it to use the requery in the ON Enter.

Please help. Thank you! -debi-

  #3  
Old April 17th, 2008, 12:21 PM posted to microsoft.public.access.forms
-debi-[_2_]
external usenet poster
 
Posts: 16
Default REQUERY SUBFORM

Hi Bob, I'll give it a try. I've read most of the "post" on this and for
some reason just can't get it. I haven't tried the .Form.

Thank you very much for you response. -debi-

"boblarson" wrote:

To requery a subform you have to reference the CONTROL that houses the
subform on the main form. And, you have to use .Form. to tell Access you
want the property, or method, of the subform and not the subform container.

Me.YourSubformContainerControlName.Form.Requery


--
Bob Larson
Access World Forums Super Moderator

Tutorials at http://www.btabdevelopment.com

__________________________________


"-debi-" wrote:

Good Day,

Main Form [frmDATE]
Sub Form [frmCOUNT]


On the subform ON Enter, I have DoCmd.Requery, which works fine after I
click on the subform.

When I try to requey the subform from the mainform using a Macro Requery
[forms]![frmCOUNT], it says it's either not in the current form or it can't
find that form name.

I have combo boxes in my subform that work fine for entering data, but if I
just want to go record by record from the main form, the sub form doesn't
show the proper data unless I click on it to use the requery in the ON Enter.

Please help. Thank you! -debi-

  #4  
Old April 17th, 2008, 02:09 PM posted to microsoft.public.access.forms
boblarson
external usenet poster
 
Posts: 886
Default REQUERY SUBFORM

debi:

In Me.YourSubformContainerControlName.Form.Requery

The .Form. part tells Access that you are wanting a property, or method, of
the form within the subform container control. So, you should be able to
take the code I gave you and replace the YourSubformContainerControlName with
the actual name of the subform container on the main form and don't change
anything else from what was written.

See here for more about subforms:

http://www.btabdevelopment.com/main/...6/Default.aspx

http://www.btabdevelopment.com/main/...6/Default.aspx

--
Bob Larson
Access World Forums Super Moderator

Tutorials at http://www.btabdevelopment.com

__________________________________


"-debi-" wrote:

Hi Bob, I'll give it a try. I've read most of the "post" on this and for
some reason just can't get it. I haven't tried the .Form.

Thank you very much for you response. -debi-

"boblarson" wrote:

To requery a subform you have to reference the CONTROL that houses the
subform on the main form. And, you have to use .Form. to tell Access you
want the property, or method, of the subform and not the subform container.

Me.YourSubformContainerControlName.Form.Requery


--
Bob Larson
Access World Forums Super Moderator

Tutorials at http://www.btabdevelopment.com

__________________________________


"-debi-" wrote:

Good Day,

Main Form [frmDATE]
Sub Form [frmCOUNT]


On the subform ON Enter, I have DoCmd.Requery, which works fine after I
click on the subform.

When I try to requey the subform from the mainform using a Macro Requery
[forms]![frmCOUNT], it says it's either not in the current form or it can't
find that form name.

I have combo boxes in my subform that work fine for entering data, but if I
just want to go record by record from the main form, the sub form doesn't
show the proper data unless I click on it to use the requery in the ON Enter.

Please help. Thank you! -debi-

  #5  
Old April 18th, 2008, 01:18 PM posted to microsoft.public.access.forms
-debi-[_2_]
external usenet poster
 
Posts: 16
Default REQUERY SUBFORM

Hi Bob,

Thank you very much! I checked out your website.......it's great! Thanks
again for your support!!!!!!!!!!!!!!! -debi-

"boblarson" wrote:

debi:

In Me.YourSubformContainerControlName.Form.Requery

The .Form. part tells Access that you are wanting a property, or method, of
the form within the subform container control. So, you should be able to
take the code I gave you and replace the YourSubformContainerControlName with
the actual name of the subform container on the main form and don't change
anything else from what was written.

See here for more about subforms:

http://www.btabdevelopment.com/main/...6/Default.aspx

http://www.btabdevelopment.com/main/...6/Default.aspx

--
Bob Larson
Access World Forums Super Moderator

Tutorials at http://www.btabdevelopment.com

__________________________________


"-debi-" wrote:

Hi Bob, I'll give it a try. I've read most of the "post" on this and for
some reason just can't get it. I haven't tried the .Form.

Thank you very much for you response. -debi-

"boblarson" wrote:

To requery a subform you have to reference the CONTROL that houses the
subform on the main form. And, you have to use .Form. to tell Access you
want the property, or method, of the subform and not the subform container.

Me.YourSubformContainerControlName.Form.Requery


--
Bob Larson
Access World Forums Super Moderator

Tutorials at http://www.btabdevelopment.com

__________________________________


"-debi-" wrote:

Good Day,

Main Form [frmDATE]
Sub Form [frmCOUNT]


On the subform ON Enter, I have DoCmd.Requery, which works fine after I
click on the subform.

When I try to requey the subform from the mainform using a Macro Requery
[forms]![frmCOUNT], it says it's either not in the current form or it can't
find that form name.

I have combo boxes in my subform that work fine for entering data, but if I
just want to go record by record from the main form, the sub form doesn't
show the proper data unless I click on it to use the requery in the ON Enter.

Please help. Thank you! -debi-

 




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 09:23 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.