DoCmd.GoToRecord , , acNewRec ???

pujo

Well-known Member
Joined
Feb 19, 2009
Messages
708
Office Version
  1. 2019
  2. 2013
Platform
  1. Windows
Hey gang,
When you use this line on a form activate, or load event to clear all the fields.
Does it save that record?

Code:
DoCmd.GoToRecord acForm, "Production_Frm", acNewRec

Just trying to figure out why i'm getting blank records in my report.

Thanks,
Pujo
 

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney
If you have any fields being set to a value by code or a macro and then move to a new record, that will be saved.
 
Upvote 0
Ok, thanks.
I do have a few lines of logic controling a few fields.
Is there any way, to clear all fields, without going to a new record?

Thanks,
Pujo
 
Upvote 0
Resolved: DoCmd.GoToRecord , , acNewRec ???

Ok,
Figured it out.
I set the "DataEntry Property" to Yes, and all is good.

Thanks!
 
Upvote 0

Forum statistics

Threads
1,214,926
Messages
6,122,305
Members
449,079
Latest member
juggernaut24

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top