Wrox Programmer Forums
|
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 11th, 2007, 10:25 AM
Authorized User
 
Join Date: Apr 2007
Posts: 65
Thanks: 0
Thanked 0 Times in 0 Posts
Default Query issue

As you can see, I'm back to being a novice at Access since I haven't done anything with it since 2000, on Office XP.

However, I'm trying to make queries on this new DB where the user who is logged into the db can query the db for tasks created by a specific user name that they select via a combo box / list box / or a 'yes/no' type field for the user name to be selected.

I'm planning on making this query selection on a form that the user can select after selecting a command button on a switchboard to open the form.

Anyone know how this can be done?

Bryan
 
Old April 11th, 2007, 02:29 PM
Friend of Wrox
 
Join Date: Mar 2004
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default

For example, create your form, and then use the combo box wizard to look up the user field in the table you are basing the query on. This should take the PK for the User, like UserID.

Then in the query based on the look up for, in the criteria line for the UserID field, for example, do this:

[Forms]![frmMyUserForm].[cboUserCombo]

When the query opens it will take the value from the combo box with the user look up by itself.

Did this help?


mmcdonal
 
Old April 11th, 2007, 02:47 PM
Authorized User
 
Join Date: Apr 2007
Posts: 65
Thanks: 0
Thanked 0 Times in 0 Posts
Default

This command, I put it in the 'on click' for the command button named "search" right?

 
Old April 12th, 2007, 06:13 AM
Friend of Wrox
 
Join Date: Mar 2004
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default

The on click event just opens the report. The [Forms]![frmMyUserForm].[cboUserCombo] line should be in the query on the criteria line for the field the user is selecting for.


mmcdonal
 
Old April 12th, 2007, 07:52 AM
Authorized User
 
Join Date: Apr 2007
Posts: 65
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Ok, thanks. Going to try that one this morning. Thanks for the help with my many questions.






Similar Threads
Thread Thread Starter Forum Replies Last Post
Issue with displaying result of the query -JSTL shimmeringtrinkets BOOK: Beginning JavaServer Pages 0 June 24th, 2008 08:31 AM
Query issue jeremy1048 Access 5 June 18th, 2008 04:46 AM
Access and SQL query Issue ayazhoda Access VBA 0 May 16th, 2008 07:54 AM
Append Query issue gherkin Access 3 August 7th, 2006 10:18 AM
Access VBA Delete Query Issue... snoopy92211 Access VBA 4 June 24th, 2004 03:57 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.