Search results

  1. J

    Trying to run update for table screwing it up

    It is entirely possible that I am, and when I sit down to finish a review when it is done see everything the same way. I am not having the easiest time of this as coding has never been my strong suit. This is my first in depth experience. I really appreciate all the help. I will take into...
  2. J

    Trying to run update for table screwing it up

    Well our work schedule is a bit odd, because we work 2 shifts so there can be more than one entry for p3, and p4. So I need to match p5 also. Because of all data being put in by humans, I am leaving the ability to update all but badge. If the badge is wrong, I am allowing them to delete the...
  3. J

    Trying to run update for table screwing it up

    It is entirely possible. Your code did work just fine. Thank you so much for all your attention.
  4. J

    Trying to run update for table screwing it up

    I am looking for the entry that matches p3, p4, and p5 and then editing the field if needed. Because with those 3 fields matched, it should only find the one entry. Then, all fields except badge can be updated if needed.
  5. J

    Trying to run update for table screwing it up

    There is a good chance that I formatted something incorrectly that caused the issue, as for some reason, with p0 it would update to 0 and not the field from the form. However, I am more convinced it was something I did that caused the issue, because it was not occuring for the rest of the p's
  6. J

    Trying to run update for table screwing it up

    The only field that should not be edited is Badge. Because that is the only field that will not change. The shift, the date, the code, the points etc. This is all dependent on human entry and needs to be corrected if a mistake is made. I have to compare it with the entry already in the table...
  7. J

    Trying to run update for table screwing it up

    Private Sub Save_Click() With CurrentDb.CreateQueryDef("", _ "UPDATE tbl_incident SET tbl_incident.[Description] = p0, " & _ "tbl_incident.Code = p1 AND " & _ "tbl_incident.[Points] = p2 AND " & _ "tbl_incident.[Badge] = p3 AND " & _ "tbl_incident.[Date_of_Incident] = p4 AND " & _...
  8. J

    Trying to run update for table screwing it up

    Private Sub Save_Click() With CurrentDb.CreateQueryDef("", _ "UPDATE tbl_incident SET tbl_incident.[Description] = p0 AND " & _ "tbl_incident.Code = p1 AND " & _ "tbl_incident.[Points] = p2 AND " & _ "tbl_incident.[Badge] = p3 AND " & _ "tbl_incident.[Date_of_Incident] = p4 AND " & _...
  9. J

    Trying to run update for table screwing it up

    OK Gasman, thank you so much for putting up with me. I think I got it working. Instead of the comma in the update statement, I used the word AND and it seems to have worked.
  10. J

    Trying to run update for table screwing it up

    As far as going back to what works, Simply eliminating the last line of the code, the one I posted makes the code work.
  11. J

    Trying to run update for table screwing it up

    Gasman, again thanks. Those Quotes and the changes to the word code were made to post it. Otherwise the Code tags do not work since one of my variables uses the word code. Thank you for all your input. I truly appreciate it.
  12. J

    Trying to run update for table screwing it up

    Private Sub Save_Click() With CurrentDb.CreateQueryDef("", _ "UPDATE tbl_incident SET tbl_incident.[Description] = p0, " & _ "tbl_incident."[Cde]" = p1, " & _ "tbl_incident.[Points] = p2 " & _ "tbl_incident.[Badge] = p3 " & _ "tbl_incident.[Date_of_Incident] = p4 " & _ "tbl_incident.[Shift] = p5...
  13. J

    Trying to run update for table screwing it up

    Hi GasMan, Sorry I wasn't clear. I did add that AND however I am still getting the same error.:banghead::eek:
  14. J

    Trying to run update for table screwing it up

    Thanks for the reply Gasman, Unfortunately no. I it has to do with this line in the Where statement because that is where the debug shows an error. However, I can not figure out what it is. "tbl_incident.[Shift] = p5;")
  15. J

    Trying to run update for table screwing it up

    Ok Here is another Stupid question. I tried updating the statement and it says I am missing an operator. I can't figure it out. Here is what I did. With CurrentDb.CreateQueryDef("", _ "UPDATE tbl_incident SET tbl_incident.[Description] = p0, " & _ "tbl_incident.[Code] = p1, " & _...
  16. J

    Trying to run update for table screwing it up

    Gasman, Thank you for pointing out the obvious. Sorry, I did not even see that. WOW. :banghead:
  17. J

    Trying to run update for table screwing it up

    Hi Gasman, I am comparing it to make sure it is the appropriate entry, and updating it if it gets changed on the form. Thanks for your assistance.
  18. J

    Trying to run update for table screwing it up

    I am trying to add a new field to this statement and it isn't working. I am sure it has to do with me not having much knowledge. I was hoping for some help. The new field is called shift. I need it compared and then updated with the rest of the fields. I am having no luck. Here is what I...
  19. J

    Trying to run update for table screwing it up

    This worked perfectly. Thank you so much!
  20. J

    Trying to run update for table screwing it up

    I am going to upload the database in a zip file. I am a neophyte when it comes to Access and am sure it is not done properly, but the form I have an issue with is frm_edit. When hitting the Save button, sometimes it works fine, other times it edits all incidents previous to the most current...
Top Bottom