I am writing a VB.NET 2005 Win Form that is used with scanning a barcode. I have an Access db that I need to compare a barcode value in a textbox with a matching value in the datagridview.
I am thinking I should write a loop to locate the same value as the textbox value. If so, how would I do this?
Once I find the first instance of that value compare the Date/Time with a datediff, yes??

Thanks in advance,
CM

Recommended Answers

All 3 Replies

Member Avatar for iamthwee

Depends what you want to do.

When you find the same bar code what information to you want it to display.

You are correct in your logic approach for finding the same value.. which can be done various ways, depending on your method of populating the datagrid. But it is what works for your needs.

My question is about one question you asked: " Once I find the first instance of that value compare the Date/Time with a datediff, yes??"

Why are you doing a Date/Time compare?

This may be a minor point, because it would ultimately depend on what your application function is, but is there a reason for needing to do the date/time compare?

Once the barcode is scanned, I want to check the data base for the same RX number...via some kind of loop I suppose, but not sure how to write that code. Just a simple Do/Loop I would guess....
In regards to the date/time, if I find the matching Rx number in the db I want the app to look at the date/time it was added to the db versus the current date/time. I most likely do this with a datediff. Correct??
Everything else I need to do I already have written the code.
Any assistance is appreciated!
Thanks again,

Happy New Year!

Mark

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.