trouble with query - multiplying and dates

horsecow

Registered User.
Local time
Today, 21:26
Joined
Nov 28, 2002
Messages
16
hello,

I am having some serious problems with the most basic aspects of creating a query.

I am trying to do the following:

Take a date entered in the database already (Date of Hire)

Then take Length of Hire (number) and Length of Hire (Week/Month) and times them together. (Lengh of Hire (week/Month) is either a 1, 7 or 30 soeneding on their choice, and Length of hire (number) is how many weeks/months/days they want it for).

Then Add the total of the length of hires fields to the Date of Hire to give a new date (the end date).

Then if the current date is greater than the date of hire and less than the end date then the product is out of stock.


It is infact not the last bit i am having trouble with bt the second part. Multiplying the two fields in the query. Im using the same formula i used for a report which worked fine there, but in the query it just doesnt work. the formula is:

=[Length of Hire (Number)]*[Length of Hire (Week/Month)]

Anyone know why this wont work?



Also, using the date function. Will i be able to add on, for example, 10 days to the date 30/09/2003 and get returned the date 10/10/2003 or will it go to 40/09/2003?


thanks

PS: i know im asking alot of questions recently - i think i have a solution but i dont and then i have to start all over again. Cheers.
 
Lookup the DateAdd() function and the IIf() function in the help files and post back if you need further direction.
 
ok, will do.
cheers
 
Last edited:

Users who are viewing this thread

Back
Top Bottom