Try One More Time To Make Text Visible or Not!

D

Dave Elliott

This code is run via a command button on my form and it makes the Text340
Visible upon printing of the check.
What I now need is if this code is not executed for the Text340 to be
Invisible.
After the Printing or execution of this code, Text340 is visible for all
records, not just the one it was executed on.
It needs to be visible only if that particular record has been printed, or
that command button code executed.

If Not IsNull([ChkNoID]) Then
Text340.Visible = True
End If

Me.Refresh
 
B

berk

If I understand correctly, put your code in the onCurrent
section of the form. That will make sure your code runs
again after going to each record. (as well as after you
print the check. You might also want to include an ELSE
statement like:

If Not IsNull([ChkNoID]) Then
Text340.Visible = True
Else
Text340.Visible = False
End If
 
J

John Vinson

After the Printing or execution of this code, Text340 is visible for all
records, not just the one it was executed on.
It needs to be visible only if that particular record has been printed, or
that command button code executed.

If Not IsNull([ChkNoID]) Then
Text340.Visible = True
End If

Put the same code in the Form's Current event (to toggle visibility
when you move to a new record, without requiring that the button be
clicked).
 
V

Van T. Dinh

Are you referring to ContinuousFormView?

If you are, what you see is many instances of the *same* Control, not
different Controls. Since they come from the same Controls, all instances
will be visible or invisible at the same time. You cannot set some
instances visible and some instances invisible.
 

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