Cannot Edit a Date field when there is a default value

  • Thread starter Thread starter Ary
  • Start date Start date
A

Ary

I have a form with a field called Date Monitored. This field has the default
value Date(), because in most cases, the form will be completed on the same
date, but this is not always the case.

I am running into a problem, however, because the field will not allow any
editing. The rest of the form does allow editing, and there never used to be
a problem with editing the date field either, but recently it has no longer
allowed edits.

I have tried both having the default value applied only on the form, as well
as only on the source table, and neither works; there has been no problem
editing the exact same field in either the source table or in queries
regardless of where the default value is applied.

I'm sure there is a ridiculously simple way of resolving this that I have
completely overlooked, but I can't seem to figure it out myself. Anyone have
any suggestions?

Thanks!
 
Hi Ary,
check the property dialog, data tab for the control called Date Monitored.
Make sure it is not locked or disabled.

Make sure you don't have any code which locks or disables that control.

You could also check the format property for that control to make sure it's
not set to something incompatible with a date.

Maybe it is the start of corruption - you could remove this date control and
make a new one to see if that fixes the problem.


Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia
 
I have a form with a field called Date Monitored. This field has the default
value Date(), because in most cases, the form will be completed on the same
date, but this is not always the case.

I am running into a problem, however, because the field will not allow any
editing. The rest of the form does allow editing, and there never used to be
a problem with editing the date field either, but recently it has no longer
allowed edits.

Your control should allow editing, regardless of whether you have a Default value set at the Form level or at the Table
level.

If you remove the default value, can you then edit that control?

If so, then I'd begin to suspect a corrupt form. First thing I'd do is:

1) Make a copy of your database
2) Open the database, click Tools - Database Utilities - Compact & Repair

If that doesn't work, you might try a Decompile:

1) Make a copy of your database
2) build a shortcut with this as the Target:

"full path to msaccess.exe" "full path to your db" /decompile

3) Open the db and C&R
4) Open the VBA Editor, click Debug - Compile
5) Now C&R again

Even if these work, I'd also make a new, blank database and import everything to it.

If none of these work, you might be left with restoring that form from a recent backup, or rebuilding the form.

I have tried both having the default value applied only on the form, as well
as only on the source table, and neither works; there has been no problem
editing the exact same field in either the source table or in queries
regardless of where the default value is applied.

I'm sure there is a ridiculously simple way of resolving this that I have
completely overlooked, but I can't seem to figure it out myself. Anyone have
any suggestions?

Thanks!

Scott McDaniel
scott@takemeout_infotrakker.com
www.infotrakker.com
 
Back
Top