D
Donbenz
I have a form set up from tracking inventory after it is inspected. I have
two buttons one that says pass one that says fail. After 5 consecutive
shipments pass I want a message box to pop up. I have the code so that after
5 clicks the message box pops up. My question is how can I reset the count
if the fail button is pressed. Here is the code I am using.
Static intX As Integer
intX = intX + 1
If intX = 1 Then
DoCmd.GoToRecord acDataForm, "5 Lot Proof block Log", acNext
DoCmd.SendObject acSendReport, "5 Lot Inspection", "SnapshotFormat(*.snp)",
"", "", "", "Failure of the 5 Lot Proof Block Log", "To Whom it may concern,
The Certified Supplier has failed their
first 5 lot proof block log inspection. This is the second failure of the
part since the inspection began.", True, ""
End If
If intX = 2 Then
mybox = MsgBox("Third Consecutive Failure For The Part?", vbYesNo)
End If
If mybox = vbYes Then
DoCmd.OpenForm "Certified Supplier Performance Tracking Log", acNormal
DoCmd.SendObject acSendReport, "5 Lot Inspection",
"SnapshotFormat(*.snp)", "", "", "", "Third Failure of the 5 Lot Proof Block
Log", "The Certified Supplier has failed their third consecutive 5 Lot Proof
Block inspection. They are to be removed from the certified supplier
program", True, ""
DoCmd.Close acForm, "5 Lot Proof Block Log", acSavePrompt
End If
Any help would be appreciated.
Thanks,
Donbenz
two buttons one that says pass one that says fail. After 5 consecutive
shipments pass I want a message box to pop up. I have the code so that after
5 clicks the message box pops up. My question is how can I reset the count
if the fail button is pressed. Here is the code I am using.
Static intX As Integer
intX = intX + 1
If intX = 1 Then
DoCmd.GoToRecord acDataForm, "5 Lot Proof block Log", acNext
DoCmd.SendObject acSendReport, "5 Lot Inspection", "SnapshotFormat(*.snp)",
"", "", "", "Failure of the 5 Lot Proof Block Log", "To Whom it may concern,
The Certified Supplier has failed their
first 5 lot proof block log inspection. This is the second failure of the
part since the inspection began.", True, ""
End If
If intX = 2 Then
mybox = MsgBox("Third Consecutive Failure For The Part?", vbYesNo)
End If
If mybox = vbYes Then
DoCmd.OpenForm "Certified Supplier Performance Tracking Log", acNormal
DoCmd.SendObject acSendReport, "5 Lot Inspection",
"SnapshotFormat(*.snp)", "", "", "", "Third Failure of the 5 Lot Proof Block
Log", "The Certified Supplier has failed their third consecutive 5 Lot Proof
Block inspection. They are to be removed from the certified supplier
program", True, ""
DoCmd.Close acForm, "5 Lot Proof Block Log", acSavePrompt
End If
Any help would be appreciated.
Thanks,
Donbenz