Microsoft Access Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsDatabaseMicrosoft Access Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old October 29th, 2009, 03:03 PM
HJLatorre HJLatorre is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Jun 2009
Posts: 17 HJLatorre User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 h 10 m 5 sec
Reputation Power: 0
Smile Forms - Use a form for query critera (yes/no boxes)

I have a query with teacher contact info: name/address -- plus about 7 different yes/no fields (classes taught - each field is a class, checked yes or no). I want the user to be able to "check" which class and view the teachers teaching that class.

Trying to get it to work in query form, but ultimately - a button from the main interface will take them to the critera form and produce the report, based on what they select.

Is this the best way to do this -- and HOW? I've read about QBF with text boxes -- but what about yes/no?

I always appreciate the help I get here - thanks in advance!
-Heather

ps -- I can't even get the [enter parameter box] to work for yes/no fields -- how does that work -- I guess you have to enter 0/1 or 0/-1 for yes no. That doesn't make sense for an end user. I need it easy-peasy.

Reply With Quote
  #2  
Old October 29th, 2009, 07:57 PM
HJLatorre HJLatorre is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Jun 2009
Posts: 17 HJLatorre User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 h 10 m 5 sec
Reputation Power: 0
Changed the method to my madness -- I've now created a form with a datasheet subform showing the teacher's contact data.

On the main form - cmd Buttons that filter by each of the fields. Each of my seven fields will have it's own filter button.

I'm working a cmd button to preview filtered datasheet in a report -- but it doesn't work . . . .that's gonna be my next post!

Thanks for viewing!

Reply With Quote
  #3  
Old October 29th, 2009, 08:41 PM
don94403's Avatar
don94403 don94403 is online now
Contributing User
Click here for more information.
 
Join Date: Jan 2007
Location: Northern California
Posts: 2,886 don94403 User rank is Colonel (50000 - 60000 Reputation Level)don94403 User rank is Colonel (50000 - 60000 Reputation Level)don94403 User rank is Colonel (50000 - 60000 Reputation Level)don94403 User rank is Colonel (50000 - 60000 Reputation Level)don94403 User rank is Colonel (50000 - 60000 Reputation Level)don94403 User rank is Colonel (50000 - 60000 Reputation Level)don94403 User rank is Colonel (50000 - 60000 Reputation Level)don94403 User rank is Colonel (50000 - 60000 Reputation Level)don94403 User rank is Colonel (50000 - 60000 Reputation Level)don94403 User rank is Colonel (50000 - 60000 Reputation Level)don94403 User rank is Colonel (50000 - 60000 Reputation Level)don94403 User rank is Colonel (50000 - 60000 Reputation Level) 
Time spent in forums: 3 Weeks 1 Day 1 h 18 m 41 sec
Reputation Power: 562
You would do much better to normalize your data. What you described is apparently a many-to-many relationship (each teacher may teach multiple classes, each class may be taught by multiple teachers), which requires 3 tables, not a string of Yes/No fields.

With a properly structured database, relationships like "show me all the teachers for this class" and "show me all the classes this teacher teaches" are dead simple.
__________________
Experience is the thing you have left when everything else is gone.

Reply With Quote
  #4  
Old October 30th, 2009, 09:33 AM
HJLatorre HJLatorre is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Jun 2009
Posts: 17 HJLatorre User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 h 10 m 5 sec
Reputation Power: 0
Thanks Don.

I know, I know. I hate that I set it up this way -- but with almost 200 teachers and plenty of data now, I hate to take the time to re-do everything. Changing reports, queries. . . .

Reply With Quote
  #5  
Old October 30th, 2009, 03:23 PM
don94403's Avatar
don94403 don94403 is online now
Contributing User
Click here for more information.
 
Join Date: Jan 2007
Location: Northern California
Posts: 2,886 don94403 User rank is Colonel (50000 - 60000 Reputation Level)don94403 User rank is Colonel (50000 - 60000 Reputation Level)don94403 User rank is Colonel (50000 - 60000 Reputation Level)don94403 User rank is Colonel (50000 - 60000 Reputation Level)don94403 User rank is Colonel (50000 - 60000 Reputation Level)don94403 User rank is Colonel (50000 - 60000 Reputation Level)don94403 User rank is Colonel (50000 - 60000 Reputation Level)don94403 User rank is Colonel (50000 - 60000 Reputation Level)don94403 User rank is Colonel (50000 - 60000 Reputation Level)don94403 User rank is Colonel (50000 - 60000 Reputation Level)don94403 User rank is Colonel (50000 - 60000 Reputation Level)don94403 User rank is Colonel (50000 - 60000 Reputation Level) 
Time spent in forums: 3 Weeks 1 Day 1 h 18 m 41 sec
Reputation Power: 562
Quote:
Originally Posted by HJLatorre
Thanks Don.

I know, I know. I hate that I set it up this way -- but with almost 200 teachers and plenty of data now, I hate to take the time to re-do everything. Changing reports, queries. . . .

That's entirely up to you. Spend an hour now to do it correctly, or fight with a poorly structured database for the remainder of the life of the database and perhaps be unable to even do some things at all.

Reply With Quote
  #6  
Old October 30th, 2009, 04:35 PM
HJLatorre HJLatorre is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Jun 2009
Posts: 17 HJLatorre User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 h 10 m 5 sec
Reputation Power: 0
Quote:
Originally Posted by don94403
That's entirely up to you. Spend an hour now to do it correctly, or fight with a poorly structured database for the remainder of the life of the database and perhaps be unable to even do some things at all.


