Search results

  1. M

    Solved Error 3078 when deleting a record

    More info. I only get the error on one particular form. I have 7 forms in the database with similar code that do not produce the error. I tried compacting the front end and that didn't make a difference. I was initially getting the error when I deleted a record I had just created, but I...
  2. M

    Solved Error 3078 when deleting a record

    Initially posted at: https://www.access-programmers.co.uk/forums/threads/audit-update-of-a-field.329588/page-10#post-1909410 I'm getting this error when deleting a record using a delete button control: Stepping through the code under the delete button, the record is deleted, the code steps...
  3. M

    Audit Update of a Field

    Wrong thread, but I'm getting a new error when I delete a record: Stepping through the code under the delete button, the record is deleted, the code steps through the Form_Current() event, updates the custom navigation buttons, and then returns to the delete button code and displays the error...
  4. M

    Audit Update of a Field

    It works for us, but it's a bit more complicated than I said ... - Essentially, I'm doing the same thing as in this thread - possibly incorrectly as in the linked thread: https://www.access-programmers.co.uk/forums/threads/beforeupdate-vs-afterupdate.270219/ As an example, let's say my field...
  5. M

    Audit Update of a Field

    New issue - this is more of a WHY question - it seems to be working the way I intended. I have a user table and I am using Yes/No fields to show "rights" for each user - i.e. if this box is checked, the user can do certain things. I adapted the UserName Code from the previous replies, so the...
  6. M

    Audit Update of a Field

    The validation code is in the Field_AfterUpdate events - we didn't used to have any. Essentially, Form_BeforeUpdate looks like this: If DontPromptUser = True then Exit Sub If MsgBox("Do you want to save?", vbYesNo + vbQuestion, "Save Record") = vbNo Then Me.Undo End If...
  7. M

    Audit Update of a Field

    @Pat Hartman - I think we are saying the same things ... I don't call it pushed, but ... I have a global Boolean variable called DontPromptUser. If the user changes a field, the background of the field is changed and the SAVE button is enabled. If the SAVE button is clicked, DontPromptUser is...
  8. M

    Audit Update of a Field

    Clarification: I already have code that if the record is "dirty/changed" and the user tries to go to a new record, the database will show a pop-up and say "Do you want to save the record?" I also have a button to manually save. If I press the Save Button, I get the error message, but I DON'T...
  9. M

    Audit Update of a Field

    Actually, it seems like the save IS working - i.e. I don't get the prompt to save the record when I go to a new record and the changes are saved, but I get the error message and none of the code after the save line runs. (I could probably avoid using Me.Dirty = False by trapping for Error 3939...
  10. M

    Audit Update of a Field

    Save is behind a button. When the button is clicked, it runs down to the DoCmd.RunCommand acSaveRecord line. Then it runs the Form_BeforeUpdate() code, then it runs the Form_AfterUpdate() code, then it returns to the button code - the button is named UPDATE and the event is UPDATE_Click()...
  11. M

    Audit Update of a Field

    It SEEMS to work fine if I change: DoCmd.RunCommand acCmdSaveRecord to Me.Dirty = False Not sure WHY or why that is required now, but ....
  12. M

    Audit Update of a Field

    Okay - I changed all the DDL strings to "text(x)" and updated the back end from the original version. I no longer get the odd behavior with spaces padded to the right of the field I added to the text box on the bound form. However, now when I click the save button to manually save the record...
  13. M

    Audit Update of a Field

    I'm not sure about that ... I used DDL with CHAR(255) and I was using a text box on a User From to display the current value of the field on the bound form and paste the new value. The value I tried to add was about 25 characters long and Access said the text was too large for the field. I...
  14. M

    Audit Update of a Field

    @Pat Hartman - Thank you!!! The code that you are using was text(50) or text(255). That seems to be working. Somehow, that wasn't working for me, and I looked up code that suggested CHAR(255). That works, but it makes the field length AS 255 instead of UP TO 255 characters. I'm changing all...
  15. M

    Audit Update of a Field

    I have some DDL questions now ... I confused myself reading these links: https://stackoverflow.com/questions/25300821/difference-between-varchar-and-text-in-mysql...
  16. M

    Audit Update of a Field

    Minor point, but it's tripped me up a few times so far. If you are editing the DM files using the User Interface (Access, not Notepad II), the changes are made similar to AfterUpdate on a form. i.e. if you change a field, you MUST click enter of click in a different field before saving. If you...
  17. M

    Audit Update of a Field

    Edge and Chrome DO tend to monopolize things. I'd just be happy if they would save my PDF files as PDF instead of HTML. My point is valid though: The file extension will always be ".xml". The file type might be "XML File" or "Microsoft Edge HTML File." or something else. It's similar to what I...
  18. M

    Audit Update of a Field

    @jdraw - Thanks - I know most of that. What kept tripping me up: I didn't see that your code had debug.print lines already. I was getting no messages in the immediate window and you were, so I thought you had added them to your personal file for debugging but not the code you posted. For...
  19. M

    Audit Update of a Field

    HOORAY!!!!! Thank you @jdraw!!!! - Sorry it took so long to figure it out!!!
  20. M

    Audit Update of a Field

    Yay - MORE PROGRESS!!! 70 If fil.Type = "xml File" Then 'datamacros store as xml files when SaveAsText I think I need to change line 70 to "If extension is .xml" - Air Code: If Mid$(InStrRev(Fil.name, ".") = "xml" then ... If Mid$(fil.Name, InStrRev(Fil.Name, "."))=...
Back
Top Bottom