I did it another way..
I created a form called Orders_Dynamic_Query_Form and set it as a datasheet linked to my Orders_Dynamic_Query from my Search code. I then created a subform called Orders_Dynamic_Query_Subform and set it as a datasheet for my Orders_Revision Table and linked the ordername fields together from the Orders_Dynamic_Query and the Orders_Revision_Table. I dragged the subform to the main form and replace the following code in my search subroutine
DoCmd.OpenQuery "Orders_Dynamic_Query", , acReadOnly
with this:
DoCmd.OpenForm "Orders_Dynamic_Query_Form", acFormDS, , , acFormReadOnly, acDialog
It works great.
|