Ugh. I know. I've had the problem before with the courses. I wonder if it is just an hour. I have so many reports based on the courses. . . . .with totals - how many teachers teaching how many courses - etc.

Ya live and learn. The sad thing is my thinking when I originally built it. I thought - humph. I want the users to be able to check the check boxes on the form and created a field for each course. It wasn't logical thinking - it was "pretty" thinking.

I can probably achieve the same look with the courses in their own table (in one field!) -- but I didn't even think about researching how to do that - at the time, figured it would have to be a drop-down box. . . .(When I was a newbie I always had trouble with multiple select fields like that though.)

Ugh. Where were you when I started this thing!

Thanks again. I appreciate your advice. Right now the db is pretty active. Once I get some quiet time, maybe I'll redo some things.

Reply With Quote
  #7  
Old October 30th, 2009, 05:46 PM
don94403's Avatar
don94403 don94403 is online now
Contributing User
Click here for more information.
 
Join Date: Jan 2007
Location: Northern California
Posts: 2,886 don94403 User rank is Colonel (50000 - 60000 Reputation Level)don94403 User rank is Colonel (50000 - 60000 Reputation Level)don94403 User rank is Colonel (50000 - 60000 Reputation Level)don94403 User rank is Colonel (50000 - 60000 Reputation Level)don94403 User rank is Colonel (50000 - 60000 Reputation Level)don94403 User rank is Colonel (50000 - 60000 Reputation Level)don94403 User rank is Colonel (50000 - 60000 Reputation Level)don94403 User rank is Colonel (50000 - 60000 Reputation Level)don94403 User rank is Colonel (50000 - 60000 Reputation Level)don94403 User rank is Colonel (50000 - 60000 Reputation Level)don94403 User rank is Colonel (50000 - 60000 Reputation Level)don94403 User rank is Colonel (50000 - 60000 Reputation Level) 
Time spent in forums: 3 Weeks 1 Day 1 h 18 m 41 sec
Reputation Power: 562
An hour is probably an underestimate, especially for someone who doesn't have a firm grip on relational database construction. It is not intuitive. Setting up the tables shouldn't take more than 15 minutes, but changing a number of queries will take a little longer. There shouldn't be major changes in forms and reports, perhaps new field names. Most of the work is in revising the queries.

You'll probably be able to populate the new 3rd table using carefully designed append queries, so you shouldn't have to manually enter all the data.

But don't even start until you have studied and understand data normalization and many-to-many queries. Basically, your tables should look like this:
Code:
tblTeachers:
   Tid          Autonumber (PK)
   Tname        Text
   Tphone       Text

tblCourses:
   Cid         Autonumber (PK)
   Cname        Text
   Croom        Text
   Cstart       Date
   Ctime        Text
   Cunits       Integer

tblTeachers_Courses:
   Tid          Long Integer (FK)
   Cid          Long Integer (FK)

Reply With Quote
  #8  
Old November 3rd, 2009, 04:53 PM
HJLatorre HJLatorre is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Jun 2009
Posts: 17 HJLatorre User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 h 10 m 5 sec
Reputation Power: 0
Quote:
Originally Posted by don94403
An hour is probably an underestimate, especially for someone who doesn't have a firm grip on relational database construction. It is not intuitive. Setting up the tables shouldn't take more than 15 minutes, but changing a number of queries will take a little longer. There shouldn't be major changes in forms and reports, perhaps new field names. Most of the work is in revising the queries.

You'll probably be able to populate the new 3rd table using carefully designed append queries, so you shouldn't have to manually enter all the data.

But don't even start until you have studied and understand data normalization and many-to-many queries. Basically, your tables should look like this:
Code:
tblTeachers:
   Tid          Autonumber (PK)
   Tname        Text
   Tphone       Text

tblCourses:
   Cid         Autonumber (PK)
   Cname        Text
   Croom        Text
   Cstart       Date
   Ctime        Text
   Cunits       Integer

tblTeachers_Courses:
   Tid          Long Integer (FK)
   Cid          Long Integer (FK)


THANK-YOU!! It could be awhile before I start making the changes. . .but I'll keep ya posted when I do!

Reply With Quote
Reply

Viewing: ASP Free ForumsDatabaseMicrosoft Access Help > Forms - Use a form for query critera (yes/no boxes)


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump





 Free IT White Papers!
 
How to Present Effectively Online
This white paper offers practical and actionable advice on the key steps that any presenter should consider as they plan and execute a Webinar or online meeting.

 
Open Source Security Myths
Open Source Software (OSS) is computer software whose source code is available to the general public with relaxed or non-existent intellectual property restrictions (or arrangement such as the public domain), and is usually developed with the input of many contributors.

 
Power and Cooling Capacity Management for Data Centers
This paper describes the principles for achieving power and cooling capacity management.

 
Scalable, Fault-Tolerant NAS for Oracle - The Next Generation
For several years NAS has been evolving as a storage alternative for Oracle databases, and for good reason: NAS is quite often the simplest, most cost-effective storage approach for Oracle. Learn about the benefits that HP's approach to scalable NAS brings to Oracle environments in this comprehensive white paper.

 
Understanding Web Application Security Challenges
This white paper discusses many common threats and preventive measures for Web application security, and explains what you can do to help protect your organization.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2009 by Developer Shed. All rights reserved. DS Cluster 1 Hosted by Hostway
For more Enterprise Application Development news, visit eWeek