| | |
What Could be wrong here!!!
Please support our Visual Basic 4 / 5 / 6 advertiser: Programming Forums - DaniWeb Sister Site
Thread Solved |
•
•
Join Date: Jan 2008
Posts: 255
Reputation:
Solved Threads: 38
0
#12 Oct 24th, 2009
•
•
•
•
wheh i make the chaanges it gives me a different error.....now it is saying...
syntax error in querry.Incomplete querry close!
and this error is highlighting the following
Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
Option Explicit Private WithEvents conn As ADODB.Connection Private WithEvents rs As ADODB.Recordset Private Sub cmdcnsearch_Click() Dim sql As String sql = "SELECT companyname, companysize, country, city FROM cooperate WHERE accnumber = " & "'" & txtcnsearch.Text & "'" Set conn = New ADODB.Connection conn.CursorLocation = adUseClient conn.Open "PROVIDER=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Subscriptions Project\subscriptions.mdb" Set rs = New ADODB.Recordset rs.Open sql, conn, adOpenStatic, adLockOptimistic If rs.EOF = True Then MsgBox "Record not found", vbExclamation txtcnsearch.SelStart = 0 txtcnsearch.SelLength = Len(txtcnsearch.Text) txtcnsearch.SetFocus Exit Sub Else txtccname = rs!CompanyName txtcsize.Text = rs!companysize txtcountry.Text = rs!country txtcity.Text = rs!city rs.Close End If End Sub
Please mark questions as answered when done.
Be the ONE!!!
Be the ONE!!!
![]() |
Similar Threads
- My CD-RW plays but won't burn. What could be wrong?? Help Please? (Storage)
- Retrieve email I sent to the wrong person (Web Browsers)
- Ram voltage wrong?? (Motherboards, CPUs and RAM)
- Am I going about this the wrong way (IT Professionals' Lounge)
- wats wrong with imesh??? (Windows NT / 2000 / XP)
Other Threads in the Visual Basic 4 / 5 / 6 Forum
- Previous Thread: change Printer And Fax Default Printer From VB6
- Next Thread: VB 6 Error 75 Path File Access
Views: 476 | Replies: 11
| Thread Tools | Search this Thread |
Tag cloud for Visual Basic 4 / 5 / 6
* 6 429 2007 access activex add age append application basic beginner birth bmp c++ calculator cd cells.find click client code college column connection connectionproblemusingvb6usingoledb copy creat ctrl+f data database datareport date delete dissertations dissertationthesis dissertationtopic edit error excel excelmacro file filename form hardware header iamthwee image inboxinvb internetfiledownload keypress label listbox listview liveperson login looping machine microsoft movingranges number objectinsert open oracle password prime program prompt range-objects readfile reading record refresh remotesqlserverdatabase report retrieve save search sendbyte sites sort sql sql2008 sqlserver struct subroutine table tags textbox time timer urldownloadtofile vb vb6 vb6.0 vba visual visualbasic visualbasic6 web window





