Shortcut to Datasheet View form (1 Viewer)

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.
 

ansentry

Access amateur
Local time
Tomorrow, 03:31
Joined
Jun 1, 2003
Messages
995
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
 
O

omer610

Guest
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

Top Bottom