Populating a subform or child form dynamically

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

I am writing an Access app in which I have many tables. I am trying to
develop a Wizard driven interface that will on one screen, allow the user to
choose thier table, then on the next screen, open the table in a subform in
datasheet view.

The problem is that I also need to filter the table selected based on the
current record from the main screen.

I have gotten it to the point where I can select the table, then, with an
unbound child form on the next screen, set the SourceObject to the table name
selected, but I cannot figure out how to filter that table so that only the
relevant records are displayed within the subform.

Anyone have any ideas?

Thanks,

Mike
 
Just stuff in the sql as you please with the conditions....and forget about
filters...

To show all people from tblCstomres and form my city, you get:

dim strSql as string

strSql = "select * from tblCustomers where City = 'Edmonton'"

me.MySubFormname.Form.RecordSource = strSq

So, you can make the sql anything you want. however, you do have the issue
of what controls are on the form, and what fields they will show.
 
Back
Top