I am coming across error 438 when running code to open 2 tabbed forms from 1 reference ID from another form; It opens the forms correct with the looks of the Data but shows the error -
Error Number: 438 Object doesn't support this property or method
I believe the error to be as to .filter isn't working, because a filter is already applied - however the results look correct as current the 2 sub tabbed forms open on the correct record but the error still shows every time
I would like the below code to run without the error can anyone make any suggestions - (not just error handling to ignore error)
Public Function Open()
On Error GoTo Err_LogError
Dim stLinkCriteria As String
Dim stLinkCriteria1 As String
stLinkCriteria = "[CaseID]=" & Me![ID]
stLinkCriteria1 = "[CaseID]=" & Me![ID]
Forms!frmHome!frmTabs.Form.Visible = True
Forms!frmHome!frmTabs.Form!frmLiveTasks.SetFocus
Forms!frmHome!frmTabs.Form!frmLiveTasks.Form.Filter = stLinkCriteria
Forms!frmHome!frmTabs.Form!frmLiveTasks.Form.FilterOn = True
Forms!frmHome!frmTabs.Form.Visible = True
Forms!frmHome!frmTabs.Form!frmLiveInfo.SetFocus
Forms!frmHome!frmTabs.Form!frmLiveInfo.Form.Filter = stLinkCriteria1
Forms!frmHome!frmTabs.Form!frmLiveInfo.Form.FilterOn = True
Exit Function
Err_LogError:
Call ErrorHandle
End Function
CodePudding user response:
It transpired that the code worked - but the error was linked to another section of VBA