Sendobject - send from address selected randomly

kdvorkin

Registered User.
Local time
Yesterday, 18:01
Joined
Apr 2, 2012
Messages
16
Hello,
I have a working section of code that sends an email using SendObject, but the SendObject command seems to select the "send from" address unpredictably when there are multiple users in the database at the same time.

I know that the from address cannot be specified using SendObject, but the property must get set somewhere because sent emails in Outlook appear to come from a specific user.

My main question is, since the "from" property of the email is not set by the command, but the property is clearly set somehow, how does SendObject identify from whom emails are sent?

The problems I've see that alerted me to this issue are:

1. When multiple users are in the database simultaneously then occasionally but not always one user gets emails message popup to edit that appear to come from another user.

2. When multiple users are in the database simultaneously then occasionally but not always one user sees emails for editing that pop up on their machine when the other user is in fact sending and editing the email on a different machine.

Any thoughts out there? Thanks in advance.
 
This sounds utterly weird. What is your setup? Does each user have own frontend, or do they all work in the same copy of the db placed on the server? Even in that case I have difficulties imagining how to achieve your spectacular effetcs.
 
It's a split database, and each user has their own front end.

It's a somewhat strange setup, and I believe I know the source of the problem, but am not sure how to fix it. If I knew more about how the send object identified "from whom" then I be able to start troubleshooting.

Here's the general setup: Users fill out a form, and click a button to send the email. The button then uses VBA code with the DAO library and query results to pull some necessary information together, and select the appropriate recipients from the table into which the form data goes.

I only want to send the email that summarized data entered into the current form, so I'm using a Max of the record ID to get to the last entry. But when multiple users fill out the form simultaneously, I think I'm getting problems with this Max record ID...like if one user is in the middle of filling out the form, and doesn't click the email button before another user starts inputting another record. I can provide more details, but for now will stop here.

Is there a way to pass the current record Id into a parameter, and then pass that parameter into my query that pulls together email information using VBA?

Good to know that someone else thinks this is wierd too!
 
What, specifically, is "It's a somewhat strange setup, and I believe I know the source of the problem, but am not sure how to fix it. "

WHat you are writing contravenes everything I know about systems and sessions (admittedly, not much). Normally a user session is holy, in it's own space, with all the local setings, and nothing can touch that. AFAIK SendObject gets its data from windows - the default windows email client set up for the given user.

Do your users all work on the same windows user account or does each user have his own?

The issue of messing up data with concurrent user is one thing, but to activate, in one user session, something in someone else's user session is simply astounding

To clarify.

Are you saying the one user prepares an email message in your application, presses send or OK or whatever (in access) to complete the process and the email pops up in someone else's outlook open for viewing?

Or are you saying that a given user sees mixed data, meaning that someone else's data also appear in the data this particular user was preparing?
 
Last edited:
Let me start by saying that what you know about systems and sessions is lightyears beyond what I know. All I know is what you told me in your previous response.:)

The strange setup part I'm referring to is within the coding for the sendobject, not with windows.

Each user has their own windows account, and is logged in separately...and that's why I can't figure this one out.

The way you're describing things...

"Are you saying the one user prepares an email message in your application, presses send or OK or whatever (in access) to complete the process and the email pops up in someone elses outlook open for viewing?"

...is correct.

But the email also shows up on the user's screen who clicked the send email button, and after the original user sends the email the email is still open for editing and sending on the other user's screen. I think there's the possibility of sending the same email 2X

...that is...so I'm told.

Since I don't understand how this is happening, I'm having trouble reproducing the wierd results. The users who are seeing it are only seeing it occasionally, so they too wouldn't be able to reproduce the behavior on command.

Thanks for all your attention so far. You've been right on in terms of understanding what I'm describing.
 
Congratulate your users on accomplishing a feat that I hitherto believed was impossible. :D

We are talking about a "plain" application, i.e. each user has on his local drive a front end , all linked to the same backend on the network?

No Citrix, Remote Desktop, TeamViewer, VNC or anything like that?

(anyone else reading this and knowing anything sensible please do chime in - I am at my witts' end, like the OP)
 
A first...great.

And yes...it's a plain old front end linked to tables on the back end, back end stored on the server, and front end stored locally on user's machines.
 
Sorry...I missed this in your previous post:

"Or are you saying that a given user sees mixed data, meaning that someone else's data also appear in the data this particular user was preparing?"

In addition to the other problem where one user mysteriously can do things on another user's machine, sometimes when this wierd thing doesn't happen this other thing does: the email popup only shows up on the current user's screen just as it should. The data in the email is just as it should be, but the only thing that's wrong is that the email appears to come from someone other than the current user.

Another first?:confused:
 
Bump

This one is the weirdest thing I have heard for ages. For a plain vanilla installation this is simply not possible, and yet you say you have a plain vanilla installation with added "benefits".

Anyone else out there?

Meawhile - can you show the code that uses SendObject: where does it get its data and recipient info from? The entire procedure please.
 
To help better understand what I'm doing here, this is part of an electronic system for managing student discipline records at a high school, and I'm just a physics teacher with some release time to help 'manage data'.


Thank you all for your attention to this so far. It's good to hear that this behavior is as strange as I thought. I really appreciate your help to try and sort it out. I've been stuck on it for a while.


Here's the code for the sendobject command. I've had to attach it here because the forum thinks there's email messages in here, and because I only have 6 posts, it won't let me put the code right into my response.

The emails are pulled from multiple tables within the database, one for recording incidents, one for student emails and guardians, and a separate for teachers.


The "Email Query" pulls all of this together, and limits the list to the max record ID to get just the latest entry to populate the data fields in the email. I think this max record ID is the source of my problem, but it doesn't produce errors the way I would have expected it to.



Thanks for looking and thinking!
 

Attachments

Thx - I had a peek, and cannot spot anything that would warrant the behaviour you describe. So either I am blind, or the culprit is elsewhere, which means that I have no clue.

OT: What the heck is "just a physics teacher"? Anyone able to convey wisdom to hoi polloi is not "just" anobody!
 
This may be a dumb question: Do the users have other users' mailboxes open in their profiles? (Not an uncommon thing to do to be able to see other people's diaries and inboxes.) Not that I'd expect that to cause this behaviour but as a physicist I'm sure you'll appreciate the approach of looking for patterns in the phenomenon. If so, does it only happen to such users (between such users)?
 
I think that users have only their own inbox, but I will check into it. Today's goal will be to try and actually observe this behavior first hand.

Compared to this teaching physics is easy. At least there things are predictable...even the teenagers :D
 
Users are in Windows 7, and Access 2010. The two users in particular who are seeing this problem are both running the front end as a .accdb file rather than an .accde

I had some trouble getting the .accde file to work on multiple machines until I found the need to "compile database" from within the VBA editor before publishing...thanks to the very helpful users in this forum!
 

Users who are viewing this thread

Back
Top Bottom