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 Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Requery a control on a subform on a tab control

Status
Not open for further replies.

2Grandpa

Programmer
Jun 13, 2003
38
US
I am revising a form to me a customers needs. They want to select more than one defect and write a descriptions with the code. To do this I set up a sub form on a tab control. Many of the fields including the defect codes change based on the contractor involved. So when the select a contractor other than the default one, the defect code selection list has to change and needs to be re-queried. I get the "No field by this name" error message.

Listed below are my current code and the related information.

Thanks for any help you can give me.


DoCmd.Requery "Me!PAtabs.Page(0)!LocalDefectCodes.Form!DefectCode"


Main form:
Name: frmProductAuditAadd
Record Source: qryProductAuditListAAdd

Tab Control:
Name: PATabs
Page Index: 0
Page Name: AcftInfo

Subform:
Name: LocalDefectCodes
Source Ofject: frmPADefectCodes
Default view: Data sheet

Control:
Name: DefectCode
Type: ComboBox
 
Something like this ?
Me!LocalDefectCodes.Form!DefectCode.Requery

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Thanks that works.

But why does it not work the like this:

DoCmd.Requery "Me!LocalDefectCodes.Form!DefectCode
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top