|
Hi was wondering if anyone could tell me why my code doesn't work right. It goes straight to the Invalid Store Entry box.
Thanks for the help
Select Case UCase(strStore)
Case "All"
qtbSales.CommandText = "SELECT * FROM 2002sales ORDER BY store, month"
Case "Glen Park", "Jackson", "Warren"
qtbSales.CommandText = "SELECT * FROM 2002sales WHERE store = '" _
& strStore & "' ORDER BY month"
Case Else
MsgBox prompt:="Invalid store entry", Buttons:=vbOKOnly + vbInformation
Exit Sub
End Select
<Added>
Hi I was wondering if anyone could tell me why my code doesn't work right. It goes straight to the Invalid Store Entry box.
Thanks for the help
Select Case UCase(strStore)
Case "All"
qtbSales.CommandText = "SELECT * FROM 2002sales ORDER BY store, month"
Case "Glen Park", "Jackson", "Warren"
qtbSales.CommandText = "SELECT * FROM 2002sales WHERE store = '" _
& strStore & "' ORDER BY month"
Case Else
MsgBox prompt:="Invalid store entry", Buttons:=vbOKOnly + vbInformation
Exit Sub
End Select
|
|
|
|
|
|
|
|