[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 237
  • Last Modified:

Validation in access and in queries

i need to make  a validation during enter data in table or form , the validation is that the amount in field is not exceeding the corosponding value in queries , and hoe to define the relation that lead to this corrsopnding data , ie table contain po and in the form i need to enter the recieving related to the po but not to exceed the original po amount
0
mmously
Asked:
mmously
1 Solution
 
Rey Obrero (Capricorn1)Commented:
<i need to make  a validation during enter data in table or form>

do the validation using a form..

use the beforeupdate of the form or the control (textbox) where you enter the data.

private sub controlName_beforeupdate(cancel as integer)
' verify the amount

if me.controlName > dlookup("originalamount", "tableName", "[po]=" & me.txtPo) then
   msgbox "Amount is greater than original amount"
   cancel=true
  exit sub
end if


end sub
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now