How do you use a select case statement when using a recordset or is this possible? We are getting a data type mismatch error and are unsure why?
This is the code we have thus far:
Private Sub Product_Update()
Dim dbs As DAO.Database
Dim rstCD As DAO.Recordset
Dim strsql As String
'Select all records from Sales Open 1 Engineering Order
Set dbs = CurrentDb()
strsql = "SELECT * FROM [SLS_OPN_1_ENG]"
Set rstCD = dbs.OpenRecordset(strsql)
Select Case rstCD
Case rstCD![Application] = "DAL"
rstCD![Product] = rstCD![New Digt Acc Cd]
Case Else
rstCD![Product] = "OTHER"
End Select
End Sub
This is the code we have thus far:
Private Sub Product_Update()
Dim dbs As DAO.Database
Dim rstCD As DAO.Recordset
Dim strsql As String
'Select all records from Sales Open 1 Engineering Order
Set dbs = CurrentDb()
strsql = "SELECT * FROM [SLS_OPN_1_ENG]"
Set rstCD = dbs.OpenRecordset(strsql)
Select Case rstCD
Case rstCD![Application] = "DAL"
rstCD![Product] = rstCD![New Digt Acc Cd]
Case Else
rstCD![Product] = "OTHER"
End Select
End Sub