473,473 Members | 1,972 Online
Bytes | Software Development & Data Engineering Community
Create 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 2003
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
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...
0
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...
6
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...
2
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...
2
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...
20
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,...
1
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....
2
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...
1
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...
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,...
1
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
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,...
1
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
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
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
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.