Data entry but autofill from previous record? (1 Viewer)

snorf3

Registered User.
Local time
Today, 04:45
Joined
May 25, 2001
Messages
45
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

Registered User.
Local time
Today, 04:45
Joined
Oct 4, 2000
Messages
52
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

Registered User.
Local time
Today, 04:45
Joined
May 25, 2001
Messages
45
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).]
 

Users who are viewing this thread

Top Bottom