Welcome to Dream.In.Code
Getting VB Help is Easy!

Join 109,297 VB Programmers for FREE! Ask your question and get quick answers from experts. There are 1,211 online right now! We've got more than 500 tutorials and 2,000 snippets. Join and find out why Dream.In.Code is the #1 programming help community on the internet! Registration is fast and FREE... Join Now!



Run time error 424 problem

 
Reply to this topicStart new topic

Run time error 424 problem

lan55_hilario
post 6 Aug, 2008 - 05:37 PM
Post #1


New D.I.C Head

*
Joined: 6 Aug, 2008
Posts: 1

vb

'Run time error 424
object required'

Public Function Record_Exist(inField$, inTable$, record As String) As Boolean

sql "SELECT " & inField & " AS fld FROM " & inTable & " WHERE LOWER(" & inField & ") = LOWER('" & clss.Replace_Char(record) & "') LIMIT 1"

If rs.EOF Then
Record_Exist = False
Else
Record_Exist = True
End If

End Function


Mod Edit: Please use code tags when posting your code. Code tags are used like so => code.gif

Thanks,
PsychoCoder smile.gif
User is offlineProfile CardPM

Go to the top of the page


PsychoCoder
post 6 Aug, 2008 - 06:09 PM
Post #2


DIC.Rules == true;

Group Icon
Joined: 26 Jul, 2007
Posts: 7,238



Thanked 52 times

Dream Kudos: 7775

Expert In: VB, VB.Net, C#, SQL, ASP, ASP.Net, Web Development, HTML, CSS, Win32 API, Javascript, mySQL, J#, GDI

My Contributions


You're not opening the Recordset anywhere.

Also, in this line

vb

sql "SELECT " & inField & " AS fld FROM " & inTable & " WHERE LOWER('" & inField & "') = LOWER('" & clss.Replace_Char(record) & "') LIMIT 1"


Is sql a String variable? If so it should look like


vb

Set sql = "SELECT " & inField & " AS fld FROM " & inTable & " WHERE LOWER(" & inField & ") = LOWER('" & clss.Replace_Char(record) & "') LIMIT 1"
User is online!Profile CardPM

Go to the top of the page

Fast ReplyReply to this topicStart new topic
Time is now: 9/6/08 09:45AM

Live VB Help!

VB Tutorials

Reference Sheets

VB Snippets

Bye Bye Ads

Free DIC T-Shirt

T-Shirt Example

Related Sites

Monthly Drawing

Thumb Drive

Partners

Top Contributors

Top 10 Kudos This Month