Hi,
I have a query that will choose a random record (1 record) and now I want to put that record into a form controls, how to do that?
Hi,
I have a query that will choose a random record (1 record) and now I want to put that record into a form controls, how to do that?
Did you try binding form to query?
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
If the query is choosing one record, how are you getting multiple records in the form?![]()
Please use # icon on toolbar when posting code snippets.
Cross Posting: https://www.excelguru.ca/content.php?184
Debugging Access: https://www.youtube.com/results?sear...bug+access+vba
Better show your query that generates the random record - sounds to me you are not seeding it
have you seen this link as to how to use the rnd function (I assume that is what you are using)
https://learn.microsoft.com/en-us/of...p/rnd-function
Here's a query that returns a single random row using a unique numeric field (preferably an auto-numbered ID if you have one).
Code:SELECT TOP 1 * FROM table ORDER BY RND(table.id)