If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Problems referencing Subform Control from another subform
How do you reference a subform control when "in" another subform? I want to
use the On Current event in subform a to populate data in subform b. Using the syntax below in the On Current Evetn of subform "a" I get the error message: "You entered an expression that has an invalid reference to the property Form/Report". When I put the statement in the main form, it works. Thanks. MsgBox "y = " & Forms!frmAccountRegister!subfrmTabs!C_CN |
#2
|
|||
|
|||
Problems referencing Subform Control from another subform
"John Lane" wrote in message ... How do you reference a subform control when "in" another subform? I want to use the On Current event in subform a to populate data in subform b. Me.Parent.NameOfSubformB.Form.ControlName -- Arvin Meyer, MCP, MVP http://www.datastrat.com http://www.mvps.org/access http://www.accessmvp.com |
#3
|
|||
|
|||
Problems referencing Subform Control from another subform
Doesn't work. Same message. Am usign Access 2007 i that's any help. Also, in
the off chance you typed a dot when an ! oughtas be, I tried it both ways and still didn't work. "Arvin Meyer MVP" wrote: "John Lane" wrote in message ... How do you reference a subform control when "in" another subform? I want to use the On Current event in subform a to populate data in subform b. Me.Parent.NameOfSubformB.Form.ControlName -- Arvin Meyer, MCP, MVP http://www.datastrat.com http://www.mvps.org/access http://www.accessmvp.com |
#4
|
|||
|
|||
Problems referencing Subform Control from another subform
"John Lane" wrote in message
... How do you reference a subform control when "in" another subform? I want to use the On Current event in subform a to populate data in subform b. Using the syntax below in the On Current Evetn of subform "a" I get the error message: "You entered an expression that has an invalid reference to the property Form/Report". When I put the statement in the main form, it works. Thanks. MsgBox "y = " & Forms!frmAccountRegister!subfrmTabs!C_CN Double-check the name of the subform. In your expression, you must use the name of the subform *control* on the parent form, which may or may not be the name of the form object it displays. -- Dirk Goldgar, MS Access MVP www.datagnostics.com (please reply to the newsgroup) |
#5
|
|||
|
|||
Problems referencing Subform Control from another subform
Ah, the wonderful inconsistencies of Microsft software! After all the
subforms are "fully" open, it works. I looks like it fails when the forms first open up. Maybe there is no reference to the 2nd subform when the On Current fires on the first subform. Or something. I am sure the Microsoft developers have some perfectly plausible, yet useless answer why. "Dirk Goldgar" wrote: "John Lane" wrote in message ... How do you reference a subform control when "in" another subform? I want to use the On Current event in subform a to populate data in subform b. Using the syntax below in the On Current Evetn of subform "a" I get the error message: "You entered an expression that has an invalid reference to the property Form/Report". When I put the statement in the main form, it works. Thanks. MsgBox "y = " & Forms!frmAccountRegister!subfrmTabs!C_CN Double-check the name of the subform. In your expression, you must use the name of the subform *control* on the parent form, which may or may not be the name of the form object it displays. -- Dirk Goldgar, MS Access MVP www.datagnostics.com (please reply to the newsgroup) |
#6
|
|||
|
|||
Problems referencing Subform Control from another subform
"John Lane" wrote in message
... Ah, the wonderful inconsistencies of Microsft software! After all the subforms are "fully" open, it works. I looks like it fails when the forms first open up. Maybe there is no reference to the 2nd subform when the On Current fires on the first subform. Or something. Possibly. Subforms are loaded before their parent forms; that's a given. For the rest, I can see that it might be a timing problem as independent threads execute. I am sure the Microsoft developers have some perfectly plausible, yet useless answer why. I don't se the value of that remark. -- Dirk Goldgar, MS Access MVP www.datagnostics.com (please reply to the newsgroup) |
Thread Tools | |
Display Modes | |
|
|