How can I autopopulate table2 field with values from table1 field?

L

lelio.rising

Hello, all. I'm having an issue with a database for which I am using Access
as a front end (MySQL server is where the data is being stored), so I'm not
sure if this is an Access issue or an SQL issue. Hopefully someone here can
help or direct me somewhere that can.

I'm creating a database for a department in my organization. I have six
primary tables (not including lookup tables for combo boxes), all of which
should be linked by one field, DemoUniqueID. The people actually doing the
data entry in this db will want this to be as easy as possible for their use,
but I'm not having much luck with the setup. Is there a way I can auto
populate the DemoUniqueID field in the other 5 tables with the data from the
first table?

At first I tried using tabs for the forms, but we (IT person and myself)
were having issues with the queries and the language in trying to make all
these forms behave properly (one form wouldn't allow entry; one only showed
errors, etc.). Currently I have the forms set up so that the other 5 forms
pop up and are supposed to filter based on the record in the main form. As
far as the forms go, it appears to work great, but when I check the tables,
the DemoUniqueID fields in the other tables all say 0 (which is because I was
using this expression: =[Forms]![frmDemographics]![DemoUniqueID], which I
know only makes the value appear in the other forms but not on the tables).

The DemoUniqueID field in the Demographics table is currently an autonumber,
but not for the other tables.

Thanks for your assistance,
Stacy
 
J

Jeff Boyce

Stacy

You describe having 5 tables all linked via a DemoUniqueID value. But you
don't describe what is being stored in those tables.

"How" depends on "what"...

More info, please...

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
B

BruceM

Presumably there is one top level table with DemoUniqueID, with the other
tables related to it.

tblDem
DemoUniqueID (autonumber primary key, or PK)
Other fields as needed

tblSub1
Sub1_ID (PK)
DemoUniqueID (linking field to tblDem; Long Integer)

and so forth for the other tables.

Make a main form based on tblDem (or a query based on tblDem), with a
subform based on tblSub1. Set the Link Child and Link Master fields of the
subform control to DemoUniqueID. Any record entered in the subform will
have the same DemoUniqueID value as in the main form.

There are other ways to go about this, but your exact intention is not
clear. When you refer to using the expression, how are you using it? Do
you just want to filter existing data, or do you want to enter related
records in the pop-up forms too? For filtering you could set the criteria
for DemoUniqueID in the record source query of the pop-up form to
[Forms]![frmDemographics]![DemoUniqueID]. For adding a new record you could
set the default value of DemoUniqueID to the same expression. However, I
think subforms would be a simpler approach. You can show or hide subforms
as needed, which may have the same effect as using a pop-up form; or you
could put each subform on its same tab.

Your question is very general, so it is difficult confidently to offer
specific suggestions.

lelio.rising said:
Hello, all. I'm having an issue with a database for which I am using
Access
as a front end (MySQL server is where the data is being stored), so I'm
not
sure if this is an Access issue or an SQL issue. Hopefully someone here
can
help or direct me somewhere that can.

I'm creating a database for a department in my organization. I have six
primary tables (not including lookup tables for combo boxes), all of which
should be linked by one field, DemoUniqueID. The people actually doing the
data entry in this db will want this to be as easy as possible for their
use,
but I'm not having much luck with the setup. Is there a way I can auto
populate the DemoUniqueID field in the other 5 tables with the data from
the
first table?

At first I tried using tabs for the forms, but we (IT person and myself)
were having issues with the queries and the language in trying to make all
these forms behave properly (one form wouldn't allow entry; one only
showed
errors, etc.). Currently I have the forms set up so that the other 5 forms
pop up and are supposed to filter based on the record in the main form. As
far as the forms go, it appears to work great, but when I check the
tables,
the DemoUniqueID fields in the other tables all say 0 (which is because I
was
using this expression: =[Forms]![frmDemographics]![DemoUniqueID], which I
know only makes the value appear in the other forms but not on the
tables).

The DemoUniqueID field in the Demographics table is currently an
autonumber,
but not for the other tables.

Thanks for your assistance,
Stacy
 
L

lelio.rising

Sorry. The DemoUniqueID field, in the Demographics table, is currently an
autonumber. This may change depending on whether or not DCS and/or the
universities we work with can provide us with better ID numbers for the
students/employees. The DemoUniqueID field in the other tables (Courses,
EducationInfo, EmploymentVerification, Stipend, and Tuition) is also numeric
at this time.

The Demographics table is keeping up with personal info (name, university,
address, email, phone numbers, etc.). The Courses table will store up to 10
courses where the student's grade was not acceptable (semester, which is a
combo box, university course ID, course name, and the grade received).
EducationInfo holds information for up to 8 semesters (semester combo box,
registered and completed hours, a check box/tinyint noting if the grade for
that semester has been received and if a certain grade was received, and the
overall GPA for the semester). EmploymentVerification stores the hire date,
the last date on which the person's employment status was checked, and a
check box indicating whether or not the person is still employed. The Stipend
and Tuition tables both record the semesters and the amount paid.

All of these forms (but not the tables) show the First Name and Last Name as
it appears in the Demographics table, as well as the DemoUniqueID, but I need
the DemoUniqueID to be recorded in all tables, based on the primary key in
the Demographics table.

Jeff Boyce said:
Stacy

You describe having 5 tables all linked via a DemoUniqueID value. But you
don't describe what is being stored in those tables.

"How" depends on "what"...

More info, please...

Regards

Jeff Boyce
Microsoft Office/Access MVP

lelio.rising said:
Hello, all. I'm having an issue with a database for which I am using
Access
as a front end (MySQL server is where the data is being stored), so I'm
not
sure if this is an Access issue or an SQL issue. Hopefully someone here
can
help or direct me somewhere that can.

I'm creating a database for a department in my organization. I have six
primary tables (not including lookup tables for combo boxes), all of which
should be linked by one field, DemoUniqueID. The people actually doing the
data entry in this db will want this to be as easy as possible for their
use,
but I'm not having much luck with the setup. Is there a way I can auto
populate the DemoUniqueID field in the other 5 tables with the data from
the
first table?

At first I tried using tabs for the forms, but we (IT person and myself)
were having issues with the queries and the language in trying to make all
these forms behave properly (one form wouldn't allow entry; one only
showed
errors, etc.). Currently I have the forms set up so that the other 5 forms
pop up and are supposed to filter based on the record in the main form. As
far as the forms go, it appears to work great, but when I check the
tables,
the DemoUniqueID fields in the other tables all say 0 (which is because I
was
using this expression: =[Forms]![frmDemographics]![DemoUniqueID], which I
know only makes the value appear in the other forms but not on the
tables).

The DemoUniqueID field in the Demographics table is currently an
autonumber,
but not for the other tables.

Thanks for your assistance,
Stacy
 
L

lelio.rising

Yes, the DemoUniqueID in the Demographics table is the primary key (currently
set as an autonumber, but this may change depending on the needs of the
people who will be using this database), and the other tables all have their
own primary keys with DemoUniqueID as the linking field.

All of these forms are pretty big because of the amount of data being stored
in each table, so I'm not sure subforms would be very viewer or user friendly
(see my reply to Jeff for specifics). Like I said, earlier we tried using
tabs, with Demographics as the parent table/form and the rest as children,
but we were never able to get the query working so that all of the forms
worked properly. You said,
<i>You can show or hide subforms as needed, which may have the same effect
as using a pop-up form</i>
How would I go about doing this? Is it just an option when adding the
subform (I've never hidden them before; they've always been datasheet view
for my other databases)? That may be the best solution.

