Record Validation

Feb 20, 2007

Hi,

I have a table of associates, that have two important details stored about them: CRB Number and CRB Issue Date. Not all of the people need to have a CRB check (so won't need to store either the number or the date), however some do.

What I want Access to do, is to validate at record level- so that Either both those fields are Null or both the fields have data stored in them. e.g. you can't have data stored in one, but not the other.

I'm very new to Access and am doing it as part of a school project and our teacher is useless so I was wondering if anyone could give me a hand.

I've tried:

"[CRB Number] AND [CRB Issue Date] Is Not Null OR [CRB Number] AND [CRB Issue Date] = Null"

but to no avail.

Thanks

View Replies


ADVERTISEMENT

Record Validation

Dec 4, 2007

Hi all,
I have some knowledge about VBA and interested to use MS access form as an interface to SQL SERVER 2000.

We have a data entry process called validation.

It starts by
1.Create a new record typing the data and saving the record.
2.And then create a new record again and type the same data and validate it field by field against the first record to making sure the correct data has been entered.
3.If any unmatched data was found, then popup a dialog box informing the user with the filed name and wrong data.
I hope that I explained it clearly.
So, is this possible in MS Access?

Thanks for any help.

Abrahim

View 13 Replies View Related

Existing Record Validation

Feb 7, 2005

I have a TSQL procedure written which validates if a record already exists. It returns a 1 or a 0 depending on if it finds a valid record based off a supplied paramater (an application ID in this case, stored as Text(14)).

I want to accomplish the same thing but in a standalone Access DB where I don't have access to SQL stored procedures. Basically, here's what I have:

frmInputNew contains a text box txACAPS. When a user enters in a number in the txtACAPS field, and tabs out, I want an event to run which checks that string against a table. If the string exists within a field in the table, I want to break out and open a new form (which will be a dialog box). If it doesn't exist in the table, I want to end the code and let the user continue entering in data.

I'm not entirely sure how to check a table for a value via VB and return a flag that I can form an IF/ELSE statement from. Any help would be appreciated.

View 11 Replies View Related

Validation: How To Stay On The Invalid Record

Jul 24, 2007

I have a problem with validation attached to a field or an entire record (displayed via a form) in that, if the user exits that field/record by moving to the next Access record, when the message comes up, it is this next record that is displayed, not the invalid one. This is confusing.
My users usually use a filter when updating (sorry about the alliteration!) & this mostly displays just the one record out of thousands. When they remove or change the filter, the message is, as above, displayed over the wrong record.
Ideally, I prefer the entire, quite complex record to be validated at one 'go' as many of the fields are interlinked.
I have achieved this, sort of, with a button called Validate which the users are supposed to click when they have completed adding or updating a record. Most of the validation code is attached to this & it does keep them on the right record. However I can't make them click it.
I have tried controlling the record displayed by making the record pointer go back one or forward one when an error is found but this causes problems with the first/last record in the table or filtered results.
Each record has an unique number. I have tried storing this number & coding a filter to re-display it when an error is found but this is confusing when the users were not filtering to only one record. Also it only works once. If further errors are found, the application gives up.

View 2 Replies View Related

Forms :: Data Validation After Record Input

Dec 17, 2014

When I learnt to use vba in excel (to basic level) I was always advised in a userform to validate data at end of record input i.e. when pressing enter and next. Is this true also with access or should i be putting validation rules at the afterupdate stage of a particular control?

View 1 Replies View Related

Modules & VBA :: New Record Validation - Insert Date Only If ID Is Not Null

Oct 2, 2014

If a new record is created, insert date only if customerID is not null

Private Sub Form_Current()
If "CustomerID", "TblDietPlan" = <> 0 Then
If Me.NewRecord Then Me.MealDate = DMax("MealDate", "TblDietPlan")
End Sub

View 1 Replies View Related

Validation

Apr 25, 2005

how can i validate a field so that the data entered must be between the values of 1 and 10?
thanks in advance

View 2 Replies View Related

Validation

Dec 4, 2006

I have a table called Inspection, there are two fields:

- Damage To Property // data type is Yes/No
- Damage Comments // data type is text

How would i go about setting the validation - if Damage To Property is data type "No", disable the "Damage Comments" field. (ie grey it out).

any help would be greatly appreciated..

View 5 Replies View Related

Possible Validation

Apr 18, 2007

Hello!

Can someone tell me how to do a validation. The one I am trying to do is check Track No is not duplicated.

I have added my database if you may need it.

Can someone help me please!

Thanks

View 1 Replies View Related

Validation Or VB

Feb 7, 2005

Hey peeps,

I have a problem. I want my field to become "[field], An " etc. when I type "An [field]" For example, if I type "The Hundred Years War" for the field, it automatically updates to "Hundred Years War, The". I would be happy with a simple validation rule that prohibits the use of "The, A or An" in the beginning of the field but i don't think that is posibble. If this requires VB, I don't know how to use the language and never worked with it. I am completely a novice in VB, but would still love to learn how to make it. :) If you could start me out then, I would appreciate it greatly. :D

