Address subform in a query

  • Thread starter Thread starter Harmannus
  • Start date Start date
H

Harmannus

Hallo,

I have a main Report that contains the subreport rsubEmployee. On opening
the main report the form fdlgEmployee is loades to make a date selection. I
want the subreport rsubEmployee to respond to this date range.

Tried the below in the query for rsubEmployee but that doesn't work:
=[Parent]![Forms]![fdlgEmployee]![DatumStart] And
<=[Parent]![Forms]![fdlgEmployee]![DatumEnd]

How can i change the above so the subreport rsubEmployee on the mainreport
Employee responds to the dates specified?

Thanx in advance for any tips!

Regards,
Harmannus
 
Try without [Parent]! like:
= [Forms]![fdlgEmployee]![DatumStart] And
<= [Forms]![fdlgEmployee]![DatumEnd]

--
HTH
Van T. Dinh
MVP (Access)




Harmannus said:
Hallo,

I have a main Report that contains the subreport rsubEmployee. On opening
the main report the form fdlgEmployee is loades to make a date selection. I
want the subreport rsubEmployee to respond to this date range.

Tried the below in the query for rsubEmployee but that doesn't work:
=[Parent]![Forms]![fdlgEmployee]![DatumStart] And
<=[Parent]![Forms]![fdlgEmployee]![DatumEnd]

How can i change the above so the subreport rsubEmployee on the mainreport
Employee responds to the dates specified?

Thanx in advance for any tips!

Regards,
Harmannus
 
Hallo,

Thats the problem.

The subform doesn't seem to see the Form!fdlgEmployee... string. So i
thought that the query needs extra code. Parent didn't work and without it
itdoesn't either.

So how can i force the subreport to look at the date range if this is set
througt a form pop-up attached to the main form...

So the query needs a string like?


Regards,
Harmannus


Van T. Dinh said:
Try without [Parent]! like:
= [Forms]![fdlgEmployee]![DatumStart] And
<= [Forms]![fdlgEmployee]![DatumEnd]

--
HTH
Van T. Dinh
MVP (Access)




Harmannus said:
Hallo,

I have a main Report that contains the subreport rsubEmployee. On opening
the main report the form fdlgEmployee is loades to make a date selection. I
want the subreport rsubEmployee to respond to this date range.

Tried the below in the query for rsubEmployee but that doesn't work:
=[Parent]![Forms]![fdlgEmployee]![DatumStart] And
<=[Parent]![Forms]![fdlgEmployee]![DatumEnd]

How can i change the above so the subreport rsubEmployee on the
mainreport
Employee responds to the dates specified?

Thanx in advance for any tips!

Regards,
Harmannus
 
Subform???

In your original post, you had a Report / a SubReport and a Form
"fdlgEmployees" and you didn't mentioned any thinkg about a Subform.

Also, I think you need to open the Dialog Form *before* you open the
Report/SubReport. Normally, if I need the user to enter parameter values, I
create a Form with TextBoxes for the parameter values and a *CommandButton*
so that the user can use to open the Report. Especially in your case where
SubReports are involved, the (data) interaction between Report and Sub
Report might have happened before the (Main Report) Open Event fires.

--
HTH
Van T. Dinh
MVP (Access)


Harmannus said:
Hallo,

Thats the problem.

The subform doesn't seem to see the Form!fdlgEmployee... string. So i
thought that the query needs extra code. Parent didn't work and without it
itdoesn't either.

So how can i force the subreport to look at the date range if this is set
througt a form pop-up attached to the main form...

So the query needs a string like?


Regards,
Harmannus


Van T. Dinh said:
Try without [Parent]! like:
= [Forms]![fdlgEmployee]![DatumStart] And
<= [Forms]![fdlgEmployee]![DatumEnd]

--
HTH
Van T. Dinh
MVP (Access)




Harmannus said:
Hallo,

I have a main Report that contains the subreport rsubEmployee. On opening
the main report the form fdlgEmployee is loades to make a date
selection.
I
want the subreport rsubEmployee to respond to this date range.

Tried the below in the query for rsubEmployee but that doesn't work:

=[Parent]![Forms]![fdlgEmployee]![DatumStart] And
<=[Parent]![Forms]![fdlgEmployee]![DatumEnd]

How can i change the above so the subreport rsubEmployee on the
mainreport
Employee responds to the dates specified?

Thanx in advance for any tips!

Regards,
Harmannus
 
Back
Top