Month Date Selector

J

Jim

Here is what I want to do but I can’t figure out the best way to do it. I
want the user to click a button on a form and have a grid appear with months
listed horizontally and years listed vertically. The starting and ending
month and year are dynamic and would be passed when the user clicked the
button. The user needs the ability click and drag over as many months as
they want, the selection must be chronological, they cannot skip a month
between the first and last month selected. The selection method would
function the same way a MSWord selects data, if you click in the middle of a
paragraph and drag down one line the text to the right of the cursor is
selected on the first line and the text to the left of the cursor is selected
on the second line. When the user exits the selection control I only need
the first and last month/year the user selected passed back…

Where should I start?

Thanks in advance,

Jim
 
J

Jim

An alternative would be to only allow the user to select horizontally by
listing the months and years across the top, a lot like the MS Project gantt
chart…

Thanks again,

Jim
 
J

Jim

Peter,

The link did not work but I searched around Roger's site and found your flex
grid demo. I think by using some of the cursor location techniques in the
Flex Grid Events form I could create a timeline flex grid to do what I want
based on the Project Management Flex Grid. The only thing that I really
couldn’t figure out was how to allow the user to click and drag in the
Project Management flex grid calendar.

If it is OK with you, I’d like to try to code my own form based on your
Project Management form to do what I need.

Thanks for the help,

Jim
P.S. Could you let me know or drop a few hints on how to allow click/drag in
the Project Management flex grid?
 
P

Peter Hibbs

Jim,

Feel free to use any of the code.

As you may know, the Flex Grid control was really designed for use in
Visual Basic and normally supports Click and Drag functions.
Unfortunately, those facilities do not seem to work in Access (at
least I couldn't get them to work but if anyone knows differently then
I would be interested to hear).

You could have a look at : http://www.peterssoftware.com/dd.htm (not
my Web site by the way) which may work although it looks like it only
works with native Access controls, and if you can get it to work I
would be interested to see how.

Alternatively you may just have to redesign your interface to get
round the lack of Click and Drag. If you are trying to copy data from
one cell into another using the mouse I would have thought that that
would be possible using the Mouse Down and Mouse Up events, just copy
the data from the first cell into a temporary variable on the Mouse
Down event and then copy it back to the new cell on the Mouse Up event
(or something like that). If you are trying to do something more
complex then it may not be possible.

Sorry I can't be of more help.

Peter Hibbs.
 
J

Jim

Peter,

Thanks for the help and the code. I doubt I have the skills necessary to
get the click and drag working in the flex grid but if I get it working I'll
let you know.

I may take a look at the drag-n-drop tool and see if that gets me what I
want...

Thanks again,

Jim
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top