P
Phil Hood
I have set up the following event procedure but keep
getting an error message as follows:
Run-time error 3421
Data type conversion error
I suspect it might be something to do with:
rstRecords!HighHeatNo
as it is shown as <Object variable or With block variable
not set>
Any help greatly appreciated (as always)
-------------------------------
Dim dbsDatabase As Database
Dim rstRecords As Recordset
Set dbsDatabase = CurrentDb
Set rstRecords = dbsDatabase.OpenRecordset("SELECT Max
(HeatNo)" & "As HighHeatNo FROM Heat", "WHERE (([Heat]!
[MatchID]= " & _
[Forms]![Heat]![MatchID] & ") AND ([Heat]![HeatID]= "
& [Forms]![Heat]![HeatID] & "));")
Me.HeatNo = rstRecords!HighHeatNo + 1
----------------------------------
getting an error message as follows:
Run-time error 3421
Data type conversion error
I suspect it might be something to do with:
rstRecords!HighHeatNo
as it is shown as <Object variable or With block variable
not set>
Any help greatly appreciated (as always)
-------------------------------
Dim dbsDatabase As Database
Dim rstRecords As Recordset
Set dbsDatabase = CurrentDb
Set rstRecords = dbsDatabase.OpenRecordset("SELECT Max
(HeatNo)" & "As HighHeatNo FROM Heat", "WHERE (([Heat]!
[MatchID]= " & _
[Forms]![Heat]![MatchID] & ") AND ([Heat]![HeatID]= "
& [Forms]![Heat]![HeatID] & "));")
Me.HeatNo = rstRecords!HighHeatNo + 1
----------------------------------