473,508 Members | 2,206 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

"Microsoft Office Access can't append all the records in the append query"

1 New Member
Hi,
I get the following error when I try to save data using append query for the save button in the form.
"Microsoft Office Access can't append all the records in the append query"

Here is some detail:
Expand|Select|Wrap|Line Numbers
  1. Private Sub btnSaveToDatabase_Click()
  2.     Dim strSubcontractNumber As String
  3.     Dim strSCNJTag As String
  4.     Dim strSCNJ As String
  5.  
  6.     strSubcontractNumber = txtSubcontractNumber.value
  7.  
  8.     If (txtSCNJTag.value >= 100 And txtSCNJTag.value < 999) Then
  9.         strSCNJTag = txtSCNJTag.value
  10.     End If
  11.     strSCNJ = strSubcontractNumber & "-SCNJ" & "-" & strSCNJTag
  12.     MsgBox "You are about to add  " & strSCNJ & " to the database.  Press OK to proceed.", vbOKCancel, "Adding to database..."
  13.  
  14.     DoCmd.SetWarnings False
  15.     DoCmd.OpenQuery "app_AppendCurrentSCNJ"
  16.     DoCmd.OpenQuery "app_AppendCurrentCostAnalysis"
  17.     DoCmd.OpenQuery "app_AppendCurrentDocuments"
  18.     DoCmd.SetWarnings True
  19. End Sub
Now in all the three append queries there is a field named "SCNJCounter" which has autonumber datatype in table and is primary key field with no duplicate value.
When I click save button on the form it says ok . But the record I saved is not there in the following table and when I checked datasheet view in query is shows new record with same SCNJCounter value. when I try to run the query it returns the error above.I know records are not saved in table because SCNJCounter is not incrementing but don't get why.
Your help will be greatly appreciated.
Thank you in advance...
Mar 1 '12 #1
1 1949
NeoPa
32,557 Recognized Expert Moderator MVP
Your error message is not complete. You included only the least helpful part and omitted the important details explaining how many and why records failed.

Your code has not been taken from your project (unless you have used a variable called Value and spelled it with a lower-case 'v' to confuse Access). It's necessary that you follow these instructions carefully when posting code - Before Posting (VBA or SQL) Code.

You give us no real information that pertains to your problem that makes sense without your database to hand. No indication of what your queries do, and not even any indication of which line the error message you've half-shared is triggered by (I'm assuming it's only a single query you're referring to. I can't imagine anyone thinking that describing a problem which is repeated over three queries as if it were only one, makes any sense).

If you can fill in the missing information intelligently then we may be able to help.
Mar 1 '12 #2

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

Similar topics

2
2705
by: Ellen Manning | last post by:
Using A2K. In my table I have the field "Grant" which can have a value or be null. I have a query that counts the number of records and has a Where clause on the Grant field. The query won't...
0
1330
by: jimmojelsky | last post by:
Access97 database - it is set up to share between several computers - some users have full access, others only have read access - locking is set at "no lock" - everything works unless one of the...
7
4235
by: | last post by:
I found similiar issues in MS-KB but nothing that helped me; got the Windows and Office updates from the MS website but that hasn't changed the behavior of this problem, and I don't see anything...
8
11202
by: RC | last post by:
In my Access 2002 form, I have a combo box and on the AfterUpdate event I use DoCmd.RunSQL ("UPDATE .... to update records in a table. When it starts to run I get a message "You are about to...
9
18509
by: Mike Bridge | last post by:
I am using MS Access 2003, and I typed in a query in SQL view which was working fine. Now when I open it, it gives me the error "Join expression not supported". Apparently, Access "fixed" it for...
3
1900
by: MLH | last post by:
I have a query, qryAppend30DayOld260ies that attempts to append records to tblCorrespondence. When run, it can result in any of the following: appending no records, appending 1 record or appending...
4
15731
by: Mike D | last post by:
OS: Windows XP Professional Microsoft Access 2003 I am trying to update a table in my DB from a tempory table. I need to ensure that if records in the main table match records in the temp...
1
2112
by: mlumsden | last post by:
OK So here's my essential Dilemma. I have set up my Table to import from 3 excel files and 1 other table. The Excel files may or may not be updated at the time of each refresh of my Table...
3
31815
by: nickvans | last post by:
Hello all, I have (hopefully) an easy question for you all. I'm running Access '03 and have created a pile of VBA code to create a form and some queries related to each control in the form....
4
10355
by: dougmeece | last post by:
Hello everyone, I have created a search button but I receive the message "Microsoft Access can't fine the field "|" referred to in your expression" when I try to use it. I have looked online for...
0
7225
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
7326
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,...
1
7046
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7498
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
5627
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,...
1
5053
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4707
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
1557
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
766
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.