Afternoon everyone,
The Non Conformance file used as part of "my" companies GMP compliance
program uses a form that saves a record as per the code below ...
stDocName = "NCF Form"
DoCmd.OpenForm stDocName, acNormal, , , acFormAdd
Forms![NCF Form]![NCR] = DDate & "-" & Format(NCRNumber, "0000")
Forms![NCF Form]![Date Initiated] = Date
DoCmd.RunCommand acCmdSaveRecord
Forms![NCF Form]![Type].SetFocus
The idea of the form is the the new NCF number is automatically
generated, along with the Date of entry and then the form is saved to
stop duplicate NCF numbers being allocated. If the record is saved,
can anyone pls tell me why duplicate numbers are being allocated? I
should also add that there is code to delete any record that has had
data enetered if a user does not actually enter anything when the form
is closed. Do I need to change the code to force people to enter data
before the record is saved?
Suggestions are welcome.
Stinky Pete ;-)