Paulsburbon
Registered User.
- Local time
- Today, 15:49
- Joined
- May 3, 2005
- Messages
- 65
Hello all, I have a quesiton about using random numbers. I have a table for items in a database each with a price. I need to go thru and discount the price 10% to 15% randomly on each and put the new amount into a different field. I havn't the slightest idea how to do this. The closest I've gotten to doing this is:
Private Sub txtPrice_DblClick(Cancel As Integer)
If Me!Combo83 = 57 Then
txtPrice = ([curRetail] - ([curRetail] * 0.15))
Else
txtPrice = ([curRetail] - ([curRetail] * 0.12))
End If
If Me!Combo83 = 45 Then
txtPrice = ([curRetail] - ([curRetail] * 0.1))
Else
txtPrice = ([curRetail] - ([curRetail] * 0.12))
End If
End Sub
This only works on one record at a time. I would like something that worked on a set of records all at once. Thank all of you for your time.
Private Sub txtPrice_DblClick(Cancel As Integer)
If Me!Combo83 = 57 Then
txtPrice = ([curRetail] - ([curRetail] * 0.15))
Else
txtPrice = ([curRetail] - ([curRetail] * 0.12))
End If
If Me!Combo83 = 45 Then
txtPrice = ([curRetail] - ([curRetail] * 0.1))
Else
txtPrice = ([curRetail] - ([curRetail] * 0.12))
End If
End Sub
This only works on one record at a time. I would like something that worked on a set of records all at once. Thank all of you for your time.