View Full Version : simple questions from a simple beginner


sayre
02-15-2005, 07:58 AM
I'm just starting to play with access with the aim of using it with frontpage on website, but rather than following tutorials I was trying it out with a table i would be looking to use online.

My first question is I have two fields with home team & away team in them but I want to do a query that will list both the home and away fixtures for a selected team. So I need to query two fields at the same time, I've used the [Select Team ?] as a criteria in one field but don't know how to do two fields together.

My second questin is can you add drop down menu's for the team selection.

Thanks in Advance

FoFa
02-15-2005, 09:13 AM
Query Question:
Select HomeTeam, AwayTeam
From MyTable
Where (HomeTeam = "MyTeam" OR AwayTeam = "MyTeam")

Usually a drop down would be populated with a query of all the teams, say something like:
Select TeamName from TeamTable group by TeamName order by TeamName

sayre
02-16-2005, 04:36 AM
Sorry FoFa, but could you please run me through it again treating me like an idiot :o .
My table is called fixtures
which has fields date, league, division, home team & away team

I'm using Access 2003 but saving as Access 2000

Thanks again

FoFa
02-16-2005, 06:09 AM
Query Question:
Select F.date, F.league, F.division, F.[HomeTeam], F.[AwayTeam]
From fixtures F
Where (F.[HomeTeam] = "MyTeam" OR F.[Away Team] = "MyTeam")

But you will have replace "MyTeam" with whatever you choose to use.