"Method 'open' of object 'recordset' failed

sanky_youth
02-16-2009, 07:05 AM
Re: http://www.xtremevbtalk.com/showthread.php?t=159064


Private Sub cboProduct_ID_Click()
Set rs = Nothing
rs.Open ("select p.product_name,p.weight,p.rate,d.designer_name," & _
"d.size from (product p),(designing d),(manufacturing m) where p.Product_ID = '" & _
cboProduct_ID.Text & "',m.design_ID = d.design_ID and m.product_ID = p.product_ID;"), cn, 3, 2

If rs.RecordCount <= 0 Then
MsgBox "Select a Valid Product ID", vbCritical, "Diatrend"
Call cmdClear_Click
Exit Sub


same problem with me ....
Method 'open' of object '_Recordset' failed




Welcome to the forum, sanky youth. :)

As per our posting guidelines (http://www.xtremevbtalk.com/faq.php?faq=evbf_faq#faq_evbf_rules) which you agreed to when you joined:

Please do not reply to threads that have been inactive for over one month.
Please start your own threads to ask your own questions.
Please use the code tags when posting code. Click on this post's quote button to see how.

Thank you.

Oorang
02-20-2009, 03:18 PM
Hi SY,
Welcome to the board:) I assume, as you posted in this forum, that the database in question is Access. If so, your SQL will not be recognized as valid. This will cause the error you recieved. The least painful way to get what you want is just use the query builder to create the query, then copy the sql it generates.

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum