[Ctrl] Click Help

R

Ross

Hopefully someone has done this...

I have written up a Scheduling database with a number of "sub forms" so our
Manager can allocate Jobs to our techs.

I can use the "onclick" command to store the Job in a temp location and then
"onclick" again to paste it under the correct Tech.
I need to be able to change it to [Ctrl] Click so it does the same thing as
he clicks on the screen to Sort etc and he wants the [Ctrl] Click option to
be able to control what is being copied.

Thanks in advance,

Ross
 
G

Guest

You have to do it on the mouse_down (or up) event rather than the click and
then test the shift parameter for the other keys used simultaneously;
Dim intCtrlDown As Integer

intCtrlDown = (Shift And acCtrlMask) > 0

If Button = acLeftButton Then
If intCtrlDown Then
MsgBox "You pressed the left button & Ctrl."
End If
End If

You can also pick up the other 2 mouse buttons and Shift & Alt too.

Hope this helps,

TonyT..
 
J

John Vinson

Hopefully someone has done this...

I have written up a Scheduling database with a number of "sub forms" so our
Manager can allocate Jobs to our techs.

I can use the "onclick" command to store the Job in a temp location and then
"onclick" again to paste it under the correct Tech.
I need to be able to change it to [Ctrl] Click so it does the same thing as
he clicks on the screen to Sort etc and he wants the [Ctrl] Click option to
be able to control what is being copied.

Thanks in advance,

Ross

WHOA!!!

You're making a very easy job into something much more difficult.

How about a solution with one form, one subform, and no code at all?

You need three tables: Techs; Tasks; and Assignments. The Assignments
table would have fields for the TechID, the TaskID, and any
information about that employee's relationship with this task (e.g.
date assigned).

Use a Form based on the Tasks table, with a subform containing a combo
box based on the Techs table. To assign a tech to a task, select his
or her name from the combo box and enter the other data. You're done.

John W. Vinson[MVP]
 
R

Ross

John, I understand what you are saying and I set it up that way first off,
but our Manager wants "Drag-n-Drop" functionality.

Ross

John Vinson said:
Hopefully someone has done this...

I have written up a Scheduling database with a number of "sub forms" so
our
Manager can allocate Jobs to our techs.

I can use the "onclick" command to store the Job in a temp location and
then
"onclick" again to paste it under the correct Tech.
I need to be able to change it to [Ctrl] Click so it does the same thing
as
he clicks on the screen to Sort etc and he wants the [Ctrl] Click option
to
be able to control what is being copied.

Thanks in advance,

Ross

WHOA!!!

You're making a very easy job into something much more difficult.

How about a solution with one form, one subform, and no code at all?

You need three tables: Techs; Tasks; and Assignments. The Assignments
table would have fields for the TechID, the TaskID, and any
information about that employee's relationship with this task (e.g.
date assigned).

Use a Form based on the Tasks table, with a subform containing a combo
box based on the Techs table. To assign a tech to a task, select his
or her name from the combo box and enter the other data. You're done.

John W. Vinson[MVP]
 
R

Ross

Tony,

Thanks for your help I will give it a go.

Ross


TonyT said:
You have to do it on the mouse_down (or up) event rather than the click
and
then test the shift parameter for the other keys used simultaneously;
Dim intCtrlDown As Integer

intCtrlDown = (Shift And acCtrlMask) > 0

If Button = acLeftButton Then
If intCtrlDown Then
MsgBox "You pressed the left button & Ctrl."
End If
End If

You can also pick up the other 2 mouse buttons and Shift & Alt too.

Hope this helps,

TonyT..

Ross said:
Hopefully someone has done this...

I have written up a Scheduling database with a number of "sub forms" so
our
Manager can allocate Jobs to our techs.

I can use the "onclick" command to store the Job in a temp location and
then
"onclick" again to paste it under the correct Tech.
I need to be able to change it to [Ctrl] Click so it does the same thing
as
he clicks on the screen to Sort etc and he wants the [Ctrl] Click option
to
be able to control what is being copied.

Thanks in advance,

Ross
 

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