Linked table look up ??? HELP. (1 Viewer)

KaiProton

Registered User.
Local time
Today, 16:42
Joined
Jan 22, 2005
Messages
35
OK, so now in my Dbase Ive got the main data, and another table with 2 fields in,

in the second table its a part number and a weight,
on the main data I need the user to select the Part number with a combobox that the weight is filled in the maindata automatically, I dont understand Relational Dbases, yet so if anyone knows how I can do this, please explain in little words, lol


I did manage to do this earlier in the dbase with box sizes and weights but as there are only 4 size of box I coded it into he VB, but with the caps there could be up to 100 different caps.

Anyone HELP PLZ.
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 11:42
Joined
Feb 19, 2002
Messages
43,714
Unless weight changes over time and you need to store the weight at a particular point in time, weight should not be stored in the main table. Whenever you need to show weight, you would use a query that joins the main table to the part table. Use this query as the RecordSource for your forms or reports. Make sure to lock the weight field on the form because you don't want someone to accidentally change it.
 

KaiProton

Registered User.
Local time
Today, 16:42
Joined
Jan 22, 2005
Messages
35
EEk!

Eek!
Query,

I will look into making a query to do it,

to do it I guess the query needs to be in SQL and when the first field is item1 the sql looks up the weight field to be item 1's weight
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 11:42
Joined
Feb 19, 2002
Messages
43,714
Use the query builder to create the query. You can create pretty sophisticated queries with the builder without actually having to write any SQL.

Choose New from the query tab.
Select the two tables.
Drag join lines between the two tables to connect them on the correct field.
Select the columns you want from each table.
Save and name the query.
Use the query as the RecordSource for your form/report.
 

KaiProton

Registered User.
Local time
Today, 16:42
Joined
Jan 22, 2005
Messages
35
I like the idea of using the query bulider, Thanks, I will try it as soon as I get in work :)
 

Users who are viewing this thread

Top Bottom