Print Preview

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a data entry form in which I have a Preview command button on the
bottom of the form--to preview the information that is inputted. I am not
really to good with the coding so I set up a printpreviewmacro to Open
Report/rptRecvTicket, Print Preview and in the Where Condition I put
[RecTicketNo]=[Forms]![receivingticketfrm]![recticketno]. When I run it I
get a "Enter Parameter Value"
forms!receivingticketfrm!recticketno. If I enter the number of the
receiving ticket it populates the correct receiving ticket, but I don't know
why it is prompted me with a parameter value. I have checked all the
spelling, any ideas. thanks
 
Melinda,
Forms are not made for printing, reports are. Better to create a report based on the
form, and using that same form value filtering technique to only report on the one rcord.
If you must print just one form, right click in your RecTicketNo control, and select
Filter By Selection. That will filter the recordset to just one record. Then call for
Print.

--
hth
Al Campagna . Candia Computer Consulting . Candia, NH USA
Microsoft Access MVP
http://home.comcast.net/~cccsolutions

"Find a job that you love, and you'll never work a day in your life."
 
I'm sorry the report is what I want to print. I want to put a command button
on the form, so the end user thinks he is printing out the form
(invoice/receiving ticket). I have a PrintPreview macro attached to the on
click button (on the form) to print the current receiving ticket form. That
was the macro information that I listed in the original question. I
obviously have something typed wrong, but for the life of me can not figure
it out.

Al Campagna said:
Melinda,
Forms are not made for printing, reports are. Better to create a report based on the
form, and using that same form value filtering technique to only report on the one rcord.
If you must print just one form, right click in your RecTicketNo control, and select
Filter By Selection. That will filter the recordset to just one record. Then call for
Print.

--
hth
Al Campagna . Candia Computer Consulting . Candia, NH USA
Microsoft Access MVP
http://home.comcast.net/~cccsolutions

"Find a job that you love, and you'll never work a day in your life."


Melinda said:
I have a data entry form in which I have a Preview command button on the
bottom of the form--to preview the information that is inputted. I am not
really to good with the coding so I set up a printpreviewmacro to Open
Report/rptRecvTicket, Print Preview and in the Where Condition I put
[RecTicketNo]=[Forms]![receivingticketfrm]![recticketno]. When I run it I
get a "Enter Parameter Value"
forms!receivingticketfrm!recticketno. If I enter the number of the
receiving ticket it populates the correct receiving ticket, but I don't know
why it is prompted me with a parameter value. I have checked all the
spelling, any ideas. thanks
 
Melinda,
OK. Let me make sure I understand...
You have a Report designed to look just like the "calling" Form (rptRcvTicket). You
call the report (In Preview) from a form named
[ReceivingTicketfrm], using the value in the RecTicketNo control on the form to filter the
query/report.

In the query behind the report, against the RecTicketNo field, you should have a
criteria of...
= Forms![ReceivingTicketfrm]!]![RecTicketNo]

First, the form must remain Open while the report runs.
Second, if you get an "Enter Parameter Value" (that error message should also indicate
what parameter value it's looking for... that would be helpful to know what that is)
That means that there is something in your criteria that Access can not locate, such as
the form name, or the form field. It might be just a mispelling. Carefully check that
the criteria calls the exact object Names from the form.

Bug shooting... remove the Criteria in the query, and run the query itself. Any
Prompt? If so, there is something else in the query that can't find a value... maybe a
calculation in some other field, or something left in the Parameter list.. etc... etc...
If not, again with no criteria, run the report. Any Prompt? If so, there is a control
or reference on the report that needs a value it can not find. Check the whole report,
and subforms, and code until located. If necessary, back up the report, and start
removing objects from the report until the prompt goes away.
--
hth
Al Campagna . Candia Computer Consulting . Candia, NH USA
Microsoft Access MVP
http://home.comcast.net/~cccsolutions

"Find a job that you love, and you'll never work a day in your life."

Melinda said:
I'm sorry the report is what I want to print. I want to put a command button
on the form, so the end user thinks he is printing out the form
(invoice/receiving ticket). I have a PrintPreview macro attached to the on
click button (on the form) to print the current receiving ticket form. That
was the macro information that I listed in the original question. I
obviously have something typed wrong, but for the life of me can not figure
it out.

Al Campagna said:
Melinda,
Forms are not made for printing, reports are. Better to create a report based on
the
form, and using that same form value filtering technique to only report on the one
rcord.
If you must print just one form, right click in your RecTicketNo control, and select
Filter By Selection. That will filter the recordset to just one record. Then call for
Print.

--
hth
Al Campagna . Candia Computer Consulting . Candia, NH USA
Microsoft Access MVP
http://home.comcast.net/~cccsolutions

"Find a job that you love, and you'll never work a day in your life."


Melinda said:
I have a data entry form in which I have a Preview command button on the
bottom of the form--to preview the information that is inputted. I am not
really to good with the coding so I set up a printpreviewmacro to Open
Report/rptRecvTicket, Print Preview and in the Where Condition I put
[RecTicketNo]=[Forms]![receivingticketfrm]![recticketno]. When I run it I
get a "Enter Parameter Value"
forms!receivingticketfrm!recticketno. If I enter the number of the
receiving ticket it populates the correct receiving ticket, but I don't know
why it is prompted me with a parameter value. I have checked all the
spelling, any ideas. thanks
 
Part of your assumption is correct, Al. I have a main form, with two
subforms. The first subform holds the recticketno, which is an auto number
field and this field pretty much ties all the forms together. I am indeed
using the recticketno control to filter the report. My form is based on
three individuals tables that are related.

I just have a print preview button on the form which prompts me for the
receiving ticket no and then after entering the receiving ticket no the
report pops up and if correct I can then print it. I have a macro written
for the print preview button and when I click on the button it preview the
form. I will look at the report and see if I have a field named wrong or
something of that sort. Thanks

Al Campagna said:
Melinda,
OK. Let me make sure I understand...
You have a Report designed to look just like the "calling" Form (rptRcvTicket). You
call the report (In Preview) from a form named
[ReceivingTicketfrm], using the value in the RecTicketNo control on the form to filter the
query/report.

In the query behind the report, against the RecTicketNo field, you should have a
criteria of...
= Forms![ReceivingTicketfrm]!]![RecTicketNo]

