PC Review


Reply
Thread Tools Rate Thread

complex code

 
 
NEOFYTOS
Guest
Posts: n/a
 
      25th Aug 2008
Hello

i have the following code that is working properly

Private Sub EdafoponikiMorfi_AfterUpdate()
If Me.EdafoponikiMorfi = 8 Then
Me.myLabel.Visible = True
Me.EdafoponikiDescription.Enabled = True
Else
Me.myLabel.Visible = False
Me.EdafoponikiDescription.Enabled = False
End If
End Sub

My problem is that i want to write a code in order
to include the following condition in the above code.

-- If Me.EdafoponikiMorfi = 9Then
Me.Standorigin.Enabled = True
else
Me.Standorigin.Enabled = False




THANK YOU
 
Reply With Quote
 
 
 
 
Douglas J. Steele
Guest
Posts: n/a
 
      25th Aug 2008
Private Sub EdafoponikiMorfi_AfterUpdate()
If Me.EdafoponikiMorfi = 8 Then
Me.myLabel.Visible = True
Me.EdafoponikiDescription.Enabled = True
Else
If Me.EdafoponikiMorfi = 9Then
Me.Standorigin.Enabled = True
Else
Me.Standorigin.Enabled = False
End If
Me.myLabel.Visible = False
Me.EdafoponikiDescription.Enabled = False
End If
End Sub

or, shorter

Private Sub EdafoponikiMorfi_AfterUpdate()
Me.myLabel.Visible = (Me.EdafoponikiMorfi = 8)
Me.EdafoponikiDescription.Enabled = (Me.EdafoponikiMorfi = 8)
Me.Standorigin.Enabled = (Me.EdafoponikiMorfi = 9)
End Sub


--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)


"NEOFYTOS" <(E-Mail Removed)> wrote in message
news:FBBB403F-16C8-4FAB-9192-(E-Mail Removed)...
> Hello
>
> i have the following code that is working properly
>
> Private Sub EdafoponikiMorfi_AfterUpdate()
> If Me.EdafoponikiMorfi = 8 Then
> Me.myLabel.Visible = True
> Me.EdafoponikiDescription.Enabled = True
> Else
> Me.myLabel.Visible = False
> Me.EdafoponikiDescription.Enabled = False
> End If
> End Sub
>
> My problem is that i want to write a code in order
> to include the following condition in the above code.
>
> -- If Me.EdafoponikiMorfi = 9Then
> Me.Standorigin.Enabled = True
> else
> Me.Standorigin.Enabled = False
>
>
>
>
> THANK YOU



 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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 On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
complex code angie Microsoft Access Form Coding 8 25th Nov 2008 08:37 AM
Writing Complex Macro or VBA Code? =?Utf-8?B?U29oYWlsIGlxYmFs?= Microsoft Excel Programming 5 16th Mar 2006 03:47 PM
Understanding Complex (for me at least) VB Code in Access John Ortt Microsoft Access 6 5th Jan 2005 05:18 PM
ASP page initiating complex code execution Pavils Jurjans Microsoft ASP .NET 1 3rd Feb 2004 11:27 PM
Do---Loop Error in Complex Code Pete T Microsoft Excel Programming 5 14th Oct 2003 06:54 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:14 PM.