Lebans: Form_frmNavButtons

G

Guest

Hello. I'm using Stephen Lebans navigation buttons form (from his site
www.lebans.com)- both of which are fabulous!

Our data entry person is wondering why she can't enter two new members in a
row- after entering a new record, the "add a new record" button is grayed out
for the 2nd person until she moves off the current record (such as clicking
the previous record button, then clicking the add a new record button). She
is not enjoying the extra moving around in the form, I'm not sure why she
needs to. I hope you have a suggestion.

I'm not sure if it's OK to post Stephen Lebans code here. Please advise. And
hopefully, someone will know of what I'm asking.
thanks.
 
S

Stephen Lebans

At a quick glance you would require two modifications to the existing code:

1) In the code for the New Record CommandButton Click event you would have
to add a line of code to save the current changes(if any) to the newly
created record.

2) In the code/logic that determines which CommandButton controls to
Enable/Disable, simply comment out the one line of code that Disables the
Add New Record CommandButton control.

--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
 
G

Guest

Thanks for the help!
Seems to work very well.

1) Private Sub cmdNew_Click()
On Error GoTo Err_cmdNew_Click

DoCmd.GoToRecord acDataForm, Me.Parent.Name, acNewRec
'In the code for the New Record CommandButton Click event you would have
'to add a line of code to save the current changes(if any) to the newly
'created record.
RunCommand acCmdSaveRecord

Exit_cmdNew_Click:
Exit Sub

Err_cmdNew_Click:
MsgBox Err.Description
Resume Exit_cmdNew_Click

End Sub

2) I commented out:
'Me.cmdNew.Enabled = False

Hope that was what you had in mind. Please let me know if I've caused some
harm to the code.

Thanks for all of the help and support you offer to the discussion group!
Cheers,
Stephanie
 

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

Top