I'm getting an error msg code 13, Type mismatch.
In an Access 2000 module, I have the following code:
Sub AddItemsToTable(ItemType As String, SelectedItem As Variant, Optional SelectedOptional As Variant)
Dim strItemType As String
Dim varSelected As Variant
Dim varSelectOpt As Variant
Dim strMsg As String
Dim strTitle As String
Dim db As Database
Dim rst As Recordset
Set db = CurrentDb()
Set rst = db.OpenRecordset("tblSelectedItems"
strItemType = ItemType
varSelected = SelectedItem
varSelectOpt = SelectedOptional
________________________________________________
One the line "Set rst = db.OpenRecord......"
is where this error msg is occurring.
Can anyone tell me why I am getting this?
Any help is appreciated!
Thanks
Who takes 7 seconds to develop,
7 mins to document,
7 hours to test,
7 months to fix will always blame the clock. s-)
In an Access 2000 module, I have the following code:
Sub AddItemsToTable(ItemType As String, SelectedItem As Variant, Optional SelectedOptional As Variant)
Dim strItemType As String
Dim varSelected As Variant
Dim varSelectOpt As Variant
Dim strMsg As String
Dim strTitle As String
Dim db As Database
Dim rst As Recordset
Set db = CurrentDb()
Set rst = db.OpenRecordset("tblSelectedItems"
strItemType = ItemType
varSelected = SelectedItem
varSelectOpt = SelectedOptional
________________________________________________
One the line "Set rst = db.OpenRecord......"
is where this error msg is occurring.
Can anyone tell me why I am getting this?
Any help is appreciated!
Thanks
Who takes 7 seconds to develop,
7 mins to document,
7 hours to test,
7 months to fix will always blame the clock. s-)