The expression =[Forms]![frmDemographics]![DemoUniqueID] I initially had as
the control source for the DemoUniqueID field in each of the other forms, but
since this only shows up in the form and not the table, I know that's not the
expression I need to be using. I have the same expression being used to show
the first and last names of the students/employees in the forms, which works
fine (I'll have to either show the ones who will be using this database how
to run queries to get the information they need for reports or do it myself
when the time comes). When I added the buttons to the Demographics form, I
selected to specify the records that appear in the form, as opposed to
showing all data entered, with DemoUniqueID <->DemoUniqueID. Records are
still able to be entered in those forms, but they only apply to the record
visible in the Demographics form, so you would need to move to another record
to enter data in other tables/forms for that person.

Thanks.

BruceM said:
Presumably there is one top level table with DemoUniqueID, with the other
tables related to it.

tblDem
DemoUniqueID (autonumber primary key, or PK)
Other fields as needed

tblSub1
Sub1_ID (PK)
DemoUniqueID (linking field to tblDem; Long Integer)

and so forth for the other tables.

Make a main form based on tblDem (or a query based on tblDem), with a
subform based on tblSub1. Set the Link Child and Link Master fields of the
subform control to DemoUniqueID. Any record entered in the subform will
have the same DemoUniqueID value as in the main form.

There are other ways to go about this, but your exact intention is not
clear. When you refer to using the expression, how are you using it? Do
you just want to filter existing data, or do you want to enter related
records in the pop-up forms too? For filtering you could set the criteria
for DemoUniqueID in the record source query of the pop-up form to
[Forms]![frmDemographics]![DemoUniqueID]. For adding a new record you could
set the default value of DemoUniqueID to the same expression. However, I
think subforms would be a simpler approach. You can show or hide subforms
as needed, which may have the same effect as using a pop-up form; or you
could put each subform on its same tab.

Your question is very general, so it is difficult confidently to offer
specific suggestions.

lelio.rising said:
Hello, all. I'm having an issue with a database for which I am using
Access
as a front end (MySQL server is where the data is being stored), so I'm
not
sure if this is an Access issue or an SQL issue. Hopefully someone here
can
help or direct me somewhere that can.

I'm creating a database for a department in my organization. I have six
primary tables (not including lookup tables for combo boxes), all of which
should be linked by one field, DemoUniqueID. The people actually doing the
data entry in this db will want this to be as easy as possible for their
use,
but I'm not having much luck with the setup. Is there a way I can auto
populate the DemoUniqueID field in the other 5 tables with the data from
the
first table?

At first I tried using tabs for the forms, but we (IT person and myself)
were having issues with the queries and the language in trying to make all
these forms behave properly (one form wouldn't allow entry; one only
showed
errors, etc.). Currently I have the forms set up so that the other 5 forms
pop up and are supposed to filter based on the record in the main form. As
far as the forms go, it appears to work great, but when I check the
tables,
the DemoUniqueID fields in the other tables all say 0 (which is because I
was
using this expression: =[Forms]![frmDemographics]![DemoUniqueID], which I
know only makes the value appear in the other forms but not on the
tables).

The DemoUniqueID field in the Demographics table is currently an
autonumber,
but not for the other tables.

Thanks for your assistance,
Stacy
 
L

lelio.rising

Oh, also, in theory, each person should only have one record per table, since
all the tables should have the necessary fields to enter all the required
data for the person. Once I finish the test run I could theoretically just
make all the DemoUniqueIDs autonumbers and reset to 1 in MySQL, but I know
this would cause problems were someone to delete a record in one of the
tables, or if for some reason a second record were created for the same
person.

Jeff Boyce said:
Stacy

You describe having 5 tables all linked via a DemoUniqueID value. But you
don't describe what is being stored in those tables.

"How" depends on "what"...

More info, please...

Regards

Jeff Boyce
Microsoft Office/Access MVP

lelio.rising said:
Hello, all. I'm having an issue with a database for which I am using
Access
as a front end (MySQL server is where the data is being stored), so I'm
not
sure if this is an Access issue or an SQL issue. Hopefully someone here
can
help or direct me somewhere that can.

I'm creating a database for a department in my organization. I have six
primary tables (not including lookup tables for combo boxes), all of which
should be linked by one field, DemoUniqueID. The people actually doing the
data entry in this db will want this to be as easy as possible for their
use,
but I'm not having much luck with the setup. Is there a way I can auto
populate the DemoUniqueID field in the other 5 tables with the data from
the
first table?

At first I tried using tabs for the forms, but we (IT person and myself)
were having issues with the queries and the language in trying to make all
these forms behave properly (one form wouldn't allow entry; one only
showed
errors, etc.). Currently I have the forms set up so that the other 5 forms
pop up and are supposed to filter based on the record in the main form. As
far as the forms go, it appears to work great, but when I check the
tables,
the DemoUniqueID fields in the other tables all say 0 (which is because I
was
using this expression: =[Forms]![frmDemographics]![DemoUniqueID], which I
know only makes the value appear in the other forms but not on the
tables).

The DemoUniqueID field in the Demographics table is currently an
autonumber,
but not for the other tables.

Thanks for your assistance,
Stacy
 
L

lelio.rising

Oh, also, in theory, each person should only have one record per table, since
all the tables should have the necessary fields to enter all the required
data for the person. Once I finish the test run I could theoretically just
make all the DemoUniqueIDs autonumbers and reset to 1 in MySQL, but I know
this would cause problems were someone to delete a record in one of the
tables, or if for some reason a second record were created for the same
person.

BruceM said:
Presumably there is one top level table with DemoUniqueID, with the other
tables related to it.

tblDem
DemoUniqueID (autonumber primary key, or PK)
Other fields as needed

tblSub1
Sub1_ID (PK)
DemoUniqueID (linking field to tblDem; Long Integer)

and so forth for the other tables.

Make a main form based on tblDem (or a query based on tblDem), with a
subform based on tblSub1. Set the Link Child and Link Master fields of the
subform control to DemoUniqueID. Any record entered in the subform will
have the same DemoUniqueID value as in the main form.

There are other ways to go about this, but your exact intention is not
clear. When you refer to using the expression, how are you using it? Do
you just want to filter existing data, or do you want to enter related
records in the pop-up forms too? For filtering you could set the criteria
for DemoUniqueID in the record source query of the pop-up form to
[Forms]![frmDemographics]![DemoUniqueID]. For adding a new record you could
set the default value of DemoUniqueID to the same expression. However, I
think subforms would be a simpler approach. You can show or hide subforms
as needed, which may have the same effect as using a pop-up form; or you
could put each subform on its same tab.

Your question is very general, so it is difficult confidently to offer
specific suggestions.

lelio.rising said:
Hello, all. I'm having an issue with a database for which I am using
Access
as a front end (MySQL server is where the data is being stored), so I'm
not
sure if this is an Access issue or an SQL issue. Hopefully someone here
can
help or direct me somewhere that can.

