ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Date Verification & Duplication Error (https://www.excelbanter.com/excel-programming/357056-date-verification-duplication-error.html)

dok112[_107_]

Date Verification & Duplication Error
 

Hey everyone,

Quick 2 questions...I need some help. I have a form that is dumping
information into a Access Database. I need it to check to see if one
of the entries is a duplicate. I already have it opening a connection
to the Access database, but I need it to check Field("Claim") for a
duplicate of the textbox named "Claim". Anyone have any ideas? I have
an error message prepared, I just need it to verify the duplicate so it
can pop the error message.

2nd question:
How can I write vba so that it checks that the entry in a textbox is in
proper date format? I have a textbox titled "Date" and currently it
corrects the format if it's entered short (11/23 = 11/23/2006), but
I've found out that Excel will accept the date format wrong. ex: it
will accept 11/232/006 as a date. Is there a way to tell it to flag
this date as incorrectly formatted?


--
dok112
------------------------------------------------------------------------
dok112's Profile: http://www.excelforum.com/member.php...o&userid=10581
View this thread: http://www.excelforum.com/showthread...hreadid=526160



All times are GMT +1. The time now is 02:29 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com