Linking subforms in Tab

joyaccess1

Registered User.
Local time
Today, 13:55
Joined
Jan 21, 2008
Messages
32
Hi,

i have a requirement for a tab form, where tab1 will be a continuous form and tab2 will be the details for the row that is select from tab1, both tab1 and tab2 contain subforms, my question is, how do i pass the value(s) from tab1 to tab2 so that the corresponding details appear in tab2.

any help will be appreciated

Thanks
Joy
 
I usually use a textbox (visible property set to no, call it txtLink) in the main form's header that references the sub1 property (subform.Form!linkingID) that is linked to sub2; then in the sub2 propertybox, I set the LinkChildField to linkingID (in sub2) and LinkMasterField to txtLink; when you click on the recordselector for the sub1 record, sub2 will show the info relative to that record (because the txtLink will show recordselector choice). Hope that's clear.....
 
perfect, it worked, thanks for the excellent suggestion.

have another problem, i am using tab2(subform2) to add records too, when i start typing i get the below errror

"you can't assign a value to this object"

any suggestions on why am i getting the above error ? (i am not locking any records, the locking is set to "no" in the property sheet.


Thanks
Joy
 
The underlying recordsource (query or SQL statement in sub2) may not be set up to add records or the primary key in sub2 may not be in sub1 (which would cause the problem with the recordsource)......i.e., you may have to rearrange the underlying query (joins, etc). When that error pops up in my projects, thats what I usually look for.
 
Thanks, i had to set "Data Entry" to "yes" in the property sheet.
 

Users who are viewing this thread

Back
Top Bottom