View 1 Replies View Related

Validation Help

Mar 30, 2005

Hi im new round here but am working on a database and sum of the validation rules are confusing me now.

Ok i got a couple of things to ask:

1) What rule do i use to make sure only text is entered into the field, i cant use input masks as the size of the text put into the field will vary, as its names of people.

2) Is there a way to check that all the fields on a form have been entered? So if there not all entered an error appears?

3) Finally, is there a way to reset Autonumbers? or do i have to delete all the records and start frm scratch as my autonumbers have gone abiit crazy as sum records have been deleted so my table looks rather strange.


Thank you, help greatly appreciated :)

View 10 Replies View Related

Validation

Apr 14, 2005

Need a a validation rule to allow only "a" or "p" to be entered as data into the relevant fields, can someone help?

View 2 Replies View Related

Iif In Validation

Oct 11, 2005

Is it posible to use a iif statment in a validation statment ?
i have one table project and i want to check the occurens.

IIF ([ProjectStatus] = 1 ,[ProjectCompletedDate] = NULL, [ProjectCompletedDate]<> NULL)

when the projectstatus is 1, the date cant be filled in.
is this possible in access ?
or can it only be done form based?

thanks for the reply :)

View 5 Replies View Related

Validation Help

Dec 7, 2005

I have 2 fields called confirmed and paid.

I want to have a validation which will only allow confirmed to be clicked when paid is selected. I put this validation "Confirmed"<"Paid" in the properties part of the table but it doesnt work.

Can anyone help?

View 4 Replies View Related

Validation Help

Jan 21, 2006

Hello,

For my Year 12 Computing course, I need to develop a database which will take bookings for a village hall. The database consists of a Bookings Table, a Customer Data Table and a Hiring Cost Table. It is in the Bookings Table that I am having the most trouble.

I believe I have already solved my double booking dilemma by making the Date of Event and Type of Event fields in the Bookings Table into a composite key, thereby prohibiting the entering of data where Date of Event and Type of Event are the same, making them unique.

Here is my main problem at the moment, I need a validation rule on the Date of Event or perhaps the Date of Booking field which means a booking must be made at least a week, and no more than two months in advance of the date of event. The thing is this validation rule is only needed for occasional bookings. Present, again on the bookings table is a Booking Type field which has a lookup consisting of the following “Regular” and “Occasional”, regular meaning bookings that are made at the start of the year, for the whole year.

Ideally, I would like to have it so that when the booking type field is set to regular, the validation rule for the date isn’t needed, and when the booking type field is set to occasional, the validation rule for the date is needed/present.

Could anyone help me with this? As any help would be much appreciated.

Many thanks
Daniel

If anyone would like any screenshots of the Bookings Table, email me at daniel_goodman@hotmail.com

