Select records for a particular date

shark70

Registered User.
Local time
Today, 08:49
Joined
Sep 12, 2004
Messages
13
Hi
I am fairly new to Forms so need help please.

The query below shows the fixtures, the current Position and Points of the Teams playing.
I want to set up a form where I can select a future date from a list to bring up all the games for that particular date with all the columns below

Date Hpos Home HomePts Away Apos AwayPts
14/08/2004 10 Tottenham 13 Liverpool 6 16
14/08/2004 18 Norwich 6 C Palace 15 8
14/08/2004 9 Aston Villa 14 Southampton 20 5
15/08/2004 3 Everton 22 Arsenal 1 25
15/08/2004 2 Chelsea 23 Man United 5 17
21/08/2004 5 Man United 17 Norwich 18 6
21/08/2004 12 Charlton 12 Portsmouth 11 12
21/08/2004 14 Birmingham 8 Chelsea 2 23


Cheers
Shark70
 
1 Make a query (Let us say Q_Cbo_Date) from the table.

2.Design a form and create a combo based on this query (Placed on F_Mainform) to select the availble dates.

2. Make another query (Let us say Q_Dateswise_Recs) with all fields you need to appear including date field. And create a form (Let us say F_Dateswise_Recs) based on this query.

3. Now open the F_Mainform in design mode and place your F_Dateswise_Recs as subform.

4. Put the criteria in query Q_Dateswise_Recs as follows:

SELECT Table1.Id, Table1.Date, Table1.Hpos, Table1.Home, Table1.Homepets, Table1.Away, Table1.Apos, Table1.AwayPoints
FROM Table1
WHERE Table1.Date=Forms!F_MainForm!Combo0;

5. On After Update of combo0, put the following code.

Me.F_Dateswise_Recs.Requery

6. Run the F_Mainform.

Regards,
Ashfaque

ps: Attached file for reference.
 

Attachments

Excellent - Thanks Ashfaque, exactly what I'm looking for :D
 

Users who are viewing this thread

Back
Top Bottom