Recent content by RayG

  1. R

    Skipping validation in a particular circumstance

    Thanks for your various replies - most helpful in thinking through the problem. Here's what I've done: Set up a public variable 'blnFileCheck Failed'. The file check runs on exiting the File Name control. If it's successful, blnFileCheckFailed is set to false. If the check fails, the variable...
  2. R

    Skipping validation in a particular circumstance

    Gentlemen, thanks for your responses. Yes, I'm aware that validation is more usually carried out in the BeforeUpdate event. I guess the use of LostFocus is an historic anomaly. I'm also aware that BeforeUpdate is cancellable whereas LostFocus is not. However, it's not the event that I want to...
  3. R

    Skipping validation in a particular circumstance

    Hi, I have a bound data entry form which has a control for a file name. The control's LostFocus event incorporates a procedure to check that the named file actually exists. If the file doesn't exist, a modal form is popped up giving the user a number of options. In most cases the file name...
  4. R

    Validation Rule Violation Error Trapping

    Thanks for your reply. I can certainly use your code to improve my error handling, the problem is though that the SQL Append, doesn't generate an error!
  5. R

    Validation Rule Violation Error Trapping

    Ah, as I said the procedure was intended to be generic and to permit records to be appended from any source table to any target table using a third 'specification' table to define the relationships between source and target fields. The specification table could also in theory include the...
  6. R

    Validation Rule Violation Error Trapping

    Thanks for your suggestions. I did already show the record count in a message box. The question I wanted to help the user with was 'why?' As regards the alternative command, yes of course that is simpler. There always seems to be three ways of doing something in Access and I don't find it...
  7. R

    Validation Rule Violation Error Trapping

    David, Many thanks for your prompt response. I've tried it and it'll work fine. However, you do say "It depends.." Is there a more sophisticated approach that would allow me to generate my own messages or to provide an error log? Thanks again, Ray
  8. R

    Validation Rule Violation Error Trapping

    Hi, If I append data from one table into another using a query, I get the following message: "Test2008...didn't add...15 records due to validation rule violations." Fine, I can work out why this is. The problem is that I want to incorporate the append function into a generic VBA procedure...
  9. R

    selStart and selLength not returning values expected

    I need to determine the insertion point and whether any text is selcted in a bound text box. To do this I propose using selStart and selLength but in some circumstances they're not returning the values expected. As an aid to debugging I have this code in the control's OnExit Event: Private...
Back
Top Bottom