Numerical values in queries
Posted on 1999-07-23
I have two variables that I would like to use to select records in a query. One of them is a string variable (e.g., strName) and the other is a number (e.g.,RecNum). I can get the following to work: "Select * from TableName where name = '" & strName & "'". I can also get results with "Select * from TableName where RecNum = (for example)30". What I cannot figure out is how to get the proper syntax using the variable RecNum rather than a specific numerical value.