Default value

  • Thread starter Thread starter Bill
  • Start date Start date
B

Bill

I need a default value in a field to be the last reading
from another record. The database has a subform that
records hours a piece of equipment is used. The hour
field contains a start reading and an ending reading.
from this I arrive at a total running time for the
equipment. I need the next start reading on the next
blank record to have the ending reading from the last
record.
Thanks Bill
 
A simple solution for each field is to use the After_Update event to modify
the default value.
This way, when a new record is created, the field defaults to the previously
entered value.

Private Sub txtName_AfterUpdate()
'That's 4 double quotes on either side!
Me![txtName].DefaultValue = """" & Me![txtName].Value & """"
End Sub
 
Back
Top