This is probably rather easy to do, but I don't know how to go about it.
I've set a form to open in datasheet view as the default. And it does. But when I open it using a command button from another form, it opens in single form view. Does anyone know a way to modify the following code so that the command button will open the form in datasheet view, instead of form view? (Code follows below.)
Thanks,
Spherey
I've set a form to open in datasheet view as the default. And it does. But when I open it using a command button from another form, it opens in single form view. Does anyone know a way to modify the following code so that the command button will open the form in datasheet view, instead of form view? (Code follows below.)
Thanks,
Spherey
Code:
Private Sub Open_Form_Click()
On Error GoTo Err_Open_Form_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "Prime Form"
stLinkCriteria = "[Account Manager]=" & "'" & Me![Account Manager] & "'"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_Open_Form_Click:
Exit Sub
Err_Open_Form_Click:
MsgBox Err.Description
Resume Exit_Open_Form_Click
End Sub