Save Email to Directory (1 Viewer)

Gasman

Enthusiastic Amateur
Local time
Today, 20:40
Joined
Sep 21, 2011
Messages
14,310
Thx Arnelgp, the code is working perfect

Just run in a bit head scratching on the AmendmentDetails subform in the control EmailCC. Sometimes one needs to add more than one CC email. So if needed I want to select more then one email address in the EmailCC (combo box control). Like in Outlook where one can add multiple email address in CC.

EmailCC Control proprties below
Control Source is Email
Row Source is SELECT Email FROM tblInsContactDetails ORDER BY Email;
Row Source Type is Table/Query
Bound Column: 1
Limited to List: No
As currently I can only select one email address.
Use a multi select listbox instead.
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Tomorrow, 03:40
Joined
May 7, 2009
Messages
19,245
you can use a listbox, instead of combobox.
you need a "special" field (multi-value field) if you need a multi-select combobox.
here is a demo of the two.
open form1.
 

Attachments

  • multi-email.accdb
    448 KB · Views: 93

johankotze

Registered User.
Local time
Today, 22:40
Joined
Jul 3, 2016
Messages
54
you can use a listbox, instead of combobox.
you need a "special" field (multi-value field) if you need a multi-select combobox.
here is a demo of the two.
open form1.
I will have a look tomorrow, thx Arnelgp
 

johankotze

Registered User.
Local time
Today, 22:40
Joined
Jul 3, 2016
Messages
54
Arnelgp
Thx for the sample file. How do you get the OK and Cancel Button on the Multi-Select Combobox as this is the one that will work in my case
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Tomorrow, 03:40
Joined
May 7, 2009
Messages
19,245
Ok and Cancel button on the multi-select combo works only
if you have selected (checked) an item on the combo.
pressing Ok will save your selection, otherwise, pressing Cancel
will just discard your changes.
 

johankotze

Registered User.
Local time
Today, 22:40
Joined
Jul 3, 2016
Messages
54
I did that but my Multi-Select Combobox do not show Ok or Cancel Buttons
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Tomorrow, 03:40
Joined
May 7, 2009
Messages
19,245
did you create the "temp" table.
bring it in design view:
multi.png
 

johankotze

Registered User.
Local time
Today, 22:40
Joined
Jul 3, 2016
Messages
54
Arnelgp, sorry for not replying sooner, was out of office for a few days
Ok so I need to create the "temp" table.

I create tblEmailTemp
ID -> AutoNumber (primary)
Email -> Short Text

But then the Email Row Properties only under Lookup tab -> Display Control -> Text Box
Not like yours above as your data type of the Email is set to Short Text
 

johankotze

Registered User.
Local time
Today, 22:40
Joined
Jul 3, 2016
Messages
54
Arnelgp
I changed Display Control under the Lookup tab in my tblInsContactDetailsTemp to Combo Box with Data Type Short Text. But under the Lookup properties there not setting for "Allow Multiple Value" all else are there except this one.
Screenshot.png
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Tomorrow, 03:40
Joined
May 7, 2009
Messages
19,245
what is your database .mdb?
if you convert it to accdb.
 

johankotze

Registered User.
Local time
Today, 22:40
Joined
Jul 3, 2016
Messages
54
it is a .mdb
I do not know how to change the file format. I use Access 2019, but DB was wrote in 1997 or 2000
Save As.png
 
Last edited:

arnelgp

..forever waiting... waiting for jellybean!
Local time
Tomorrow, 03:40
Joined
May 7, 2009
Messages
19,245
try to save it as "Default database format".
if that does not work, you can post your db and i will convert it for you.
it need to be converted "in ladder", from a2000 to a2003 then to a2007 and finally to a2019.
 

johankotze

Registered User.
Local time
Today, 22:40
Joined
Jul 3, 2016
Messages
54
I did get it right to convert the back to .accdb
Now I need to do the same with the frontend
My frontend is quite large
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Tomorrow, 03:40
Joined
May 7, 2009
Messages
19,245
make a copy first!
anything can happen, so you have a backup.
 

johankotze

Registered User.
Local time
Today, 22:40
Joined
Jul 3, 2016
Messages
54
I did get it right to convert the back to .accdb
Now I need to do the same with the frontend
My frontend is quite large
Looks as if I did get it right to convert the FE and BE to .accdb
FE and BE are communicating with one another
Now on to the Email part.

I see that your Form1 Record Source is table EmailTmpT and the Email control on the Form1 Control Source is Email with Row Source SELECT EmailsT.Email FROM EmailsT;

My is scenario follows.
I have a form frmInsContactDetails with Record Source tblInsContactDetails where I add. Based on your Email.accdb example
ContactName
TelephoneNumber
CellNumber
Email

Below is my form where I need to add EmailTo and EmailCC
frmAmendment (main form)
AmendmentDetails subform
Code:
SELECT AmendmentDetails.Amendment_nr, AmendmentDetails.AmendmentID, AmendmentDetails.ClientNr, AmendmentDetails.AmendDate,AmendmentDetails.EmailTo, AmendmentDetails.EmailCC,AmendmentDetails.From, AmendmentDetails.To, AmendmentDetails.Amendment, Amendmentdetails.HypToAmendment, Amendmentdetails.FilePath
FROM AmendmentDetails;
I have a button on the AmendmentDetails subform which when clicked open the frmInsContactDetails form allowing one to add a new contact.

I can't change to EmailTmpT table as per your example or maybe. So I want to implement the Multi-Select Combo Box on the AmendmentDetails subform for EmailTo and EmailCC. May it is not necessary to add EmailTo and EmailCC to the tblInsContactDetails only 1 email email entry which be use as To and CC. Below is a screenshot of the AmendmentDetails subform. Please excuse the hidden controls but I learn myself (still learning) with a lot I mean a lot of help from access forums and generous persons like you.
Amendment subform.png
 
Last edited:

johankotze

Registered User.
Local time
Today, 22:40
Joined
Jul 3, 2016
Messages
54
Arnelgp
Can I email my DB to your PM
I have a problem. My FE and BE are converted to 2007 - 2016 file format. I have a problem that Outlook pause/stop while running the amendment_click code. So just to make sure that all the users are up and running on Tuesday I change back to the older version and tested it, luckily I made copies. I then took another laptop (all so Office 2019) and put the FE on it. The BE still resides on the server but I have changed the file name.

Now, when I try to link the BE tables to the FE I get the below messages. The first time I did the conversion I did not got these messages.
Attachments and Calculated Fields.png
Link Tables.png

I winrar the FE and BE and is less then 10mb. Can I mail it to you privately if possible.

I think I find the culprit FE does not want to change from .mdb to .accdb when I do the Save as action. Going into the general properties of FE the file format is 2007-2016 but the extension is still .mdb
File Format.png


Oh I see for blank Database
 
Last edited:

johankotze

Registered User.
Local time
Today, 22:40
Joined
Jul 3, 2016
Messages
54
Arnelgp
I got the FE as an .accdb extension. Don't ask me how I just tried and tried but BE and FE is now .accdb

The Private Sub AmendmentInsurer_Click(), the above code is stopping. I looked at the Reference
I have not change the code but strangely it is working in the old version which to not have the Multi-Select Combo Box
 
Last edited:

Users who are viewing this thread

Top Bottom