A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

"Find Unmatched Query" help for Football pool



 
 
Thread Tools Display Modes
  #1  
Old September 10th, 2005, 01:50 PM
Lucky Louie
external usenet poster
 
Posts: n/a
Default "Find Unmatched Query" help for Football pool

Quick background...2 tables. 1 with all user information including Week1,
week2, week3 etc. (up to week 17). Every week, i have to enter a value into
that specific week #, but I cannot use the same team twice throughout the 17
week period. The teams come from another table, using a dropdown list (there
are 32 teams in table 2).
I am trying to get a query that only shows the teams (from table 2) that I
haven't already used.
Any help is greatly appreciated. (go dolphins!)
Ads
  #2  
Old September 12th, 2005, 08:05 PM
Michel Walsh
external usenet poster
 
Posts: n/a
Default

Hi,


Change the table design into:

UserID, WeekNumber, TeamID (fields Name)


instead of

UserID, Week1, Week2, ..., Week17



and build an index, unique, over the couple UserID and TeamID. That would
forbid a UserID to select the same team twice.

Since the "lookup" are evaluated when you open the table, there is no
practical way to get the team "not used for a given user", DYNAMICALLY,
unless you use a form for that, and evaluate the combo box RowSource
appropriately, in the GotFocus event, as example:


Me.ComboBox.RowSource="SELECT team FROM allTeams WHERE team NOT
IN( SELECT team FROM UsersSelections WHERE User=" & Me.User & ")"


where allTeams is a table listing all the possible teams, and
UsersSelections the table I suggested at the beginning.



Hoping it may help,
Vanderghast, Access MVP


"Lucky Louie" wrote in message
...
Quick background...2 tables. 1 with all user information including Week1,
week2, week3 etc. (up to week 17). Every week, i have to enter a value
into
that specific week #, but I cannot use the same team twice throughout the
17
week period. The teams come from another table, using a dropdown list
(there
are 32 teams in table 2).
I am trying to get a query that only shows the teams (from table 2) that I
haven't already used.
Any help is greatly appreciated. (go dolphins!)



 




Thread Tools
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

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Toolbars, Drop-Down Menus Rick New Users 1 September 21st, 2005 11:17 AM
Unmatched Query Mess Natalia Running & Setting Up Queries 8 October 28th, 2004 02:36 PM
Here's a shocker Mike Labosh General Discussion 2 October 26th, 2004 05:04 PM
Unmatched Query Natalia Running & Setting Up Queries 11 October 21st, 2004 12:00 AM
Display Parameter from Form on Report sara Setting Up & Running Reports 10 July 19th, 2004 04:54 PM


All times are GMT +1. The time now is 01:43 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
Copyright 2004-2018 OfficeFrustration.
The comments are property of their posters.