fedupwithaccess
Registered User.
- Local time
- Today, 23:34
- Joined
- Jan 9, 2007
- Messages
- 10
My problem is a little strange as my database works pretty well, but is now playing up since I've put navigation/main menu forms on top of it.
The database is made up of a number of forms for users to raise invoices, credit notes, new accounts, or account amendments. After completing each form the user hits the email button and the text/data from the fields on the form is sent to a specific email address.
Everything works when using the forms individual (open direct or from design mode), however I've now brought them together using menus and command buttons and for some reason the email will only work on 2 out of the 4 forms.
For instance if I create and send an invoice, it will then fail to email a credit note (but adds the details to the table) and vis-a-vis. The same happens with the new accounts and amendments. Does outlook remain open some how?
I've designed all the forms separately (rather than copying one from another) and debugged my code (which all works) so I'm a little perplexed as to why it works on one and not the other.
The code I'm using to send the mail on each form is
DoCmd.SendObject acSendNoObject, , , "joe.bloggs@company.com", , , "Purchase Ledger Invoice", StrMessage, False
DoCmd.Close acForm, "PurchaseLedgerInvoice", acSaveYes
Admittedly this could be too basic and the problem, but it does work when I test the forms individually. If the full code is needed then please let me know.
Any thoughts or assistance is greatly appreciated as this is my final hurdle so to speak.
Cheers,
Iain
The database is made up of a number of forms for users to raise invoices, credit notes, new accounts, or account amendments. After completing each form the user hits the email button and the text/data from the fields on the form is sent to a specific email address.
Everything works when using the forms individual (open direct or from design mode), however I've now brought them together using menus and command buttons and for some reason the email will only work on 2 out of the 4 forms.
For instance if I create and send an invoice, it will then fail to email a credit note (but adds the details to the table) and vis-a-vis. The same happens with the new accounts and amendments. Does outlook remain open some how?
I've designed all the forms separately (rather than copying one from another) and debugged my code (which all works) so I'm a little perplexed as to why it works on one and not the other.
The code I'm using to send the mail on each form is
DoCmd.SendObject acSendNoObject, , , "joe.bloggs@company.com", , , "Purchase Ledger Invoice", StrMessage, False
DoCmd.Close acForm, "PurchaseLedgerInvoice", acSaveYes
Admittedly this could be too basic and the problem, but it does work when I test the forms individually. If the full code is needed then please let me know.
Any thoughts or assistance is greatly appreciated as this is my final hurdle so to speak.
Cheers,
Iain