D
DMUM via AccessMonster.com
Hi, I am using a SQL statement as the record source for a list box on my form.
This is my query
strSQl = "SELECT tblTemp_NewDefs.Defnum, tblTemp_NewDefs.PRSA_Definition,
tblTemp_NewDefs.PRSA_Type " & _
"FROM tblTemp_NewDefs " & _
"WHERE tblTemp_NewDefs.PRSA_Type=Risk);"
Originally when I ran this, I kept getting the pop up message to provide a
value for Risk. Now it just runs through but provides no data. When I use
the " "'s around Risk as in
"WHERE tblTemp_NewDefs.PRSA_Type="Risk");"
the code is not accepted by the VBA code window (it turns red in my case)
I originally had the SQL string using a variable for "Risk" instead of the
word since I have to run the same query 4 times but with different criteria
for the PRSA_Type. I used:
"WHERE tblTemp_NewDefs.PRSA_Type= " & procName & ");" where procName =
"Risk"
Here again I get the pop up window requesting a value for Risk
This is quite frustrating because I don't have a clue as to why it isn't
accepting the value
This is my query
strSQl = "SELECT tblTemp_NewDefs.Defnum, tblTemp_NewDefs.PRSA_Definition,
tblTemp_NewDefs.PRSA_Type " & _
"FROM tblTemp_NewDefs " & _
"WHERE tblTemp_NewDefs.PRSA_Type=Risk);"
Originally when I ran this, I kept getting the pop up message to provide a
value for Risk. Now it just runs through but provides no data. When I use
the " "'s around Risk as in
"WHERE tblTemp_NewDefs.PRSA_Type="Risk");"
the code is not accepted by the VBA code window (it turns red in my case)
I originally had the SQL string using a variable for "Risk" instead of the
word since I have to run the same query 4 times but with different criteria
for the PRSA_Type. I used:
"WHERE tblTemp_NewDefs.PRSA_Type= " & procName & ");" where procName =
"Risk"
Here again I get the pop up window requesting a value for Risk
This is quite frustrating because I don't have a clue as to why it isn't
accepting the value