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!

Expression within forms

Status
Not open for further replies.

Jphillis

Technical User
Jun 27, 2001
19
0
0
GB
I have an SQL server database which is linked to Access via ODBC link. It is based on a fantasy football system.
The problem i am having is one to do with validation. On an Access form I have 2 combo boxes. one containing a Home team, the other containing an Away team.
At present a HOME team can play against it's self, the AWAY team.

I want to make sure that one football team cannot be select in both the Home and Away combo boxes at the same time.

Any ideas would be greatfully received.
 
You have to make a Filter. One of many ways you can do this is the next:
In the Row Source of each Combo_Box you click in the Button with three dots placed on the right. Once in the SQL Statement:Query Builder, drag the field (e.g.: Team Name) from the Table you are Querying (this is the TEAMS Table) to the last place. Turn off the Show Property, and in the Criteria Property, put the name of the field of the other Combo_Box....this means that if you are Modifying the Home Team, put: ![Away Team]. With this you are showing all the Teams that not be in the other Combo_Box.

Good Luck
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top