inserting variables in code????
I have a problem trying to insert user input values in a where statement, the
user provides the data via a userform. numonth and nuyear are populated, i
them want to add these to the where statement as below -
Dim numonth As String 'numonth = 05
Dim nuyear As String 'nuyear = 5
"WHERE (VinstCoreData.ResDate= 50501 And VinstCoreData.ResDate<= 50531) AND
(VinstCoreData.PRG Like '%MOTIS%')" _
How can I insert the numonth and nuyear into the where statement??? Any ideas?
Thanks, Andrew.
|