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

Validation : Do not go to next record

Hi

I have a generic form to keep data. I.e, date, number, string all are
stored as TEXT in different rows in a same table.

i would like to validate that the date is in a correct format. The
different rows appear in the 'Detailed" section. May i know how do i
prevent the "focus" to jump to the next row if there is a validation
error until it conforms to my requirement. I have tried using
GotoRecord but it does not give the kind of effect that i want. I wish
to have something like how "Validation Rule" forces the correction of
data entry. Do not go to next row until you solve the current row's
problem.

Thank you
Boon Yiang

Dec 30 '06 #1
1 1822
Use the BeforeUpdate event of the text box if you wish to run code to test
if the value IsDate().

Seriously though, you could solve this by changing the data type of the
field to date/time, and you need no code at all. You will also avoid a
plethora of problems such as:
- wrong results when you aapply criteria to dates that are just text,
- sorting problems,
- problems in the the values are interpreted differently if users have
different regional settings.

--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

<ch****@hotmail.comwrote in message
news:11**********************@h40g2000cwb.googlegr oups.com...
Hi

I have a generic form to keep data. I.e, date, number, string all are
stored as TEXT in different rows in a same table.

i would like to validate that the date is in a correct format. The
different rows appear in the 'Detailed" section. May i know how do i
prevent the "focus" to jump to the next row if there is a validation
error until it conforms to my requirement. I have tried using
GotoRecord but it does not give the kind of effect that i want. I wish
to have something like how "Validation Rule" forces the correction of
data entry. Do not go to next row until you solve the current row's
problem.

Thank you
Boon Yiang
Dec 30 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Joey P | last post by:
Hi all, I am doing a project for university whereby i have to implement a simple database related to a frozen foods company. I am having some trouble though creating a validation rule for one...
2
by: R Bolling | last post by:
I am using a routine to check to see if a phone number (PK) has alread been entered, and takes the user to that record if it is found -- as follows: Private Sub...
0
by: Steve V | last post by:
I'm using Access 2000 to build a budgeting/tracking database. Can I make a validation rule (using VBA) that checks the data as if the record has already been added? I've got 5 tables (only the...
5
by: Chris | last post by:
Based upon some prevoius postings on what to do for adding a 'add' row to a datagrid I utilize the footer to create the 'add' row. The only issue is that I have it sharing the 'UpDate_Command' and...
8
by: jaYPee | last post by:
i have downloaded the sample of cell by cell validation from this site http://www.syncfusion.com/faq/winforms/search/773.asp but it is a c sharp. anyone have a vb version of this sample program?
2
by: Doc Dunning | last post by:
Hi all, This seems such a simple problem to me but I can't find the answer after *much* searching. I have an application using bound controls to browse / update a database table of club...
3
by: rn5a | last post by:
A MS-Access DB table has the following 6 columns - TeacherID, ClassID, VenueID, AvailDate, StartTime & EndTime. The data type of the 1st 3 columns is int whereas the data type of the last 3 columns...
7
by: sharsy | last post by:
Hi guys, I would like to setup a validation rule for a database in microsoft access that restricts data entry so that a certain field can only be filled in if another field has a specific answer...
18
by: ChipR | last post by:
I have a text box with a validation rule and validation text. When entering a new record, if I put in invalid text, the validation text is displayed in a message box, but after clicking OK, another...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
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: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.