473,383 Members | 1,952 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.

Access 2007 Date Validation Test Not Working

I am trying to get access to run this VBA code after the manufacture date is entered. the code should populate Legacy or New depending if the product was made before of after 1/31/08.
My code is acting like it is not running and I can't get access to break at the if statement for debuging. Am I doing something wrong?

Expand|Select|Wrap|Line Numbers
  1. Private Sub Manufacture_Date_AfterUpdate()
  2. If (Me.Manufacture_Date > #1/31/2008#) Then
  3. Me.Legacy_Or_New = "New"
  4. Else
  5. Me.Legacy_Or_New = "Legacy"
  6. End If
  7. End Sub
  8.  
Aug 11 '08 #1
4 2025
janders468
112 Expert 100+
Does it break any where in the code? I.e. is the event being fired?
Aug 12 '08 #2
RuralGuy
375 Expert 256MB
Do you open the db while holding down a <SHIFT> key? That should help.
Aug 12 '08 #3
missinglinq
3,532 Expert 2GB
Do you have any VBA code in the db that runs? I ask because your code looks valid. In 2007, no code will run unless you've declared the folder your app resides in as a "Trusted" location. To do this:

Click the "Office" button in the upper left,
Go to Access Options/ Trust Center
Add the folder holding the db to the list of trusted locations.

Welcome to Bytes!

Linq ;0)>
Aug 12 '08 #4
I have code in a few other fields on my form that execute just fine. I was able to get the debuger to stop when I opened with the left shift.

I solved the issue by putting the who if statment on 1 line. with it the was i posted above it showed me error or
"end if without if statment"
Which was very confusing.
Thank you for the help.
Aug 14 '08 #5

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

Similar topics

49
by: Yannick Turgeon | last post by:
Hello, We are in the process of examining our current main application. We have to do some major changes and, in the process, are questionning/validating the use of MS Access as front-end. The...
9
by: James Butler | last post by:
Our setup: Online db: MySQL Inhouse db: MS Access 97 with MySQL tables linked via ODBC Our issue: Almost every field updates successfully, except one. A scenario: Information is written to...
17
by: Petyr David | last post by:
Just looking for the simplest. right now my perl script returns an error messge to the user if the date string is invalid. would like to do this before accessing the server. TX
1
by: cpajoe2001 | last post by:
I am having an issue and after searching around online for a day and half now and finding others with the same problem but yet no solution to my issue I am looking for help. What i have is ServerA...
2
by: Trev | last post by:
Hi, I need you suggestion and ideas as I am not a programmer by any means but I've been reading the articles on how to show a dynamic chart in asp web pages. I have to say it's brilliant and...
4
by: SilentThunderer | last post by:
Hey folks, Let me start out by letting you know what I'm working with. I'm building an application in VB 2005 that is basically a userform that employees can use to "Clock in". The form...
1
by: rickcross | last post by:
I am trying to use the Access 2007 runtime. I have a program that is fully working in 2007 but when I install the runtime version with same Operating system and Access 2003 installed I have...
8
by: ajos | last post by:
hi frnds, im trying to convert my servlets database configuration from ms access to mysql database.however im getting some error like no driver found exception. to verify this error ive...
13
truthlover
by: truthlover | last post by:
I have been trying to include some validation (w/ validation text) in my forms but I cant seem to get it to work. I'm currently using a DB in Access 2000 format, but I tried it in 2003 and 2007 with...
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: 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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...

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.