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

Trapping an Error for a required field?

Using a continuous form I would like to require 1-field in each record
to have data before the record is saved. In the table I set a single
date field as required = yes, and this works for me.

How do I display a custom message that makes sense, other than the one
I am assuming is coming from jet (DAO). I tried to trap the message
in the forms OnError but the error of failing to enter data in the
required field seems to be 0, I don't think this is correct.

How can I display a message requiring the single fields data through
trapping ?
Jul 7 '08 #1
2 3253
See http://www.databasedev.co.uk/custom-error-message.html

Lars

<Ap******@gmail.comschreef in bericht
news:67**********************************@l42g2000 hsc.googlegroups.com...
Using a continuous form I would like to require 1-field in each record
to have data before the record is saved. In the table I set a single
date field as required = yes, and this works for me.

How do I display a custom message that makes sense, other than the one
I am assuming is coming from jet (DAO). I tried to trap the message
in the forms OnError but the error of failing to enter data in the
required field seems to be 0, I don't think this is correct.

How can I display a message requiring the single fields data through
trapping ?

Jul 7 '08 #2
Thanks Lars

I'll try it out!
On Jul 7, 12:32*am, "Lars Brownie" <l...@brownie.comwrote:
Seehttp://www.databasedev.co.uk/custom-error-message.html

Lars

<ApexD...@gmail.comschreef in berichtnews:67**********************************@l 42g2000hsc.googlegroups.com...
Using a continuous form I would like to require 1-field in each record
to have data before the record is saved. In the table I set a single
date field as required = yes, and this works for me.
How do I display a custom message that makes sense, other than the one
I am assuming is coming from jet (DAO). *I tried to trap the message
in the forms OnError but the error of failing to enter data in the
required field seems to be 0, I don't think this is correct.
How can I display a message requiring the single fields data through
trapping ?- Hide quoted text -

- Show quoted text -
Jul 8 '08 #3

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

Similar topics

3
by: jj | last post by:
I've got a form button that fires off 3 queries but if the first query returns an error, I don't want the other two queries to happen. Example: first query runs an insert from a linked table but...
1
by: kurt klingbeil | last post by:
I hope someone can illuminate some error handling mysteries: I read that if a func/sub doesn't do it's own error handling, control propagates up the call stack to the sub that does have an active...
3
by: Nathan Bloomfield | last post by:
Hi there, I am having difficulty with a piece of code which would work wonders for my application if only the error trapping worked properly. Basically, it works as follows: - adds records...
3
by: windandwaves | last post by:
Hi Gurus Does anyone know how I set the error trapping to option 2 in visual basic. I know that you can go to tools, options and then choose on unhandled errors only, but is there a VB command...
4
by: Keith | last post by:
I have the following code in the On No Data event of a report: **** On Error GoTo err_trap MsgBox "No items matching criteria.", vbInformation, gcApplication Cancel = True err_trap: If...
13
by: Thelma Lubkin | last post by:
I use code extensively; I probably overuse it. But I've been using error trapping very sparingly, and now I've been trapped by that. A form that works for me on the system I'm using, apparently...
2
by: Captain Nemo | last post by:
I'm still using Office 2000 myself, but some of my clients have Office 2003. I've recently added a piece of code to create an instance of Word, open a document, fill in the blanks and become...
7
ak1dnar
by: ak1dnar | last post by:
Hi, I got this scripts from this URL There is Error when i submit the form. Line: 54 Error: 'document.getElementbyID(....)' is null or not an object What is this error. Complete Files
3
by: Jim Armstrong | last post by:
Hello all - This is driving me crazy. I have a table called tblClients - very simple, has the following fields: taxID (PK) ClientName SalesName The main form of my application allows a...
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
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
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
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...
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
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.