Re: Form to search database and return found records
- From: Klatuu <Klatuu@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 21 Jun 2007 07:00:01 -0700
Can you give me some detail on what and how you want to look up?
--
Dave Hargis, Microsoft Access MVP
"kansaskannan@xxxxxxxxx" wrote:
Dave, any further input on setting up the search mechanism? thanks..
On Jun 19, 5:09 pm, klingongardener <klingongarde...@xxxxxxxxx> wrote:
Dave:
Appreciate the detailed guidance.
I created a query that pulls in required data from all four tables.
I then created a form populated with fields from this query. To this
form I added a sub-form.
The sub-form is based on the same query. Hence there are two groups
of the same
fields (except that one group is within a sub-form). The two groups
are linked through
the Link Master Field and Link Child Field, such that when I press
page-up/down in
the Master Field, the records in both groups change in a synchronized
fashion. (At this
point, only one record is visible at a time in each group).
Thanks!!
kannan
On Jun 19, 3:57 pm, Klatuu <Kla...@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
Seems like we are getting a couple of things intermixed here. Lets start
with the subform. The way you keep a subform in sync with the main form
(that is, showing the correct child records in the subform for the record in
the mainform) is by using the Link Master Fields and Link Child Fields
properties of the subform control.
Now, lets be sure we understand what a subform really is. A subform is a
misleadingly named control type on a form. It is just a control, like a text
box, a combo box, a check box, etc. It contains no data of it's own. It
does, however, have a property named Source Object. The SourceObject
property will contain the name of a form. That form is just like any other
form except it is most likely either in datasheet or continuous view.
The subform control also has the Link Master Field(s) and Link Child
Field(s) properties. This is a lot like setting a relationship. You
identify the field(s) in the Master record that point to the child records in
the Link Master Field(s) property and the field(s) in the subform's source
object form that match the child records to the parent.
This way, each time you change master records, the subform will display the
related child records.
See if you can get that going, then lets talk in more detail about doing the
searches.
--
DaveHargis, Microsoft Access MVP
"klingongardener" wrote:
Thank you Carl. Unfortunately, I do not know enough about Access to
follow up on your suggestion. However, I appreciate your taking the
time to write.
And thank you too,Dave.
Yes, I need to be able to search across the four tables and retrieve
data by filtering with the search criteria.
I give some additional details below. For simplicity of exposition, I
use only one table:
--------------------------------
I have a form. In the Form Header Section, I have a single combo box
which is populated with zip codes from one of the four tables. (I
will eventually have additional combo boxes spanning all four tables).
--------------------------------
Properties for this combobox include:
Row Source: SELECT tblProperties.PrptyID, tblProperties.PrprtyZip FROM
tblProperties ORDER BY [PrprtyZip];
Bound Column: 2
--------------------------------
In the Detail Section (of the same form), I have a subform based on a
query. (I know enough to run the query separately, and filter/
retrieve data by zip code; and the query works).
--------------------------------
Incidentally, I put this together using various bits and pieces on
this site - but despite my best attempts, I am unable to connect the
filter to the subform.
Thanks to both of you.
kannan
On Jun 19, 2:06 pm, Klatuu <Kla...@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
Is this a form, subform, or is it a single form with a datasheet view of the
record source. Are you using it for all four tables?
--
DaveHargis, Microsoft Access MVP
"klingongardener" wrote:
In my Windows XP Access 2003 database (with 4 tables) I need a
'search form' where I can enter values (corresponding to different
tables) in the top half of the screen and have matching records
returned in the bottom half of the screen. I have been able to create
a form for the top half, and another one for the bottom half. I am
able to enter filter criteria in the top successfully (i.e.,
debug.print returns the correct filter string). However, I do not
know how to link the filter to the sub-form at the bottom.
I have gone through similar posts/solutions, but am still having
problems.
I would appreciate any advice.
Thank you.- Hide quoted text -
- Show quoted text -- Hide quoted text -
- Show quoted text -- Hide quoted text -
- Show quoted text -
- Follow-Ups:
- Re: Form to search database and return found records
- From: kansaskannan
- Re: Form to search database and return found records
- References:
- Form to search database and return found records
- From: klingongardener
- Re: Form to search database and return found records
- From: klingongardener
- Re: Form to search database and return found records
- From: Klatuu
- Re: Form to search database and return found records
- From: klingongardener
- Re: Form to search database and return found records
- From: kansaskannan
- Form to search database and return found records
- Prev by Date: Re: Form for mealplan
- Next by Date: Start Bar with Access 2003
- Previous by thread: Re: Form to search database and return found records
- Next by thread: Re: Form to search database and return found records
- Index(es):
Relevant Pages
|