Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access
|
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 25th, 2004, 05:22 PM
Authorized User
 
Join Date: Jul 2003
Posts: 23
Thanks: 0
Thanked 0 Times in 0 Posts
Default Building a simple form - I thought

I offered to help a friend out with a small database that is meant to track lunch orders for their small private school. It is so simple, I didn't even give any thought to it. It is just 2 tables, one for students, and one for lunch orders. All we are tracking is whether or not a student ordered lunch on a given date.
TABLES:
student: autonumber, first, last, grade
lunch: studentid, date, order(y/n field)

Of course, I have the tables put together. That took all of 10 minutes. Now I want to make a data entry/display form, and that is proving to be a challenge. I want to make a list of all the students, and then have 1 week at a time displayed like this:
Code:
Student     Mon   Tue   Wed   Thur  Fri   (April 26-30)
Joe           x     x           x    
Sue           x           x           x
Tommy               x                 
Angie                           x     x
and so on.

I was going to do it with a sub-form. That won't work because you can't have have continuous view set on a form with subforms. If I try and just have unbound check boxes and use VB to set the values, all checkboxes in that column take on the same value in continuous form view.

I've tried 3-4 permutations, and now feel a bit humbled because I thought I could bang this out in an hour. Does anyone have any suggestions on how I can make a form like this?

Thanks for any input,
Quint
 
Old April 25th, 2004, 11:00 PM
Authorized User
 
Join Date: Mar 2004
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I would create a temporary table containing the names and weekdays for each student then attach that to a sub form as a datasheet. Add a save button to the main form and if the user presses that write the data back to the master table. Doing it this way means that you can implement a Save/Cancel scenario. If the user hits the cancel button all you have to do is recreate the temporary table etc.

Hope this helps??
-Chris
 
Old April 26th, 2004, 02:41 AM
Authorized User
 
Join Date: Jul 2003
Posts: 73
Thanks: 0
Thanked 0 Times in 0 Posts
Default

If you are using Access 2002/3 I would try a pivotview of joined tables. It is a lot easier than it looks.

Cheers Ray
 
Old April 27th, 2004, 01:07 PM
Authorized User
 
Join Date: Jul 2003
Posts: 23
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Unfortunately, I only have access 2000 at this point, so the Pivot Table isn't an option. But I think the temp table is the way to go. I was trying to avoid doing that for such a small project, but I like the ability to do the Save/Cancel step from a UI perspective.

Thanks for the ideas,
Quint





Similar Threads
Thread Thread Starter Forum Replies Last Post
Building an Email Submission Form u2clone ASP.NET 2.0 Basics 2 February 11th, 2008 12:32 PM
Building a simple forum using VB. saif44 ASP.NET 2.0 Professional 2 February 13th, 2007 02:57 PM
RowSpan not working like I thought MLaGrange ASP.NET 2.0 Basics 0 February 20th, 2006 10:13 AM
Need help understanding Building a Query by form watrout Access VBA 3 March 4th, 2004 01:58 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.