Printing to a form

M

magicdds

I have insurance forms that we usually fill out by hand. I want to fill them
out using my database of patient information. However, rather than printing
the information onto preprinted forms, I want Access to print the insurance
form, with the data inserted into the appropriate locations on the form.

Is there a way to get the insurance form into an Access form without trying
to recreate the insurance form with a lot of drawing lines and typing labels.

I tried scanning the insurance form as a jpg image and used it as a
background picture of the form, but it seems that as you use the scroll bar
of the form, the data moves up and down on the form while the background
picture of the insurance form remains stationary.

Is there an easy way to get the preprinted insurance form into an Access
form for printing with data from a query?

Thanks for any help.
Mark
 
J

John W. Vinson

I have insurance forms that we usually fill out by hand. I want to fill them
out using my database of patient information. However, rather than printing
the information onto preprinted forms, I want Access to print the insurance
form, with the data inserted into the appropriate locations on the form.

Is there a way to get the insurance form into an Access form without trying
to recreate the insurance form with a lot of drawing lines and typing labels.

I tried scanning the insurance form as a jpg image and used it as a
background picture of the form, but it seems that as you use the scroll bar
of the form, the data moves up and down on the form while the background
picture of the insurance form remains stationary.

Is there an easy way to get the preprinted insurance form into an Access
form for printing with data from a query?

Thanks for any help.
Mark

First off, Forms (Access forms anyway) are not designed nor optimum for
printing: they're for onscreen interaction with data. Reports are the proper
object to be printed.

You may be able to use the .jpg of the scanned (paper, not Access) form as a
background on a Report - no shifting there!
 
M

magicdds

I tried to use a report first. The problem was that there are places on the
insurance form that require an "X" like for example:

MALE
X FEMALE

There are other similar situations on the insurance form.

The query that the report is based in has a control GENDER that can be M or F.
I have a label next to the word 'male' on the report with an "X" . The
labelName is Male. I also have a label next to the word 'female' on the
report with an "X" . This label's Name is Female. Both Male and Female
visible properties are set to NO. In the OnOpen property of the report I put
code that reads:

If Gender = "M" then Male.visible = true
If Gender = "F" then Female.visible = true

and when I try to open the report, I get an error message:
"You entered an expression that has no value"

Yet, if I put a textbox on the form with the control source property =
GENDER, the gender appears in the text box in the report, as expected. When I
do the same thing in a form, I did not get the error message. That's why I
switched to a form.

So if I go back to a report, how do I avoid the error message?

Thanks,
Mark
 
J

John W. Vinson

I tried to use a report first. The problem was that there are places on the
insurance form that require an "X" like for example:

MALE
X FEMALE

There are other similar situations on the insurance form.

The query that the report is based in has a control GENDER that can be M or F.
I have a label next to the word 'male' on the report with an "X" . The
labelName is Male. I also have a label next to the word 'female' on the
report with an "X" . This label's Name is Female. Both Male and Female
visible properties are set to NO. In the OnOpen property of the report I put
code that reads:

If Gender = "M" then Male.visible = true
If Gender = "F" then Female.visible = true

and when I try to open the report, I get an error message:
"You entered an expression that has no value"

Yet, if I put a textbox on the form with the control source property =
GENDER, the gender appears in the text box in the report, as expected. When I
do the same thing in a form, I did not get the error message. That's why I
switched to a form.

So if I go back to a report, how do I avoid the error message?

You could base the Report on a Query with a couple of calculated fields:

IsMale: IIF([Gender] = "M", "X", "")
IsFemale: IIF([Gender] = "F", "X", "")

and bind the textboxes next to the MALE and FEMALE labels to these two fields.
No code needed.
 
M

magicdds

That works very well.
Thanks John



John W. Vinson said:
I tried to use a report first. The problem was that there are places on the
insurance form that require an "X" like for example:

MALE
X FEMALE

There are other similar situations on the insurance form.

The query that the report is based in has a control GENDER that can be M or F.
I have a label next to the word 'male' on the report with an "X" . The
labelName is Male. I also have a label next to the word 'female' on the
report with an "X" . This label's Name is Female. Both Male and Female
visible properties are set to NO. In the OnOpen property of the report I put
code that reads:

If Gender = "M" then Male.visible = true
If Gender = "F" then Female.visible = true

and when I try to open the report, I get an error message:
"You entered an expression that has no value"

Yet, if I put a textbox on the form with the control source property =
GENDER, the gender appears in the text box in the report, as expected. When I
do the same thing in a form, I did not get the error message. That's why I
switched to a form.

So if I go back to a report, how do I avoid the error message?

You could base the Report on a Query with a couple of calculated fields:

IsMale: IIF([Gender] = "M", "X", "")
IsFemale: IIF([Gender] = "F", "X", "")

and bind the textboxes next to the MALE and FEMALE labels to these two fields.
No code needed.
 

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