new rec and print

elmister

Registered User.
Local time
Today, 06:08
Joined
Nov 10, 2009
Messages
16
Hello, quick question. i have two forms, a form with fields were users enter data and a form designed like a reciept. on the first form i have a button that is a new record button with the caption text as "Done". so when a user is finished entering the data and clicks the button it clears the form , so they could enter new data at the same time it saves the data in the table. my question is. is there a way i could custom the button so when they click it , it saves the data and at the same time print the info just entered using the second (receipt form).

basicly the button when clicked it saves the data clearing the form but at the same time it prints the data just entered.

thank you for your time.
 
Rather than print a Form as a Receipt, I would suggest you create a "Receipt" Report, that way you can use the current (ie. the record just entered) record ID as the criteria for your report. It will then be a simple matter of inserting the following code into your Button code between the portion that saves the current record and the Goto New Record command.

Code:
Dim stDocName As String

stDocName = "RPT_YourRecieptReportName"
DoCmd.OpenReport stDocName, acNormal
 
You may want to use the wherecondition argument of OpenReport to restrict the report to the single record:

http://www.baldyweb.com/wherecondition.htm

I agree with JBB about printing a report rather than a form.
 
The only thing is that form i created as the reciept has some dots and faded images so it cant be recreated by someone. thats the only reason for trying to use that form as the reciept.
 
The only thing is that form i created as the reciept has some dots and faded images so it cant be recreated by someone. thats the only reason for trying to use that form as the reciept.

I can't see why you would be unable to implement those security measures on your report.
 
Your right! Your right!
my bad!

thanks. I will give it a shot.
 
Dammmmm i dont know what am doing wrong. Could you do a example for me?
 

Users who are viewing this thread

Back
Top Bottom