1 Attachment(s)
Connecting Option Boxes to an ADO databar
Hey i am writing a code for a newsagency program and want to use option boxes to decide whether the newspaper is ordered weekly, or mon-fri, or sat and sun. from this selection i want to be able to calculate and display the weekly cost and write the changes back to the database,
below is some of my code that i am using for the Check boxes, this is an option i can complete BUT is it not prefered...
Private Sub chkAge_Click()
If chkAge.Value = 0 Then 'when the check is off
AGE = 0 'set the cost to zero
chkAgeMF.Visible = False 'turn the check boxes that
chkAge7D.Visible = False 'i want to be option boxes off
chkAgeSS.Visible = False
'add the three papers together and dispay
lblWeekC = Format(AGE + HS + AUS, "currency")
Else
chkAgeMF.Visible = True
chkAge7D.Visible = True
chkAgeSS.Visible = True
End If
End Sub
Private Sub chkAge7D_Click()
chkAgeSS.Value = False 'this makes the chk boxes behave
chkAgeMF.Value = False 'like option boxes
If chkAge7D.Value = 1 Then
AGE = 8
lblWeekC = Format(AGE + herald + AUS, "currency")
End If
End Sub
Private Sub chkAgeMF_Click()
chkAgeSS.Value = False
chkAge7D.Value = False
If chkAgeMF.Value = 1 Then
AGE = 6.5
lblWeekC = Format(AGE + herald + AUS, "currency")
End If
End Sub
Private Sub chkAgeSS_Click()
chkAge7D.Value = False
chkAgeMF.Value = False
If chkAgeSS.Value = 1 Then
AGE = 3.2
lblWeekC = Format(AGE + herald + AUS, "currency")
End If
End Sub
Private Sub chkAus_Click()
If chkAus.Value = 0 Then
chkAUSMF.Visible = False
chkAUS7D.Visible = False
chkAUSSS.Visible = False
AUS = 0
Else
chkAUSMF.Visible = True
chkAUS7D.Visible = True
chkAUSSS.Visible = True
End If
End Sub
'hope this makes sence
a pic if attached of the form
James :sick: