Automatic New Record on Subform

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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

thanks
 
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]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top