-----Original Message-----
If the form is a main form (in other words, not a subform) then you can use
this:
'******EXAMPLE START
Private Sub Form_DblClick(Cancel As Integer)
Const conFormView = 1
Const conDataSheet = 2
If Me.CurrentView = conFormView Then
DoCmd.RunCommand acCmdDatasheetView
ElseIf Me.CurrentView = conDataSheet Then
DoCmd.RunCommand acCmdFormView
End If
End Sub
'******EXAMPLE END
If the form is a subform, then you can use this:
'******EXAMPLE START
Private Sub Form_DblClick(Cancel As Integer)
DoCmd.RunCommand acCmdSubformDatasheet
End Sub
'******EXAMPLE END
--
Bruce M. Thompson
(e-mail address removed) (See the Access FAQ at
http://www.mvps.org/access)
within the newsgroups so that all might benefit.<<
.