Hello all, I am not sure if this is possible or not, I am opening a query from a docmd.openquery action in a button... however, I would like to set the name of a sub query in VBA so that I can have one "main" query open with different sub queries. My main query is a "member roster" with basic person information, and the sub queries (linked on the person's id number) contain various other types of information.I have three different variations on the sub query, and I would like to reuse the main query and just change the sub query in code. Does anyone know who to do this?
This doesn't work- but its the general idea of what i am hoping for-
Thanks in advance,
This doesn't work- but its the general idea of what i am hoping for-
Code:
Private Sub cmdMembershipRoster_Click()
DoCmd.Openquery "Rpt_MemberRoster", , subdatasheetname = "rpt_MemberHistory"
Thanks in advance,