View Full Version : Suppressing printing of controls when control value is null


dderolph
12-01-2008, 04:48 PM
I'm using Access 2007 and working on an assignment for a class on Access. One part of the assignment requires suppressing the printing of three controls based on a certain table when the PaymentID control value is null. The book gives a hint; it says, "Use the Detail section's Format event, and use assignment statements for all the labels and text boxes in the Detail section similar to Me![control name].Visible = True/False, where Me refers to the open form, and True/False means to select the appropriate property setting."

I'm lost. What is the "Detail section's Format event" and what are "assignment statements"? I've gone back to the parts of the textbook searching for the procedure, but haven't stumbled across it yet.

Can someone give me some direction here?

pbaldy
12-01-2008, 05:02 PM
Double clicking on the bar that says "Detail" in design view should expose the event for you. Assignment statements are statement like the example given to you:

Me![control name].Visible = True

dderolph
12-01-2008, 05:31 PM
OK, is On Print where I need to enter the statement? I tried putting
Me![PaymentID].Visible = True there but that did not work.

pbaldy
12-01-2008, 06:02 PM
Your instructions didn't say Print event:

"Use the Detail section's Format event

Further, you need code to set it both ways; think If/Then/Else.