Hi Everyone
I have a form with a subform which source object is dependant upon information the user enters. I have set the "Link Master Fields" property to the correct control in the main form and then I use the following code to display the subform
Me.subformCard.SourceObject = "subFormJobCard"
Me.subformCard.LinkChildFields = "JobCardRef"
me.subformCard.visible = true
it all works well except if I clear the values on the screen and try to go to the other sourceobject. It asks me for a parameter value based on what I had previously entered. I have tried using a "Clear" button that runs the code:
Me.subformCard.SourceObject = ""
Me.subformCard.LinkChildFields = ""
but it won't let me remove the linkChildFields value.
If I just click OK or cancel to the parameter value input box it still assigns the subform but this will be confusing for the users.
Also If I exit the form between inputs I don't have the problem but the interface needs to be worked by adding a value performaning an operation and then clearing the screen for the next user.
Does anyone have any ideas?
many thanks in advance,
GPM
I have a form with a subform which source object is dependant upon information the user enters. I have set the "Link Master Fields" property to the correct control in the main form and then I use the following code to display the subform
Me.subformCard.SourceObject = "subFormJobCard"
Me.subformCard.LinkChildFields = "JobCardRef"
me.subformCard.visible = true
it all works well except if I clear the values on the screen and try to go to the other sourceobject. It asks me for a parameter value based on what I had previously entered. I have tried using a "Clear" button that runs the code:
Me.subformCard.SourceObject = ""
Me.subformCard.LinkChildFields = ""
but it won't let me remove the linkChildFields value.
If I just click OK or cancel to the parameter value input box it still assigns the subform but this will be confusing for the users.
Also If I exit the form between inputs I don't have the problem but the interface needs to be worked by adding a value performaning an operation and then clearing the screen for the next user.
Does anyone have any ideas?
many thanks in advance,
GPM