Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Type Mismatch Error

Status
Not open for further replies.

cranebill

IS-IT--Management
Jan 4, 2002
1,113
US
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?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top