Problem with acDialog

Skip Bisconer

Who Me?
Local time
Today, 10:50
Joined
Jan 22, 2008
Messages
285
The properties of the opening form are set the following way but it continues to open in single form view. I need it to open in datasheet view. If I open the as a stand alone it opens in Datasheet View. Can someone point out my error?
Property set as:
Popup Yes, Modal Yes
Default View Datasheet, Allow Form View No, Allow Datasheet View Yes

Private Sub Command23_Click()
On Error GoTo Err_Command23_Click
Me.Visible = False
MinimizeMainForm
DoCmd.OpenForm "frmViewAssignedOrdersProgress", , , , , acDialog " I have tried setting the acNormalVeiw" but it didn't work either.
Me.Visible = TrueExit_Command23_Click:
Exit Sub
Err_Command23_Click:
MsgBox Err.Description
Resume Exit_Command23_Click
 
Try:
DoCmd.OpenForm "frmViewAssignedOrdersProgress", acFormDS, , , , acDialog

...the default for the View argument is acNormal which overrides any settings in the form and opens the form in Single Form View.
 
I hope this isn't a double post.

Thanks again RG,
I have one other quetion. What is the quick and dirty explanation between the On Open event and the On Load?
 
The Open event can be canceled but you can not refer to form controls yet. You can however see how many records are in the RecordSource of the form. The OnLoad event can not be canceled but you can reference controls on the form. If you key in "events" to Access help, not VBA help, there is a good explaination for each event in the system.
 
Any time. Forums and a couple of books are where I learned *all* of my Access.
 
Indeed although it doesn't cite as much in the help - you can think of the Load event as that which occurs as the data is loaded into the form.
The paradox with that concept is that the event is *still* fired even when you're using an unbound form. ;-)

However if you set the data source of the form in the Open event - you'll actually see the Load event be raised from the action within the Open event as the new source is assigned.
e.g.
Open Event Procedure beings
Data assigned
Load event raised
Load event completes
Open event completes

So the analogy does stand up well.
 
Leigh Purvis,
Welcome to the Access World Forums. It is great to see you here. The level of answers just went up several notches. The others will understand soon.
 
Leigh Purvis,
Welcome to the Access World Forums. It is great to see you here. The level of answers just went up several notches. The others will understand soon.

With Leigh here I'm going to start having feelings of inadequacy :D ;) :D :cool:

It IS great to have him here, for sure!
 
:o

(That is an "embarrased" smilie right? lol)
Thanks for the warm welcome guys.
 

Users who are viewing this thread

Back
Top Bottom