Show Text on Form IF

ckinninger

Registered User.
Local time
Today, 09:49
Joined
Mar 29, 2011
Messages
12
Guys/Gals:

I have a form with a check box called "cancelled". That is bound to a field that stores the value. Works fine.

I want to be able to show large text across the form saying "CANCELLED" if the check box is active (table field cancelled = true) for this record.

Any help would be appreciated.

Thank you,

CK
 
Where Cancelled is the Checkbox name and CancelledLabel is the Label's name:

To make label visible when box is checked
Code:
Private Sub Cancelled_AfterUpdate()
 If Me.Cancelled = -1 Then
  CancelledLabel.Visible = True
 Else
  CancelledLabel.Visible = False
 End If
End Sub
To keep label visible when moving from record to record
Code:
Private Sub Form_Current()
If Me.Cancelled = -1 Then
  CancelledLabel.Visible = True
 Else
  CancelledLabel.Visible = False
 End If
End Sub

Now this will only work on Single View Forms, of course.

Linq ;0)>
 

Sorry that I'm inexperienced but I hope you give me some more direction.

What I did was go to the VB code screen and insert two new modules. Paste the code into each.

Then for the check box "cancelled" in event, after update I put:

=Cancelled_AfterUpdate()

It's giving me an error that it can't find the function when I test it.

----

For the second function, by name that is assigned to the form when I enter the form? No calling it?


I really appreciate the help. I think I'll be on my way to doing my own code soon.

Thanks again.
 
woaaa! nevermind the second question. i got it. :-) both go in the code box for the form itself. thanks a lot.
 

Users who are viewing this thread

Back
Top Bottom