G
Guest
Hi,
I've a form with multiple combo boxes where the user selects an option, and
each of these combo boxes has a "related" control in which the user enters a
price for the option selected.
What I'm trying to do is to set a default value in both the combo box and
price control if the user selects a value in a SwareID control previously (on
the same form).
I've written an after update event procedure:
Private Sub SwareID_AfterUpdate()
If Me!SwareID = "WILES21L9" Then
Me!QWilcomOpt1 = "Smart Font Wilcom ES21"
Me!QWilcomOptPrice1 = 1000
Else
If Me!SwareID = "WILES21E9" Then
Me!QWilcomOpt1 = "Smart Font Wilcom ES21"
Me!QWilcomOptPrice1 = 1000
Else
If Me!SwareID = "WILES21D9" Then
Me!QWilcomOpt1 = "Smart Font Wilcom ES21"
Me!QWilcomOptPrice1 = 1000
Me!QWilcomOpt2 = "Auto Appliqué Wilcom ES21D (requires Input C)"
Me!QWilcomOptPrice2 = 1300
End If
End If
End If
End Sub
The controls for the QWilcomOptPrice1, 2 etc. fields display the values
correctly according to the code above, however, the QWilcomOpt1, 2 etc.
controls are still blank. These are the combo box controls, so I figure
there is something else I need to do.
Can anyone offer any suggestions?
Thanks, Sue.
I've a form with multiple combo boxes where the user selects an option, and
each of these combo boxes has a "related" control in which the user enters a
price for the option selected.
What I'm trying to do is to set a default value in both the combo box and
price control if the user selects a value in a SwareID control previously (on
the same form).
I've written an after update event procedure:
Private Sub SwareID_AfterUpdate()
If Me!SwareID = "WILES21L9" Then
Me!QWilcomOpt1 = "Smart Font Wilcom ES21"
Me!QWilcomOptPrice1 = 1000
Else
If Me!SwareID = "WILES21E9" Then
Me!QWilcomOpt1 = "Smart Font Wilcom ES21"
Me!QWilcomOptPrice1 = 1000
Else
If Me!SwareID = "WILES21D9" Then
Me!QWilcomOpt1 = "Smart Font Wilcom ES21"
Me!QWilcomOptPrice1 = 1000
Me!QWilcomOpt2 = "Auto Appliqué Wilcom ES21D (requires Input C)"
Me!QWilcomOptPrice2 = 1300
End If
End If
End If
End Sub
The controls for the QWilcomOptPrice1, 2 etc. fields display the values
correctly according to the code above, however, the QWilcomOpt1, 2 etc.
controls are still blank. These are the combo box controls, so I figure
there is something else I need to do.
Can anyone offer any suggestions?
Thanks, Sue.