Naming a report

  • Thread starter Thread starter Martin Racette
  • Start date Start date
M

Martin Racette

Hi,

I would like to know if it's possible to insert the value of a field the name of
report (at the top of the window). What I would like to do is an invoice, which
I print in PDF so that it could easily be distributed, I'd like the name at the
top to look something like "Invoice 2004-000" the 2004-000 is the actual invoice
number.

When I print the invoice as a PDF, Win2PDF use the name at the top of the report
window to assign the PDF name, since I'm not the only one to use the database, I
would like to make it as easy to use as ^possible for the others

--
Thank you in Advance

Merci a l'Avance

Martin
 
You could try to run code in the On Open event of the report that sets the
Report's Caption property.
 
And just how do I code it, I tried using the macro "setvalue" function to
accomplish this but all I get is a type mismatch error and no other explanation.
I tried to the expression "Str([Reports]![Impression de
Facture]![Invoice.invoice_no])" to convert the number to string but it's still a
nogo


--
Thank you in Advance

Merci a l'Avance

Martin
 
I would expect the invoice number is on an open form so you would use code
in the On Open event of the report
Me.Caption = Forms!frmOpenForm!txtInvoiceNo

--
Duane Hookom
MS Access MVP


Martin Racette said:
And just how do I code it, I tried using the macro "setvalue" function to
accomplish this but all I get is a type mismatch error and no other explanation.
I tried to the expression "Str([Reports]![Impression de
Facture]![Invoice.invoice_no])" to convert the number to string but it's still a
nogo


--
Thank you in Advance

Merci a l'Avance

Martin
Duane Hookom said:
You could try to run code in the On Open event of the report that sets the
Report's Caption property.

--
Duane Hookom
MS Access MVP


the
name of invoice,
which name
at the actual
invoice the
report
 
To get the number of the invoice I use a query, which in turn request the
number. What I would it look like is "Invoice 2003-xxx" where the xxx is the
actual invoice number.

The only thig that I have close a form to get to the actual invoice to be
printed, is the menu where I have a button and it open the report with the
invoice number that I have just given to the query.

I don't know how to do it otherwise

--
Thank you in Advance

Merci a l'Avance

Martin
Duane Hookom said:
I would expect the invoice number is on an open form so you would use code
in the On Open event of the report
Me.Caption = Forms!frmOpenForm!txtInvoiceNo

--
Duane Hookom
MS Access MVP


Martin Racette said:
And just how do I code it, I tried using the macro "setvalue" function to
accomplish this but all I get is a type mismatch error and no other explanation.
I tried to the expression "Str([Reports]![Impression de
Facture]![Invoice.invoice_no])" to convert the number to string but it's still a
nogo


--
Thank you in Advance

Merci a l'Avance

Martin
Duane Hookom said:
You could try to run code in the On Open event of the report that sets the
Report's Caption property.

--
Duane Hookom
MS Access MVP


Hi,

I would like to know if it's possible to insert the value of a field the
name of
report (at the top of the window). What I would like to do is an invoice,
which
I print in PDF so that it could easily be distributed, I'd like the name
at the
top to look something like "Invoice 2004-000" the 2004-000 is the actual
invoice
number.

When I print the invoice as a PDF, Win2PDF use the name at the top of the
report
window to assign the PDF name, since I'm not the only one to use the
database, I
would like to make it as easy to use as ^possible for the others

--
Thank you in Advance

Merci a l'Avance

Martin
 
I never use parameter queries. You could try something like:
Me.Caption = "Invoice Number " & [Enter Invoice Number]
Where [Enter...] is your exact parameter prompt.

--
Duane Hookom
MS Access MVP


Martin Racette said:
To get the number of the invoice I use a query, which in turn request the
number. What I would it look like is "Invoice 2003-xxx" where the xxx is the
actual invoice number.

The only thig that I have close a form to get to the actual invoice to be
printed, is the menu where I have a button and it open the report with the
invoice number that I have just given to the query.

