By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,950 Members | 1,032 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,950 IT Pros & Developers. It's quick & easy.

Automate generation and distribution of forms

P: n/a
Hi,

I have an Access 97 database where the users loads the data (from
multiple sources) and generates forms (that looks like reports) at a
click of the button and the user saves the form as .xls and
distributes to other users via e-mail.

I need to automate the process of generating the forms, saving the
report and distributing to other users via e-mail

Can someone guide me in the right direction?

Thanks,

Audrey
Sep 25 '08 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Hi,

I have never done this with Forms (always with Reports).

Anyway try something like this air code:

Sub PrintForms()
Dim db as database
Dim rs as Recordset
Dim strPath as String
Dim strFileName as String
Dim strMyForm as String
Dim strFullFileName as String
Set db = Currentdatabase
Set rs = db.OpenRecordset("tblFormNames")
Set strPath = "C:\"
rs.MoveFirst
Do while not rs.EOF
strMyForm = rs!FormName
'I don't know if Forms can be output as RTF but this works with a
report
strFullFileName = strPath & rs!FormName & ".RTF
DoCmd.OutputTo acOutputForm, frmMyForm, acFormatRTF, strFullPath,
False
rs.MoveNext
Loop
rs = Nothing
db = Nothing
End Sub

That will get your forms printed and into a directory. Emailing them
depends very much on the local email client but google the group for "send
Email" and you'll get a variety of solutions.

Kevin
<au********@gmail.comwrote in message
news:bb**********************************@m45g2000 hsb.googlegroups.com...
Hi,

I have an Access 97 database where the users loads the data (from
multiple sources) and generates forms (that looks like reports) at a
click of the button and the user saves the form as .xls and
distributes to other users via e-mail.

I need to automate the process of generating the forms, saving the
report and distributing to other users via e-mail

Can someone guide me in the right direction?

Thanks,

Audrey

Sep 26 '08 #2

This discussion thread is closed

Replies have been disabled for this discussion.