H Haynesey Registered User. Local time Today, 19:35 Joined Dec 19, 2001 Messages 190 Dec 11, 2009 #1 Hi, I need to have a button on a form that opens either a form in Datasheet View or the table. I can't seem to find the code anywhere? Many thanks in advance. Cheers Lee
Hi, I need to have a button on a form that opens either a form in Datasheet View or the table. I can't seem to find the code anywhere? Many thanks in advance. Cheers Lee
G Galaxiom Super Moderator Staff member Local time Tomorrow, 06:35 Joined Jan 20, 2009 Messages 12,832 Dec 11, 2009 #2 In the DoCmd.OpenForm command include the Datasheet view in the arguments. http://msdn.microsoft.com/en-us/library/aa141520(office.10).aspx If it is already open then test for the property: CurrentView Datasheet view value of CurrentView is 2. If Forms!formname.CurrentView <> 2 Then 'close the form and reopen in Datasheet view.
In the DoCmd.OpenForm command include the Datasheet view in the arguments. http://msdn.microsoft.com/en-us/library/aa141520(office.10).aspx If it is already open then test for the property: CurrentView Datasheet view value of CurrentView is 2. If Forms!formname.CurrentView <> 2 Then 'close the form and reopen in Datasheet view.