Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Cannot get report to open with WHERE clause that references combo box

Status
Not open for further replies.

handlebars

Technical User
Feb 18, 2003
270
GB
I have used the following code:

On Error GoTo Err_Command2_Click

Dim stDocName As String

stDocName = "OutstandingCalls"

If IsNull(Me.Combo0) Then
DoCmd.OpenReport stDocName, acPreview

Else

DoCmd.OpenReport "OutstandingCalls", View:=acViewPreview, _
WhereCondition:="sys_assignedto=" & Me!Combo0

End If

But when i run my report i get all the records even when i have selected a value from my combo box.

Can anyone point out why this does not work - am i missing something really simple??

Any help would be appreciated.

Andrew
 
Does your report have filteron = true?
Are you sure you are taking the path with the filter - debug statement to see.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top