print report as input data

G

Guest

I have a report and this report have information from the table , the table
as example …

Name Date NumberID invoiceID total
Test1 1/3/2006 1 001 105
Test2 12/3/2006 2 002 200
Test3 12/3/2006 3 003 20
Test1 13/3/2006 1 004 250
Test1 14/3/2006 1 005 30
Test3 14/3/2006 3 006 500
Test2 20/3/2006 2 007 25
Test2 20/3/2006 2 008 600
Test2 20/3/2006 2 009 350

My question how can I when I print the report from the command print , the
dialog open and ask me to put the information from date to to date and ask me
to put the numberID and the data show of the one customer .
 
K

Keith Wilby

Farid Sukkar said:
I have a report and this report have information from the table , the table
as example .

Name Date NumberID invoiceID total
Test1 1/3/2006 1 001 105
Test2 12/3/2006 2 002 200
Test3 12/3/2006 3 003 20
Test1 13/3/2006 1 004 250
Test1 14/3/2006 1 005 30
Test3 14/3/2006 3 006 500
Test2 20/3/2006 2 007 25
Test2 20/3/2006 2 008 600
Test2 20/3/2006 2 009 350

My question how can I when I print the report from the command print , the
dialog open and ask me to put the information from date to to date and ask
me
to put the numberID and the data show of the one customer .

Firstly, don't use "Date" as a field name, it's a reserved word in Access.
Go to your report's query and put some text in square braces in the fields'
criteria:

[Enter the date]
or
Between [Enter the date] And Date()

[Enter the NumberID]

It's a cheap 'n' cheerful solution but it works.

HTH - Keith.
www.keithwilby.com
 
G

Guest

The solution you give to me it’s good working but I want ask you another
question that you when you print the report the form is open and ask me to
put the information (from date ) to (to date) and the numberID of one
customer .
I read about how can open the form when I press the print button .
The code is.. I learn it and write this .

Private Sub Report_Open(Cancel As Integer)
DoCmd.OpenForm " name of form ", , , , , acDialog, "Multiple Account Summary"
End Sub

How can I write a code on form to control on date in report .
Thank you, to try help me
All my pleasure to you
Farid Sukkar


Keith Wilby said:
Farid Sukkar said:
I have a report and this report have information from the table , the table
as example .

Name Date NumberID invoiceID total
Test1 1/3/2006 1 001 105
Test2 12/3/2006 2 002 200
Test3 12/3/2006 3 003 20
Test1 13/3/2006 1 004 250
Test1 14/3/2006 1 005 30
Test3 14/3/2006 3 006 500
Test2 20/3/2006 2 007 25
Test2 20/3/2006 2 008 600
Test2 20/3/2006 2 009 350

My question how can I when I print the report from the command print , the
dialog open and ask me to put the information from date to to date and ask
me
to put the numberID and the data show of the one customer .

Firstly, don't use "Date" as a field name, it's a reserved word in Access.
Go to your report's query and put some text in square braces in the fields'
criteria:

[Enter the date]
or
Between [Enter the date] And Date()

[Enter the NumberID]

It's a cheap 'n' cheerful solution but it works.

HTH - Keith.
www.keithwilby.com
 
K

Keith Wilby

Farid Sukkar said:
The solution you give to me it's good working but I want ask you another
question that you when you print the report the form is open and ask me to
put the information (from date ) to (to date) and the numberID of one
customer .
I read about how can open the form when I press the print button .
The code is.. I learn it and write this .

Private Sub Report_Open(Cancel As Integer)
DoCmd.OpenForm " name of form ", , , , , acDialog, "Multiple Account
Summary"
End Sub

How can I write a code on form to control on date in report .
Thank you, to try help me
All my pleasure to you
Farid Sukkar

If I understand you correctly then you want to use a dialog form to collect
your report's filter criteria. On your dialog form create three text boxes,
one for "from date" (name it txtFromDate), one for "to date" (name it
txtToDate) and one for "numberID" (name it txtID). In your query, put a
reference to each text box as the filter criteria for the appropriate field,
for example, for the "from date" field use

[Forms]![frmMyDialogForm]![txtFromDate]

where "frmMyDialogForm" is the name of your dialog form.

HTH - Keith.
www.keithwilby.com
 
G

Guest

Thank you very much to help me , I finish my report , all my pleasure to you
I solve the problem from your begging learn to me on query , I’m replace the
[enter date] and I put the code you give to me(from date , text box) and (to
date , text box)
Between [Forms]![frmMyDialogForm]![txtFromDate] And
[Forms]![frmMyDialogForm]![txtToDate] and I (Combo1numberID)
[Forms]![frmMyDialogForm]![ Combo1numberID]
And I print it successfully
Thank you for help me
Farid Sukkar


Keith Wilby said:
Farid Sukkar said:
The solution you give to me it's good working but I want ask you another
question that you when you print the report the form is open and ask me to
put the information (from date ) to (to date) and the numberID of one
customer .
I read about how can open the form when I press the print button .
The code is.. I learn it and write this .

Private Sub Report_Open(Cancel As Integer)
DoCmd.OpenForm " name of form ", , , , , acDialog, "Multiple Account
Summary"
End Sub

How can I write a code on form to control on date in report .
Thank you, to try help me
All my pleasure to you
Farid Sukkar

If I understand you correctly then you want to use a dialog form to collect
your report's filter criteria. On your dialog form create three text boxes,
one for "from date" (name it txtFromDate), one for "to date" (name it
txtToDate) and one for "numberID" (name it txtID). In your query, put a
reference to each text box as the filter criteria for the appropriate field,
for example, for the "from date" field use

[Forms]![frmMyDialogForm]![txtFromDate]

where "frmMyDialogForm" is the name of your dialog form.

HTH - Keith.
www.keithwilby.com
 

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