Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms Programming / June 2007

Tip: Looking for answers? Try searching our database.

Records are added to table, but not form in VBA

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
gwengrofsky@msn.com - 23 Jun 2007 05:10 GMT
Hello,
    I have a form class module that uses the doCmd.RunSQL statement.
The first two work, but immediatly following in a call to another
subroutine I have a disconnected recordset that is updated with new
records and finally a rsSummary.UpdateBatch statement.  The new
records are put in the table, but when I return from the subroutine,
the Me.recordsouce = "qrySummary" statement which gets run, doesn't
show the new records.  Only when I exit 'that' form and come back are
they there.  I checked, and they are also in the table everytime.  How
can I show the updated records in the table without exiting the form.
I tried Me.refresh, Me.repaint, but maybe I'm using it wrong somehow.
I think I close the recordset and connection too correctly by
'myconnection.close' and 'Set rsSummary = nothing'.  Also, I stepped
over the add record subroutine, and when It's not called the
doCmd.RunSQL statement that followed worked properly but of course
there were no new records to add; only the records I put in there to
test it.  The RunSQL statement is a append query that append the new
updatedbatch table to another table that will be queried to
(hopefully) show the records.
Thanks for reading and helping.
Gary
gwengrofsky@msn.com - 23 Jun 2007 07:32 GMT
On Jun 23, 12:10 am, gwengrof...@msn.com wrote:
> Hello,
>      I have a form class module that uses the doCmd.RunSQL statement.
[quoted text clipped - 17 lines]
> Thanks for reading and helping.
> Gary

********** NO REPLY NECESASRY, i FIGURED IT OUT *****
I searched around and winded up using set rsSummary =
Me.recordSetClone
That eventually worked, when I coded some other stuff.
Thanks, anyway
Gary
missinglinq - 23 Jun 2007 14:49 GMT
Instead of  Me.refresh or Me.repaint you should have used Me.Requery.

Signature

There's ALWAYS more than one way to skin a cat!

Answers/posts based on Access 2000

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.