473,383 Members | 1,716 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

Table Validation

Hi All,
I have a small problem which I have so far been unable to solve. I am
working on someone else's database which needs to ensure that certain fields
are filled in if the value of other certain fields values are not null.

Sounds simple enough however, I need to apply 2 validation rules to the same
table.

Both validation rules separately are:

([return or refused] Is Null) And ([vehicle spec] Is Null) And ([QC
problem] Is Null) And ([late] Is Null) And ([DNA] Is Null) And ([mixed
loads] Is Null) And ([extra deliveries] Is Null) And ([VCP's] Is Null)
And ([barcode/swing ticket] Is Null) And ([box end label] Is Null) And
([set labels] Is Null) And ([shrouds] Is Null) And ([Boxes] Is Null) And
([hangers] Is Null) Or ([ref] Is Not Null)
([return or refused] is null) or [qty_refused_or_returned] is not null)
Is there a way I can combine the 2 together without having to re-design the
database structure which I would prefer not to do?

TIA,

Mark

Nov 13 '05 #1
1 1649
Depending on the number of the fields and the order of them (tab
order) on the form, you could do an after update event that when one
field (field0) is typed in, set the focus to the next field (field1),
then do an after update (or maybe a different event, i forget which
one) that when they try to leave that field (field1), it will check if
it is null, and set the focus back to the field (field1) again, in
essence, not letting them leave the field until it isn't null.

That may be frustrating for your user(s) though. I'm sure someone
else will probably have a better idea.

What about setting the table so those fields don't allow nulls or zero
length?
"Mark" <ma*********@ntlworld.com> wrote in message news:<wM************@newsfe4-gui.ntli.net>...
Hi All,
I have a small problem which I have so far been unable to solve. I am
working on someone else's database which needs to ensure that certain fields
are filled in if the value of other certain fields values are not null.

Sounds simple enough however, I need to apply 2 validation rules to the same
table.

Both validation rules separately are:

([return or refused] Is Null) And ([vehicle spec] Is Null) And ([QC
problem] Is Null) And ([late] Is Null) And ([DNA] Is Null) And ([mixed
loads] Is Null) And ([extra deliveries] Is Null) And ([VCP's] Is Null)
And ([barcode/swing ticket] Is Null) And ([box end label] Is Null) And
([set labels] Is Null) And ([shrouds] Is Null) And ([Boxes] Is Null) And
([hangers] Is Null) Or ([ref] Is Not Null)
([return or refused] is null) or [qty_refused_or_returned] is not null)
Is there a way I can combine the 2 together without having to re-design the
database structure which I would prefer not to do?

TIA,

Mark

Nov 13 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Bob | last post by:
I have a form with controls City and Zip Code, and a Table containing Zip Code with the corresponding City. I would like the user to just enter Zip Code, either by typing or with a combo box; then...
18
by: Steve | last post by:
Hi I have a really weird problem and any assistance would be welcome. I have developed an app in Access 2002. The app runs perfectly on the development machine. I have packaged the app using...
2
by: Kostas | last post by:
Just a quick question on this issue. Assume a small set of fixed values for a field. For instance Field Gender, values: Male, Female, Unknown If I create a Combo Box with the above values, I...
0
by: aeshtry | last post by:
Hello dear friends I have an urgent question. Would you please give me your professional idea? I have an html table containing the ASP.Net validation summary and an ASP.Net label control. The...
28
by: Giggle Girl | last post by:
Can someone show me how to insert a row at any given row index of an already created table? It only has to work in IE6 (used on intranet at work). Specifically, if a table is 20 rows in total...
9
by: campbellwarren | last post by:
Does anyone know how I could limit the number of rows allowed in a MS Access table... want to limit it to 1.
1
by: Rahul | last post by:
Hi, I tried many option, but did not found solution. Same Validation Error showing. If I have convert one table, it can easily converted. But If I have paste another table in same file, then...
10
by: gweasel | last post by:
What is the best way to apply a Validation Rule - or rather, where is the best place to put it? Is there an advantage to putting it on the field in the table vs setting the validation rule on the...
3
by: G. Miller | last post by:
Hey, I've got what seems like a simple question, but I've been wrestling around with it for way too long. I've got two fields in a table named and . I don't want the user to be able to enter a...
6
by: Ledmark | last post by:
Hello - I am in a class for Access 2007 Database apllication design and we are covering types of Validation rules. We have a problem that I'm trying to solve but have no idea how to go about writing...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.