Invoke form if checkbox is -1 (1 Viewer)

tinyevil777

Registered User.
Local time
Today, 18:23
Joined
Dec 10, 2010
Messages
137
Good morning all,

The title pretty much explains my query, but just to clarify...

If the checkbox "PQE" is ticked (-1), invoke the form "PQEFORM". I thought about using the OnClick option, but i do not want the form to be invoked if the checkbox is unticked (-1 to 0).

I'm sure it's just a simple IF statement in the coding for the OnClick, but i'm not sure where to start looking.

Any help would be greatly appreciated, thank you in advance!


Tom
 

tinyevil777

Registered User.
Local time
Today, 18:23
Joined
Dec 10, 2010
Messages
137
Ahh i think i've cracked it, does anyone envision having any issues with using:

Code:
Private Sub newpqe_AfterUpdate()
   If Me.newpqe = True Then
       DoCmd.OpenForm "Anal-PQEPOPUP", acNormal
   End If
End Sub
 

MarkK

bit cruncher
Local time
Today, 10:23
Joined
Mar 17, 2004
Messages
8,181
Comparing to True for booleans is like multiplying by one for Integers: Makes no difference. I'd amend as follows ...
Code:
Private Sub chkPQE_AfterUpdate()
   If Me.chkPQE Then DoCmd.OpenForm "PQEPOPUP"
End Sub
... and acNormal is the default.
Cheers,
 

Users who are viewing this thread

Top Bottom