&
!
#
-
Caveat: "In a desktop database, you can also use the ampersand operator (&) for concatentation. In an Access app, you must use the plus sign (+)."_
| General | Lookup | | --------------- | ------------------------------- | | Display Control | Combo Box | | Raw Source Type | Value List | | Raw Source | 1:"High"; 2 :"Normal"; 3: "Low" | | Bound Column | 1 | | Column Count | 2 | | Column Heads | No | | Column Widths | 0; 1 | | List Rows | 16 | | List Width | Auto |
Switch()
IsError()
IIf()
Choose()
A serialized backup number, such as "_Backup_2"
The current date, such as "_2019-08-21"
The characters "_bu"
The word "_Archive"
Like "*n*"
Like "*[ro]*"
Like "De* or Do*"
Like "D*"
Solution:
MS Access > Create > Table > Rename Table1 to table_name > Add column first_name Short Text > Add Debra, Donna, Daniel
OR
MS Access > Create > Query Design > SQL View
CREATE TABLE table_name (first_name Text); -- Note: In MS Access SQL, you cannot directly insert multiple values into a column. -- Note: In MS Access SQL, you need to execute each statement separately. INSERT INTO table_name (first_name) VALUES ('Debra'); INSERT INTO table_name (first_name) VALUES ('Donna'); INSERT INTO table_name (first_name) VALUES ('Daniel'); -- Press F5 to refresh Datasheet View.
Check queries:
SELECT first_name FROM table_name WHERE first_name Like "*n*"; -- Donna, Daniel
SELECT first_name FROM table_name WHERE first_name Like "*[ro]*"; -- Debra, Donna
SELECT first_name FROM table_name WHERE first_name Like "De* or Do*"; -- null
SELECT first_name FROM table_name WHERE first_name Like "D*"; -- Debra, Donna, Daniel
Explanation: Double negative. It's not true that the calculation cannot use custom Visual Basic functions. => It's true that the calculation can use custom Visual Basic functions.
Or ("Houston","Boston","Chicago")
In ("Houston","Boston","Chicago")
"Houston" Or "Boston" Or "Chicago"
"houston" Or "boston" Or "chicago"
Solution:
MS Access > Create Tab > Table > Rename Table1 to Customers > Add column City Short Text > Add records Houston, Boston, Chicago
Create Tab> Query Design > Add Table Customers > Field: City > Or "Houston" "Boston" "Chicago"
OR
MS Access > Create Tab > Query Design > SQL View
CREATE TABLE Customers (City Text);
-- Note: In MS Access SQL, you cannot directly insert multiple values into a column.
-- Note: In MS Access SQL, you need to execute each statement separately.
INSERT INTO Customers (City) VALUES ('Houston');
INSERT INTO Customers (City) VALUES ('Boston');
INSERT INTO Customers (City) VALUES ('Chicago');
-- Press F5 to refresh Datasheet View.
SELECT Customers.City
FROM Customers
WHERE (((Customers.City)='Houston')) OR (((Customers.City)='Boston')) OR (((Customers.City)='Chicago'));
Check queries:
SELECT City FROM Customers WHERE City Or ("Houston","Boston","Chicago"); -- Syntax error (comma) in query expression
SELECT City FROM Customers WHERE City In ("Houston","Boston","Chicago"); -- equivalent
SELECT City FROM Customers WHERE City = "Houston" Or "Boston" Or "Chicago"; -- equivalent
SELECT City FROM Customers WHERE City = "houston" Or "boston" Or "chicago"; -- equivalent