|
|
|
Is This Possible With Forms |
| message from Wendy L on 12 May 2004 |
Windows XP
Office XP
I have something I wish to do within an Access database and I am not sure if
it is possible. One of the queries I have developed matches a farmer to his
farm number. The query will list the farmer's name, address, ssn, farm,
tract, and the corresponding aerial map on which his farm can be found. Each
farm may have more than one tract, and each farmer may have more than one
farm, in which case there will be multiple rows of data for a farmer or
tract in the query results. What I want to do is when a user opens the
database, the user can manually type in a last name or a farm number or a
tract, and the data can be delivered to him in a manner which doesn't force
the user to filter through the query for the results that he/she is seeking.
Since I am just learning Access, I do not know if this something that can
realistically be done. At this point, I have only used the table and queries
to manipulate and combine my data. If anyone knows of a sample database from
which I can learn that performs functions similar to what I have outlined, I
would appreciate a link or file.
Thanks,
Wendy
|
| Jim/Chris replied to Wendy L on 12 May 2004 |
Yes it can be done. one way would be to have atleast three
tables
FarmerInfo
FarmInfo
TractInfo
The FarmerId in the FarmerInfo table would be linked to the
FarmerId in the FarmInfo table and the FarmId would be
linked to the FarmId in the TractInfo table. This is what
Access was designed for. It you want to see examples of
this table structure go to the Sample Northwind database
that came with you Access application
Jim
and I am not sure if
matches a farmer to his
address, ssn, farm,
can be found. Each
have more than one
for a farmer or
user opens the
farm number or a
which doesn't force
he/she is seeking.
something that can
table and queries
sample database from
I have outlined, I
|
| Wendy L replied to Jim/Chris on 12 May 2004 |
I have my queries and tables all set up already. I just don't want my users
to have to open the queries and filter through them if they are simply
looking for a specific farm number or farmer. I have looked at the
northwinds sample database many times and it doesn't do what i am asking.
When a user opens the database i want a splash screen to pop up that allows
them to either enter a farm number, tract number or last name and then I
want the information returned to them according to the data they entered.
Basically, I want this splash screen to act as a search engine for the query
that is already developed.
"Jim/Chris" <anonymous@discussions.microsoft.com> wrote in message
news:c0b301c43832$8a2642a0$a001280a@phx.gbl...
|
| =?Utf-8?B?U0NITllERVM=?= replied to Wendy L on 12 May 2004 |
Create a query with a parameter in the criteria that states [Please Enter the Farmer's Last Name] for farmer last name and include all necessary information in the body of the query which you'd like your end user to see.
Put a button on the page, call it "Find by Last Name", attach a macro to it with openquery command in it. Include the name of the query in the query name selection below and choose "datasheet" as your view.
When a user opens the splash screen and hits this button, access will prompt the user with "Please Enter the Farmer's Last Name", once the name is entered, a spreadsheet(datasheet) will pop up with just that farmer's info.
You can also utilize the form by attaching the form's controlsource property to the paramter query and adding the necessary fields to the form to add more color to your end user's access experience.
Hope this helps, I work with a similar situation I think.
|
| Albert D. Kallal replied to Wendy L on 12 May 2004 |
http://www.attcanada.net/~kallal.msn/Search/index.html
I don't have a download yet..but to make what you want...you will need to
write some code....
However, before you write some code..have your tried filter by form? (This
is built in searching ability in ms-access).
|
| Wendy L replied to Wendy L on 12 May 2004 |
I should add that the database in which I am working can contain as many as
10,000 records, so drop down listboxes are not a particularly efficient
method for narrowing results.
"Wendy L" <puddytat_99@hotmail.com> wrote in message
news:%23pK%23JsCOEHA.4036@TK2MSFTNGP12.phx.gbl...
|
| Hugh Horton replied to Wendy L on 12 May 2004 |
I don't have any large tables (10,000 records) to test
it, but using combo box, as the user types letters the
search is progressively narrowed. IE. type "B" and the
focus moves to the beginning of the 'B's, type "R" and
the focus moves to the "BR"s and so on. By the time the
user types "Brown" the listing should be sufficiently
narrowed.
contain as many as
particularly efficient
database and I am not sure
matches a farmer to
address, ssn, farm,
farm can be found.
have more than one
data for a farmer or
a user opens the
a farm number or a
manner which doesn't
that he/she is
something that can
a sample database
what I have outlined,
|
|