Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

NewRec

Status
Not open for further replies.

andrep

Technical User
Feb 27, 2002
40
0
0
CA
Minor problem caused in form !

My form opens and goes to a new record.
private sub docmd.gotonewrec

now at the bottom of the form i have a macro wich
calls another sub performs calculations and then goes to
a new record !

I am not sure why but this causes 2 records to be added !
one blank!

I believe it is because of the on open event!

So how can i open my form to add a new record perform
the calculations then go to a new record without having
a blank added in ! ?????
 
If you add a record when you open the form, and add another with a macro you'll get two records. The math is simple.

Suggest that you delete that action of the macro that "goes to new record". Then,

1) Use the wizard to insert a command button and follow instructions to build a button that will "add a record". Click on the command button when you've finished with the first new record, to begin entering the next new record., or

2) Without "going to a new record On Open", open the form in Data Entry mode ('Yes' in the property sheet -> Data -> Data Entry.), or

3) If your form is open in edit mode, use the asterisk in the navigation buttons to add a new record.

Gus Brunston :cool: An old PICKer, using Access2000. I manage Suggestions welcome. padregus@attbi.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top