Solved

How to populate the field from MS access in data grid

Posted on 2009-07-01
5
239 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

Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Phishing attempts can come in all forms, shapes and sizes. No matter how familiar you think you are with them, always remember to take extra precaution when opening an email with attachments or links.
Familiarize people with the process of utilizing SQL Server views 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 Microsoft Access…
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.

773 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