473,387 Members | 1,465 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.

How to prevent the overlapse range entry ?

chinfk
15
Hi There,

I hav a entry said order serial no from 001 - 700, in the QA approval entry for this range no could be partial.

Less said 1st lot - (001 - 100), 2nd lot - (300 - 420) and so on.
How to prevent user to key in 050 - 070 or something are in within the previous entry ?

I had manage to limit the entry from 001 - 700, but in between that overlapse is had to control.

Any suggestion on control this? Thanks in Advance. =)
Oct 24 '07 #1
7 1628
FishVal
2,653 Expert 2GB
Hi, there.

Take a look at Iif query thread.
The question there was just the same but with time intervals instead of your's numeric intervals.

Regards,
Fish
Oct 24 '07 #2
chinfk
15
Hi Brother FishHal,

Thanks for your helps and i have modify to what my program needs, it works definitely.

Thanks and wish you have a nice day ya!
Oct 24 '07 #3
FishVal
2,653 Expert 2GB
:)

Glad you've got it work.
Have a nice day too, and all subsequent days even more nice.

Best regards,
Fish
Oct 24 '07 #4
chinfk
15
Hi Brother Fish,

There is the loop hole in my program which it can detect the overlapse range
But for the value that smaller or larger than the current range of data, it can't
allow that.

My code as below:

If DCount("[ID]", "Temp-QA2", "((str(SN) > " & .SN & " And str(SN) < "
& .EN & ")

OR (str(EN) > " & .SN & " And str(EN) < " & .EN & ")
OR (str(SN) <= " & .SN & " And str(EN) >= " & .EN & ")) <> 0 ") Then
Me.Undo
Me.SN.SetFocus
ValidateSerialNoSlot = False
ElseIf DCount("[ID]", "Temp-QA1", "((str(SN) < " & .SN & "
And str(SN) < " & .EN & ")
OR (str(EN) < " & .SN & " And str(EN) < " & .EN & ")) > 0 ") Then
ValidateSerialNoSlot = True
End If

Let said the order range is from 001 - 700.

1st line item - 005 - 100
2nd line item - 001 - 004 ( cannot key) or 101 - 300 ( cannot Key also)

But if 2nd line item - 006 - 099 ( it detect error = false)
- 004 - 099 ( it detect error = false)
- 003 - 099 ( it detect error = false)

Please help to look into my code why it cannot allow to key value that
smaller or larger than the current set of data,

Thanks very much in advance. =)
Oct 25 '07 #5
FishVal
2,653 Expert 2GB
Hi, chinfk.

You don't need to convert table field numerical value to string in order to compare it with TextBox.Value. TextBox.Value property returns Variant type variable.
Moreover if you convert table field value from numerical type to string comparison rules change to those for strings (char by char comparison from left to right until operand1 char <> operand2 char).

Example:
123 > 98 = True
but
"123" > 98 = False
"123" < 98 = True
Oct 25 '07 #6
chinfk
15
Hi Brother FIsh,

The order no range will consist of alphanumeric value, so i had to string it else will get data type mismatch error.
Oct 26 '07 #7
FishVal
2,653 Expert 2GB
Hi Brother FIsh,

The order no range will consist of alphanumeric value, so i had to string it else will get data type mismatch error.
?

Plz, translate it to English. :)
Oct 26 '07 #8

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

Similar topics

5
by: phil_nospam_schmidt | last post by:
I am trying to prevent a user from resizing a frame beyond its "natural" size as given by winfo_reqwidth and winfo_reqheight, without any success. Can anyone make any suggestions, based on my code...
1
by: Job Lot | last post by:
In a multi-user environment, how would I prevent users from adding Orders with identical OrderID. For instance I have following tables in my database Order ================== OrderID Identity...
3
by: Randy | last post by:
I want to set up a table where I can enter dates that will prevent data entry of Dates in the Main table. I have done this in Approach by linking two tables and setting up a validation formula...
6
by: anoj | last post by:
Hi All i need to prevent multiple logins from the same user at the same time. what is the best way to do this . How can i detect if a user closes the browser window without logging out so tht...
14
by: Ed Jay | last post by:
On a multi-textbox form, linked to an external js, I use onBlur to call: function chkNum(cellname) { var str = document.getElementById(cellname).value.toString(10); if (str < 28 || str > 36)...
11
by: bill | last post by:
I dynamically create buttons and associate them with an event using AddHandler. I want all the button events to fire at one time, when the page is posted, instead of when each button is clicked....
16
by: lisa.engblom | last post by:
I have two semi related questions... First, I am trying to output a list of strings to a csv file using the csv module. The output file separates each letter of the string with a comma and then...
0
by: hime | last post by:
Hello I have a data entry web App. form. the login page for this form depends on checking whether the user name and password exists in the data base or not only; which means that I didn't use...
1
by: chicago1985 | last post by:
I have a unique constraint in my Oracle table for 3 fields. If I enter duplicate info on the table using Oracle client I will get an Ora message error ORA-00001 that tells me it is a duplicate entry...
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:
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
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...
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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.