I don't know how to do it otherwise

--
Thank you in Advance

Merci a l'Avance

Martin
Duane Hookom said:
I would expect the invoice number is on an open form so you would use code
in the On Open event of the report
Me.Caption = Forms!frmOpenForm!txtInvoiceNo

--
Duane Hookom
MS Access MVP


Martin Racette said:
And just how do I code it, I tried using the macro "setvalue" function to
accomplish this but all I get is a type mismatch error and no other explanation.
I tried to the expression "Str([Reports]![Impression de
Facture]![Invoice.invoice_no])" to convert the number to string but
it's
still a
nogo


--
Thank you in Advance

Merci a l'Avance

Martin
You could try to run code in the On Open event of the report that
sets
the
Report's Caption property.

--
Duane Hookom
MS Access MVP


Hi,

I would like to know if it's possible to insert the value of a
field
the
name of
report (at the top of the window). What I would like to do is an invoice,
which
I print in PDF so that it could easily be distributed, I'd like
the
name
at the
top to look something like "Invoice 2004-000" the 2004-000 is the actual
invoice
number.

When I print the invoice as a PDF, Win2PDF use the name at the top
of
the
report
window to assign the PDF name, since I'm not the only one to use the
database, I
would like to make it as easy to use as ^possible for the others

--
Thank you in Advance

Merci a l'Avance

Martin
 
How else could I only print one invoice without printing the stack of invoice

BTW. I'm a newbie with access, I previously used Lotus Approach and Borland
Paradox, and to do this kind of reports I had to use a query

--
Thank you in Advance

Merci a l'Avance

Martin
Duane Hookom said:
I never use parameter queries. You could try something like:
Me.Caption = "Invoice Number " & [Enter Invoice Number]
Where [Enter...] is your exact parameter prompt.

--
Duane Hookom
MS Access MVP


Martin Racette said:
To get the number of the invoice I use a query, which in turn request the
number. What I would it look like is "Invoice 2003-xxx" where the xxx is the
actual invoice number.

The only thig that I have close a form to get to the actual invoice to be
printed, is the menu where I have a button and it open the report with the
invoice number that I have just given to the query.

I don't know how to do it otherwise

--
Thank you in Advance

Merci a l'Avance

Martin
Duane Hookom said:
I would expect the invoice number is on an open form so you would use code
in the On Open event of the report
Me.Caption = Forms!frmOpenForm!txtInvoiceNo

--
Duane Hookom
MS Access MVP


And just how do I code it, I tried using the macro "setvalue" function to
accomplish this but all I get is a type mismatch error and no other
explanation.
I tried to the expression "Str([Reports]![Impression de
Facture]![Invoice.invoice_no])" to convert the number to string but it's
still a
nogo


--
Thank you in Advance

Merci a l'Avance

Martin
You could try to run code in the On Open event of the report that sets
the
Report's Caption property.

--
Duane Hookom
MS Access MVP


Hi,

I would like to know if it's possible to insert the value of a field
the
name of
report (at the top of the window). What I would like to do is an
invoice,
which
I print in PDF so that it could easily be distributed, I'd like the
name
at the
top to look something like "Invoice 2004-000" the 2004-000 is the
actual
invoice
number.

When I print the invoice as a PDF, Win2PDF use the name at the top of
the
report
window to assign the PDF name, since I'm not the only one to use the
database, I
would like to make it as easy to use as ^possible for the others

--
Thank you in Advance

Merci a l'Avance

Martin
 
I would use a combo box on a form like Forms!frmSelectInv!cboInvoiceID
Then set the criteria in the report's record source to
InvoiceID = Forms!frmSelectInv!cboInvoiceID


--
Duane Hookom
MS Access MVP


Martin Racette said:
How else could I only print one invoice without printing the stack of invoice

BTW. I'm a newbie with access, I previously used Lotus Approach and Borland
Paradox, and to do this kind of reports I had to use a query

