By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,145 Members | 1,492 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,145 IT Pros & Developers. It's quick & easy.

If-else condition

P: n/a
kev
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.:)

Dec 11 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a
"kev" <ke******@gmail.comwrote in message
news:11**********************@73g2000cwn.googlegro ups.com...
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
Dec 11 '06 #2

P: n/a
kev
Hi Keith,

Thanks a lot. It worked perfectly fine.

Keith Wilby wrote:
"kev" <ke******@gmail.comwrote in message
news:11**********************@73g2000cwn.googlegro ups.com...
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
Dec 11 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.