Search results

  1. A

    Solved Problems with code execution following email

    It works!!!! Thanks so much! :D
  2. A

    Solved Problems with code execution following email

    I can see why it needs an exit sub as it still sends the authorisation email if the date is left blank. However, when I leave in the exit sub in both sections of code, it stops the rest of the code running even if the date is completed. Everything works perfectly without the Exit Sub except...
  3. A

    Solved Problems with code execution following email

    Thanks for the suggestion, I have managed to get it working after adding the variable. There was an error in there too so updating it has helped. I just wanted to ask about debugging too as I've never managed to get it to work. Does this only work with modules or should it work with the code...
  4. A

    Solved Problems with code execution following email

    Thanks all for your help and suggestions. So I have the SaveFirstAuth_Click() sub working now. It turns out that I used 'msg' twice for different variables. This was included in the error handling which is maybe why I think the error handling didn't trigger. I also updated this: If...
  5. A

    Solved Problems with code execution following email

    I have removed the .send from this code but it still doesn't work and still no error message :confused:
  6. A

    Solved Problems with code execution following email

    Yep, there's no error message at all with the error handling. I have been trying to make an error message pop up so it would help me debug but there's nothing! Thanks for the feedback too, that's so much cleaner. Interestingly, I have some similar code for the next part of the process which...
  7. A

    Solved Problems with code execution following email

    Hi I'm having problems with a section of code which previously worked but I can't see why it isn't fully executing now. Here's the code: Private Sub SaveFirstAuth_Click() Dim OrgURN As String Dim GrantURN As String On Error GoTo ErrorHandler OrgURN = "Org URN " & Me.OrganisationURN GrantURN...
  8. A

    Solved How to use ME in a public function

    Thanks for this. I can see the point about adding a With block to the code to close forms and that it doesn't really make sense to do that. @MajP thanks for the example of the good With block, there are loads of examples such as this that I can update and make it much more readable. :)...
  9. A

    Solved How to use ME in a public function

    Hi David Thanks for this, it works great! I note the comments about using a With block. How would I do this in this instance? There's definitely other areas in the code that I could use a With block rather than repeating lines of code. :)
  10. A

    Solved How to use ME in a public function

    Hi I have the following code in most of my forms when exiting. Private Sub ExitComms_Click() On Error GoTo ErrorHandler Dim ctl As Control 'If record is changed do you want to save changes If Me.Dirty Then If MsgBox("Do you want to save changes?", vbYesNo + vbQuestion, _...
  11. A

    Solved Auto email error needed if attachment file doesn't exist or is named incorrectly

    Hi, Hoping someone can help. I have the following code in my database which, when a payment is authorised, will send an automatic email to our finance team to say the payment needs to be made and will also attach the bank statement from a file directory. However, if the file doesn't exist/is...
  12. A

    Solved How to define a conditional string in VBA

    Hi David, That's great! I changed Left to Right as the 'Sub' was at the end and it worked a treat! Many thanks :) Allison
  13. A

    Solved How to define a conditional string in VBA

    Hi, I have the following code in the form load event of my reporting form: Dim NewValList As String NewValList = "" Dim obj As AccessObject For Each obj In CurrentProject.AllReports NewValList = NewValList + Chr(34) + obj.Name + Chr(34) + ";" Next obj Me!ReportCombo.RowSourceType = "Value...
  14. A

    Super Easy Word Merge and restricting editing

    Hi Colin, I wouldn't really know where to start with updating the code. Although I've learnt loads in terms of VBA programming over the last few months, I'm nowhere near experienced enough to know what to update. I have had a look through the module and wondered whether I need to amend this...
  15. A

    Super Easy Word Merge and restricting editing

    Hi, I am using Albert Kallal's super easy word merge in my database. When I add templates I need to be able to restrict editing of the word document for document control purposes. However, this option isn't available when I add the template. Is this intended or should I be able to restrict...
  16. A

    Solved Problem scrolling on form with a tab control

    I've amended the format of the form slightly so the subform is smaller and, yes, when you're on the subform it doesn't scroll the main form but I can easily manage that with the staff who will be using it. I did try your solution but when I tried adding new records in the GrantsF form they...
  17. A

    Solved Problem scrolling on form with a tab control

    That's sorted it! Thanks so much Bob. :D
  18. A

    Solved Problem scrolling on form with a tab control

    Hi all, I'm hoping you can help. I have recently updated one of the forms in my database which has a tab control. Within 3 of those tabs I have subforms, one of which I have just added as part of the update. The tab control is quite high so usually you have to scroll down with the mouse...
  19. A

    Solved Checkbox not working on checklist

    Brill! That's fixed it. Thank you so much for your help. :D
Back
Top Bottom