Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access VBA
| Search | Today's Posts | Mark Forums Read
Access VBA Discuss using VBA for Access programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old August 29th, 2008, 05:59 AM
Registered User
 
Join Date: Aug 2008
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Need help with a validation rule

Hi, I'm a Access/VBA newbie and hit a problem while doing a project.

I'm building a table right now for 'product types', and each type can, but not necessarily has to, have a reserved range of 'drawing numbers'. So basically 3 fields: type, starting number, end number.

My problem is when I want to enter a new product type via a form, I have to make sure that the range entered for the new record does not clash with any other record.

E.g. Record A reserved 10000<x<20000, Record B reserved 20000<x<30000, so a new record C cannot have either the starting or the end drawing number in any of these ranges.

The catch is sometimes there might be gaps in the reservation. So say A reserved 10000<x<20000, B reserved 40000<x<50000, C can reserve any range within 20000 - 40000

Anyone have any idea how to go about this? Any help is appreciated

  #2 (permalink)  
Old September 3rd, 2008, 09:42 AM
Friend of Wrox
Points: 4,007, Level: 26
Points: 4,007, Level: 26 Points: 4,007, Level: 26 Points: 4,007, Level: 26
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Lansing, Michigan, USA.
Posts: 1,151
Thanks: 2
Thanked 14 Times in 14 Posts
Send a message via ICQ to SerranoG Send a message via AIM to SerranoG
Default

Welcome to P2P! A couple of questions:

What about those EQUAL to 40000 or 20000? You have
only stated those LESS THAN.

Are those ranges preset? That is, can someone choose 10231 to 20231 or are they locked into groups of 10000 starting from 1 to 10000, 10001 to 20000, 20001 to 30000, etc.?


Similar Threads
Thread Thread Starter Forum Replies Last Post
Biztalk Server Rule development query Hariharan Anbarasu Biztalk 0 December 6th, 2007 12:19 PM
Chapter 8: Please insert HIW end rule. nclibrarian BOOK: Beginning Ruby on Rails 1 July 24th, 2007 11:58 PM
Create a validation rule sheregardner Access 1 October 24th, 2006 07:00 AM
Writing Rule Problem gaurav_jain2403 SQL Server 2000 5 August 3rd, 2006 12:51 AM
CSS2: Horizontal Rule Has 1px Border in IE??? kwilliams CSS Cascading Style Sheets 4 April 27th, 2006 09:53 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.