access 2010 calculated field help

philwalker531

Registered User.
Local time
Today, 01:25
Joined
Feb 14, 2010
Messages
22
hi,

i have a field on my form for balance which is a straightforward adding and subtracting to give me the balance. what i would like to do is if the balance is less than 1 or zero i would like it to apply a check into a tick box called 'paidinfull'

i have tried running an afetr update action but it doesnt like it :(

what i put in was

If [form]![Balance] <1
then setproperty
control name paidinfull
property value
value true

end if

the error message says microsoft office cannot find the name 'form' you entered in the exprerssion . you may have specified a control that wasnt on the current object without specifying the correct form or report context.

can anyone help?
 
Try using Me![Balance] instead..

p.s. and is that the exact code you put in? I hardly think that would work..
 
tried it ans still not working - ive put the stuff in using the 'wizard' as shown in the image.

if it wont work what should i do?
 

Attachments

  • acces.jpg
    acces.jpg
    76.4 KB · Views: 181
Try adding a "Code Builder" instead of a Macro.. personally I would use VBA Code over Macros.. It is simple.. just go to the Balance filed and then search for the AfterUpdate property in events. Click on that it will pop up with a small window asking you to choose a option select "Code Builder". Then just placed this piece of code inside..
Code:
If Me![Balance] <1 Then 
paidinfull=-1
End If
 

Users who are viewing this thread

Back
Top Bottom