Opening subform after entering new record

scubadiver007

Registered User.
Local time
Today, 01:07
Joined
Nov 30, 2010
Messages
317
What is the best way to open a linked subform using a button while in a newly created record?

I thought a simple

Code:
docmd.save

command would do (either in the "current record" or the "after update" event)

Thanks
 
Do you have 2 tables related in a 1 to many relationship, and do you have the 1 table as recordsource for the Form, and the Form/Subform related using Linkfields,
and you add a new record to the Form, and then you want to go to the subform.
You can not add a record to the subform if there is no parent record in the parent form.
 
Do you have 2 tables related in a 1 to many relationship, and do you have the 1 table as recordsource for the Form, and the Form/Subform related using Linkfields,
and you add a new record to the Form, and then you want to go to the subform.

Yup, that is indeed what I want to do but the record is not saved if I press the subform button while in the record.

So presumably the record needs to be requeried or saved in some way.
 
I have attached a db with two tables and their corresponding form and subform. When I enter a record into the form and open the subform I would expect the corresponding "cand_ID" number in the subform to appear but it remains zero.

BTW, I've never really used linked subforms so this is a bit new to me.
 

Attachments

Users who are viewing this thread

Back
Top Bottom