Query definition disappearing after being run
Posted on 2004-10-27
I have a simple database that stores information on POs and I have built a simple form to search for and display them. The general PO information is stored in a table while the information about the products contained on it are stored in a seperate table. The form I use to display the PO is split into two parts: The main form displays basic info like the PO#, vendor# and information, etc. while the detail lines are displayed on a subform. Each of these forms are linked to two different queries; the main form is linked to PO_Top and the subform is linked to PO_Lines.
All fine and dandy up to this point.
The problem comes when I run my search and this form is displayed. The first time it is run it works like a charm. However, when I go to run it again, The form comes up completely white. I go to look at the design of my PO_Lines query and there is nothing in there anymore! No SQL, no definitions, nothing. Its like the query clears itself out. This is even more perplexing in the fact that the only VBA code contained in this thing is the DoCmd.OpenForm "PO Display" command attached to the search button.
Does anyone have any suggestions as to where I should start looking to solve this problem??