I would like to Open a Form to automatically go to open a new record so the user won't have to know to press the * at the record selector. I have a form (FORM1) where they either select a specific record to edit or they select add a new record. When they pick the add a new record function I want to go to a new record on FORM2. I've tried various different ways of using:
Docmd.Openform stformname , acnormal, etc.
but can't seem to get the syntax right. I tried acformadd in the DataMode, but that didn't work properly for me since the form I want to open is a main form with a subform and the subform is where I want to add the new data. With acformadd in the DataMode it thinks I want to add a new main form record, but that isn't what I want.
I've also tried to put code in the oncurrent event of the subform that I open. I tried if the selection option from FORM1 is add a new record then
docmd.gotorecord,, acnew
and it appears that I have a new record (the fields are blank) but somehow the very first record in my file is lurking under there. I have validation logic in my form that confirms any changes the user makes to the record and this validation logic kicks in. The very first record of my form is somehow lurking under all this - it seems I go to newrec and then I go back to the first record.
Any ideas of how to fix/address this problem?
Thanks for your help.
Docmd.Openform stformname , acnormal, etc.
but can't seem to get the syntax right. I tried acformadd in the DataMode, but that didn't work properly for me since the form I want to open is a main form with a subform and the subform is where I want to add the new data. With acformadd in the DataMode it thinks I want to add a new main form record, but that isn't what I want.
I've also tried to put code in the oncurrent event of the subform that I open. I tried if the selection option from FORM1 is add a new record then
docmd.gotorecord,, acnew
and it appears that I have a new record (the fields are blank) but somehow the very first record in my file is lurking under there. I have validation logic in my form that confirms any changes the user makes to the record and this validation logic kicks in. The very first record of my form is somehow lurking under all this - it seems I go to newrec and then I go back to the first record.
Any ideas of how to fix/address this problem?
Thanks for your help.