Help With Field Validation

Dec 27, 2005

I am creating a database using Access 2000 that requires validation on a date in a field (it is a short date e.g. 24/11/2005). I need to create a validation rule that only accepts Saturdays. I have an algorithm (see attachment) that can turn a date into a number, which relates to a specific day however I do not know how to implement this using access. Any algorithm tutorials, help or suggestions would be greatly appreciated.

P.S. This is my first post so I am sorry if this tread is in the wrong set of topics

View Replies


ADVERTISEMENT

Validation Rules Tying A Field To Another Field

Sep 7, 2006

Hi all. As always, thanks in advance for the input.

I'm building a database of housing developments done by my organization. There are a number of rules that I would like to enforce--many of the rules for data entry in a given field, depend on the value entered in a separate field. For example, if someone enters "Residential" in the BldgType field, then the Affordability field cannot be Null (If they enter "Commercial" for BldgType, the Affordability field CAN be Null).

Similarly, if someone enters "LLC" in the PartnerType field, then the value in the PartnerRole field must be either "Member" or "Managing Member", whereas if they enter "LP" in PartnerType, then the value of PartnerRole must be either "Managing General Partner", "General Partner", or "Limited Partner."

Phil

View 4 Replies View Related

Field Validation

Jun 19, 2005

I have little problem that I am struggling to find an answer to. When I output a piece of data from my text box, it must be either 10 or 11 characters long when it goes into the receiving data base. I just wonedered if anyone knew of a way of validating the text box to ensure that it met this criteria before output. Input mask is not an option, as other receiving databases may not require the validation.

Hope I explained that OK

I'm using Office 2003 by the way

View 4 Replies View Related

Validation Field

Nov 7, 2005

I need a field that has a minum 2 space that must be filled and a max of 4 but not 1 is there a way to create this.

View 1 Replies View Related

2 Field Validation

Sep 30, 2006

I'm doing something wrong, as this isn't working for me.

I have 2 fields on a continuous subform Quanity and Defect_description, if a Quanity of larger than one is entered then a Defect_description must be selected. Defect_description is a combo box.

I put this on the before update of the Defect_description

if [quantity] >0 then Defect_description notnull
msgbox "you entered a quanity - now select a defect description", vbinformation, "Message"
Defect_description.set focus
else
end if
end sub

Please help.....

View 1 Replies View Related

Field Validation - Composite

Aug 29, 2006

Hi

I have a table Orders with fields InvoiceNo And Invoice Series.

I want if of course anyone can help me to Validate the next Invoice Number Not To Be Dublicate and to automatically Increment. Meaning that if Last Invoice number was 45 and Invoice Series is A the next to be A 46. If Last Invoice without Series is 40 the next to be 41, and so on. I can manage to increment the values in one field Invoice number but I can not incoporate the Invoice Series.

Any help would appreciated.

Note : I'm not good in VB so please be kind to me.

Kind regards
John

View 5 Replies View Related

UK Postcode Field Validation

Nov 1, 2006

Hi,

I have a postcode field on a form that allows 8 characters. e.g. ST10 8BY including the space in the middle.
The only validation I have been able to use thus far is the above but I would like to know how to validate two letters (AA) then between 1 and 2 numbers (11) etc.

Is there any code/built in functions that allows this. I know there is an input mask but if I use that, I can set the poscode format up like ST10 8BY but it thinks that the rule has been broken if the postcode was changed to S10 8BY by removing the T. This is also a valid postcode.

Does anyone have any suggestions?

Thanks

View 3 Replies View Related

Table Field Validation

Apr 20, 2005

hi,

instead of providing validation at the client side or in the server script....
cant i provide validation in the tables fields...
I have a field named YearID, datatype text..

But I want to allow only text like this ==>
e.g. 'F-00'
'F-01'

Do I have to put any format property...
please do help...
thank u.

View 1 Replies View Related

Validation In Table Field

Aug 12, 2005

Table field (primary key) data type:Number
How can I validate / symbol as in 05/01 representing year and 1st record, etc.
Many thanks in anticipation.

View 2 Replies View Related

Validation In CustomerID Field

Mar 31, 2006

In a school, a customer ID (in a canteen for example) would be either student administration number or staff initials.... how can i make this customerID field so that it accepts either all numbers (for student admin. no.) or all text with only 3 letters (for staff initials)?


thank you plz reply soon

View 3 Replies View Related

Validation With Money Field

Apr 7, 2005

I had a similar question answered by using the input mask; however, it won't work for this one (money field)

I wish to have a validation rule that shows the dollar amount can NOT be more than 99.99 (or, 2 digits for dollar, 2 digits for cent)

How would I go about doing this? Is there anothe way besides doing an if then response statement?

View 1 Replies View Related

Multi Field Validation

May 25, 2005

Found some great code, else where that perhaps someone else can use.

