access vba - SubForm 1 filters SubForm 2 on different Tabs -


i trying link subform 1 in 1 tab subform 2 in different tab on same form when click row in subform 1 on first tab filters subform 2 on other tab:

i have tried following sql code inside subform 2:

select payment.worderid, payment.pymtdate, payment.pymtmethod, payment.amount, payment.rate, payment.checknum, payment.transnum payment (((payment.worderid)=[forms]![main menu]![main menu subform].[form]![txtworderid])); 

then in onclick event of tab subform 2 put vba:

forms![main menu]![main menu subform 3].refresh 

i filter subform top reference, doing wrong?

what i'm doing in situation, create hidden textbox on main form (lets name txtmainworderid).

on current event of subform 1 set value of txtmainworderid on main form value of subform 1 txtworderid.

now link subform 2 txtmainworderid (in case figure, link master fields:txtmainworderid, link child fields:txtworderid) gets automatically updated when click row in subform 1 & won't need inside sql statement.

hope understood question & explained enough.


Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

Python ctypes access violation with const pointer arguments -