Hi Folks,
I have three different functions that I am trying to incorporate on the same form. Everything is working fine, but I am getting hung up on Required Values for record input. (I want different fields to be required at different times, depending on which section the user is entering from).
Form 1 - Section 1:
Operator creates a record in the database with many fields.
Form 1 - Section 2:
Operator scans in a record identifier and updates a different field (previously blank) of the record.
Form 1 - Section 3:
Operator scans in a record identifier and updates a different field (previously blank) of the record.
I am trying to incorporate a rule that the operator has to select him/herself as they scan in and update each record when using sections 2 and 3.
Is there a way to modify the code below to require a selection in Field: RecByExcOp only after ToExc updates?
Code:
Private Sub CheckIn_AfterUpdate()
DoCmd.SetWarnings (False)
Const cQuote = """"
Me.ExcOpRec.DefaultValue = cQuote & Me.ExcOpRec.Value & cQuote
DoCmd.OpenQuery "qryRecByExcUpd"
Me.CheckIn = ""
Me.ExcOpRec.SetFocus
Me.CheckIn.SetFocus
End Sub
qryRecByExcUpd looks like this:
Code:
UPDATE tblMainDB SET tblMainDB.RecByExc = Yes, tblMainDB.RecByExc_Time = Now(), tblMainDB.RecByExcOp = [Forms]![frmExc]![ExcOpRec]
WHERE (((tblMainDB.Note_ID)=[Forms]![frmExc]![CheckIn]));