If new record, then populate field with sysdate

  • Thread starter Thread starter andy
  • Start date Start date
A

andy

Could someone please show me the code to do the following:

If the user creates a new record, the txt_DateField1 field
value is set to the current date. The txt_DateField1 field
is a text box with its enabled, and locked properties set
to 'No' so that no one can tamper with them.

Thank you in advance
God bless you
Andy
 
andy said:
Could someone please show me the code to do the following:

If the user creates a new record, the txt_DateField1 field
value is set to the current date. The txt_DateField1 field
is a text box with its enabled, and locked properties set
to 'No' so that no one can tamper with them.

Set the DefaultValue property to =Date()
 
Could someone please show me the code to do the following:

If the user creates a new record, the txt_DateField1 field
value is set to the current date. The txt_DateField1 field
is a text box with its enabled, and locked properties set
to 'No' so that no one can tamper with them.

Just set the Default property of txt_DateField1 to

Date()

txtDateField2 should have Enabled = Yes, Locked = No for the user to
be able to work with it; txt_DateField1 should be Enabled = No, Locked
= Yes.
 
Back
Top