If I want to select a row from subform A and a row from subform b and click a button and have the keys stored in another table what would be the best way to do that?
I think it helps.
In SubformA in the OnCurrent Event I placed an expression setting the value of a field in SubformC, but I get the following error:
Code:
The expression On Current you entered as the event property setting produced the following error: Microsoft Office Access can't find the form 'SubformC' referred to in a macro expression or Visual Basic code.
I had removed this line from the "On Current" event to try something else, but now when I put it back it is giving me a different error when the form is loading:
Code:
The expression On Current you entered as the event property setting produced the following error: Type mismatch
I checked the two fields in the tables and the source [TableAttId] is an AutoNumber (Long Integer) and the target field [ParentTableAttrId] is a Number (Long Integer) so they should be compatible. I am not sure where the type mismatch could be coming from.
The syntax is FORMS!MainFormName!SubFormControlName.FORM!ControlNameOnSubForm
The SubFormControlName may not be the same name as the SubForm. Often it is because it is the default name but it is not a requirement.
Not exactly. Forms are displayed on other forms by the use of a SubFormControl. This control has its own name that defaults to the name of the form it is displaying but can be changed. That is the SubFormControlName I was referencing. Your code indicates that the SubFormControl is named [ObjectTableAttributeMapping subform]. Is that true? [Brackets] are required because of the embedded space in the name.
That looks correct. You know you are on the SubFormControl when the data tab has the LinkMasterField and LinkChildField properties and the other tab has the name of the control.