Checking for duplicates

Joined
Jul 23, 2012
Messages
8
Reaction score
0
Please forgive my brainless questions. I have experiance with this stuff it's just been awhile since I put together a serious project.

Ok so now that I have my table and input form built and working very well at the moment. The form does just about everything that I want it to save for one thing. I need it to check for duplicate parts. All of our parts have a specific part number and serial number. Because of regulations two of the same part number never have a duplicate serial number. So what I am trying to do is to set up my form so that after the entry of the serial number the code will run a query and check for duplicates. I am having a hard time straighening out my code in my head proceedurally. I know that I am going to have to pass values from the form to the query and if memory serves that means setting up dims. I would like some one to please help guide me on what I need to do and work it into the code.

First dims. I need the query to see if the values from two differnt txt boxes match anything that is already in the dbase. I have a text box for part number and one for serial number. I'm thinking something like this:

Dim pn As String
Dim pn = txt_prt_number.Value
Dim sn As String
Dim sn = txt_sn.Value

I don't know if I need to declare my query or not, perhaps someone can help me with that one.

I think my SQL Statement will be something like the select count, but I'm not sure.

I know that I will need an If statement that checks to see if the count value is less than 1.

I need a little help on this one folks. Once I build this one the rest should be a piece of cake.
 
Joined
Jul 23, 2012
Messages
8
Reaction score
0
Good for you, man!

Now try to get some experience with this stuff ;)


Very funny. I actually did that for over two hours and just couldn't find any hard and fast anwsers. There was enough in little snippet to job my memory, but I couldn't find a procedure for it. I'm sure that I will come across it soon enough. Like I said, I learn fast, once I have one down, the rest will come easy for me.
 
Joined
Feb 12, 2013
Messages
1
Reaction score
0
[FONT=&quot]Duplicate Files Deleter has the MD5 search engine which allows the program to search for duplicate files by content, regardless of other match criteria. It would be helpful, for example, when two identical mp3 tracks or video files have different names.:D[/FONT]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top