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!

Possible to have a query look at a subform for value?

Status
Not open for further replies.

Spyder757

Technical User
Aug 29, 2002
129
US
Is it possible to have a query look at a subform for data?

What I mean is I’ve got a main form called “PTO Review”. Within that form there is a sub form named “Current Skill” and it contains a field called “Skill”.

What I need to have happened is a query need to look at “Skill” for the value so I can perform some functions.

However when I am in Query Design mode go to Built and look at the PTO Review form the option of skill isn’t there. I assume this is because the value exsists on the subform rather than the form itself.

So is there a work around for this?

Spyder757
 
You could call your query from, let's say, a command button from your subreport and in your query under the Skill field on its criteria line type:

[Forms]![SubFormName].[Skill]

Now when the query runs, it'll pick up as a criteria whatever is in the text box skill on your subform.

Neil
 
You can check Access Help for the exact syntax of how to refer to a control on a subform.

Best regards,
J. Paul Schmidt - Freelance ASP Web Developer
- Creating "dynamic" Web pages that read and write from databases...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top