Linking Forms

S

sd2352

I recently built an employee database using one large table and multiple
forms. Each form has 3 common fields: SSN, Employee's first and last name. My
problem is when I enter a record into the first form, then click to the next
form, it doesn't stay on the same record. How can I get my forms to link
together so if I'm working on one specific employee record, it will stay on
that record when I switch to another form?

The forms I created include: General Info, ER Contacts, Benefits, Salary Hx,
and Termination. When I enter info into the General Info form then open the
ER Contacts form, I have to search again for the record I was just working
on, it doesn't automatically pull it up. Is there anyway to program Access to
pull up the SAME record in real time?
 
J

John W. Vinson

I recently built an employee database using one large table and multiple
forms.

That is the source of your problem. You're not using Access as it is designed
to work!
Each form has 3 common fields: SSN, Employee's first and last name. My
problem is when I enter a record into the first form, then click to the next
form, it doesn't stay on the same record. How can I get my forms to link
together so if I'm working on one specific employee record, it will stay on
that record when I switch to another form?

The forms I created include: General Info, ER Contacts, Benefits, Salary Hx,
and Termination. When I enter info into the General Info form then open the
ER Contacts form, I have to search again for the record I was just working
on, it doesn't automatically pull it up. Is there anyway to program Access to
pull up the SAME record in real time?

If you insist (very unwisely IMO) on using one grand master table as a
spreadsheet for all this information (much of which should be pulled out into
related tables), then consider using one Form with a Tab Control. This will
let you open a record and then go to various tab pages for specific data.

I'm assuming that one employee will have multiple ER Contacts, multiple
benefits, certainly multiple records of salary history... shouldn't there be
one to many relationships between the employee record and related tables for
this information?
 
W

wright305

John,
I'm trying to basically do the same thing and Im having problems getting the
forms to link. I have a table with the following fields:
Case#
Date
Time
Location
I would like to open a new form with a button such as a witness table with
the following fields:
Case Number
Witness Name
Address
Phone
Ect.

I would like the forms to link by the case number and act like a subform.
Can you help? Kinda new to access and don't know much about coding. I can't
use a subform because I'll have several other tables i want to link such as
suspect table, vehicle info, images, arrest table and more. I didn't think it
would be good to create one large table? or would it?

Thanks
 
J

John W. Vinson

John,
I'm trying to basically do the same thing and Im having problems getting the
forms to link. I have a table with the following fields:
Case#
Date
Time
Location
I would like to open a new form with a button such as a witness table with
the following fields:
Case Number
Witness Name
Address
Phone
Ect.

I would like the forms to link by the case number and act like a subform.
Can you help? Kinda new to access and don't know much about coding. I can't
use a subform because I'll have several other tables i want to link such as
suspect table, vehicle info, images, arrest table and more. I didn't think it
would be good to create one large table? or would it?

Your table design should certainly be based on the logical structure of the
data: Suspects in one table, Witnesses in a different table, Arrests in a
third, and so on. What you have looks good based on what I've seen. I don't
understand your reluctance to use subforms though! I've got one (probably
overly complex) form with eleven subforms (on tab pages). You can do this with
popup forms - but before you go to the effort of learning and developing the
required VBA code, I'd like to suggest that you investigate subforms a bit
further, or explain in more detail why you can't use them!
 
W

wright305

I'm not againts using subforms if that will work. I just didn't think there
would be enough room for all of my fields on a subform. for example, the
arrest form would need to include a photo,memo field, address, phone, and
several other field. I didn't know how to get the whole form to pop up using
a tab? Can that be done??
 
J

John W. Vinson

I'm not againts using subforms if that will work. I just didn't think there
would be enough room for all of my fields on a subform. for example, the
arrest form would need to include a photo,memo field, address, phone, and
several other field. I didn't know how to get the whole form to pop up using
a tab? Can that be done??

A Tab is a way of sharing screen real estate. You can have a big Tab Control
on the form, with your "mainform" controls on the first tab page, and a
Subform on each subsequent page. The controls on the subform are out of sight
and don't interfere with other controls until you select that tab page. So
there's no "pop up" involved; the subform is there all along, just not visible
until you select the page.

There may be an advantage to using popup forms instead, *if* the master form
gets too heavy and inefficient. But try it first; if it works ok, it's a lot
simpler to implement and maintain.
 

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

Similar Threads


Top