Public Function SetDefaults(MyDefaults As String, strEntry As String, strMod As Integer)
Dim dbs As DAO.Database
Dim rs As DAO.Recordset
Set dbs = CurrentDb
Set rs = dbs.OpenRecordset("Select * from tblDefaults", dbOpenDynaset)
With rs
.FindFirst "TypeOfDefault='" & MyDefaults & "'"
If !TypeOfDefault = MyDefaults Then
.Edit
.Fields(strMod).Value = strEntry
.Update
Else 'If can not find it, create a new one
.AddNew
.Fields(0).Value = MyDefaults
.Fields(strMod).Value = strEntry
.Update
End If
End With
Set rs = Nothing
Set dbs = Nothing
End Function