Form/Query Question

In Access 2007, I have a table that has the following columns: First Name, 
Last Name, Date of Birth, Hair Color, Height, Weight, and Current Location. I 
want to create a form that I can go into and find all of the individuals that 
were born after 1980 and with brown hair; or possibly all the individuals 
with brown hair that weigh under 180. Basically I want to be able to search 
the table based on inserting the specific parameters I want into a form. And 
then I want to be able to see a report of all the individuals that meet my 
parameters to print out. How can I go about this?
0
Utf
5/16/2010 7:59:01 PM
access 16762 articles. 3 followers. Follow

2 Replies
670 Views

Similar Articles

[PageSpeed] 5

You need to create three objects:
1.    Query based on your table
2.    Form that uses the query as a recordsource
3.    Report that uses the query as a recordsource

Design of the query....
a)    Needs to include all the fields from your table that you want to 
display in your form and report.
b)    You might want to make the Name a calculated field to combine first 
and last names to:
        JU, Rober
c)    The query does not need criteria at this point

Design of the form .........
a)    Make the form a continuous form
b)    In the form header, create the following unbound fields:
        1)    Combobox based on a query that lists the unique names in your 
table for selecting a name
        2)    Text box for entering the beginning date of the range for date 
of birth
        3)    Text box for entering the ending date of the range for date of 
birth
        4)    Combobox based on a query that lists the unique hair colors in 
your table for selecting a hair color
        5)    Text box for entering the beginning height of the range for 
height
        6)    Text box for entering the ending height of the range for 
height
        7)    Text box for entering the beginning weight of the range for 
weight
        8)    Text box for entering the ending weight of the range for 
weight
        9)    Combobox based on a query that lists the unique locations in 
your table for selecting a location
c)    In the detail section of the form, add controls bound to your 
recordsource
d)    In the form footer, add two command buttons:
        1)    For the first button, add code to the click event that creates 
a querydef based on your query and the parameters in the form header and 
then requery the form. Look in the Help file for Querydef.
        2)    For the second button,  add code to the click event that 
creates a querydef based on your query and the parameters in the form header 
and then open the report. Look in the Help file for Querydef.

Design of the report .....
a)    Use the design view to create the report in the format you want.

Steve
santus@penn.com



"Roberju" <Roberju@discussions.microsoft.com> wrote in message 
news:7CBDBE3A-0324-413A-96AD-6ACE8ABE914F@microsoft.com...
> In Access 2007, I have a table that has the following columns: First Name,
> Last Name, Date of Birth, Hair Color, Height, Weight, and Current 
> Location. I
> want to create a form that I can go into and find all of the individuals 
> that
> were born after 1980 and with brown hair; or possibly all the individuals
> with brown hair that weigh under 180. Basically I want to be able to 
> search
> the table based on inserting the specific parameters I want into a form. 
> And
> then I want to be able to see a report of all the individuals that meet my
> parameters to print out. How can I go about this? 


0
Steve
5/16/2010 9:36:51 PM
"Roberju" <Roberju@discussions.microsoft.com> wrote in message 
news:7CBDBE3A-0324-413A-96AD-6ACE8ABE914F@microsoft.com...
> In Access 2007, I have a table that has the following columns: First Name,
> Last Name, Date of Birth, Hair Color, Height, Weight, and Current 
> Location. I
> want to create a form that I can go into and find all of the individuals 
> that
> were born after 1980 and with brown hair; or possibly all the individuals
> with brown hair that weigh under 180. Basically I want to be able to 
> search
> the table based on inserting the specific parameters I want into a form. 
> And
> then I want to be able to see a report of all the individuals that meet my
> parameters to print out. How can I go about this?

MVP Duane Hookom designed a query by form that is adaptable to most database 
requirements:

http://www.rogersaccesslibrary.com/forum/dh-query-by-Form_topic12.html
-- 
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.accessmvp.com
http://www.mvps.org/access 


