Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Access 2002: need some general advice

Status
Not open for further replies.

baddy

Technical User
Jul 16, 2003
29
0
0
US
Hi all, I have an Access database I use at work and to be honest I am very naive at using this program. All I really use it for is to run queries, since I already know SQL syntax (I don't much care for the query design tool) i just type them by hand. What I would ideally like to do is make a report that would allow the users to choose a date from a dropdown, and then it would basicly show the results from a bunch of queiries for that date in the report with graphs and what not. I'm sure this is a pretty simple thing to do, but I just have no idea where to start.

There are a few fundamental hurdles that I run into. For example, since I want the user to input something (the date), do I need to make a form? From what I understand, forms are just for entering data into the db but I am not sure about that. I went out and bought the Access 2002 Bible, but its a bit heavy (~2000 pages) so I haven't spent too much time in it. Any shoves in the right direction would be really appreciated.
 
There are a few ways to accomplish what you need:

1. Use parameter queries - this means that *EVERY* time the query is opened, it will prompt you for a value for a date. This is the simplest way to do what you need, but does carry limitations in case you need to expand to two, three, or four parameters, or if *some* of them are optional, or you want a better interface than messageboxes, etc.


2. Build a search form to dynamically-build an SQL statement which you then use to open a report or form with. You can use the "Filter" argument when opening a report to pare down the results from the original recordset (i.e. "MY_DATE > #1/1/2003#"). Using the "Filter" property on a form is less effective because the user can disable or change the filter using several means.


3. Do the same as #2, but set the ".RecordSource" property of a form or report to change the entire data source. This way you can limit a form to editing one item only, or show a report that pulls data from different tables, or ... well, you can do a lot. Use the ".OpenArgs" property to pass the recordsource information to forms, and ... well, for reports, there is no truly easy way to do it.


There are examples of search forms here and elsewhere, but I don't know where exactly. Maybe someone will provide a link; I know examples exist.



Anyway, that should get you started.

--
Find common answers using Google Groups:

Corrupt MDBs FAQ
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top