I'm creating a database for a department in my organization. I have six
primary tables (not including lookup tables for combo boxes), all of which
should be linked by one field, DemoUniqueID. The people actually doing the
data entry in this db will want this to be as easy as possible for their
use,
but I'm not having much luck with the setup. Is there a way I can auto
populate the DemoUniqueID field in the other 5 tables with the data from
the
first table?

At first I tried using tabs for the forms, but we (IT person and myself)
were having issues with the queries and the language in trying to make all
these forms behave properly (one form wouldn't allow entry; one only
showed
errors, etc.). Currently I have the forms set up so that the other 5 forms
pop up and are supposed to filter based on the record in the main form. As
far as the forms go, it appears to work great, but when I check the
tables,
the DemoUniqueID fields in the other tables all say 0 (which is because I
was
using this expression: =[Forms]![frmDemographics]![DemoUniqueID], which I
know only makes the value appear in the other forms but not on the
tables).

The DemoUniqueID field in the Demographics table is currently an
autonumber,
but not for the other tables.

Thanks for your assistance,
Stacy
 
B

BruceM

I'm not sure I quite understand the structure, but the number of records in
a subform's record source table does not preclude the form/subform
structure. The subform shows only records related to the main form's
current record.

Generally speaking, each subform would have its own query. Rather than
trying all five at once, try one. If that works, add another. When you
speak of "the query" I wonder if you were trying to make a single query work
for all of the subforms.

Hide a subform by hiding the subform control (the "box" containing the
subform) on the main form.

An expression as a Control Source will not be stored. A text box is a
control. A control's source is either stored data from a field in the
form's Record Source, or an expression. Maybe there are some other nuances,
but that is the general idea.

If you are using pop-up forms unassociated with the main form, see Ken's
suggestion for using OpenArgs when you open the form. I suggested using the
[Forms!]![frmDemographics]![DemoUniqueID] expression as the Default Value
property of the control bound to DemoUniqueID. This would be an approach
for adding a new record in a form that is not a subform, as DefaultValue
applies only to new records. In a subform DemoUniqueID is the linking
field, so it is populated automatically.

Do not attempt to use autonumber for DemoUniqueID in the related tables. If
it is autonumber in the main table, it *must* be Long Integer in the related
tables.

Even if they come up with new numbering, I suggest staying with autonumber
rather than trying to update all of the records (while hoping they don't
change the numbering system).

If you are storing "up to ten courses" etc. you should be storing each
record separately rather than creating a table with ten fields that may or
may not be used, again while hoping the number doesn't change in the future.
You can have ten records in the courses table, all of which are related to
the main form's record. Same with semesters, etc. I strongly advise
against the spreadsheet approach. It is likely to cripple you sooner rather
than later. If nothing else it makes searches much more difficult.

lelio.rising said:
Yes, the DemoUniqueID in the Demographics table is the primary key
(currently
set as an autonumber, but this may change depending on the needs of the
people who will be using this database), and the other tables all have
their
own primary keys with DemoUniqueID as the linking field.

All of these forms are pretty big because of the amount of data being
stored
in each table, so I'm not sure subforms would be very viewer or user
friendly
(see my reply to Jeff for specifics). Like I said, earlier we tried using
tabs, with Demographics as the parent table/form and the rest as children,
but we were never able to get the query working so that all of the forms
worked properly. You said,
<i>You can show or hide subforms as needed, which may have the same effect
as using a pop-up form</i>
How would I go about doing this? Is it just an option when adding the
subform (I've never hidden them before; they've always been datasheet view
for my other databases)? That may be the best solution.

The expression =[Forms]![frmDemographics]![DemoUniqueID] I initially had
as
the control source for the DemoUniqueID field in each of the other forms,
but
since this only shows up in the form and not the table, I know that's not
the
expression I need to be using. I have the same expression being used to
show
the first and last names of the students/employees in the forms, which
works
fine (I'll have to either show the ones who will be using this database
how
to run queries to get the information they need for reports or do it
myself
when the time comes). When I added the buttons to the Demographics form, I
selected to specify the records that appear in the form, as opposed to
showing all data entered, with DemoUniqueID <->DemoUniqueID. Records are
still able to be entered in those forms, but they only apply to the record
visible in the Demographics form, so you would need to move to another
record
to enter data in other tables/forms for that person.

Thanks.

BruceM said:
Presumably there is one top level table with DemoUniqueID, with the other
tables related to it.

tblDem
DemoUniqueID (autonumber primary key, or PK)
Other fields as needed

tblSub1
Sub1_ID (PK)
DemoUniqueID (linking field to tblDem; Long Integer)

and so forth for the other tables.

Make a main form based on tblDem (or a query based on tblDem), with a
subform based on tblSub1. Set the Link Child and Link Master fields of
the
subform control to DemoUniqueID. Any record entered in the subform will
have the same DemoUniqueID value as in the main form.

There are other ways to go about this, but your exact intention is not
clear. When you refer to using the expression, how are you using it? Do
you just want to filter existing data, or do you want to enter related
records in the pop-up forms too? For filtering you could set the
criteria
for DemoUniqueID in the record source query of the pop-up form to
[Forms]![frmDemographics]![DemoUniqueID]. For adding a new record you
could
set the default value of DemoUniqueID to the same expression. However, I
think subforms would be a simpler approach. You can show or hide
subforms
as needed, which may have the same effect as using a pop-up form; or you
could put each subform on its same tab.

Your question is very general, so it is difficult confidently to offer
specific suggestions.

lelio.rising said:
Hello, all. I'm having an issue with a database for which I am using
Access
as a front end (MySQL server is where the data is being stored), so I'm
not
sure if this is an Access issue or an SQL issue. Hopefully someone here
can
help or direct me somewhere that can.

I'm creating a database for a department in my organization. I have six
primary tables (not including lookup tables for combo boxes), all of
which
should be linked by one field, DemoUniqueID. The people actually doing
the
data entry in this db will want this to be as easy as possible for
their
use,
but I'm not having much luck with the setup. Is there a way I can auto
populate the DemoUniqueID field in the other 5 tables with the data
from
the
first table?

At first I tried using tabs for the forms, but we (IT person and
myself)
were having issues with the queries and the language in trying to make
all
these forms behave properly (one form wouldn't allow entry; one only
showed
errors, etc.). Currently I have the forms set up so that the other 5
forms
pop up and are supposed to filter based on the record in the main form.
As
far as the forms go, it appears to work great, but when I check the
tables,
the DemoUniqueID fields in the other tables all say 0 (which is because
I
was
using this expression: =[Forms]![frmDemographics]![DemoUniqueID], which
I
know only makes the value appear in the other forms but not on the
tables).

The DemoUniqueID field in the Demographics table is currently an
autonumber,
but not for the other tables.

Thanks for your assistance,
Stacy
 
L

lelio.rising

I don't think I was clear on the record/size thing. I meant the actual number
of fields per table, and therefore the actual image size of each related
table is large (mostly comparable in size to the current size of the
Demographics form), so I don't think visible subforms would be user friendly
in this case, even though I know that probably would be the easiest way to
get the DemoUniqueIDs to cooperate.

Maybe this will help as far as understanding the structure goes:
http://img.photobucket.com/albums/v43/caninecg/frmDemographics.jpg
http://img.photobucket.com/albums/v43/caninecg/frmCourses.jpg
http://img.photobucket.com/albums/v43/caninecg/frmEmploymentVerification.jpg
http://img.photobucket.com/albums/v43/caninecg/frmStipendExpense.jpg
http://img.photobucket.com/albums/v43/caninecg/frmTuition.jpg

