Which Field is Giving the Error ????

skiphooper

Registered User.
Local time
Today, 13:43
Joined
Nov 29, 2000
Messages
76
Hi Everyone,

When updating my table, I have two text date fields which could possibly give me the same Error.
How can I trap the Error and tell the users which of the two fields is giving the Error.

I looked up Raise.Err but am not exactly sure how to use it in this case.

Thanks

Skip

[This message has been edited by skiphooper (edited 03-25-2002).]
 
How about if you call a function where you pass to the function the name of the field as an argument for the function?

Then any error in the function can be laid on the passed/calculated field that called the function...

Doug.
 
You'll have to edit the fields yourself in the form's BeforeUpdate event.
 
Doug and Pat,

Our Internet Server has been down.
Just came back up.

Thanks for the reply's

I think I'll use Pat's suggestion and use the BeforeUpdate event.

Thanks Again

Skip
 
Hi Everyone.

Just getting back to this.
After a little thought, I can only go with Doug's suggestion.
The only information on my form is either position numbers and length's ,or field references if the data is delimited.
None of the data written to the table is displayed anywhere on the form.
No form element is linked to any table.

Again Thanks for all Your Help.

Skip
 
What happened to the two date fields you referred to originally?
 
Hi Pat,

That is exactly the problem.
The date fields are in the text file I'm reading in, with only the position and length, or just the field number if the file is delimited.
I have a couple of combo boxes, and check boxes on the pop-up forms that I open asking users to click or ckeck the type of date fields the data contains.

Example: mdy, myd, dmy, dym, ymd, ydm, my, ym, ect. ect. whether or not it has a four position date, leading zeros or not, delimeters or not, and a few other things.

Sometimes even ckecking the month, day, and year fields according to the layout they have checked, no valid date can be created.

The main problem is when the user doesn't care, or mis-checks the wrong entry.

Once I get the data no field is redisplayed back to the user for verification. There are thousands of records, and the process would take forever. The data is generated from a scanning program. The users set up the output data however they see fit, but are not always consistent.

Thanks

Skip


[This message has been edited by skiphooper (edited 03-28-2002).]
 
Your original question sounded like you were having trouble with a form. Now we find out that you are actually importing a text file
smile.gif


If you are using TransferText to do the import for you, there isn't any way to trap the errors. Is Access making an import_errors table to report the bad dates?
 
Sorry for the confusion. Next time I'll explain things in more detail.

No I didn't use TransferText, I wrote my own code to handle everything.
The bigest problem I had was stoping the code from running while I opened a pop-up form.
I'm glad this one is finished, it was driving me crazy.

Thanks Again for all your help.

Skip


[This message has been edited by skiphooper (edited 03-30-2002).]
 

Users who are viewing this thread

Back
Top Bottom