How to openforms in datasheet view?

Bisleycat2002

New Member
Joined
Sep 17, 2002
Messages
41
I'm a bit of an access novice and I want to open a form in "datasheet view" from my switchboard. I used the wizard to create the switchboard and it insists on opening the form in "form view". I've disabled the "form view" property on the form but this is being overridden by the openform command on the switchboard (I think!) - help please?
 

Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.
Hi

Yes the (wizard) macro behind the button is over-riding the default views that you have set up for the form.

You can change this by doing the following :

Open the switchboard form in design view, Right click on the button you are trying to change -> Properties -> Event -> move down to On Click (where it should have [Event Procedure] -> click on the three dots to the right of the drop down arrow (on the same row).

You should now see the VB code behind the button. Locate the line that says something like :

DoCmd.OpenForm stDocName, , , stLinkCriteria {yours may appear to be slightly different}

and change it to something like this (by inserting the "acFormDS" after the first comma, without the quotes, but keep everything else the same) :

DoCmd.OpenForm stDocName, acFormDS, , stLinkCriteria

Save (the form and module) and close out of Microsoft Visual Basic. This should do the trick.

HTH, Andrew. :)
 
Upvote 0

Forum statistics

Threads
1,221,821
Messages
6,162,157
Members
451,750
Latest member
pnkundalia

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top