Recent content by mickelb

  1. M

    Access VBA Conditional Loop

    I am always intrigued by the different approaches to a solution, some looking complicated and others simple. I guess it depends on how you were taught or learned VBA - or perhaps lessons learned.
  2. M

    Access VBA Conditional Loop

    @cheekybuddha: many thanks. A bit of modifying and that works. The code is very rough and ready at the moment, but I will take on board your other advice. I certainly wouldn't use Name for a field and would name the Command button with something more meaningful. Thanks also to all the other...
  3. M

    Access VBA Conditional Loop

    @Rene vK ; yes. 1. The form is loaded with any filtering query on the table 2. If the user sees any errors in the records they can set as many records to EXCLUDE = Yes as needed. 3. The user clicks the "SEND EMAILS" button 3. The procedure should then run but ignore any EXCLUDE = Yes records...
  4. M

    Access VBA Conditional Loop

    @Uncle Gizmo, afraid I've done days of Googling and not come up with an answer. As that thread said, if the SMTP server rejects an email the address is returned in the error dialogue. That error can be handled and the offending email skipped plus marked to be excluded. It is then that I need...
  5. M

    Access VBA Conditional Loop

    Sorry, I should have been clearer. The first record set will be based on a query such as you suggest but I need the user to be able to exclude a record from an email blast by checking Exclude in the form in the event that an email address returns an error and then resume. That way they get a...
  6. M

    Access VBA Conditional Loop

    I am trying to get a conditional loop working, but can't seem to get the condition statement in the correct place to work for each record. I want to loop through a table and send an email to each record unless I have checked an EXCLUDE field in the form. So somewhere I need "If EXCLUDE =...
  7. M

    VBA RunSQL to update field in table from Form

    Many thanks to both. Neither worked on their own, but a combination and changing . to ! in the Me values finally worked : DoCmd.RunSQL "UPDATE TABLE2 SET [TABLE2].SURNAME ='" & Me!SURNAME & "' WHERE [TABLE2].ID= " & Me!ID
  8. M

    VBA RunSQL to update field in table from Form

    Access 2010 64Bit I am new to Access VBA, slowly building up knowledge, and having trouble getting an After Update Event using RunSQL to work. I have a form bound to Table1. One of thed fileds, SURNAME, has a check for any change. If a change is detected the user is asked to confirm if it is...
Back
Top Bottom