Hi,
I have a form with a command button on it to open another form. The form is set to DataSheet view, however when I open it via the command button, it opens in Form view. The VBA for the on-click event procedure is below.
Private Sub cmdAvailableNow_Click()
On Error GoTo Err_cmdAvailableNow_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frmAvailableNow"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_cmdAvailableNow_Click:
Exit Sub
Err_cmdAvailableNow_Click:
MsgBox Err.Description
Resume Exit_cmdAvailableNow_Click
End Sub
I'm not at all experienced with writing VBA, but figure there must be something in here that can be changed to get the form to open in DataSheet view?
Any help much appreciated.
Thanks,
Kirsti