|
-
Mar 20th, 2002, 05:44 PM
#1
Thread Starter
New Member
Goto record detail from datasheet - problem
Another Vba problem
I have created an Access db with a front-end consisting of a number of forms.
One form 'frmRecordDetail' shows a complete record with its 12 fields. Another form 'frmRecordList' contains a subform 'subfrmList' which displays as a datasheet 4 fields from each record. The user is able to sort ascending/descending on any of the 4 fields. What I would like to happen is when a user double clicks on a particular record the form 'frmRecordList' closes and the form 'frm RecordDetail' opens displaying the record that was selected from the datasheet.
I thought the following code would work but all I get is Invalid Outside Procedure error
The code is placed in the dbclick form event for the subform and goes like this.....
Private Sub Form_DblClick(Cancel As Integer)
stFrmName = "FrmDisplayRecord"
stLinkCriteria = "[RefNo]=" & "'" & Me![RefNo] & "'"
DoCmd.Close acForm, "FrmRecordList"
DoCmd.OpenForm stFrmName, , , stLinkCriteria
End Sub
Hope someone can help.....
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|