0
Arvin
5/17/2010 1:37:36 AM
Reply:

Similar Artilces:

2K7 question
Is there a way in E2K7 to make a particular message always send a message out in plain text format? Is that just an Outlook setting? Thanks! ...

faxing form
Is there a way to fax the form page via the fax modem on my computer? Create a report based on your form then fax the resulting report. Take a look at http://support.microsoft.com/Default.aspx?kbid=231797 hopefully it is what you are looking for. -- Hope this helps, Daniel Pineault If this post was helpful, please rate it by using the vote buttons. "He cries for help" wrote: > Is there a way to fax the form page via the fax modem on my computer? "He cries for help" <Hecriesforhelp@discussions.microsoft.com> wrote in message news:252D07EA-5886-4B0C-99...

Registry question
Hello Group, I have an application that saves some configuration data in the registry system (under HKEY_CURRENT_USER\MyApp\ConfData) of the currently logged on user. This way, every user who runs this app will have his own configuration data. When a user runs for the first time this app, the 'MyApp' registry key will be created along with all its subkeys. Now suppose we have 3 users and all of them have already used the app. We will then have the 'MyApp' subtree created for these 3 users. What I want to know is that when the PC admin wants to uninstall the app, how...

reference to master form
Hello there I have master form and inside there is subform. If an event procedure uccur on subform, how can i get refence to the master form in order to change there things when the name of the master form is diffrent always? Roy Look in Access HELP for the "Parent." property. Your code will look something like: Me.Parent.... from within the subform. -- Regards Jeff Boyce www.InformationFutures.net Microsoft Office/Access MVP http://mvp.support.microsoft.com/ Microsoft IT Academy Program Mentor http://microsoftitacademy.com/ "Roy Goldhammer" <roy@ho...

Question #3
Hi I have some data that I graph. Column A has a date [has data in 12 rows] Column B has a data entry (number) [has data in 1st 6 rows] Column C has a data entry (number) [has data in 1 st 6 rows] Column D has a formula that calculates a % on column B & C [formulas in 12 rows] The graph range I have covers the whole 12 rows but it seems to read the formulas in col D and plots every row Is there something I can add to my formula that stops the graph from plotting it unless there has been an answer returned in it? Formula I have is : =IF(B5+C5<1,"",(B5-C5)/B5) Thanks ...

Defrag question #3
I have a windows 2000 server that's a file/print server and Exchange 2000 also installed and running on the same box. I was wondering what is the best way if I want to run defrag and scandisk on the disk drive? I guess I'm asking because exchange is running on the box and I don't know if I run defrag and scandisk will I run into problems or cause the database problems. Thanks for your help. John In article <4D7A888F-B293-400C-A77C-DC379DDF4BDF@microsoft.com>, John@discussions.microsoft.com says... > I have a windows 2000 server that's a file/print server and Ex...

How can I refresh the master form from a subform?
Hello. On the After Update of the subform I am trying to refresh the Master form. I have tried things like Docmd.requery and Me.Refresh, but not sure what I am doing. Can you help me with this? Thanks. Iram Iram wrote: >On the After Update of the subform I am trying to refresh the Master form. I >have tried things like Docmd.requery and Me.Refresh, but not sure what I am >doing. Try using: Parent.Requery -- Marsh MVP [MS Access] ...

Modal Form from a child form
Hi, I have a little problem, I have a MDI form (Main Menu), this form open a child form (A), and I need to open a form B as modal form from form A. I can to this with showDialog(), but it open form B outside MDI form (Main Menu) and it is showed on the windows bar as another application opened. So the question is, there are any way to open a modal form from a child form inside a MDI form? Thanks El Alquimista wrote: > Hi, I have a little problem, I have a MDI form (Main Menu), this form > open a child form (A), and I need to open a form B as modal form from > form A. I c...

