Access Subform Not Populating

hhzyousafi

Registered User.
Local time
Tomorrow, 00:09
Joined
Nov 18, 2013
Messages
74
A subform on a main form is not populating after the user clicks on the subform and then returns to the main form and updates the field which the subform is linked to. The first time the subform populates absolutely okay; however once the user clicks on the subform and then returns to the mainform and updates the field which the subform is linked to the subform goes blank.

Please help.
 
The field on the mainform is called "TaskID" and the linked field on the subform is called "TaskID". When I first open the form and select, for example, "Task 100" the subform requeries correctly. When I make another selection from the dropdown and I select, for example, "Task 200" the subform requeries correctly. The issue comes when I click on the subform and then click back on the mainform and change my selection in the "TaskID" field. Let's say, for example, I selected "Task 200" and the form requeries correctly and then I click on the subform to scroll through the data there about "Task 200". Once I have scrolled through the data I click back on the mainform and I now select "Task 250" - the subform goes blank and it does not requery correctly. If I select "Task 200" again it shows the information correctly. What am I doing wrong here?
 
I don't understand how you select that task ?
If you agree, save a copy in Access 2003 format and upload it.
 
Hi Mihail,

I select the task from a combo box on the mainform. The combo box is populated with a query itself. If I don't click on the subform the combo box performs exactly as intended; however if I click on the subform and then click back on the mainform and make a selection from the combo box the subform goes blank. I can see the outline of the subform but the display is blank.

Regards,

Zohair Yousafi
 
Are you sure there are any data for "Task 250"?
 
The field on the mainform is called "TaskID" and the linked field on the subform is called "TaskID". When I first open the form and select, for example, "Task 100" the subform requeries correctly. When I make another selection from the dropdown and I select, for example, "Task 200 ..."
This is what confused me.
I understand to navigate to a new task in the main form, but I don't understand how to select another task from a dropdown. For me that sound as the OP modify the TaskID value. But, ussualy, the ID is an autonumber - primary key and Access don't allow that this value to be changed.

On the other hand it is possible to have a combo that allow the user to "jump" to a certain record.
But, if this is the case, the answer for you, JHB, should be... "This task don't exist at all" :) .
It is why I asked for the DB. Unless I misunderstand something that is obviously for the OP, but not for me.
 
But, if this is the case, the answer for you, JHB, should be... "This task don't exist at all" :) .
I depend on from where and how the combo is populated, (ex. a Right/Left Join). :)
 
Yes Mihail and JHB there is data for Task 250. I was able to fix this by simply assigning focus to the subForm, using the "requery" method, and then setting the focus back to the main form. Worked like a charm.
 

Users who are viewing this thread

Back
Top Bottom