Access Library

AlyKatVandy

New member
Local time
Today, 02:44
Joined
Jul 5, 2019
Messages
2
Greetings! I've been playing around in Access trying to make a record of all the books in my library. I've gotten it mostly completed but I'm having trouble with a button in a form. My goal is to be able to click the button and it will pull a random record from my "UnreadAll" query. Any ideas?
 
for starter you need to create a random number generator (search the net - vba random generator).
you also need an autonumber to be included in your query.
then you can pull the record from your UnreadAll query by using dlookup or select query, which ever you prefer.

select * from UnreadAll where ID = fnRandom();

dlookup("ColumnToReturn", "UnreadAll", "ID = " & fnRandom()
 
Hi. Welcome to the forum! Have a look at this. Good luck!
 

Users who are viewing this thread

Back
Top Bottom