First, the form must remain Open while the report runs.
Second, if you get an "Enter Parameter Value" (that error message should also indicate
what parameter value it's looking for... that would be helpful to know what that is)
That means that there is something in your criteria that Access can not locate, such as
the form name, or the form field. It might be just a mispelling. Carefully check that
the criteria calls the exact object Names from the form.

Bug shooting... remove the Criteria in the query, and run the query itself. Any
Prompt? If so, there is something else in the query that can't find a value... maybe a
calculation in some other field, or something left in the Parameter list.. etc... etc...
If not, again with no criteria, run the report. Any Prompt? If so, there is a control
or reference on the report that needs a value it can not find. Check the whole report,
and subforms, and code until located. If necessary, back up the report, and start
removing objects from the report until the prompt goes away.
--
hth
Al Campagna . Candia Computer Consulting . Candia, NH USA
Microsoft Access MVP
http://home.comcast.net/~cccsolutions

"Find a job that you love, and you'll never work a day in your life."

Melinda said:
I'm sorry the report is what I want to print. I want to put a command button
on the form, so the end user thinks he is printing out the form
(invoice/receiving ticket). I have a PrintPreview macro attached to the on
click button (on the form) to print the current receiving ticket form. That
was the macro information that I listed in the original question. I
obviously have something typed wrong, but for the life of me can not figure
it out.

Al Campagna said:
Melinda,
Forms are not made for printing, reports are. Better to create a report based on
the
form, and using that same form value filtering technique to only report on the one
rcord.
If you must print just one form, right click in your RecTicketNo control, and select
Filter By Selection. That will filter the recordset to just one record. Then call for
Print.

--
hth
Al Campagna . Candia Computer Consulting . Candia, NH USA
Microsoft Access MVP
http://home.comcast.net/~cccsolutions

"Find a job that you love, and you'll never work a day in your life."


I have a data entry form in which I have a Preview command button on the
bottom of the form--to preview the information that is inputted. I am not
really to good with the coding so I set up a printpreviewmacro to Open
Report/rptRecvTicket, Print Preview and in the Where Condition I put
[RecTicketNo]=[Forms]![receivingticketfrm]![recticketno]. When I run it I
get a "Enter Parameter Value"
forms!receivingticketfrm!recticketno. If I enter the number of the
receiving ticket it populates the correct receiving ticket, but I don't know
why it is prompted me with a parameter value. I have checked all the
spelling, any ideas. thanks
 
Melinda,
On which form is your print button? Main (I assume), or the sub?
If on the main, it might be easier (as you say) to enter the recticketno in response to
a parameter prompt.
If, in the query behind the report you had this parameter (criteria) against the
recticketno...
Field: recticketno
Criteria: = [Enter the Ticket No]
That's all you need. When prompted, enter the recticketno and the report should only
print the data for that unique record.

If you placed the print button on the subform record, then you could "refer" to the
recticketno directly in the subform, since clicking the button while on the sub record
keeps the focus on that particular recticketno record.
Now, a query where...
Field: recticketno
Criteria: = Forms!frmMainName!frmSubformName.Form!recticketno
can be passed to the query without manual entry.

--
hth
Al Campagna . Candia Computer Consulting . Candia, NH USA
Microsoft Access MVP
http://home.comcast.net/~cccsolutions

"Find a job that you love, and you'll never work a day in your life."

Melinda said:
Part of your assumption is correct, Al. I have a main form, with two
subforms. The first subform holds the recticketno, which is an auto number
field and this field pretty much ties all the forms together. I am indeed
using the recticketno control to filter the report. My form is based on
three individuals tables that are related.

I just have a print preview button on the form which prompts me for the
receiving ticket no and then after entering the receiving ticket no the
report pops up and if correct I can then print it. I have a macro written
for the print preview button and when I click on the button it preview the
form. I will look at the report and see if I have a field named wrong or
something of that sort. Thanks

Al Campagna said:
Melinda,
OK. Let me make sure I understand...
You have a Report designed to look just like the "calling" Form (rptRcvTicket). You
call the report (In Preview) from a form named
[ReceivingTicketfrm], using the value in the RecTicketNo control on the form to filter
the
query/report.

In the query behind the report, against the RecTicketNo field, you should have a
criteria of...
= Forms![ReceivingTicketfrm]!]![RecTicketNo]

