Connecting Tech Pros Worldwide Help | Site Map

If-else condition

kev
Guest
 
Posts: n/a
#1: Dec 11 '06
Hi folks,

I have a form(frmResultsDisplay) that displays the status of an
equipment. Based on the status whether "Pending" or "Approved", i want
to restrict the user. What i mean here is if the status is pending, i
want to restrict the user to continue to next level and if status is
approved i want the user to proceed to next level meaning open form
"frmSafetyLevel2"

How do i achive this? I am pretty sure there is coding to it. So pls
give me a complete coding plus where to attach it to (which event)

Thanks a lot.:)

Keith Wilby
Guest
 
Posts: n/a
#2: Dec 11 '06

re: If-else condition


"kev" <kevi.mel@gmail.comwrote in message
news:1165823703.616844.174900@73g2000cwn.googlegro ups.com...
Quote:
Hi folks,
>
I have a form(frmResultsDisplay) that displays the status of an
equipment. Based on the status whether "Pending" or "Approved", i want
to restrict the user. What i mean here is if the status is pending, i
want to restrict the user to continue to next level and if status is
approved i want the user to proceed to next level meaning open form
"frmSafetyLevel2"
>
How do i achive this? I am pretty sure there is coding to it. So pls
give me a complete coding plus where to attach it to (which event)
>
Thanks a lot.:)
>
I think the easiest method might be to disable the button that opens
"frmSafetyLevel2" where status is "Pending". You can do this in your form's
Current event. Assuming that status is controlled via a combo box call
cboStatus:

If Me.cboStatus = "Pending" Then
Me.cmdMyCommandButton.Enabled = False
Else
Me.cmdMyCommandButton.Enabled = True
End If

HTH - Keith.
www.keithwilby.com


kev
Guest
 
Posts: n/a
#3: Dec 11 '06

re: If-else condition


Hi Keith,

Thanks a lot. It worked perfectly fine.

Keith Wilby wrote:
Quote:
"kev" <kevi.mel@gmail.comwrote in message
news:1165823703.616844.174900@73g2000cwn.googlegro ups.com...
Quote:
Hi folks,

I have a form(frmResultsDisplay) that displays the status of an
equipment. Based on the status whether "Pending" or "Approved", i want
to restrict the user. What i mean here is if the status is pending, i
want to restrict the user to continue to next level and if status is
approved i want the user to proceed to next level meaning open form
"frmSafetyLevel2"

How do i achive this? I am pretty sure there is coding to it. So pls
give me a complete coding plus where to attach it to (which event)

Thanks a lot.:)
>
I think the easiest method might be to disable the button that opens
"frmSafetyLevel2" where status is "Pending". You can do this in your form's
Current event. Assuming that status is controlled via a combo box call
cboStatus:
>
If Me.cboStatus = "Pending" Then
Me.cmdMyCommandButton.Enabled = False
Else
Me.cmdMyCommandButton.Enabled = True
End If
>
HTH - Keith.
www.keithwilby.com
Closed Thread