Yes
1) get your hotels (field named "hotel"), value = the base rate for that hotel (say 400, 500, 600)
2) get your room rate (field named "rate"), value = the additional for type of bed (say 0, 50, 75, 100)
3) get your # or rooms *field named "qty"), value = the # of nights (say 1 - 7)
<%
BaseRate = Cdbl(request.form("hotel"))
RoomRate = Cdbl(request.form("rate"))
Rooms = CInt(request.form("qty"))
TotalRate = (BaseRate + RoomRate) * Rooms
%
Note:
All values are required, and the Cdbl allows for non-integer values (450.50)
--
_____________________________________________
SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
"Warning - Using the F1 Key will not break anything!" (-;
_____________________________________________
"Wayne-I-M" <(E-Mail Removed)> wrote in message news:B238B525-52CF-4BDC-8371-(E-Mail Removed)...
| Another idea (not sure if its possible in FP like access)
|
| As there are so few options I could have something like
|
| if box A = 1 and box B = 1 and box C = 1 Value = 123
| if box A = 2 and box B = 1 and box C = 1 Value = 456
| if box A = 3 and box B = 1 and box C = 1 Value = 789
| if box A = 1 and box B = 2 and box C = 1 Value = 987
| if box A = 1 and box B = 3 and box C = 1 Value = 654
| if box A = 1 and box B = 4 and box C = 1 Value = 321
|
| etc
| etc
|
| It would take a while to write all the options but it "may" work ??
|
|
| --
| Wayne
| Manchester, England.
|
|
|
| "Stefan B Rusynko" wrote:
|
| > Not something you can do with webots
| > You will need a server side script/form that
| > a) collects the data in a form and sends it to a server side script page
| > b) looks up in the database the prices associated with the form field values and calculates a result
| >
| > So in the example you cite, send.asp need to be modified, where it has
| > <%
| > x = request("filedname") 'get your form field values
| > 'add code here to open your database and look up costs base on the value above
| > t = c*n 'calculate costs
| > %>
| > --
| >
| > _____________________________________________
| > SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
| > "Warning - Using the F1 Key will not break anything!" (-;
| > _____________________________________________
| >
| >
| > "Wayne-I-M" <(E-Mail Removed)> wrote in message news:5F5E3FF1-CF4C-44EC-BF53-(E-Mail Removed)...
| > | Hi
| > |
| > | I have a very simple access query that works out the cost of a holiday.
| > |
| > | The questions are:
| > | Name of hotel (there are only 3)
| > | In each hotel there are 4 possible room types - twin, double, triple, quad
| > | (each room type in each hotel is a different cost)
| > |
| > | The query simply asks
| > | Which hotel do you want
| > | How many twins do you want
| > | How many doubles do you want
| > | How many tripples do you want
| > | How many quads do you want
| > |
| > | Does anyone have a link to a page that gives a step by step guide to how to
| > | get this type of thing on to a FP webform.
| > |
| > | EG.
| > | Dropdown - Name of hotel
| > | Dropdown - Room type
| > | Dropdown - How many rooms
| > | Answer - text box
| > |
| > | This is my 1st attempt to allow users to input to a form and get a
| > | calculated result. So easy answer would be helpfull
| > |
| > | Thank you
| > |
| > | I have looked at
| > |
http://support.microsoft.com/?scid=k...id=919&sid=229
| > | which does not give enough options - so I though it would be better to use
| > | an access query (stick to what you know).
| > |
| > |
| > |
| > | --
| > | Wayne
| > | Manchester, England.
| > |
| >
| >
| >