Unanswered: [Help Please] Print Current Data In A Form, Access 2010
I've been struggling with a form-related issue that seems relatively easy to solve, but I haven't managed to figure it out yet.
I have a database that consists of 4 tables: Categories, Location, Products, Transactions. See the image below (click to show).
I have created a form (frmTransactions) based on the Transactions table. For any new transaction, a user can enter data into that form.
I would like to have a print button that, when pressed, only prints the current data in the Transactions form. For example, when a new purchase occurs, the data entered into the form "frmTransactions" can then be printed out and given to the customer (kind of like a receipt). I have tried several solutions found on the net, but none of them seemed to do what I wanted. Any ideas on how this can be achieved?
The database is attached to this post. Thanks for any input/suggestions!
You would have immediately remarked that the expression
"[ID] = " & Me.[Transactions subform].Form.ID
3. Going on further and examining what's the value of the control [ID] on the SubForm [Transactions subform] we can see that this value is NULL, which explains why the criteria expression is incorrect (see attachment).
4. In the subform, there is a different [ID] value for each line, so [ID] is not a unique identifier for a transaction (as a transaction can count several lines in the subform). Therefore [ID] is not appropriate as a filter for identifying a transaction.