Getting field data to pull form other frms

G

Guest

I am using the Contact Management template db from Access. The goal of the db is to track contact info and call info also track any gifts the contact is donating and track the inventory of these gifts.
Here is my problem, I have added 2 tbls and 2 frms to the db. A Gifts tbl and an Inventory tbl.. All the relationships are fine, all pk’s are fine. In the template db from the Contacts frm I want to have another command button next to the Dial… button that opens the Gifts tbl. The Gifts tbl and the Contacts tbl are related by the ContactID. The Gifts frm has a contact field and I want it to display the current contact records contact. I have been using the formula =Forms![Contacts]![ContactID] in the Default value field in the data tab property, with the control source ContactID. This hasn’t worked. Also when I would open another contact and open the gifts tbl I would still see the gifts for the first contact record. I have been trying to use the Calls frm fields as an example for the Gifts frm , no luck. In a nut shell when I open the Gifts frm I want it to display the Contact name and all related Gifts. How can I resolve this. I am in kindof a time crunch
 
T

tina

suggest you base the Gifts form on a query, rather than on the Gifts table.
create the query, and set the criteria for the ContactID as
Forms![Contacts]![ContactID].
when you open the Gifts form from the Contacts form, the underlying query
should read the current record's ContactID and show you those records.
there are other ways to accomplish the same thing; this just seemed the
easiest to explain in print.

hth


BradleyJ said:
I am using the Contact Management template db from Access. The goal of
the db is to track contact info and call info also track any gifts the
contact is donating and track the inventory of these gifts.
Here is my problem, I have added 2 tbls and 2 frms to the db. A Gifts tbl
and an Inventory tbl.. All the relationships are fine, all pk's are fine.
In the template db from the Contacts frm I want to have another command
button next to the Dial. button that opens the Gifts tbl. The Gifts tbl and
the Contacts tbl are related by the ContactID. The Gifts frm has a contact
field and I want it to display the current contact records contact. I have
been using the formula =Forms![Contacts]![ContactID] in the Default value
field in the data tab property, with the control source ContactID. This
hasn't worked. Also when I would open another contact and open the gifts
tbl I would still see the gifts for the first contact record. I have been
trying to use the Calls frm fields as an example for the Gifts frm , no
luck. In a nut shell when I open the Gifts frm I want it to display the
Contact name and all related Gifts. How can I resolve this. I am in kindof
a time crunch.
 
G

Guest

Point of clearification - couldn't I use that formula on the field level? I need to get clear on this too, creating a form based on a query will that data write back to the table?
 
S

sam

bradly, the query can "write" to the tables. Especailly if
it's a query based on two tables, joined through
an 'update' or 'delete' relationship. I'd suggest to check
out the Northwind database; if you use Access 2000 it's
under your Samples folder in the Access program folder
[C:/programfiles/Microsoft office/office/samples] or
soemthing to that effect. If not, I think you can download
it. But that will give you an idea of how the database
gets "tied" together. .. good luck! ^-^
sam
-----Original Message-----
Point of clearification - couldn't I use that formula on
the field level? I need to get clear on this too,
creating a form based on a query will that data write back
to the table?
 
T

tina

yes, you can manually add records to a table from a single-table Select
query, either thru a form based on the query (your setup) or directly in the
query's datasheet view.


BradleyJ said:
Point of clearification - couldn't I use that formula on the field level?
I need to get clear on this too, creating a form based on a query will that
data write back to the table?
 

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