--
Thank you in Advance

Merci a l'Avance

Martin
Duane Hookom said:
I never use parameter queries. You could try something like:
Me.Caption = "Invoice Number " & [Enter Invoice Number]
Where [Enter...] is your exact parameter prompt.

--
Duane Hookom
MS Access MVP


Martin Racette said:
To get the number of the invoice I use a query, which in turn request the
number. What I would it look like is "Invoice 2003-xxx" where the xxx
is
the
actual invoice number.

The only thig that I have close a form to get to the actual invoice to be
printed, is the menu where I have a button and it open the report with the
invoice number that I have just given to the query.

I don't know how to do it otherwise

--
Thank you in Advance

Merci a l'Avance

Martin
I would expect the invoice number is on an open form so you would
use
code
in the On Open event of the report
Me.Caption = Forms!frmOpenForm!txtInvoiceNo

--
Duane Hookom
MS Access MVP


And just how do I code it, I tried using the macro "setvalue"
function
to
accomplish this but all I get is a type mismatch error and no other
explanation.
I tried to the expression "Str([Reports]![Impression de
Facture]![Invoice.invoice_no])" to convert the number to string
but
it's
still a
nogo


--
Thank you in Advance

Merci a l'Avance

Martin
You could try to run code in the On Open event of the report
that
sets
the
Report's Caption property.

--
Duane Hookom
MS Access MVP


Hi,

I would like to know if it's possible to insert the value of a field
the
name of
report (at the top of the window). What I would like to do is an
invoice,
which
I print in PDF so that it could easily be distributed, I'd
like
the
name
at the
top to look something like "Invoice 2004-000" the 2004-000 is the
actual
invoice
number.

When I print the invoice as a PDF, Win2PDF use the name at the
top
of
the
report
window to assign the PDF name, since I'm not the only one to
use
the
database, I
would like to make it as easy to use as ^possible for the others

--
Thank you in Advance

Merci a l'Avance

Martin
 
But if I do it that way, when ever I try to just open the report I either get an
error, or a blank page. The way I did it if I only open the report I get to
choose which invoice I want to see/print.

--
Thank you in Advance

Merci a l'Avance

Martin
Duane Hookom said:
I would use a combo box on a form like Forms!frmSelectInv!cboInvoiceID
Then set the criteria in the report's record source to
InvoiceID = Forms!frmSelectInv!cboInvoiceID


--
Duane Hookom
MS Access MVP


Martin Racette said:
How else could I only print one invoice without printing the stack of invoice

BTW. I'm a newbie with access, I previously used Lotus Approach and Borland
Paradox, and to do this kind of reports I had to use a query

--
Thank you in Advance

Merci a l'Avance

Martin
Duane Hookom said:
I never use parameter queries. You could try something like:
Me.Caption = "Invoice Number " & [Enter Invoice Number]
Where [Enter...] is your exact parameter prompt.

--
Duane Hookom
MS Access MVP


To get the number of the invoice I use a query, which in turn request the
number. What I would it look like is "Invoice 2003-xxx" where the xxx is
the
actual invoice number.

The only thig that I have close a form to get to the actual invoice to be
printed, is the menu where I have a button and it open the report with the
invoice number that I have just given to the query.

I don't know how to do it otherwise

--
Thank you in Advance

Merci a l'Avance

Martin
I would expect the invoice number is on an open form so you would use
code
in the On Open event of the report
Me.Caption = Forms!frmOpenForm!txtInvoiceNo

--
Duane Hookom
MS Access MVP


And just how do I code it, I tried using the macro "setvalue" function
to
accomplish this but all I get is a type mismatch error and no other
explanation.
I tried to the expression "Str([Reports]![Impression de
Facture]![Invoice.invoice_no])" to convert the number to string but
it's
still a
nogo


--
Thank you in Advance

Merci a l'Avance

Martin
You could try to run code in the On Open event of the report that
sets
the
Report's Caption property.

