Solved: Access VBA Adding New record to Main List

Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

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
 

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?
 

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. :)
 

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.
 

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 :)
 
Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

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 807,865 other people just like you!

Latest posts

Members online

Top