PC Review


Reply
Thread Tools Rate Thread

Crazy Purchase Checkbox Problem- mdb link available

 
 
New Member
Join Date: Oct 2011
Posts: 2
 
      5th Oct 2011
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
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
_____________________________________________________________________
 
Reply With Quote
 
 
 
 
New Member
Join Date: Oct 2011
Posts: 2
 
      5th Oct 2011
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
 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off



Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:03 AM.