var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: Filtering forms
Hi! This novice databaser has a question. I have the follwing code:
Private Sub cmdButton1_Click()
On Error GoTo Err_cmdButton1_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = " My Form "
'I'm first opening the form in datasheet view using acFormDS
DoCmd.OpenForm stDocName, acFormDS, , "Name of Field in Main Table = 'Criteria I want to filter on'"
Basically, on clicking this button cmdButton1, I want to open "My Form" in Datasheet view, ONLY with the values that meet the criteria I set in the Where clause.
Ismy code right? I keep getting a Type Mismatch Error....
Here is an Example when using a filter to open a report
DoCmd.OpenReport " ReportName", acViewPreview, , "[fieldName]=forms!yourFormName!txtFieldName"
I think you can do the same for a Form