K
knowshowrosegrows
I have a simple form where I use a combo box list to choose a record and then
it displays in the form. I want the form and the drop down to be blank when
I open the form. Right now, the drop down shows the first record in the
query that the form uses.
That query is as follows
SELECT tblAgencyShortened.PROV_ID, tblAgencyShortened.Agency, tblType.Type,
tblStaff.StaffName, tblEvents.Event_ID, tblEvents.Reg, tblEvents.Agency_ID,
tblEvents.EventDate, tblEvents.StartTime, tblEvents.Type_ID,
tblEvents.Staff_ID, tblEvents.Notes, tblEvents.EventDescription,
tblEvents.ReportSubmitted
FROM tblType INNER JOIN (tblAgencyShortened INNER JOIN (tblStaff INNER JOIN
tblEvents ON tblStaff.Staff_ID=tblEvents.Staff_ID) ON
tblAgencyShortened.PROV_ID=tblEvents.Agency_ID) ON
tblType.Type_ID=tblEvents.Type_ID;
The code behind the combo box is as follows
Private Sub cmbChooseRecord_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[Event_ID] = " & Str(Nz(Me![cmbChooseRecord], 0))
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
End Sub
Does anyone have a suggestion?
it displays in the form. I want the form and the drop down to be blank when
I open the form. Right now, the drop down shows the first record in the
query that the form uses.
That query is as follows
SELECT tblAgencyShortened.PROV_ID, tblAgencyShortened.Agency, tblType.Type,
tblStaff.StaffName, tblEvents.Event_ID, tblEvents.Reg, tblEvents.Agency_ID,
tblEvents.EventDate, tblEvents.StartTime, tblEvents.Type_ID,
tblEvents.Staff_ID, tblEvents.Notes, tblEvents.EventDescription,
tblEvents.ReportSubmitted
FROM tblType INNER JOIN (tblAgencyShortened INNER JOIN (tblStaff INNER JOIN
tblEvents ON tblStaff.Staff_ID=tblEvents.Staff_ID) ON
tblAgencyShortened.PROV_ID=tblEvents.Agency_ID) ON
tblType.Type_ID=tblEvents.Type_ID;
The code behind the combo box is as follows
Private Sub cmbChooseRecord_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[Event_ID] = " & Str(Nz(Me![cmbChooseRecord], 0))
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
End Sub
Does anyone have a suggestion?