Dear Group,
I am straggling with check box logic. Here what I have…
I have a form with subform based on the query. Let’s say Form1, subform Form2 and based query name is Query1.
One of query field is a check box. This check box is responsible for free goods and located in the subform (Form2). I also have a text field in my subform width shows
$$ amount of the product.
Here is logic:
IF check box is checked, that means that the product is a free goods (I’d like to move the work “FREE” into text box,
Else
If the check box is not checked, that means the product must be charged (Qty * item cost).
The code I am using in VB is:
Private Sub Form_Load()
If Offer_Flag = -1 Then
Offer = "Free"
Else
Offer = [Offer_Qty] * [Prd_PrcD]
End If
End Sub
The problem is when the forms loads, it’s checks only for the first record in query (Query1). Another words, if the first record checked, it loads “FREE” for all records in the subform; if the first record is not checked it calculated text field based on the data in the first record of the query.
In what event I should use a logic to display the value (“FREE” or Item cost)??
Thanks for you feedbacks and help.
Regards,
Goldygirl
I am straggling with check box logic. Here what I have…
I have a form with subform based on the query. Let’s say Form1, subform Form2 and based query name is Query1.
One of query field is a check box. This check box is responsible for free goods and located in the subform (Form2). I also have a text field in my subform width shows
$$ amount of the product.
Here is logic:
IF check box is checked, that means that the product is a free goods (I’d like to move the work “FREE” into text box,
Else
If the check box is not checked, that means the product must be charged (Qty * item cost).
The code I am using in VB is:
Private Sub Form_Load()
If Offer_Flag = -1 Then
Offer = "Free"
Else
Offer = [Offer_Qty] * [Prd_PrcD]
End If
End Sub
The problem is when the forms loads, it’s checks only for the first record in query (Query1). Another words, if the first record checked, it loads “FREE” for all records in the subform; if the first record is not checked it calculated text field based on the data in the first record of the query.
In what event I should use a logic to display the value (“FREE” or Item cost)??
Thanks for you feedbacks and help.
Regards,
Goldygirl