Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

newby question

Status
Not open for further replies.

agos2008

Technical User
Sep 5, 2008
2
PT
Hi

I have been around this problem but didn't found any answer.

I have 2 tables.
The 1st one is a config field with only 2 fileds but I only needto inser 1 record that is going to be imported to the other table (example: automatic number | desigantion)

the 2nd table have a lot of fields and two of them are the ones above.

I created a form with a combo box to choose the above records every time I insert a new record in the 2nd table.

Ho do I make this automticly without the need to use the combo box? Can the 1st table repeat the 1st record every time I add a new record in the 2nd table.



thanks
 
It may be clearer if you post your table structures like this:
tblTable1
ID Primary Key
Designation
other fields

tblTable2
etc.

You say you have the same data in two tables. This doesn't sound like your tables are normalized. You may want to read:
Fundamentals of Relational Database Design

Also, try to explain what you want to do a little better.
 
Also take a look for some help on subforms, especially master and child link fields in the subform controls property sheet...

JB
 
agos2008 said:
Can the 1st table repeat the 1st record every time I add a new record in the 2nd table.
Why store the same data over and over again? From what you describe, it would seem that storing it once in Table1 is sufficient.

Joe Schwarz
Custom Software Developer
 
thanks to all of you and sorry for my english.

this app is a diary for military purpose. Has I told before the 1st table is a config/setup for titles and exercise reports:

tbl_config
ID Primary Key
exercise_name
CO_Name

Every time you open the DB you can change the above info or not and start using the diary.

All the informations about events are inserted in the 2nd table trough a form:

tbl_data
ID Primary Key
Date
other fields

Thanks to ms access table relashionships the form have fileds from the 1st table. The user use a combo box ti select the exercise ame and the CO (comanding officer).

The problem is this: As long has the setup info (1st table) is correct for each diary report, the user has to select those 2 fields. This is borring and at wast of time.

Can´t access assume by default the info inserted in the first record of the 1st table?

Regars and thank in advance.
 
You don't give enough info on the relationships. So, this is my guess:
A commanding officer can instruct in many exercises. One exercise can have many officers instructing it. A many-to-many relationship. You need a junction table. Read my reference. So
tblExercise
ExerciseID Primary Key
Description

tblCOs
COID Primary Key
Firstname
Lastname
Rank

tblTraining
TrainID Primary Key
ExerciseID
COID
DateOfEx (Don't just use the word Date.)
Other COMMON data

Now the tblExercise and tblCOs can be pre-filled. You then would create a form for tblTraining. Your TrainID can be an autonumber, if you want. Then ExerciseID and COID can be comboboxes to ease data entry.



 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top