U
uGek
This is my module...
Private Sub cmbUID_Change()
Dim i As Integer
Dim strNewID As String
strUID = cmbUID.Value
If strUID = "New" Then
strSel = MsgBox("Would you really like to add a new user id?",
vbYesNo + vbQuestion, "User ID Verification")
If strSel = vbYes Then
'get new user settings
'select folders where emails are kept
i = 1
While i <= 3
Call GetNewUserFolders(i)
i = i + 1
Wend
strNewID = InputBox("Please enter your corporate ID number...",
"New User ID set up")
'stripp strings
Call stripStrings
strSQL = "INSERT INTO tblSettings(fldCorpID, fldSummary,
fldDetail, fldDNIS) values ('" & strNewID & "', '" & Summaryfoldername & "',
'" & Detailedfoldername & "', '" & DNISfoldername & "')"
CurrentDb.Execute strSQL
cmbUID.Requery
MsgBox "User ID " & strNewID & " settings have been added to the
application. Now please select your user ID from the user ID list", vbOKOnly
+ vbExclamation, "New User Successful"
End If
End If
Call getChkValues(True, 0)
End Sub
The whole module works fine the problem is with my SQL query...it works but
when it has to deal with strings that have apostrophe's it breaks! it gives
me the Run-time error 3075 (I found this through google, but have not been
able to find a solution to it)...Does anyone have any idea how to handle sql
queries with string variables that have apostrophes in them?
Many thanks in advance...
Private Sub cmbUID_Change()
Dim i As Integer
Dim strNewID As String
strUID = cmbUID.Value
If strUID = "New" Then
strSel = MsgBox("Would you really like to add a new user id?",
vbYesNo + vbQuestion, "User ID Verification")
If strSel = vbYes Then
'get new user settings
'select folders where emails are kept
i = 1
While i <= 3
Call GetNewUserFolders(i)
i = i + 1
Wend
strNewID = InputBox("Please enter your corporate ID number...",
"New User ID set up")
'stripp strings
Call stripStrings
strSQL = "INSERT INTO tblSettings(fldCorpID, fldSummary,
fldDetail, fldDNIS) values ('" & strNewID & "', '" & Summaryfoldername & "',
'" & Detailedfoldername & "', '" & DNISfoldername & "')"
CurrentDb.Execute strSQL
cmbUID.Requery
MsgBox "User ID " & strNewID & " settings have been added to the
application. Now please select your user ID from the user ID list", vbOKOnly
+ vbExclamation, "New User Successful"
End If
End If
Call getChkValues(True, 0)
End Sub
The whole module works fine the problem is with my SQL query...it works but
when it has to deal with strings that have apostrophe's it breaks! it gives
me the Run-time error 3075 (I found this through google, but have not been
able to find a solution to it)...Does anyone have any idea how to handle sql
queries with string variables that have apostrophes in them?
Many thanks in advance...