Can someone here please tell me why my queries won't run?
I am trying to run a update query based on what the
strInput is.
Function TableUpdate()
Dim strMsg1 As String
Dim strMsg2 As String
Dim strInput As String
Dim strQuery As String
strMsg1 = "Please type in the product line that you
want to be updated."
strInput = InputBox(Prompt:=strMsg1, Title:="Update
Tables")
strMsg2 = "You either did not specify a correct
product line or you left the line blank. Please click the
Retry button to restart or Cancel to exit."
If Len(strInput) < 2 Then Exit Function
'Runs a specific query based on the strInput3 Input box.
Select Case strQuery
Case "OPS"
strQuery = "qry_OPSUpdate"
Case "Extruded Foam"
strQuery = "qry_ExtrudedFoamUpdate"
Case "Cold Cup"
strQuery = "qry_ColdCupUpdate"
Case "Conex Deli"
strQuery = "qry_ConexUpdate"
Case "Impact Dinnerware"
strQuery = "qry_ImpactDinnerwareUpdate"
Case "Thermoform"
strQuery = "qry_ThermoFormUpdate"
Case "HIPS"
strQuery = "qry_HIPSUpdate"
Case Else
If MsgBox(strMsg2, vbRetryCancel, "Error!") =
vbRetry Then
Call TableUpdate
Else: Exit Function
End If
End Select
End Function
Any ideas why?