473,836 Members | 1,935 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Access 2003 VBA SQL Insert Limitation

2 New Member
I have a Query that I need to insert 58 columns of data. I built the query in VBA, but it will not work. Says it is missing a comma (,) so when i display what the Final Query looks like it is missing paramaters at the end. Is there a limitation on the size that a Query can be? Can there only be so many characters, including the column names, in a query?

How can I get around this?
Do I have to insert the data for half the form, and then get the last row inserted (which I do not know how to do) and then update the newly inserted row with the rest of the data from the form?

Thanks
CJ
Mar 13 '08 #1
2 2022
Stewart Ross
2,545 Recognized Expert Moderator Specialist
I have a Query that I need to insert 58 columns of data. I built the query in VBA, but it will not work. Says it is missing a comma (,) so when i display what the Final Query looks like it is missing paramaters at the end. Is there a limitation on the size that a Query can be? Can there only be so many characters, including the column names, in a query?

How can I get around this?
Do I have to insert the data for half the form, and then get the last row inserted (which I do not know how to do) and then update the newly inserted row with the rest of the data from the form?

Thanks
CJ
Hi. As a piece of general advice, if you have written some code and you get an error it is not Access that is the most likely cause - it is the code you've just written. I am absolutely certain there is an error in your code, and if you would like to post it in a reply the contributors to this forum will be able to advise you further on what should be changed to resolve your error.

-Stewart
Mar 13 '08 #2
CJVBAAccess
2 New Member
Hi. As a piece of general advice, if you have written some code and you get an error it is not Access that is the most likely cause - it is the code you've just written. I am absolutely certain there is an error in your code, and if you would like to post it in a reply the contributors to this forum will be able to advise you further on what should be changed to resolve your error.

-Stewart
To clarify, I did not write the code, I am fixing someone elses mess.

It is an access problem, there was no error in the code, Access (VBA) will only allow you to have so many characters in an insert Statement.

It is working now. I did an insert statement that inserted the primary information. Then I check to see what ID number of the row I just inserted is, pull it back and do an update statement to get the rest of the information into the database table for that record.

Thanks for your reply, it is working great now.
Mar 28 '08 #3

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

Similar topics

11
3775
by: Wolfgang Kaml | last post by:
Hello All, I have been working on this for almost a week now and I haven't anything up my sleeves anymore that I could test in addition or change.... Since I am not sure, if this is a Windows 2003 Server or ADO or ODBC issue, I am posting this on all of the three newsgroups. That's the setup: Windows 2003 Server with IIS and ASP.NET actiavted Access 2002 mdb file (and yes, proper rights are set on TMP paths and path,
0
4495
by: ImraneA | last post by:
Hi there I had pleasure of upsizing Access v97 db to Access v2K/SQL 2K. Wish to provide some knowledge gained back to community - hopefully help others. 1.Question how do you test stored procedure from SQL Server vs MS Access point of view ?
6
4768
by: Peter Frost | last post by:
Please help I don't know if this is possible but what I would really like to do is to use On Error Goto to capture the code that is being executed when an error occurs. Any help would be much appreciated. Thanks in advance
2
2339
by: Jeff | last post by:
Does anyone know of any potential problems running a 2000 database with 2003? Also, what about installing all other Office products as 2003 versions but leaving Access as 2002 running a 2000 database? Why you ask! A client has a 2000 database. Currently using 2000 runtime for most employees to work with database. A couple use 2003 to use database, no problems. They have a mix of versions of other products such as Word, Excel - 97,...
2
3163
by: terpatwork | last post by:
Hi, (1) I have an access form that allows users to enter data, and when they click a button, the OnClick code that I've written uses a SQL INSERT statement to insert the data into the database. I come from a web programming background, so please forgive me if there is some better approach to use in Access to accomplish this. My problem is that when users type in more than 512 characters (in a Memo field) and click the button, only the...
20
37913
by: TC | last post by:
I need an automated procedure to copy data from an Access table to a SQL Server table. Speed is important. What is the recommended technique? I can export the data from Access, copy it via FTP, then import it into SQL Server. I've tried that, and the speed is acceptable. It is an ugly solution, however, and I expect to find a better one -- preferably a solution better integrated with the Access RDBMS. I've tried using an ODBC...
1
1606
by: welime | last post by:
Hi there, am having a problem when trying to display my reports. The error am getting when displaying is out of range. I wanted to know if access has limitation when it comes to displaying records. Am using access 2003.
2
2986
by: fdcm | last post by:
Hi, I am new to Access 2003 on XP. I am creating a database from a current report that has exceeded Excel 2003's row limitation. My concern is running into an Access limitation after creating the database. I have read the post entitled "How to overcome the size limitation of MSAccess" and it was very helpful. However, is there a definitive answer as to how many records a 2GB database can hold? or is it dependent upon the record size (2 fields...
1
1492
by: thor67 | last post by:
Access 2003 XP Pro I have created a database for a call center type envviroment used by multiple users at the same time. It is a split database. After an issue is created, there is a separte table called an update table, where a user can add information to current open / ongoing issues. This is information is all added via a form. The field the useres enter the issue updates is set to "Memo", so as to not have the 255 character...
0
9812
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9658
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10824
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10533
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
7775
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6975
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5813
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4443
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 we have to send another system
2
4003
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.