Solved

How to populate the field from MS access in data grid

Posted on 2009-07-01
5
237 Views
Last Modified: 2013-12-25
Let say, i have a table "USers"
I have a form "Desk back log:
this is layout:
name             code1            code2            code2
Peter             10                   3
Sandy           2          
Greg                                                           4
Total             12                    3                     4

i need to get the name field from table and bring to the Grid
Code1, code2 and so on should static titles
the user should be able to enter into the cells values and save in database
0
Comment
Question by:rfedorov
  • 2
  • 2
5 Comments
 
LVL 39

Accepted Solution

by:
thenelson earned 250 total points
ID: 24759697
If you use that layout, you will create a lot of extra work for yourself because it is not normalized. this would be a normalized layout :

Person table:
PersonID   FName   LName    OtherFields...
1                Peter
2                Sandy
3                Greg

Users Table:
PersonID   Code    Value
1                  1           10
1                  2             3
2                  1             2
3                  2             4

About normalization:
Maximizing rows (records) and minimizing columns (fields) is the way databases are designed to work and is called table normalization.   To demonstrate this point, notice that Access and all other databases limit the number of columns (fields) but rows (records) are limited only by storage space.  These are the two tests that I apply for normalization:

1. Are there horizontal lists (columns, fields) that can be converted to vertical lists (rows, records).  If I do what will it gain me?  (Usually reduced storage, memory requirements, increased speed and the ability to work with the data easily) What will I lose? (Usually nothing)

2. If I have nn number of similar fields, is there a possibilty that I might later have nn+1 number of those fields?

A very common table design error is something like:
RecordID   Type1    Type2   Type3    ...
1                23
2                              77
3                 17                       7

Which should be designed as:
RecordID   Type   TheValve
1                1           23
2                2           77
3                1           17
3                3             7

Here is a great real world example of the importance of normalization:
http://www.experts-exchange.com/Databases/MS_Access/Q_21540867.html#14773468

A great turorial on Data Normalization
http://www.datamodel.org/NormalizationRules.html

Database normalization basics in Access
http://support.microsoft.com/kb/283878/EN-US/

Understanding Relational Database Design
http://support.microsoft.com/?scid=kb;EN-US;234208
0
 
LVL 4

Expert Comment

by:Nicolaze
ID: 24762215
What is the structure of the Users Table?
0
 

Author Comment

by:rfedorov
ID: 24763822
id,Name, windows id
0
 
LVL 4

Assisted Solution

by:Nicolaze
Nicolaze earned 250 total points
ID: 24770029
ok so you take the Name from this table and display it in the grid, but in which table should the input in the grid be saved?
0
 

Author Comment

by:rfedorov
ID: 24785471
TO my understanding it should be something like editable grid
It should be  ability to add the number ( for Code1, Code2 ...) and save the whole record
Peter             10                   3  TodayDate

in the Results table
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

I originally created this report in Crystal Reports 2008 where there is an option to underlay sections. I initially came across the problem in Access Reports where I was unable to run my border lines down through the entire page as I was using the P…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
Familiarize people with the process of utilizing SQL Server stored procedures from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Micr…
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now