Help with calculations on query

  • Thread starter Thread starter Teo
  • Start date Start date
T

Teo

i'm having 2 huge issues with this database in access i am making. its' a
boat rental database. and i'm trying to create a query that will calculate
the cost of the database based on the number of days the person had the
boat. so basically i would use the field names of day rented and day
returned. so the difference between those days times the cost of renting the
boat per day. so basically how do i create this calculation in the query.

the other issue i have is when i create a form using wizard, if the field
names are long it just makes the form look messy, is there a way to autosize
all of them so i don't have to fix each and every long field to fit on every
form?

Thanks much in advance,

Teo
 
i'm having 2 huge issues with this database in access i am making. its' a
boat rental database. and i'm trying to create a query that will calculate
the cost of the database based on the number of days the person had the
boat. so basically i would use the field names of day rented and day
returned. so the difference between those days times the cost of renting the
boat per day. so basically how do i create this calculation in the query.

The DateDiff() function is helpful here. You should be able to put a
calculated field in a Query by typing

RentalCost: [DailyCost] * DateDiff("d", [Date Rented], [Date
Returned])
the other issue i have is when i create a form using wizard, if the field
names are long it just makes the form look messy, is there a way to autosize
all of them so i don't have to fix each and every long field to fit on every
form?

well... then don't DO that. Just select the labels generated by the
wizard and change the text in the label to something short but
meaningful to the user. You're not limited to the form design
generated by the wizard; in fact it's often a very generic and blah
design, and useful mainly as a starting point to rearrange textboxes,
change or remove labels, and so on.

Alternatively, you can give each field in your table a Caption
property - this will be used in the wizard's labels instead of the
fieldname; you can put your short meaningful term in the Caption and
leave the fieldname long if you wish.
 
Back
Top