Expand|Select|Wrap|Line Numbers
- Dim IntArgs
- Dim dbsEquipmentAndServiceHistory As Database
- Dim rstUnitNumSortCriteria As Recordset
- Dim rstServiceRecord As Recordset
- IntArgs = OpenArgs
- Set dbsEquipmentAndServiceHistory = CurrentDb
- Set rstUnitNumSortCriteria = dbsEquipmentAndServiceHistory.OpenRecordset("UnitNumSortCriteriaT")
- With rstUnitNumSortCriteria
- .Edit
- !UnitNumSortValue = IntArgs
- .Update
- .Close
- End With
- Set dbsEquipmentAndServiceHistory = CurrentDb
- Set rstServiceRecord = dbsEquipmentAndServiceHistory.OpenRecordset("ServiceRecordT")
- With rstServiceRecord
- rstServiceRecord.FindFirst "[UnitNum] =" & "'" & IntArgs & "'"
- If rstServiceRecord.NoMatch Then
- DoCmd.OpenForm "ServiceRecordNewF", acNormal, , , acFormAdd, , IntArgs
- DoCmb.Close "ServiceRecordF"
- End If
- .Close
- End With
- dbsEquipmentAndServiceHistory.Close
I receive the following message box message "Run time error '3251' Operation is not supported for this type of object"
The little debug functionality shows that I've passed my OpenArgs value successfully. I just don't see what's wrong with any of the objects in the line. Sorry to show the whole sub, just don't know enough to assume.