Solved Form Issue (1 Viewer)

jdraw

Super Moderator
Staff member
Local time
Today, 14:09
Joined
Jan 23, 2006
Messages
15,379
?? I have a routine to open a form from code. The form has a default type of Datasheet.
This form has a header with buttons for Close and Refresh.
When execute the code, the form opens as single form?
However, if click the form name in the navigation pane it opens as Datasheet --no header nor buttons.

I'd like it to open as datasheet. I could get rid of the buttons.
I have removed the header and buttons for testing, but it still opens single form???

Looking for a solution/work around/example. (Must be missing the obvious)???
 
Last edited:

ebs17

Well-known member
Local time
Today, 20:09
Joined
Feb 7, 2020
Messages
1,949
You mean ...
Code:
DoCmd.OpenForm "frmXYZ", acFormDS, ...
 

Minty

AWF VIP
Local time
Today, 19:09
Joined
Jul 26, 2013
Messages
10,371
I think you have to specify acFormDS in the open form method as the default is acNormal .
 

CJ_London

Super Moderator
Staff member
Local time
Today, 19:09
Joined
Feb 19, 2013
Messages
16,618
you can't show buttons in datasheet view. you would need to use a continuous form

perhaps set the form allow form view property to false as well
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 14:09
Joined
Feb 19, 2002
Messages
43,296
If you want buttons, you need to create an unbound main form and place the ds view form as a subform on the unbound main form.
 

jdraw

Super Moderator
Staff member
Local time
Today, 14:09
Joined
Jan 23, 2006
Messages
15,379
Thanks all. I vaguely recall no buttons on datasheet. Buttons were not necessary.
After a little testing, opening with acFormDS does what I need.
Thanks(y)
 

Users who are viewing this thread

Top Bottom