Modules & VBA :: Working Directly With Exchange Server?
Jun 23, 2015
As part of a larger system I currently have a standalone A2010 program which processes emails that it sees within Outlook. As my client is moving to Exchange Server I was wondering whether there was a better way of doing this by getting rid of Outlook and "talking" directly to Exchange.
First of all I hope this question is relevant to this part of the forum, I thought this was the best place to put it, but my ignorance of the subject may mean it ends up being more closely related to one of the other areas.
I'm struggling with some statistical reporting on Email Enquiries, which I'm currently doing manually using Advanced Find in the Outlook Public Folders and putting counts into an Excel spreadsheet. I find the whole thing quite ackward (as you might imagine), and the Advanced Find in Outlook frustrates me as it can be quite limiting.
What I'd like to do is set up an Access Data Project as a front-end for the Exchange folders concerned. I'm pretty well versed in MDB's but I've never set up an ADP before. I assume this is possible as I'm under the impression that MS Exchange is basically an SQL Server database. Is this correct? Will I be able to configure it using the Wizard that appears when I create a new ADP (if given permission by the MS Exchange Admin)?
I had in the pass written a program in Access 2000 that would directly output reports to WinFax. It wasn’t the fastest solution but it worked just fine. I no longer have a WinFax Server. So that solution is no longer an option. Is there a way for me to do the same thing with Access 2000 and Exchange Server? The idea would be, to be able to print the 200 or so price list and have them faxed out using Exchange Server. These are not a broadcast fax each price list would be faxed to a different number. I am using SQL SERVER 2000, Access 2000 and Exchange Server 2003. Any help would be greatly appreciated.
I have a SQL Enterprise server that I am using a MS Access to remotely access and populate the tables from my laptop into a database.
Based off of the linked data between my project and the true SQL database, I have created some Access Data pages for interacting with the data.
What I need to know how to do is how do I modify the Access Data Pages (source code), so that instead of using my local access project file for source of data it points directly at the SQL database and can operate on the web only interacting with the SQL not my computer anymore.
---Greater detail if I didn't do a good job with the description above---
SQL Server A has database 'Helpdesk'.
IIS Server B for webpages (.aspx).
Computer B has a .ADP (Access Data Project) called 'helpdesk.adp' which is linked via SQL username and password to Server A's 'Helpdesk' database.
Computer B has several Data Access Pages that are used to manipulate the database data.
Problem1: Convert Data Access Pages to normal web pages (.aspx) on Server B so that they talk directly to Server A's 'Helpdesk' database via SQL username and password and no longer care about any reference to Computer B?
Problem2: What functionality from Data Access Pages can not be carried over to a (.aspx)?
I have a form which on selecting a command button sends out an email to a manager to say a specification is ready to be reviewed (this contains a link to a sharepoint site where the spec resides). The "approval" details are stored in by DB also so I would like to have included in that email a link back to the access db and the particular record so the person receiving the email can easily approve, if that makes sense.
Here is my code for generating the email (at the point "To approve please click here" is where I would like my link to go):
[i][i] Set OutApp = CreateObject("Outlook.Application") Set OutMail = OutApp.CreateItem(0) strbody = "<font size=""3"" face=""Calibri"">" & _
Can you send a report directly to the printer? We have Clients with multiple Contact Notes, by multiple Clinicians, each of these are separate tables. Every month we print two reports for each client that had at least one contact in that date-range. Usually 200 clients, takes a lot of time. My approach so far is a query within a make-table query to get a list of unique client ID's that had one contact in the date-range. Then I use that table in code to create a recordset, use a Do Loop within that where I print the two reports for the 1st client, move to next record and loop. Now that I've got it working I'm not sure how to print all the reports My 1st question, can you send a report directly to the printer from code? The printer is a networked Konica Minolta Biz-hub so I think it can handle that many jobs being queued that fast.
I have a form that works out the cost of products from £ to € by calcuation where the user puts in the current exchange rate into an unbound text field.
i was wondering is this is at all possible: to get the current exchange rate automatically off the internet from some kind of website
i would love to hear suggestions.. what kind of problems i am likley to encounter or if any one has attempted or succesfully managed to do this or something similar.
I've got a table with different customers and different rates that they offer for certain products. The problem is that different customers deal in different currencies. The currencies are one of three; Euro's, Pounds or Dollars.
I would like to create a query that would convert each customers rates to the same currency (pound).
The information is divided into 2 different tables. A customer table and a product table. I've created a form that is based on the customer table and features the product table as a sub-form.
What I would like to do is have an option that would enable me to enter the current exchange rates (as they are constantly changing) which would be used to convert the individual rates depending on the currency used by customers.
I have searched the forums and did not see the question I am about to ask.
I have created a link table in Access to the exchange server at work. When I try to get someone to view the table I created they can not view it. When I look at the Link Table Manager it shows the link is pointing to my personal temp directory instead of the main folder in exchange. How do you link the table to a folder that all can see?
It seems like I've been all over the web searching for a solution, and I'm almost convinced it can't be done, but something makes me press on. Here's what I'm trying to do:
A user opens a form in Access. The user clicks a button on the form which opens a "browser" that actually points to an Exchange mailbox. After the user selects a message (or perhaps several messages), they click a "save" button, and the messages, their contents, and attachments are all archived out to a folder on a network drive and then are deleted from the Exchange server.
It seems pretty simple, sort of like envoking a file dialog, only pointing it to Outlook/Exchange. I've even tried linking the Exchange folder as a linked table, but I keep hitting a brick wall. Perhaps it's coders' block?
If anybody has any suggestions, they'd be greatly appreciated...
I have two tables - one with parent Records, the other with child records. The ID links the two tables .I want to add a sequence number on the child table which resets at each ID change. What would be the best way to accomplish this?
Code: PC_ID ID Name Address
P 1 Parent1 Address1 P 2 Parent2 Address1
PC_ID ID Name Address SEQ
C 1 Child1 Address1 1 C 1 Child2 Address1 2 C 1 Child3 Address1 3 C 1 Child3 Address1 4 C 2 Child1 Address1 1 C 2 Child2 Address1 2 C 2 Child3 Address1 3
In the code below I want to wait for ten seconds if there is connection to the server, if not to exit the sub with message "No connection to server". How to check it
Dim req As New XMLHTTP60 Dim resp As New DOMDocument60 Dim xmlNodeList As IXMLDOMNodeList Dim myNode As IXMLDOMNode Dim xmlNode As IXMLDOMNode Dim presription As IXMLDOMNode
I am populating Access table using a stored procedure from SQL Server. Here is the code that does the populating.
The problem area is the rst!id (highlighted in red). This is the Identity Column from SQL Server. When Access gets to 32768 it results in a blank in the Access Table. Ive Included the picture.
When I step through the loop and get to that 'id' I can see that the next value is there, by hovering over 'rst!id'. So I know that the value is not NULL but it does not record it in the table.
This continues for the remainder of the load, which is few more thousand rows.
Code: Do Until rst.EOF strSQL = "INSERT INTO tblStationPatronageEstimate (pax,transactions,time_band,day_type,entrance, " & _ " from_date,to_date,id,station_entrance_id,number_of_days,average_pax_per_day, average_tran_per_day,vr_used_name,vr_used,userid, " & _ " time_stamp, completed,comment) " & _
I have an application that I have automatically checking to see if tables are valid and connected, etc. If the app finds that the tables aren't connected or aren't working, it automatically tries to re-connect those tables in the background without the user's knowledge. The time I'm having trouble is if the SQL Server doesn't exists (the back-end tables are on a SQL Server). I would like to check to see if the SQL Server exists before I try to re-connect tables so that no SQL Errors pop up but I'm not sure how to figure that out with VBA.
How I can check if connection to SQL server is established with VBA before the SQL is executed. btw I use VPN connection to connect to sql server, and some times VPN connection is going down in middle of work and it is quite unconvinced.
I have an access front-end package that works just fine but if there is an update, I just want the program to run scripts to update the SQL Server tables that it is connected to. I just don't know how to do this. I know how to do this on SQL Server Management studio and all, I just was hoping I could do it straight from my access front end so that a user could just click a button and update the tables or something.
I have a vbs-script that opens my access database db.mdb and runs the module "Export":
dim accessApp set accessApp = createObject("Access.Application") accessApp.OpenCurrentDataBase("D:Datadb.mdb") accessApp.Run "Export"
accessApp.Quit set accessApp = nothing
This works fine as a scheduled task on a Windows 7 computer.
Is there a way to make this work on a Windows Server 2008 R2 ? When I double click the vbs-file, the file opens instead of runs. And when I create a scheduled task, nothings happens.
I'm trying to store files on a linked SQL Server table, much the way I would using the Attachment data type in Access. (I couldn't use the Attachment data type, though, due to size restrictions - we're storing about a gig a week.)
Almost everyone says to store the attachments on a file system and save the location - I can't do that because of varying permissions. The files HAVE to be stored in the SQL Server table for security reasons.
So how do I do it? I've tried converting the files to binary and updating the recordset that way, but it always comes back as null. I'm not sure what I'm doing wrong.
Code: Public Function Test(strFile As String) As Boolean Dim rsAtts As dao.Recordset Dim ifilenum As Double Dim btAR() As Byte Set db = CurrentDb
Front end Access 2010, back-end SQL-server 2008 R2.
Normally I retrieve a certain value by Dlookup("myvalue", "mytable",...)
or
strSQL = "SELECT myvalue FROM mytable...;"
Set rs = CurrentDb.OpenRecordset(strSQL, 4)
But is there any faster way to retrieve a single value from an SQL-server table, beside doing doing the select by a stored procedure running through a pass through query, then open a recordset
Set rs = CurrentDb.OpenRecordset("mypassthroughquery")
just to retrieve ONE value?
I could not find something like DLookup("...) for an SQL-Server or in T-SQL.
I found and modified this code to allow me to check (fast) if a file exist on a http server or not (without downloading it).
Code: Public Function CheckNetFile(WebFile As String) Dim XmlHttpReq As Object Set XmlHttpReq = CreateObject("Microsoft.XMLHTTP") XmlHttpReq.Open "HEAD", WebFile, False
[Code] ....
In the above code I managed to declare Webfile as a string so I can call on it later but one thing I still need to tweak is to also get a result out of the test code in a better way than having to publically declare the "CheckNet" variable somewhere else in my app.
First prize would something like this:
If CheckNetFile ("http://www.mysite.co.za/test/test.txt") = 1 then "Yes" else "No"
How do I build the 'booleon check' into the original function?
I have an Access 2010 application that talks to SQL Server. Part of the application creates tables on the SQl Server and inserts data to it (I know SQL Server has its on data inport/export wizard and bulk insert capabilities but for reasons outside of my control it needs to be done from Access). So I have a connection to the SQl Server and i have VBA that happily executs SQL statements on the SQl Server. The problem is I want to return a recordset from the result of a SQL query issued to the SQL Server. The idea being to check for the presence of tables already created, and if so, append to the already existing table, otherwise if it does not exist, create it and insert data to it.Ive tried the following code but it seems no recordset is being returned:
Set objConnection = New ADODB.Connection objConnection.Open "DRIVER={SQL Server};SERVER=10.200.3.14;trusted_connection=yes; DATABASE=" & Me.Combo54 strSQL = "SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_TYPE = 'BASE TABLE' AND TABLE_NAME = '" & Me.Combo54 & "'" strSQL = "USE " & Me.Combo54 & " " & strSQL Set Rst = cmd.Execute("USE " & Me.Combo54 & " " & strSQL)