how to access row data in a subform

pb21

Registered User.
Local time
Today, 20:33
Joined
Nov 2, 2004
Messages
122
I have a sub form that shows items booked for a person, this subform is refreshed everytime a new item is booked. I want to be able to add commission so I have a combo on the main form that has commision rates in it.

I have a click event on the row in the subform with the hope that I could click a particular product and then if user clicks the description then the click event will add the commision due on that particular item.

the row is [prodid] [desc] [cost]

the question is how do i access the row data on the subform?

in this case I have grabbed the commission rate from the combo and now want the cost from the row i clicked.


regards in advance
peter
 
When you click on a row, Access knows which row you're on!. As a test, put MsgBox Me!Cost in the click event of the Description field, as you move to each row it will display the Cost from the row you clicked.

Would it not be better to have the commission field in the subform? a bit like addng on VAT for lineitems.

Download my first attachment in this thread and see what you think.
http://www.access-programmers.co.uk/forums/showthread.php?t=84837
 
accessing the row data

I want to derive a commission value however it changes for each customer booking so I couldnt put it on the subform.

I will try your suggestion and see if i can extract the anount that way.

regards
 
If you can't get it sorted, post an attachment, and I'll have a look.
 

Users who are viewing this thread

Back
Top Bottom