can't configure page setup

Z

Zoe

Where can you configure the page setup for a form in Access 2007? i went to
print preview and configured it there, but when you open the form up again it
has not saved the changes. It is a big pain because we are printing labels
off of a form and it always wants to use the default printer, not the label
printer.

Thank you.
 
A

Allen Browne

Zoe, use a report for printing labels.

In report design view, use the Page Setup tab to configure the margins and
settings you want.

(There is a bug in Access 2007, where it fails to retain the specific
printer you try to set through the Page Setup dialog. AFAIK, there is no
workaround for this until MS releases SP1.)
 
Z

Zoe

Which creates a problem because I have an orders form that I print the label
from. I have a button on the orders form that is supposed to open the label
form filtered to the same customer that is on the order form at that moment.
I used the button wizard to create this and there is no option when you say
open report to open the report and find specific data to display.

THis is the code that is in the Event Procedure to open up the form if that
helps you to understand better. I just need it to open up a report and do the
same thing.

Private Sub Label_Click()
On Error GoTo Err_Label_Click

Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "Label Orders Form"

stLinkCriteria = "[Customer ID]=" & Me![Customer ID]
DoCmd.OpenForm stDocName, , , stLinkCriteria

DoCmd.DoMenuItem A_FORMBAR, A_EDITMENU, A_SELECTRECORD_V2, , A_MENU_VER20
DoCmd.PrintOut A_SELECTION

Exit_Label_Click:
Exit Sub

Err_Label_Click:
MsgBox Err.Description
Resume Exit_Label_Click

End Sub
 
A

Allen Browne

You can use OpenReport with a WhereCondition too:
http://allenbrowne.com/casu-15.html

--
Allen Browne - Microsoft MVP. Perth, Western Australia

Reply to group, rather than allenbrowne at mvps dot org.

Zoe said:
Which creates a problem because I have an orders form that I print the
label
from. I have a button on the orders form that is supposed to open the
label
form filtered to the same customer that is on the order form at that
moment.
I used the button wizard to create this and there is no option when you
say
open report to open the report and find specific data to display.

THis is the code that is in the Event Procedure to open up the form if
that
helps you to understand better. I just need it to open up a report and do
the
same thing.

Private Sub Label_Click()
On Error GoTo Err_Label_Click

Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "Label Orders Form"

stLinkCriteria = "[Customer ID]=" & Me![Customer ID]
DoCmd.OpenForm stDocName, , , stLinkCriteria

DoCmd.DoMenuItem A_FORMBAR, A_EDITMENU, A_SELECTRECORD_V2, ,
A_MENU_VER20
DoCmd.PrintOut A_SELECTION

Exit_Label_Click:
Exit Sub

Err_Label_Click:
MsgBox Err.Description
Resume Exit_Label_Click

End Sub




Allen Browne said:
Zoe, use a report for printing labels.

In report design view, use the Page Setup tab to configure the margins
and
settings you want.

(There is a bug in Access 2007, where it fails to retain the specific
printer you try to set through the Page Setup dialog. AFAIK, there is no
workaround for this until MS releases SP1.)
 
Z

Zoe

Thank you that worked perfectly

Allen Browne said:
You can use OpenReport with a WhereCondition too:
http://allenbrowne.com/casu-15.html

--
Allen Browne - Microsoft MVP. Perth, Western Australia

Reply to group, rather than allenbrowne at mvps dot org.

Zoe said:
Which creates a problem because I have an orders form that I print the
label
from. I have a button on the orders form that is supposed to open the
label
form filtered to the same customer that is on the order form at that
moment.
I used the button wizard to create this and there is no option when you
say
open report to open the report and find specific data to display.

THis is the code that is in the Event Procedure to open up the form if
that
helps you to understand better. I just need it to open up a report and do
the
same thing.

Private Sub Label_Click()
On Error GoTo Err_Label_Click

Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "Label Orders Form"

stLinkCriteria = "[Customer ID]=" & Me![Customer ID]
DoCmd.OpenForm stDocName, , , stLinkCriteria

DoCmd.DoMenuItem A_FORMBAR, A_EDITMENU, A_SELECTRECORD_V2, ,
A_MENU_VER20
DoCmd.PrintOut A_SELECTION

Exit_Label_Click:
Exit Sub

Err_Label_Click:
MsgBox Err.Description
Resume Exit_Label_Click

End Sub




Allen Browne said:
Zoe, use a report for printing labels.

In report design view, use the Page Setup tab to configure the margins
and
settings you want.

(There is a bug in Access 2007, where it fails to retain the specific
printer you try to set through the Page Setup dialog. AFAIK, there is no
workaround for this until MS releases SP1.)

Where can you configure the page setup for a form in Access 2007? i
went
to
print preview and configured it there, but when you open the form up
again
it
has not saved the changes. It is a big pain because we are printing
labels
off of a form and it always wants to use the default printer, not the
label
printer.
 
Top