Solved Moving a form with a subform into a Navigationform (1 Viewer)

hhag

Member
Local time
Today, 13:11
Joined
Mar 23, 2020
Messages
69
Hi,
I've a main form with a combobox and a subform. The subform is based on a query.
The input from the combobox filters the outcome of the subform, via the AfterUpdate event:

With [Forms]![frmKundstatistik]![subfrmAnbudPerKund].Form
.Filter = "[KundID] = " & Me.cboValdKund
.FilterOn = True
End With

Above works perfectly, but when I include the mainform in a Navigation form (std one, with both horizontal and vertical tabs) it doesn't work. I assumed it would be so due to previous experience. The question is; How do I get it to work in the Navigation form?
I) Can I use some sort of SQL string in order to requery the subform inside the mainform which in turn has been moved inside the Navigationform?
II) Can I rewrite above expression in some manner?

Rgds
 

theDBguy

I’m here to help
Staff member
Local time
Today, 05:11
Joined
Oct 29, 2018
Messages
21,357
Hi. Try taking out the Forms!KundStatistik part.
 

hhag

Member
Local time
Today, 13:11
Joined
Mar 23, 2020
Messages
69
Amazing! So greatful to your quick response! Thanks so much for the help!

Question; Why don't you need to have some "hierarchy" in this case?
 

theDBguy

I’m here to help
Staff member
Local time
Today, 05:11
Joined
Oct 29, 2018
Messages
21,357
Amazing! So greatful to your quick response! Thanks so much for the help!

Question; Why don't you need to have some "hierarchy" in this case?
Hi. Glad to hear you got it sorted out. You do need hierarchy, but you have two ways to get there: absolute and relative. You were using absolute, and you needed to adjust it because you added a new parent (the Nav Form). I just recommended you use relative - starting with the main form. Cheers!
 

Users who are viewing this thread

Top Bottom