Add a record to a subform

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

Guest

Hi there,

I run the following code on a button's click event:

Me.frmExpenses_sub!dtmDate.SetFocus

This goes to the first record in my subform, what I need is to then go to a
new record in my subform which is based on qryExpenses which goes back to
tblExpenses.

Can anyone help? I'm sure this is a simple thing.

Thanks,

JR
 
Johnny,
Me.frmExpenses_sub!dtmDate.SetFocus
DoCmd.GoToRecord , , acNewRec
 
Thanks, that really put me in the right direction. It didn't work with the
reference to dtmDate but when I just set focus on the sub form itself, it
worked great for both adding and deleting a record.

Thanks Al!

JR

Any other ideas?
--
www.brightfuture.ca/bright
My email address can be found on my site.


Al Camp said:
Johnny,
Me.frmExpenses_sub!dtmDate.SetFocus
DoCmd.GoToRecord , , acNewRec
 

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