
Upper Case Function in access: The upper case function of MS Access is done by issuing the prefix command UCase before the field you want to change into upper case.

This blog spot contains Tutorials and compilations of Jantikey in creating and programming MS Access Database.
Private Sub CMDNullSalaries_Click()
Dim strNull As String
strNull = "(([Salary Query Form].[HR Salary] Is Null))"
Me.Form.Filter = strNull
Me.FilterOn = True
End Sub
Form “Salary Query Form” will display only the Record of whose “HR Salary” field contains nothing.
On Error GoTo Err_CMDFilter_Click
Dim vFilter As String
vFilter = Forms![Salary Query Form]![DeptFilterCombo]
Me.Filter = "DeptID = '" & vFilter & "'"
Me.FilterOn = True
Exit_CMDFilter_Click:
Exit Sub
Err_CMDFilter_Click:
MsgBox Err.Description
Resume Exit_CMDFilter_Click
1. vFilter variable is declared.
2. vFilter variable takes the value from Forms![Salary Query Form]![DeptFilterCombo]
3. DeptID Field will then be filtered with the value from vFilter variable.
NOTE: If the variable contains string, then vFilter should be enclosed by single quote.
"DeptID = '" & vFilter & "'"
4. Declare Me.FilterOn as True. This is to activate filter.