Complicated Coding, Help

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi Everyone;

Hope someone can help me out. I realize this might get a little
complicated.

Is it possible to do the following:

I have one form which I enter maintenance charges into, which then go to the
database.

I want to be able to Enter in the maintenance information, and when I hit
submit, a page prints out with a predetermined account number which is
attached to the vehicle number (Primary Key). The original record would
still of course go into the database.

Does this make sense to anyone? Is it doable?
 
Yes and no. The general idea is relatively simple. However, it would be
very hard for anyone here to give you exact code for your situation without
more information.

That said, you will need to create a click event associated with the submit
botton which will simply print a report using the filter variable.

What to do.
1. Create a report based on your table information or query that is used to
populate your form. Don't worry about it displaying all the record from the
table that will be taken care of in your code later..

2. Add your submit button and add a click event.
You need to add code similar to this
docmd.OpenReport "ReportName",acViewNormal,,"[PrimaryKeyFieldName] = " &
Me.PrimaryFieldControlName

The acViewNormal will print the report instead of displaying it to the user.

Here are a few good resources on this subject.
http://en.allexperts.com/q/Using-MS-Access-1440/Printing-current-record.htm
http://articles.techrepublic.com.com/5100-10877-6160599.html
http://www.mvps.org/access/reports/rpt0002.htm
http://www.databasedev.co.uk/print_form_record.html
 
Daniel;

Figured it would be kinda complicated. I just wanted to make sure it was
doable before I put tons of time into it. Thanks a lot for your help and
links, I really appreciate it!

Daryl,

Daniel said:
Yes and no. The general idea is relatively simple. However, it would be
very hard for anyone here to give you exact code for your situation without
more information.

That said, you will need to create a click event associated with the submit
botton which will simply print a report using the filter variable.

What to do.
1. Create a report based on your table information or query that is used to
populate your form. Don't worry about it displaying all the record from the
table that will be taken care of in your code later..

2. Add your submit button and add a click event.
You need to add code similar to this
docmd.OpenReport "ReportName",acViewNormal,,"[PrimaryKeyFieldName] = " &
Me.PrimaryFieldControlName

The acViewNormal will print the report instead of displaying it to the user.

Here are a few good resources on this subject.
http://en.allexperts.com/q/Using-MS-Access-1440/Printing-current-record.htm
http://articles.techrepublic.com.com/5100-10877-6160599.html
http://www.mvps.org/access/reports/rpt0002.htm
http://www.databasedev.co.uk/print_form_record.html
--
Hope this helps,

Daniel P






DARYL said:
Hi Everyone;

Hope someone can help me out. I realize this might get a little
complicated.

Is it possible to do the following:

I have one form which I enter maintenance charges into, which then go to the
database.

I want to be able to Enter in the maintenance information, and when I hit
submit, a page prints out with a predetermined account number which is
attached to the vehicle number (Primary Key). The original record would
still of course go into the database.

Does this make sense to anyone? Is it doable?
 
Back
Top