D
DataDiva via AccessMonster.com
Hello All,
I have created a tabbed form with four subforms. In the first subform there
is a field named
[Corrective _Action_Req_Date]. I set the default value to =Date() in the data
section of the Property Sheet. I would like the date to automatically be
change to current date + 30 when the form is opened. I have used this code:
Private Sub Form_Current()
Me.Corrective_Action_Req_Date = Me.Parent.Todays_Date + 30
End Sub
The code is working but, I keep getting a message "Index or primary key
cannot contain a Null value." I have tried placing the code in almost every
other event within the control, subform and main form. I am not sure what I
am doing wrong. Any insight is appreciated!
Thanks,
Courtney
I have created a tabbed form with four subforms. In the first subform there
is a field named
[Corrective _Action_Req_Date]. I set the default value to =Date() in the data
section of the Property Sheet. I would like the date to automatically be
change to current date + 30 when the form is opened. I have used this code:
Private Sub Form_Current()
Me.Corrective_Action_Req_Date = Me.Parent.Todays_Date + 30
End Sub
The code is working but, I keep getting a message "Index or primary key
cannot contain a Null value." I have tried placing the code in almost every
other event within the control, subform and main form. I am not sure what I
am doing wrong. Any insight is appreciated!
Thanks,
Courtney