I am building off of a database that someone else built and there is a problem. When I split the database and distribute it, this piece of code stops working. I used the splitter utility and everything is fine so I don't know why this is a problem. It works when the database is not split. At the line" rst.Index = "Primarykey" " the compiler will not recognize the .(dot) operator for rst. Any ideas?
Sub UpdateSystemDescriptions()
' Update Hardware Description
txtBARCO_Hardware = cboBARCO_Hardware.Value
Dim rst As RecordsetSet
rst = CurrentDb.OpenRecordset("Hardware Products"
rst.Index = "Primarykey"
rst.Seek "=", cboBARCO_Hardware.Value
If rst.NoMatch Then
lblBARCO_Hardware.Caption = "Product not found."
Else
If IsNull(rst![Description]) Then
lblBARCO_Hardware.Caption = "No description given."
Else
lblBARCO_Hardware.Caption = rst![Type] & " - " & rst![Description]
End If
End If
End Sub
Sub UpdateSystemDescriptions()
' Update Hardware Description
txtBARCO_Hardware = cboBARCO_Hardware.Value
Dim rst As RecordsetSet
rst = CurrentDb.OpenRecordset("Hardware Products"
rst.Index = "Primarykey"
rst.Seek "=", cboBARCO_Hardware.Value
If rst.NoMatch Then
lblBARCO_Hardware.Caption = "Product not found."
Else
If IsNull(rst![Description]) Then
lblBARCO_Hardware.Caption = "No description given."
Else
lblBARCO_Hardware.Caption = rst![Type] & " - " & rst![Description]
End If
End If
End Sub