How to Print Form in MS Acccess

cialis free consultation Guys who cope with male impotence are likely to escape into all pharmaceutic thing trying new and new industrial medicinal supplements, tablets or substances that can affect men’s health, particularly in their sexual capabilities. When you share your experience with others, then it can help people to steer clear canada pharmacy cialis of such medications by choosing a reliable and licensed chemist. But just like any health issues, sexual health issues should also be generic viagra pharmacy addressed. So, you can also go with this drug application to diminish your elevation in blood pressure level but one should not make the mistake of taking free viagra no prescription fast breathe during sexual intercourse.


How to Print Form

In this How To, I will show you how to print a form. It can print out only one page or many pages or by option.

You can use either VB code or Macro to print as I will show the how to below. The method below can also be used under the Navigation form environment as well.

Print Form One Page Only

After you selected a customer then click Print, it will print out one record or maybe more than one records per page depending on the size of form.

customer form

Code to Print:

Private Sub Command213_Click()
Dim PageNo As Integer
PageNo = Me.CurrentRecord
    DoCmd.SelectObject acForm, “Customer2”, True
    DoCmd.PrintOut acPages, PageNo, PageNo, , 1
End Sub

The record or customerID 1  is selected on form, but there are two records printed out on one page as shown below. The reason of printing two records because the page is setup for paper size 8 x 11 inches which is a double size of the current form in Access. In another word, one page of a letter size (8 x 11) can hold two sizes (or two records) of current form as shown below.

print form page 1

if you want to print one record per one page then you also need to set format of detail section on form
Under format tab, set Force New Page to After Section

Print Form One Record per Page

The VB code will be the same as shown below.

Private Sub Command213_Click()
Dim PageNo As Integer
PageNo = Me.CurrentRecord
    DoCmd.SelectObject acForm, “Customer2”, True
    DoCmd.PrintOut acPages, PageNo, PageNo, , 1
End Sub

In order to print only one record per page, we need to change the format of Detail section on form.

  1. Click on Detail Section under the form design view
  2. Select “After Section”  for  “Force New Page” format property
  3. Save and view form

print one record per page

After you selected a customer then click Print, it will print out only one record as shown below.

print only one record

Macro: Print Current Form

macro print

RunMenuCommand
    Command   PrintObject

After you selected a customer then click Print, it will open the Print dialog with a print range for all pages. You can change the print criteria as you want.

print all

Note: If you click OK by leaving the Print Range =  All then it will print all records on this from.

 

Macro: Print Record

RunMenuCommand
     Command    selectRecord
RunMenuCommand
     Command    PrintSelection

 

It will open the Print dialog with a print range for Selected Records after click pint.

print window

Note: If you click OK by leaving the Print Range =  “Selected Record”  then it will print only one record that displays on the form.

Macro: Print a Form

print a form macro

It will open the Print dialog with a print range for All Records after click Print.

print all

Note: If you click OK by leaving the Print Range =  All then it will print all records on this from.

 




Related posts