From the course: Access 2007: Shortcuts
Unlock the full course today
Join today to access over 22,400 courses taught by industry experts or purchase this course individually.
Using IN instead of OR - Microsoft Access Tutorial
From the course: Access 2007: Shortcuts
Using IN instead of OR
When you're writing an Or query with multiple values, sometimes using the In is better than using Or. You can use the In operator when you need to determine whether a value equals one of many values. Right now I am in the In State query and let's got to Design view. I'll hold my cursor between State and WorkPhone to get a double-headed arrow and double-click to expand it out. So here, I'm looking for customers within a set of states, and this criterion expression uses several Or operators; CA Or NV Or NM Or AZ Or MD or PA. A simple alternative is to use the In operator. I'll click in the line below and I'll type In, and then an open parenthesis, and then I'll list my states. CA, NV, NM, AZ, MD, and PA, and I'll finish with a closing parenthesis. When I hit Tab, notice that Access will even type in the quotation marks for me so that I don't have to do it myself. Notice how much shorter an In statement is than an Or statement? I'll take out the original Or statement and when I run the…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
-
-
-
-
-
Using wildcards5m 33s
-
Using IN instead of OR1m 34s
-
Hiding query fields50s
-
Changing captions1m 42s
-
Finding duplicate records2m 17s
-
Moving records with append and delete queries4m 32s
-
Using make-table queries2m 23s
-
Creating an update query2m 49s
-
Turning a query into a PivotTable2m 22s
-
Turning a query into a PivotChart2m 8s
-
Using SQL statements2m 27s
-
-
-
-
-
-
-