On Wed, 30 Jun 2010 20:32:22 -0400, "LAS" <(E-Mail Removed)>
wrote:
>I have a table with a date, time and ID field. I want them all,
>concatenated, to constitute a primary key. Can I do that?
In talbe design view select both fields and click on the primary key
button.
However you do not want a date/time field to be a primary or even
foreign key. The problem is that under the covers a date field is
actually a Double field type. And the portion to the right of the
decimal point might cause troubles due to how floating point numbers
are recorded in computers.
Now a datetime field can be part of an index. Not a problem there.
Finally you state you have an ID field. By this do you mean an
autonumber field? If so why not just use that as the primary key that
child tables reference?
Tony
--
Tony Toews, Microsoft Access MVP
Tony's Main MS Access pages -
http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog -
http://msmvps.com/blogs/access/
For a convenient utility to keep your users FEs and other files
updated see
http://www.autofeupdater.com/