Hi Forrest.
The Key is being able to query a secondary data source, which you cannot do
with a standard data connection.
The key is a webservice or code. I use web services to query a database
table dynamically in this kind of situation.
So it can be done just needs additonal components.

Signature
Clay Fox / Microsoft InfoPath MVP
www.InfoPathDev.com / The InfoPath Authority / Downloads, Samples, How-To,
Experts, Forum
> Hi,
>
[quoted text clipped - 9 lines]
> Forrest
>
Forrest - 21 Apr 2008 14:58 GMT
Hi Clay,
Thank you so much for your reply.
Our InfoPath form is a standalone form which doesn't access Web Service or
Database.
I saw some code on internet to demo on populating dynamic dropdown on Form
Load event handler. But my form need to fiter data on dropdown list on
Command event handler.
InfoPath has build-in support to filter data on dropdown list. But we need
to achieve it by using code behind as InfoPath build-in filter data support
is not good enough for our case.
So is there nayway that could filter data on dropdownlist by using code
behind?
Many thanks,
Forrest
> Hi Forrest.
> The Key is being able to query a secondary data source, which you cannot do
[quoted text clipped - 18 lines]
> > Forrest
> >
Clay Fox - 21 Apr 2008 15:25 GMT
I believe there are some code samples on http://www.infopathdev.com
You should be able to search there and find some examples.

Signature
Clay Fox / Microsoft InfoPath MVP
www.InfoPathDev.com / The InfoPath Authority / Downloads, Samples, How-To,
Experts, Forum
> Hi Clay,
>
[quoted text clipped - 40 lines]
> > > Forrest
> > >