G
Guest
I have a rather complex series of calculations I have to do on a field in a
query for a silent auction. For instance:
To calc the new field StartBid:
If [Value] is 0 to 50 then multilpy by 0.2
If [Value] is 51 to 100 then multiply by 0.25
If [Value] is greater than 100 then multiply by 0.3
etc.
In addition to this criteria, I would like the result of any thing with
[Value] greater than 50 to be rounded to the nearest 5.
My next calculation is for a new field BidIncrement:
This I need to be:
If [StartBid] is less than 50 then multiply by 0.2 and round to nearest
interger
If [StartBid is 51 to 100 then multiply by 0.25 and round to nearest interger
etc.
In addition, I need any result with a value greater than 50 to be rounded to
the nearest 5.
I'm fairly new to VB, I think I could work this out in a proc with Select
Case, but how do I accomplish this in a Query?
TIA,
Sandra G
query for a silent auction. For instance:
To calc the new field StartBid:
If [Value] is 0 to 50 then multilpy by 0.2
If [Value] is 51 to 100 then multiply by 0.25
If [Value] is greater than 100 then multiply by 0.3
etc.
In addition to this criteria, I would like the result of any thing with
[Value] greater than 50 to be rounded to the nearest 5.
My next calculation is for a new field BidIncrement:
This I need to be:
If [StartBid] is less than 50 then multiply by 0.2 and round to nearest
interger
If [StartBid is 51 to 100 then multiply by 0.25 and round to nearest interger
etc.
In addition, I need any result with a value greater than 50 to be rounded to
the nearest 5.
I'm fairly new to VB, I think I could work this out in a proc with Select
Case, but how do I accomplish this in a Query?
TIA,
Sandra G