Modules & VBA :: Sending Message To Users Logged Into DB On Different Servers?
Jul 23, 2013
I have some code that when a check box in a table is ticked, sends a pop up message to the users logged in (message is on a hidden form), then it closes the DB after a pre-dtermined period of time.
The problem I'm having is that we are a large site with a about 25 differnet servers that our users log onto via Citrix, when a user is on a different server it isn't displaying the message nor closing the DB down.
trying to achieve this? Or is there a better way to see who is logged in and get a message to them?
I'm using Access 2003 btw
Code I'm using below
Code:
Option Compare Database
Private Sub Form_Load()
Me.TimerIntderval = 10000 ' change to 300000 for about 5 minutes
End Sub
Private Sub Form_Timer()
DoCmd.Close
Application.Quit
End Sub
Recording to a table Who is logged on to Database, When they logged on and when they logged off. Gets tricky as I really would like the info to come from the mdw file(all users go through this for access) If someone can help would be great. Need my hand held for this as I have been attempting to do this for over a month with no real success. I have so many samples that don’t quite make it happen I am now totally confused.
I would like to create a form that will show the users connected to the database. It would be kind of a tracker who opened the database to work on some cases. The form could show all users from the datbase from top to bottom and to the right a green or red round dot that she/he is active opened the database or not active (closed the database or did not open it still)
I was thinking that it could be applied when the main form opens and that form captures the login from windows into the "tracker" form.
I guess it will only work when the "tracker" form is first open. If the "tracker" form is open later, how to capture those logged in earlier?
I am sending an email from a button, and it runs a word merge and then attaches that word document and two others two an email. All that works fine, but in the body of the email the carriage return is not working.
I've tried "vbCrLf", "Chr(13)" and "Chr(10)". but none of them are working in this email. I use vbCrLf all of the time in many other emails and it works fine.
Code:
Public Function SendEmailFinancial() Dim MessageBody, vAttach1, vAttach2, vAttach3, vTo Dim appOutLook As Outlook.Application Dim MailOutLook As Outlook.MailItem
[Code] ...
This is what the email is looking like when it comes out:
Project ID: 2013YG00229 Project Title: Toolbox Talks Construction Safety Guides and Mobile App Program Manager: Shana Peschek I am attaching three (3) forms that are needed in order for the State of Washington to process grant payments for your organization for the purposes of carrying out the activities outlined in your final approved application.
I have a list box with a row source query as follows...
SELECT qryPendingCompletions2.ID, qryPendingCompletions2.Department, qryPendingCompletions2.[Employee Name], qryPendingCompletions2.CompletionDate AS [Completion Date], qryPendingCompletions2.[Entered By], qryPendingCompletions2.Goal, qryPendingCompletions2.Comments, qryPendingCompletions2.[Verified By] FROM qryPendingCompletions2 WHERE (((qryPendingCompletions2.Department)=[cbocurrentemployee].[column](3)) AND ((qryPendingCompletions2.[Verified By]) Is Null)) ORDER BY qryPendingCompletions2.Department;
I also have a combo box at the top of the form showing what user is logged in where the row source query is the following...
SELECT Employees.UserID, [First Name] & " " & [Last Name] AS EFullname, Employees.AccessLevelID, Employees.Department FROM Employees WHERE (((Employees.AccessLevelID)=1 Or (Employees.AccessLevelID)=2 Or (Employees.AccessLevelID)=3 Or (Employees.AccessLevelID)=4));
How to only list the data in the list box when the department is the same as the logged in user.
So I'd like to add the criteria to the first query something like criteria = [cbocurrentemployee].[column](3) but this doesn't seem to work as criteria in queries.
I just created a fix to an issue found in my database. I need to get this fix to several users in different locations. Does anyone know of a way that I can do that throught email without having to send the complete database? My fix is meerly an addition of two item in a macro. The end users do not have permision to get into the main database, they only have user rights on a few forms. Is there a way to create a macro that would, when executed on the remote PCs, delete the old macro and replace with one sent via email? If so, how would that macro be structured?
I have a odd problem, within my database I have around 20 users spread access a number of sites with no email access.At some points the users need to pass short messages to me and in time other users.My only idea is to have a seprate table in the database which users could add messages into which I would have to look in, but hope to find a better way.
Continuing with production of my database I've come across another wall that I'm trying to pass. My aim is when the user press the "Quit" button it will export everything to a file which is stored on Google Drive as google drive is installed on the laptops that will be using this database.
However the problem is Google drive is stored in the computer user files i.e C:UsersstudentGoogle Drive - is there a way to retrieve the name of the user that is logged into windows?
Code:
Private Declare Function GetUserName Lib "advapi32.dll" Alias "GetUserNameA" _ (ByVal IpBuffer As String, nSize As Long) As Long Private Declare Function GetComputerName Lib "kernel32" Alias "GetComputerNameA" _ (ByVal lpBuffer As String, nSize As Long) As Long Function ThisUserName() As String Dim LngBufLen As Long Dim strUser As String
[code]....
However cant get this to work - I think that is probably because i'm declaring this code in the wrong place - I've tried declaring the private functions in a class module and the functions in a module - however no success - How do you set this code up? Or is there a new way to do this?
I have this code below its giving me the RUntime 2295 error. Unknown message recipients. I have check all email addresses and they are fine. Everything else works except when it gets to Outlook and do not send email. I did a Debug Print but didnt understand how to do it.
Private Sub Command9_Click() Dim rst As DAO.Recordset Dim strEmailAddress Set rst = CurrentDb.OpenRecordset("T_Inspectors") Do Until rst.EOF
I'm looking for some code to be able to send a popup or system message to a user connected to an access 2007 database. I know the computer name connected, but I'm not sure who or where it is. I already have a method for kicking everyone out of the database, but I really only want to use that when necessary. I would prefer to try a more gentle message request for them to disconnect first.
I have created a profiling form for my school. Each boy can access his form using his admission number ( Adno) which is the primary key. On the form are lots of sub forms - for things like favourite authors, clubs, teams played in etc - but these don't have a primary key ( as they are automatically linked to the Adno via the main form ). Unfortunately when several boys are filling in their own forms at the same time I keep getting error messages, one says that the data can't be updated and another says that there is a primary key problem.
I have developed a db (A2K) which will be distibuted through our companies franchising system to various licensees. These licensees generally operate in a single PC environment but occasionally they will be based on a server network. The single user is fine but I am stumped by the server situation as it impacts on the various links I have set up within the database to files etc that are part of the program but are external such as Excel, Word files. The current links are all set up as C:MainFolderNameFilename. Of course these all stop working when I place it on a server and link the users up via shortcuts. On our own installation I changed the links to the \MyServerMainFolderNameFilename format and everythings fine but due to the number of links this is a fairly lengthy process and I wouldn't want to have to repeat it at every clients installation.
Can any one please advise me if there is a way to set it up so that I could say enter the clients server name in a field. Then insert that field's contents into the pathway details for the links so that they all update automatically.
I have a multiuser database where the tables are split from the rest of the database and is being used by three locations. That portion works fine, BUT the traffic makes it horribly slow to the end user. The servers are located in Dallas and both east and west coast users access the information. Just doing updates makes me tense!! So I duplicated each database and positioned them on each locations home based server. Runs great no problems....But the information needed for work and reports is now written to 3 databases all with different server names. ( I realize this is more of a network issue but there is no way around it) My issue is that I need to get to that data from all three locations and combine them so that it can be worked and reported on....THEN sent back to the database from which it came. I tried to build a macro that would go to each database, retrieve the information into one server location but when I put the path name in it defaults to my local database rather than the one I am pointing the path to. Anyone have any ideas on making this happen?
i have a database file that holds 1 inventory table.
Then i have 2 other database files that represent 2 retail stores.
my problem is that the store files have a form which acts like a sales invoice. The sales order number is an autonumber. this worked fine in the past with local network setups, but now going to a server the issue is that the sales order numbers cannot be the same from one store to the other. Since its related to the inventory table it steals the invoice from one store to the other..
i tried formatting the autonumbers differently.. like /100 on one and /3000 on the other. And they are still the same autonumber anyway.. the format doesnt mean much other than a different display..
is there a way to control the auto numbers to be in a specified range of numbers...
i would like to be able to say for store 1 the sales order numbers can only be from 1000-5000 and store 2 6000-9000...
I have a database that consists of one server.mdb which houses the tables and a folder called users with an individual folder with a copy of client.mdb for each person (This helps see whos on and whos not). The server is in the networks root directory and the clients are in a users/name/ I just moved these files from a windows 2000 server to the linux server and now only one person can access the database at a time - The Microsoft Jet Database Engine cannot findopen file VET/tier2/server.mdb someone has the file opened up exclusively or you need permission to view the data. Nothing has changed other than the network path and I relinked the tables and compacted and repaired both the server and the client.
I'm working on a database for work that email's the current record after the form is completed. I have a attachment field in the table called Photo and some record's have a photo attached and other's don't. The code below works great with records that have a photo attached, but I get a path not found if I try to email a record that does not have a photo. I know that I need to put some form of code to check the photo field for a attachment, but I'm having a brain fade as to just what the code is.
Code: Private Sub eMail_Report_Click() Dim oFilesys, oTxtStream As Object Dim txtHTML As String Dim appOutLook As Outlook.Application Dim MailOutLook As Outlook.MailItem
I use a macro (SendObject), which works, but it requires Us, or someone to go into Outlook to click on send.I'm new to vba, do I have to code something on outlook to send automatically?
I have searched high and low for sending a simple UDP command. It looks like it might have been possible with older versions of access but the newer version maybe not. Sending a simple UDP command via VBA. I just want to take a number from a query and broadcast it to 10.20.20.255 via port 5000. very simple but yet seems impossible.
I have the following code in a module that sends out various email updates to me when I'm off site. On my PC it works perfectly whether I have Outlook open or not. I've installed the database on several other machines, but I'm getting a Run Rime Error 287 on the .Send line if the user has Outlook closed. Any setting somewhere in Outlook or Access that needs changing? Or is there something that can be changed in the code to ensure the email sends whether Outlook is open or not?
Code: Public Sub SendEmailNotification(strSubject as String, strMessage as String, strAddress as String) Dim olEmailApp As Object Dim olMsg As Object Dim strEmailBody As String Set olEmailApp = CreateObject("Outlook.Application") Set olMsg = olEmailApp.CreateItem(0)
I am a College Instructor and I would like to make a Database that will regularly email me a list of Students who are approaching the mid-point of their Program.Is it possible to program Access to email a list with Student Names, Registration Numbers, etc, etc. by a given date?
As of right now I have a Database with all of the students' pertinent information but I have to manually comb through the Database each week to see which students will require a Mid-Term interview that week.
Using Access 2010; I have code that generates multiple emails to send using outlook. It works fine except that all emails go to my draft folder and I have to go the outlook and send them individually. This is fine when I have under 10 emails; but sometime it can get up to 50 or even 100 emails. What I have to do to send them from my draft all at once. The emails go to draft to inspect for errors.