-
S.O.S. with VBA :-)
Hi All
I have a database which is meant to make our life easier :-)
we have different suppliers with different orders every week.
the meaning is to upload an excel sheet 'PUStoUpload'
every supplier has an order witha unique PO number. under that number you can have different partnumbers with the quantitys.
please see attached DB. when the user hit's the generate email button. the vba should go trough the "PUStoUpload" list and for every unique PO outlook should be opened with there the PO number, partnumbers and quantity.
so if i have 20 unique PO numbers. 20 emails should be opened.
The PO numbers are from supplies which are linked to the contacttable. so user can select an email.
can somebody help me with this one?
-
There is no attachment to view.
-
Attachment 4872
Sorry, my bad. now attached
-
Hi Do you think that you can help me out with this one?
-
Many who follow these posts do not have AC2007 or 2010 so can not open accdb. You may get more responses if you include an mdb version as well.
-
Attachment 4885
Hi
mdb version attached
-
I have looked at your mdb. Am sending a slightly adjusted copy in which I added code to your button to Generate Email. It simply writes some data to the immediate window.
I added a reference to the Outlook library.
I bypassed your Generate email sub because it contained errors and comments.
I think your tables need some design work, but maybe I'm not understanding your situation exactly.
How do you determine the recipient(s) of the email?
Do you have an email text?
Please provide more info (some details as to exactly what gets sent to whom under what conditions....
Please try the button on the form and look at the immediate window (CTRL-G).
It's a matter of proceeding slowly to get the pieces working together.
-
Hi
Thank you for taking the time and to look into it.
So as you can see the user can import a Pickupsheet file (PUS).
on that file we have different suppliers which have they own Duns or Alias number.
in the table "SuppContacts". you have the duns number of supplier with the contact details.
------------------------
every supplier has his own orders which are reflected with the PO Number (Thats the orders number). in the order you can have different parts (partnumbers) with quantitys.
so meaning of the generate email button: when the users hits the button. the vba should go trought the PUSToUpload sheet. for every unique PO number he should open an email. contacts can be linked with the SuppContacts table so the email address is already filled in. the email should look likeAttachment 4899
-
Each unique PO for each supplier gets an email. There is Only 1 contact for each Supplier.
What experience do you have with vba? and Access?
Did you try the sample button on the form?
-
i'm a nooby in VBA for access. So this is a litle bit above me
-
the most important is that for each supplier an email gets open with the criterie mentioned above. if 1 supplier has 3 PO's they can come into 1 email.
-
Where are you located? It's been 1 hour almost exactly from the time you did your last post until I just received it.
If you are responsible to maintain the application, you'll have to learn some vba.
-
Here is latest.
I have the data on the html body, but it only displays
In order to .Send the email, you have to comment out the .Display and make .Send operational,
There is work to do, but it should get you started.
Good luck.
-
Thank you man, this is a great help!!!
-
Glad it's helpful. I don't do much with Outlook, but it's a learning exercise.
Post if you need more.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules