form using parameter query

G

Guest

I have a form [frmEvent] based off of a query to run a report. I want the
user to select an event, and then the start and stop date before clicking the
"Run Report" button. The event portion works great using a combo box. In the
query I entered the following criteria:

Like [Forms]![frmEvent]![cboEvent] & "*"

I then have two text boxes on the form [txtBeginDate] and [txtStartDate]. I
can't seem to get these to work. I assumed I would enter the criteria
similar to the events:

Between [Forms]![frmEvent]![txtBeginDate] and
[Forms]![frmEvent]![txtEndDate]

But I just get a blank report.
Also, when I get this to work, I would also like the report the display the
"Between [begindate] and [endDate]" in the report header. I've done this
before using just parameter queries, but it seems to not work when based off
a form.

What am I doing wrong?????


Patti
 
G

Guest

First for the Header, In the control source of the field in the report you
can write

="Between " & [Forms]![frmEvent]![txtBeginDate] & " and " &
[Forms]![frmEvent]![txtEndDate]

About the report data
1. Is the form open?
2. Do you have date value in both date fields?
3. Check the names again

You can use the Immidiate window (Ctrl+G) to check if any value retur from
the fields
Type, and then press enter
?[Forms]![frmEvent]![txtEndDate]
 
G

Guest

When I do all that, the form opens but its now blank.
Here's the SQL for the query:

SELECT tblDetails.EventCategory, tblData.LoadDate, tblDetails.DetailsTime,
tblDetails.Description, tblDetails.LoadDateID
FROM tblData INNER JOIN tblDetails ON tblData.LoadDateID =
tblDetails.LoadDateID
WHERE (((tblDetails.EventCategory) Like
[Forms]![frmFilterEventCategory]![cboEvent] & "*") AND ((tblData.LoadDate)
Between [Forms]![frmFilterEventCategory]![txtBeginDate] And
[Forms]![frmFilterEventCategory]![txtEndDate]));


--
Patti


Ofer said:
First for the Header, In the control source of the field in the report you
can write

="Between " & [Forms]![frmEvent]![txtBeginDate] & " and " &
[Forms]![frmEvent]![txtEndDate]

About the report data
1. Is the form open?
2. Do you have date value in both date fields?
3. Check the names again

You can use the Immidiate window (Ctrl+G) to check if any value retur from
the fields
Type, and then press enter
?[Forms]![frmEvent]![txtEndDate]

--
\\// Live Long and Prosper \\//
BS"D


PattiP said:
I have a form [frmEvent] based off of a query to run a report. I want the
user to select an event, and then the start and stop date before clicking the
"Run Report" button. The event portion works great using a combo box. In the
query I entered the following criteria:

Like [Forms]![frmEvent]![cboEvent] & "*"

I then have two text boxes on the form [txtBeginDate] and [txtStartDate]. I
can't seem to get these to work. I assumed I would enter the criteria
similar to the events:

Between [Forms]![frmEvent]![txtBeginDate] and
[Forms]![frmEvent]![txtEndDate]

But I just get a blank report.
Also, when I get this to work, I would also like the report the display the
"Between [begindate] and [endDate]" in the report header. I've done this
before using just parameter queries, but it seems to not work when based off
a form.

What am I doing wrong?????


Patti
 
G

Guest

I finally got it to work. I can't tell you what I did different... thought I
did exactly what I was doing before, but it works now. Thanks for all your
help!!!!

--
Patti


Ofer said:
First for the Header, In the control source of the field in the report you
can write

="Between " & [Forms]![frmEvent]![txtBeginDate] & " and " &
[Forms]![frmEvent]![txtEndDate]

About the report data
1. Is the form open?
2. Do you have date value in both date fields?
3. Check the names again

You can use the Immidiate window (Ctrl+G) to check if any value retur from
the fields
Type, and then press enter
?[Forms]![frmEvent]![txtEndDate]

--
\\// Live Long and Prosper \\//
BS"D


PattiP said:
I have a form [frmEvent] based off of a query to run a report. I want the
user to select an event, and then the start and stop date before clicking the
"Run Report" button. The event portion works great using a combo box. In the
query I entered the following criteria:

Like [Forms]![frmEvent]![cboEvent] & "*"

I then have two text boxes on the form [txtBeginDate] and [txtStartDate]. I
can't seem to get these to work. I assumed I would enter the criteria
similar to the events:

Between [Forms]![frmEvent]![txtBeginDate] and
[Forms]![frmEvent]![txtEndDate]

But I just get a blank report.
Also, when I get this to work, I would also like the report the display the
"Between [begindate] and [endDate]" in the report header. I've done this
before using just parameter queries, but it seems to not work when based off
a form.

What am I doing wrong?????


Patti
 

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

Top