Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old December 11th, 2006, 07:35 AM
kev
Guest
 
Posts: n/a
Default If-else condition

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.:)

  #2  
Old December 11th, 2006, 09:15 AM
Keith Wilby
Guest
 
Posts: n/a
Default 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


  #3  
Old December 11th, 2006, 09:35 AM
kev
Guest
 
Posts: n/a
Default 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
 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles