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. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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 | |
|
|