Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Making and editing an agenda with Access...?!

Status
Not open for further replies.

Chiana

Technical User
Apr 13, 2002
5
FI
Hi!

I'm making an Invoicing Application with many complex features, Agenda of a meeting being one of them. The application should have the basis of the agenda which the users then can modify as they wish. The Agenda also needs to be printed out. Which would be the wisest/easiest way to do it with MS Access? A form, a report and how....? Could somebody please help?

TIA

Chiana

Chiana70@yahoo.com
 
Wow, so many options so little time. You don't mention your skill set, so you'll get many options offered here for agenda.
I never recommend printing out "forms". The best bet is to modify the data via the form and provide a function to launch a report or other output... So your options could be.

- 1. An Access report
- 2. You could use VBA automation to execute a pre-designed word document template and add the agenda information automatically
- 3. If you use Outlook as an e-mail platform, you could actually launch a Calendar meeting request, add the agenda detail to the calendar and cause it to be distributed to all attending members

What you do is dependent on your skills and ability to build an application. At a rudimentary level, Access provides you with a great number of wizards that make the "maintain on form / print out in Report" quickly acheivable with little programming effort.



petersdaniel@hotmail.com
"If A equals success, then the formula is: A=X+Y+Z. X is work. Y is play. Z is keep your mouth shut." --Albert Einstein

 
Hi!

You could call me a newbie :)
I have studied databases and application development but not nearly enough...

This sounds like a good solution:
2. You could use VBA automation to execute a pre-designed word document template and add the agenda information automatically

- But how is it done?

A little more detailed help would be really appreciated!

Chiana
 
The process of launching a Word document from Access and passing information to it requires a few steps.

First of all, in your Access VBA environment, you must set references to Microsoft Office Automation library and Microsoft Word Objects Library. (Assuming Off 2000, this would be ver 9.0)

Here is an example from Microsoft of launching a Word document in VBA and then writting specific data to bookmarked locations within the word document.

Private Sub MergeButton_Click()

On Error GoTo MergeButton_Err
Dim wordApp As Word.Application

' copy the Photo control on the Employees form.
DoCmd.GoToControl "Photo"
DoCmd.RunCommand acCmdCopy

' start Microsoft Word.
Set wordApp = CreateObject("Word.Application")

With wordApp

' Make the application visible.
.Visible = True
' Open the document.
.Documents.Open ("c:\My Documents\myMerge.doc")
' Move to each bookmark and insert text from the form.
.ActiveDocument.Bookmarks("First").Select
.Selection.Text = (CStr(Forms!Employees!FirstName))
.ActiveDocument.Bookmarks("Last").Select
.Selection.Text = (CStr(Forms!Employees!LastName))
.ActiveDocument.Bookmarks("Address").Select
.Selection.Text = (CStr(Forms!Employees!Address))
.ActiveDocument.Bookmarks("City").Select
.Selection.Text = (CStr(Forms!Employees!City))
.ActiveDocument.Bookmarks("Region").Select
.Selection.Text = (CStr(Forms!Employees!Region))
.ActiveDocument.Bookmarks("PostalCode").Select
.Selection.Text = (CStr(Forms!Employees!PostalCode))
.ActiveDocument.Bookmarks("Greeting").Select
.Selection.Text = (CStr(Forms!Employees!FirstName))
' Paste the photo.
.ActiveDocument.Bookmarks("Photo").Select
.Selection.Paste

End With

' print the document in the foreground so Word
' will not close until the document finishes printing.
objWord.ActiveDocument.PrintOut Background:=False

' Close the document without saving changes.
objWord.ActiveDocument.Close SaveChanges:=wdDoNotSaveChanges

' Quit Microsoft Word and release the object variable.
wordApp.Quit
Set wordApp = Nothing
Exit Sub

MergeButton_Err:
' If a field on the form is empty
' remove the bookmark text and continue.
If Err.Number = 94 Then
objWord.Selection.Text = ""
Resume Next
' If the Photo field is empty.
ElseIf Err.Number = 2046 Then
MsgBox "Please add a photo to this record and try again."
Else
MsgBox Err.Number & vbCr & Err.Description
End If
Exit Sub
End Sub


If you want more detail, Microsoft provides an Automation help file at there TechNet site. petersdaniel@hotmail.com
"If A equals success, then the formula is: A=X+Y+Z. X is work. Y is play. Z is keep your mouth shut." --Albert Einstein

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top