Question : How can I read the value of the Link Master Fields property in code?

I have a calendar type form similar to Outlook's Month View, with 28 subforms, each using he same actual form, with a different Date in the Link Master Fields control.  I want to be able to calculate which day I'm in by interrogating the name of the master field.

Any suggestions,

Thanks in advance.

Answer : How can I read the value of the Link Master Fields property in code?

"Yes, it is, but it often has no data"

How can it have no data?  Even when creating a new record the link field in the subform will immediately have the same value as its master link field in the main form?

But if you have multiple copies of the same subform on a main form, I don't see any way that you can tell which one you are in, unless you set up some data to tell you.  I would have thought that the link child value woud be sufficient, otherwise how does the subform know which records to display?
But if you insist that is not so, then the only other approach that i can see working is to use the Enter event procedure of every subform container control and set a public variable to a distinct value which you can then refer to in your subform code.
Random Solutions  
 
programming4us programming4us