Hi Qveen72
I have tried putting moving that line but it is still not working.
the Cent_No text box keeps changing when the mouse is moved but dont not call the disprec fuction.
Just can figure the error....
User Profile
Collapse
-
-
Can any body tell me what wrong with this code. Been trying for ages but it only displays the first record from th database.
[CODE=vb]
If rs.RecordCount = 0 Then Exit Sub
For i = 1 To rs.RecordCount ' Read all the records from database
Do While rs.EOF
rs.MoveFirst
sqlStmt = "select * From candres where ExamSeries='" & Exam_Sr & "' and ExamYear='"...Leave a comment:
-
Thanks for the reply. I have been able to solve the query. My latest problem is the SQL statement. It is only picking the first record from the database.
This is the code:
[CODE=vb]
If rs.RecordCount = 0 Then Exit Sub
rs.MoveFirst
For i = 1 To rs.RecordCount ' Read all the records from database
sqlStmt = "select * From candres where ExamSeries='" & Exam_Sr & "'and...Last edited by Killer42; Jan 3 '08, 02:53 AM.Leave a comment:
-
Thanks for the reply. I have been able to solve the query. I was passing the values to a different form then the required form. The new query is in the SQL statement. It is only picking the first record in the database.
Now I want to know which function you are referring to and where I am opening the recordset twice.
Thanks for the help, really appreciated.
gilsygirl newbie...Last edited by Killer42; Jan 3 '08, 02:50 AM.Leave a comment:
-
Thanks for the reply
I am trying to extra a record from a database using a combination of 3 of the fields in the database as a key. So i am querying them in an Sqlstmt variable use as the recordset. the fields in the database are define as text and in the vb form the variable agruments are define as string.
So when i enter the variables on the form a second form should load displaying a record base on the variables...Leave a comment:
-
Hi thanks for the reply. how do i treat a text variable define as string. cos that is all i have done. but the error keeps coming from my sql statement.
Is there any other suggestion u have.
thanks...Leave a comment:
-
Error 3421: "Data Type Conversion Error.
Hi Guys
Season greetings to everyone.
Does anyone have an idea to this error message.
Thanks
gilsygirl -
Set rs to db
Hello QVeena72
Thanks for the code. I tried it but the problem is i have already set db in the General section. In this code we are trying to set it again.
Set rs = db.OpenRecordse t(sqlStmt, dbOpenDynaset)
If RS.RecordCount> 0 Then
frmCandResult.S how vbModal, Me
What do think i should do.
Thanks for ur help.Leave a comment:
-
Freedownloads for Visual Interdev to run ASP.Net website
Hello Everyone
I want to run my website developed in ASP.Net using Visual Interdev on a computer different from where i created it. Is there any freesite i can go to download the Visual Interdev and .Net. I have tried tried microsoft site but the download does complete.
please help.
Thanks
gilsygirl (Newbie) -
Thanks for the reply. This is where i create the recordset.
[CODE=vb]Public Function initdb()
On Error GoTo error
Set ws = DBEngine.Worksp aces(0)
Set db = ws.OpenDatabase ("c:\resultchec ker.mdb")
Set rs = db.OpenRecordse t("candres", dbOpenTable)
Exit Function[/CODE]
This is the for loop and the select statement where i check the records.
[CODE=vb]If rs.RecordCount...Last edited by Killer42; Dec 9 '07, 12:27 PM.Leave a comment:
-
Thanks for the reply
The problem is this
the for loop am using counts all the records and the prints all of the records from the database.
What i can't do is to be able to choose record by record using the the Candidate No, Year of exam and centre No.
I just don't how to use these three values as a key to search for a record.
Thanks for your help.
NewbieLeave a comment:
-
Using For Loop through an access Database
Hello everyone
Am using a For Loop to access records from my database but the code opens instead of a specific record base on values passed by the user. These values a fields in the database which i want to make keys.
This a bit of the code
Vb 6 and Microsof Access
code Vb:
If rs.RecordCount = 0 Then Exit Sub
rs.MoveFirst
For i = 1 To rs.RecordCount... -
To all of you
Thank you very very much. The problem was exactly from the references. I removed the Microsoft ActiveX reference and it worked.
Thanks a million again
gilsygirl (Newbie)...Leave a comment:
-
Thanks for your replies. I have change the path name and put the database in c: directly but the error will not go away.
Any more suggestions will be kindly appreciated.
Thank.
This is my lastest code
code vb:
Public Function initdb()
'On Error GoTo error
Set ws = DBEngine.Worksp aces(0)
Set db = ws.OpenDatabase ("c:\resultchec ker.mdb")
...Leave a comment:
-
Thanks for your replies. I have change the path name and put the database in c: directly but the error will not go away.
Any more suggestions will be kindly appreciated.
Thank.
This is my lastest code
code vb:
Public Function initdb()
'On Error GoTo error
Set ws = DBEngine.Worksp aces(0)
Set db = ws.OpenDatabase ("c:\resultchec ker.mdb")
...Leave a comment:
-
Thanks for the reply
What do mean when u say explicit and implicit definations.
I have looked at all the variables i define and they are of the correct type.
what about the database how do i see the error.
am frustrated and a newbie...Leave a comment:
-
Yes u are right i have change dat. I still have the error though
Pls help...Leave a comment:
-
Error 13 ( Type mismatch
Hello everyone
Am having this error an just dont know what to do. Am using vb 6 and access database
This is my code
code vb:
Public db As Database
Public rs As Recordset
Public ws As Workspaces
Public Function initdb()
'On Error GoTo error
Set ws = DBEngine.Worksp aces(0)
Set db = ws.OpenDatabase (App.Path & "\resultchecker .mdb")... -
Hi Jerry
Have u tried using the SEEK Method where u can specifically search the field from the database base on its index.
Good luck...Leave a comment:
-
Thanks QVeen
I have declared everything and this how I did it.
[CODE=vb]Dim objConn As ADODB.Connectio n
Dim objobjRS As ADODB.Recordset
' The above declaration is in the General section
Sub frmCand_Details ()
Set objConn = New ADODB.Connectio n
Set objobjRS = New ADODB.Recordset
objConn.Open ("Provider=Micr osoft.Jet.OLEDB .4.0;Data source=c:\resul tchecker.mdb")...Leave a comment:
No activity results to display
Show More
Leave a comment: