473,405 Members | 2,279 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,405 software developers and data experts.

need help, not sure with what....

i pulled an example off the web and modified it somewhat and whats killimg
me is that sometimes it works and sometimes it doesnt.
the following is the only line that allows this thing to work over and over,
ive tried untold number of combinations , some have been left in as comments
all will work right at the start but fail for no apparent reason later
'strsql = "insert into [license-table](orderinfofkey, lstring, link) values
(1,'test', 'test2')"

text122 and text124 are unbound text boxes for me to enter stuff with,
the form is an order tracking form
this button is supposed to allow me to enter multiple licesne string and a
secondary string and associate it with the current orderinfokey in a
separate table.

it works fine when i first open the database but after using this feature
about 6-7 times, it just dies on me and highlights
condatabase.execute strsql in yellow

the error message says
run-time error '-2147217904 (80040e10)':
No value given for one or more requested parameters.

the MsgBox strsql is supposed to show what access sees and its always had
values listed in there so I am not sure why this is dying on me. The only
way to fix it is to completely shut down the application and start it up
again.
Private Sub Command127_Click()
Dim strsql As String
Dim string1 As String
Dim string2 As String
Dim keynum As Integer

Dim condatabase As Connection

keynum = Me.OrderInfokey.Value
string1 = Me.Text122.Value
string2 = Me.Text124.Value
Set condatabase = CurrentProject.Connection
'strsql = "insert into [license-table](orderinfofkey, lstring, link) values
(1,'test', 'test2')"
'strsql = "insert into [license-table] (orderinfofkey, lstring, link) values
(" & OrderInfokey & ", " & string1 & ", " & string1 & ")"
'strsql = "insert into [license-table] (orderinfofkey, lstring, link) values
(" & OrderInfokey & ", " & Text122 & ", 'test2'
strsql = "insert into [license-table] (orderinfofkey, lstring, link) values
(" & OrderInfokey & ", " & Text122 & ", " & Text124 & ")"

MsgBox strsql
condatabase.Execute strsql

condatabase.Close

End Sub


Nov 13 '05 #1
3 4317
"Steve" <1@2.com> wrote in message
news:Lu******************@newsread1.news.atl.earth link.net...
i pulled an example off the web and modified it somewhat and whats killimg
me is that sometimes it works and sometimes it doesnt.
the following is the only line that allows this thing to work over and over, ive tried untold number of combinations , some have been left in as comments all will work right at the start but fail for no apparent reason later
'strsql = "insert into [license-table](orderinfofkey, lstring, link) values (1,'test', 'test2')"

text122 and text124 are unbound text boxes for me to enter stuff with,
the form is an order tracking form
this button is supposed to allow me to enter multiple licesne string and a secondary string and associate it with the current orderinfokey in a
separate table.

it works fine when i first open the database but after using this feature
about 6-7 times, it just dies on me and highlights
condatabase.execute strsql in yellow

the error message says
run-time error '-2147217904 (80040e10)':
No value given for one or more requested parameters.

the MsgBox strsql is supposed to show what access sees and its always had
values listed in there so I am not sure why this is dying on me. The only
way to fix it is to completely shut down the application and start it up
again.
Private Sub Command127_Click()
Dim strsql As String
Dim string1 As String
Dim string2 As String
Dim keynum As Integer

Dim condatabase As Connection

keynum = Me.OrderInfokey.Value
string1 = Me.Text122.Value
string2 = Me.Text124.Value
Set condatabase = CurrentProject.Connection
'strsql = "insert into [license-table](orderinfofkey, lstring, link) values (1,'test', 'test2')"
'strsql = "insert into [license-table] (orderinfofkey, lstring, link) values (" & OrderInfokey & ", " & string1 & ", " & string1 & ")"
'strsql = "insert into [license-table] (orderinfofkey, lstring, link) values (" & OrderInfokey & ", " & Text122 & ", 'test2'
strsql = "insert into [license-table] (orderinfofkey, lstring, link) values (" & OrderInfokey & ", " & Text122 & ", " & Text124 & ")"

MsgBox strsql
condatabase.Execute strsql

condatabase.Close

End Sub


The text data needs quotes around it. Like this:

strsql = "insert into [license-table] (orderinfofkey, lstring, link) values
(" & OrderInfokey & ", """ & Text122 & """, """ & Text124 & """)"

or like this:

strsql = "insert into [license-table] (orderinfofkey, lstring, link) values
(" & OrderInfokey & ", '" & Text122 & "', '" & Text124 & "')"

Either should work.

HTH,
Randy Harris
Nov 13 '05 #2
Right off-hand, it appears that you need to concatenate in some quotes
around the two string parameters.
strsql = "insert into [license-table] (orderinfofkey, lstring, link)
values
(" & OrderInfokey & ", " & Text122 & ", " & Text124 & ")"
In your example that you say works every time, you are showing Test and
Test2 with quotes around them as if they are strings. If string values are
expected in these two locations, OrderInfokey contains 1, Text122 contains
Test, and Text124 contains Test2, then the above would look like this after
it was concatenated.

insert into [license-table] (orderinfofkey, lstring, link) values (1, Test,
Test2)

but you need it to look like

insert into [license-table] (orderinfofkey, lstring, link) values (1,
'Test', 'Test2')

Try amending the line to:

strsql = "insert into [license-table] (orderinfofkey, lstring, link) values
(" & OrderInfokey & ", '" & Text122 & "', '" & Text124 & "')"

Note the single quotes placed next to the double quotes around the string
values. If the string values themselves may have apostrophes in them, such
as O'Hare, then a slight modification will need to be made.

--
Wayne Morgan
MS Access MVP
"Steve" <1@2.com> wrote in message
news:Lu******************@newsread1.news.atl.earth link.net...i pulled an example off the web and modified it somewhat and whats killimg
me is that sometimes it works and sometimes it doesnt.
the following is the only line that allows this thing to work over and
over,
ive tried untold number of combinations , some have been left in as
comments
all will work right at the start but fail for no apparent reason later
'strsql = "insert into [license-table](orderinfofkey, lstring, link)
values
(1,'test', 'test2')"

text122 and text124 are unbound text boxes for me to enter stuff with,
the form is an order tracking form
this button is supposed to allow me to enter multiple licesne string and
a
secondary string and associate it with the current orderinfokey in a
separate table.

it works fine when i first open the database but after using this feature
about 6-7 times, it just dies on me and highlights
condatabase.execute strsql in yellow

the error message says
run-time error '-2147217904 (80040e10)':
No value given for one or more requested parameters.

the MsgBox strsql is supposed to show what access sees and its always had
values listed in there so I am not sure why this is dying on me. The only
way to fix it is to completely shut down the application and start it up
again.
Private Sub Command127_Click()
Dim strsql As String
Dim string1 As String
Dim string2 As String
Dim keynum As Integer

Dim condatabase As Connection

keynum = Me.OrderInfokey.Value
string1 = Me.Text122.Value
string2 = Me.Text124.Value
Set condatabase = CurrentProject.Connection
'strsql = "insert into [license-table](orderinfofkey, lstring, link)
values
(1,'test', 'test2')"
'strsql = "insert into [license-table] (orderinfofkey, lstring, link)
values
(" & OrderInfokey & ", " & string1 & ", " & string1 & ")"
'strsql = "insert into [license-table] (orderinfofkey, lstring, link)
values
(" & OrderInfokey & ", " & Text122 & ", 'test2'
strsql = "insert into [license-table] (orderinfofkey, lstring, link)
values
(" & OrderInfokey & ", " & Text122 & ", " & Text124 & ")"

MsgBox strsql
condatabase.Execute strsql

condatabase.Close

End Sub

Nov 13 '05 #3
awesome, you guys rock, thanks alot
"Steve" <1@2.com> wrote in message
news:Lu******************@newsread1.news.atl.earth link.net...
i pulled an example off the web and modified it somewhat and whats killimg
me is that sometimes it works and sometimes it doesnt.
the following is the only line that allows this thing to work over and over, ive tried untold number of combinations , some have been left in as comments all will work right at the start but fail for no apparent reason later
'strsql = "insert into [license-table](orderinfofkey, lstring, link) values (1,'test', 'test2')"

text122 and text124 are unbound text boxes for me to enter stuff with,
the form is an order tracking form
this button is supposed to allow me to enter multiple licesne string and a secondary string and associate it with the current orderinfokey in a
separate table.

it works fine when i first open the database but after using this feature
about 6-7 times, it just dies on me and highlights
condatabase.execute strsql in yellow

the error message says
run-time error '-2147217904 (80040e10)':
No value given for one or more requested parameters.

the MsgBox strsql is supposed to show what access sees and its always had
values listed in there so I am not sure why this is dying on me. The only
way to fix it is to completely shut down the application and start it up
again.
Private Sub Command127_Click()
Dim strsql As String
Dim string1 As String
Dim string2 As String
Dim keynum As Integer

Dim condatabase As Connection

keynum = Me.OrderInfokey.Value
string1 = Me.Text122.Value
string2 = Me.Text124.Value
Set condatabase = CurrentProject.Connection
'strsql = "insert into [license-table](orderinfofkey, lstring, link) values (1,'test', 'test2')"
'strsql = "insert into [license-table] (orderinfofkey, lstring, link) values (" & OrderInfokey & ", " & string1 & ", " & string1 & ")"
'strsql = "insert into [license-table] (orderinfofkey, lstring, link) values (" & OrderInfokey & ", " & Text122 & ", 'test2'
strsql = "insert into [license-table] (orderinfofkey, lstring, link) values (" & OrderInfokey & ", " & Text122 & ", " & Text124 & ")"

MsgBox strsql
condatabase.Execute strsql

condatabase.Close

End Sub

Nov 13 '05 #4

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

Similar topics

4
by: Active8 | last post by:
I did this once and can't remember how <blush> so I read the reportlab user guid. It says to unzip the reportlab archive - this is on w2k, BTW, with Python23 - to a directory and make a file...
3
by: new_GUY | last post by:
I have a HUGE project (at least for me) and need some guidance. I am trying to create a database for a local university movie club that allows users to input there basic personal information...
9
by: netpurpose | last post by:
I need to extract data from this table to find the lowest prices of each product as of today. The product will be listed/grouped by the name only, discarding the product code - I use...
11
by: my-wings | last post by:
I think I've painted myself into a corner, and I'm hoping someone can help me out. I have a table of books (tblBooks), which includes a field (strPubName) for Publisher Name and another field...
8
by: Chris | last post by:
Hi, All my websites and webservices are down. I get the following message Server Error in '/mywebservices' Application....
2
by: Keith Kowalski | last post by:
I anm opening up a text file reading the lines of the file that refer to a tif image in that file, If the tif image does not exist I need it to send an email stating that the file doesn't exist...
4
by: robinsand | last post by:
My apologies to those of you who are more advanced Visual C++ .NET programmers, but I am working on a project for an MBA course that is condensed into an eight-week schedule, and I need help...
5
by: Joe Reynolds | last post by:
i have an application that will take user input from a text box and write it to an access database. i need to make sure that if they ever enter a single line of text that it has at least 1 space...
7
by: themastertaylor | last post by:
Hi, I work for a construction company and part of my job is sourcing materials. currently we have a spreadsheet based system whereby each site has a worksheet in the workbook with the standard...
15
by: rhino | last post by:
I've put together a prototype of two-tiered CSS tabs that works really well in IE6, IE7, and FF2. It also works very well in Opera 9.27 _except_ that the placement of the lower tier of tabs is...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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...

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.