Multiple if statment (1 Viewer)

Frothingslosh

Premier Pale Stale Ale
Local time
Today, 07:15
Joined
Oct 17, 2012
Messages
3,276
You can simplify that with this:

Code:
Private Sub TF_Ben_O_P_Click()
    Me.TF_Ben_B_S_Date.Value = Nz(TF_Ben_B_S_Date, Now())
End Sub

Nz does what your entire if statement is trying to do, with less effort and processor cycles.
 

Tor_Fey

Registered User.
Local time
Today, 11:15
Joined
Feb 8, 2013
Messages
121
Thanks Frothingslosh;

I have gone with your code and rolled it out.

Kind Regards
Tor Fey


You can simplify that with this:

Code:
Private Sub TF_Ben_O_P_Click()
    Me.TF_Ben_B_S_Date.Value = Nz(TF_Ben_B_S_Date, Now())
End Sub

Nz does what your entire if statement is trying to do, with less effort and processor cycles.
 

Users who are viewing this thread

Top Bottom