mud2
01-05-2007, 05:24 PM
I'm 81 years old, and
I only have a few hairs left!
I want to transfer variables into an SQL...Here is a simple example;
Private Sub Start()
Dim This_Comment As String
This_Comment = Inputbox("Enter a comment")
Call Insert_This(This_Comment)
End sub
Private Sub Insert_This(This_Comment)
Dim Insert_Sql As String
Insert_Sql = "Insert INTO Table1(Comments) " _
& "Values(This_Comment);"
End Sub
OK, the thing runs, asks for and gets a comment, then a box pops up asking for This_Comment.
No matter how many combinations of
This_Comment = Chr(34) & This_Comment & Chr(34), with or without
Chr(39)s I use, still the same request for This_Comment. I've even used the MID() function to strip the quotes from This Comment, but ubfortunately MID requires a string!
I only have a few hairs left!
I want to transfer variables into an SQL...Here is a simple example;
Private Sub Start()
Dim This_Comment As String
This_Comment = Inputbox("Enter a comment")
Call Insert_This(This_Comment)
End sub
Private Sub Insert_This(This_Comment)
Dim Insert_Sql As String
Insert_Sql = "Insert INTO Table1(Comments) " _
& "Values(This_Comment);"
End Sub
OK, the thing runs, asks for and gets a comment, then a box pops up asking for This_Comment.
No matter how many combinations of
This_Comment = Chr(34) & This_Comment & Chr(34), with or without
Chr(39)s I use, still the same request for This_Comment. I've even used the MID() function to strip the quotes from This Comment, but ubfortunately MID requires a string!