Results 1 to 9 of 9
  1. #1
    Join Date
    Apr 2004
    Posts
    130

    Unanswered: Refresh Form B while in Form A

    Is there a way to refresh a form while sitting in another form. Using VBA. Have tried:

    With Forms!frmB
    DoCmd.DoMenuItem acFormBar, acRecordsMenu, 5, , acMenuVer70
    End with

    Doesn't seem to work.
    Any ideas? Thanks,

    Winston

  2. #2
    Join Date
    Jul 2004
    Location
    Blackburn, UK
    Posts
    169
    Use the timer in the Form that you are in to have the vba code

    forms!Formb.Refresh

  3. #3
    Join Date
    Apr 2004
    Posts
    130
    Thanks... didn't need the timer. The different syntax you gave me worked. I've never tried Forms!frmB.Refresh.
    Worked perfectly
    Winston

  4. #4
    Join Date
    Jul 2004
    Location
    Blackburn, UK
    Posts
    169
    Quote Originally Posted by Winston
    Thanks... didn't need the timer.
    Sorry, didnt know which way you wanted to use the form, thought you just wanted to keep updating it all the time.

    Your welcome.

  5. #5
    Join Date
    Aug 2004
    Posts
    34
    Hi trying to do a similar task...I want the data in a sub form to refresh basde on the main form. I am a newbie. Can I use the same code and where do you suggest I put it.. Thanks in advance

  6. #6
    Join Date
    Jul 2004
    Location
    Blackburn, UK
    Posts
    169
    Quote Originally Posted by Falcon049
    Hi trying to do a similar task...I want the data in a sub form to refresh basde on the main form. I am a newbie. Can I use the same code and where do you suggest I put it.. Thanks in advance
    Its probably best if you create a new topic and then if winston or i cannot help then other people will take a look.

    Post a new topic with your complete question and someone can help you out.
    Based on DAO 3.6 and Access 2000 + 2003
    VB.Net 2005 + ADO.Net

  7. #7
    Join Date
    Apr 2004
    Posts
    130
    When you put the subform into the main form, it will ask you how to link them. That linking process should result in an auto update to the subform when the main form is updated.

    The notes in this thread

    Forms!frmB.refresh

    refers to a completely separate form

    Hope this helps
    Winston

  8. #8
    Join Date
    Dec 2002
    Location
    Préverenges, Switzerland
    Posts
    3,740
    code anywhere:
    Forms!motherForm!daughterform.refresh 'or .requery ...is slowest

    code in the mother
    Me!daughterform.refresh 'or .requery

    code in the daughter
    me.refresh 'or .requery ...is fastest


    izy
    Last edited by izyrider; 01-12-05 at 14:05.
    currently using SS 2008R2

  9. #9
    Join Date
    Aug 2004
    Posts
    34
    Thanks to all..I was able to get it working with code

Posting Permissions

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