donq
10-23-2004, 12:21 PM
Greetings to the forum:
I'm using Access 2000, and VB6, trying to retrieve a record that's in a text box (txt_cust_no), which I can see populated with a valid entry, and I'm running into the following error message:
Run-time error '2147217904 (80040e10)'
no value given for one or more required parameters.
as follows is the code and (=>*) the point of the error:
Sub Make_DB_Connection()
Dim adoConn As ADODB.Connection
Set adoConn = New ADODB.Connection
adoConn.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _
" Data Source=\\megaone\mailorder.mdb;Persist Security Info=False "
Dim adoCustRs As ADODB.Recordset
Set adoCustRs = New ADODB.Recordset
adoCustRs.CursorLocation = adUseClient
Dim RsSelect As String
RsSelect = "SELECT CustID, LastName, FirstName from Customers where CustID = txt_cust_no and CustStatus = 'A' "
=>* adoCustRs.Open RsSelect, adoConn, adOpenStatic, adLockReadOnly, adCmdText
Can someone shed some light on what I'm doing wrong???
Thanks in advance for your input[/QUOTE]
I'm using Access 2000, and VB6, trying to retrieve a record that's in a text box (txt_cust_no), which I can see populated with a valid entry, and I'm running into the following error message:
Run-time error '2147217904 (80040e10)'
no value given for one or more required parameters.
as follows is the code and (=>*) the point of the error:
Sub Make_DB_Connection()
Dim adoConn As ADODB.Connection
Set adoConn = New ADODB.Connection
adoConn.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _
" Data Source=\\megaone\mailorder.mdb;Persist Security Info=False "
Dim adoCustRs As ADODB.Recordset
Set adoCustRs = New ADODB.Recordset
adoCustRs.CursorLocation = adUseClient
Dim RsSelect As String
RsSelect = "SELECT CustID, LastName, FirstName from Customers where CustID = txt_cust_no and CustStatus = 'A' "
=>* adoCustRs.Open RsSelect, adoConn, adOpenStatic, adLockReadOnly, adCmdText
Can someone shed some light on what I'm doing wrong???
Thanks in advance for your input[/QUOTE]