473,387 Members | 1,379 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,387 software developers and data experts.

validationa list box and user input sequence filed

hi to all, this my new post , and i am beginner to access

i am currently facing a problem , i have 2 fields in the a form
( the fields belong to the same table )
field 1 is a list box called [country] and contains a list of country names
field 2 is [number] which is user input
and i cant put a primary key for [number] since a particular country can have numbers from 1 to 40etc
for eg USA it can have sequnce of 1 , 2, 3, etc
and if we take the next country from the list box it can also have any number r from 1,2, 3, etc

now the part what i want to validate is if the country selected and number has already being entered then it should show a error

that is the same country from the list box cant have a duplicate number as its input

please do help me
Oct 31 '07 #1
1 1467
Rabbit
12,516 Expert Mod 8TB
In the before update event of each control, use a DCount to check for duplicates and if there is one, then throw an error and cancel the update.
Nov 1 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

35
by: Will Stuyvesant | last post by:
Here is a question about list comprehensions . The question is dumb because I can do without ; but I am posing the question because I am curious. This: >>> data = ,,] >>> result = >>> for...
24
by: superprad | last post by:
Is there an easy way to grab the Unique elements from a list? For Example: data = what I am looking for is the unique elements 0.4 and 0.9 with their index from the list. Probably something...
22
by: David Isaac | last post by:
Newbie question: I have been generally open to the proposal that list comprehensions should replace 'map', but I ran into a need for something like map(None,x,y) when len(x)>len(y). I cannot...
6
by: karthi | last post by:
hi, I need user defined function that converts string to float in c. since the library function atof and strtod occupies large space in my processor memory I can't use it in my code. regards,...
59
by: Steve R. Hastings | last post by:
So, Python 2.5 will have new any() and all() functions. http://www.python.org/dev/peps/pep-0356/ any(seq) returns True if any value in seq evaluates true, False otherwise. all(seq) returns...
0
by: Greg McAllister | last post by:
After a lengthy search of the KB and forums I have not come up with the answer for this problem. I have also posted this to the WSS newsgroup and hopefully someon has attempted this. We have a...
35
by: erikwickstrom | last post by:
Hi all, I'm sorry about the newbie question, but I've been searching all afternoon and can't find the answer! I'm trying to get this bit of code to work without triggering the IndexError. ...
3
by: janzon | last post by:
Hi! Sorry for the bad subject line... Here's what I mean. Suppose we deal with C++ standard integers lists (the type is indifferent). We have a function f, declared as list<intf(int); Now...
7
by: jej1216 | last post by:
I have a php page that lists the results of a search. I need the same page to be a form that the user can choose one of the rows of data listed to edit. Right now, due to my challenged newbee...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.