By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,677 Members | 1,069 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,677 IT Pros & Developers. It's quick & easy.

Pulling data from another table, making link dynamic or static

P: n/a
Hi there,

I am about to build a small db in Access. Among the tables I plan to
have are a Person table, an Event table, and an EventRegistration
table.

The EventRegistration table will contain the information gathered when
someone registers for one of our courses. Some of the information will
be gathered from each of the other two tables, and some will be new
information, entered manually at the time of registration.

Of the information coming from the Person table, I would like some of
it to be dynamic. That is, if the name changes on the Person table, it
changes in the EventRegistration table as well. Easy.

But some of it I'd like to be static. Like, the school the person
attends. Even if they change schools, we need to know the school they
attended when they came to our course. So that link has to be broken
somehow.

Does anyone know how to do this? Specifically, for certain fields
between two tables - but if not, for the two tables entirely?

Thanks,
Melissa

Jul 13 '06 #1
Share this Question
Share on Google+
3 Replies


P: n/a
pi*******@gmail.com wrote in
news:11**********************@s13g2000cwa.googlegr oups.com:
Hi there,

I am about to build a small db in Access. Among the tables I
plan to have are a Person table, an Event table, and an
EventRegistration table.

The EventRegistration table will contain the information
gathered when someone registers for one of our courses. Some
of the information will be gathered from each of the other two
tables, and some will be new information, entered manually at
the time of registration.

Of the information coming from the Person table, I would like
some of it to be dynamic. That is, if the name changes on the
Person table, it changes in the EventRegistration table as
well. Easy.
This dynamic information is set via a relationship between the
tables. You don't add the person's name and address to the
EventRegistrations table, you simply add the Person's ID number
and lookup the name and address for forms and reports using
queries.
>
But some of it I'd like to be static. Like, the school the
person attends. Even if they change schools, we need to know
the school they attended when they came to our course. So
that link has to be broken somehow.
When you create the record in EventRegistrations, you will need
some visual basic code in the form that will copy the data to
the textbox for the EventRegistrations.School_atTimeOfEvent from
Persons.School

This code should go to into the AfterUpdate event for the
PersonID. .
>
Does anyone know how to do this? Specifically, for certain
fields between two tables - but if not, for the two tables
entirely?

Thanks,
Melissa



--
Bob Quintal

PA is y I've altered my email address.

--
Posted via a free Usenet account from http://www.teranews.com

Jul 13 '06 #2

P: n/a
But some of it I'd like to be static. Like, the school the
person attends. Even if they change schools, we need to know
the school they attended when they came to our course. So
that link has to be broken somehow.

When you create the record in EventRegistrations, you will need
some visual basic code in the form that will copy the data to
the textbox for the EventRegistrations.School_atTimeOfEvent from
Persons.School

This code should go to into the AfterUpdate event for the
PersonID. .
Thanks for responding, Bob. I definitely know that I'm just adding the
ID number to the record and pulling the other info from the table.

What I'm not sure about is how do I make sure that
EventRegistrations.School_atTimeOfEvent does not update when I make a
change to Person.School in the future? You said I'd need to add some
vb code. Do you know what that is?

Jul 13 '06 #3

P: n/a
pi*******@gmail.com wrote in
news:11**********************@i42g2000cwa.googlegr oups.com:
>
But some of it I'd like to be static. Like, the school the
person attends. Even if they change schools, we need to
know the school they attended when they came to our course.
So that link has to be broken somehow.

When you create the record in EventRegistrations, you will
need some visual basic code in the form that will copy the
data to the textbox for the
EventRegistrations.School_atTimeOfEvent from Persons.School

This code should go to into the AfterUpdate event for the
PersonID. .

Thanks for responding, Bob. I definitely know that I'm just
adding the ID number to the record and pulling the other info
from the table.

What I'm not sure about is how do I make sure that
EventRegistrations.School_atTimeOfEvent does not update when I
make a change to Person.School in the future? You said I'd
need to add some vb code. Do you know what that is?
try
If me.NewRecord then
me!EventRegistrations.School_atTimeOfEvent _
= me!Persons.School
End if

Where to put it? How are you creating the new record in
EventRegistrations? That will determine where.

--
Bob Quintal

PA is y I've altered my email address.

--
Posted via a free Usenet account from http://www.teranews.com

Jul 13 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.