C
Carlos
Hi, I have a main form called "Financials Main Form", which contains a
subform called "Assets Subform". The main form has a textbox called "Last
Year" to be used as an input from the user. The subform is referenced to a
query called "Assets", whose SQL is changed according to the input from the
textbox "Last Year".
The ControlSource property of the contrlos contained in the subform must
match the fields of the query. That is, if one control has its ControlSource
property set to "Last Year -1", then the query must have a field called "Last
Year -1".
The problem is that the SQL of the query changes successfully, but the
ControlSource property of the controls doesn't. Let TxtBox be one of the
controls. I am using the following statement:
TxtBox.ControlSource = "Last Year " & x,
where x is the value of the text box "Last Year".
Can someone explain me how should I change the ControlSource property of the
controls while the main form is running?
subform called "Assets Subform". The main form has a textbox called "Last
Year" to be used as an input from the user. The subform is referenced to a
query called "Assets", whose SQL is changed according to the input from the
textbox "Last Year".
The ControlSource property of the contrlos contained in the subform must
match the fields of the query. That is, if one control has its ControlSource
property set to "Last Year -1", then the query must have a field called "Last
Year -1".
The problem is that the SQL of the query changes successfully, but the
ControlSource property of the controls doesn't. Let TxtBox be one of the
controls. I am using the following statement:
TxtBox.ControlSource = "Last Year " & x,
where x is the value of the text box "Last Year".
Can someone explain me how should I change the ControlSource property of the
controls while the main form is running?