Current location: Hot Scripts Forums » Advertising Forums » Job Offers & Assistance » Data validation code needed for MS Access


Data validation code needed for MS Access

Reply
  #1 (permalink)  
Old 11-27-07, 11:27 AM
Harlequin Harlequin is offline
New Member
 
Join Date: Nov 2007
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Data validation code needed for MS Access

I must start this posing by making the point that I am NOT a VB programmer. I can program in a number of languages (Java, Javascript, PERL,PHP and TCL) but have never actually learnt VB so my request is that you bear this in mind if you plan on replying to this post.

My request for help is as follows:

I have an MS Access database in which one of the tables within it contains two date fields called "StartDate" and "EndDate" respectively. The table in question is designed to hold entity specific data on conferences hosted by a training company. Each row in the database contains a new record (entity instantiation) of a specific conference hosted by the training company.

The field names are self-explanatory in that the StartDate refers to the date at which a conference started/starts and the EndDate fields refers to the either a future date when the conference will end or when it ended some time in the past. The problem I am having is that I need to apply validatory constraints to both of these fields that are not easily achieved with the application and so therefore I suspect that I need to resort to some VB code.

To be clear, there are cerrtain rules that I need to apply (constraints) to these date fields to ensure that that any values entered via a conrresponding entry form for a completely new or existing record do not violate these rules. The rules are:

START DATE:

- The value entered cannot be today's date - i.e, it must be greater than today's date and therefore some date in the future.

- The value entered can't be after the value entered in the end date as this mean that in effect a conference could never start.

END DATE:

- The value entered cannot be today's date - i.e, it must be greater than today's date and therefore some date in the future.

- The value entered cannot be before the value entered in the start date field as this would imply that the conference had already finished and all data about conferences will always be entered into the database before the actual start of a conference.

I do not know whether I can utilise code that will operate at the design view level or whether it can operate only via a form but either way, I hope what I'm trying to achieve is clear. The question this is how to do this.

Any ideas with an explanation as to how the code works, would be very gratefully received.

-
-
Reply With Quote
  #2 (permalink)  
Old 11-29-07, 09:53 AM
digioz's Avatar
digioz digioz is offline
Community VIP
 
Join Date: Oct 2003
Location: Chicago, IL
Posts: 2,171
Thanks: 3
Thanked 9 Times in 9 Posts
Thread moved to Job Offer & Assistance. The Visual Basic Forum is to answer specific programming related questions, not a place to request people to do your homework. You have to at least put forth an effort before anyone will be willing to help. We are not going to code this for you, this is simply not how things work around here.
__________________
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
valid code needed munricer Job Offers & Assistance 0 12-25-03 12:04 AM
php code not pulling data from DB simone PHP 1 11-22-03 02:08 AM
Code validation and cleanup program mdhall Script Requests 1 11-12-03 02:53 PM
importing data from MS Access to Excel using ASP craigger1 ASP 1 08-05-03 03:11 PM


All times are GMT -5. The time now is 12:59 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.