A
Annelie
I just learned from another post to put
cboMyCombo.dropdown
opens the drop down list after entering the first letter. It works great on
a regular form.
When I use it to open a report, I am having problems, the selected item does
not want to stay put.
Here is my code:
Private Sub Print1_Click()
Dim strWhere As String
strWhere = "True" ' so records will be retrieved if no other
' criteria are entered
If Not IsNull(Me!cboMoveTo) Then
strWhere = strWhere & _
" AND [SSNo] = " & Chr(34) & Me!cboMoveTo & Chr(34)
End If
If Not IsNull(Me!txtDateFrom) Then
strWhere = strWhere & " AND [WeDate] >= #" & _
CDate(Me!txtDateFrom) & "#"
End If
If Not IsNull(Me!txtDateTo) Then
strWhere = strWhere & " AND [WeDate] <= #" & _
CDate(Me!txtDateTo) & "#"
End If
DoCmd.OpenReport "YTDEmployeeWithBurden", acViewPreview, , strWhere
End Sub
There must be something in the code, that is preventing the selection.
Annelie
cboMyCombo.dropdown
opens the drop down list after entering the first letter. It works great on
a regular form.
When I use it to open a report, I am having problems, the selected item does
not want to stay put.
Here is my code:
Private Sub Print1_Click()
Dim strWhere As String
strWhere = "True" ' so records will be retrieved if no other
' criteria are entered
If Not IsNull(Me!cboMoveTo) Then
strWhere = strWhere & _
" AND [SSNo] = " & Chr(34) & Me!cboMoveTo & Chr(34)
End If
If Not IsNull(Me!txtDateFrom) Then
strWhere = strWhere & " AND [WeDate] >= #" & _
CDate(Me!txtDateFrom) & "#"
End If
If Not IsNull(Me!txtDateTo) Then
strWhere = strWhere & " AND [WeDate] <= #" & _
CDate(Me!txtDateTo) & "#"
End If
DoCmd.OpenReport "YTDEmployeeWithBurden", acViewPreview, , strWhere
End Sub
There must be something in the code, that is preventing the selection.
Annelie