I have an application that allows a user to click a button which then opens up a temp table into which the user can paste data from a spreadsheet.
I need to make sure that the data they enter is "their" data and not for someone else. That is, they login as planner XYZ and then the mess up and paste data for planner ABC. I need to check to make sure the pasted data has plannercode = 'XYZ'.
How can I do this?
Private Sub ValidatePlannerEnteredData()
On Error GoTo Err_ERROR
planner = Forms!frm_Main!txtPlannerCode
Dim strSQL As String
' the purpose of this subroutine is to make sure that if the planner has entered data for Stock Classes,
' Dealer Supplier Codes, Alternate Dealer Supplier Codes, or Part Numbers, that the planner codes listed
' in the temp tables are the same as the planner they are logged in as. For example, if they are logged in
' as planner M01 and they paste records for planner M15, we need to throw an error and not allow this.
' Run check for Stock Class table
If fExistTable(planner & "_temp_stockclass") Then