I have a cmd button that opens a form.
I used: DoCmd.OpenForm stDocName, acFormsDS, , stLinkCriteria
to have it open in datasheet view but it doesn't. In the properties the default view is set to datasheet and all the other allowviews are no. I also use the OnOpen event for the form for the following:
Private Sub Form_Open(Cancel As Integer)
Dim strTableName As String
Dim strSQL As String
strTableName = Forms![ADW Table Select].TableName
strSQL = "SELECT * FROM " & strTableName & " WHERE [EEID] = TRUE;"
Me.RecordSource = strSQL
End Sub
The form opens in form view but allows you to change to datasheet. How do I force it to open in datasheet only?
I used: DoCmd.OpenForm stDocName, acFormsDS, , stLinkCriteria
to have it open in datasheet view but it doesn't. In the properties the default view is set to datasheet and all the other allowviews are no. I also use the OnOpen event for the form for the following:
Private Sub Form_Open(Cancel As Integer)
Dim strTableName As String
Dim strSQL As String
strTableName = Forms![ADW Table Select].TableName
strSQL = "SELECT * FROM " & strTableName & " WHERE [EEID] = TRUE;"
Me.RecordSource = strSQL
End Sub
The form opens in form view but allows you to change to datasheet. How do I force it to open in datasheet only?