call sub in another loaded form

I have a piece of code thx to an expert that checks if a form is loaded and then sets its slider control.

I have a sub called setfilter in the other loaded form (frmsmmtmaster). How do i get that sub to run?

If Me.BtnToggleSyncForms = True And CurrentProject.AllForms("FrmSMMTMaster").IsLoaded Then
 Forms!FrmSMMTMaster.Form.Controls.Item("ccslider").Value = Me.CCExportSlider.Value

End If
PeterBaileyUkAsked:
Who is Participating?
 
IrogSintaCommented:
Make your procedure public instead of private.
Public Sub setfilter()

Then call it this way:
Call Forms.FrmSMMTMaster.setfilter
0
 
PeterBaileyUkAuthor Commented:
apologies for delay I have been unwell.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.