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  

forms respond with duplicate..no record can be saved



 
 
Thread Tools Display Modes
  #1  
Old May 29th, 2004, 12:21 AM
joe
external usenet poster
 
Posts: n/a
Default forms respond with duplicate..no record can be saved

How can i get the results of each timecard entry to only appear in the employee table under the employee number which is unique.It is a one to many(one employee to many timecards) but i just want the entrys to be under the one time entry of the employee number not for each timecard and employee number to be repeated over and over again in the employee table.I have been told to create the employee number as a primary in the employee table and not to have a primary key at all in the timecard table but when i transfer all the fields to a form...i get dups not allowed and i cant enter another record on the form.What am i doing wrong?????? I am unsure if this is a forms problem or a design problem with the primary key????
  #2  
Old May 29th, 2004, 05:13 AM
tina
external usenet poster
 
Posts: n/a
Default forms respond with duplicate..no record can be saved

in a normalized database, each employee should be listed once in an employee
table. that table would be about employees, not about timecards. certainly i
can't imagine a multi-record table in a normalized database without a
primary key.
you say one employee has many timecards, which i understand (having done my
share of punching a clock). now, what do you define as a timecard? in the
"real world", usually an employee has one timecard each week, with which
he/she clocks in and out each day that he/she works that week. the next
week, the employee gets at new timecard to clock in/out on, etc, etc, etc.
do you need to track each clock in/out specific to each time card? or just
track each employee's clock in/out times by date, without reference to a
specific time card?


"joe" wrote in message
...
How can i get the results of each timecard entry to only appear in the

employee table under the employee number which is unique.It is a one to
many(one employee to many timecards) but i just want the entrys to be under
the one time entry of the employee number not for each timecard and employee
number to be repeated over and over again in the employee table.I have been
told to create the employee number as a primary in the employee table and
not to have a primary key at all in the timecard table but when i transfer
all the fields to a form...i get dups not allowed and i cant enter another
record on the form.What am i doing wrong?????? I am unsure if this is a
forms problem or a design problem with the primary key????


  #3  
Old May 29th, 2004, 05:46 AM
Ken Snell
external usenet poster
 
Posts: n/a
Default forms respond with duplicate..no record can be saved

Joe -

In our other thread in m.p.a.tablesdbdesign, I did not say you should not
have a primary key in timecards table. Please read my reply again.

You are not giving people enough information about how your form is set up
based on the tables. Are you using a table structure similar to what I
suggested as a starting point?

--
Ken Snell
MS ACCESS MVP

"joe" wrote in message
...
How can i get the results of each timecard entry to only appear in the

employee table under the employee number which is unique.It is a one to
many(one employee to many timecards) but i just want the entrys to be under
the one time entry of the employee number not for each timecard and employee
number to be repeated over and over again in the employee table.I have been
told to create the employee number as a primary in the employee table and
not to have a primary key at all in the timecard table but when i transfer
all the fields to a form...i get dups not allowed and i cant enter another
record on the form.What am i doing wrong?????? I am unsure if this is a
forms problem or a design problem with the primary key????


  #4  
Old May 29th, 2004, 06:42 AM
tina
external usenet poster
 
Posts: n/a
Default forms respond with duplicate..no record can be saved

i'll bow out of this thread now. if i'd seen the other thread with your post
earlier, i wouldn't have posted to this one. sure wish people would quit
abandoning threads and starting new ones within a few hours like this.
sigh


"Ken Snell" wrote in message
...
Joe -

In our other thread in m.p.a.tablesdbdesign, I did not say you should not
have a primary key in timecards table. Please read my reply again.

You are not giving people enough information about how your form is set up
based on the tables. Are you using a table structure similar to what I
suggested as a starting point?

--
Ken Snell
MS ACCESS MVP

"joe" wrote in message
...
How can i get the results of each timecard entry to only appear in the

employee table under the employee number which is unique.It is a one to
many(one employee to many timecards) but i just want the entrys to be

under
the one time entry of the employee number not for each timecard and

employee
number to be repeated over and over again in the employee table.I have

been
told to create the employee number as a primary in the employee table and
not to have a primary key at all in the timecard table but when i transfer
all the fields to a form...i get dups not allowed and i cant enter another
record on the form.What am i doing wrong?????? I am unsure if this is a
forms problem or a design problem with the primary key????




  #5  
Old May 29th, 2004, 02:26 PM
Joe
external usenet poster
 
Posts: n/a
Default forms respond with duplicate..no record can be saved

No Ken, I was not referring to you about not having the primary key.It was access helpline from the recent class i took on this matter and apparently they may have been wrong.I have tried your previous suggestion using one to one and one to many and it is frustrating to to acheive the results i am looking for.It is a simple design with one table of employees and three fields,,,,,,emp number, first name and last name.The timecards table will have hours worked, hours not worked, overtime and date.The reason i posted in the forms forum is because i thought there was something wrong with the way i put the fields from both tables into the form.All i wanted was to use the employee number as a primary key in the employee table so each transaction would appear only with their number and by clicking the plus sign next to the employee number in the table......it would show all transaction for them.Currently, in this table...you see the employee number for every entry in the forms and not consolidated under the plus sign.
  #6  
Old May 29th, 2004, 08:43 PM
Ken Snell
external usenet poster
 
Posts: n/a
Default forms respond with duplicate..no record can be saved

Can you tell us how you've set up the form? If you've used a table structure
similar to what I suggested in m.p.a.tablesdbdesign newsgroup, you should be
able to display (for an employee) all timecard entries for that employee if
you use a subform for the timecard entries table's records and the main form
for a record from the employees table.


--
Ken Snell
MS ACCESS MVP

"Joe" wrote in message
...
No Ken, I was not referring to you about not having the primary key.It was

access helpline from the recent class i took on this matter and apparently
they may have been wrong.I have tried your previous suggestion using one to
one and one to many and it is frustrating to to acheive the results i am
looking for.It is a simple design with one table of employees and three
fields,,,,,,emp number, first name and last name.The timecards table will
have hours worked, hours not worked, overtime and date.The reason i posted
in the forms forum is because i thought there was something wrong with the
way i put the fields from both tables into the form.All i wanted was to use
the employee number as a primary key in the employee table so each
transaction would appear only with their number and by clicking the plus
sign next to the employee number in the table......it would show all
transaction for them.Currently, in this table...you see the employee number
for every entry in the forms and not consolidated under the plus sign.


  #7  
Old May 29th, 2004, 08:43 PM
Ken Snell
external usenet poster
 
Posts: n/a
Default forms respond with duplicate..no record can be saved

Two heads and viewpoints are usually beneficial...no need to bow out!

--
Ken Snell
MS ACCESS MVP

"tina" wrote in message
...
i'll bow out of this thread now. if i'd seen the other thread with your

post
earlier, i wouldn't have posted to this one. sure wish people would quit
abandoning threads and starting new ones within a few hours like this.
sigh



  #8  
Old May 29th, 2004, 10:55 PM
tina
external usenet poster
 
Posts: n/a
Default forms respond with duplicate..no record can be saved

thanks, Ken. smile and bow in your direction
i usually continue tracking any thread i've posted to, to see what i can
learn from it, but i very seldom have anything to contribute that would add
additional value to any MVP's comments.


"Ken Snell" wrote in message
...
Two heads and viewpoints are usually beneficial...no need to bow out!

--
Ken Snell
MS ACCESS MVP

"tina" wrote in message
...
i'll bow out of this thread now. if i'd seen the other thread with your

post
earlier, i wouldn't have posted to this one. sure wish people would quit
abandoning threads and starting new ones within a few hours like this.
sigh





 




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 03:31 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.