rdavis wrote:
> I have a lot of documents that go out to new employees. There are a core set
> of documents that go to all employees. However, depending on what type of
> employee I have, (union, non-union, CA employee, WA employee, etc . . .) they
> will or won't get other documents.
>
> Is there a way to set up an access database, enter in certain information on
> the new employee, and only the documents I want associated with that type of
> employee would print?
>
> Also, if I type the employees name in can it be populated throughout all of
> the documents (like a mail merge)?
>
> Thanks in advance for your help!
I don't think you really need VBA for this... (although it wouldn't
hurt!) You might want to grab Albert Kallal's WordMerge stuff from his
website, because it encapsulates a lot of this stuff for you, so you
wouldn't even have to understand how the innards worked.
not so with the queries (unless someone builds them for you).
Table structure/relationships
tblDocument(DocumentID, FriendlyName,UNCPathToFile,
CoreDoc(yes/no),...) alias D
tblEmployee(EmployeeID, Firstname..., EmployeeTypeID...) alias E
tblEmployeeTypes(EmployeeTypeID, EmployeeType) alias ET
tblMailings(DocumentID,EmployeeID,ReceiptDate) alias M
tblTypeReceivesMailing(EmployeeType,MailingType) alias TRM
for CoreDocs:
SELECT D.FriendlyName, E.EmployeeID, E.FirstName, E.LastName...
FROM Employee As E, Document As D;
this creates a cross-product (all docs times all employees), then you
can filter for which ones you want.
for types of employees receiving types of docs
SELECT D.FriendlyName, E.EmployeeID, E.FirstName, E.LastName...
FROM Employee As E, Document As D
WHERE E.Type="sometype"
AND D.DocType="SomeDocType";
Yes, I know.... there are several fields here that have bad field names
etc... It's an outline, not real code.
To answer your question:
you could create a series of tables to store the data and then query to
get the set of "who gets what document" and then send those results to
various mailmerge templates using Albert's code. Wouldn't be that
hard, I don't think. Might require a bit of code, but as for feasible?
yes. absolutely. For a total beginner, probably not.
|