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 » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

dlookup



 
 
Thread Tools Display Modes
  #1  
Old October 10th, 2006, 06:41 AM posted to microsoft.public.access.forms
praveen
external usenet poster
 
Posts: 13
Default dlookup

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
  #2  
Old October 10th, 2006, 02:20 PM posted to microsoft.public.access.forms
Sprinks
external usenet poster
 
Posts: 531
Default dlookup

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/genacc...abasenorm.html

Support WebCast: Database Normalization Basics
http://support.microsoft.com/default...lurb060600.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...ml/ch04DDP.asp

Sprinks


"Praveen" wrote:

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

 




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 05:43 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.