Shortcut to Datasheet View form

  • Thread starter Thread starter omer610
  • Start date Start date
O

omer610

Guest
Hi All,

I'm working iwth MS Access 2000 and need to use a datasheet view form. When I try to make a datasheet view form and open it from the db window, it opens in datasheet view. However when I create a shortcut to this form and open the shortcut, I get a normal data-entry form in "Form-View." I want to give the user a shortcut to the form and also open in datasheet view.

I've tried with even a simple 2 field table and the same thing happens. the relevant form properties, some default, some I changed later are:
Default View: Datasheet
Allow Form View: No
Allow Datasheet view: Yes

I'll appreciate an early response as this is the final part of my application.

Thanks in advance,
Omer.
 
On the form that you want to open the "datasheet form" from put a command button and behind it put the following code:

Code:
DoCmd.OpenForm "Name of your form", acFormDS, , , acFormEdit

If when you say :

I create a shortcut

You have created a command button using the wizard then the code it created should be like this.

Code:
 DoCmd.OpenForm stDocName, , , stLinkCriteria

Change it to this:


Code:
 DoCmd.OpenForm stDocName, acFormDS, stLinkCriteria

The acFormDS makes it open in datasheet mode.


Any further questions, just ask away
 
Eureka

Thanks a lot John. It works. (The form and this forum, since I discovered it after the error and plan to stay for a while - atleast as long as my office folk continue with their in-house small-scale project requests).

Regards,
Omer.
 

Users who are viewing this thread

Back
Top Bottom