can anybody tell me why Bold statement is not working.
Private Sub Command2_Click()
Dim a As String
a = MsgBox("You want to Modify....?", vbQuestion + vbOKCancel, " MODIFY")
If a = vbOK Then
Set rs = New ADODB.Recordset
rs.CursorLocation = adUseClient
[B]rs.Open "select mr.srno,mr.productname,mr.qty, mr.unit from mrtemp as mr Order by mr.srno where mr.req_no=" & strlistrequest, con, adOpenDynamic, adLockOptimistic[/B]
If Not rs.EOF Then
Set Form6.DataGrid1.DataSource = rs
Form6.Show vbModeless
Else
MsgBox "Record not found"
End If
End If
End Sub