Hi J. Bennett,
I am open to any suggestions.
Are you open to the idea of eliminating the Select field idea? Frankly, this
sounds pretty confusing to me; it places a burden upon either the user or you
to ensure that all other possible records are deselected for a given
customer. It just doesn't sound like a workable idea to me.
It sounds to me like you have a many-to-many (M:N) relationship between
Customers and Building Types. This would require a minimum of three tables: A
Customers table, a Building Types table, and a third linking or join table. A
M:N relationship is created using two one-to-many (1:M) relationships, with
the linking or join table having the foreign keys of each 1:M relationship.
Translated into English sentences, the relationships could be stated as:
1:M A customer can order zero to many building types.
and
1:M A building type can be purchased by zero to many customers.
The customary way of displaying this type of relationship is to have a main
form based on one of the tables, with a subform that displays records from
the join or linking table plus the other table. So, for your example, a form
that displays customers, with a subform that displays all building types that
a particular customer has ordered OR a form that displays building types with
a subform that displays all customers who have ordered that particular
building type. Of course, you can have a form that displays just customers,
without a subform, and a form that displays just building types.
Take a look at the sample Northwind database, which is likely already
installed on your PC (search for Northwind.mdb). You can download a copy from
here, if needed:
http://www.microsoft.com/downloads/...72-8dbe-422b-8676-c632d66c529c&displaylang=en
Open the Customer Orders form. You should see 91 records. This form includes
two subforms: the first subform displays all orders placed by each customer,
and the second linked subform displays order details for each selected order.
I'm thinking that you might want to aim for this type of design, which does
not involve any field that stores which record is in a selected state.
While the first two forms are storing information in the "Customer Info"
table,....
Whoa! If this is a true statement, then you have what is commonly known as
an "Access spreadsheet". You are not taking advantage of the relational
capabilities of Microsoft Access. My guess is that you would need to add a
new record, repeating Customer Info, each time a given customer orders
another storage building. A table should include one subject, similar to the
way in which a written paragraph should be based on one subject. Open the
relationship view (Tools | Relationships) for the Northwind sample database.
Here, you will see several different tables, including tables for Customers,
Orders, Order Details, Products, Suppliers, etc.
The final step, and the ultimate reason for creating this database, is to be
able to print the forms with all this information...
It is usually always much better to design reports for printing.
Customer information is stored into table named "Customer Info Table"
I have fields named "First Name", "Last Name", "Select" (which is the check
box that is used for selecting that particular record for use".
May I suggest instead that you not use any spaces or special characters in
the names of any fields? The same goes for controls on forms and reports,
along with objects in the database (tables, queries, forms, reports, macros
and modules). Yes, you can use spaces, but I think you will find your future
development efforts to be simplified by avoiding the use of special
characters.
Special characters that you must avoid when you work with Access databases
http://support.microsoft.com/?id=826763
You should also avoid using any reserved words for anything that you assign
a name to within Access. The word "Select" is a reserved word. Select is a
SQL (Structured Query Language) keyword, which would be found as the first
word in all SELECT queries. Access MVP Allen Browne maintains an extensive
listing of reserved words:
Problem names and reserved words in Access
http://allenbrowne.com/AppIssueBadWord.html
He also has a very cool utility that is free, which you can download to scan
your existing database for the use of reserved words in field and table
names, among other issues.
I'd like to also refer you to an excellent collection of papers on database
design:
http://www.accessmvp.com/JConrad/accessjunkie/resources.html#DatabaseDesign101
If nothing else, make sure to read the first two articles written by
database design expert Michael Hernandez, who is the author of the book
"Database Design for Mere Mortals" (and co-author of "SQL Queries for Mere
Mortals").
Tom Wickerath
Microsoft Access MVP
http://www.accessmvp.com/TWickerath/
http://www.access.qbuilt.com/html/expert_contributors.html
__________________________________________