between date text boxes will not link to subform

  • Thread starter Thread starter Mitchell_Collen via AccessMonster.com
  • Start date Start date
M

Mitchell_Collen via AccessMonster.com

This is what I have done. I know it is not correct. I have added this to the
'Link Master Fields' property in a subform :

Between [Forms]![SUB_ORDERS]![StartDate] And [Forms]![SUB_ORDERS]![EndDate]

However, I cannot get the form to output on this criteria. Instead when I run
this I get a pop up parameter with the exact code above printed on the popup.
When I key in a date it goes straight to the form. I just wanted to use two
text boxes with the between date functionality.

Please tell me what I am doing wrong. Please.

Thanks, Mitchell
 
Mitchell_Collen via AccessMonster.com said:
This is what I have done. I know it is not correct. I have added this to
the
'Link Master Fields' property in a subform :

Between [Forms]![SUB_ORDERS]![StartDate] And
[Forms]![SUB_ORDERS]![EndDate]

However, I cannot get the form to output on this criteria. Instead when I
run
this I get a pop up parameter with the exact code above printed on the
popup.
When I key in a date it goes straight to the form. I just wanted to use
two
text boxes with the between date functionality.

Please tell me what I am doing wrong. Please.

Thanks, Mitchell

The Link Master and Link Child properties have to be specific values, not
SQL expressions. What I would suggest is to change the subform's
RecordSource property to incorporate the two date values. Something like:

Me.subformcontrol.Form.RecordSource = "SELECT ... FROM ... WHERE [Date
Field] BETWEEN #" & Me.StartDate & "# AND #" & Me.EndDate & "#"

Carl Rapson
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top