Passing non-stored variable to a report

DJ7T

Registered User.
Local time
Today, 17:06
Joined
Dec 5, 2001
Messages
11
I'm about 99% of the way to making Access drive a receipt printer to print cash sale receipts based on a Cash Sale form the register guy uses to cash people out. I want to have him enter the amount of cash tendered into the form, and simply print the Amount Tendered and change onto the receipt. I don't need to store Amount Tendered and/or Change anywhere. I guess I could, but I'm figuring I don't have to. I need to know how to pass the value in the "amount tendered" textbox through to the report, and how to pick it up and use it on the report, displaying it *and* using it in the change calculation (Amount Tendered minus Total).

I'm sure this is dumb-simple, could someone point me in the right direction?

-Mark

[This message has been edited by DJ7T (edited 12-13-2001).]
 
Make the "Control Source" value a Function.

Do the calculation in the Function:

Example
Control Source =MyTotal()

Use a reference to the Form and Field amount tendered is on inside the function. You can also reference fields on the report.
 
I'm sorry, I've looked at that half a dozen times and I don't know what you're talking about.

I just need a way to pass a value to a report from a form... am I going about this the wrong way?

-Mark
 
Providing the form's open when running the report, just set the value of a text box on the report to =SomeForm!SomeTextField.
I assume the form is only ever used once for the report and then closed again.
Add the number of text boxes you require.
 
Hint: When you are testing the report using Rich's method, keep the form open (can be minimized). Otherwise, you'll get a prompt for the text field & it won't look like it is working.
 

Users who are viewing this thread

Back
Top Bottom