Update

bhelmy

Registered User.
Local time
Today, 09:53
Joined
Dec 6, 2015
Messages
62
hi all

I have a db in anther computer I need to make file can send by email to make user open it when the user open it maker a replace and add some Objectes to current database

i need to copy some Objectes by users with access update file
thx
 
Last edited:
You want to create a mail file with some Access-related data in it, send it to another user, and have that user do something that imports the data you sent.

It is a matter of what method you were using, but it is possible to do something like this:

1. Sender side: Create an Outlook.Application object
(Topic: Creating application object; Using application object)

2. Sender: Create an Excel spreadsheet by doing a DoCmd.Output variant that creates the spreadsheet from a query.
(Topic: Exporting a query to a spreadsheet)

3. Sender: Create a message. Attach the spreadsheet (as a regular Outlook attachment).
(Topic: Create Outlook Message; Attach Object to Outlook Message)

4. Create some recognizable SUBJECT line. Send it to the targeted user.
(Topic: Manipulation elements of a message; sending a message via Outlook)

5. Receiver side: Create an Outlook.Application object.
(Topic: Same as #1 above)

6. Receiver: Connect to the Inbox, look for messages with the expected subject line. For each such message, save the attachment to a folder and then move the message to some other folder than Inbox. (Maybe create a folder for processed messages of this type.)
(Topic: Reading Outlook messages; Manipulate Outlook Attachments; Saving Outlook objects to a specific file)

7. Receiver: Import the spreadsheet to a temporary table.
(Topic: Importing spreadsheets to tables)

8. Receiver: Run a query against the temporary table to do whatever updates you wanted to be done. Delete the table when done.
(Topics: Query manipulation; Deleting tables)

OK, that is the overview of the process. Every step along the way, you will need some VBA code to manage the process, though some parts are going to be easy - for instance, the OutputTo that exports a query to a spreadsheet is a common DoCmd option.

I gave you a list of topics for each part. Most of these topics have been covered in this forum. You can search for threads specific to these steps. You can also probably use the great Google-Brain to find more on each topic, though you might have to add "with VBA" to any topic searched on the general web.

We rarely write full chunks of code for people but we are happy to offer pointers. Hope this at least gets you going in the right direction.
 

Users who are viewing this thread

Back
Top Bottom