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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Access 2003 - Query Form?

Status
Not open for further replies.

ArleneM

Technical User
Jul 27, 2008
5
US
I want to build a form (may not be the right item) that will ask me for a response, which feeds the response into an existing query and then produces the results of the query.

For example, the form will ask me to provide a department number. Once I do that, the query will provide information only on the employees in that department. A query is already set up for what information I want and from where...I just don't know how to set up the form to input the department number instead of having to modify my query every time. I want the results to feed into a report - which is also already set up...but I might have to set up a new one for this??

Any ideas?

Thanx for any help you can provide.
Arlene
 
Should post in:
Microsoft: Access Queries and JET SQL

Sounds like you're new at Access. Warning - you can not learn Access on your own. You should take some courses and spend alot of time with the fundamentals, such as normalization. Your tables must be normalized. Alot of time means months.

You could have a form with a combobox showing the department number. Then on the AfterUpdate event of the combobox, you'd run your report which will be based on your query.
In the query, on the criteria line under DepartNo. you'd have
Forms![TheFormName]![TheComboboxName]

Again, though, this is very basic and when you go to the 7 or so Access forums, we'll expect you know how to do this.
 
One thought: If you aren't looking for a "pretty" approach, you can just set up the query to prompt you for the response with an Input box. Seems I can't remember how off the top of my head at the moment, but it is very simple and easy. There'd be enough info in the Access help file on that for sure.

I'm only saying this, b/c if you already have the query, and you just need it to "work", then you can run the query, let it prompt for the input, and then see the results...

Now I've got to go and play around to see how to do the input box again. Usually, when it HAS worked for me, it was on accident - I didn't WANT it to be that way. LOL

--

"If to err is human, then I must be some kind of human!" -Me
 
Okay, tinkered around, here's the how:

In your query, in the field you're wanting to limit by whatever criteria, put this in the criteria blank:

Code:
[[i]What is the value?[/i]:]

Enter it just like I did, but you can change the italics section.



--

"If to err is human, then I must be some kind of human!" -Me
 
But yeah, this really should have been in one of these forums:

forum702

or

forum701

or

forum181

Oh, and by the way, if you are looking for some decent introductory level training on Access, Learn2.com has some good stuff, I think. When I was actually starting to really use Access and Excel at work, I had almost totally forgotten what I "learned" in college. So, we happened to have a thing setup at work to take Learn2 courses. I went through everything we had access to for Excel and Access, and even at least a couple for Word.

You'd be surprised at how much you can learn from the things. But then again, they aren't free. So if you have to pay for it, and don't have a few extra hundred to pay for all of them, then you might want to just Google for some. And on that thought, Microsoft actually has some pretty decent tutorials for at least some products on their support site(s).

--

"If to err is human, then I must be some kind of human!" -Me
 
Thank you, everyone, for your replies.

I don't wish to spend alot of time learning Access because I only need it temporarily for a school project. I know that sounds weird, but I'm building one database as my last project for my degree, and then plan to stay away from databases forever. :) So...anything I can find online is a good thing. Very good advice, though!

Again, thanx for responding to my questions...sorry I posted in the wrong forum.

Arlene
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top