Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ACCESS 2003 APPEND A PASS OR FAIL BASED ON NUMBERS BETWEEN A RANGE

Status
Not open for further replies.
Apr 21, 2008
3
US
I have 4 different intake valve numbers 1 2 3 4 each are associated with unique low specs and high specs

and 4 different exhaust valve numbers 1 2 3 4 also with unique low and high valves

and no matter what valves they use In-1 and Ex-3 I want the below formula to apply.


Intake valves are values 1,2,5,6,9,10,13,14

Exhaust valves are values 3,4,7,8,11,12,15,16


Take the valve number and compare results of IN-1,2,5,6,9,10,13,14 TAG PASS OR FAIL

Then take the valve number and compare results of EX-3,4,7,8,11,12,15,16 TAG PASS OR FAIL
 
How are ya n1coltsfan . . .

An example, copy/paste to the code module of the form and call as you like:
Code:
[blue]Public Sub ValveCheck(inValve As Integer, exValve As Integer)
   Dim Dat As String
   
   Dat = "01-02-05-06-09-10-13-14"

   If InStr(1, Dat, Format(CStr(inValve), "00")) > 0 Then
      Me!InTag = "Pass"
   Else
      Me!InTag = "Fail"
   End If
   
   Dat = "03-04-07-08-11-12-15-16 "
   
   If InStr(1, Dat, Format(CStr(exValve), "00")) > 0 Then
      Me!ExTag = "Pass"
   Else
      Me!ExTag = "Fail"
   End If

End Sub[/blue]
[blue]Your Thoughts? . . .[/blue]

BTW: Welcome to [blue]Tek-Tips![/blue] [thumbsup2] Do have a look at one of the links at the bottom of my post. The links will help you [blue]ask better questions[/blue], get [blue]quick responses[/blue], [blue]better answers[/blue], and insite into [blue]etiquette[/blue] here in the forums. Again . . . Welcome to [blue]Tek-Tips![/blue] [thumbsup2]

Calvin.gif
See Ya! . . . . . .

Be sure to see thread181-473997
Also faq181-2886
 
I really don't have a clue what your requirements are, or what the question is.

n1coltsfan said:
and no matter what valves they use In-1 and Ex-3 I want the below formula to apply.

What formula? I only see a series of numbers. A formula is something like:

X + Y = Z

n1coltsfan said:
Take the valve number and compare results of IN-1,2,5,6,9,10,13,14 TAG PASS OR FAIL

So if the valve number is one of those in the series, return value is PASS, otherwise it is FAIL?

If Aceman's interpretation is not correct, I think you will need to more carefully explain the logic. Assume we know nothing about your business or what you need to accomplish.

 
This works on a sigle field,

IIf([Valve seat depth1]<[low specs] Or [Valve seat depth1]>[High Specs],"Fail","Pass")




This is what I want but it doesnt work,


Expr1: IIf[Valve seat depth1!Valve seat depth2!Valve seat depth5!Valve seat depth6!Valve seat depth9!Valve seat depth10!Valve seat depth11!Valve seat depth12!Valve seat depth15!Valve seat depth16]<[low specs] Or >[High Specs],"Fail","Pass"

What am I doing wrong...
 
n1coltsfan . . .

From a programming basis, your latest post [blue]11 Jul 08 14:01[/blue] doesn't compare with your post origination. There's no parallel, no connection (that I can see), to [blue]Intake/Exhaust Valves[/blue] presented in your post origination. In fact, you latest post as far as valves are concerned only speaks of [blue][Valve seat depth[purple]X[/purple]][/blue] fields. For me, this leaves the entire thread [blue]ambiguous[/blue] in its present state, and most likely resolution will be the same. I do see a path thats possible, but ... who knows! [surprise]

[ol][li]Give examples of [blue][low specs][/blue] and [blue][High Specs][/blue] as they appear in the table![/li]
[li]Post the SQL of the query where the custom field you presented goes.[/li]
[li]Post the TableName.[/li]
[li]Explain some connection between [blue]Intake/Exhaust Valves[/blue] and [blue][Valve seat depth[purple]X[/purple]][/blue][/li][/ol]
How far we can go depends on your answers [surprise]

[blue]Your Thoughts? . . .[/blue]

BTW: Welcome to [blue]Tek-Tips![/blue] [thumbsup2] Do have a look at one of the links at the bottom of my post. The links will help you [blue]ask better questions[/blue], get [blue]quick responses[/blue], [blue]better answers[/blue], and insite into [blue]etiquette[/blue] here in the forums. Again . . . Welcome to [blue]Tek-Tips![/blue] [thumbsup2]

Calvin.gif
See Ya! . . . . . .

Be sure to see thread181-473997
Also faq181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top