473,395 Members | 1,583 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Creating a Searchable Form for a Single Table Database in Access 2007

Hello,
I am fairly new to Access 2007 – I can make a table, queries, forms and reports but am largely doing so through the wizard function and then modifying the structure of each for my purposes. I have not knowingly used VBA except when entering criteria for the query but am ready to use some. I was wondering if you could help me determine how to make a searchable form for visitors? Or if it is not a searchable form I need, what would be the best way to have visitors easily search the database? My goal would be for the visitor to search the various fields in the database but not be allowed to alter the results.
I have constructed a single table database that describes the status of historic buildings. The database has the following fields: Building Name; State; County; Type; Year Constructed; Status. I would like them to be able to have a form that they could enter search information or choose from a drop down button for some fields and then get the results.
Any help would be very much appreciated.
Jul 19 '10 #1
4 3430
patjones
931 Expert 512MB
In the most general terms (because you're asking a pretty general question) one thing you can do is have the results appear in a report.

What is often done is to set the record source of the report to be the whole table. When something is selected from a combo box, you can open the report using the combo box selection as a filter that will narrow down the results. For example,

Expand|Select|Wrap|Line Numbers
  1. DoCmd.OpenReport "rptBuildings", acViewPreview, , "[Building Name] = " & Me.cboBuildingName

where cboBuildingName is the name of a combo box on your form. Here, the last argument in the OpenReport command is the filter...it basically acts like the WHERE clause in a SQL statement.

I would recommend that you store information such as State, County, Type, etc. as numbers, then use look-up tables for each column (i.e. there will be a table that holds States, one that holds Type, and so on). Take a look at Database Normalization and Table Structures for more information on how to structure your data.

Pat
Jul 20 '10 #2
NeoPa
32,556 Expert Mod 16PB
I would suggest a form that is designed to show the information in the Detail section but has some unbound controls in the Header section which can be used to filter the data. An example of this with some instructions can be found at Example Filtering on a Form. It even has an example database attached that you can download and play around with. Experimenting with ideas for your own needs.
Jul 20 '10 #3
Thank you Zepphead80 and NeoPa for answering my question! I am going to look into both options and then as I am able to ask more specific questions. I just wanted to start off on the right track. Thanks again :).
Jul 20 '10 #4
NeoPa
32,556 Expert Mod 16PB
Good for you. We'll look forward to hearing further from you :)

Welcome to Bytes!
Jul 20 '10 #5

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

Similar topics

4
by: PercyPercy | last post by:
For some reason I can't write the proper query to get a simple total from a single table. Here is the basic table design: Transaction ID___Product ID___ Transaction Date____Transaction Quantity...
2
by: mnathan | last post by:
I wouldl like one table to be password control without having to use ACCESS method of security. In my database, I will have a rates table, which should only be viewed by the financial administrator....
1
by: adrian | last post by:
Hi, Has anyone succeed to compact an Access 2007 database via VB.net code? The previous methods from JRO don't work anymore and there is no help on msdn on how this could be done for 2007. ...
1
by: Paldrion | last post by:
How Can I Automatically add an AutoNumber field to a table in Access 2007? If code is needed, please include how I would use the code in an access module, so I can automate this with a macro.
1
by: Paldrion | last post by:
I will need it to be in VBA, since I need to put it in an Access 2007 database and execute it with an Access macro. What I am doing is using a utility to find the hard drives' conditions on...
5
by: sphinney | last post by:
I have data in a few external Access tables that I want to link to my Access 2007 database. Depending on situation (and permissions of the person using the database) I want to dynamically link to...
6
by: MEGDZIA | last post by:
Could you please advise how to work out spliting database in multiuser environment if all useres use forms and reports instead of tables....I believe there should be only backend part on shared...
0
by: Clare CAVS | last post by:
I have a table with a lookup column referring to another table . tblRooms has two fields, (Autonumber), and . The column I want to display is the RoomName column. If I have Bound Column = 1,...
3
by: CindySue | last post by:
I've been searching archives, but I can't find anything I can make work, and this is probably really simple--unfortunatley just not for me. I want to have a button on a form that when clicked will...
12
by: CindySue | last post by:
I would like to be able to copy the current record to a different table. I am tracking donations and I create a new table of donations each year--some of the records will be the same or slightly...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
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,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
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...
0
agi2029
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,...

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.