spinachxyz
Programmer
Hello guys – hope you can help.
I have a form list box “EventList” consisting of 2 columns, Event and DateX populated from the table TT_Times. Event is not unique so I can have two rows with the same Event but different dates. I want to click on one of these and then have displayed in another list box a selection of data. I have the SQL –
strSQL = "SELECT Event, Distance, Datex, Course, Name, Club, Time, Category
FROM TT_Times
WHERE Event ='" & Forms!Times!EventList & "'
ORDER BY Datex DESC, Time;"
and that works fine but of course selects both my rows that have the same Event name but different dates.
How do I bring the date into the selection. I need to do something like –
strSQL = "SELECT Event, Distance, Datex, Course, Name, Club, Time, Category
FROM TT_Times
WHERE Event ='" & Forms!Times!EventList & "' AND Datex ='" & Forms!Times!EventList.?????? & "'
ORDER BY Time;"
but I’ve no idea what the ?????? is/could/should be.
Regards
Phil
I have a form list box “EventList” consisting of 2 columns, Event and DateX populated from the table TT_Times. Event is not unique so I can have two rows with the same Event but different dates. I want to click on one of these and then have displayed in another list box a selection of data. I have the SQL –
strSQL = "SELECT Event, Distance, Datex, Course, Name, Club, Time, Category
FROM TT_Times
WHERE Event ='" & Forms!Times!EventList & "'
ORDER BY Datex DESC, Time;"
and that works fine but of course selects both my rows that have the same Event name but different dates.
How do I bring the date into the selection. I need to do something like –
strSQL = "SELECT Event, Distance, Datex, Course, Name, Club, Time, Category
FROM TT_Times
WHERE Event ='" & Forms!Times!EventList & "' AND Datex ='" & Forms!Times!EventList.?????? & "'
ORDER BY Time;"
but I’ve no idea what the ?????? is/could/should be.
Regards
Phil