RE: Export with Conditional Statement
- From: Kipp Woodard <KippWoodard@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 24 Sep 2009 07:46:02 -0700
So, is it correct to say that you are always going to export the same
columns, but sometimes you will force the value of certain columns to Null
base on the value of Refused?
If so, then you will do it collumn-by-column.
In the query designer, the Current_Living column would look like this:
CurLiving: IIF(refused_tx = 1, Null, [current_living])
In this example you are adding a calculated column named CurLiving. The
value of this calculated column will be Null if Refused_tx = 1, otherwise it
will be the value of the actual column named current_living.
"Musa via AccessMonster.com" wrote:
HI,.
The select statement is too long to include in the post, however, here is the
basic principle on which it is based. There are several variables that are
programmed to be manadatory, meaning they must meet certain criteria within
the access database before being exported into an excel file. If they do not
meet these criteria they are still housed within the access database, they
just do not get exported to the external excel file and then sent to me.
I am trying to come up with code that would allow these mandatory variables
to hinge on one variable-Refused. If Refused=1 meaning that someone refuses
to answer any further questions, then the mandatory variables can be null
(meaning no information needs to be entered into them to export) If Refused=0
meaning that someone agrees to answer further questions, then the prior
conditions must be met in order for that file to export. This way I can safe
guard against incomplete data in the export file.
I hope this helps to clear up the confusion, I appreciate you taking the time
to help.
Kipp Woodard wrote:
It is not clear what you are asking.
Can you post the basic Select statement, and then explain how the two output
sets would be different?
Hello,[quoted text clipped - 38 lines]
VBA code ?
I didn't think SQL supported IF THEN ELSE statements in MS ACCESS.
--
Message posted via http://www.accessmonster.com
- References:
- Export with Conditional Statement
- From: Musa via AccessMonster.com
- RE: Export with Conditional Statement
- From: Kipp Woodard
- RE: Export with Conditional Statement
- From: Musa via AccessMonster.com
- Export with Conditional Statement
- Prev by Date: Re: Hiding tables
- Next by Date: DLookup Syntax Error
- Previous by thread: RE: Export with Conditional Statement
- Next by thread: Delete Contents of Date Field
- Index(es):
Relevant Pages
|
Loading