Set focus

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

Guest

How do I send the focus to a new record in a subform (below is the address of
the sub form). I use this

Me.[CallCommentsT].Form![CallCommentsNotes] = "Contacted Not Intersted"
Me.[CallCommentsT].Form![CallContacted] = True

to send values to a subform but if I don't remember to click on a new record
it will overwrite my comments from previous.
 
Try this:

Dim frm As Form
Set frm = Me.CallComments.Form

Me.CallComments.SetFocus
DoCmd.GoToRecord Record:=acNewRec
frm!CallCommentsNotes = "Contacted Not Interested"
frm!CallContacted = True

Ken Sheridan
Stafford, England
 

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