Automatic New Record on Subform

A

austin

How can you make a new record with the date of that day start when the
client's form is opened?

thanks
 
J

John W. Vinson

How can you make a new record with the date of that day start when the
client's form is opened?

thanks

two ways: Both involve having the date/time field in the Table, or the textbox
on the form which is bound to that field, have its DefaultValue property set
to Date().

One way is to set the form's Data Entry property to True. This is rather
limited, as it ONLY lets you add new records, not edit existing ones.

The other is to put one line of code in the form's Load event. Click the ...
icon by the Load line on the form's Properties window, Events tab; choose Code
Builder; and edit the code to

Private Sub Form_Load()
DoCmd.GoToRecord acDataForm, Me.Name, acNewRecord
End Sub


John W. Vinson [MVP]
 
Top