Ok,
I have a database, 3 tables, tblEvents, tblPeople, tblPeopleAtEvents(Junction)
I want to have a form where I pick the person
Using the following Row Source (This just lets me see the first name and last name vs PersonID).
SELECT [tblPeople].[PersonID], tblPeople.[Last_Name], tblPeople.[First_Name] FROM tblPeople;
I then want 2 text boxes to select the date ranges...
FDate and EDate
Then I want to click a button, which passes onto a REPORT the PersonID.... then pull the events on the dates between the 2 dates passed...
I got the date range to work, but I can't seem to get the date range and the Person ID to work.... So it just pulls all events from that date range.. and not from a specific Person.
My current buttons code... I seem to think that I somehow need to put Person ID in the whereCondition... but don't know how to .
I have a database, 3 tables, tblEvents, tblPeople, tblPeopleAtEvents(Junction)
I want to have a form where I pick the person
Using the following Row Source (This just lets me see the first name and last name vs PersonID).
SELECT [tblPeople].[PersonID], tblPeople.[Last_Name], tblPeople.[First_Name] FROM tblPeople;
I then want 2 text boxes to select the date ranges...
FDate and EDate
Then I want to click a button, which passes onto a REPORT the PersonID.... then pull the events on the dates between the 2 dates passed...
I got the date range to work, but I can't seem to get the date range and the Person ID to work.... So it just pulls all events from that date range.. and not from a specific Person.
Code:
Private Sub btnOpen_Click()
On Error GoTo btnOpen_Click_Err
DoCmd.OpenReport "tblEvents Query", acViewReport, "", "", acNormal
btnOpen_Click_Exit:
Exit Sub
btnOpen_Click_Err:
MsgBox Error$
Resume btnOpen_Click_Exit
End Sub
My current buttons code... I seem to think that I somehow need to put Person ID in the whereCondition... but don't know how to .