On Sat, 30 Jan 2010 13:38:05 -0800, ArneGolf
<(E-Mail Removed)> wrote:
>I am having a problem with this code:
>Private Sub Cart_Shed_Number_AfterUpdate()
>If (Me.Cart_Shed_Number) = "NA" And (Me.Cart_Type) = "NA" Then
> Me.Cart_Shed_Fee = "0"
>ElseIf (Me.Cart_Shed_Number) >= "A" And (Me.Cart_Type) = "Gas" Then
> Me.Cart_Shed_Fee = "10"
>ElseIf (Me.Cart_Shed_Number) >= "A" And (Me.Cart_Type) = "Electric" Then
> Me.Cart_Shed_Fee = "20"
> End If
>End Sub
>I want it to auto populate a "cart shed fee" field on a form depending on
>the answers to the "cart shed number and cart type" fields.
And the problem is...? You didn't say.
What's the datatype of the Cart_Shed_Fee field in your table? I presume that
(despite its name) the Cart_Shed_Number is Text? Has the Cart_Type control
already been filled in when you select a value in Cart_Shed_Number?
--
John W. Vinson [MVP]
|