Hello all,
Using a button on the main form, I would like to assign a number to a text field called "Ref" of each record in the subform only where the corresponding Yes/No field called "Received" is true.
Could someone help me do that.
Thanks.
Hello all,
Using a button on the main form, I would like to assign a number to a text field called "Ref" of each record in the subform only where the corresponding Yes/No field called "Received" is true.
Could someone help me do that.
Thanks.
The Received field is on each the subform record? Also what number are you wanting to add to the subform records?
The number I am willing to assign is a Dmax + 1 I calculate using a numeric field in another table where references are stored.
So I am trying to assign that number to all those records that the corresponding Received field is true.
I wish I am clear now.
Thanks for your help, Bulzie.
I was thinking an update query where you use the key field and the Received field as the criteria to limit it to those subform records. Then for the Ref field in the UpdateTo row, put the reference path to that number? You can call the query from the button or somewhere else so first just get the update part working whether that is a query or vba code. Others might have spiffy code to do this also.
Bulzie, Thank you very much for your help.
I was thinking there was a better way to do it, but an update query like you suggested is no doubtfully best.
I know at times stupid thinking takes over![]()
Good Luck!!
Thanks a lot sir, appreciate your help.