I have a query that pulls data & displays results in a form. On the form I have the following items:
a combo box that allows choosing 2 different text values manually.
2 text boxes that displays 2 prices from the query
A command button to choose the corresponding price according to the value chosen in the combo box and displays it with a message in another textbox. So far, this is what I got but it's not working. Please troubleshoot. Thanks
Private Sub Command16_Click()
Dim msg1, msg2, msg3, msg4, msg5, sign, space, Stock_Availability, Item As String
Dim price_to_show As Double
msg1 = "Dear XYZ" + vbCrLf
msg2 = "Thank you for your inquiry. Please find below the information"
Item = [Description]
msg3 = "Price:"
msg4 = "Status:"
msg5 = "Regards"
sign = "$"
space = " "
If [Stock Availability] <= 0 Then
Stock_Availability = "Not Currently in Stock"
Else: Stock_Availability = "In Stock"
If Me.Combo46.Text = "Public" Then
price_to_show = [Retail Price]
ElseIf Me.Combo46.Text = "Authorized Dealer" Then
price_to_show = [Authorized Dealer Price]
Text17 = msg1 & vbCrLf & msg2 & vbCrLf & vbCrLf & Item & vbCrLf & msg3 & space & sign & price_to_show & vbCrLf & msg4 & space & _
Stock_Availability & vbCrLf & vbCrLf & _
Text17.Visible = True