G Guest Dec 5, 2004 #1 I placed a command button on a form to close the form. When it is clicked Access closes instead of just the form. Any ideas why? Thanks
I placed a command button on a form to close the form. When it is clicked Access closes instead of just the form. Any ideas why? Thanks
J John Vinson Dec 6, 2004 #2 I placed a command button on a form to close the form. When it is clicked Access closes instead of just the form. Any ideas why? Thanks Click to expand... I'd suggest explicitly closing the form object: Public Sub cmdClose_Click() DoCmd.Close acForm, Me.Name End Sub This uses me.name so that the same code can be used on any form. John W. Vinson[MVP] Join the online Access Chats Tuesday 11am EDT - Thursday 3:30pm EDT http://community.compuserve.com/msdevapps
I placed a command button on a form to close the form. When it is clicked Access closes instead of just the form. Any ideas why? Thanks Click to expand... I'd suggest explicitly closing the form object: Public Sub cmdClose_Click() DoCmd.Close acForm, Me.Name End Sub This uses me.name so that the same code can be used on any form. John W. Vinson[MVP] Join the online Access Chats Tuesday 11am EDT - Thursday 3:30pm EDT http://community.compuserve.com/msdevapps