Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Access 2000 Form Printing question 1

Status
Not open for further replies.

neilch

Programmer
Nov 13, 2006
10
US
Hi, I have a form that gets data from a table and i print these forms (about 3000). There is one field that i only want to print if the value is > 0. I have used If TotalStarSavings = 0 Then
Label654.Visible = False
TotalStarSavings.Visible = False
Else
Label654.Visible = True
TotalStarSavings.Visible = True
End If
These are single forms. Either it will print Label and Savings on all forms or sometimes on none. Any help will be appreciated.
Thanks,
NeilCh
 
Can't you print a report rather than the form?

If you really need to print a form, you probably set the current text box to Display When: Screen Only. Then add another text box in the same position but set its Display When: Print Only. Change the print only text box control source to:
=IIf([YourField]>0, [YourField], Null)

Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
Thanks for the quick reply dhookom!
I tried the screen only and print only text boxes...it did not work. I am printing bills for town taxes...On my form if the Total Savings > 0 than I want the label and amount to be visible and print on the bill...I get the amount from the table. Control Source on Text box is =[TotalSaving]*.01
On the form I have the following ON CURRENT event procedure
If TotalSavings > 0# Then
Me!Label654.Visible = True
Me!TotalSavings.Visible = True
Else:
Me!Label654.Visible = False
Me!TotalSavings.Visible = False
End If
Display When = Always and Visible = Yes
It displays correctly on the screen but when I print the forms every bill shows the amount and the label even the ones where the amount is 0.
I would really appreciate the help as I need to get these out in a hurry!
Thanks,
NeilCh
 
Can't you print a report rather than the form?

Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top