Randomizer

moke123

AWF VIP
Local time
Today, 00:40
Joined
Jan 11, 2013
Messages
4,511
this is an update to a post in the code repository located here: https://www.access-programmers.co.u...zing-data-for-posted-dbs.306745/#post-1640309

It's been 5-6 years but a flaw in my code was just discovered in that users who have spaces in table and field names get errors.
(Deservedly so as you shouldn't have spaces in object names.)

the error is in this line
Code:
strSql = "select " & fld & " from " & tbl & " where " & fld & " is not null"

In the attached copy it has been updated to deal with spaces in table and field names
Code:
strSql = "select [" & fld & "] from [" & tbl & "] where [" & fld & "] is not null"
 

Attachments

Users who are viewing this thread

Back
Top Bottom