AND IF formula in Access

S

sadkadir

I'm trying to do this formula in access and havin ghard time, can
anyone help me please?

IF[dbo.NTH_ACTIVITY_DEFINITION].ACTIVITY_DEF_DID=[dbo.NTH_ACTIVITY_DEFINITION].ACTIVITY_DEF_DID
AND
[dbo_NTH_RPT_CONTROLS].CONTROLS_DID=[dbo_NTH_RPT_CONTROLS].CONTROLS_DID
AND
[dbo_NTH_RPT_CTRL_TESTINGS].STEP_INSTANCE_ID not equal to
[dbo_NTH_RPT_CTRL_TESTINGS].STEP_INSTANCE_ID) then
Take to lower [dbo_NTH_RPT_CTRL_TESTINGS].STEP_INSTANCE_ID, otherwise
[dbo_NTH_RPT_CTRL_TESTINGS].STEP_INSTANCE_ID)
 
J

Jeff Boyce

What does "Take to lower" mean? I don't recognize that as part of normal
syntax for the If ... Then ... Else function.

Where are you trying to do this formula? As part of code-behind-a-form? As
part of a query?

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
S

sadkadir

Jeff,

I'm trying to build this in a query as a expression and by saying 'Take
it lower' I meant to catch the first step instance only.
Jeff said:
What does "Take to lower" mean? I don't recognize that as part of normal
syntax for the If ... Then ... Else function.

Where are you trying to do this formula? As part of code-behind-a-form? As
part of a query?

Regards

Jeff Boyce
Microsoft Office/Access MVP


I'm trying to do this formula in access and havin ghard time, can
anyone help me please?

IF[dbo.NTH_ACTIVITY_DEFINITION].ACTIVITY_DEF_DID=[dbo.NTH_ACTIVITY_DEFINITION].ACTIVITY_DEF_DID
AND
[dbo_NTH_RPT_CONTROLS].CONTROLS_DID=[dbo_NTH_RPT_CONTROLS].CONTROLS_DID
AND
[dbo_NTH_RPT_CTRL_TESTINGS].STEP_INSTANCE_ID not equal to
[dbo_NTH_RPT_CTRL_TESTINGS].STEP_INSTANCE_ID) then
Take to lower [dbo_NTH_RPT_CTRL_TESTINGS].STEP_INSTANCE_ID, otherwise
[dbo_NTH_RPT_CTRL_TESTINGS].STEP_INSTANCE_ID)
 
J

Jeff Boyce

See comments in-line below...

Jeff,

I'm trying to build this in a query as a expression and by saying 'Take
it lower' I meant to catch the first step instance only.

First, you'll need to use Access HELP to look up the proper syntax for using
the function.

Next, if you are trying this in a query, you need to use the IIF() function,
not the If/Then/Else function.

And since we aren't there, and aren't as familiar with your data as you are,
"catch the first step instance" doesn't make a lot of sense. Can you
provide a bit more context for us?

It would probably help if you provided an example, using real data.

Regards

Jeff Boyce
Microsoft Office/Access MVP

Jeff said:
What does "Take to lower" mean? I don't recognize that as part of normal
syntax for the If ... Then ... Else function.

Where are you trying to do this formula? As part of code-behind-a-form?
As
part of a query?

Regards

Jeff Boyce
Microsoft Office/Access MVP


I'm trying to do this formula in access and havin ghard time, can
anyone help me please?

IF[dbo.NTH_ACTIVITY_DEFINITION].ACTIVITY_DEF_DID=[dbo.NTH_ACTIVITY_DEFINITION].ACTIVITY_DEF_DID
AND
[dbo_NTH_RPT_CONTROLS].CONTROLS_DID=[dbo_NTH_RPT_CONTROLS].CONTROLS_DID
AND
[dbo_NTH_RPT_CTRL_TESTINGS].STEP_INSTANCE_ID not equal to
[dbo_NTH_RPT_CTRL_TESTINGS].STEP_INSTANCE_ID) then
Take to lower [dbo_NTH_RPT_CTRL_TESTINGS].STEP_INSTANCE_ID, otherwise
[dbo_NTH_RPT_CTRL_TESTINGS].STEP_INSTANCE_ID)
 
Top