Search results

  1. C

    Email to selected list option

    When I hit the Cmd button it is trying to run, the report preview pops up on screen then error appears
  2. C

    Email to selected list option

    Morning Changes made but still same error: .Attachment.Add AttachmentFile Thanks
  3. C

    Problem checking two fields

    Ah OK, that makes sense. All working great could you just let know is it possible to ass the Msg box to display the Dates Due in order rather than as the records are stored or do I need to somehow order the date fields in the data table? thanks
  4. C

    Problem checking two fields

    No your code works perfect, I had tried to change mine myself but I had only changed the Else to one End If. I see your Code has a double End If but then only ends with two Thanks so much, Ive learnt a lot on this one task. The only thing I lost is why we had to place a double End If after...
  5. C

    Problem checking two fields

    Ah sorry yes I think it is now displaying both dates if they are on the same record but if I have one record with a FireCheck on and a different one with a GasCheck on its only displaying the fire one
  6. C

    Problem checking two fields

    Ok thank you ive commented that Else out (for testing) and now is looking at both fields before displaying the message box.
  7. C

    Problem checking two fields

    Thanks Yes have the extra End If in place but its sequencing to the MsgBox as well before I guess getting to the code regarding our GasCheck Field? Do Until Rst.EOF --> If Len(Nz(Rst!FireCheck)) > 0 Then --> If DateDiff("d", Now(), Rst!FireCheck) < 30 And DateDiff("d"...
  8. C

    Problem checking two fields

    Else If Len(Nz(Rst!GasCheck)) > 0 Then If DateDiff("d", Now(), Rst!GasCheck) < 30 And DateDiff("d", Now(), Rst!GasCheck) < 30 Then MsgBox Rst!GasCheck & " : Next Safety/Legal Check(s) Due! (Within 30 Days) ", vbOKOnly, "ALERT! Safety/Legal Check(s)...
  9. C

    Problem checking two fields

    Thats a very handy tool never knew that existed thanks. Well as a beginner what im seeing here is that at no point does my code run attempt to run the code: Else If Len(Nz(Rst!GasCheck)) > 0 Then If DateDiff("d", Now(), Rst!GasCheck) < 30 And DateDiff("d", Now()...
  10. C

    Email to selected list option

    Sorry yes I had already changed the header I just copied old code back here error is: Object doesnt support this property or method. then code in yellow: .Attachment.Add AttachmentFile
  11. C

    Problem checking two fields

    Ok Could you explain that piece of code to me what is actually saying? and why would the Gas Check only be tested if that statement is True. 0 = True 1 = False??? Thanks
  12. C

    Email to selected list option

    Error here: in yellow Public Function CreateEmailWithOutlook( _ MessageTo As String, _ MessageCC As String, _ Subject As String, _ MessageBody As String) ' Define app variable and get Outlook using the "New" keyword Dim olApp As New Outlook.Application Dim olMailItm As Outlook.MailItem ' An...
  13. C

    Problem checking two fields

    Ok thanks didnt realise Dont have any errors. Form loads and message box appears with each date that is due within 30 days but only from the FireCheck Field not the Gas. Thanks
  14. C

    Problem checking two fields

    Do you mean I should use # at the start and end of my code to preserve the indenting or is that onle for copying and pasting into here. Ive copied this new code back but its still only notifying me of dates due from the FireCheck field not the GascHeck field as well. Thanks
  15. C

    Email to selected list option

    Here is my CmdButton: Private Sub Command181_Click() Dim strDocName As String Dim strPath As String strDocName = "Report" ' save report to myDocument strPath = SpecialFolderPath("MyDocuments") & "\" If Dir(strPath & strDocName & ".pdf") Then Kill strPath & strDocName & ".pdf" ' open report...
  16. C

    Problem checking two fields

    Ok sorry, are you saying that the code requires that positioning or is that just for our reading standards? Got to be honest can't see where I would need another End If. I am as im sure you would expect getting a 'Loop without Do error' Thanks so much for your help My code reads as follows is...
  17. C

    Problem checking two fields

    Hi Its a bloody mess? If im honest I dont really know what I am looking at. Truth is I dont understand what the Indents are telling me??? Thanks Im downloading the Smart Indenter
  18. C

    Email to selected list option

    Here is my updated code below Just for your information the field containing the email address for team now is: txtone I am getting the error message: Compile error, Wrong number of arguments or invalid property assignment. Private Sub Command181_Click() Dim strDocName As String Dim strPath...
  19. C

    Email to selected list option

    Ok It is now sending an email to the correct address but no report for that record is attached. Its also leaving the preview of the report on screen Thanks so much
  20. C

    Email to selected list option

    Ok, Same error even after I have added in the Set OlApp code Thanks
Back
Top Bottom