dlookup

P

Praveen

I have two tables and two Forms which is as follows

Table & Form 1

1)Item Code Description
10101010 DP1
Table & form 2

2)Item Code Description Amount

In the second form there is combo Box if I select one item code which have
been allready entered in table 1 the form have to display automaticlly the
Description and both Item code and Description have to be recorded in table 2
after saving it.

Praveen
 
S

Sprinks

Praveen,

What you are attempting to do violates relational database normalization
rules. There is no need to store the description in table 2, it is fully
defined in table 1 and associated with the item code. Use a query that links
the two tables by their common field to "access" the description for reports
and form display.

In this case, you can either base your form on a query as described above or
use the column property of your combo box to display the description on your
form. To do the latter, include the description in the row source, as

SELECT Table1.Item Code, Table1.Description FROM Table1 ORDER BY Table1.Item
Code;

To display the description in a textbox, set its ControlSource property to:

=YourComboBox.Column(1)

See the following references for information on database normalization:

http://www.mvps.org/access/tencommandments.htm

ACC: Database Normalization Basics
http://support.microsoft.com/?id=100139
http://support.microsoft.com/?id=209534
http://support.microsoft.com/?id=283878

Database Normalization Tips by Luke Chung
http://www.fmsinc.com/tpapers/genaccess/databasenorm.html

Support WebCast: Database Normalization Basics
http://support.microsoft.com/default.aspx?scid=/servicedesks/webcasts/wc060600/wcblurb060600.asp

Database Normalization:
http://burks.bton.ac.uk/burks/foldoc/35/28.htm

5 Rules of Database Normalization:
http://www.datamodel.org/NormalizationRules.html

"Understanding Relational Database Design" Document Available in Download
Center:
http://support.microsoft.com/?id=283698
http://support.microsoft.com/?id=164172

ACC2000: "Understanding Relational Database Design"
http://support.microsoft.com/?id=234208

Fundamentals of Relational Database Design:
http://support.microsoft.com/?id=129519

Database Deisgn Principles:
http://msdn.microsoft.com/library/en-us/dndbdes/html/ch04DDP.asp

Sprinks
 

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