Free Advertising Forums | Free Advertising Board | Post Free Ads Forum | Free Advertising Forums Directory | Best Free Advertising Methods | Advertising Forums

Free Advertising Forums | Free Advertising Board | Post Free Ads Forum | Free Advertising Forums Directory | Best Free Advertising Methods | Advertising Forums (http://www.freeadvertisingzone.com/index.php)
-   FFA's and FFA Blasters Directory (http://www.freeadvertisingzone.com/forumdisplay.php?f=62)
-   -   Use a validation rule instead of the Required pro (http://www.freeadvertisingzone.com/showthread.php?t=1241575)

05-22-2011 12:00 PM

Use a validation rule instead of the Required pro
 
Reader Stefan Masic provides today's Power Tip. When you want to require users to enter a value in a field, a common technique is to set the Required property for that field to Yes (for example, tabPerson.Name.Required = Yes). However, when the user is then adding records to the table and neglects to insert value in that field, the built-in error message that appears is not very helpful: "The field <TableName>.<FieldName> cannot contain Null value because the Required property is set to True. Enter a value in this field." This error message is not appropriate for typical users, whether it's in English or any other language. Instead, I use another simple approach when building table properties: Set Table.Field.Required = No Set Table.Field.Validation Rule = IS NOT NULL Set Table.Field.Validation Text = The value in field <Caption of field name> is required. Enter a value or select it from the list. In this way, you can provide more specific information and helpful hints about how to enter the correct data, rather than just a "required" message. Note: When converting an Access table into SQL Server we must consider this design and set this table property manually. Send your Power Tips to Mike & Chris at accpower@microsoft.com. <div


All times are GMT. The time now is 12:23 PM.

Powered by vBulletin Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Free Advertising Forums | Free Advertising Message Boards | Post Free Ads Forum