Question about Application behaviour,...
Hi, i have a simple MFC Application, that shows me the System Memory Usage. But after a while the Applications GDI Objects Count grows to something about >8.000 GDI Objects and its Virtual Memory (not much but step by step too) in less than 5 Minutes. I can see with ProcessExplorer that the application does have a high count of page faults. I cant figure out why! The System then starts to react slowly. The Timer invokes every seconds the member function with the code following this text, sets the Position on a progress bar control and raws a transparent text on the surface of the prog...

Data source for PivotTable-Form in ACCESS 2000
Hi, this drives me crazy, 4 years ago I defined in an ACCESS 2000 application a "PivotTable-Form". The resulting EXCEL table inclusive the "Data refresh" works perfect. I now want to update/change the query for the "Data Source" but cannot find which query is behind the "PivotTable-Form" or behind the resulting EXCEL spreadsheet. When editing the properties for the "PivotTable-Form" or the EXCEL spreadsheet the "Data Source" is always blank. Question: Where does Access 2000 or EXCEL 2000 hide the respective data source (Query)...

ADMT Tool Question
I'm trying to run this tool without success from a Windows 2003 native domain to extract accounts from an NT4 domain. Is this possible? Windows 2003 server Domain: Windows 2003 native mode Forest: Windows 2000 NT4 server sp6a http://www.petri.co.il/active_directory_migration_tool_usage_nt_windows_2003.htm "bobs" <myname@yourdomain.com> wrote in message news:e27m%23Km4FHA.2532@TK2MSFTNGP09.phx.gbl... > I'm trying to run this tool without success from a Windows 2003 native > domain to extract accounts from an NT4 domain. Is this possible? > > Window...

Query emails coming to a specific domain
Hello; We have about 5 domains on our exchange server that we receive email from. We are in the process of not renewing one of our domains but would like to check to see if email from that domain is still coming through. Is there any way to do that? I tried the Message Tracking Center with the *.domain.com but it didn't like that. It wanted a specific user. Thanks Check SMTP logs as well. -- Bharat Suneja MVP - Exchange www.zenprise.com NEW blog location: www.exchangepedia.com/blog ---------------------------------------------- <nospam@newsgroup.com> wrote in message news:...

Question about Status Reason field
I am looking into what the Status Reason field is used for in relation to the Account object. There are two default values, Active and Inactive. I want to add values so that when an Account is inactive, we can state the reason that is inactive. I can add values to the Inactive state without a problem, but then how do I choose any of the values that I defined since when an account is Inactive, I cannot edit any of the fields? I can define a default value, but that again is of no use, because I can't change it. This seems to be a bug or oversight on the part of the CRM developers. You nee...

2008 SBS questions... 07-04-10
I am trying to get a 2008 sbs running as efficiently as I can & was wondering about a couple of things. 1) I know it wants to be the DHCP server on a network, but what about for wireless clients? I have a wireless sonicwall TZ-170 for wireless laptops to connect to. They really don't need network access, just internet, so can I leave this running, as long as the addresses it hands out aren't in my same network? 2) Although the bought an SBS, the customer is not & probably won't be running exchange for a while. Can I remove exchange all together? I really see no rea...

Multi-language support question
We have an MFC application that uses ADO, ATL components to communicate with a SQL Server 2000 database. Our application is currently English only and we are making the conversion to support multiple languages. The text in the application is read in from a table so translating the text itself won't be a big deal programmatically. The text is loaded at log in and we can just autoswitch to the appropriate data based upon who the user is. My concerns are with different character sets, how the different languages impact the OS (how we set the character set in the OS automatically)...

DNS Question
Hello All, I am working with a customer that has 2 Small Biz servers in the same office. These are on 2 domains, but the same subnet. I am having trouble getting mail to route between the 2 domains. Each is Small Biz server 2003. Domain A has a public IP of 72.151.19.122 and an internal IP of 192.168.200.78. Domain B has a public IP of 72.151.19.123 and an internal IP of 192.168.200.250. We are using a Netgear firewall and inbound and outbound mail between each of these domains and the rest of the world works fine. They just can't seem to talk to each other. I would think this woul...

