still, there is still something wrong. i do not know how upload .mdb file.
anyway, there are two tables:
Person_Info table:
name text
age Number
Height Number
exme date date/time
score number
TrackByID table:
PID Number
name text
age number
height number
date date/time
this is my query:
Query1:
SELECT TrackByID.PID, Person_Info.name, Person_Info.Age, Person_Info.Height,
Person_Info.[Exam Date], Person_Info.Score FROM TrackByID INNER JOIN
Person_Info ON (TrackByID.name = Person_Info.name) AND (TrackByID.Age =
Person_Info.Age) AND
(TrackByID.Height = Person_Info.Height) GROUP BY TrackByID.PID, Person_Info.
name, Person_Info.Age, Person_Info.Height, Person_Info.[Exam Date],
Person_Info.Score
HAVING (((Person_Info.[Exam Date])=Date()));
created sub form , subfrm_Query1.
parent form: there are unbound text box, "date", on parent form and a click
on button.
parent is linked to sub form, subfrm_Query1.
Option Compare Database
Private Sub Command0_Click()
Dim strsql As String
strsql = "SELECT TrackByID.PID, Person_Info.name, Person_Info.Age, " & _
"Person_Info.Height, Person_Info.[Exam Date], Person_Info.
Score " & _
"FROM TrackByID INNER JOIN Person_Info ON (TrackByID.Height
= " & _
"Person_Info.Height) AND (TrackByID.Age = Person_Info.Age)
AND " & _
"(TrackByID.name = Person_Info.name) GROUP BY TrackByID.PID,
" & _
"Person_Info.name, Person_Info.Age, Person_Info.Height, " &
_
"Person_Info.[Exam Date], Person_Info.Score " & _
"HAVING (Person_Info.[Exam Date]<= #" & Format(Me![date],
"mm/dd/yyyy") & "#);"
Me.subfrm_Query1.Form.RecordSource = strsql
Me.subfrm_Query1.Requery
End Sub
that is it. nothing else to it.
when i open subform by itself, i see no record. but, i open parent form i see
old records displayed.
you can duplicate it using these info.
i think i figure it out. for now seems to be working. your replies inspired
me.
[quoted text clipped - 9 lines]