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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

openreport and wherecondition with Like in it

Status
Not open for further replies.

sbdproj

Programmer
Sep 22, 2003
22
NL
Hi, can't preview my report when I use a wherecondition in which I use the word "LIKE" .
Who knows how to do this.

This is a part of my code:
dim wherecondition as string

wherecondition = "[Kal_date] = 'Like 2003*'"
DoCmd.OpenReport stDocName, acPreview, , wherecondition
 
Try:

[tt]dim strWhereCondition as string
strWhereCondition = "[Kal_date] Like '2003*'"[/tt]

i e - placement of the single quote, Like operator works without equal sign, and I think wherecondition is the name of the condition, better use another name/naming convention.

Roy-Vidar
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top