View Full Version : Help! ive got an AS computing project and i need default value help


airwot4
04-12-2003, 06:07 AM
hi, I'm currently creating a database as part of my AS computing course and I have two date fields which I wish to link as a default. The "Date In" which an exam paper comes into the hypothetical board and the "Re-mark date", the date the exam 'should' be remarked by. I'd like to make the default value of "Re-mark date" [Date In]+21, for 3 weeks after the Date in. However I get this error when trying to save the table, "The database engine does not recognize either the the field 'date came in' in a valid expression, or the default value in the table 'Grades'

Any help would be really really appreciated, I used to use Now()+21 as the default value which worked untill I realised it wouldn't actually be correct.
many thanks, dave

bradcccs
04-12-2003, 06:31 AM
Try using the After Update event of your "Date In" field to specify your remark date.

ie: After Update:

me.[Re-mark Date] = [Date In] + 21



Note: Avoid using embedded spaces and special characters in field names. These will cause headaches in may Access operations.

Mile-O
04-12-2003, 06:36 AM
Or:

Me.[Re-mark Date] = DateAdd("d", 21, [Date In])

Rich
04-12-2003, 07:13 AM
You should not store Re-Mark date at all, use a query or calculated control to return the Date