Form reloads after subform filter (1 Viewer)

REZ

Member
Local time
Today, 13:26
Joined
May 17, 2022
Messages
34
I have this code for a form on click event

Me.ViewingForm.SourceObject = "report.rptBalanceSheet"
Me.ViewingForm.Report.Filter = "id = '" & Me.CmblandlordsACC & "'"
Me.ViewingForm.Report.FilterOn = True
Where "viewingform" is the name of the subform control

The code runs fine, but after running it goes to the form On Load event and runs the code there - Me.ViewingForm.SourceObject = "frmblank"

I can't figure out why it's doing that?
 

Ranman256

Well-known member
Local time
Today, 08:26
Joined
Apr 9, 2015
Messages
4,337
dont use: Me.ViewingForm.SourceObject = "frmblank"
 

REZ

Member
Local time
Today, 13:26
Joined
May 17, 2022
Messages
34
I want the blank subform there when the form first opens.
that line is on the form load event.
 

Users who are viewing this thread

Top Bottom