A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

"Nested" Forms



 
 
Thread Tools Display Modes
  #1  
Old March 28th, 2008, 05:45 PM posted to microsoft.public.access.forms
thefonz37
external usenet poster
 
Posts: 13
Default "Nested" Forms

I'm not sure if Nested is the right word for it, but here's my situation:

I have two tables. One of basic employee information and one of expanded
login information for our various order-processing systems. These tables are
related by employee ID, but the relationship is many-to-one, meaning that for
each "tblEmployeeInfo" record there are multiple "tblEmployeeLogin" records.

I created a form that displays the basic employee data from the
tblEmployeeInfo table and then has a subform with the tblEmployeeLogin
records, which is very nice. However, I would like to make it easier to
navigate the list of employee names, so I was considering creating a third
form with a listbox that would use my existing form and it's subform would
sit next to. So, when finished, you could click on a name in the listbox and
both subforms would populate.

Is it possible to "nest" them like this or would I be better off starting
over and having the listbox link to two child subforms instead of linking it
to one and then having that subform link to a subform?
  #2  
Old March 28th, 2008, 08:16 PM posted to microsoft.public.access.forms
Klatuu
external usenet poster
 
Posts: 7,074
Default "Nested" Forms

You don't really have a many to many. It is, in fact, a one to many. An
example of a many to many is students and classes.
One student may attend 0 to many classes.
A class may have 0 to many students.
Since many to many relationships are not directly possible, you use a
junction table to resolve the many to many. That would be a table that
contains an entry for each class/student combination.

In your case, one employee may have many logins, but a login belongs to only
one employee. So it is a one to many.

But, that asside, you are on the right track with the form/subform
construct. It would, however, complicate your world to add an additional
form.

I would suggest putting your list box on the main form. But, actually, I
would suggest using an unbound combo box to select an employee. It doesn't
take up as much form space as a list box, but it is a very useful way to
select a different record. If you need some assistance with exactly how to
do that, post back and I will be happy to help. It would be helpfult to know
the name of the combo box, the primary key field name and data type of the
employee table's primary key field, and the name of the field or fields that
has the employee name.
--
Dave Hargis, Microsoft Access MVP


"thefonz37" wrote:

I'm not sure if Nested is the right word for it, but here's my situation:

I have two tables. One of basic employee information and one of expanded
login information for our various order-processing systems. These tables are
related by employee ID, but the relationship is many-to-one, meaning that for
each "tblEmployeeInfo" record there are multiple "tblEmployeeLogin" records.

I created a form that displays the basic employee data from the
tblEmployeeInfo table and then has a subform with the tblEmployeeLogin
records, which is very nice. However, I would like to make it easier to
navigate the list of employee names, so I was considering creating a third
form with a listbox that would use my existing form and it's subform would
sit next to. So, when finished, you could click on a name in the listbox and
both subforms would populate.

Is it possible to "nest" them like this or would I be better off starting
over and having the listbox link to two child subforms instead of linking it
to one and then having that subform link to a subform?

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 02:48 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.