ACC2000 main form/multiple subforms...go to next record on subform

B

BrentDA

I have text boxes on a main form, with more text boxes on (embedded) subforms
used for entering data.

I have 'DoCmd.GoToRecord , , acNewRec' in On Open in the main form, and the
main form clears the data and goes to the next New Record when I open the
form, like it's supposed to. The main form also makes the subforms go to the
next New Record, also like it's supposed to, but the data doesn't clear on
any of the subforms. I tried putting the 'DoCmd...' in the 'On Open' of the
subforms, but that didn't work.

Thanks in advance for your assistance !

Brent
 
A

Allen Browne

If you don't need the old records in the forms (to go back to), you could
just set the Data Entry property to Yes (on the Data tab in the Properties
sheet, when looking at the properties of the Form.)

If the subform contains related data, you probably have used the
LinkMasterFields and LinkChildFields property of the subform control. If so,
the subform will automatically go do a new record when the new record does
(since there cannot be any related records in the subform if there's no
record yet in the main form.)

If those ideas don't work, you might be able to use the Load event of the
main form (rather than Open), and see if you can SetFocus to the subform
control, and then to a control in the subform control, and then RunCommand
acCmdRecordsGoToNew. No promises, but that's the kind of approach to try.
 

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