View Full Version : Data entry but autofill from previous record?


snorf3
09-27-2001, 01:25 PM
I want my form to open to a new record each time...and I know I can do that by setting its DataEntry property to Yes.

But, my form also runs an autofill function, where certain fields are automatically filled in depending on the values in the directly previous record.

When I set data entry to Yes, it no longer runs the autofill function.

Is there some way to get both of these working at the same time?

Thanks for all your help in advance!

chuckster
09-27-2001, 07:31 PM
Maybe set an OnOpen event like this.


DoCmd.GoToRecord , , acLast
DoCmd.GoToRecord , , acNewRec

This will automatically open to the last record then create a new record.

Hope that helps.

Chuck

snorf3
09-29-2001, 10:07 PM
Hmmm...didn't exactly work as planned. See, I need this to work on a subform. When I put the code into the OnOpen of the subform, it actually caused the entire form (including the parent form) to go to a new record.

When I specified object name to the subform name, and then open the parent form, I get an error message saying that the subform is not open.

Any other suggestions?

[This message has been edited by snorf3 (edited 09-29-2001).]