Each required fields tag property - change to required
Dim blnContinue As Boolean
Dim ctl As Control
blnContinue = True
For Each ctl In Me.Controls
If ctl.Tag = "Required" Then
If IsNull(ctl) Then
MsgBox "Required Information Missing", vbCritical + vbOKOnly + vbDefaultButton1, "You must fill in the x xx xxx xxxx fields"
Cancel = True
ctl.SetFocus
Exit For
End If
End If
Next ctl
Set ctl = Nothing
End Sub

View 1 Replies View Related

Using Validation Rule To Set Field To Required

Feb 11, 2006

How can I use the validation rule to set field to required instead of checking required field, because I wish to customize the prompt message.

Thanks.

View 2 Replies View Related

Validation Rule On Field In A Table

Apr 10, 2007

Hi

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

Help???

thanks!

Maria

View 9 Replies View Related

Validation Rules For Earnings Field

Apr 11, 2006

I've got a table called Employee Payroll.
In it there are several earnings fields. They all have a drop- down box which consists of three values, £2.50, £2.75 and £3.10. Is it possible to make this into a validation rule so that the user can't enter other values?
Thanks

View 9 Replies View Related

Validation Rule In Multi Value Field

Oct 14, 2014

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.

View 3 Replies View Related

Validation Rule For A Month Field

Aug 10, 2011

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.

View 7 Replies View Related

Validation Rule In Table For A Field

Mar 5, 2012

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?

View 1 Replies View Related

Validation Rule In Relation To Another Field Name?

Apr 28, 2012

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.

View 3 Replies View Related

Table Validation Rule - Field Accepts Only A-Z

Feb 9, 2006

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?

View 2 Replies View Related

Access Newbie Question - Field Validation

Apr 9, 2008

I’m trying to create a DB with some field validations. I have a field named ‘Value’ and a field named ‘Doubled’. Value is in a currency format. ‘Doubled’ is in a Y/N format. I want a to create a rule that prevents the value ‘Yes’ from being entered in the ‘Doubled’ field IF the value in the ‘Value’ field is greater than .60. How do I do that?

I entered "[Value]< .6" but that wouldn’t allow me to put any value in the ‘Value’ field – it popped an error every time.

Thanks for helping out a newbie!

View 1 Replies View Related

Tables :: Create A Field Validation Rule?

Mar 25, 2014

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 ?

View 4 Replies View Related

General :: MS Access Password Field Validation

Sep 24, 2013

How to validate a MS Access password text box as criterion below?

(i) At least one uppercase
(ii) At least one lowercase
(iii) At least one number
(iv) Password length 8 - 12

View 1 Replies View Related

Require Field Entry To Be One Of Entries In A Table? Validation?)

Oct 29, 2004

I am using Access 2002 database with ASP.NET(VB). I usually try to get something working in the access 2002 GUI 1st and I am having trouble with creating the code to require that a field entry be forced to be another exisiting entry in another table. For Example:

UNIT_TABLE has fields UNIT_ID(key), and UNIT_NAME having values of:
1 Tigers
2 Bears
3 Sparrows

BATTLES_TABLE has fields BATTLES_ID(key), ATTACKER_MAIN, and DEFENDER_MAIN


I want the ATTACKER_MAIN and DEFENDER_MAIN choices to ONLY be members from UNIT_TABLE.UNIT_NAME

I set up a combobox and lookup in BATTLES_TABLE as follows:
SELECT UNIT_TABLE.UNIT_NAME FROM UNIT_TABLE ORDER BY UNIT_TABLE.UNIT_NAME;

this OFFERS the CHOICE of any of the 3 clans (ie Tigers, Bears, Sparrows)

but I cannot not FORCE the USE of these....because the end user can option to enter in anything else.(which is not wanted).

How do I add SQL to the LOOKUP such that... the user can ONLY choose to enter text that EXACTLY matches an Already existing entry in the UNIT_NAME field?

I tried to enter a validation rule:
[ATTACKER_MAIN] In ([UNIT_TABLE.UNIT_NAME])

I get an error that the field 'UNIT_TABLE.UNIT_NAME' does not exist.

Thanks for any help with this validation problem.
HKP_MACK

View 3 Replies View Related

Tables :: Validation Rule To Change Field To Alphanumeric Only?

Dec 6, 2013

What would I need to enter into the validation rule to change the field to alphanumeric only?

View 3 Replies View Related

Queries :: Data Validation Of A Field In Existing Table

Aug 13, 2015

I'm trying to write a query that will validate a field in an existing table. I want the query to show where any of the 412,000 records fail this strict validation:

AAnnnnnnA

...where A is any letter A-Z and n is a digit 0-9

Clearly I can use the LEN function to check for invalid lengths (anything <>9), but I'm looking for a simple neat expression I can use that will check the format. Does an existing function already exist before I resort to writing my own function in VBA (again)?

View 7 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved