Help! ive got an AS computing project and i need default value help

  • Thread starter Thread starter airwot4
  • Start date Start date
A

airwot4

Guest
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
 
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.
 
Or:

Code:
Me.[Re-mark Date] = DateAdd("d", 21, [Date In])
 
You should not store Re-Mark date at all, use a query or calculated control to return the Date
 

Users who are viewing this thread

Back
Top Bottom