473,406 Members | 2,369 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

INSERT INTO Error

I have a form that a person enters some information on. They then clicka
button that triggers VBA to perfom a SQL INSERT INTO query.

One of the fields auto assignes the current date. Another field pulls
the users name from an api function. On the form both fields display
correctly.

The INSERT INTO statment goes as sfollows:

INSERT INTO tblServiceOrders ( All the fields are here) VALUES (#" &
Me.Text57 & "#, etc...

When I Open the form and enter the information then click the button I
receive the following error:

Compile Error
Method or date member not found

I have checked the spelling 4 times and even removed the control on the
form and created a new one.

The table that the data is to be inserted into has an is field that is
autonumber and assigned key field.

I have read information that says both I need to append a value and I do
not need to append a value to this field.

Can anyone tell me what I am missing? I have done many other SQL Insert
Into queries and have not had this problem before.

Thanks in advance!

Michael Charney

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 12 '05 #1
2 4748
If you want help with a coding problem you have to post the actual code,
not your understanding of your code.

You do not have to post a value to an autonumber field.

Also check your references and make sure they are all ok.

Regards

Peter Russell



Nothing previously wrote:
I have a form that a person enters some information on. They then clicka
button that triggers VBA to perfom a SQL INSERT INTO query.

One of the fields auto assignes the current date. Another field pulls
the users name from an api function. On the form both fields display
correctly.

The INSERT INTO statment goes as sfollows:

INSERT INTO tblServiceOrders ( All the fields are here) VALUES (#" &
Me.Text57 & "#, etc...

When I Open the form and enter the information then click the button I
receive the following error:

Compile Error
Method or date member not found

I have checked the spelling 4 times and even removed the control on the
form and created a new one.

The table that the data is to be inserted into has an is field that is
autonumber and assigned key field.

I have read information that says both I need to append a value and I do
not need to append a value to this field.

Can anyone tell me what I am missing? I have done many other SQL Insert
Into queries and have not had this problem before.

Thanks in advance!

Michael Charney

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!


Nov 12 '05 #2
Michael,

how about posting the SQL statement? I'm wondering if you're using a
reserved word as a variable or something... are your values properly
delimited?
# for dates
' for text

what if you did something like

strValue = Replace(strValue,"'","''") so that you don't get caught by
something stupid like

"This isn't working" throwing off your text delimiting...

Sorry, I'm kinda going after the usual suspects, but no option, since
no SQL statement to check...
Nov 12 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

15
by: Jack | last post by:
I have a text file of data in a file (add2db.txt) where the entries are already entered on separate lines in the following form: INSERT INTO `reviews` VALUES("", "Tony's", "Lunch", "Great...
7
by: iqbal | last post by:
Hi all, We have an application through which we are bulk inserting rows into a view. The definition of the view is such that it selects columns from a table on a remote server. I have added the...
16
by: Philip Boonzaaier | last post by:
I want to be able to generate SQL statements that will go through a list of data, effectively row by row, enquire on the database if this exists in the selected table- If it exists, then the colums...
6
by: harborboy76 | last post by:
Hi, I am trying to insert a large number of rows into a table inside a SPL. But every time, I run the SPL, the table is locked because of the INSERT. When I tried to issue a COMMIT, right after...
8
by: 73blazer | last post by:
Hello, I'm looking for a way to make some of my insert templates more readable by placing comments in between the values. I cannot seem to find a way to do this with DB2, is there a way? I'm...
3
by: MP | last post by:
Hi Posted this several hours ago to another ng but it never showed up thought i'd try here. using vb6, ado, .mdb, jet4.0, no access given table tblJob with field JobNumber text(10) 'The...
3
by: mahajanvit | last post by:
Hi one and all I got this problem during my project. So in order to solve this I made a very small application. I am trying to insert using SP and sqldatasource control. I know that while using...
9
by: anachronic_individual | last post by:
Hi all, Is there a standard library function to insert an array of characters at a particular point in a text stream without overwriting the existing content, such that the following data in...
2
by: technocraze | last post by:
Hi guys, I have encountered this error when updating the values to the MS Acess table. Error : Update on linked table failed. ODBC sql server error Timeout expired. MS Acess is my front end and...
6
by: rn5a | last post by:
During registration, users are supposed to enter the following details: First Name, Last Name, EMail, UserName, Password, Confirm Password, Address, City, State, Country, Zip & Phone Number. I am...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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,...

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.