Datasheet form not opening as Datasheet...

memilanuk

Registered User.
Local time
Today, 00:41
Joined
Apr 8, 2009
Messages
33
... when opened from the Switchboard. Opening it directly from the Navigation pane works as expected (it opens as a Datasheet). If I try opening it from the Switchboard, it opens in the Form view, even though form view and layout view are turned off in the properties. As soon as I select 'Datasheet' view, either by right-clicking on the tab or using the buttons down in the lower right of the status bar... it displays as expected.

TIA,

Monte
 
That is because the switchboard only uses
docmd.OpenForm "YourForm"

Which by default opens the form in "normal" view... If you want to force the datasheet view the switchboard will have to be modified to use:
docmd.OpenForm "YourForm",acFormDS
 
And how/where do I find that and make that edit...?

Thanks,

Monte
 
The default switchboard dont allow for this, so you have to go into the form coding and find where it does "Docmd.OpenForm" and adjust the default form thusly that it will send that command if you tell it to...

This then requires some tinkering with both code and the switchboard table, I have not gone and tried it... but doesnt seem undoable.
 
I guess what I'm trying to say is I don't know *any* VBA. So 'go into the form coding and look' doesn't get me very far...

If I open up the VBA IDE, I see 'acwzmain', 'acwztool', 'database1' (what I'm working with), and 'utility'. 'database1' is completely empty - no drop down, no nothing. So I really don't have any idea where to even start looking.

Thanks,

Monte
 
Well, I got a little further on the VBA code... opened the Switchboard form in Design mode, found the button on the Ribbon that said 'View Code'... still can't find anything like 'doCmd.OpenForm'. This is the part of VBA that just baffles me... finding what property is squirreled away behind what dropdown, etc.

I found some other threads here that indicated that the same effect could be achieved by using macros... so I made my first macro to open the form in datasheet mode. Works perfectly.

Monte
 
You could then instead call the macro to open the form instead of actually opening the form, its not the best solution, but it works.
 

Users who are viewing this thread

Back
Top Bottom