robsworld78
Registered User.
- Local time
- Today, 15:13
- Joined
- May 31, 2011
- Messages
- 99
I have a form that has 3 subforms, in one subform I have a textbox called "BarsGiven" in another subform I have a textbox "BarsReturned".
When you open the form there are 10-20 records that show up and each record has a number in the "BarsGiven" textbox. In the "BarsReturned" textbox it has a 0 in all the records but I want that textbox to default to the same numbers showing up in "BarsGiven"
If I use the following code on the subform onload event it will only affect the first record in the subforms, all the other records still show up as 0.
Me!BarsReturned = Forms!NightCount!NightCountInventorySubform.Form.BarsLeft
If I use the same code on the textbox onfocus event it will do what I want but I need to click in every record. It will copy the correct record but I want it to do it when the form opens to all records without having to focus.
Is there something I can add to the code above so it affects all records in the onload event of the subform?
Thanks
When you open the form there are 10-20 records that show up and each record has a number in the "BarsGiven" textbox. In the "BarsReturned" textbox it has a 0 in all the records but I want that textbox to default to the same numbers showing up in "BarsGiven"
If I use the following code on the subform onload event it will only affect the first record in the subforms, all the other records still show up as 0.
Me!BarsReturned = Forms!NightCount!NightCountInventorySubform.Form.BarsLeft
If I use the same code on the textbox onfocus event it will do what I want but I need to click in every record. It will copy the correct record but I want it to do it when the form opens to all records without having to focus.
Is there something I can add to the code above so it affects all records in the onload event of the subform?
Thanks