Ok, I have tried to get my subform to requery and for the life of me, I cannot get it to work with code, but it will work with the F9 key.
Main form - frmCaseTimeline
subform - sfTimeline
combo box - cboTimeline
Main table - tblCaseDetails
2nd table - tblCaseTimeline
I have frmCaseTimeline with a combo box and subform (and textboxes).
The subform pulls 2 fields from the main table and this is done by query.
The combo box draws its fill from a query for ID numbers from the main table (not the timeline table). When a user selects an ID from the comb box, then the textboxes and subform are populated; this works fine.
If there is not a record assosciated with the ID selected, then a message box will ask the user if he would like to create a record for that ID. When the user clicks ok, then the ID is placed on the main form and should pull the 2 fields from the main table.
The problem is that the values from the 2 fields pulled do not show up until I close the form and reopen or press F9.
I have tried placing requery code in the following:
combo box afterupdate event
main form afterupdate event
subform afterupdate event
subform current event
Like I mentioned, if I press F9 or click in the subform it will refresh, but not automatic.
I hope that I am making sense.
Main form - frmCaseTimeline
subform - sfTimeline
combo box - cboTimeline
Main table - tblCaseDetails
2nd table - tblCaseTimeline
I have frmCaseTimeline with a combo box and subform (and textboxes).
The subform pulls 2 fields from the main table and this is done by query.
The combo box draws its fill from a query for ID numbers from the main table (not the timeline table). When a user selects an ID from the comb box, then the textboxes and subform are populated; this works fine.
If there is not a record assosciated with the ID selected, then a message box will ask the user if he would like to create a record for that ID. When the user clicks ok, then the ID is placed on the main form and should pull the 2 fields from the main table.
The problem is that the values from the 2 fields pulled do not show up until I close the form and reopen or press F9.
I have tried placing requery code in the following:
combo box afterupdate event
main form afterupdate event
subform afterupdate event
subform current event
Like I mentioned, if I press F9 or click in the subform it will refresh, but not automatic.
I hope that I am making sense.