This blog is for Accountants who would like to empower themselves by being able to create applications for the company/companies they work for without full reliance on IT professionals. Accountants should know the type of data their company should collect and use the data to analyse and add value to the company's bottom line. They should be able create data collection applications that can be used across their organisation.
Sunday, January 15, 2017
Check for duplicates
In the sales, purchases... forms, you want to avoid keying in duplicate entries. However, ms access does not afford you a simple method to stop an input in forms.
You have to create a count query and add it as a subform.
To check for duplicates, you will add in an event
If (Forms![Frm_tmp_arrecptmain]![Tmp_arrecdup subform].Form![CountOfReceipt_No]) <> 0 Then
MsgBox "Duplicate number, please enter new number", vbCritical, "Profit 2017"
DoCmd.GoToControl "Bank_value"
DoCmd.GoToControl "Receipt_no"
End If
Labels:
access 2016,
Duplicates
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment