Steve <(E-Mail Removed)> wrote in
news:86cceb65-214f-44ce-80d5-(E-Mail Removed)
m:
> Hi
>
> I have a table with three columns which contain banded funding
> rates eg
>
> Band - Day Rate - Residential Rate
> F - 22495 - 42303
> G - 32967 - 49069
>
> On the input form there are two combo boxes where the user selects
> the band (ie F or G) and whether the day or residential rate
> applies (these are coded D or R in the combo box.)
>
> There is a text box on the form for entering the actual funding
> amount. Can this be generated automatically based on the input
> from the two combo boxes (eg, Band F, Residential, would be
> 42303.)
>
> If so, how?
>
> Many thanks
> Steven Thompson
>
in the after_update event for each combobox,select the event procedure
option and add the following Visual Basic code:
IF Band = "F" then
if Rate = "D" then
Me.ActualFundingAmt = 22495
else ' rate must be R
Me.ActualFundingAmt = 42303
end if
Else ' Band is G
if Rate = "D" then
Me.ActualFundingAmt = 32967
else
Me.ActualFundingAmt = 49069
End if
End if
Note you may want to provide some preliminary tests to prevent the
calculation if either combobox is null or empty.
--
Bob Q.
PA is y I've altered my address.
|