473,856 Members | 1,753 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Saving and applying a query on a form/subform

6 New Member
Is it possible to set a main-form with an embedded subform to "Filter by Form", subsequently enter the desired variables in fields in BOTH the main-form and subform, and then save the resulting filter as a single query? or, do the variables entered on the main form need to be saved as its own individual query, and the variables entered on the subform saved as a separate query.

I ask because I would ideally like to take a single query, containing filter variables that apply to both the mainform and subform, and be able to load/apply it onto a blank mainform/subform.

So in short, is it possible to save, and then apply, a single query that contains filter variables from both a mainform and its subform?

Dec 19 '07 #1
1 1553
374 Recognized Expert Contributor

Is there a relationship between the Main and subform that you're speaking about?

Normally what I do when I'm wanting to filter the form based on a set of values, I normally have a list control that lists out all the items of the main table, then when I double click on a list item, then I zoom into the detail of that records children, and then have a button that will zoom out so that it can show the main table list again.

I have a relationship between the two tables linked by a common ID field.

Is this what you're wanting to do?

Let me know.

Joe P.
Jan 5 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

by: wayne dooley | last post by:
This should be easy. I have 2 tables - CUST and SUBS, which have a 1 to many relationship. I created a form to show fields from CUST and a subform to show those in SUBS. The 2 tables are related on SUBSNO, and the data source for each is the table (not a query). It behaves wonderfully, except I can't seem to change the layout of the subform in design view. I make changes and can see them in design view but in form view it reverts back...
by: Douglas Buchanan | last post by:
I set the OnExit property of the "Cost" field in subform "subJobDetail" to save the record (see below). Then I call a global sub to copy the )] calculated field to a field in the subform "subJob". The record in "subJob" displays the "writing" (pencil) icon for the record but does not update visually until I enter and exit a second field "Markup" that is identically coded. How do I write code to save the record in the subform "subJob" ...
by: Jason | last post by:
I have a primary form which is used to enter/edit data in a table named Test_Results. On this primary form there is a subform which displays site addresses. This subform is linked to the primary form by field named TestID. The subform is used just for displaying site address data, data which is stored in another table named Total_Site_Address. In the Total_Site_Address table there are numerous fields that form the site addresses...
by: DS | last post by:
I have a Subform that isbased on a Query. Whenever I go to the Subform and add records in, then go to the next record on the main form...then back to the previous record on the main form (the one I just added the records to) the records are gone...but, when I go and check the query the records are there. Does anyone know whats happening?!!! Thanks DS
by: MacDermott | last post by:
For a client who wants answers, but doesn't want to bother to learn Access, I've built a cut-down query generator, where they can select fields and criteria. I then compose the appropriate SQL SELECT statement and assign it to a fixed query name. ( qryTemp.SQL= MySQLString) qryTemp is the SourceObject for a subform on a form which I then open. (Note that the query itself is the source object, not a form based on it.) So far, this works...
by: R. Yang | last post by:
Hi, I've a question regarding saving the data. I noticed some of my recently-entered data mysteriously disappeared. There was nowhere to re-locate them. Plus, those data were entered within the same week. My colleagues and I have been cautiously avoided working on the same table simutaneously. Any reason why the data got lost? I appreciate your advice! Yang
by: MS | last post by:
I'm having trouble applying a filter to a subform. I create a String in a Module based on various selections on the form. Clicking a button on the "stand alone form" that changes the filter property string to the string from the module works fine. As soon as I put the form on the "main form" (thereby coverting it to a sub form) things no longer work. Of course the record source for the sub form is no longer a table or query, but the...
by: Stuart McGraw | last post by:
I haven't been able to figure this out and would appreciate some help... I have two tables, both with autonumber primary keys, and linked in a conventional master-child relationship. I've created forms for both those tables, and inserted the child table form into the master table form as a subform. It works just as it is supposed to, in that I can create a new master record, and then add detail records.
by: google | last post by:
I have a form with several subforms. Users enter the data, then on the parent there is a command button that runs code to generate a .pdf document from a report based on the data they are working with. If a user enters data in a subform, then directly clicks the command button on the parent form, the data in the subform is not included in their document. I THOUGHT that as soon as focus left the subform, any pending changes to the data...
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.