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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Is there an alternative to multiple

Status
Not open for further replies.

bubbliejock

Technical User
Oct 21, 2003
3
0
0
GB
Is there an alternative to multiple embedded if satements.

I would like to calculate a cost and update the table and form but it depends on the following information:

Room Booked: 3 options Room 1, Room 2 and Room3
Rate: Daily or Hourly
Category: 3 options: Member, discount or Full

I have a seperate table with the room details which includes charges, Daily and Hourly. The other table contains the booking info

Regards



 
You could use the Select Case statement but again your going to have to have one embedded in another. As far as I
know thats the only other alternative.

Mark

The key to immortality is to make a big impression in this life!!
 
you might be able to generate a 'cincatenated' field in table (like a multiple field index) and use that in a single select case statement.



MichaelRed
m.red@att.net

Searching for employment in all the wrong places
 
At what point do you retrieve the RoomRate and CustomerDiscount? Depending on how you're handling those, you could perform your calculations without an If statement.

There are always alternatives. They may be uglier than homemade sin, but...

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top