We have received reports of Total Access Emailer crashing when attempting to use the VBA function TotalAccessEmailer_SetPasswords to update the password for the SMTP Server.
- Error Description: The field is too small to accept the amount of data you attempted to add. Try inserting or pasting less data.
- Error Number: -2147217887
- Procedure: p_TotalAccessEmailer_SetPasswords
The encrypted password is longer than what can fit in the default 255 character text field.
Here is an example of the code that calls the TotalAccessEmailer_SetPasswords function from the Total Access Emailer sample database. It's writing the LogonPassword to the options table that you specified. If you didn't specify a MS Access table name, it uses usysTEmailerOptions. This table is (by default) configured to allow a password length of 255 characters, which is enough for most needs. However, if you've changed the data type to allow fewer characters (or you are using a different table that does not allow enough characters), this crash will occur.
Dim strError As String On Error GoTo PROC_ERR DoCmd.Hourglass True Me.Refresh ' First, use the TotalAccessEmailer_SetPasswords function to encrypt and save the passwords If mfPasswordChanged Then strError = TotalAccessEmailer_SetPasswords(Nz(Me.txtLogonPassword, ""), Nz(Me.txtFirewallPassword, "")) End If If strError = "" Then ' Validate the server settings strError = TotalAccessEmailer_SMTP_IsValid
Simply change the datatype for the password field in the table you are using to allow a longer password. The easiest fix would be to change the data type of the table field to Memo.