• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1477
  • Last Modified:

need to refresh subforms on unbound form

Good evening
I have a refresh problem.
I have an unbound form that has 5 tab controls. Each tab page has a subform that is generated from a query and has detail information pertaining to the main prospect information. such as call detail, to-do's and so on. Each subform record has a button control that takes the user back to the correct record on the main form and that is where the information is entered for the detail. After the user enters the data and closes the main form, the to-do (unbound form) is still open, currently none of the 5 subforms requery the data unless the entire form is closed and reopened. Is there a way to requery if the tabs across the top are clicked on, or a better way for the subforms to requery without too much work for the user? I tried a requery button on the unbound form but that didn't affect any of the subforms if i use a requery button on the subforms it is on every record in the subform, and looks terrible, not to mention it doesn't work anyway!
Hope this is understandable if more info is needed, please let me know
any help would be a help
thanks
notenoughtime
0
NotEnoughTime
Asked:
NotEnoughTime
  • 2
1 Solution
 
frankyteeCommented:
try
Me.frmSub.Form.Requery
where "frmSub" is the name you called your subform control in your main form.
0
 
NotEnoughTimeAuthor Commented:
please forgive my inexperience with coding / Macros,
would I use the above in an event procedure for on got focus, after update, or another in the properties form or with a button on the unbound form that all the subforms are on and name all five of the subforms?

Thank you
0
 
frankyteeCommented:
run that code from your main form where your subforms are in, in the afterupdate event of whatever control that links the 2 together (plus whenever you need it refreshed when you do something on your main form)
note that "me" is the vb reserved word for the current form, use it  verbatim (as is)
0
 
Computer101Commented:
Forced accept.

Computer101
EE Admin
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now