The query I was referring to (sorry, that was vague) came from the Query
Builder for the control source when we started out with tabs, so yes, that
did include ALL the tables and all the fields from the tables that would be
visible in the forms, using left joins on each of the tables.

I'm a little confused on the subform control bit--I've been Googling and
scavenging like mad and found a similar suggestion on another message board,
but I can't actually find where the subform control is. Is it the control
source for the subform itself, or is it something in the properties of the
parent form?

I keep looking at Ken's suggestion(I do like the idea of "pushing" the ID
data onto the other tables), but I don't really comprehend it yet. I don't
know where I would put that code. Is that something that would go in the box
that opens up when I click the ellipses where it says Event Procedure?

Right now the only records in the database are test records, so I'll be
resetting the autonumber once Fiscal gives their approval on the final
design, which hopefully, if they do want another ID system, they'll let me
know before the database goes live, but I'll still probably put another auto
increment in the Demographics table if that happens, just in case something
goes wrong with the Demo ID.

When I initially built the tables, they only had one field of each type per
record, and so did the forms, but my coworker who will be using the database
the most said that he and the other directors who will view it would prefer
for all the information to be on one screen, so he doesn't keep scrolling
through records for each person in the other tables. At this point I pretty
much have to give them what they want in terms of appearance; I doubt they'll
know or care about the underlying data structure, as long as it looks pretty.

I won't be using spreadsheet view in this database; for the other databases
where I do use it, those tables are just recording course attendance records.


BruceM said:
I'm not sure I quite understand the structure, but the number of records in
a subform's record source table does not preclude the form/subform
structure. The subform shows only records related to the main form's
current record.

Generally speaking, each subform would have its own query. Rather than
trying all five at once, try one. If that works, add another. When you
speak of "the query" I wonder if you were trying to make a single query work
for all of the subforms.

Hide a subform by hiding the subform control (the "box" containing the
subform) on the main form.

An expression as a Control Source will not be stored. A text box is a
control. A control's source is either stored data from a field in the
form's Record Source, or an expression. Maybe there are some other nuances,
but that is the general idea.

If you are using pop-up forms unassociated with the main form, see Ken's
suggestion for using OpenArgs when you open the form. I suggested using the
[Forms!]![frmDemographics]![DemoUniqueID] expression as the Default Value
property of the control bound to DemoUniqueID. This would be an approach
for adding a new record in a form that is not a subform, as DefaultValue
applies only to new records. In a subform DemoUniqueID is the linking
field, so it is populated automatically.

Do not attempt to use autonumber for DemoUniqueID in the related tables. If
it is autonumber in the main table, it *must* be Long Integer in the related
tables.

Even if they come up with new numbering, I suggest staying with autonumber
rather than trying to update all of the records (while hoping they don't
change the numbering system).

If you are storing "up to ten courses" etc. you should be storing each
record separately rather than creating a table with ten fields that may or
may not be used, again while hoping the number doesn't change in the future.
You can have ten records in the courses table, all of which are related to
the main form's record. Same with semesters, etc. I strongly advise
against the spreadsheet approach. It is likely to cripple you sooner rather
than later. If nothing else it makes searches much more difficult.
 
L

lelio.rising

I don't think I was clear on the record/size thing. I meant the actual number
of fields per table, and therefore the actual image size of each related
table is large (mostly comparable in size to the current size of the
Demographics form), so I don't think visible subforms would be user friendly
in this case, even though I know that probably would be the easiest way to
get the DemoUniqueIDs to cooperate.

Maybe this will help as far as understanding the structure goes:
http://img.photobucket.com/albums/v43/caninecg/frmDemographics.jpg
http://img.photobucket.com/albums/v43/caninecg/frmCourses.jpg
http://img.photobucket.com/albums/v43/caninecg/frmEmploymentVerification.jpg
http://img.photobucket.com/albums/v43/caninecg/frmStipendExpense.jpg
http://img.photobucket.com/albums/v43/caninecg/frmTuition.jpg

The query I was referring to (sorry, that was vague) came from the Query
Builder for the control source when we started out with tabs, so yes, that
did include ALL the tables and all the fields from the tables that would be
visible in the forms, using left joins on each of the tables.

I'm a little confused on the subform control bit--I've been Googling and
scavenging like mad and found a similar suggestion on another message board,
but I can't actually find where the subform control is. Is it the control
source for the subform itself, or is it something in the properties of the
parent form?

I keep looking at Ken's suggestion(I do like the idea of "pushing" the ID
data onto the other tables), but I don't really comprehend it yet. I don't
know where I would put that code. Is that something that would go in the box
that opens up when I click the ellipses where it says Event Procedure?

Right now the only records in the database are test records, so I'll be
resetting the autonumber once Fiscal gives their approval on the final
design, which hopefully, if they do want another ID system, they'll let me
know before the database goes live, but I'll still probably put another auto
increment in the Demographics table if that happens, just in case something
goes wrong with the Demo ID.

When I initially built the tables, they only had one field of each type per
record, and so did the forms, but my coworker who will be using the database
the most said that he and the other directors who will view it would prefer
for all the information to be on one screen, so he doesn't keep scrolling
through records for each person in the other tables. At this point I pretty
much have to give them what they want in terms of appearance; I doubt they'll
know or care about the underlying data structure, as long as it looks pretty.

I won't be using spreadsheet view in this database; for the other databases
where I do use it, those tables are just recording course attendance records.

BruceM said:
I'm not sure I quite understand the structure, but the number of records in
a subform's record source table does not preclude the form/subform
structure. The subform shows only records related to the main form's
current record.

Generally speaking, each subform would have its own query. Rather than
trying all five at once, try one. If that works, add another. When you
speak of "the query" I wonder if you were trying to make a single query work
for all of the subforms.

Hide a subform by hiding the subform control (the "box" containing the
subform) on the main form.

An expression as a Control Source will not be stored. A text box is a
control. A control's source is either stored data from a field in the
form's Record Source, or an expression. Maybe there are some other nuances,
but that is the general idea.

If you are using pop-up forms unassociated with the main form, see Ken's
suggestion for using OpenArgs when you open the form. I suggested using the
[Forms!]![frmDemographics]![DemoUniqueID] expression as the Default Value
property of the control bound to DemoUniqueID. This would be an approach
for adding a new record in a form that is not a subform, as DefaultValue
applies only to new records. In a subform DemoUniqueID is the linking
field, so it is populated automatically.

Do not attempt to use autonumber for DemoUniqueID in the related tables. If
it is autonumber in the main table, it *must* be Long Integer in the related
tables.

Even if they come up with new numbering, I suggest staying with autonumber
rather than trying to update all of the records (while hoping they don't
change the numbering system).

If you are storing "up to ten courses" etc. you should be storing each
record separately rather than creating a table with ten fields that may or
may not be used, again while hoping the number doesn't change in the future.
You can have ten records in the courses table, all of which are related to
the main form's record. Same with semesters, etc. I strongly advise
against the spreadsheet approach. It is likely to cripple you sooner rather
than later. If nothing else it makes searches much more difficult.
 
L

