Recent content by aidan

  1. A

    auto-compact bypassed by docmd.quit

    Wow, just what I was looking for. Thanks!
  2. A

    auto-compact bypassed by docmd.quit

    I'm trying to use a button to close a database which has compact-on-exit set. However docmd.RunCommand acCmdCompactDatabase won't run from a form (there are lots of threads about this here), and both Access.RunCommand acCmdExit and DoCmd.Quit both ignore the flag. Is there a way around this...
  3. A

    Trapping error 3022

    Thanks for all the help last week. I got the error trapped in the test, but it still wouldn't work in the main db. If anybody stumbles on this thread wanting to trap 3022 errors, then unless they're having the same problem I was the following thread should help...
  4. A

    Trapping error 3022

    Error 2448 is what it's bringing up in a test database I just made. Do people usually trap this error also? Aidan
  5. A

    Trapping error 3022

    Thanks for trying. I can't post the whole thing I'm afraid though. It's about 7 meg unzipped without data. Maybe someone out there will post a solution. There are only going to be 2 people using it at once, so the chances are pretty slim anyway, but you said you do this all the time? Did you...
  6. A

    Trapping error 3022

    Um, late last night I didn't no. I had "DoCmd.RunCommand acCmdSaveRecord" to begin with though - I just checked and either this on it's own or requery brings up the error. With either of these it's still not getting trapped by either error handler though.
  7. A

    Trapping error 3022

    It's already set to unhandled errors unfortunately. Display() is just a pseudocode representing the display error function - sorry for any confusion. Aidan
  8. A

    Trapping error 3022

    It's just a button event: Private Sub SaveChanges_Click() On Error GoTo trap Dim second_attempt As Boolean second_attempt = False try_again: GenerateKEY() 'while debugging this returns existing key.. DoCmd.Save acForm, Me.Name...
  9. A

    Trapping error 3022

    My table has an auto generated key as a string. So on the offchance that two clients are trying to autogenerate a key at exactly the same time, I'm trying to trap the 3022 error raised when a duplicate key is entered so that I can repeat the operation with a goto. I'm raising the error with...
  10. A

    Can I hold Integers in a Double?

    Jon and Emp: Thanks - I didn't know you could use a string in an expression like that, but why the need for trim? Izy: I'll bear that in mind for the future, thanks.
  11. A

    Can I hold Integers in a Double?

    I have a "number" field which is 12 characters long, called CID held as a string. In the first record it has the value 360126474291 Basically, I wanted to do nextCID = val(lastCID) + 167, but obviously (:o) I get an overflow, so I can't. What can I expect if I use nextCID = CDbl(lastCID) +...
  12. A

    Input Mask

    As far as I know - you can't.... If you don't know already, you can make a custom dialog by creating a form with a text box and couple of buttons. The buttons set a global variable, and when you call it you pause the execution like this: DoCmd.OpenForm "yourForm", acNormal, , , , acDialog...
  13. A

    continuous form, ordinal index by function, #Error

    This is what I was looking for, thanks. -- Aidan
  14. A

    continuous form, ordinal index by function, #Error

    continuous form, ordinal index by function, where? I want the recordnumber displayed on a continuous form. The code below works with the command button, but not afterinsert. Here's the code: (function GetPosition() is the control source) Private Sub Command28_Click() numbers End Sub...
  15. A

    new record, testing for

    didn't know about .newrecord - thanks both (no message) thanks aidan
Back
Top Bottom