Solved Filter Drop Down Issue When Form Pop-Up Property Set to Yes (1 Viewer)

Pac-Man

Active member
Local time
Today, 13:52
Joined
Apr 14, 2020
Messages
408
Hi,

I am using attached Microsoft Template and when I set the Pop-Up Property of "Account Transaction List" form to yes and open this form, filter on the top right corner do not show the row entries of combo box. When this property set to NO then it show the row entries. Can anybody please look in to it and help me figure out the reason and issue because I want to use the form in POP UP mode.

Best Regards,
Abdullah
 

Attachments

  • Income Expense Database.accdb
    1 MB · Views: 185

CJ_London

Super Moderator
Staff member
Local time
Today, 08:52
Joined
Feb 19, 2013
Messages
16,553
the problem is the use of currentobjectname in your rowsource - when the form is a popup, it is not the current object - see this link


to fix, in your form open event put

cboFilterFavorites.RowSource = Replace(cboFilterFavorites.RowSource, "[application].[currentobjectname]", "'" & Me.Name & "'")
 

Pac-Man

Active member
Local time
Today, 13:52
Joined
Apr 14, 2020
Messages
408
That amazing. It works. Thanks a lot @CJ_London
 

Pac-Man

Active member
Local time
Today, 13:52
Joined
Apr 14, 2020
Messages
408
Hi,

How can this filter method be applied on a form with subform (emulated split form) instead of split form?
 

CJ_London

Super Moderator
Staff member
Local time
Today, 08:52
Joined
Feb 19, 2013
Messages
16,553
in the main form open event, refer to your main form controls as already done. For subform controls use

me.subformname.form.controlname

I use this basic technique frequently, but usually would use a placeholder in the sql (e.g. [frmName]) rather than [application].[currentobjectname]
 

Pac-Man

Active member
Local time
Today, 13:52
Joined
Apr 14, 2020
Messages
408
Thanks for reply. I'll try to implement it.
 

Users who are viewing this thread

Top Bottom