lelio.rising

Thanks for your response. Yes, I think ultimately "pushing" the data is what
I would like to do with these fields, since trying to pull it from the other
table doesn't seem to be giving me what I want.

I'm a bit confused about your suggestion though. Where do the codes go? In
the box that pops up from the ellipses beside and Event Procedure command on
the property sheet? Also, I can't figure out how to open the form in
dialogue view. Would that be a property I would add to the buttons on the
main form or on the other forms themselves? I've been coming through the
property sheets and can't seem to figure it out.

The tabs didn't work out well; even though they were subforms and therefore
automatically populated that linking field, a lot of the fields would not
allow data to be entered, pulling the name data from the Demo form didn't
always work (those fields are not in the other tables, just on the form so
the ones using the database will know whose records they are working on
without having to remember the IDs). As I said to Bruce, in the query builder
for the form control source at that point, we (IT person and myself) had put
all the fields that would be displayed from all the tables into the query,
and used left joins on the tables.
 
B

BruceM

STOP.

I thought I understood the structure. The screen shots confirmed it. You
absolutely should not store informatioin in field names, which is what you
are doing with Semester1 and the like. To take Courses as an example, this
should be your table structure:

tblCourses
CoursesID (autonumber PK)
DemoUniqueID (link to tblDemo)
Semester
CourseNumber
CourseName
Grade

That's all. Let's say DemoUniqueID from tblDemo is 50. If you are
recording ten Semesters there will be ten records in tblCourse with 50 as
the DemoUniqueID value. These records are related to the tblDemo record
with DemoUniqueID 50. I don't quite understand why there is just one course
per semester, or I don't remember from your explanation, but that doesn't
matter for now.

No other way of structuring this is really worth considering.

A control, just to be clear, is just about anything you can place on a form:
text box, combo box, line, label, and so forth. One type of control is a
tab control, which can have quite a few individual pages (I don't recall if
there is a limitation, but if so you are not likely to reach it). You can
place your main form text boxes, labels, and so forth on one page of the tab
control. Another type of control is a subform control, which is a
"container" for a subform. Place a subform control for Courses on one tab,
Tuition on another, and so forth. Design your subforms separately, as
individual forms, then use them as the Source Objects for the various
subform controls.

This is one way. Another is to use OpenArgs to open pop-up forms, as Ken
suggested. The code he posted would be in the Click event of the command
button that opens the form.

You can give people what they want, but you absolutely must control the
structure. You cannot have satisfactory results if you start with the forms
and try to build a structure to support them. You need to start with the
structure. It is more than I can get into here, but you will be doing
yourself a favor if you do some investigating into design principles and
other structural stuff. Once good source is here:
http://allenbrowne.com/casu-22.html

I have had people tell me they need data copied from one place to another
within the database, and I just agree. What they see gives them what they
want, but the underlying structure is sound, which it would not be if I
literally followed their instructions. For displaying ten (or whatever)
semesters worth of courses using the structure I have described, use a
continuous form as the default view for either the subform or the pop-up
form, depending on your approach.


lelio.rising said:
I don't think I was clear on the record/size thing. I meant the actual
number
of fields per table, and therefore the actual image size of each related
table is large (mostly comparable in size to the current size of the
Demographics form), so I don't think visible subforms would be user
friendly
in this case, even though I know that probably would be the easiest way to
get the DemoUniqueIDs to cooperate.

Maybe this will help as far as understanding the structure goes:
http://img.photobucket.com/albums/v43/caninecg/frmDemographics.jpg
http://img.photobucket.com/albums/v43/caninecg/frmCourses.jpg
http://img.photobucket.com/albums/v43/caninecg/frmEmploymentVerification.jpg
http://img.photobucket.com/albums/v43/caninecg/frmStipendExpense.jpg
http://img.photobucket.com/albums/v43/caninecg/frmTuition.jpg

The query I was referring to (sorry, that was vague) came from the Query
Builder for the control source when we started out with tabs, so yes, that
did include ALL the tables and all the fields from the tables that would
be
visible in the forms, using left joins on each of the tables.

I'm a little confused on the subform control bit--I've been Googling and
scavenging like mad and found a similar suggestion on another message
board,
but I can't actually find where the subform control is. Is it the control
source for the subform itself, or is it something in the properties of the
parent form?

I keep looking at Ken's suggestion(I do like the idea of "pushing" the ID
data onto the other tables), but I don't really comprehend it yet. I don't
know where I would put that code. Is that something that would go in the
box
that opens up when I click the ellipses where it says Event Procedure?

Right now the only records in the database are test records, so I'll be
resetting the autonumber once Fiscal gives their approval on the final
design, which hopefully, if they do want another ID system, they'll let me
know before the database goes live, but I'll still probably put another
auto
increment in the Demographics table if that happens, just in case
something
goes wrong with the Demo ID.

When I initially built the tables, they only had one field of each type
per
record, and so did the forms, but my coworker who will be using the
database
the most said that he and the other directors who will view it would
prefer
for all the information to be on one screen, so he doesn't keep scrolling
through records for each person in the other tables. At this point I
pretty
much have to give them what they want in terms of appearance; I doubt
they'll
know or care about the underlying data structure, as long as it looks
pretty.

I won't be using spreadsheet view in this database; for the other
databases
where I do use it, those tables are just recording course attendance
records.


BruceM said:
I'm not sure I quite understand the structure, but the number of records
in
a subform's record source table does not preclude the form/subform
structure. The subform shows only records related to the main form's
current record.

Generally speaking, each subform would have its own query. Rather than
trying all five at once, try one. If that works, add another. When you
speak of "the query" I wonder if you were trying to make a single query
work
for all of the subforms.

Hide a subform by hiding the subform control (the "box" containing the
subform) on the main form.

An expression as a Control Source will not be stored. A text box is a
control. A control's source is either stored data from a field in the
form's Record Source, or an expression. Maybe there are some other
nuances,
but that is the general idea.

If you are using pop-up forms unassociated with the main form, see Ken's
suggestion for using OpenArgs when you open the form. I suggested using
the
[Forms!]![frmDemographics]![DemoUniqueID] expression as the Default Value
property of the control bound to DemoUniqueID. This would be an approach
for adding a new record in a form that is not a subform, as DefaultValue
applies only to new records. In a subform DemoUniqueID is the linking
field, so it is populated automatically.

Do not attempt to use autonumber for DemoUniqueID in the related tables.
If
it is autonumber in the main table, it *must* be Long Integer in the
related
tables.

Even if they come up with new numbering, I suggest staying with
autonumber
rather than trying to update all of the records (while hoping they don't
change the numbering system).

If you are storing "up to ten courses" etc. you should be storing each
record separately rather than creating a table with ten fields that may
or
may not be used, again while hoping the number doesn't change in the
future.
You can have ten records in the courses table, all of which are related
to
the main form's record. Same with semesters, etc. I strongly advise
against the spreadsheet approach. It is likely to cripple you sooner
rather
than later. If nothing else it makes searches much more difficult.
 
L

lelio.rising

I know the Semester1-10 stuff is messy, and it's why the tables are all so
huge. As far as the 1 course per semester goes, that table is only meant to
show courses the student received a failing/unacceptable grade in, which
under no circumstances should be more than 10 (we're keeping up with social
work students and the amount of tuition and stipend payments doled out, so if
they fail 10 courses, that essentially means they've failed the entire
program). For the semester data I have a drop down list showing the
semesters from Spring '04 to Fall '14, so if a student were to fail two
courses in a semester, you would still be able to show that both courses were
from Fall 08, etc.

