A
Andy G
All I'm trying to do is select a product from a combo box and have the cost
and quantity show up in the two boxes (txtProductCost and txtQty). The
backend is a SQL database so I think that I have to use dbSeeChanges. I'm
getting the error "Run time error 3001, Invalid Argument" on the set rs line
below. Any help would be greatly appreicated.
Dim rs As Recordset
Dim mySQL As String
mySQL = "SELECT PROD_PROD_ID, PROD_NAME, PROD_COST, PROD_QTY " & _
"FROM dbo_tblCFSPH_PROD " & _
"WHERE PROD_PROD_ID = " & Me.cmbProductName
Set rs = CurrentDb().OpenRecordset(mySQL, dbopendynaset, dbseechanges)
Me.txtProductCost = rs![PROD_COST]
Me.txtQty = rs![PROD_QTY]
rs.Close
and quantity show up in the two boxes (txtProductCost and txtQty). The
backend is a SQL database so I think that I have to use dbSeeChanges. I'm
getting the error "Run time error 3001, Invalid Argument" on the set rs line
below. Any help would be greatly appreicated.
Dim rs As Recordset
Dim mySQL As String
mySQL = "SELECT PROD_PROD_ID, PROD_NAME, PROD_COST, PROD_QTY " & _
"FROM dbo_tblCFSPH_PROD " & _
"WHERE PROD_PROD_ID = " & Me.cmbProductName
Set rs = CurrentDb().OpenRecordset(mySQL, dbopendynaset, dbseechanges)
Me.txtProductCost = rs![PROD_COST]
Me.txtQty = rs![PROD_QTY]
rs.Close