Avatar of JOrsak1968
JOrsak1968Flag for United States of America

asked on 

Like # ??? Query question

I have a simple little form name "Date Range-ConversionRatio"

This form has two text boxes that collect date ranges from the user.

It has one combo box that uses a union query to pull from an employee table and a table with the single record "All Conultants"

ID 0 = All Consultants
ID 1-10 = First and Last name of Consultant.

I need to pull all records during the specified date range for the specified consultant with the option to pull ALL records.

Currently I am trying the syntax:

IIf([Forms]![Date Range-ConversionRatios]![AC]=0,Like "#",[Forms]![Date Range-ConversionRatios]![AC])

If I select one of the consultants it pulls the record properly.  If I select the "All Consultants" option it pulls no records.

Please HELP. :-)
Microsoft AccessSQL

Avatar of undefined
Last Comment
JOrsak1968
ASKER CERTIFIED SOLUTION
Avatar of irudyk
irudyk
Flag of Canada image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Avatar of JOrsak1968
JOrsak1968
Flag of United States of America image

ASKER

I had accidently typed the # sign in the previous statement.

IIf([Forms]![Date Range-ConversionRatios]![AC]=0,Like "#",[Forms]![Date Range-ConversionRatios]![AC])

I'm still trying to learn what the syntax means and barely grasping it makes it difficult to figure out what the problem is.

Sheesh... putting the Like at the beginning  makes all the difference. :-)

Thanks for teh solution.
Microsoft Access
Microsoft Access

Microsoft Access is a rapid application development (RAD) relational database tool. Access can be used for both desktop and web-based applications, and uses VBA (Visual Basic for Applications) as its coding language.

226K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo