drop down box

  • Thread starter Thread starter Annelie
  • Start date Start date
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
 
I need to clarify that, it is not closing the dropdown after selecting an
item. Lets assume I selected the 4th item on the list. That items moves into
the box. The drop down stays open on the item that is now in the 4th place.
 
Back
Top