tblCourses
CoursesID (autonumber PK)
DemoUniqueID (link to tblDemo)
Semester
CourseNumber
CourseName
Grade

^^ This was the original structure of the tables. I would like to do what
you've suggested as far as a continuous form goes; I assume that means it
would show all the records for one person in a table (the way it does now),
but it's really storing them as different records in the same fields?

I'll check out that website and continue trying to work out everyone's
suggestions. Thanks.

BruceM said:
STOP.

I thought I understood the structure. The screen shots confirmed it. You
absolutely should not store informatioin in field names, which is what you
are doing with Semester1 and the like. To take Courses as an example, this
should be your table structure:

tblCourses
CoursesID (autonumber PK)
DemoUniqueID (link to tblDemo)
Semester
CourseNumber
CourseName
Grade

That's all. Let's say DemoUniqueID from tblDemo is 50. If you are
recording ten Semesters there will be ten records in tblCourse with 50 as
the DemoUniqueID value. These records are related to the tblDemo record
with DemoUniqueID 50. I don't quite understand why there is just one course
per semester, or I don't remember from your explanation, but that doesn't
matter for now.

No other way of structuring this is really worth considering.

A control, just to be clear, is just about anything you can place on a form:
text box, combo box, line, label, and so forth. One type of control is a
tab control, which can have quite a few individual pages (I don't recall if
there is a limitation, but if so you are not likely to reach it). You can
place your main form text boxes, labels, and so forth on one page of the tab
control. Another type of control is a subform control, which is a
"container" for a subform. Place a subform control for Courses on one tab,
Tuition on another, and so forth. Design your subforms separately, as
individual forms, then use them as the Source Objects for the various
subform controls.

This is one way. Another is to use OpenArgs to open pop-up forms, as Ken
suggested. The code he posted would be in the Click event of the command
button that opens the form.

You can give people what they want, but you absolutely must control the
structure. You cannot have satisfactory results if you start with the forms
and try to build a structure to support them. You need to start with the
structure. It is more than I can get into here, but you will be doing
yourself a favor if you do some investigating into design principles and
other structural stuff. Once good source is here:
http://allenbrowne.com/casu-22.html

I have had people tell me they need data copied from one place to another
within the database, and I just agree. What they see gives them what they
want, but the underlying structure is sound, which it would not be if I
literally followed their instructions. For displaying ten (or whatever)
semesters worth of courses using the structure I have described, use a
continuous form as the default view for either the subform or the pop-up
form, depending on your approach.


lelio.rising said:
I don't think I was clear on the record/size thing. I meant the actual
number
of fields per table, and therefore the actual image size of each related
table is large (mostly comparable in size to the current size of the
Demographics form), so I don't think visible subforms would be user
friendly
in this case, even though I know that probably would be the easiest way to
get the DemoUniqueIDs to cooperate.

Maybe this will help as far as understanding the structure goes:
http://img.photobucket.com/albums/v43/caninecg/frmDemographics.jpg
http://img.photobucket.com/albums/v43/caninecg/frmCourses.jpg
http://img.photobucket.com/albums/v43/caninecg/frmEmploymentVerification.jpg
http://img.photobucket.com/albums/v43/caninecg/frmStipendExpense.jpg
http://img.photobucket.com/albums/v43/caninecg/frmTuition.jpg

The query I was referring to (sorry, that was vague) came from the Query
Builder for the control source when we started out with tabs, so yes, that
did include ALL the tables and all the fields from the tables that would
be
visible in the forms, using left joins on each of the tables.

I'm a little confused on the subform control bit--I've been Googling and
scavenging like mad and found a similar suggestion on another message
board,
but I can't actually find where the subform control is. Is it the control
source for the subform itself, or is it something in the properties of the
parent form?

I keep looking at Ken's suggestion(I do like the idea of "pushing" the ID
data onto the other tables), but I don't really comprehend it yet. I don't
know where I would put that code. Is that something that would go in the
box
that opens up when I click the ellipses where it says Event Procedure?

Right now the only records in the database are test records, so I'll be
resetting the autonumber once Fiscal gives their approval on the final
design, which hopefully, if they do want another ID system, they'll let me
know before the database goes live, but I'll still probably put another
auto
increment in the Demographics table if that happens, just in case
something
goes wrong with the Demo ID.

When I initially built the tables, they only had one field of each type
per
record, and so did the forms, but my coworker who will be using the
database
the most said that he and the other directors who will view it would
prefer
for all the information to be on one screen, so he doesn't keep scrolling
through records for each person in the other tables. At this point I
pretty
much have to give them what they want in terms of appearance; I doubt
they'll
know or care about the underlying data structure, as long as it looks
pretty.

I won't be using spreadsheet view in this database; for the other
databases
where I do use it, those tables are just recording course attendance
records.


BruceM said:
I'm not sure I quite understand the structure, but the number of records
in
a subform's record source table does not preclude the form/subform
structure. The subform shows only records related to the main form's
current record.

Generally speaking, each subform would have its own query. Rather than
trying all five at once, try one. If that works, add another. When you
speak of "the query" I wonder if you were trying to make a single query
work
for all of the subforms.

Hide a subform by hiding the subform control (the "box" containing the
subform) on the main form.

An expression as a Control Source will not be stored. A text box is a
control. A control's source is either stored data from a field in the
form's Record Source, or an expression. Maybe there are some other
nuances,
but that is the general idea.

If you are using pop-up forms unassociated with the main form, see Ken's
suggestion for using OpenArgs when you open the form. I suggested using
the
[Forms!]![frmDemographics]![DemoUniqueID] expression as the Default Value
property of the control bound to DemoUniqueID. This would be an approach
for adding a new record in a form that is not a subform, as DefaultValue
applies only to new records. In a subform DemoUniqueID is the linking
field, so it is populated automatically.

Do not attempt to use autonumber for DemoUniqueID in the related tables.
If
it is autonumber in the main table, it *must* be Long Integer in the
related
tables.

Even if they come up with new numbering, I suggest staying with
autonumber
rather than trying to update all of the records (while hoping they don't
change the numbering system).

If you are storing "up to ten courses" etc. you should be storing each
record separately rather than creating a table with ten fields that may
or
may not be used, again while hoping the number doesn't change in the
future.
You can have ten records in the courses table, all of which are related
to
the main form's record. Same with semesters, etc. I strongly advise
against the spreadsheet approach. It is likely to cripple you sooner
rather
than later. If nothing else it makes searches much more difficult.
 
B

BruceM

OK, I see what's happening with the semesters. Makes sense now.

A continuous form is as you have surmised. It shows separate records one
below the other. You can show as many as will fit in the space you have
made available in the subform control. Once the structure is set up you can
do all sorts of things such as find all students who have, say, five or more
"black marks", or whatever criteria you choose to apply, much more easily
and flexibly than if you have all the data stuffed into a single record.

