I have a table that I create using a DAO recordset. Users can pull records up from this table and then manipulate certain fields, when they click the save button, then the record gets writen to the permanent table.
What would be the most efficient way to check to see if the record they are trying to save is in the permanent table already?
I was thinking of doing a dlookup or dcount (on the permanent table)on the WR# field when the form opens and if the record already exists in the permanent table to give a message box or set the saved check box to -1 or checked.
I do something similiar to this when checking for security, such as below, but I haven't had very good luck replicating this method:
Public Function SecurityCheck() As String
SaveBtn.Enabled = Not IsNull(DLookup("Area", "SecurityQuery", _
"AreaCode='" & [Area] & "' AND AdministratorID='" & [Text57] & "'"))
End Function
Any suggestions would be appreciated. Thanks!
What would be the most efficient way to check to see if the record they are trying to save is in the permanent table already?
I was thinking of doing a dlookup or dcount (on the permanent table)on the WR# field when the form opens and if the record already exists in the permanent table to give a message box or set the saved check box to -1 or checked.
I do something similiar to this when checking for security, such as below, but I haven't had very good luck replicating this method:
Public Function SecurityCheck() As String
SaveBtn.Enabled = Not IsNull(DLookup("Area", "SecurityQuery", _
"AreaCode='" & [Area] & "' AND AdministratorID='" & [Text57] & "'"))
End Function
Any suggestions would be appreciated. Thanks!