Mixing Datasheet Forms and Regular Columnar Forms

  • Thread starter Thread starter CINDY K
  • Start date Start date
C

CINDY K

I have created a form that has different command buttons
to print reports and to open other forms. This basic form
started out blank.

I have a Datasheet form that I want to launch from the
main form, but it will only open in the same type of form
as the basic main form, not Datasheet. I have set what
properties I can find to say Datasheet, but it still opens
only the one way.

I know if I right Click I can open it in the Datasheet
format, however, I have this database opening without any
controls or icons, to prevent others in my department from
accidently changing the database. For me to open the
databse to work on it, I hold down the shift Key to get
all the controls. So I do know why have have this
problem...I think.

Is there a way to change this control so that it will open
in database format under these circumstances? I want to
protect my database, but I do want those using it to be
able to use the Database effect.
 
How are you launching the form? Are you using a command button? If so,
change the code behind your button's click event to read as follows:

DoCmd.OpenForm YourFormName, acFormDS
 
Check the Event Procedure for the button "On click"

change -> DoCmd.OpenForm stDocName, , , stLinkCriteria
to
DoCmd.OpenForm stDocName, acFormDS, , stLinkCriteria

Rajeev
 
Is there a way to change this control so that it will open
in database format under these circumstances?

Sure. The code to open the Report presumably has a line like

DoCmd.OpenForm strDocument

Just add the optional View parameter:

DoCmd.OpenForm strDocument, View:=acFormDS

Open the VBA editor and search Help for "OpenForm Method" for details
of the options.
 
Back
Top