A family of Microsoft relational database management systems designed for ease of use.
Hmm, okay then try this...
Me.Recordset.FindFirst "UsrTypID= " & NameOfYourControlHere
...let me know what happens
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
I run into many times that this command does not work.
In this case
DoCmd.SearchForRecord , "", acFirst, "[UsrTypID] = " & Nz(Screen.ActiveControl, 0)
does not find the record, then when trying to leave the form I will get an error message that it is trying to write a duplicate record
The form is bound to the correct table, the primary key for the table is UsrTypID and the active control has the correct value. UsrTypID is an integer.
A family of Microsoft relational database management systems designed for ease of use.
Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.
Answer accepted by question author
Hmm, okay then try this...
Me.Recordset.FindFirst "UsrTypID= " & NameOfYourControlHere
...let me know what happens
That worked. Thanks
It is on an unbound control. I have this happen quite often. This time it is in 2016 but I have had this occur in 2003, 2007, 2010 and 2013 as well. Usually I have to either treat the form as unbound or unbind the form.
Sounds like you are using it on a BOUND control? That line should be used on an UNBOUND control as it is looking for the record.