First, the form must remain Open while the report runs.
Second, if you get an "Enter Parameter Value" (that error message should also
indicate
what parameter value it's looking for... that would be helpful to know what that is)
That means that there is something in your criteria that Access can not locate, such as
the form name, or the form field. It might be just a mispelling. Carefully check that
the criteria calls the exact object Names from the form.

Bug shooting... remove the Criteria in the query, and run the query itself. Any
Prompt? If so, there is something else in the query that can't find a value... maybe a
calculation in some other field, or something left in the Parameter list.. etc...
etc...
If not, again with no criteria, run the report. Any Prompt? If so, there is a
control
or reference on the report that needs a value it can not find. Check the whole report,
and subforms, and code until located. If necessary, back up the report, and start
removing objects from the report until the prompt goes away.
--
hth
Al Campagna . Candia Computer Consulting . Candia, NH USA
Microsoft Access MVP
http://home.comcast.net/~cccsolutions

"Find a job that you love, and you'll never work a day in your life."

Melinda said:
I'm sorry the report is what I want to print. I want to put a command button
on the form, so the end user thinks he is printing out the form
(invoice/receiving ticket). I have a PrintPreview macro attached to the on
click button (on the form) to print the current receiving ticket form. That
was the macro information that I listed in the original question. I
obviously have something typed wrong, but for the life of me can not figure
it out.

:

Melinda,
Forms are not made for printing, reports are. Better to create a report based
on
the
form, and using that same form value filtering technique to only report on the one
rcord.
If you must print just one form, right click in your RecTicketNo control, and
select
Filter By Selection. That will filter the recordset to just one record. Then call
for
Print.

--
hth
Al Campagna . Candia Computer Consulting . Candia, NH USA
Microsoft Access MVP
http://home.comcast.net/~cccsolutions

"Find a job that you love, and you'll never work a day in your life."


I have a data entry form in which I have a Preview command button on the
bottom of the form--to preview the information that is inputted. I am not
really to good with the coding so I set up a printpreviewmacro to Open
Report/rptRecvTicket, Print Preview and in the Where Condition I put
[RecTicketNo]=[Forms]![receivingticketfrm]![recticketno]. When I run it I
get a "Enter Parameter Value"
forms!receivingticketfrm!recticketno. If I enter the number of the
receiving ticket it populates the correct receiving ticket, but I don't know
why it is prompted me with a parameter value. I have checked all the
spelling, any ideas. thanks
 
The Preview Report button is on the main for, but since I am not running a
query--just gathering my data from tables, where would I enter the criteria
at? I have done it in a query but I am not aware where you would set it in
a table. I am fairly new at access (if you can't tell). Thanks

Al Campagna said:
Melinda,
On which form is your print button? Main (I assume), or the sub?
If on the main, it might be easier (as you say) to enter the recticketno in response to
a parameter prompt.
If, in the query behind the report you had this parameter (criteria) against the
recticketno...
Field: recticketno
Criteria: = [Enter the Ticket No]
That's all you need. When prompted, enter the recticketno and the report should only
print the data for that unique record.

If you placed the print button on the subform record, then you could "refer" to the
recticketno directly in the subform, since clicking the button while on the sub record
keeps the focus on that particular recticketno record.
Now, a query where...
Field: recticketno
Criteria: = Forms!frmMainName!frmSubformName.Form!recticketno
can be passed to the query without manual entry.

--
hth
Al Campagna . Candia Computer Consulting . Candia, NH USA
Microsoft Access MVP
http://home.comcast.net/~cccsolutions

"Find a job that you love, and you'll never work a day in your life."

Melinda said:
Part of your assumption is correct, Al. I have a main form, with two
subforms. The first subform holds the recticketno, which is an auto number
field and this field pretty much ties all the forms together. I am indeed
using the recticketno control to filter the report. My form is based on
three individuals tables that are related.

I just have a print preview button on the form which prompts me for the
receiving ticket no and then after entering the receiving ticket no the
report pops up and if correct I can then print it. I have a macro written
for the print preview button and when I click on the button it preview the
form. I will look at the report and see if I have a field named wrong or
something of that sort. Thanks

Al Campagna said:
Melinda,
OK. Let me make sure I understand...
You have a Report designed to look just like the "calling" Form (rptRcvTicket). You
call the report (In Preview) from a form named
[ReceivingTicketfrm], using the value in the RecTicketNo control on the form to filter
the
query/report.

In the query behind the report, against the RecTicketNo field, you should have a
criteria of...
= Forms![ReceivingTicketfrm]!]![RecTicketNo]

First, the form must remain Open while the report runs.
Second, if you get an "Enter Parameter Value" (that error message should also
indicate
what parameter value it's looking for... that would be helpful to know what that is)
That means that there is something in your criteria that Access can not locate, such as
the form name, or the form field. It might be just a mispelling. Carefully check that
the criteria calls the exact object Names from the form.

Bug shooting... remove the Criteria in the query, and run the query itself. Any
Prompt? If so, there is something else in the query that can't find a value... maybe a
calculation in some other field, or something left in the Parameter list.. etc...
etc...
If not, again with no criteria, run the report. Any Prompt? If so, there is a
control
or reference on the report that needs a value it can not find. Check the whole report,
and subforms, and code until located. If necessary, back up the report, and start
removing objects from the report until the prompt goes away.
--
hth
Al Campagna . Candia Computer Consulting . Candia, NH USA
Microsoft Access MVP
http://home.comcast.net/~cccsolutions

"Find a job that you love, and you'll never work a day in your life."

I'm sorry the report is what I want to print. I want to put a command button
on the form, so the end user thinks he is printing out the form
(invoice/receiving ticket). I have a PrintPreview macro attached to the on
click button (on the form) to print the current receiving ticket form. That
was the macro information that I listed in the original question. I
obviously have something typed wrong, but for the life of me can not figure
it out.

:

Melinda,
Forms are not made for printing, reports are. Better to create a report based
on
the
form, and using that same form value filtering technique to only report on the one
rcord.
If you must print just one form, right click in your RecTicketNo control, and
select
Filter By Selection. That will filter the recordset to just one record. Then call
for
Print.

--
hth
Al Campagna . Candia Computer Consulting . Candia, NH USA
Microsoft Access MVP
http://home.comcast.net/~cccsolutions

"Find a job that you love, and you'll never work a day in your life."


I have a data entry form in which I have a Preview command button on the
bottom of the form--to preview the information that is inputted. I am not
really to good with the coding so I set up a printpreviewmacro to Open
Report/rptRecvTicket, Print Preview and in the Where Condition I put
[RecTicketNo]=[Forms]![receivingticketfrm]![recticketno]. When I run it I
get a "Enter Parameter Value"
forms!receivingticketfrm!recticketno. If I enter the number of the
receiving ticket it populates the correct receiving ticket, but I don't know
why it is prompted me with a parameter value. I have checked all the
spelling, any ideas. thanks
 
Melinda,
You wrote...This tells me that you have designed report to display the information.
Every report (RecordSource) has a table or a query behind it. Yours should have a
"query" behind it...not a table.
And... in that query, based on your table of data, you set a criteria against the
recticketno field... either by entering a parameter (as you have been doing), or by
referencing some value on your "calling" form.

--
hth
Al Campagna . Candia Computer Consulting . Candia, NH USA
Microsoft Access MVP
http://home.comcast.net/~cccsolutions

"Find a job that you love, and you'll never work a day in your life."



Melinda said:
The Preview Report button is on the main for, but since I am not running a
query--just gathering my data from tables, where would I enter the criteria
at? I have done it in a query but I am not aware where you would set it in
a table. I am fairly new at access (if you can't tell). Thanks

Al Campagna said:
Melinda,
On which form is your print button? Main (I assume), or the sub?
If on the main, it might be easier (as you say) to enter the recticketno in response
to
a parameter prompt.
If, in the query behind the report you had this parameter (criteria) against the
recticketno...
Field: recticketno
Criteria: = [Enter the Ticket No]
That's all you need. When prompted, enter the recticketno and the report should
only
print the data for that unique record.

If you placed the print button on the subform record, then you could "refer" to the
recticketno directly in the subform, since clicking the button while on the sub record
keeps the focus on that particular recticketno record.
Now, a query where...
Field: recticketno
Criteria: = Forms!frmMainName!frmSubformName.Form!recticketno
can be passed to the query without manual entry.

--
hth
Al Campagna . Candia Computer Consulting . Candia, NH USA
Microsoft Access MVP
http://home.comcast.net/~cccsolutions

"Find a job that you love, and you'll never work a day in your life."

Melinda said:
Part of your assumption is correct, Al. I have a main form, with two
subforms. The first subform holds the recticketno, which is an auto number
field and this field pretty much ties all the forms together. I am indeed
using the recticketno control to filter the report. My form is based on
three individuals tables that are related.

I just have a print preview button on the form which prompts me for the
receiving ticket no and then after entering the receiving ticket no the
report pops up and if correct I can then print it. I have a macro written
for the print preview button and when I click on the button it preview the
form. I will look at the report and see if I have a field named wrong or
something of that sort. Thanks

:

Melinda,
OK. Let me make sure I understand...
You have a Report designed to look just like the "calling" Form (rptRcvTicket).
You
call the report (In Preview) from a form named
[ReceivingTicketfrm], using the value in the RecTicketNo control on the form to
filter
the
query/report.

In the query behind the report, against the RecTicketNo field, you should have a
criteria of...
= Forms![ReceivingTicketfrm]!]![RecTicketNo]

First, the form must remain Open while the report runs.
Second, if you get an "Enter Parameter Value" (that error message should also
indicate
what parameter value it's looking for... that would be helpful to know what that is)
That means that there is something in your criteria that Access can not locate, such
as
the form name, or the form field. It might be just a mispelling. Carefully check
that
the criteria calls the exact object Names from the form.

Bug shooting... remove the Criteria in the query, and run the query itself. Any
Prompt? If so, there is something else in the query that can't find a value...
maybe a
calculation in some other field, or something left in the Parameter list.. etc...
etc...
If not, again with no criteria, run the report. Any Prompt? If so, there is a
control
or reference on the report that needs a value it can not find. Check the whole
report,
and subforms, and code until located. If necessary, back up the report, and start
removing objects from the report until the prompt goes away.
--
hth
Al Campagna . Candia Computer Consulting . Candia, NH USA
Microsoft Access MVP
http://home.comcast.net/~cccsolutions

"Find a job that you love, and you'll never work a day in your life."

I'm sorry the report is what I want to print. I want to put a command button
on the form, so the end user thinks he is printing out the form
(invoice/receiving ticket). I have a PrintPreview macro attached to the on
click button (on the form) to print the current receiving ticket form. That
was the macro information that I listed in the original question. I
obviously have something typed wrong, but for the life of me can not figure
it out.

:

Melinda,
Forms are not made for printing, reports are. Better to create a report
based
on
the
form, and using that same form value filtering technique to only report on the
one
rcord.
If you must print just one form, right click in your RecTicketNo control, and
select
Filter By Selection. That will filter the recordset to just one record. Then
call
for
Print.

--
hth
Al Campagna . Candia Computer Consulting . Candia, NH USA
Microsoft Access MVP
http://home.comcast.net/~cccsolutions

"Find a job that you love, and you'll never work a day in your life."


I have a data entry form in which I have a Preview command button on the
bottom of the form--to preview the information that is inputted. I am not
really to good with the coding so I set up a printpreviewmacro to Open
Report/rptRecvTicket, Print Preview and in the Where Condition I put
[RecTicketNo]=[Forms]![receivingticketfrm]![recticketno]. When I run it I
get a "Enter Parameter Value"
forms!receivingticketfrm!recticketno. If I enter the number of the
receiving ticket it populates the correct receiving ticket, but I don't know
why it is prompted me with a parameter value. I have checked all the
spelling, any ideas. thanks
 
Pardon my stupidity. Worked like a charm. I am trying to make this harder
than it is. I was trying to put a "Print Preview" button on the form so
that when they enter their information into the receivingticketfrm it sets
focus on the report and prints immediately after they input the information
into the form. Is there an easy way to print after you input the
information in the form?

Al Campagna said:
Melinda,
You wrote...This tells me that you have designed report to display the information.
Every report (RecordSource) has a table or a query behind it. Yours should have a
"query" behind it...not a table.
And... in that query, based on your table of data, you set a criteria against the
recticketno field... either by entering a parameter (as you have been doing), or by
referencing some value on your "calling" form.

--
hth
Al Campagna . Candia Computer Consulting . Candia, NH USA
Microsoft Access MVP
http://home.comcast.net/~cccsolutions

"Find a job that you love, and you'll never work a day in your life."



Melinda said:
The Preview Report button is on the main for, but since I am not running a
query--just gathering my data from tables, where would I enter the criteria
at? I have done it in a query but I am not aware where you would set it in
a table. I am fairly new at access (if you can't tell). Thanks

Al Campagna said:
Melinda,
On which form is your print button? Main (I assume), or the sub?
If on the main, it might be easier (as you say) to enter the recticketno in response
to
a parameter prompt.
If, in the query behind the report you had this parameter (criteria) against the
recticketno...
Field: recticketno
Criteria: = [Enter the Ticket No]
That's all you need. When prompted, enter the recticketno and the report should
only
print the data for that unique record.

If you placed the print button on the subform record, then you could "refer" to the
recticketno directly in the subform, since clicking the button while on the sub record
keeps the focus on that particular recticketno record.
Now, a query where...
Field: recticketno
Criteria: = Forms!frmMainName!frmSubformName.Form!recticketno
can be passed to the query without manual entry.

--
hth
Al Campagna . Candia Computer Consulting . Candia, NH USA
Microsoft Access MVP
http://home.comcast.net/~cccsolutions

"Find a job that you love, and you'll never work a day in your life."

Part of your assumption is correct, Al. I have a main form, with two
subforms. The first subform holds the recticketno, which is an auto number
field and this field pretty much ties all the forms together. I am indeed
using the recticketno control to filter the report. My form is based on
three individuals tables that are related.

I just have a print preview button on the form which prompts me for the
receiving ticket no and then after entering the receiving ticket no the
report pops up and if correct I can then print it. I have a macro written
for the print preview button and when I click on the button it preview the
form. I will look at the report and see if I have a field named wrong or
something of that sort. Thanks

:

Melinda,
OK. Let me make sure I understand...
You have a Report designed to look just like the "calling" Form (rptRcvTicket).
You
call the report (In Preview) from a form named
[ReceivingTicketfrm], using the value in the RecTicketNo control on the form to
filter
the
query/report.

In the query behind the report, against the RecTicketNo field, you should have a
criteria of...
= Forms![ReceivingTicketfrm]!]![RecTicketNo]

First, the form must remain Open while the report runs.
Second, if you get an "Enter Parameter Value" (that error message should also
indicate
what parameter value it's looking for... that would be helpful to know what that is)
That means that there is something in your criteria that Access can not locate, such
as
the form name, or the form field. It might be just a mispelling. Carefully check
that
the criteria calls the exact object Names from the form.

Bug shooting... remove the Criteria in the query, and run the query itself. Any
Prompt? If so, there is something else in the query that can't find a value...
maybe a
calculation in some other field, or something left in the Parameter list.. etc...
etc...
If not, again with no criteria, run the report. Any Prompt? If so, there is a
control
or reference on the report that needs a value it can not find. Check the whole
report,
and subforms, and code until located. If necessary, back up the report, and start
removing objects from the report until the prompt goes away.
--
hth
Al Campagna . Candia Computer Consulting . Candia, NH USA
Microsoft Access MVP
http://home.comcast.net/~cccsolutions

"Find a job that you love, and you'll never work a day in your life."

I'm sorry the report is what I want to print. I want to put a command button
on the form, so the end user thinks he is printing out the form
(invoice/receiving ticket). I have a PrintPreview macro attached to the on
click button (on the form) to print the current receiving ticket form. That
was the macro information that I listed in the original question. I
obviously have something typed wrong, but for the life of me can not figure
it out.

:

Melinda,
Forms are not made for printing, reports are. Better to create a report
based
on
the
form, and using that same form value filtering technique to only report on the
one
rcord.
If you must print just one form, right click in your RecTicketNo control, and
select
Filter By Selection. That will filter the recordset to just one record. Then
call
for
Print.

--
hth
Al Campagna . Candia Computer Consulting . Candia, NH USA
Microsoft Access MVP
http://home.comcast.net/~cccsolutions

"Find a job that you love, and you'll never work a day in your life."


I have a data entry form in which I have a Preview command button on the
bottom of the form--to preview the information that is inputted. I am not
really to good with the coding so I set up a printpreviewmacro to Open
Report/rptRecvTicket, Print Preview and in the Where Condition I put
[RecTicketNo]=[Forms]![receivingticketfrm]![recticketno]. When I run it I
get a "Enter Parameter Value"
forms!receivingticketfrm!recticketno. If I enter the number of the
receiving ticket it populates the correct receiving ticket, but I don't know
why it is prompted me with a parameter value. I have checked all the
spelling, any ideas. thanks
 
Since you say you are pretty new at Access, I wouldn't get too carried away with bells
and whistles, unless there's a real issue with entering some data and then clicking a
Print Report button each time...
But, the OpenReport could be "called" via the AterUpdate event of the recticketno
field.

--
hth
Al Campagna . Candia Computer Consulting . Candia, NH USA
Microsoft Access MVP
http://home.comcast.net/~cccsolutions

"Find a job that you love, and you'll never work a day in your life."
Melinda said:
Pardon my stupidity. Worked like a charm. I am trying to make this harder
than it is. I was trying to put a "Print Preview" button on the form so
that when they enter their information into the receivingticketfrm it sets
focus on the report and prints immediately after they input the information
into the form. Is there an easy way to print after you input the
information in the form?

Al Campagna said:
Melinda,
You wrote...
I just have a print preview button on the form which prompts me for the
receiving ticket no and then after entering the receiving ticket no the
report pops up and if correct I can then print it.
This tells me that you have designed report to display the information.
Every report (RecordSource) has a table or a query behind it. Yours should have a
"query" behind it...not a table.
And... in that query, based on your table of data, you set a criteria against the
recticketno field... either by entering a parameter (as you have been doing), or by
referencing some value on your "calling" form.

--
hth
Al Campagna . Candia Computer Consulting . Candia, NH USA
Microsoft Access MVP
http://home.comcast.net/~cccsolutions

"Find a job that you love, and you'll never work a day in your life."



Melinda said:
The Preview Report button is on the main for, but since I am not running a
query--just gathering my data from tables, where would I enter the criteria
at? I have done it in a query but I am not aware where you would set it in
a table. I am fairly new at access (if you can't tell). Thanks

:

Melinda,
On which form is your print button? Main (I assume), or the sub?
If on the main, it might be easier (as you say) to enter the recticketno in
response
to
a parameter prompt.
If, in the query behind the report you had this parameter (criteria) against the
recticketno...
Field: recticketno
Criteria: = [Enter the Ticket No]
That's all you need. When prompted, enter the recticketno and the report should
only
print the data for that unique record.

If you placed the print button on the subform record, then you could "refer" to
the
recticketno directly in the subform, since clicking the button while on the sub
record
keeps the focus on that particular recticketno record.
Now, a query where...
Field: recticketno
Criteria: = Forms!frmMainName!frmSubformName.Form!recticketno
can be passed to the query without manual entry.

--
hth
Al Campagna . Candia Computer Consulting . Candia, NH USA
Microsoft Access MVP
http://home.comcast.net/~cccsolutions

"Find a job that you love, and you'll never work a day in your life."

Part of your assumption is correct, Al. I have a main form, with two
subforms. The first subform holds the recticketno, which is an auto number
field and this field pretty much ties all the forms together. I am indeed
using the recticketno control to filter the report. My form is based on
three individuals tables that are related.

I just have a print preview button on the form which prompts me for the
receiving ticket no and then after entering the receiving ticket no the
report pops up and if correct I can then print it. I have a macro written
for the print preview button and when I click on the button it preview the
form. I will look at the report and see if I have a field named wrong or
something of that sort. Thanks

:

Melinda,
OK. Let me make sure I understand...
You have a Report designed to look just like the "calling" Form
(rptRcvTicket).
You
call the report (In Preview) from a form named
[ReceivingTicketfrm], using the value in the RecTicketNo control on the form to
filter
the
query/report.

In the query behind the report, against the RecTicketNo field, you should have
a
criteria of...
= Forms![ReceivingTicketfrm]!]![RecTicketNo]

First, the form must remain Open while the report runs.
Second, if you get an "Enter Parameter Value" (that error message should also
indicate
what parameter value it's looking for... that would be helpful to know what that
is)
That means that there is something in your criteria that Access can not locate,
such
as
the form name, or the form field. It might be just a mispelling. Carefully
check
that
the criteria calls the exact object Names from the form.

Bug shooting... remove the Criteria in the query, and run the query itself.
Any
Prompt? If so, there is something else in the query that can't find a value...
maybe a
calculation in some other field, or something left in the Parameter list.. etc...
etc...
If not, again with no criteria, run the report. Any Prompt? If so, there is
a
control
or reference on the report that needs a value it can not find. Check the whole
report,
and subforms, and code until located. If necessary, back up the report, and
start
removing objects from the report until the prompt goes away.
--
hth
Al Campagna . Candia Computer Consulting . Candia, NH USA
Microsoft Access MVP
http://home.comcast.net/~cccsolutions

"Find a job that you love, and you'll never work a day in your life."

I'm sorry the report is what I want to print. I want to put a command button
on the form, so the end user thinks he is printing out the form
(invoice/receiving ticket). I have a PrintPreview macro attached to the on
click button (on the form) to print the current receiving ticket form. That
was the macro information that I listed in the original question. I
obviously have something typed wrong, but for the life of me can not figure
it out.

:

Melinda,
Forms are not made for printing, reports are. Better to create a report
based
on
the
form, and using that same form value filtering technique to only report on the
one
rcord.
If you must print just one form, right click in your RecTicketNo control,
and
select
Filter By Selection. That will filter the recordset to just one record. Then
call
for
Print.

--
hth
Al Campagna . Candia Computer Consulting . Candia, NH USA
Microsoft Access MVP
http://home.comcast.net/~cccsolutions

"Find a job that you love, and you'll never work a day in your life."


I have a data entry form in which I have a Preview command button on the
bottom of the form--to preview the information that is inputted. I am not
really to good with the coding so I set up a printpreviewmacro to Open
Report/rptRecvTicket, Print Preview and in the Where Condition I put
[RecTicketNo]=[Forms]![receivingticketfrm]![recticketno]. When I run it I
get a "Enter Parameter Value"
forms!receivingticketfrm!recticketno. If I enter the number of the
receiving ticket it populates the correct receiving ticket, but I don't know
why it is prompted me with a parameter value. I have checked all the
spelling, any ideas. thanks
 
Thanks for being so patient with my ignorance. I am going to leave it as it
is for now. Thanks

Al Campagna said:
Since you say you are pretty new at Access, I wouldn't get too carried away with bells
and whistles, unless there's a real issue with entering some data and then clicking a
Print Report button each time...
But, the OpenReport could be "called" via the AterUpdate event of the recticketno
field.

--
hth
Al Campagna . Candia Computer Consulting . Candia, NH USA
Microsoft Access MVP
http://home.comcast.net/~cccsolutions

"Find a job that you love, and you'll never work a day in your life."
Melinda said:
Pardon my stupidity. Worked like a charm. I am trying to make this harder
than it is. I was trying to put a "Print Preview" button on the form so
that when they enter their information into the receivingticketfrm it sets
focus on the report and prints immediately after they input the information
into the form. Is there an easy way to print after you input the
information in the form?

Al Campagna said:
Melinda,
You wrote...
I just have a print preview button on the form which prompts me for the
receiving ticket no and then after entering the receiving ticket no the
report pops up and if correct I can then print it.
This tells me that you have designed report to display the information.
Every report (RecordSource) has a table or a query behind it. Yours should have a
"query" behind it...not a table.
And... in that query, based on your table of data, you set a criteria against the
recticketno field... either by entering a parameter (as you have been doing), or by
referencing some value on your "calling" form.

--
hth
Al Campagna . Candia Computer Consulting . Candia, NH USA
Microsoft Access MVP
http://home.comcast.net/~cccsolutions

"Find a job that you love, and you'll never work a day in your life."



The Preview Report button is on the main for, but since I am not running a
query--just gathering my data from tables, where would I enter the criteria
at? I have done it in a query but I am not aware where you would set it in
a table. I am fairly new at access (if you can't tell). Thanks

:

Melinda,
On which form is your print button? Main (I assume), or the sub?
If on the main, it might be easier (as you say) to enter the recticketno in
response
to
a parameter prompt.
If, in the query behind the report you had this parameter (criteria) against the
recticketno...
Field: recticketno
Criteria: = [Enter the Ticket No]
That's all you need. When prompted, enter the recticketno and the report should
only
print the data for that unique record.

If you placed the print button on the subform record, then you could "refer" to
the
recticketno directly in the subform, since clicking the button while on the sub
record
keeps the focus on that particular recticketno record.
Now, a query where...
Field: recticketno
Criteria: = Forms!frmMainName!frmSubformName.Form!recticketno
can be passed to the query without manual entry.

--
hth
Al Campagna . Candia Computer Consulting . Candia, NH USA
Microsoft Access MVP
http://home.comcast.net/~cccsolutions

"Find a job that you love, and you'll never work a day in your life."

Part of your assumption is correct, Al. I have a main form, with two
subforms. The first subform holds the recticketno, which is an auto number
field and this field pretty much ties all the forms together. I am indeed
using the recticketno control to filter the report. My form is based on
three individuals tables that are related.

I just have a print preview button on the form which prompts me for the
receiving ticket no and then after entering the receiving ticket no the
report pops up and if correct I can then print it. I have a macro written
for the print preview button and when I click on the button it preview the
form. I will look at the report and see if I have a field named wrong or
something of that sort. Thanks

:

Melinda,
OK. Let me make sure I understand...
You have a Report designed to look just like the "calling" Form
(rptRcvTicket).
You
call the report (In Preview) from a form named
[ReceivingTicketfrm], using the value in the RecTicketNo control on the form to
filter
the
query/report.

In the query behind the report, against the RecTicketNo field, you should have
a
criteria of...
= Forms![ReceivingTicketfrm]!]![RecTicketNo]

First, the form must remain Open while the report runs.
Second, if you get an "Enter Parameter Value" (that error message should also
indicate
what parameter value it's looking for... that would be helpful to know what that
is)
That means that there is something in your criteria that Access can not locate,
such
as
the form name, or the form field. It might be just a mispelling. Carefully
check
that
the criteria calls the exact object Names from the form.

Bug shooting... remove the Criteria in the query, and run the query itself.
Any
Prompt? If so, there is something else in the query that can't find a value...
maybe a
calculation in some other field, or something left in the Parameter list.. etc...
etc...
If not, again with no criteria, run the report. Any Prompt? If so, there is
a
control
or reference on the report that needs a value it can not find. Check the whole
report,
and subforms, and code until located. If necessary, back up the report, and
start
removing objects from the report until the prompt goes away.
--
hth
Al Campagna . Candia Computer Consulting . Candia, NH USA
Microsoft Access MVP
http://home.comcast.net/~cccsolutions

"Find a job that you love, and you'll never work a day in your life."

I'm sorry the report is what I want to print. I want to put a command button
on the form, so the end user thinks he is printing out the form
(invoice/receiving ticket). I have a PrintPreview macro attached to the on
click button (on the form) to print the current receiving ticket form. That
was the macro information that I listed in the original question. I
obviously have something typed wrong, but for the life of me can not figure
it out.

:

Melinda,
Forms are not made for printing, reports are. Better to create a report
based
on
the
form, and using that same form value filtering technique to only report on the
one
rcord.
If you must print just one form, right click in your RecTicketNo control,
and
select
Filter By Selection. That will filter the recordset to just one record. Then
call
for
Print.

--
hth
Al Campagna . Candia Computer Consulting . Candia, NH USA
Microsoft Access MVP
http://home.comcast.net/~cccsolutions

"Find a job that you love, and you'll never work a day in your life."


I have a data entry form in which I have a Preview command button on the
bottom of the form--to preview the information that is inputted. I am not
really to good with the coding so I set up a printpreviewmacro to Open
Report/rptRecvTicket, Print Preview and in the Where Condition I put
[RecTicketNo]=[Forms]![receivingticketfrm]![recticketno]. When I run it I
get a "Enter Parameter Value"
forms!receivingticketfrm!recticketno. If I enter the number of the
receiving ticket it populates the correct receiving ticket, but I don't know
why it is prompted me with a parameter value. I have checked all the
spelling, any ideas. thanks
 
Back
Top