G
Guest
I saw a post from Larry Linson (text immediately below) and tried to use it
without the If part because I never want the message box to appear on print.
When I tried this, Access just hung. Am I on the right track at all?
Put VBA code in the Print event to evaluate the condition and set the
Visible property of the Control... something like
If <whateveryourcondition> Then
Me!txtYourBox.Visible = True
Else
Me!txtYourBox.Visible = False
End If
Larry Linson
Microsoft Access MVP
without the If part because I never want the message box to appear on print.
When I tried this, Access just hung. Am I on the right track at all?
Put VBA code in the Print event to evaluate the condition and set the
Visible property of the Control... something like
If <whateveryourcondition> Then
Me!txtYourBox.Visible = True
Else
Me!txtYourBox.Visible = False
End If
Larry Linson
Microsoft Access MVP
Ann Scharpf via AccessMonster.com said:Marshall:
This works fine but when you PRINT the report, the message box appears again.
Is it possible to get the message box to appear only when you click the
button to create the report but not when you print it?
Ann
Marshall said:="Report of whatever this is " & IIf(MsgBox("Is Revision",
4) = 6, "<Revision>", "")
The missing quote was between "Is Revision and the comma.
The reasons I suggested using the MsgBox instead of a prompt
string is because the Message box can be made to use Yes and
No buttons and because the user does not have to type
anything.[quoted text clipped - 43 lines]Ah, now that I look at things again (I was pretty tired on Friday afternoon)
I see that I DIDN'T use your solution. I used the one I linked to in my 2ndwould need to use Klatuu's idea, which, except for your lack
of VBA skills, is better all the way around.