Subform not updating correctly (1 Viewer)

MiniD011

Registered User.
Local time
Today, 22:27
Joined
Mar 20, 2013
Messages
20
Morning all,

I have been having issues with a subform on the attached database - for some reason it is not always updating to show corresponding records.

To give an idea of what I am planning, this is effectively going to be an interactive learning portal which can test users as well. There will be learning material (not yet included) and a bank of questions with corresponding multiple-choice answers, only one of which is correct. Each time the main form is loaded (Cat1MainForm) it randomly selects and orders questions, then, via a sub-form, returns three potential answers. There will then be radio buttons with which the users can answer appropriately.

If you load up Cat1MainForm and scroll through various questions you will see that sometimes the answers appear, other times not. Sometimes on one record the answers are there, you navigate away and back, and they have disappeared, and vice-versa. If anyone could explain why this is happening or provide a solution I would be really grateful.

On a separate note, this is a concept at the moment, and I am fully aware it is probably a horrible way to go about providing a solution. If anyone has any other solutions, even fundamentally different ones, then I am all ears!

Thanks in advance for any help,

Dan Roberds
 

Attachments

  • RegulatoryTestingPlatform Database.zip
    25.9 KB · Views: 64
Last edited:

Uncle Gizmo

Nifty Access Guy
Staff member
Local time
Today, 22:27
Joined
Jul 9, 2003
Messages
16,360
I and many others here use phones and tablets to view the forum, hence we do not have access to a PC.

With this in mind please post an explanation with some samples of the data from your database.

Also post the SQL statement that is the record source of your subform, this might be a query, in that case post the SQL statement of the query.

As a general rule you will more likely get an answer if you post a specific single step question along with a simple, not too wordy explanation.
 

Uncle Gizmo

Nifty Access Guy
Staff member
Local time
Today, 22:27
Joined
Jul 9, 2003
Messages
16,360
Regarding the 1 megabyte size of your uploaded database, you should reduce the records in your database to minimum. Make sure you have "compact on close" switch on and then also provide a database in *.zip file format.
 

MiniD011

Registered User.
Local time
Today, 22:27
Joined
Mar 20, 2013
Messages
20
Thanks for your help Uncle Gizmo, please find reuploaded. At present there are only two forms, two queries, and three tables, I can't cut it down any further. The main form uses a recordsource from a query:
Code:
SELECT TOP 10 Questions.QuestionID, Questions.Question
FROM Questions
WHERE (((Questions.CategoryID)=1))
ORDER BY Rnd(-(100000*questionID)*Time());

The subform uses data from a query:
Code:
SELECT Cat1Questions.QuestionID, Cat1Questions.Question, Answers.Answer, Answers.CorrectAnswer
FROM Cat1Questions INNER JOIN Answers ON Cat1Questions.QuestionID = Answers.QuestionID;

But the main form isn't always displaying records within the subform. There doesn't seem to be anything wrong with it per se, as the subform sometimes displays the records.

I'm not sure of the best way to upload a sample of my data exactly, but if the above is insufficient let me know and I will do my best.

Thank you in advance,

Dan Roberds
 

Uncle Gizmo

Nifty Access Guy
Staff member
Local time
Today, 22:27
Joined
Jul 9, 2003
Messages
16,360
Thanks for your help Uncle Gizmo, please find reuploaded. At present there are only two forms, two queries, and three tables, I can't cut it down any further. The main form uses a recordsource from a query:
Code:
SELECT TOP 10 Questions.QuestionID, Questions.Question
FROM Questions
WHERE (((Questions.CategoryID)=1))
ORDER BY Rnd(-(100000*questionID)*Time());

The subform uses data from a query:
Code:
SELECT Cat1Questions.QuestionID, Cat1Questions.Question, Answers.Answer, Answers.CorrectAnswer
FROM Cat1Questions INNER JOIN Answers ON Cat1Questions.QuestionID = Answers.QuestionID;

But the main form isn't always displaying records within the subform. There doesn't seem to be anything wrong with it per se, as the subform sometimes displays the records.

I'm not sure of the best way to upload a sample of my data exactly, but if the above is insufficient let me know and I will do my best.

Thank you in advance,

Dan Roberds

I can't find those queries in your sample DB?
 

Users who are viewing this thread

Top Bottom