SunQuest
           Database Management
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesDatabase Management

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
SlickEdit: Code in over 40 languages across 7 platforms. SlickEdit’s unmatched power, speed, and flexibility allows even the most accomplished developers to write better code faster. Download a free trial today!
  #1  
Old June 27th, 2003, 09:01 AM
gothrog gothrog is offline
Micro Junky
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2002
Location: NJ
Posts: 80 gothrog User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 4 h 6 m 43 sec
Reputation Power: 6
Access 2000 functions question

Is it possible to use IF-ELSE statements in M.S. Access 2000????

If so can you leave some examples......

I have some ideas I want to apply using if statements and I need to know if it is possible to do so.

Reply With Quote
  #2  
Old June 27th, 2003, 09:17 AM
victorpendleton victorpendleton is offline
Contributing User
Dev Shed Regular (2000 - 2499 posts)
 
Join Date: Jan 2003
Location: No es importante
Posts: 2,065 victorpendleton User rank is Private First Class (20 - 50 Reputation Level)victorpendleton User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 6 h 31 m 56 sec
Reputation Power: 8
Where are you trying to use this syntax? In the query or in a module?

Reply With Quote
  #3  
Old June 27th, 2003, 09:39 AM
gothrog gothrog is offline
Micro Junky
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2002
Location: NJ
Posts: 80 gothrog User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 4 h 6 m 43 sec
Reputation Power: 6
I'm going to try and use it in a query.

Reply With Quote
  #4  
Old June 27th, 2003, 03:28 PM
victorpendleton victorpendleton is offline
Contributing User
Dev Shed Regular (2000 - 2499 posts)
 
Join Date: Jan 2003
Location: No es importante
Posts: 2,065 victorpendleton User rank is Private First Class (20 - 50 Reputation Level)victorpendleton User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 6 h 31 m 56 sec
Reputation Power: 8
MS Access does not have a procedural language.

Reply With Quote
  #5  
Old June 27th, 2003, 08:15 PM
r937's Avatar
r937 r937 is offline
SQL Consultant
Dev Shed God 25th Plane (17000 - 17499 posts)
 
Join Date: Feb 2003
Location: Toronto Canada
Posts: 17,141 r937 User rank is Lieutenant General (80000 - 90000 Reputation Level)r937 User rank is Lieutenant General (80000 - 90000 Reputation Level)r937 User rank is Lieutenant General (80000 - 90000 Reputation Level)r937 User rank is Lieutenant General (80000 - 90000 Reputation Level)r937 User rank is Lieutenant General (80000 - 90000 Reputation Level)r937 User rank is Lieutenant General (80000 - 90000 Reputation Level)r937 User rank is Lieutenant General (80000 - 90000 Reputation Level)r937 User rank is Lieutenant General (80000 - 90000 Reputation Level)r937 User rank is Lieutenant General (80000 - 90000 Reputation Level)r937 User rank is Lieutenant General (80000 - 90000 Reputation Level)r937 User rank is Lieutenant General (80000 - 90000 Reputation Level)r937 User rank is Lieutenant General (80000 - 90000 Reputation Level)r937 User rank is Lieutenant General (80000 - 90000 Reputation Level)r937 User rank is Lieutenant General (80000 - 90000 Reputation Level)r937 User rank is Lieutenant General (80000 - 90000 Reputation Level) 
Time spent in forums: 1 Month 3 Weeks 4 Days 14 h 4 m 16 sec
Reputation Power: 883
yes, it does -- modules (or is it macros? i dunno, cause i don't use either)

but the sql for access includes the IIF function, which might accomplish what you're trying to do, gothrog

wish i could help you more, but you didn't say what that was...

Reply With Quote
  #6  
Old June 27th, 2003, 10:36 PM
victorpendleton victorpendleton is offline
Contributing User
Dev Shed Regular (2000 - 2499 posts)
 
Join Date: Jan 2003
Location: No es importante
Posts: 2,065 victorpendleton User rank is Private First Class (20 - 50 Reputation Level)victorpendleton User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 6 h 31 m 56 sec
Reputation Power: 8
Okay. MS Access does have modules. But the question was could he write the ifs in the query like PL/SQL or T-SQL. Access does not provide such a feature.

Reply With Quote
  #7  
Old June 28th, 2003, 10:53 AM
ecit12's Avatar
ecit12 ecit12 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2003
Posts: 411 ecit12 User rank is Corporal (100 - 500 Reputation Level)ecit12 User rank is Corporal (100 - 500 Reputation Level)ecit12 User rank is Corporal (100 - 500 Reputation Level)ecit12 User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 2 Days 12 h 42 m 14 sec
Reputation Power: 7
yup.. the iif( ) function works very well as an if else statement and I have used it a lot for my queries on statistical analysis (thanks rudy )

this is how it works

iif (condition, true, false)
iif(fieldName>5.11, tall person, short person)
or
iif(fieldName>0, fieldName, 0)

hope that helps..

Reply With Quote
  #8  
Old July 2nd, 2003, 10:13 AM
gothrog gothrog is offline
Micro Junky
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2002
Location: NJ
Posts: 80 gothrog User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 4 h 6 m 43 sec
Reputation Power: 6
Thank you

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesDatabase Management > Access 2000 functions question


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway