I need to assign a value from a temp query field into a string variable to be used in the sub. Any ideas? Here’s the jist of my code:
Set dbsDatabase = CodeDb
strSQL = "SELECT Recruitment_Location_Name FROM [Recruitment Locations] WHERE [Recruitment_Location_ID] = intLocation"
Set qdfstrTemp = dbsDatabase.CreateQueryDef(strQname, strSQL)
‘I tried the next line (and several like it) to get the value
strLocation = [Temp_Location_Query].Recruitment_Location_Name
DoCmd.DeleteObject acQuery, strQname
Set dbsDatabase = Nothing
Thanks
Darrell
Set dbsDatabase = CodeDb
strSQL = "SELECT Recruitment_Location_Name FROM [Recruitment Locations] WHERE [Recruitment_Location_ID] = intLocation"
Set qdfstrTemp = dbsDatabase.CreateQueryDef(strQname, strSQL)
‘I tried the next line (and several like it) to get the value
strLocation = [Temp_Location_Query].Recruitment_Location_Name
DoCmd.DeleteObject acQuery, strQname
Set dbsDatabase = Nothing
Thanks
Darrell