checkbox problems

krishnanhemanth

Registered User.
Local time
Tomorrow, 03:07
Joined
Jun 12, 2009
Messages
115
hi everybody
i have a field in my table called "PAY STATUS"----a YES/NO TYPE FIELD

on the form i have 3 calculated textboxes
1st Textbox is --- "PAYMENTS RECIEVED"
2nd Textbox is --- "PAYMENTS PENDING"
3rd Textbox is ---- "payments balance" ( "PAYMENTS PENDING - "PAYMENTS RECIEVED")

wHAT I WANT IS WHEN "PAYMENTS RECIEVED" EQUALS "PAYMENTS PENDING" OR
WHEN "PAYMENTS BALANCE" BECOMES ZERO.....THEN
THE "PAY STATUS" SHOULD BE POPULATED AUTOMATICALLY

THANKS IN ADVANCE
HEMANTH
 
well, you just need to make the control source for the paystatus

=[payments received] = [payments pending]
 
hi GEMMA
Thanks for your suggestion and time
I cannot change the control source since the checkbox is bound to a table
 
I think you basically answered it yourself didn't you?
IF [PAYMENTS RECIEVED] = [PAYMENTS PENDING] OR [PAYMENTS BALANCE] = 0 then
[PAY STATUS] = True
Else
end if
 
thank you ceh
Iam a newbee in vb
where should i code it.i mean should i code it in the afterupdate event of the "payment balance"
could u help me on the format

thank again
 
Well, if I'm reading this correctly it looks like your "Payment Received" is going to be what triggers the calculation... In that case I would put it on the BeforeUpdate event of that field. Something like...

If me.PaymentReceived = me.PaymentPending or me.PaymentBalance = 0 then
me.PayStatus = True
Else
me.Paystatus = False
end if

Don't use spaces in names... gets you into trouble :)
You might want to consider also what happens if Payment received exceeds payment pending????
 
hi ceh
Thanks for the suggestion.
i enterd the code in ---afterupdate event of the textbox and
oncurrent event of the form
nothing happened

i then modified the code to .enabled
here what happens is ---the checkbox is greyed out irresepective of the value

any help
 

Users who are viewing this thread

Back
Top Bottom