--
Duane Hookom
MS Access MVP


Hi,

I would like to know if it's possible to insert the value of a
field
the
name of
report (at the top of the window). What I would like to do is an
invoice,
which
I print in PDF so that it could easily be distributed, I'd like
the
name
at the
top to look something like "Invoice 2004-000" the 2004-000 is the
actual
invoice
number.

When I print the invoice as a PDF, Win2PDF use the name at the top
of
the
report
window to assign the PDF name, since I'm not the only one to use
the
database, I
would like to make it as easy to use as ^possible for the others

--
Thank you in Advance

Merci a l'Avance

Martin
 
I almost always use code behind a command button on a form like:
Dim strWhere As String
strWhere = "1=1 "
If not IsNull(Me.cboInvoiceID) Then
strWhere = strWhere & " And [InvoiceID] = " & Me.cboInvoiceID
End If
DoCmd.OpenReport "rptInvoice", acPreview, , strWhere

I rarely place any criteria in a report's record source. The code that opens
the report applies the proper where clause. I never open reports from the
database window (user interface). This approach allows me to set up for
criteria from any form and any type of control including multi-select list
boxes. Most reports can have many combinations of criteria/filtering so
adding all of this in either parameter prompts or form!control references is
messy and not very flexible.

--
Duane Hookom
MS Access MVP


Martin Racette said:
But if I do it that way, when ever I try to just open the report I either get an
error, or a blank page. The way I did it if I only open the report I get to
choose which invoice I want to see/print.

--
Thank you in Advance

Merci a l'Avance

Martin
Duane Hookom said:
I would use a combo box on a form like Forms!frmSelectInv!cboInvoiceID
Then set the criteria in the report's record source to
InvoiceID = Forms!frmSelectInv!cboInvoiceID


--
Duane Hookom
MS Access MVP


Martin Racette said:
How else could I only print one invoice without printing the stack of invoice

BTW. I'm a newbie with access, I previously used Lotus Approach and Borland
Paradox, and to do this kind of reports I had to use a query

--
Thank you in Advance

Merci a l'Avance

Martin
I never use parameter queries. You could try something like:
Me.Caption = "Invoice Number " & [Enter Invoice Number]
Where [Enter...] is your exact parameter prompt.

--
Duane Hookom
MS Access MVP


To get the number of the invoice I use a query, which in turn
request
the
number. What I would it look like is "Invoice 2003-xxx" where the
xxx
is
the
actual invoice number.

The only thig that I have close a form to get to the actual
invoice to
be
printed, is the menu where I have a button and it open the report
with
the
invoice number that I have just given to the query.

I don't know how to do it otherwise

--
Thank you in Advance

Merci a l'Avance

Martin
I would expect the invoice number is on an open form so you
would
use
code
in the On Open event of the report
Me.Caption = Forms!frmOpenForm!txtInvoiceNo

--
Duane Hookom
MS Access MVP


And just how do I code it, I tried using the macro "setvalue" function
to
accomplish this but all I get is a type mismatch error and no other
explanation.
I tried to the expression "Str([Reports]![Impression de
Facture]![Invoice.invoice_no])" to convert the number to
string
but
it's
still a
nogo


--
Thank you in Advance

Merci a l'Avance

Martin
You could try to run code in the On Open event of the report that
sets
the
Report's Caption property.

--
Duane Hookom
MS Access MVP


Hi,

I would like to know if it's possible to insert the value of a
field
the
name of
report (at the top of the window). What I would like to do
is
an
invoice,
which
I print in PDF so that it could easily be distributed, I'd like
the
name
at the
top to look something like "Invoice 2004-000" the 2004-000
is
the
actual
invoice
number.

When I print the invoice as a PDF, Win2PDF use the name at
the
top
of
the
report
window to assign the PDF name, since I'm not the only one
to
use
the
database, I
would like to make it as easy to use as ^possible for the others

--
Thank you in Advance

Merci a l'Avance

Martin
 
Back
Top