opening a form from another form in datasheet view

D

DJ McNeill

Hi,

I have a form that launchs another form with a button.

The onclick event looks like:
Private Sub get_common_attributes_Click()
On Error GoTo Err_get_common_attributes_Click

Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "Get_Common_Items"
DoCmd.OpenForm stDocName, , , stLinkCriteria, acFormReadOnly,
acWindowNormal


Exit_get_common_attributes_Click:
Exit Sub

Err_get_common_attributes_Click:
MsgBox Err.Description
Resume Exit_get_common_attributes_Click

End Sub

I used the wizard for this.

The "Get_Common_Items" form properties are: Datasheet view = Yes all others
no default view is set to Datasheet view.

Yet no matter what the form opens in Form view

Any suggestions on how to force it to open in Datasheet view

Thanks

DJ McNeill
 
K

Klatuu

DoCmd.OpenForm stDocName, , acFormDS, stLinkCriteria, acFormReadOnly,
acWindowNormal
 
D

DJ McNeill

Thank you
turns out it should have been:
DoCmd.OpenForm stDocName,acFormDS, , stLinkCriteria, acFormReadOnly,
acWindowNormal

DJ McNeill
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top