Filter Listbox (1 Viewer)

Tor_Fey

Registered User.
Local time
Today, 15:17
Joined
Feb 8, 2013
Messages
121
Good Afternoon;

I am trying to filter multiple listboxes from one core listbox with an onclick event.
On the core (main) listbox I have the following onclick event:

Code:
Me.writeoffdetails.Column(0) = Me.vatdetails.Column(0)
    Me.companiesdetails.Column(0) = Me.vatdetails.Column(0)
        Me.tradingprem.Column(0) = Me.vatdetails.Column(0)
            Me.directordetails.Column(0) = Me.vatdetails.Column(0)

But this is returning the following error: “Run-time error ‘424’ – Object required”

Can you guys give me a pointer where I’m going wrong?

Kind Regards
Tor Fey
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 23:17
Joined
May 7, 2009
Messages
19,169
Create a query for the other listbox that will be filtered:

Select Column1, column2 from table where column1=Forms!formName!vatDetails;

Use this as the rowsource of the combos to be filtered.

On the AfterUpdate event of vatDetails combo, Requery the other combo:

PrIvate sub vatDetails_AfterUpdate()
me.writeoffdetails.requery
Me.companydetails.requery
Me.tradingprem.requery
Me.directordetails.requery
End sub
 

pbaldy

Wino Moderator
Staff member
Local time
Today, 08:17
Joined
Aug 30, 2003
Messages
36,118
Like described in the link...
 

Users who are viewing this thread

Top Bottom