Welcome, Guest. Register Now!
   
Mark Forums Read Mark Forums Read Mark Forums Read


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 10-16-2007, 06:02 AM
Junior Member
 
Join Date: Oct 2007
Posts: 7
iTrader: (0)
Hippo86 is on a distinguished road
Default Making a unique field

Hi,
I have a database with an employee id field, date, start time and hours to be worked. I would like to add an unique field, maybe the employee id field and date field so the record has an unique entry. How can I have that field added to the database as they are entering the record? The data entry form uses the table direct, no query. I know I can concatenate using a query but I want to make sure 2 records for the same day is not added. Any suggestions would be welcome.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 10-16-2007, 10:49 PM
Member
 
Join Date: Oct 2007
Posts: 41
iTrader: (0)
TonyES is on a distinguished road
Default

Hi,
Open the table in design view and then select View | Indexes to activate the Indexes window and then enter a new index name then select the Employee ID field in the field name dropdown next to it now without entering a new index name, select the date field in the field name dropdown in the next row. This way, you create an index on two fields. Click in the index name again. Set the Unique property of the index to Yes in the lower half of the Indexes window. When finished click OK.
Cheers!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 10-21-2007, 06:59 AM
Junior Member
 
Join Date: Oct 2007
Posts: 7
iTrader: (0)
Hippo86 is on a distinguished road
Default

Thanks a look into it.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


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 On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -6. The time now is 04:37 AM.