473,467 Members | 1,590 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Updating Omits Current Record

13 New Member
Hi All...when running the sub below, the table is updated, but the record entered on the form is omitted from the update. I'm curious as to why. I've tried moving the Save to the On_Click before calling the Finish1 sub, but no luck.

Private Sub Finish1()
DoCmd.Save

Dim UpdateDB As String
UpdateDB = "UPDATE TblMaster, TblMarket SET TblMaster.FldMarket = TblMarket!FldMarket"
UpdateDB = UpdateDB & " WHERE ((TblMarket!FldSysprin=Left(TblMaster!FldAcctNumb, 6)));"


Dim MakeTable As String
MakeTable = "SELECT TBLMaster.FldChannelNumb, TBLMaster.FldMarket, Count(TBLMaster.FldChannelNumb) AS CountOfFldChannelName, Count(TBLMaster.FldMarket) AS CountOfChannelProblem INTO TblChannelCount"
MakeTable = MakeTable & " FROM TBLMaster WHERE (((TBLMaster.FldChannelNumb) Is Not Null) AND (TBLMaster.FldDate)=Date())"
MakeTable = MakeTable & " GROUP BY TBLMaster.FldChannelNumb, TBLMaster.FldMarket;"

DoCmd.RunSQL (MakeTable)
DoCmd.RunSQL (UpdateDB)

End Sub

Thanks in advance,
Reuben
Jul 6 '07 #1
2 1008
missinglinq
3,532 Recognized Expert Specialist
Try replacing

DoCmd.Save

with

Me.Dirty = False
Jul 6 '07 #2
ReubenPatterson
13 New Member
Thanks, worked like a charm...not sure why but a little reading should fill in the gaps!
Jul 6 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: CSDunn | last post by:
Hello, I have an Access 2000 Project in which the data comes from a SQL Server 2000 database, and multiple users need to be able to see new records as each user adds records. The users also need...
1
by: Richard Coutts | last post by:
I have a Continuous Form where each record has a button that activates another form that simplifies entering values into the record. The activated form has the equivalent of a "Done" button. I'd...
5
by: junglist | last post by:
Hi guys, I've been trying to implement an editable datagrid and i have been succesful up to the point where i can update my datagrid row by row. However what used to happen was that once i updated...
2
by: barret bonden | last post by:
(closest newsgroup I could find) Error Type: ADODB.Recordset (0x800A0CB3) Current Recordset does not support updating. This may be a limitation of the provider, or of the selected locktype....
5
by: Hexman | last post by:
I've come up with an error which the solution eludes me. I get the error: >An unhandled exception of type 'System.Runtime.InteropServices.COMException' occurred in HRTest.exe > >Additional...
1
by: rdemyan via AccessMonster.com | last post by:
My App has 10 or so tables that we provide that contains proprietary data. This data will need to be updated once or twice a year. I would like some comments, suggestions on my proposed strategy...
33
by: bill | last post by:
In an application I am writing the user can define a series of steps to be followed. I save them in a sql database using the field "order" (a smallint) as the primary key. (there are in the range...
9
by: hrreece | last post by:
I have an Access 2002 database that has a form that can be used to review individual records. At the bottom of the form are buttons that are linked to functions that allow the user to "Find a record...
4
by: aaronyoung | last post by:
I have created custom navigation buttons and Record Number indicators on several forms that are used to review and update records based on a query. My On Current event to update the "Record X of...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.