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

Subform query" 1

Status
Not open for further replies.

kpryan

Technical User
Aug 24, 2005
282
US
Hi all,

Could someone look at this query criteria and a solution to a problem
'Between [forms]![form1]![txtStartDate] And [forms]![form1]![txtEndDate]'
This works ok on the main form. It opens a report etc.However if the calendar controls are placed on the subform the query will not work.

Is there a relationship between the main form and subform? which is required in the query?

Many thanks

Ken
 
Try this:

Code:
Between [forms]![form1]![mySubform].form![txtStartDate] And [forms]![form1]![mySubform].form![txtEndDate]

This references the subform control, and then its 'form' property.

Max Hugen
Australia
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top