1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

Solved: Access VBA Adding New record to Main List

Discussion in 'Business Applications' started by Bradybunch, Nov 29, 2011.

Thread Status:
Not open for further replies.
Advertisement
  1. Bradybunch

    Bradybunch Thread Starter

    Joined:
    Sep 10, 2009
    Messages:
    211
    Hello Guys,

    I have a form called "FrmClientSupportOverview" Which is the a list of all support calls. I have a button at the top of the list to add a new record i.e...new support call. The Form it opens is "FrmClientSupportNew" this form sits on top "FrmClientSupportOverview", and when i have filled in the new entry, i want it to close "FrmClientSupportNew" and update "FrmClientSupportOverview" with out manually refreshing, or closing and opening the the form "CleintSupportOverview"

    There must be a simple code to do this? and if so...where would i put it? Pretty please :eek:

    Thanks
     
  2. OBP

    OBP

    Joined:
    Mar 8, 2005
    Messages:
    19,895
    Presumably you have a close form button on the "FrmClientSupportNew" form.
    Try Adding the following code to the button before the close form action
    RunCommand acCmdSaveRecord
    forms![FrmClientSupportOverview].requery

    But why not just add a new record on the "FrmClientSupportOverview" form?
     
  3. Bradybunch

    Bradybunch Thread Starter

    Joined:
    Sep 10, 2009
    Messages:
    211
    Superb!! Thankyou very much OBP...that has worked a treat, i've been searching high and low through google for ages!!

    The form "FrmCleintSupportOverview" is locked, so its only able to sort instead of amend the data. Its done on purpose to stop accidentally changing the data. Plus, it does not display all the data you want to see on the overview, so i have a button next to it to show individual records, with all the data.

    Hope it makes sense?

    Im going to put that code into my module for safe keeping, so i can refer back to it in the future. :)
     
  4. OBP

    OBP

    Joined:
    Mar 8, 2005
    Messages:
    19,895
    Yes it makes sense.
    I put all my individual code in to a Word Doc with a simple heading, which you can then search for key words. I have posted a copy of it on here in the past.
     
  5. Bradybunch

    Bradybunch Thread Starter

    Joined:
    Sep 10, 2009
    Messages:
    211
    I have your VBA copy. You sent it to me a while back :), i have looked at since...but its alot to break down and understand for a begginner like me... i just completed a course in VBA for begginners (the only course i have done in Access), it was very difficult to follow. It helped me understand a few things, but its knowing where to start...practice makes perfect i guess. I could have done with the 2 day course being broken down into a ten day course haha!!

    Thanks again :)
     
  6. Sponsor

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Loading...
Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/1028944

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice