• Some users have recently had their accounts hijacked. It seems that the now defunct EVGA forums might have compromised your password there and seems many are using the same PW here. We would suggest you UPDATE YOUR PASSWORD and TURN ON 2FA for your account here to further secure it. None of the compromised accounts had 2FA turned on.
    Once you have enabled 2FA, your account will be updated soon to show a badge, letting other members know that you use 2FA to protect your account. This should be beneficial for everyone that uses FSFT.

MS Access database woes

Joined
Nov 22, 2004
Messages
822
OK to start, this is not homework, this is a favour that I am on and off doing for my boss.

I am doing all this in Access.

I am creating this database for him, the meat and potatoes of this database is 2 tables
table one is called "Employees"
the fields are
Employee ID (PK)
First Name
Last Name
table 2 is called "Production Detail"
the fields are
Employee ID (PK, FK)
Production Date(PK)
Daily Percent

What I am currantly stuck on is creating a report that will show results for production on a daily basis and a weekly basis. I can create reports just fine but I cant figure out how to get the software to ask the user for date to base the reports on. idealy, from the switchboard the user would select "print daily (or weekly) report" and then the user would be asked for some date parameters, this is where I am getting coders block... can someone here help me?

Thanks fellas
 
Are you using some sort of front end program to connect to this access db? VB.NET perhaps?

----- nevermind the above..

In your report or form click on the "more controls" in the toolbox (wrench and hammer with three dots below it).. the go to "calander control 11.0"... It's a drag and drop and run the select statement against the value of that control. Have the default value always be "today" and you should be good to go.
 
The easiest thing is to create a parameter query. This will force Access to prompt the user to answer the parameter when the query is run, which occurs when opening the report.
 
Create a new query that includes all the fields that you need for the report.

Enter the following on the Criteria line of the Production Date field (in query design view)

>=[Enter Start Date] And <=[Enter End Date]

This parameter query will prompt the user with the text in the square brackets and return all dates between, and including, the two parameters that were entered by the user.
 
Brachy said:
>=[Enter Start Date] And <=[Enter End Date]
Alternative syntax would be
Code:
Between [Enter Start Date] And [Enter End Date]
 
Back
Top