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 » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Query with common fields to all records



 
 
Thread Tools Display Modes
  #1  
Old December 5th, 2009, 04:04 PM posted to microsoft.public.access.queries
Prohock
external usenet poster
 
Posts: 37
Default Query with common fields to all records

I have a query that is collecting information from three tables. One table
has infromation about each student and another table is an incident table and
these tables are linked together using a student id number. The third table
is the school information that I want common to all fields in my query (this
data is only entered once for each school when the data base is first opened)
How do I link the school information data to every record in my query when
there is no common linked field?
  #2  
Old December 5th, 2009, 05:15 PM posted to microsoft.public.access.queries
Lynn Trapp[_4_]
external usenet poster
 
Posts: 9
Default Query with common fields to all records

You should add a field to the student table that can be used to link to the
school table. Is there some reason that this doesn't already exist?

--
Lynn Trapp
Trainer/Application Developer


"Prohock" wrote in message
...
I have a query that is collecting information from three tables. One table
has infromation about each student and another table is an incident table
and
these tables are linked together using a student id number. The third
table
is the school information that I want common to all fields in my query
(this
data is only entered once for each school when the data base is first
opened)
How do I link the school information data to every record in my query when
there is no common linked field?


  #3  
Old December 5th, 2009, 11:31 PM posted to microsoft.public.access.queries
Prohock
external usenet poster
 
Posts: 37
Default Query with common fields to all records

I have added the field [School] in the student table and I want that field to
be the same as the one record that is entered in the school informaton table
that includes the [School] field. I don't want the user to have to enter the
school for every student, I want it to automatically put the school in for
each student.

"Lynn Trapp" wrote:

You should add a field to the student table that can be used to link to the
school table. Is there some reason that this doesn't already exist?

--
Lynn Trapp
Trainer/Application Developer


"Prohock" wrote in message
...
I have a query that is collecting information from three tables. One table
has infromation about each student and another table is an incident table
and
these tables are linked together using a student id number. The third
table
is the school information that I want common to all fields in my query
(this
data is only entered once for each school when the data base is first
opened)
How do I link the school information data to every record in my query when
there is no common linked field?


  #4  
Old December 6th, 2009, 01:27 AM posted to microsoft.public.access.queries
Lynn Trapp[_4_]
external usenet poster
 
Posts: 9
Default Query with common fields to all records

Either create a form for the school and make the student form a subform of
that or, else, use a combo box to select the school for each student.

--
Lynn Trapp
Trainer/Application Developer


"Prohock" wrote in message
...
I have added the field [School] in the student table and I want that field
to
be the same as the one record that is entered in the school informaton
table
that includes the [School] field. I don't want the user to have to enter
the
school for every student, I want it to automatically put the school in for
each student.

"Lynn Trapp" wrote:

You should add a field to the student table that can be used to link to
the
school table. Is there some reason that this doesn't already exist?

--
Lynn Trapp
Trainer/Application Developer


"Prohock" wrote in message
...
I have a query that is collecting information from three tables. One
table
has infromation about each student and another table is an incident
table
and
these tables are linked together using a student id number. The third
table
is the school information that I want common to all fields in my query
(this
data is only entered once for each school when the data base is first
opened)
How do I link the school information data to every record in my query
when
there is no common linked field?



  #5  
Old December 6th, 2009, 04:08 PM posted to microsoft.public.access.queries
Bob Barrows
external usenet poster
 
Posts: 475
Default Query with common fields to all records

Prohock wrote:
I have a query that is collecting information from three tables. One
table has infromation about each student and another table is an
incident table and these tables are linked together using a student
id number. The third table is the school information that I want
common to all fields in my query (this data is only entered once for
each school when the data base is first opened) How do I link the
school information data to every record in my query when there is no
common linked field?


You should probably do as the others suggested and add a school id to the
students table so the students are linked to the school. The only exception
is if you are tracking students' progress at multiple schools requiring a
many-to-many relationship. In that case you will need a 4th table to link
the schools to the students.

--
Microsoft MVP - ASP/ASP.NET - 2004-2007
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"


  #6  
Old December 6th, 2009, 07:17 PM posted to microsoft.public.access.queries
John Spencer
external usenet poster
 
Posts: 7,815
Default Query with common fields to all records

If I understand, you have ONE record in the school Information table. IF that
is the case, you don't need to join the school information table in the query
at all. If you have just ONE record and do not join the table then the values
from that table will show up on every row of the query.

John Spencer
Access MVP 2002-2005, 2007-2009
The Hilltop Institute
University of Maryland Baltimore County

Prohock wrote:
I have a query that is collecting information from three tables. One table
has infromation about each student and another table is an incident table and
these tables are linked together using a student id number. The third table
is the school information that I want common to all fields in my query (this
data is only entered once for each school when the data base is first opened)
How do I link the school information data to every record in my query when
there is no common linked field?

  #7  
Old December 6th, 2009, 10:31 PM posted to microsoft.public.access.queries
Bob Barrows
external usenet poster
 
Posts: 475
Default Query with common fields to all records

Prohock wrote:
...this data is only entered once for
each school when the data base is first opened)


And then deleted before closing the database so there is never data for more
than one school in the database?
If so, see John's reply.
--
Microsoft MVP - ASP/ASP.NET - 2004-2007
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"


 




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 08:35 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.