View Full Version : Sending PO's


RossWindows
03-31-2008, 12:44 PM
I have a database that we use to record customer and part information when customers need a replacement part.

I was thinking of doing a mail merge with microsoft word to pull the records that need a PO and send them to our vendors. The problem is, how do I make sure that a PO only gets printed/sent once?

There's probably a better way, but I'm out of ideas.

ajetrumpet
04-01-2008, 07:22 PM
it would help to explain what process you are going through...

RossWindows
04-01-2008, 10:50 PM
Well,

When customers call us needing a replacement part, our Customer Service Reps enter the customer's info into the DB through a form.
Each record is tracked by a field called status.
When the status is "Processing", it means that a PO Number has been assigned to the request/record.

The document that is pulling these records from the DB is a Word file using the mail-merge feature. The PO's it creates then get sent to the Vendor, but with mail-merge, there's no way that I can think of that will allow it to change the data in the DB.

If there is a way, then what I could do is make it change the Status to "PO Sent" so that it doesn't get printed/mailed again.

Not sure what other info is needed; Hope this helps...

ajetrumpet
04-02-2008, 06:30 AM
Do you want to change these values from inside of MS Word? Or while in Access? You are mailmerging while the DB is opened, correct?

You somehow need to capture the PO numbers that are being sent to the mailmerge function. If you can grab hold of them, changing the form status is easy...

RossWindows
04-02-2008, 09:25 AM
Okay. I guess I was going about it the wrong way.
So instead of opening the Word document and grabbng the data from the database,
I should open the database and export the data to the mail merge, and then set the data source of the merge template as that word merge file.

I was wondering if you could point me in the right direction for the following:
What I want to to then, is write a macro or something that will take all the records that are in "processing" status, (probably using a query), send those records to the word merge file, and then change all of those record's status to "PO Sent".

Are there some functions or code that you know of that I can start researching?

RossWindows
04-02-2008, 09:07 PM
As I was doing some research, I found that an update query is probably what I want (as far as updating the request status of each record printed).

When I write a macro to send certain records to the word merge using Transfer Text,
Can I select the update query as the source of criteria?

ajetrumpet
04-03-2008, 07:10 AM
When I write a macro to send certain records to the word merge using Transfer Text,
Can I select the update query as the source of criteria?I don't think so. It's an action, not an object.

RossWindows
04-03-2008, 06:00 PM
Well turns out, I figured it out.

I created a basic query that contains the fields I need for the word merge.
The query also contains the status field.

I also created an update query (the source of which is the basic query) that contains 1 field, the status field.

The update query changes all the records that show up in the basic query so that the status' change from "Processing" to "Sent to Vendor"

All of the above are controlled by a macro with two lines:
TransferText & RunQuery

After I run the macro, the only thing I have to do manually, is open the PO template and merge the data.
When I have some more time, I could probably automate that too.

The only thing to do now, is update the form to run the macro in a more user-friendly manner.