View 1 Replies View Related

Validation

Mar 12, 2006

How can I set validation for a text field where I restrict the number of characters? For example, if I only want the user to be able to input 12 characters or less, and more than one. >=1 And <=12 would that be correct?

View 1 Replies View Related

Age Validation

Sep 19, 2006

Hello!

I'm really new to Access and need help with a validation rule

Right, i have a 'Date of Birth' field and what would the validation rule be if i only want people over the age of 12 to be able to go any further?

I've tried various other rules found online but some just don't work...

Any help would be great!

Thanks

View 4 Replies View Related

Validation

Dec 5, 2006

Hi all, Very new to using ACCESS. I am trying to set a validation criteria to ensure that a postcode is imported correctly. An example of a UK post code is SP10 3PB - it may be entered as SP103PB. I need to set a validation criteria to allow either two. What is the format of the criteria to achieve this? Any clues please. Thanks Mike

Are there any useful sites that set out examples of validation criteria?

View 1 Replies View Related

Age Validation

Apr 29, 2007

Hi

I have a field for date of birth, however I want to make sure that the person is older than 17.

This is what I have at the moment but it doesn't seem to work:
<=Date()-6720

So what's the best way to do it?

Can you help me?

View 2 Replies View Related

Validation Help

Apr 9, 2005

Hello,

I am currently making a system for a sports centre and I need some help, I have created several forms one of which is for the coach's details.
On the coaches table we have a combo box which has all the different qualifications in it, we have 5 of these boxes but we want to it so that when one has been entered it cannot be repeated in the other boxes, also we want it so that when level 4 Tennis has been entered - levels 3,2 and 1 cannot be entered.

Any help on this would be great,

Pam

View 4 Replies View Related

Validation

Dec 14, 2005

Hi Guys,

I need to set validation rule on a field. I have done the the below:

Private Sub Form_BeforeUpdate(Cancel As Integer)

If IsNull(Me.SlideType) Then
MsgBox "You have not entered SlideType!", vbExclamation + vbRetryCancel, "Incomplete Form!"
Cancel = True
Me.SlideType.SetFocus
End If

It works fine, but I cant get it ignore it if I press cancel. Sometimes this data is not available so it has to stay empty. When I press retry it should take me to that field to make changes and with the cancel click it should allow me continue with the last command/action before the msgbox was brought up. Can anyone please help, thanks.

View 1 Replies View Related

Validation

Jun 21, 2006

Hi, does anyone know how to set fields(como-box) on a form to pop up a validation message when form:confused is attempted for saving without any data selected on the field. I have 5 fields and I wanted my users to get a message for each when left empty...help please:confused:

View 1 Replies View Related

Validation

Nov 21, 2006

Hi,

i have a form that requires validation. i am using the following code:

Private Sub Form_BeforeUpdate(Cancel As Integer)

If IsNull(Me.number) Then
MsgBox "number is required", vbOKOnly
Cancel = True
Me.number.SetFocus
End If


i have repeated the above code for other fields.........

The problem i have is, if i click 'x' and before it allows me to exit, it brings up the validations, one by one (so annoying).

Is there any way THAT it can show all the validations at once??? in one message????

THANKS

View 7 Replies View Related

Validation

Nov 27, 2006

Is there a way to set up validation so that:

1: The system will not allow a car already hired, to be hired out again

I have a loans form, but i've noticed that, it lets me hire out any car, even cars that are already hired out.

any tips on how to set up the correct validation?

cheers guys

View 9 Replies View Related

Validation

Oct 3, 2004

How do make a validation rule where a statement is not allowed to appear more than 5 times?

View 1 Replies View Related

Need Help With Validation

Jan 16, 2005

hey....

wat would i enter as a validation check if i wanna
make sure that all the data entered has its first letter
ranging from only A to G....
i need help urgently ....
thanky

View 1 Replies View Related







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