variable coding help

  • Thread starter Thread starter m stroup
  • Start date Start date
M

m stroup

Dim Divis as string
Dim strWhere as string

Select Case optDivision.value
Case 1
Divis = "Property"
Case 2
Divis = "House"
Case Else
Divis = ""
End Select

StrWhere = " WHERE qryExpense.Status = ""Expensed"" AND qryExpense.Div = " &
Divis

I get a message box asking me to input House, when that is what I would like
the criteria to be.

Any suggestions?
 
Hi m stroup,
try in this way

StrWhere = " WHERE qryExpense.Status = 'Expensed' AND qryExpense.Div = """ &
Divis & """"

HTH Paolo
 
Back
Top