Hello again - apologies if I need to start another thread. Its the same question though.
Attached you will find a db named Rand by ID that returns random records based on the count of IDs, it works perfect thanks to June7. The 2nd db named Rand by State has the same idea behind it, return random records but it's based on the State field instead of the ID field.
I made changes to the VBA to look at the 'State' field instead of 'ID' in the 'Values' table but when I run the code I get a "Run-time error '3061': Too few parameters. Expected 1."
I read online that can be because the field does not exist or it's misspelled which is not the case. I couldn't find anything online that could help me solve this so I decided to repost.