Results 1 to 2 of 2
  1. #1
    Join Date
    Jul 2005

    Unanswered: Refresh subform problem


    I have a form with an DepartmentForm with a subform with employees who work in that department. I also have an EmployeeForm with a subform for departments (an employee can work for more than one department).

    the problem:

    when I have the EmployeeForm open and delete a department that that particular employee works for, when I go back to the DepartmentForm, the subform listing for the employee which I've just removed has #deleted# in the textboxes of the subform. I have to go, for instance, look at another record or similar, for the subform to reflect the update.

    I've tried DoCmd.Refresh and DoCmd.Requery in the OnFocus and OnActivate and OnLoad events but nothing works.

    Both main forms remain open during the process. Can someone help with updating the subform?

    Hope I've explained that clearly enough.


  2. #2
    Join Date
    Nov 2004
    out on a limb
    Provided Answers: 59
    You need to refresh the data in the child (or parent form - depends where your problem is,)

    what ever form event you are usign to do the delete palce some code to refresh the appropriate form.

    if its in the child form
    not certain but
    might do it

    or if its in the parnet form

    docmd.requery will just refresh the current forms data.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts