AND IF formula in Access

  • Thread starter Thread starter sadkadir
  • Start date Start date
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)
 
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
 
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)
 
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)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top