How to get data based on what's in one control into another form?

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

Guest

Hi there

(Sorry about the title!)

I am putting together a contacts database for our business, and at the
moment hold the details of each particular company we deal with in one table,
and the contacts from those companies in a separate table, indexed on unique
company number.

I have a form that initially displays the main name and address details for
the company (and allows you to add/edit/delete etc), and there is a button
called "contacts" on that form.

What I want to be able to do is to click on the "contacts" button, and have
the contacts from the particular company on screen displayed in another form
but I cannot figure out how to do this.

Can somebody help?

Many thanks!

Ali
 
You need to use the WhereCondition argument of the OpenForm command.

Hi there

(Sorry about the title!)

I am putting together a contacts database for our business, and at the
moment hold the details of each particular company we deal with in one table,
and the contacts from those companies in a separate table, indexed on unique
company number.

I have a form that initially displays the main name and address details for
the company (and allows you to add/edit/delete etc), and there is a button
called "contacts" on that form.

What I want to be able to do is to click on the "contacts" button, and have
the contacts from the particular company on screen displayed in another form
but I cannot figure out how to do this.

Can somebody help?

Many thanks!

Ali
_______________________________________________
hth - RuralGuy (RG for short)
Please post to the NewsGroup so all may benefit.
 
Thanks RuralGuy!

I also found that adding the contacts form as a sub-form of the companies
form works quite well too - didn't know you could do things like that as I'm
quite new to Access and come from a mainly Unix shell scripting background!

Ali
 

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

Back
Top