Crazy Purchase Checkbox Problem- mdb link available

Joined
Oct 5, 2011
Messages
2
Reaction score
0
Hi all

I have pretty well finished a cafeteria database for a food-shelter.
the problem is a purchase history datasheet: The function of the
checkbox is to update stock only once... At first it seems fine until
I test another checkbox already checked. Meaning... by clicking between
two previously (checked) checkboxes.... as I go from one... leaving the other
the previous checkbox does not change it status... but the stock [UnitsOnOrder] field
is updated. when it shouldn't. the "Function PurchaseUpdateMacro1()" works fine...


Can some body help I am stuck on this problem 4-days :confused:
I am using Access 2003

Data Tab
Validation Rule: <>0
Validation Text: Can't undo "Completion" Checkbox

________________________________________________________________________
Function PurchaseUpdateMacro1() ' This works fine
On Error GoTo PurchaseUpdateMacro1_Err

Forms!Tab![Purchase Update].Form![Purchase UpdateQuery Form].Form!UnitsInStock = Forms!Tab![Purchase Update].Form![Purchase UpdateQuery Form].Form! + Forms!Tab![Purchase Update].Form![Purchase UpdateQuery Form].Form!UnitsOnOrder

Forms!Tab![Purchase Update].Form![Purchase UpdateQuery Form].Form!Purchase = Forms!Tab![Purchase Update].Form![Purchase UpdateQuery Form].Form!UnitPrice * Forms!Tab![Purchase Update].Form![Purchase UpdateQuery Form].Form!UnitsOnOrder


PurchaseUpdateMacro1_Exit:
Exit Function

PurchaseUpdateMacro1_Err:
MsgBox Error$
Resume PurchaseUpdateMacro1_Exit

End Function
______________________________________________________________________
Private Sub Completion_Click()
If Me![Completion] = "True" Then
Exit Sub
Else
Call PurchaseUpdateMacro1

End If
End Sub
_____________________________________________________________________
 
the answer is....
Private Sub Completion_Click()
If Me![Completion] = False Then
Me![Completion] = True
Call MacroCancelEvent

Exit Sub
Else
Call PurchaseUpdateMacro1
End If
End Sub
_____________________________________
the On Click....
The Validation Rule: <>0 ' should be removed: it interferes with the operation
 
Back
Top