Results 1 to 4 of 4
  1. #1
    Perineum is offline Novice
    Windows XP Access 2003
    Join Date
    Aug 2012
    Posts
    28

    Refresh subform from separate form

    Any help would be greatly appreciated. I have a form called frm_Incident_Single. On this form I have a subform/subreport called tbl_Incident_Apps_subform. I have a command button on frm_Incident_Single that opens another form called frm_Incident_Apps where I choose multiple selections. When I save or close the form I would like to update the subform - tbl_Incident_Apps_subform.

    I've tried to requery/refresh the subform in the save procedures in frm_Incident_Apps but when I save it, I get a syntax error. Here is the line of code:

    Forms!frm_Incident_Single!tbl_Incident_Apps_subfor m.Form!Requery



    I've tried many variations and can't get it to work. Could someone please advise me on how I can refresh the subform?

    thanks
    Sean

  2. #2
    msoffice.vidyarthi is offline Novice
    Windows 7 64bit Access 2000
    Join Date
    Nov 2012
    Posts
    24
    what does the syntax error say, attaching the sample db would help to analyze

    try tbl_Incident_Apps_subform.form.requery OR tbl_Incident_Apps_subform.requery in unload sub of frm_Incident_Apps

  3. #3
    Perineum is offline Novice
    Windows XP Access 2003
    Join Date
    Aug 2012
    Posts
    28
    Thanks for your reply. The error I get for my code is "Compile Error: Syntax error". Unfortunately, my work will not allow me to upload the db.

    I tried your code in the unload event of frm_Incident_Apps and for both variations, I get the error:

    "Run-time error '424': Object required"

  4. #4
    Perineum is offline Novice
    Windows XP Access 2003
    Join Date
    Aug 2012
    Posts
    28
    I didn't know that a frickin' command button would do this. Stumbled on it accidentally. Easy as pie. Case closed.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Need Subform to Refresh
    By lenm in forum Forms
    Replies: 7
    Last Post: 10-11-2012, 01:32 PM
  2. Subform Refresh in a Tabbed Main Form
    By theosgood in forum Forms
    Replies: 5
    Last Post: 06-22-2012, 10:12 AM
  3. Replies: 1
    Last Post: 05-09-2012, 02:22 PM
  4. Replies: 15
    Last Post: 11-09-2010, 04:27 PM
  5. refresh subform
    By asmith in forum Forms
    Replies: 5
    Last Post: 09-27-2010, 10:58 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums