The first thing I noticed is that AssessedDate is a text field. It should be a date/time field.
You still had qryAssess as name of the subform in your code (that was the name in your other sample database).
I suspect that your form is partially corrupt, it refused to recognize cboItemStatus in the SQL. I worked around it by using a variable.
You didn't use my suggestion correctly. You set the DefaultValue of some controls in code, instead of the Value. You have
Code: Select all
Private Sub Form_BeforeInsert(Cancel As Integer)
Me.cboItemStatus.DefaultValue = 1
Me.txtAssessedDate.DefaultValue = Date
End Sub
I deliberately did NOT use DefaultValue! It should be
Code: Select all
Private Sub Form_BeforeInsert(Cancel As Integer)
Me.cboItemStatus = 1
Me.txtAssessedDate = Date
End Sub
In the future, please take the trouble to read my replies more carefully.
NewDistDB-v01.zip
You do not have the required permissions to view the files attached to this post.