Question re:clustered column w/3D visual effect
I have Excel 2003 Why wont the 3D chart allow you to drag it more open? There is a large open area between the left side and the axis that looks jerky :) In a plain clustered column chart you can click inside to make the frame appear and drag it larger or smaller as you desire. In the 3D, clicking only allows you to change the angles of the 3D box. Am I missing something? thanks, Meenie This should be a hint to avoid the 3D effects. 3D charts are inflexible, but more important, the 3D effects mask the information in the chart. - Jon ------- Jon Peltier Peltier Technical Services, Inc....

Tying tables to forms
I have four connected tables that work well as table input but when I put them in a form some of the fields will not let me make entries. Does this happen because I am using the Id fields and subsequent data from the wrong tables? -- Taylor It sounds like you have created a non-updatable form. One cautionary note first: Don't tie your forms directly to the tables. Use queries instead. The queries will act as a stop light for which data is written and when. If more than one person tries to make a change to the same record at the same time, you will run into problems. From wha...

Question about CRM and Great Plains Integration
Can I create invoice when I invoice a contract in CRM and then show the record in the Great Plains ? Thanks in advance ...

Stop Buttons showing when opening up form
I have a button on my Main Start up page that when click makes these buttons visible, but when I open up my DB they automatically show on start up, is it possible they not be visible till I click ckbHelp.......Thanks for any Help.....Bob Private Sub ckbHelp_Click() If ckbHelp = True Then cmbHelpNewHorse.Visible = True cmbHelpActFinHorse.Visible = True End If If ckbHelp = False Then cmbHelpNewHorse.Visible = False cmbHelpActFinHorse.Visible = False End If End Sub Bob, In design view, set the property pf the *button* Visible=No Regards/Jacob "Bob" <xxx@xx.xx> wrote i...

Bug with controls location and scrollbars in a Windows Form
Hi, I've noticed a bug with WinForm and scrollbars, and I would like to know if there is a workaround ... Bug description : ------------------------ 1) create a win form, and add 3 buttons : * FirstButton : upper left corner of the winform * SecondButton : location = (0 ; 600) * ThirdButton : location = (100, 600) 2) Set : ThirdButton.Visible = false 3) Set the Form size to 100 x 100 ... and set : AutoScroll = true 4) Add the following event handler to the Click event of FirstButton and SecondButton ... private vo...

List all row source for all forms, reports etc.
Hi I'm doing some work cleaning out old unused forms, reports and queries. I have been going through each report in a database (There are A LOT), determining its row source query, then marking it for deletion. I will eventually end up going through and deleting all the unused queries. As you can imagine this is time consuming, and I was thinkg 'there must be a FASTER way" Does anyone have a suggestion, or link to a pre-built function or model that could assist me? Regards Darragh On Thu, 17 Jan 2008 22:14:18 -0800 (PST), Darragh <darragh.murray@gmail.com> wrote: >Hi...

Using Excel to design business forms
I have been using excel hit and miss to design business forms. I have been pretty successful but in many places I have found myself doing many inelegant things to get stuff to layout. Is there a good place to start looking to see how this is done properly, as I have seen many well done forms produced in excel. ...

Cannot view any form in crm 3.0
We have just installed CRM 3.0 on MS server 2003. I have created an account which has a system administrator role assigned to it. The issue is that when I open CRM web (on the server) when I select account, contact, activities, calendar etc... I get the following error: An error has occured. For more information, contact your system administrator. Now if I open CRM web using an account which has restricted access mode ticked, I don't get any errors, everything opens fine. The problem is that with an restricted access code i can't do much. I have tried assigning different roles ...

CHtmlView question #3
Is there an easy way to get the source of the HTML document? On MSDN online, there's a GetSource(CString& str) listed but that's apparently not implemented in VC++ 6.0. ...