query based on a form

Chimp8471

Registered User.
Local time
Today, 20:26
Joined
Mar 18, 2003
Messages
353
i have a tbl called tblevent which stores :

daycodes, eventcodes, durations of stops etc....

i am trying to generate a report that will identify the total duration by week the amount of downtime that has occurred for each eventcode...

i believe i have done this, but what i want it to do now is for the user to be able to enter the data required on a form then click a button the the database to run the query with just the filtered data being shown.

i know that there are issues with my dates table but i that is the least of my problems at the moment....

for example:

i need to run a report for H6 (line) between week numbers 325 and 352 (this represents year 2003 weeks 25 through to 52) the dates info is stored in the dates table....

i have currently used a crosstab query to generate the query but when i try to reference the form it keeps saying not recognised....

my database example is too big to upload, so i have uploaded it to my webspace,

link is:

http://members.lycos.co.uk/redtilefc/events97.zip

please help
 
Last edited:
This helped me, but it wont help you if you really need to grab the data right from the form. Alls this does is create a variable and then asks the user to enter the criteria based on that varialble.
http://support.microsoft.com/?kbid=209778
Hope this helps.
 
i have tried the link and it sort of explains it but not.....

i am trying to filter using two week numbers so i have tried the following:

between [week number start] and [week nmber end]

i just keep getting a box appear saying that access doesn't recognise my field.
 
If you dont need to directly grab the values from a form, then you should be able to use it (the website above) when you call your query. Under Query -> Parameters put [week num start] then data type should be value. Then put in another parameter under the previous one: [week num end] and data type should be value for that one as well. Then under the Criteria part of your query, you have to put [week num start] and [week num end] in the right position of course (under the variable you are trying to match for that criteria). This might help you, cause it should come up and ask you to enter two values one for [week num start] and the other for [week num end].
 

Users who are viewing this thread

Back
Top Bottom