Parameter form for crosstab query

  • Thread starter Thread starter Hong
  • Start date Start date
H

Hong

Hello.

I have a crosstab query with parameter, when I run the query, the pop up
window by the access (not the parameter form I created),
Forms!ReportRange!Starting date, and so on...
I enter "starting date", "Ending date" and "programme" in th pop up window,
it works very well.

But when I open the parameter form: ReportRange. enter the same information
in the form. then click ok, to run the query, but it doens't work, there is
no data showing.

What did I do wrong, I believe the query is right, Is the parameter form
doesn't provide the range into the query, or the query didn't get the
information from the form?

Thank you!
 
Hello, My SQL for the query:

[Forms]![frmReportRange]![textProgramme] Text.
[Forms]![frmReportRange]![textReportDate] Date/Time
[Forms]![frmReportRange]![textBeginingDate] Date/Time.

I created a form with thress text box: textProgramme, textReportDate,
textReportBeginning Date.

Two command button,
OK button:
Private Sub OK_Click()
Me.Visible = False
DoCmd.OpenQuery "qryData_Crosstab1", acViewNormal, acReadOnly
DoCmd.Close acForm, "frmReportRange"
End Sub

Cancel button
Private Sub Cancel_Click()
DoCmd.Close 'Close Form
End Sub

When I click OK, open the query, but didn't pull the data.

But if I only run the query:
It works good.

I don't know why the form don't work.

Thanks everybody.
 
Open your query in design view, click on menu VIEW - View SQL. Highlight all
and paste in a post.
--
KARL DEWEY
Build a little - Test a little


Hong said:
Hello, My SQL for the query:

[Forms]![frmReportRange]![textProgramme] Text.
[Forms]![frmReportRange]![textReportDate] Date/Time
[Forms]![frmReportRange]![textBeginingDate] Date/Time.

I created a form with thress text box: textProgramme, textReportDate,
textReportBeginning Date.

Two command button,
OK button:
Private Sub OK_Click()
Me.Visible = False
DoCmd.OpenQuery "qryData_Crosstab1", acViewNormal, acReadOnly
DoCmd.Close acForm, "frmReportRange"
End Sub

Cancel button
Private Sub Cancel_Click()
DoCmd.Close 'Close Form
End Sub

When I click OK, open the query, but didn't pull the data.

But if I only run the query:
It works good.

I don't know why the form don't work.

Thanks everybody.



KARL DEWEY said:
Post the SQL of the crosstab query.
 

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