I have a subform with a list of records and I want to set up an operation where a user can double click on one of the records in the subform and open up another form with the details for that specific record.
I have created a Double Click event on the subform which opens the second form, but I can’t make the second form filter and bring up the details for that specific record only. Instead, it brings up the oldest record with a continuous form set up (which I’ve tried to set to ‘single form’ and ‘current record’ but this doesn’t seem to have had much effect). Can you help? Here is my code and property settings:
On the subform I want to double click on I have:
For properties on the form I want opened on double click (i.e. FrmRecordDetails), I have put (on data tab in properties):
Record Source: qryRecordDetails
Recordset Type: Dynaset
Fetch Defaults: Yes
Filter: RecordName=
Filter On Load: Yes
Order By On Load:Yes
Wait for Post Processing: Yes
Data Entry: No
Allow Additions: Yes
Allow Deletions: No
Allow Edits: Yes
Allow Filters: Yes
Record Locks: No Locks
Therefore I want the database to filter on RecordName, which I have listed in the subform.
Can anyone tell me why this is not filtering on the record when the record details form is opened?
I have created a Double Click event on the subform which opens the second form, but I can’t make the second form filter and bring up the details for that specific record only. Instead, it brings up the oldest record with a continuous form set up (which I’ve tried to set to ‘single form’ and ‘current record’ but this doesn’t seem to have had much effect). Can you help? Here is my code and property settings:
On the subform I want to double click on I have:
Code:
[COLOR=#1f497d]Private Sub Form_DblClick(Cancel As Integer)[/COLOR]
[COLOR=#1f497d] [/COLOR]
[COLOR=#1f497d] Dim RecordId As Integer[/COLOR]
[COLOR=#1f497d] [/COLOR]
[COLOR=#1f497d] DoCmd.OpenForm "FrmRecordDetails", acNormal, , , acFormEdit, acWindowNormal, Me.RecordName[/COLOR]
[COLOR=#1f497d] [/COLOR]
[COLOR=#1f497d] Forms("FrmRecordDetails").Requery[/COLOR]
[COLOR=#1f497d]End Sub[/COLOR]
For properties on the form I want opened on double click (i.e. FrmRecordDetails), I have put (on data tab in properties):
Record Source: qryRecordDetails
Recordset Type: Dynaset
Fetch Defaults: Yes
Filter: RecordName=
Filter On Load: Yes
Order By On Load:Yes
Wait for Post Processing: Yes
Data Entry: No
Allow Additions: Yes
Allow Deletions: No
Allow Edits: Yes
Allow Filters: Yes
Record Locks: No Locks
Therefore I want the database to filter on RecordName, which I have listed in the subform.
Can anyone tell me why this is not filtering on the record when the record details form is opened?