M
Marty Suckstorff
whether or not you've defined your index as having to be-----Original Message-----
I've created a table called "Pay Info" which contains the
following fields: Emp Id (Text), Pay Period (Text), Pay
Date (Date/Time), Hours Worked (Number). There is no
primary key on this table, but there is an index composed
of Emp Id and Pay Date. When entering data in the
Datasheet view, I'm get an error as I tab from the Pay
Period field to the Pay Date field. the error message
states "The value you entered isn't valid for this field".
The first record entered is
Emp Id = 001
Pay Period = 1
Pay Date = 05-jul-03
Hours Worked = 20
The second record entered is
Emp Id = 002
Pay Period = 1
Pay Date = 05-jul-03
Hours Worked = 21
The third record is partially entered until I get the error
Emp Id = 001
Pay Period = 2
Pay Date = 3
Hours Worked =
When I tab from the Pay Period to the Pay Date, Access2000
inputs the value "3" for Pay Date and of course, I get the
error since this value is incompatible with the Date/Time
data type set for Pay Date. However, I never set a
default value for Pay Date. I'm not sure where the value
of 3 comes from. Once I click OK on the error dialog box,
I can change the value of 3 to an appropriate date and
continue inputting values. So my fourth record would be
as follows:
Fourth record inserted with no problems:
Emp Id = 002
Pay Period = 2
Pay Date = 06-jul-03
Hours Worked = 21
But the error reappears for the fifth record:
Fifth record :
Emp Id = 001
Pay Period = 3
Pay Date = 5
Hours Worked =
5 was inputted by the Access as I tabbed from Pay Period
to Pay Date.
It seems when I start to recycle through the values
of "Emp Id" I get the error, but after the initial error I
can continue.
Is this a bug in Access2000?
Thanks for any help you can offer.
GeekGirl
.
This seems a little puzzling. It may have to do with
unique, but that doesn't seem likely since you haven't had
the opportunity to even complete the record before you
receive the error. But it's worth investigation.
Another thing I noticed is that the bogus number
corresponds to the # of the record, ie the "3" appeats in
the 3rd record, and the "5" appears in the 5th record. Co
you have an autonumber field? This suggests an attempt to
keep things unique by Access, but I don't know.
Another thing to investigate is whether or not you even
need an index of this sort. You know your program better
than I do, but it seems as though you are trying to
uniquely identify a combination of employee and pay date
to prevent two time entries being made on the same date
for the same employee. Indexes aren't designed for
validation purposes, they are to speed up inquiries. If
this is what you are tyring to do, you may want to set up
some other way of validating your data.
I don't think I was of much help. If you get a good
solution to your problem, I'd like to know about it since
I have gone through many hours of gfrustration myself in
trying to work around things like this. Best of Luck!