I'm not sure how to see if anyone has done this yet. I searched a bit with no results.
My work log form has had a flaw pop up mostly due to the end users being dumb in my opinion but i know it can be programmed around so now to do it.
the form works like this : hit some buttons to fill in current user, date, time, ect. then from a combo box pick an active [PO Number], then from a combo box pick a [part name] based on that active po, then from a combo box pick a [job] based on that [part name]. theres a few more fields but you get the point.
the problem, one guy endlessly goes back after filling out the form and changes the [po number] but all the other fields he does not change which are now wrong.
so i need a way for the form to check itself. and here is how far ive gotten and i know its wrong. If the IIF statement would work I might be able to figure out the rest.
Private Sub Form_AfterUpdate()
If IsNull([Part Name]) Then
GoTo mark2115
Else
IIf ([part name] = (select[purchase order list].[part name] from [purchase order list] where [purchase order list].[po number]=forms![work done]![po number]),GoTo mark2115,GoTo mark2114)
mark2114
DoCmd.OpenForm "Part Name Error"
mark2115
end if
End Sub
My work log form has had a flaw pop up mostly due to the end users being dumb in my opinion but i know it can be programmed around so now to do it.
the form works like this : hit some buttons to fill in current user, date, time, ect. then from a combo box pick an active [PO Number], then from a combo box pick a [part name] based on that active po, then from a combo box pick a [job] based on that [part name]. theres a few more fields but you get the point.
the problem, one guy endlessly goes back after filling out the form and changes the [po number] but all the other fields he does not change which are now wrong.
so i need a way for the form to check itself. and here is how far ive gotten and i know its wrong. If the IIF statement would work I might be able to figure out the rest.
Private Sub Form_AfterUpdate()
If IsNull([Part Name]) Then
GoTo mark2115
Else
IIf ([part name] = (select[purchase order list].[part name] from [purchase order list] where [purchase order list].[po number]=forms![work done]![po number]),GoTo mark2115,GoTo mark2114)
mark2114
DoCmd.OpenForm "Part Name Error"
mark2115
end if
End Sub