M
miss031
This problem is driving me crazy. I posted this in queries, but it still
isn't solved.
I have a query that selects a random record, SQL is below. This query works
every time, whenever it is opened, it returns a completely random record. I
made a subform on my main menu form, and made the recordsource of one of the
fields in the subform the result of this query. Now I cannot get a random
record to show up un the subform when it first opens in the application.
Every time I open the application, the subform shows the same record, but if
I close the form and open it again, it bring a random record every time.
Finding this, I tried to do an open and close of the form in a VBA function,
essentially a refresh, but that doesn't work either.
Here is the SQL for my query,but THE QUERY WORKS FINE:
SELECT TOP 1 table_quotes.*
FROM table_quotes
WHERE randomizer()=0
ORDER BY rnd(isnull([table_quotes].
isn't solved.
I have a query that selects a random record, SQL is below. This query works
every time, whenever it is opened, it returns a completely random record. I
made a subform on my main menu form, and made the recordsource of one of the
fields in the subform the result of this query. Now I cannot get a random
record to show up un the subform when it first opens in the application.
Every time I open the application, the subform shows the same record, but if
I close the form and open it again, it bring a random record every time.
Finding this, I tried to do an open and close of the form in a VBA function,
essentially a refresh, but that doesn't work either.
Here is the SQL for my query,but THE QUERY WORKS FINE:
SELECT TOP 1 table_quotes.*
FROM table_quotes
WHERE randomizer()=0
ORDER BY rnd(isnull([table_quotes].
)*0+1);
The only problem I have is when its in the form. I tried it by just opening
the subform when the application begins, and it has the same result: not
random. Please help!