Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 248
  • Last Modified:

How to populate the field from MS access in data grid

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
rfedorov
Asked:
rfedorov
  • 2
  • 2
2 Solutions
 
thenelsonCommented:
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
 
NicolazeCommented:
What is the structure of the Users Table?
0
 
rfedorovAuthor Commented:
id,Name, windows id
0
 
NicolazeCommented:
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
 
rfedorovAuthor Commented:
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

Ask an Anonymous Question!

Don't feel intimidated by what you don't know. Ask your question anonymously. It's easy! Learn more and upgrade.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now