Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Filter data by date from Unbound text box

Status
Not open for further replies.

PCX

Technical User
Dec 17, 2000
54
US
I have several unbound text boxes (date1 - date 31) these have the date corresponding to each day of the month on the main form.

I have 31 subforms (sfmData1 - sfmData31) that need to use the date in the appropriate date(1 -31) box as a filter for the data in each subform.

When date(1-31) box changes, the filter should update the data in the sfmData(1 -31) box.

Can I implement the filter on each subform using the same query or do I need a separate query for each subform? If so, examples would be appreciated.

Thanks


 
Hiya,

It's possible, but why make a rod for your own back?

You may have said that there are 365 days in a year and created 365 sub-forms for each day.

Would one main form and one sub-form (that covered up to 31 days of the month) not be better?
(Remember, that if you change ONE little thing on ONE of the 31 subforms, you'll have to change the other 30 subforms to match aswell).

Can you summarise what your application is intended to do?
This will save you a lot of future work I think.

Regards,

Darrylle




"Never argue with an idiot, he'll bring you down to his level - then beat you with experience."
 
I have a calendar that shows the items for each day that are in a table. There can be from one to 50 entries. Each day is shown in a format that looks like a large Outlook Calendar but it is an Access database.

I want to be able to view the calendar a full month at at time (scrolling is necessary because of the screen size and fonts size).

For me to see only the data for EACH day, I need to have 31 subforms on the main form (unless you have a better solution?) The reason I need to see EACH day is for scheduling purposes and with so many people to schedule seeing a week or two at a time with each day is the best for me.

Is that clear now?

Thanks for the help,
 
Try looking at thread702-19300

This provides a fully fuctional form and report that does what I think you want

Neil Berryman
IT Trainer
neil_berryman@btopenworld.com
 
Neil,

I appreciate your suggestion but I had already looked at that thread. The calendar in that instance uses UNBOUND text boxes instead of subforms. The way that it populates the box is ok but it only allows for ONE 255 character string to be entered under each date. This is very limiting to the type and amount of data that can be stored at each date box.

My concept is to have a subform (multiple columns and rows)that will access the many items that could be listed under each date and still have a way to edit, add, delete items.

Thanks,
 
If you get it sorted I would be grateful for a look as I too found the cal limiting but thought it could be of use to you.

I see where you'r coming from, I have a similar problem with a Guest House database that has 5 rooms for each date, hadn't thought of using sub forms

What about 30 day months and Feb?

The expression "Can of worms" springs to mind

Good luck

Neil Berryman
IT Trainer
neil_berryman@btopenworld.com
 
The 30 day months and Feb do not create a problem since the form actually has 42 cells. The way it works is it actually creates days on either side of the actual start and end date but those days are not displayed so that it appears to be a 'normal' calendar.

If you were to unhide all the boxes you would see that the days prior to the first day of the month are actually there just hidden.

I was hoping to have a way to do this without creating a subform for each day of the month. However, since no one has replied with a better solution I guess that is the only way. I just hope it does not slow down the process too much with 42 subforms on the main form.

Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top