is it possible to change the values of checked/unchecked boxes in yes/no fields?

chosch

New member
Local time
Today, 14:43
Joined
Apr 8, 2008
Messages
9
hey guys, is there anyway to change the value of a checked or unchecked box in a yes/no data field... for example. for those of whom HAVE paid their subscription fee (therefore have the box checked in the "Fees Paid" field), they have $0 owing, and those who have yet to pay (unchecked box in "Fees Paid" field) have $50 owing. i have entirely no idea as how to go about this... so any help would be great, cheers
 
Try something like this:
Code:
    If IsNumeric(txtOwing) Then
        If txtOwing.Value > 0 Then
            chkFeesPaid.Value = False
        Else
            chkFeesPaid.Value = True
        End If
    End If

HTH,
Chris
 
sorry buddy, i dont entirely understand where to insert this coding. i remember coming across having to code certain things, but i cant remember where and how
 
Where it goes depends on how you have designed your form. Could you post the DB, or at least a stripped out version if you are worried about confidentiality, that would save me second- guessing you.
 
here ya go mate. yeh, the main outline of the planned data base is that if you return the object late.. you incur a $5 late fee.. regardless of if it was 1 day or 20 days late. also, a $50 annual compulsory subscription fee that is due to be paid by members.. those of whom have been checked have already paid.
 

Attachments

have you had a chance to have a look at the database as of yet?
 
Your sample DB is missing the table or query the Form is bound to for a start.

Where is it determined within your DB that the Customer has paid the subscription? Where is the payment placed so as to determine whether or not it is paid?

The code ecawilkinson has so kindly provided would generally be placed into the Form's OnCurrent event. Of course, proper names would need to be placed into the code to match what you have in your database. Some of that information is still missing. With what you have provided, Here is ecawilkinson with info that is available:

Code:
    If IsNumeric([I][COLOR="Red"]WhateverIsHoldingTheSubscriptionFee[/COLOR][/I]) Then
        If [COLOR="Red"][I]WhateverIsHoldingTheSubscriptionFee[/I][/COLOR].Value > 0 Then
            Me.[Annual Fee Due].Value = False
        Else
            Me.[Annual Fee Due].Value = True
        End If
    End If

Help us help you....

.
 

Users who are viewing this thread

Back
Top Bottom