Another method to avoid this problem is the following
rs.FindFirst "[Name] = '" & Replace(Me![Combo82],"'","''") & "'"
The ADODC is a datacontrol which is added in the menu Project==>Components...
There you will see that Microsoft ADO Data Control 6.0 (SP4)(OLEDB) is a selected item. That is the component you have added
I thought I pointed you in the right direction.
If you use the code I posted here before you should be able to connect to your database.
After the connection is made you can drop your own code and do whatever you are doing in your application.
**********************Begin...
You are using ADO
what I mostly do to connect to a database is the following.
I create a module with all the parameters to connect to the database
Put the following code in a module
******************************************************
Option Explicit
Public myConn As New ADODB.Connection...
The solution I suggested here before uses a report created with crystal reports. You can find crystal reports on the third CD from VB 6.0. If you install this program you will be able to create a report with crystal reports (version 4.6)and open this report in VB when putting the crystal report...
Are you using an access database?
If you are you can connect using ado like this
Put this in a module
Option Explicit
Public myConn As New ADODB.Connection
Public RS As New ADODB.Recordset
Dim Cmd As New ADODB.Command
Public Sub CloseConn()
RS.Close
myConn.Close
End Sub
Public Sub...
Hi,
Could you try this please
Maybe it is not the fasted way but it works
Put two textboxes and a commandbutton on a form.
In textbox1(Text1) you put your number'A000000001'
Textbox 2 (Text2) will give you the result even when the numberhas more than 1 digit.
You will also see that, when you...
Hi,
You can control the length of the ID_order.
Select Case Len(id_order)
Case 1
id_order= "000" & id_order
Case 2
id_order= "00" & id_order
Case 3
id_order= "0" & id_order
Case 4
id_order= id_order
End Select
ydate...
Hi all,
I have a problem accessing a Crystal report in VB code. I use VB 6.0
Normally I don't have problems with this but I want to retrieve data from an access database protected with a password.
When I open the report with crystal reports, I must enter the password and then the report opens...
Hi,
You can't bind a datagrid to a recordset that was made in code. If you want to bind this datagrid, you must put an ADO datacontrol on your form and bind your datagrid to it. This you can do in code.
Private myCon As New ADODB.Connection
Private myRS As New ADODB.Recordset...
Hi,
So you are saying that myTotal is a 100 time bigger then it must be. Did you miscalculate or is the value correct?
If it is correct and if it is always 100 times bigger then the solution should be simple.
You could try this
MyString = "Total: " & CCur(MyTotal/100)
For the label...
Hi,
I suppose you want to retrieve multiple fields of the same table and put them together in a simple combobox
You could go about it like this.
**********************************
Dim myConn as New ADODB.Connection
Dim MyRS as New ADODB.Recordset
myConn.Open...
Hi,
if you want code to be excecuted when a selection is made, you have to put this code in the click event of the listbox. I think you putted all of the code in the same event where you show your listbox. Naturally all of the code is excecuted even after the list is shown.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.