lelio.rising said:
I know the Semester1-10 stuff is messy, and it's why the tables are all so
huge. As far as the 1 course per semester goes, that table is only meant
to
show courses the student received a failing/unacceptable grade in, which
under no circumstances should be more than 10 (we're keeping up with
social
work students and the amount of tuition and stipend payments doled out, so
if
they fail 10 courses, that essentially means they've failed the entire
program). For the semester data I have a drop down list showing the
semesters from Spring '04 to Fall '14, so if a student were to fail two
courses in a semester, you would still be able to show that both courses
were
from Fall 08, etc.

tblCourses
CoursesID (autonumber PK)
DemoUniqueID (link to tblDemo)
Semester
CourseNumber
CourseName
Grade

^^ This was the original structure of the tables. I would like to do what
you've suggested as far as a continuous form goes; I assume that means it
would show all the records for one person in a table (the way it does
now),
but it's really storing them as different records in the same fields?

I'll check out that website and continue trying to work out everyone's
suggestions. Thanks.

BruceM said:
STOP.

I thought I understood the structure. The screen shots confirmed it.
You
absolutely should not store informatioin in field names, which is what
you
are doing with Semester1 and the like. To take Courses as an example,
this
should be your table structure:

tblCourses
CoursesID (autonumber PK)
DemoUniqueID (link to tblDemo)
Semester
CourseNumber
CourseName
Grade

That's all. Let's say DemoUniqueID from tblDemo is 50. If you are
recording ten Semesters there will be ten records in tblCourse with 50 as
the DemoUniqueID value. These records are related to the tblDemo record
with DemoUniqueID 50. I don't quite understand why there is just one
course
per semester, or I don't remember from your explanation, but that doesn't
matter for now.

No other way of structuring this is really worth considering.

A control, just to be clear, is just about anything you can place on a
form:
text box, combo box, line, label, and so forth. One type of control is a
tab control, which can have quite a few individual pages (I don't recall
if
there is a limitation, but if so you are not likely to reach it). You
can
place your main form text boxes, labels, and so forth on one page of the
tab
control. Another type of control is a subform control, which is a
"container" for a subform. Place a subform control for Courses on one
tab,
Tuition on another, and so forth. Design your subforms separately, as
individual forms, then use them as the Source Objects for the various
subform controls.

This is one way. Another is to use OpenArgs to open pop-up forms, as Ken
suggested. The code he posted would be in the Click event of the command
button that opens the form.

You can give people what they want, but you absolutely must control the
structure. You cannot have satisfactory results if you start with the
forms
and try to build a structure to support them. You need to start with the
structure. It is more than I can get into here, but you will be doing
yourself a favor if you do some investigating into design principles and
other structural stuff. Once good source is here:
http://allenbrowne.com/casu-22.html

I have had people tell me they need data copied from one place to another
within the database, and I just agree. What they see gives them what
they
want, but the underlying structure is sound, which it would not be if I
literally followed their instructions. For displaying ten (or whatever)
semesters worth of courses using the structure I have described, use a
continuous form as the default view for either the subform or the pop-up
form, depending on your approach.


lelio.rising said:
I don't think I was clear on the record/size thing. I meant the actual
number
of fields per table, and therefore the actual image size of each
related
table is large (mostly comparable in size to the current size of the
Demographics form), so I don't think visible subforms would be user
friendly
in this case, even though I know that probably would be the easiest way
to
get the DemoUniqueIDs to cooperate.

Maybe this will help as far as understanding the structure goes:
http://img.photobucket.com/albums/v43/caninecg/frmDemographics.jpg
http://img.photobucket.com/albums/v43/caninecg/frmCourses.jpg
http://img.photobucket.com/albums/v43/caninecg/frmEmploymentVerification.jpg
http://img.photobucket.com/albums/v43/caninecg/frmStipendExpense.jpg
http://img.photobucket.com/albums/v43/caninecg/frmTuition.jpg

The query I was referring to (sorry, that was vague) came from the
Query
Builder for the control source when we started out with tabs, so yes,
that
did include ALL the tables and all the fields from the tables that
would
be
visible in the forms, using left joins on each of the tables.

I'm a little confused on the subform control bit--I've been Googling
and
scavenging like mad and found a similar suggestion on another message
board,
but I can't actually find where the subform control is. Is it the
control
source for the subform itself, or is it something in the properties of
the
parent form?

I keep looking at Ken's suggestion(I do like the idea of "pushing" the
ID
data onto the other tables), but I don't really comprehend it yet. I
don't
know where I would put that code. Is that something that would go in
the
box
that opens up when I click the ellipses where it says Event Procedure?

Right now the only records in the database are test records, so I'll be
resetting the autonumber once Fiscal gives their approval on the final
design, which hopefully, if they do want another ID system, they'll let
me
know before the database goes live, but I'll still probably put another
auto
increment in the Demographics table if that happens, just in case
something
goes wrong with the Demo ID.

When I initially built the tables, they only had one field of each type
per
record, and so did the forms, but my coworker who will be using the
database
the most said that he and the other directors who will view it would
prefer
for all the information to be on one screen, so he doesn't keep
scrolling
through records for each person in the other tables. At this point I
pretty
much have to give them what they want in terms of appearance; I doubt
they'll
know or care about the underlying data structure, as long as it looks
pretty.

I won't be using spreadsheet view in this database; for the other
databases
where I do use it, those tables are just recording course attendance
records.


:

I'm not sure I quite understand the structure, but the number of
records
in
a subform's record source table does not preclude the form/subform
structure. The subform shows only records related to the main form's
current record.

Generally speaking, each subform would have its own query. Rather
than
trying all five at once, try one. If that works, add another. When
you
speak of "the query" I wonder if you were trying to make a single
query
work
for all of the subforms.

Hide a subform by hiding the subform control (the "box" containing the
subform) on the main form.

An expression as a Control Source will not be stored. A text box is a
control. A control's source is either stored data from a field in the
form's Record Source, or an expression. Maybe there are some other
nuances,
but that is the general idea.

If you are using pop-up forms unassociated with the main form, see
Ken's
suggestion for using OpenArgs when you open the form. I suggested
using
the
[Forms!]![frmDemographics]![DemoUniqueID] expression as the Default
Value
property of the control bound to DemoUniqueID. This would be an
approach
for adding a new record in a form that is not a subform, as
DefaultValue
applies only to new records. In a subform DemoUniqueID is the linking
field, so it is populated automatically.

Do not attempt to use autonumber for DemoUniqueID in the related
tables.
If
it is autonumber in the main table, it *must* be Long Integer in the
related
tables.

Even if they come up with new numbering, I suggest staying with
autonumber
rather than trying to update all of the records (while hoping they
don't
change the numbering system).

If you are storing "up to ten courses" etc. you should be storing each
record separately rather than creating a table with ten fields that
may
or
may not be used, again while hoping the number doesn't change in the
future.
You can have ten records in the courses table, all of which are
related
to
the main form's record. Same with semesters, etc. I strongly advise
against the spreadsheet approach. It is likely to cripple you sooner
rather
than later. If nothing else it makes searches much more difficult.
 
L

lelio.rising

The continuous form works great; thanks for the tip. I'm going to modify all
the relevant forms to this format and fix and re-link the tables, then get
back to the DemoID issue.

BruceM said:
OK, I see what's happening with the semesters. Makes sense now.

A continuous form is as you have surmised. It shows separate records one
below the other. You can show as many as will fit in the space you have
made available in the subform control. Once the structure is set up you can
do all sorts of things such as find all students who have, say, five or more
"black marks", or whatever criteria you choose to apply, much more easily
and flexibly than if you have all the data stuffed into a single record.

lelio.rising said:
I know the Semester1-10 stuff is messy, and it's why the tables are all so
huge. As far as the 1 course per semester goes, that table is only meant
to
show courses the student received a failing/unacceptable grade in, which
under no circumstances should be more than 10 (we're keeping up with
social
work students and the amount of tuition and stipend payments doled out, so
if
they fail 10 courses, that essentially means they've failed the entire
program). For the semester data I have a drop down list showing the
semesters from Spring '04 to Fall '14, so if a student were to fail two
courses in a semester, you would still be able to show that both courses
were
from Fall 08, etc.

tblCourses
CoursesID (autonumber PK)
DemoUniqueID (link to tblDemo)
Semester
CourseNumber
CourseName
Grade

^^ This was the original structure of the tables. I would like to do what
you've suggested as far as a continuous form goes; I assume that means it
would show all the records for one person in a table (the way it does
now),
but it's really storing them as different records in the same fields?

I'll check out that website and continue trying to work out everyone's
suggestions. Thanks.

BruceM said:
STOP.

I thought I understood the structure. The screen shots confirmed it.
You
absolutely should not store informatioin in field names, which is what
you
are doing with Semester1 and the like. To take Courses as an example,
this
should be your table structure:

tblCourses
CoursesID (autonumber PK)
DemoUniqueID (link to tblDemo)
Semester
CourseNumber
CourseName
Grade

That's all. Let's say DemoUniqueID from tblDemo is 50. If you are
recording ten Semesters there will be ten records in tblCourse with 50 as
the DemoUniqueID value. These records are related to the tblDemo record
with DemoUniqueID 50. I don't quite understand why there is just one
course
per semester, or I don't remember from your explanation, but that doesn't
matter for now.

No other way of structuring this is really worth considering.

A control, just to be clear, is just about anything you can place on a
form:
text box, combo box, line, label, and so forth. One type of control is a
tab control, which can have quite a few individual pages (I don't recall
if
there is a limitation, but if so you are not likely to reach it). You
can
place your main form text boxes, labels, and so forth on one page of the
tab
control. Another type of control is a subform control, which is a
"container" for a subform. Place a subform control for Courses on one
tab,
Tuition on another, and so forth. Design your subforms separately, as
individual forms, then use them as the Source Objects for the various
subform controls.

This is one way. Another is to use OpenArgs to open pop-up forms, as Ken
suggested. The code he posted would be in the Click event of the command
button that opens the form.

You can give people what they want, but you absolutely must control the
structure. You cannot have satisfactory results if you start with the
forms
and try to build a structure to support them. You need to start with the
structure. It is more than I can get into here, but you will be doing
yourself a favor if you do some investigating into design principles and
other structural stuff. Once good source is here:
http://allenbrowne.com/casu-22.html

I have had people tell me they need data copied from one place to another
within the database, and I just agree. What they see gives them what
they
want, but the underlying structure is sound, which it would not be if I
literally followed their instructions. For displaying ten (or whatever)
semesters worth of courses using the structure I have described, use a
continuous form as the default view for either the subform or the pop-up
form, depending on your approach.


I don't think I was clear on the record/size thing. I meant the actual
number
of fields per table, and therefore the actual image size of each
related
table is large (mostly comparable in size to the current size of the
Demographics form), so I don't think visible subforms would be user
friendly
in this case, even though I know that probably would be the easiest way
to
get the DemoUniqueIDs to cooperate.

Maybe this will help as far as understanding the structure goes:
http://img.photobucket.com/albums/v43/caninecg/frmDemographics.jpg
http://img.photobucket.com/albums/v43/caninecg/frmCourses.jpg
http://img.photobucket.com/albums/v43/caninecg/frmEmploymentVerification.jpg
http://img.photobucket.com/albums/v43/caninecg/frmStipendExpense.jpg
http://img.photobucket.com/albums/v43/caninecg/frmTuition.jpg

The query I was referring to (sorry, that was vague) came from the
Query
Builder for the control source when we started out with tabs, so yes,
that
did include ALL the tables and all the fields from the tables that
would
be
visible in the forms, using left joins on each of the tables.

I'm a little confused on the subform control bit--I've been Googling
and
scavenging like mad and found a similar suggestion on another message
board,
but I can't actually find where the subform control is. Is it the
control
source for the subform itself, or is it something in the properties of
the
parent form?

I keep looking at Ken's suggestion(I do like the idea of "pushing" the
ID
data onto the other tables), but I don't really comprehend it yet. I
don't
know where I would put that code. Is that something that would go in
the
box
that opens up when I click the ellipses where it says Event Procedure?

Right now the only records in the database are test records, so I'll be
resetting the autonumber once Fiscal gives their approval on the final
design, which hopefully, if they do want another ID system, they'll let
me
know before the database goes live, but I'll still probably put another
auto
increment in the Demographics table if that happens, just in case
something
goes wrong with the Demo ID.

When I initially built the tables, they only had one field of each type
per
record, and so did the forms, but my coworker who will be using the
database
the most said that he and the other directors who will view it would
prefer
for all the information to be on one screen, so he doesn't keep
scrolling
through records for each person in the other tables. At this point I
pretty
much have to give them what they want in terms of appearance; I doubt
they'll
know or care about the underlying data structure, as long as it looks
pretty.

I won't be using spreadsheet view in this database; for the other
databases
where I do use it, those tables are just recording course attendance
records.


:

I'm not sure I quite understand the structure, but the number of
records
in
a subform's record source table does not preclude the form/subform
structure. The subform shows only records related to the main form's
current record.

Generally speaking, each subform would have its own query. Rather
than
trying all five at once, try one. If that works, add another. When
you
speak of "the query" I wonder if you were trying to make a single
query
work
for all of the subforms.

Hide a subform by hiding the subform control (the "box" containing the
subform) on the main form.

An expression as a Control Source will not be stored. A text box is a
control. A control's source is either stored data from a field in the
form's Record Source, or an expression. Maybe there are some other
nuances,
but that is the general idea.

If you are using pop-up forms unassociated with the main form, see
Ken's
suggestion for using OpenArgs when you open the form. I suggested
using
the
[Forms!]![frmDemographics]![DemoUniqueID] expression as the Default
Value
property of the control bound to DemoUniqueID. This would be an
approach
for adding a new record in a form that is not a subform, as
DefaultValue
applies only to new records. In a subform DemoUniqueID is the linking
field, so it is populated automatically.

Do not attempt to use autonumber for DemoUniqueID in the related
tables.
If
it is autonumber in the main table, it *must* be Long Integer in the
related
tables.

Even if they come up with new numbering, I suggest staying with
autonumber
rather than trying to update all of the records (while hoping they
don't
change the numbering system).

If you are storing "up to ten courses" etc. you should be storing each
record separately rather than creating a table with ten fields that
may
or
may not be used, again while hoping the number doesn't change in the
future.
You can have ten records in the courses table, all of which are
related
to
the main form's record. Same with semesters, etc. I strongly advise
against the spreadsheet approach. It is likely to cripple you sooner
rather
than later. If nothing else it makes searches much more difficult.
 

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