Michael R Mattys
mmattys at rochester.rr.com
Thu Jun 9 21:37:58 CDT 2005
----- Original Message ----- From: "Bruen, Bruce" <Bruce.Bruen at railcorp.nsw.gov.au> To: <AccessD at databaseadvisors.com> Sent: Thursday, June 09, 2005 10:25 PM Subject: [AccessD] A2K: How to change subform view Hi guys again, Memory has failed me. In Access 2000, what is the code trick to change the subform view from datasheet to normal? The following 2003 code does not work. Private Sub Test_DblClick(Cancel As Integer) DoCmd.RunCommand acCmdSubformFormView End Sub --------- bruce 'Form to Datasheet (It's a subform) If Me.Customers.Form.CurrentView = 1 Then Me.Customers.SetFocus DoCmd.RunCommand acCmdSubformDatasheet End If 'Datasheet to Form If Me.Customers.Form.CurrentView = 2 Then Me.Customers.SetFocus DoCmd.RunCommand acCmdSubformDatasheet End If ---- Michael R. Mattys Mattys MapLib for Microsoft MapPoint http://www.mattysconsulting.com