Prev: Associate a form button to a query
Next: Using the SUM function in a main form -referring to a sub form
From: BradMowers on 28 May 2010 18:34 I have one form displaying data from an organizations table (name and address of organizations) with a subform displaying data from a contacts table (name, address, organization phone, etc.). The second form displays data from the contacts table with a subform displaying data from the organizations table. When I enter an organization in the first form and a contact in the subform of this first form then open the second form (with a button on this form), the data entered in the first form is not available. The data is present in the underlying tables but a search in the organizations name field does not find the data entered in the first form. How can I get the second form to look at the two tables before it opens to make the data available? What happens now, of course, is that the user, upon opening the second form and not finding the data they entered in the first form, re-enters data thinking their entries "didn't stick".
From: Jeanette Cunningham on 28 May 2010 19:40
Make sure you save the data just entered in the first form before you open the next form. On the button that opens the next form, put this code before the code that opens the next form. If Me.Dirty = True Then Me.Dirty = False End If 'here, put the code to open the next form Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia "BradMowers" <u60424(a)uwe> wrote in message news:a8b302de3c5a2(a)uwe... >I have one form displaying data from an organizations table (name and >address > of organizations) with a subform displaying data from a contacts table > (name, > address, organization phone, etc.). > The second form displays data from the contacts table with a subform > displaying data from the organizations table. When I enter an > organization > in the first form and a contact in the subform of this first form then > open > the second form (with a button on this form), the data entered in the > first > form is not available. The data is present in the underlying tables but a > search in the organizations name field does not find the data entered in > the > first form. How can I get the second form to look at the two tables before > it > opens to make the data available? What happens now, of course, is that the > user, upon opening the second form and not finding the data they entered > in > the first form, re-enters data thinking their entries "didn't stick". > |