Access 2003 defaulting to form view when asked to show datasheet

Lightwave

Ad astra
Local time
Today, 06:16
Joined
Sep 27, 2004
Messages
1,536
Not a massive problem I can get a work around to it but I thought I'd post it as it feels like an eccentricity.

Created a form using the wizard in Access 2003 as datasheet view. And when I open it up straight its fine... I've turned off allow form view in the properties however when I open the form using a command button from another form it continually defaults to form view rather than datasheet view.

Is this a problem anyone else has experienced. When I open up the form straight without using a command button its fine. Its just when I use the command button...

Command button seems to be overiding the form settings
 
Last edited:
I found that, recently. I don't normally use datasheets, but I did for this, and i found I had to use

docmd.openform "someform", acformDS

otherwise it opened as a single form. (I might have the syntax/constant wrong - but its the same observation you made)
 
Thanks guys that sorted it...

Openform VB defaults to acNormal and overides any property settings in the form design. Thus it is necessary to explicitly state acFormDS within the OpenForm VBA to make it return the datasheet view.

Interestingly originally the Openform command didn't have the acformview specifically defined as acNormal... It appears that if it is not defined it defaults to acNormal - fine ordinarily but deceptive if you are trying for the datasheet view.
 
Last edited:
Hi

Just thought I would add that I created an -Open Form- Macro which caused the same problem. I'm not familiar with working on Macros so I converted my macros to VBA and sure enough it was the acNormal that was the problem
 

Users who are viewing this thread

Back
Top Bottom