Dmin Function

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a table [TbStandardCB]. This table has 2 fields [RecNo] and [AmpereRating]. This table consist of standard Circiuit Breaker trip rattings. Example: 15,20,25,30,40,50,60,100,200,250,400,45
I'm doing all my calculations in VB. If the Varible "CBAmp" equal 22.1 I want "CBSAmp" to equal 25. If "CBAmp" equal 45 I want "CBSAmp" to equal 50. How can i do this? I will alway need the next higher value listed in table [TbStandardCB].
This is what i have so fa
CBPTAmp = DMin("AmpereRating", "TbStandardCB", "AmpereRating > " & Chr(34) & CBPAmp & Chr(34)
the problem is when CBPamp = 45.1, CBPTAmp = 450. CBPTAmp should equal 50. How can i fix this

Thanks for you hel

Jason Frazer
 
How about

CBPTAmp = dlookup("AmpereRating", "TbStandardCB", "Cint(AmpereRating) > " &
Cint(CBPAmp) )

Ron W


Jason Frazer said:
I have a table [TbStandardCB]. This table has 2 fields [RecNo] and
[AmpereRating]. This table consist of standard Circiuit Breaker trip
rattings. Example: 15,20,25,30,40,50,60,100,200,250,400,450
I'm doing all my calculations in VB. If the Varible "CBAmp" equal 22.1 I
want "CBSAmp" to equal 25. If "CBAmp" equal 45 I want "CBSAmp" to equal 50.
How can i do this? I will alway need the next higher value listed in table
[TbStandardCB].
 
Back
Top