PC Review


Reply
Thread Tools Rate Thread

Access 97- if... and if... then Coding

 
 
jeschaefer@usa.net
Guest
Posts: n/a
 
      12th Jul 2007
I usea form with check boxes. I have code that If one box is checked
Then change a list to "1"

Private Sub XXX_AfterUpdate()
If (Me.XXX = -1) Then
Me.List117 = "1"
End If

I want to write a code that if two (or more) boxes are checked Then
change list to 2

Private Sub XXX_AfterUpdate()
If (Me.XXX = -1) and
If (If Me.YYY = -1 ) Then
Me.List117 = "2"
End If

I would appreciate any help.

 
Reply With Quote
 
 
 
 
Jeff Boyce
Guest
Posts: n/a
 
      12th Jul 2007
Have you checked Access HELP for the syntax on the If...Then function?

Perhaps:
If (Me!XXX = -1) And (Me!YYY = -1) Then
'do this
Else
'do that
End If

Regards

Jeff Boyce
Microsoft Office/Access MVP


<(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>I usea form with check boxes. I have code that If one box is checked
> Then change a list to "1"
>
> Private Sub XXX_AfterUpdate()
> If (Me.XXX = -1) Then
> Me.List117 = "1"
> End If
>
> I want to write a code that if two (or more) boxes are checked Then
> change list to 2
>
> Private Sub XXX_AfterUpdate()
> If (Me.XXX = -1) and
> If (If Me.YYY = -1 ) Then
> Me.List117 = "2"
> End If
>
> I would appreciate any help.
>



 
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
Access Coding Access Coding Microsoft Access Form Coding 2 23rd Mar 2010 06:53 PM
Access coding standards- would you ever release an Access application that failed to compile completely? Paul Shapiro Microsoft Access 12 21st Aug 2007 10:50 PM
Access coding to VB Daniel Microsoft Access Security 11 16th May 2007 03:53 PM
Access coding Garry Microsoft Access Getting Started 3 28th Mar 2005 04:49 AM
Coding in Access Lance Microsoft Access VBA Modules 1 8th Jul 2003 08:06 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:04 PM.