Row Number In Sub Form

mithani

Registered User.
Local time
Tomorrow, 08:55
Joined
May 11, 2007
Messages
291
Hi All,

I have one form with subform(tabular). In subform I am listing detail of expenses. How could I reference any particular row?

Thanks

mithani
 
Row Number in Sub Form

Hi,

I forgot to attached jpg. I marked row in red. If I want to write code that row number 2 should plus something. How can I reference that row?

Thanks

mithani
 

Attachments

  • row.JPG
    row.JPG
    86.6 KB · Views: 200
How could I reference any particular row?
Could you elaborate on this please?? What are you trying to do??
 
You can either reference it by Invoice Number, or you can use the AbsolutePosition property in conjunction with CurrentRecord of the recordset to move the selected record.
 
Thanks ajetrumpet & Moniker

I think I was not clear enough.

For example I have five rows in my subform. In Amount I want to write code that row number 2 should add 100$. So I want to write IIF function that whenever row number two comes, total should add 100$ more.

thanks

mithani
 
Are you wanting to add $100.00 to row 2 specifically (every time) or are you simply wanting to add $100.00 to your costing if you have two rows or more in your subform?
 
Thanks John,

Yest, I want every first and second row should add $100.00 in amount specially every time.

Thanks man

mithani
 
The way I would do this is to have an unbound text box on your form that does a logical test on the DCount of the, source of, subform, if the DCount is <2 it's value would be $0.00 else $100.00. Then just include that text box in your total calculation.
 

Users who are viewing this thread

Back
Top Bottom