473,386 Members | 1,764 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

How can I best do this? - Access 2002

I have a database with 3 tables - Equipment, History and Employee.

The relationships are:
One-to-Many From Equipment to History
Many-to-One From History to Employee

I want to set up a means by which a user can select an instance of
Equipment from a list.

When the instance is selected, I want to display (read only) the
equipment history showing when the equipment went to an employee and
when it left their possession (located in the History table) along
with the employee's name and room number (located in the Employee
table).

Thanks much!

- Andrew Dorph
Nov 12 '05 #1
2 1137
Andrew Dorph wrote:
I have a database with 3 tables - Equipment, History and Employee.

The relationships are:
One-to-Many From Equipment to History
Many-to-One From History to Employee

I want to set up a means by which a user can select an instance of
Equipment from a list.

When the instance is selected, I want to display (read only) the
equipment history showing when the equipment went to an employee and
when it left their possession (located in the History table) along
with the employee's name and room number (located in the Employee
table).

Thanks much!

- Andrew Dorph


Create a form to detail the histor/employee records. Then in the (main)
form where you select the equipment, from the toolbox (with form open
from menu select View/Toolbox) drop a subform control into the form.
Then change the filter as the equipment changes.

Nov 12 '05 #2
Hi Andrew,

Try designing a mainform based on the "Equipment" table, and two subforms,
based on the other two tables.

Assuming the following table and field names, and that relationships are
defined with referential integrity / cascading updates & deletes:
---------------

Equipment (table)
EquipID -- AutoNumber -- PK
---------------

History (table)
HistoryID -- AutoNumber -- PK
EquipID -- Long Integer -- FK
EmployeeID -- Long Integer -- FK

---------------
Employee (table)
EmployeeID -- AutoNumber -- PK

----------------
frmEquipment -- the name of the main form
sbfHistory -- the name of the History subform
sbfEmployee -- the name of the Employee subform

---------------

You'll ned an unbound textbox on the main form (frmEquipment) named say ...
"txtEmployeeID" which will have "=Me![sbfHistory].Form![EmployeeID] as it's
ConrolSource.

Use "EquipID" as both the LinkMaster/ LinkChild for "sbfHistory"
Use "txtEmployeeID" as the LinkMaster, and EmployeeID as the LinkChild for
"sbfEmployees"

Using this strategy, you should be able to:
1.) Select the Equipment record ... use the combo-box wizard and the "find a
record on my form" option for this.
2.) In sbfHistory, select the record that contains the time period.
3.) The related Employee information should be displayed in "sbfEmployee"

Another advantage with this is that the form can be used for viewing,
editing, and adding data.
--
HTH,
Don
=============================
Use My*****@Telus.Net for e-mail
Disclaimer:
Professional PartsPerson
Amateur Database Programmer {:o)

I'm an Access97 user, so all posted code
samples are also Access97- based
unless otherwise noted.

Do Until SinksIn = True
File/Save, <slam fingers in desk drawer>
Loop

================================
"Andrew Dorph" <an********@ao.uscourts.gov> wrote in message
news:dc**************************@posting.google.c om...
I have a database with 3 tables - Equipment, History and Employee.

The relationships are:
One-to-Many From Equipment to History
Many-to-One From History to Employee

I want to set up a means by which a user can select an instance of
Equipment from a list.

When the instance is selected, I want to display (read only) the
equipment history showing when the equipment went to an employee and
when it left their possession (located in the History table) along
with the employee's name and room number (located in the Employee
table).

Thanks much!

- Andrew Dorph

Nov 12 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: jason | last post by:
If one is attempting to insert data into tables at the same time what is the best way to do this. I could do it the way below - but is there any reason I should not do it this way or perhaps follow...
11
by: DrUg13 | last post by:
In java, this seems so easy. You need a new object Object test = new Object() gives me exactly what I want. could someone please help me understand the different ways to do the same thing in...
3
by: Scott | last post by:
Hi, If we want to compile an Access 2002 database and distribute it to others, will the compiled software run on any PC, like Windows 98, Windows 2000, etc. Also, you don't have to have...
3
by: Colin Chudyk | last post by:
Hi, Here is my situation. Can anyone provide insight? I have developed a database in Access 2002. I am planning to distribute it as a split MDE (front) / MDB (back) to be used by the Access...
28
by: Neil Ginsberg | last post by:
I have a client who is using Access 2002/2000 (the database itself is written in 2000), and is considering migrating to Access 2003. Any recommendations on whether Access 2003 is worth the migrate,...
5
by: Phil | last post by:
I am a novice user with Access 2000. I have a five table database that works, but know it can be designed much better. I want to learn much more. I have no experience coding, no exposure to VBA...
0
by: meyvn77 | last post by:
Hello, I wrote an .ADP application in Access 2002 and delivered it to the client. They are not due for an upgrade till January and are running Access 2000. They would like to use the...
0
by: meyvn77 | last post by:
Hello, I wrote an .ADP application in Access 2002 and delivered it to the client. They are not due for an upgrade till January and are running Access 2000. They would like to use the...
52
by: Neil | last post by:
We are running an Access 2000 MDB with a SQL 7 back end. Our network guy is upgrading to Windows Server 2003 and wants to upgrade Office and SQL Server at the same time. We're moving to SQL Server...
3
by: banba_ca | last post by:
When I create a new db from the main Access window or thru Vb (set newdb = ...) I always end up with Access 2000 file format. I would like to get 2002 - 2003 file format. The reason is that when I...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.