There's no such thing as a stupid question, but they're the easiest to answer.
JoinTour
Login
 
Tag Cloud
audio avg avg 8 backup bios boot browser bsod computer cpu crash css dell desktop driver drivers dvd email error excel explorer firefox firefox 3 freeze game graphics hard drive hardware hijackthis hjt install internet internet explorer itunes javascript keyboard lan laptop malware missing monitor msn network networking openoffice outlook outlook 2003 outlook express php popups problem router screen seo slow sound sp3 spyware trojan usb video virus vista vundo windows windows vista windows xp winxp wireless word
Business Applications
Search
Search in:
 
Advanced Search
Tech Support Guy Forums > Software & Hardware > Business Applications >
If Formula in Access


HELLO AND WELCOME! Before you can post your question, you'll have to register -- it's completely free! Click here to join today! We highly recommend that you print a copy of our Guide for New Members. Enjoy!

 
Thread Tools
irishgal's Avatar
Junior Member with 14 posts.
 
Join Date: Aug 2007
Experience: Intermediate
08-May-2008, 03:08 PM #1
If Formula in Access
Okay, so I'm a complete beginner to Access and am trying to get it to do something that resembles an if formula.
I have it set so that it's looking for an account number that appears in both tables, but I want it to list it only if the following columns do not equal 402 or 404 or 423:
Code1
Code2
Code3
Code4
I can get it to do it for the 1st column only, because there is always data in that column. If I copy that formula over to each criteria then it will only work if there is data in that column. Any help???
slurpee55's Avatar
Computer Specs
Distinguished Member with 3,270 posts.
 
Join Date: Oct 2004
Location: Southwest Iowa....
Experience: Currently stupid...
08-May-2008, 03:26 PM #2
It would be easier to understand what you are trying to do if you would make a copy of your db (with dummy data), zip it and upload it.
E.g., 402, 404, 423 - are those column sums, values within the columns, or what?
cavemanmac's Avatar
Junior Member with 10 posts.
 
Join Date: Mar 2004
11-May-2008, 11:54 AM #3
It sounds like you are trying to do this in a query. Are you using an IIF() formula? Works the same as an IF() formula in excel, except you can't imbed as many in Access as in excel.
Chris_E's Avatar
Senior Member with 281 posts.
 
Join Date: Feb 2006
Location: Wellingborough, UK
Experience: I have no idea what I don't know - how could I?
13-May-2008, 06:17 PM #4
sounds like a call for nested CASE statements?
slurpee55's Avatar
Computer Specs
Distinguished Member with 3,270 posts.
 
Join Date: Oct 2004
Location: Southwest Iowa....
Experience: Currently stupid...
13-May-2008, 06:46 PM #5
Actually, it sounds like you are trying to do something in Access in a way more fit for Excel. If you could upload a zipped copy of your db (with fake info if needed) we can help you a lot more
OBP's Avatar
OBP OBP is offline
Computer Specs
Distinguished Member with 5,794 posts.
 
Join Date: Mar 2005
Location: UK
Experience: An old Basic Programmer
14-May-2008, 06:48 AM #6
I am also concerned that the data structure is not correct, it is possible that the "Code" fields should be seperate records in a Related table.
slurpee55's Avatar
Computer Specs
Distinguished Member with 3,270 posts.
 
Join Date: Oct 2004
Location: Southwest Iowa....
Experience: Currently stupid...
14-May-2008, 09:56 AM #7
It sounds a bit like the OP is trying to set multiple filters on several fields. If they are all in the same table, that could be very tricky.
Ziggy1's Avatar
Computer Specs
Senior Member with 1,241 posts.
 
Join Date: Jun 2002
Location: Ontario,Canada
Experience: Intermediate
14-May-2008, 10:10 AM #8
I think OBP is suggesting the table is not "normalized"...there should not be 4 columns listed as Code1-4, but rather should eb a single column named Code containing the values 1 to 4 and for each corresponding "acct".

the values ...402 or 404 or 423 would be in another column by itself, so for each code there is one record and if a account code


name Code Acct
joe 1 401
joe 2 403
Steve 4 402
Kelly 1 404
__________________
Ziggy

τΏτ

so! it's a IBM Netvista P4 1.8 Ghz
640 Mb Ram, Nvidia GeForce Fx 5200 128 Mb
Win XP (Home) SP2, Office 2000 Pro
Saitek X-52
Wanna fight about it!!!!
slurpee55's Avatar
Computer Specs
Distinguished Member with 3,270 posts.
 
Join Date: Oct 2004
Location: Southwest Iowa....
Experience: Currently stupid...
14-May-2008, 10:18 AM #9
Hi Ziggy...if we had more info from the OP, we could help more...kinda like shooting arrows in the dark and blindfolded right now.
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
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 On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are Off
Refbacks are Off

You Are Using:
Server ID
Advertisements do not imply our endorsement of that product or service.
All times are GMT -4. The time now is 04:49 PM.
Copyright © 1996 - 2008 TechGuy, Inc. All rights reserved.
Powered by vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Powered by Cermak Technologies, Inc.