I am extremely new to MS Access and have reached a barrier that I hope someone can help me with. I am trying to validate a user’s entry into a form’s text fields against a table. I believe this can be accomplished with a DLOOKUP but nothing I have tried seems to work. Any help would be greatly appreciated! Below are the details
Two Tables
TblOvrStock
Fields
OvrLoc1 (Format: ## EX: 10)
OvrLoc2 (Format: ## EX: 01)
OvrLoc3 (Format: ## EX: 05)
OvrLoc4 (Format: ## EX: 12)
PckLoc1 (Format: ## EX: 20)
PckLoc2 (Format: ## EX: 05)
PckLoc3 (Format: ## EX: 04)
PckLoc4 (Format: ## EX: 01)
TblValidLoc
Fields
ValidOvrLoc (Format: ######## EX: 10010512)
ValidPckLoc (Format: ######## EX: 20050401)
One Form:
· The first four fields (two digits each) represent a warehouse ‘overstock’ location
§ TxtOvrLoc1 (EX: 10)
§ TxtOvrLoc2 (EX: 01)
§ TxtOvrLoc3 (EX: 05)
§ TxtOvrLoc4 (EX: 12)
· The other four fields represent a warehouse ‘pick’ location
§ TxtPckLoc1 (EX: 20)
§ TxtPckLoc2 (EX: 05)
§ TxtPckLoc3 (EX: 04)
§ TxtPckLoc4 (EX: 01)
The form is intended to insert records into a table (TblOvrStock)
Before the records are inserted, I need to validate that the entries made in The TxtOvrLoc1,2,3,4 fields match a location in the ValidOvrLoc column of TblValidLoc
If match, then do nothing
If no match, then error msg “Not a valid overstock location”
AND validate that the entries made in The TxtPckLoc1,2,3,4 fields match a location in the ValidPckLoc column of TblValidLoc
If match, then do nothing
If no match, then error msg “Not a valid pick location”
Two Tables
TblOvrStock
Fields
OvrLoc1 (Format: ## EX: 10)
OvrLoc2 (Format: ## EX: 01)
OvrLoc3 (Format: ## EX: 05)
OvrLoc4 (Format: ## EX: 12)
PckLoc1 (Format: ## EX: 20)
PckLoc2 (Format: ## EX: 05)
PckLoc3 (Format: ## EX: 04)
PckLoc4 (Format: ## EX: 01)
TblValidLoc
Fields
ValidOvrLoc (Format: ######## EX: 10010512)
ValidPckLoc (Format: ######## EX: 20050401)
One Form:
· The first four fields (two digits each) represent a warehouse ‘overstock’ location
§ TxtOvrLoc1 (EX: 10)
§ TxtOvrLoc2 (EX: 01)
§ TxtOvrLoc3 (EX: 05)
§ TxtOvrLoc4 (EX: 12)
· The other four fields represent a warehouse ‘pick’ location
§ TxtPckLoc1 (EX: 20)
§ TxtPckLoc2 (EX: 05)
§ TxtPckLoc3 (EX: 04)
§ TxtPckLoc4 (EX: 01)
The form is intended to insert records into a table (TblOvrStock)
Before the records are inserted, I need to validate that the entries made in The TxtOvrLoc1,2,3,4 fields match a location in the ValidOvrLoc column of TblValidLoc
If match, then do nothing
If no match, then error msg “Not a valid overstock location”
AND validate that the entries made in The TxtPckLoc1,2,3,4 fields match a location in the ValidPckLoc column of TblValidLoc
If match, then do nothing
If no match, then error msg “Not a valid pick location”