I have a Form that contains a SubForm located on a Tab in it. The SubForm is used to view / update fields displayed in it. There is no Bound Data Field to link the Form to the SubFiorm.
I want the data in the SubForm to be filtered based on the value in the field WRK_USER_OBJECT_KEY_002.
The Bound Field on the SubForm is USER_OBJECT_KEY.
The following is the Code in the Sub-Form.
Private Sub Form_Load()
On Error GoTo STEP_999
'MsgBox "Step 000-Form Load Event - F-41-091"
'MsgBox "Step 001-Initialize Common Parameters - F-41-091."
Dim M00000_001 As Form
Set M00000_001 = [Forms]![M-00-000 - Scout Admin System - Main Menu]
Dim F00001_001 As Form
Set F00001_001 = [Forms]![M-00-000 - Scout Admin System - Main Menu]![F-00-001 - System User Lookup SubForm].[Form]
Dim WRK_SYS_USER_KEY_002 As String
[WRK_SYS_USER_KEY_002] = F00001_001![SYS_USER_KEY]
Dim WRK_PARENT_OBJECT_KEY_002 As String
[WRK_PARENT_OBJECT_KEY_002] = "F-41-090**"
Dim WRK_CHILD_OBJECT_KEY_002 As String
[WRK_CHILD_OBJECT_KEY_002] = "R-41-090**"
Dim WRK_USER_OBJECT_KEY_002 As String
[WRK_USER_OBJECT_KEY_002] = [WRK_SYS_USER_KEY_002] & [WRK_PARENT_OBJECT_KEY_002] & [WRK_CHILD_OBJECT_KEY_002]
Me.Filter = "USER_OBJECT_KEY = WRK_USER_OBJECT_KEY_002"
Me.FilterOn = True
'MsgBox "Step 999-Shutdown."
'MsgBox "Step 990-Exit Event."
'MsgBox Step 999-Error Handler."
Dim M00000_999 As Form
Set M00000_999 = [Forms]![M-00-000 - Scout Admin System - Main Menu]
Dim DEBUG_ERR_MSG_OPTION As String
[DEBUG_ERR_MSG_OPTION] = "Yes" 'Un-Comment for use.
If M00000_999![LKUP_SYS_ERR_MSG_OPTION] = "Yes" Or [DEBUG_ERR_MSG_OPTION] = "Yes" Then
MsgBox Err.DESCRIPTION & " (" & Err.Number & ")"
The data is not being filtered. How can I filter the data in the SubForm?