PDA

View Full Version : Access Form Design Question


Oxeagle
20th Dec 2006, 12:45
Afternoon chaps,

I have a question regarding designing a form in Microsoft Access 2003. Basically, what i'm trying to do is this:

I have a database with a table of flight information, and a form to display it on. I want to use a date/time picker on the form (or just a text box for the user to type the date into if all else fails) to select a date from a calender view, and information for flights on this date will be displayed below in the same form. I have set this up, but I can't work out how to configure the date/time picker and/or the filter options for the 'Date' field in the flight table so that it only displays the flight information of flights on the same date as selected by the date/time picker. :confused:

Anyone have any ideas?

Ox

ZH875
20th Dec 2006, 19:51
Have your form based on a query, which uses the date input by the user as a search parameter, then only records with that date in the date field will be displayed.

Have a look at http://www.accessmonster.com/ where if all else fails, experts will point you in the right direction.

ZH

Oxeagle
21st Dec 2006, 08:25
Thanks for the reply ZH875. I have tried programming a query to filter the results by the date that is selected in the date/time picker on the form, but I'm not sure how to manually build an expression to enable this, and when I tried to use the expresion builder it couldn't find (or couldn't use?) the date/time picker. Any idea how I facilitate this?

Ox

ZH875
21st Dec 2006, 08:36
Brain not in gear just yet.

Have a look at: http://www.lebans.com/monthcalendar.htm which will get the calendar to update a text box, then IIRC in the textbox 'afterupdate' event, you need to run the query.

Use VBA code to pu the forms query code into the 'data source' and refresh, this should then have the form open and display the records you want.

Depending on the speed of your requirement, I recommend a sift at accessmonster, or a short delay until I can get my brain in gear.

ZH

Oxeagle
21st Dec 2006, 09:39
ZH,
No urgent requirement, just an ongoing project. I havn't used Access in a couple of years, so i'm a little rusty! Thanks for the links, I shall follow your advice and give it a try. if you have any more advice once your brain is in gear it would be much appreciated!
Cheers,

Ox