Where in this canned code used by the command button wizard do I tell it to open the form in datasheet view? The form it opens has a default view specified by me to be datasheet but access opens it in form view anyway.
Thanks, Pam
HTML Code:Private Sub Command60_Click() On Error GoTo Err_Command60_Click Dim stDocName As String Dim stLinkCriteria As String stDocName = "frmSiteReportsSubformRO" stLinkCriteria = "[txtSiteID]=" & "'" & Me![cbxSiteID] & "'" DoCmd.OpenForm stDocName, , , stLinkCriteria Exit_Command60_Click: Exit Sub Err_Command60_Click: MsgBox Err.Description Resume Exit_Command60_Click End Sub




Reply With Quote