D
David
Having a little problem,
I have got a combobox on a form that looks to another table to retrieve a
value list for tax rates.
The combobox and all works fine, what I am trying to accomplish is to change
the default value on demand through code.
The table that the combobox looks at has 2 fields, a percentage rate the the
decimal equivelent.
The combobox has its default value set to 9.75 which is in the bound column
of 2, I am trying through code to change the value, and it works on the
current new record, but when the record changes it goes back to 9.75.
I am using the following
Private Sub combo9_AfterUpdate()
Dim BytChoice As Byte
BytChoice = MsgBox("Do You need to change the default Tax Rate of " &
Me.combo9 & "% ?", vbQuestion + vbYesNo, "Title of my program")
If BytChoice = vbYes Then
MsgBox "The new rate of " & Me.combo9 & "% will take effect when you
close this form.", vbOKOnly, "Title of my program"
Me.SetRate.DefaultValue = Me.combo9
End If
If BytChoice = vbNo Then
Me.Text10.SetFocus
End If
End Sub
Can this be done?
I would like to specify the rate for ease of use, then when the tax rate
increases(which it does every year) have the user to change it on the form
instead of going too another form.
I have got a combobox on a form that looks to another table to retrieve a
value list for tax rates.
The combobox and all works fine, what I am trying to accomplish is to change
the default value on demand through code.
The table that the combobox looks at has 2 fields, a percentage rate the the
decimal equivelent.
The combobox has its default value set to 9.75 which is in the bound column
of 2, I am trying through code to change the value, and it works on the
current new record, but when the record changes it goes back to 9.75.
I am using the following
Private Sub combo9_AfterUpdate()
Dim BytChoice As Byte
BytChoice = MsgBox("Do You need to change the default Tax Rate of " &
Me.combo9 & "% ?", vbQuestion + vbYesNo, "Title of my program")
If BytChoice = vbYes Then
MsgBox "The new rate of " & Me.combo9 & "% will take effect when you
close this form.", vbOKOnly, "Title of my program"
Me.SetRate.DefaultValue = Me.combo9
End If
If BytChoice = vbNo Then
Me.Text10.SetFocus
End If
End Sub
Can this be done?
I would like to specify the rate for ease of use, then when the tax rate
increases(which it does every year) have the user to change it on the form
instead of going too another form.