msaccess newrecord failure
Posted on 2014-11-27
I need your help.
I builded a DB with an identification form.. to select an ID called Ref_ID
With that ID I open a second form (Data_Form) related to a table with the ID variable as a primary key
For each ID I record several data through Two subforms of that Data_Form
Everything works fine, except that I cannot create a new record with that Data_Form. I use the conventional code
Private Sub New_Record_Click()
Dim CodePatient As Long
On Error GoTo Err_New_Record_Click
CodePatient = Me.Réf_Patient 'This one is OK
DoCmd.GoToRecord , , acNewRec
Me.Réf_Patient = CodePatient 'this one produces an error after execution Me.ré_Patient is NULL
NewRecordFlag = True
Must be something trivial or related to a property oy the form, I didn't set correctly..
Thanks for any help