Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old April 11th, 2007, 10:25 AM
Authorized User
 
Join Date: Apr 2007
Location: Fort Bliss, Texas, USA.
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
Reply With Quote
  #2 (permalink)  
Old April 11th, 2007, 02:29 PM
Friend of Wrox
Points: 9,611, Level: 42
Points: 9,611, Level: 42 Points: 9,611, Level: 42 Points: 9,611, Level: 42
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Mar 2004
Location: Washington, DC, USA.
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
Reply With Quote
  #3 (permalink)  
Old April 11th, 2007, 02:47 PM
Authorized User
 
Join Date: Apr 2007
Location: Fort Bliss, Texas, USA.
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?

Reply With Quote
  #4 (permalink)  
Old April 12th, 2007, 06:13 AM
Friend of Wrox
Points: 9,611, Level: 42
Points: 9,611, Level: 42 Points: 9,611, Level: 42 Points: 9,611, Level: 42
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Mar 2004
Location: Washington, DC, USA.
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
Reply With Quote
  #5 (permalink)  
Old April 12th, 2007, 07:52 AM
Authorized User
 
Join Date: Apr 2007
Location: Fort Bliss, Texas, USA.
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.

Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 04:39 AM.


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