Access Table Help Please...

Scott LaPointe

New member
Local time
Today, 16:10
Joined
May 2, 2006
Messages
5
Found this site on google, looks pretty good, hope you can help me.

I need to update some data but am at a loss on how to do it.

Here is my data...

Column1......... Colum2..... Colum3
Name 1 .......... 1:30 ........ 2:30
...................... 2:30 ........ 3:30
...................... 3:30 ........ 4:30
Name 2 .......... 1:30 ........ 2:30
...................... 2:30 ........ 3:30
...................... 3:30 ........ 4:30
Name 3 .......... 1:30 ........ 2:30
...................... 2:30 ........ 3:30
...................... 3:30 ........ 4:30

basically I need to copy the Name 1 to each of the rows under it so the new data should look like this it originates from an Excel spreadsheet and I need to bring it into an Access Database.

Column1......... Colum2..... Colum3
Name 1 .......... 1:30 ........ 2:30
Name 1........... 2:30 ........ 3:30
Name 1........... 3:30 ........ 4:30
Name 2 .......... 1:30 ........ 2:30
Name 2........... 2:30 ........ 3:30
Name 2........... 3:30 ........ 4:30
Name 3 .......... 1:30 ........ 2:30
Name 3........... 2:30 ........ 3:30
Name 3........... 3:30 ........ 4:30

any help or ides would be appreceated.

Thanks!
 
you need (at least) two tables:

tblPerson (or other name)
---------
PersonID (Autonumber, Primary Key)
PersonFName
PersonLName
etc.

tblTime (or other name)
-------
TimeID (Autonumber, Primary Key)
PersonID (Foreign Key, looks up the PK info from tblPerson)
TimeIn (or other name...)
TimeOut (or other name...)
etc.

you don't want to duplicate the names as you suggested. that is one of the first rules of database design: don't duplicate data. you copy the Primary Key from one table to another in order to reference existing data, and that's it.

p.s. can you plz delete the other duplicate thread. tnx.
p.s.s. too late. try not to post duplicates. sometimes the server appears to stall but it's usually just taking its time...
 
Last edited:
I know what you mean, however the data is imported from an excel spreadsheet. That's how it's designed. I have no way to reference the data unless I give it a common id, which is the name. But on the Excel spreadsheet the name only appears once for the grouping. That's why I need to duplicate the name in each row.

Ya sorry for the duplicate, the page didn't go anywhere so I tried again.
 
so you need to basically copy name1 to each record below below it until you get to name two, then you need to copy name2 to each record below that, etc? Can you post your db? If so I have a fuction to do what you need. How does the spreadsheet get created? With a barcode scanner?
 
Last edited:
Basically yes

I cannot provide you witha copy of the spreadsheet for security reasons, but you nailed it - that is what I want to do.
 
I created a procedure to do a similar update a while back I will see if I can find it tonight.
 

Users who are viewing this thread

Back
Top Bottom