Complicated SubForm

G

Gsurfdude

Hello, I have a main form with several combo boxes that are populated from
Oracle linked lookup tables. I need to use a complex query with dynamically
built WHERE clause to return results the user selects. I am having a hard
time getting a subform to use this query. My code explained:

Main is the unbound "main" form that has the sub form "Main_Sub" embedded in
it.
I have VBA that builds a where clause based on user selection of combination
of combo boxes and list boxes.

my SQL statment - SELECT * FROM Table WHERE & strWHERE (dynamic where)

Main.Main_Sub.Form.RecordSource = strSQL - doesn't display anything in the
subform ain1

The above code is in a command button on the main form. I used a Datasheet
type form for the sub form Main_Sub. Any help is greatly appreciated.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top