Title: MS Access Queries
1MS Access Queries
- By
- Barry Hynum, Ph.D.
- MaxQual Consulting, Inc.
2(No Transcript)
3TOC
4About designing a query (MDB)
Rename
5Formatting Fields
Rt. Click Column
6Joins
7Joins Different Tables
8Joins Different Tables
9Joins Same Table
10Criteria
11Criteria Between
12Criteria Wildcards
13Expressions
14Expressions Dates Nulls
15Aggregate Functions
16Aggregates Criteria
Before
After
17Aggregates Where
Oh, Microsoft!?
18Union Queries
19Subqueries
20Append
21Update
UPDATE Products SET Products.UnitPrice
UnitPrice1.1
22Make Table
SELECT Customers. INTO tbl_New FROM Customers
23Delete
24Parameters
Naming Conventions?
SELECT Products., Categories.CategoryName FROM
Categories INNER JOIN Products ON
Categories.CategoryID Products.CategoryID WHERE
(((Categories.CategoryName)Enter Category) AND
((Products.Discontinued)No))
25VBA Functions
26Functions
Telephone IIf(IsNull(CompanyMainTel),"",Telepho
neDisplay(CompanyMainTel))
Public Function TelephoneDisplay(strIn As String)
As String Select Case Len(strIn
vbNullString) Case 0
TelephoneDisplay "" Case 1 To 6, 8, 9
TelephoneDisplay "Invalid Number"
Case Is 7 TelephoneDisplay
"Missing Area Code" Case 10
TelephoneDisplay "(" Left(strIn, 3) ")" _
" " Mid(strIn,
4, 3) _ "-"
Right(strIn, 4) End Select End Function
27Performance
UltraEdit
28Wrap Up
- Huge Topic!
- Get globally familiar w/ Query Topics
- Make sure u have experience w/ each
- Some understanding of usage
- Practice, practice, practice
- Use samples
- Ask the experts ? _at_AUGSD