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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MS Access Run time error-13 type mismatch 1

Status
Not open for further replies.

hunterjj

IS-IT--Management
Dec 9, 2002
28
US
Following is the code that results in a run time error 13/type mismatch. It is right out of the book so I don't know what to do.

Private Sub PLastFirst_AfterUpdate()

Dim PlayerInfo As Recordset, SQLText

SQLText = "SELECT * FROM [Players] WHERE " _
& "[Players.PLastFirst] = '" & Me.[PLastFirst] & "' "

Set PlayerInfo = CurrentDb.OpenRecordset(SQLText)

Me![PUSGAHcp] = PlayerInfo![PUSGAHcp]

MsgBox "PUSGAHcp = " + Me![PUSGAHcp]

End Sub

While working on a form with a different recordset, this is supposed to return all the data elements in the players table into a recordset variable.

Any ideas?
 
Hi

Which book?

to begin

Dim PlayerInfo As Recordset, SQLText As String


If [Players.PLastFirst] is numeric, you do not need the '

if not

on which line does error occur?

Regards

Ken Reay
Freelance Solutions Developer
Boldon Information Systems Ltd
Website needs upgrading, but for now - UK
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top