The following is an extract from a VB6 application I am writing:
Code:
Dim MyConn As ADODB.Connection
Dim MyRecSet As ADODB.Recordset
Set MyConn = New ADODB.Connection
MyConn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source = D:\Data\Orion-Testing\TestServer\Inventory.mdb"
MyConn.Open
 
Set MyRecSet = MyConn.Execute("Select * from GenericToAlt where dbAltPN = '" & cboAltPart.Text & "'")
If MyRecSet.RecordCount = 0 Then
Stop
End If
I am getting the error: "No value given for one or more required parameters.". It is happening on the "Set MyRecSet ..." statement.

As I step the code, the value of cboAltPart.Text is correct.

Here is the layout of the Table:
TableName: GenericToAlt
dbAtlPN text 30
dbAltPO text 10

There are NO primary or secondary indexes.
I can NOT find the problem. Can YOU help?