Thanks for posting the solution - you can mark this thread as solved. To get more focused answers, do provide details. Your original post never mentioned an error message.
It's kind of odd to be using variables for table and field names for a simple select query I'd say. FWIW you could shorten it a bit
Code:
SQLStr = "SELECT " & table & ".[" & recordlabel & "], " & table & ".[" & returnvalue & "] FROM " & table & " WHERE (((" & table & ".[" & recordlabel & "]) = " & recordid & "))"
or maybe even
Code:
SQLStr = "SELECT T.[" & recordlabel & "], T.[" & returnvalue & "] FROM " & table & " AS T WHERE T.[" & recordlabel & "] = T.[" & recordid & "]"
Not sure why you have square brackets in only part of your string, so I put them in throughout. If they're not needed at the end as you have it, they shouldn't be needed at the beginning.