Access 2000 on WIn2K
Have a form with two fields:
Countdate = Date/time (bound textbox) defaulted to Now()
Counttime = Text (Combobox with valuelist)
The following code produces Runtime error 13 'Type Mismatch' after the combo (combo71) is updated?
Many thanks for any ideas
Have a form with two fields:
Countdate = Date/time (bound textbox) defaulted to Now()
Counttime = Text (Combobox with valuelist)
The following code produces Runtime error 13 'Type Mismatch' after the combo (combo71) is updated?
Code:
Private Sub Combo71_AfterUpdate()
Dim rst As Recordset
Set rst = CurrentDb.OpenRecordset("SELECT * FROM TABLEUTIL WHERE [countDate]=#" & Me.COUNTDATE & "# And [counttime]='" & Me.Combo71 & "'")
If Not rst.EOF Then
MsgBox "An Entry already exists for this timeslot!", vbOKOnly, "StraightEdge Software"
Me.Combo71.SetFocus
Me.Combo71 = Null
Else
Me.Combo71.SetFocus
End If
Set rst = Nothing
End Sub
Many thanks for any ideas