I am getting a type mismatch error in this code.
Here is the code:
Public Function OpenMsg()
On Error GoTo HandleError
If Programming_Mode Then On Error GoTo 0
'----
Dim strMsg As String
Dim strPeople As String
Dim db As Database
Dim RS1 As Recordset
Dim Table_1 As String
Table_1 = "tbl_WinFaxCredits"
Set db = CurrentDb
Set RS1 = db.OpenRecordset(Table_1, dbOpenTable)
'------------
'DoLoop
RS1.moveFirst
Do Until RS1.EOF
strPeople = strPeople & RS1![PeopleWhoContributed] & vbCrLf
RS1.MoveNext
Loop
'Close Table
RS1.Close
Set db = Nothing
strMsg = "This code is furnished because I spent 4 days searching for Access code to control WinFax that was nowhere to be found. "
strMsg = strMsg & "However with the help of:" & vbCrLf & vbCrLf
strMsg = strMsg & strPeople & vbCrLf
strMsg = strMsg & "and the WinFax SKD Information I was able to come up with this code. "
strMsg = strMsg & "Please copy the code and use it, give it away, but above all improve upon it and send me updates. " & vbCrLf & vbCrLf
strMsg = strMsg & "Thanks Larry Gordon --> larryg@kcnet.com"
MsgBox strMsg, , "As the Country song and my customers says 'It sounds so easy, it shouldn't take long.'"
'----
ProcedureDone:
Exit Function
HandleError:
MsgBox Err.Description, vbCritical, "Error " & Err & " in OpenMsg"
Resume ProcedureDone
End Function
This is the line giving the error....
Set RS1 = db.OpenRecordset(Table_1, dbOpenTable)
Any Ideas?
Here is the code:
Public Function OpenMsg()
On Error GoTo HandleError
If Programming_Mode Then On Error GoTo 0
'----
Dim strMsg As String
Dim strPeople As String
Dim db As Database
Dim RS1 As Recordset
Dim Table_1 As String
Table_1 = "tbl_WinFaxCredits"
Set db = CurrentDb
Set RS1 = db.OpenRecordset(Table_1, dbOpenTable)
'------------
'DoLoop
RS1.moveFirst
Do Until RS1.EOF
strPeople = strPeople & RS1![PeopleWhoContributed] & vbCrLf
RS1.MoveNext
Loop
'Close Table
RS1.Close
Set db = Nothing
strMsg = "This code is furnished because I spent 4 days searching for Access code to control WinFax that was nowhere to be found. "
strMsg = strMsg & "However with the help of:" & vbCrLf & vbCrLf
strMsg = strMsg & strPeople & vbCrLf
strMsg = strMsg & "and the WinFax SKD Information I was able to come up with this code. "
strMsg = strMsg & "Please copy the code and use it, give it away, but above all improve upon it and send me updates. " & vbCrLf & vbCrLf
strMsg = strMsg & "Thanks Larry Gordon --> larryg@kcnet.com"
MsgBox strMsg, , "As the Country song and my customers says 'It sounds so easy, it shouldn't take long.'"
'----
ProcedureDone:
Exit Function
HandleError:
MsgBox Err.Description, vbCritical, "Error " & Err & " in OpenMsg"
Resume ProcedureDone
End Function
This is the line giving the error....
Set RS1 = db.OpenRecordset(Table_1, dbOpenTable)
Any Ideas?