Morning
I have multiple userforms - From all the form users can click a button that will open another form called frm_complaints_manager
When the frm_complaints_manager form opens I want it to detect which form is open and pull some data from it.
I had no idea how to achieve this so came up with the following that doesn't appear to work:
Any help is appreciate - I would imagine I have taken completely the wrong approach to this
I have multiple userforms - From all the form users can click a button that will open another form called frm_complaints_manager
When the frm_complaints_manager form opens I want it to detect which form is open and pull some data from it.
I had no idea how to achieve this so came up with the following that doesn't appear to work:
Code:
On Error GoTo Step2:
If Forms![frm_Manager_Stats_NEW_Appts].Visible = True Then
Forms![frm_complaints_manager]![CDP1] = Forms![frm_Manager_Stats_NEW_Appts]![Text285]
complaints.Requery
Else
'do nothing
End If
On Error GoTo Step3:
Step2:
If Forms![frm_Manager_Stats_NEW_Finals].Visible = True Then
Forms![frm_complaints_manager]![CDP1] = Forms![frm_Manager_Stats_NEW_Finals]![Text285]
complaints.Requery
Else
'do nothing
End If
Step3:
If Forms![frm_Manager_Stats_NEW].Visible = True Then
Forms![frm_complaints_manager]![CDP1] = Forms![frm_Manager_Stats_NEW]![Text285]
complaints.Requery
Else
'do nothing
End If
Any help is appreciate - I would imagine I have taken completely the wrong approach to this