james_halliwell
Registered User.
- Local time
- Today, 13:36
- Joined
- Feb 13, 2009
- Messages
- 211
Hi All,
After some help, i have a text box that i get a user to fill in some criteria for the sql to run
this works fine but what i need it the user to enter data like 'xxABC123','xxEFG123'
i get and error i think its beacuse of the ' in the text,
can anyone help
The data has to be entered like that as it fills the gaps in an sql that runs against an oracle database,
or is there a way to manipulate the data from ABC123,EFG123 to 'xxABC123','xxEFG123' (i need to add xx before the text)
- problem is there could be up to 4 or 5 different ones
ie some one could enter ABC123,EFG,123
Some one else could enter ZXY987,VBN123,ASD345,RTY678
After some help, i have a text box that i get a user to fill in some criteria for the sql to run
Code:
Private Sub Text192_AfterUpdate()
Dim LResponse As Integer
LResponse = MsgBox("WARNING: this will affect the Import, do you want to change it ? ", vbYesNo, "Continue")
If LResponse = vbYes Then
Dim MySel As String
MySel = Me.Text192
CurrentDb.Execute "INSERT INTO TblSQLCriteria([Process], [Field], [Criteria]) VALUES('WorkOrder', 'WOPlants', '" & MySel & "' )"
Else:
Me.Undo
Me.Repaint
Exit Sub
End If
End Sub
this works fine but what i need it the user to enter data like 'xxABC123','xxEFG123'
i get and error i think its beacuse of the ' in the text,
can anyone help
The data has to be entered like that as it fills the gaps in an sql that runs against an oracle database,
or is there a way to manipulate the data from ABC123,EFG123 to 'xxABC123','xxEFG123' (i need to add xx before the text)
- problem is there could be up to 4 or 5 different ones
ie some one could enter ABC123,EFG,123
Some one else could enter ZXY987,VBN123,ASD345,RTY678
Last edited: