Tables :: Set Validation Rule For Unit Field In Design View
May 1, 2013
I have two tables in Access 2010:
Tbl1 - Abbreviations: with fields (1) "Abbreviation" and (2) "Definition"
Tbl2 - Piping: with multiple fields one of which is "Unit"
In Design View of Tbl2, I'd like to set the "Validation Rule" for the "Unit" field so that it is restricted to values in field 1 of the Abbreviations Table (i.e. one of the listed abbreviations").
I tried variations of "[Tables]![Abbreviations]![Abbreviation]" in the "Validation Rule" portion of the Design View for Tbl2 (Piping) but, couldn't get this to work.
I want to create a field validation rule that requires the user to input a policy number in a standard format. The format has a fixed length of 13 with three underlying components. The first 3 digits identify coverage, the next 7 are the policy number and the final three must always be "-00".
Example: GLO1234567-00
Is it possible to create a validation rule for this ? If so, can you provide the code based on the simple example above ?
Basically in my order details table i have the following fields
Product Unit Size
At the moment i have the Product field with a dropdown that gives me all the products from my ProductT. But once i choose the correct product in the unit field it gives me all the possibilities of every product not just the units associated with that product. ie
ProductT Grasshopper Box1000 Adult Grasshopper Box1000 Subadult Worm 10pz Big
When I select the grasshopper product and move on to the unit field i also get "10pz" option but this is not a product available.
How do i set up validation of the fields Unit and size based on another fields data?
I am building a scoring system for an Archery Tournament and am trying to add some extra validation between two fields.I want to check the contents of one field against another.So if Field A has an even value, then Field B must also be even, and if Field A has an Odd value, Field B must be odd.Would it also be possible to add an exception such that if Field B = 0 then the validation rule does not apply?I am only a very occasional user of Access, and don't have a very good grasp of the code structure in it, but am prepared to try and learn.
I cant figure out a fairly simple IIF statement I need for a table validation rule. I'll try to explain:
I have 2 fields in a table that are controlled through a form, which sets the fields either true (-1) or false (0). Lets call them Field1 and Field2. These fields need a validation rule which is dependent on FieldX and FieldY.
When FieldX = FieldY, I need Field1 to be either 0 or -1
if Field1 is 0 -> Field2 is -1 and the other way around.
I have a form which people fill in (made up of fields from Table1) to record when sick days.
On the form, they have to enter the "week commencing" (which is set at Medium Date format); then they have to enter in a first day (which is set at Short Date format).
The First Day should be no more than 7 days from the date that they enter in the Week commencing field on the form.
I want an error message to pop up if they do this, for example:
Week commencing: 1st April 2007 First Day: 10th April 2007
(because the 10th April 2007 is more than 7 days from the 1st April). But it would be ok if they did this:
Week commencing: 1st April 2007 First Day: 8th April 2007
I created a field in access 2010 called OptionalSubjects . It is a multi value field where a user can select multiple values from the combo box, the selection are ID from a query. Now i want to limit the user to only two selection from the multiple values available and not less than two. So the field is either NULL or two selection only. How can I achieve this in validation rule or vba.
In the forms for my database, I require the user to input a month and year. Due to how the reports are structured, I need the format of the month and year to be very specific. I tried to set the format as 'mmmm yyyy' however even though it is visibly displayed as this, in the table, the values are still stored as sometimes 6/1/2011 or June 2011 and Jun 2011, which in Access' eyes are two different values.
In the report, it will display June multiple times because of this format discrepancy. I am trying to create a validation rule to ensure the user will enter the month and year in the correct format, but how to go about writing the expression.
This is pretty simple but I need to place a validation rule in my table for a field so that users can only enter data that starts with APB. What would the rule be?
How to create a validation rule in relation to another fieldname in the same table?
For example, the first field line is the serial number, and when something is entered for the serial number the OTHER field line (which is quantity) needs to be 1, otherwise it stays blank.
I use access 2007 or 2010 depending what computer I'm using.
I am wanting a text field in a table to accept only chars A - Z
In my validation rule I use
Like "a" Or "b" Or "c" Or "d" Or "e" Or "f" Or "g" Or "h" Or "i" Or "j" Or "k" Or "l" Or "m" Or "n" Or "o" Or "p" Or "q" Or "r" Or "s" Or "t" Or "u" Or "v" Or "w" Or "x" Or "y" Or "z"
Which works :D
Then validation text I use
Enter Alphabetical Letters only
Also works :D
Is there any short way to write Like A.....thorugh to Z without the long statement?
I am trying to create a validation rule whereby If a box is checked it makes sure that before saving and moving to the next form several, though not all fields are valid.
Ive tried many variations of:
([x] Is Not Null) OR ([Y] is Null) And ([x] Is Not Null) OR ([Y] is Null] etc etc for the fields I need covered.
Either the rule doesnt work at all or else all data input is invalid!
I have a table called NewTransactions_tbl that I have been using for some time. I am trying to add a new field called CustomerProjectNumber. It's not being displayed when I look at the table view. I've attached an image showing the settings for the field. I am probably missing something obvious.
I'm looking for a keyboard shortcut to expand the columns in "design view" of a query.
What I mean by this is rather than selecting all of the columns and double clicking to see the entire text, I'd like to be able to a shortcut.
The entire process as I see it involves 3 steps so I will need thesolution to the 3rd step.
(1) [ctrl+spacebar] to select initial column (2) [shift+arrows] to select all of the columns I need (3) [keyboard shortcut] will expand all of the columns "field" names to the size of the column heading
Alternatively, if you know of a shortcut that will expand the columns without having to select them first I'll take it!!
I have created a database table with 100+ fields with data. I now need to insert an additional 33 fields that will have a static default value between 1 and 33. I have already inserted the Line # field in the table between every 6 fields and gave it a default value. I now would like the existing database to update and reflect the new changes that were made for the new inserted fields.
I am making a new Record in the design view of a table (creating a new field in the table), and I am assigning it a date type, is there a hotkey that will select the field properties sheet so that I can select the format of the field without having to move my mouse?
I am trying to hardcode in the field name. This is what I want to hardcode "TEXT(ROW(A17),"-0")" but the parenthesis and quotation marks are causing a syntax error. It appears like this