I believed the field in this example is a text type field in the table, my question is what if this field is a number filed what is the correct code to use. Because this code won't work in the table with number field. ?? thanks
I was wondring the same as you, until i've found a solution. I change some of the code, like follow: Dim NewNo As Integer NewNo = DCount("Your Field Name", "Table Name", "Your Field Name =" & Me.Your Field Name.Value & "") If NewNo > 0 Then MsgBox "The Nmber Has been Already entered", vbInformation, "Duplicate Number" Me.Your Field Name.SetFocus Me.Undo End If ------------ I hope it work with you!
Hi there, what if the form is based on a query instead of just one table? The field that I want to prevent duplicates of needs to search a table that is within a query. How would I do that?
Actually possible. Just change your record source. Like query ilias Fullname: then concatenate firstname middlenamen lastname then you can refer that Fullnamen for criteria to lookup the duplicates after updating the lastname or any field you wanted to...
Great video guide, will the same code still work if i have an item text bix thats alpha numerical (eg. AB12345) been trying to work this out this past week. Thanks 👍
Awesome, thanks!
Watching cous Thank you another information again you share to us
Another great vlog tuitorial thank you for sharing po..
Thanks for visiting
Thank
i applied the same code as shown in the video, but it gives error message e.g syntax error (Missing operator) in query expression
I believed the field in this example is a text type field in the table, my question is what if this field is a number filed what is the correct code to use. Because this code won't work in the table with number field. ?? thanks
I was wondring the same as you, until i've found a solution. I change some of the code, like follow:
Dim NewNo As Integer
NewNo = DCount("Your Field Name", "Table Name", "Your Field Name =" & Me.Your Field Name.Value & "")
If NewNo > 0 Then
MsgBox "The Nmber Has been Already entered", vbInformation, "Duplicate Number"
Me.Your Field Name.SetFocus
Me.Undo
End If
------------
I hope it work with you!
Hi there, what if the form is based on a query instead of just one table? The field that I want to prevent duplicates of needs to search a table that is within a query. How would I do that?
Actually possible. Just change your record source. Like query ilias
Fullname: then concatenate firstname middlenamen lastname then you can refer that Fullnamen for criteria to lookup the duplicates after updating the lastname or any field you wanted to...
Great video as always.
Was thinking, maybe you can add a delete and update bottoms on the item list form.
Thanks
Will it work din po ba sa number na data type?
oo
Great video guide, will the same code still work if i have an item text bix thats alpha numerical (eg. AB12345) been trying to work this out this past week. Thanks 👍
Harang is life na kapatid....haba haba ah....
thank you kapatid kong pasaway.. hehehe...