Solved

Validation in access and in queries

Posted on 2012-04-11
1
224 Views
Last Modified: 2012-11-04
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
Comment
Question by:mmously
1 Comment
 
LVL 119

Accepted Solution

by:
Rey Obrero earned 500 total points
ID: 37832936
<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

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

QuickBooks® has a great invoice interface that we were happy with for a while but that changed in 2001 through no fault of Intuit®. Our industry's unit names are dictated by RUS: the Rural Utilities Services division of USDA. Contracts contain un…
I originally created this report in Crystal Reports 2008 where there is an option to underlay sections. I initially came across the problem in Access Reports where I was unable to run my border lines down through the entire page as I was using the P…
Familiarize people with the process of utilizing SQL Server views from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Access…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…

896 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now