Using expression in table field

malaydash

Registered User.
Local time
Tomorrow, 00:48
Joined
Jan 18, 2010
Messages
43
I want to use an expression in one of my table field to limit the value that can be entered in the field. Actually I want an expression which compares the data in the mentioned field with another field in some other table & should allow only value less than or equal to the compared field & shows an error message if somebody enters a value more than that. I have used an expression in the design view of the table field as "<=[other_table_name].[field_name]. I also typed the error message. But i am not getting the result as expected. Please help.
 
I want to use an expression in one of my table field to limit the value that can be entered in the field. Actually I want an expression which compares the data in the mentioned field with another field in some other table & should allow only value less than or equal to the compared field & shows an error message if somebody enters a value more than that. I have used an expression in the design view of the table field as "<=[other_table_name].[field_name]. I also typed the error message. But i am not getting the result as expected. Please help.


You should use a query to facility this need rather than at a table side.

Trevor
 
Dear Trevor G

Thanks for ur suggestion. But I think it wont solve my problem if I use a query, because I need to enter data on a daily basis on the mentioned table.

Actually I need to enter the dispatch qty for every shipping & I want the dispatch qty should not be more than the Balance Qty (i.e. Order qty-Already supplied qty).

I hope u understand what I am saying.

Please help
 
You should be using a form to enter data. You can then use the form's BEFORE UPDATE event to validate that data BEFORE it writes to the table. Tables should really not be worked in directly.
 
Thanks SOS for your suggestion. But it will be more helpful if you elaborate a little about the procedure for data validation. B'coz frankly speaking I've not used a form in my database.

Regards
 
Dear SOS
I went through the link provided by you. But I didn't understand it a lot. As I am new to access, it will be helpful if you elaborate a little "BEFORE UPDATE" & "DATA VALIDATION" in a form.

Thanks a lot in advance.
 

Users who are viewing this thread

Back
Top Bottom