Drag and Drop

R

rascal

I am building a database where I will be tracking meetings attended by our
employees. I have a list of about 75 people. I need to track the date,
type of meeting, who held the meeting, and the people who attended. I have 2
tables called employees, which contacts ID, and EmployeeName. The other
Table is called Meetings and it contains the following fields: ID, DateHeld,
ChairedBy, Type, and Attendees.
I am building a form to enter the information for the meetings, but was
wondering if it is possible to use the Drag and Drop method which I found on
the Microsoft Help and Support page Article ID 210334, to drag the names from
the employee list over to the attendees list, for each meeting.
If so, how would I do it, as the example they give is pretty basic, and
doesn't really cover what I am trying to do.
Thanks for any help or suggestions you can give.
 
L

Linq Adams via AccessMonster.com

The Microsoft Help and Support page Article ID 210334 you cited is entitled:

HOW TO: Automatically Detect If a Form Is Being Edited in Access 2000

There's nothing in the article about drop and drag. Perhaps it would help if
you re-checked the article number, or even better, if you posted the code
here.
 
R

rascal

Sorry about that, I have been going through various Articles and put the
wrong 1 in. The Article is called "How to simulate drag-and-drop
capabilities in Access 2002
", Article ID 287642.
 
L

Linq Adams via AccessMonster.com

I have seen drop and drag routines around, but probably an easier method
would be to use two Listboxes, with the first holding your employee names and
the second starting out blank, with the Row Source Type of the second set to
Value List. Then simple code

Private Sub EmployeesListBox_AfterUpdate()
AttendeesListBox.AddItem (Me.EmployeesListBox)
End Sub

will move an employee name into the second list box. When you're done you can
loop thru the AttendeesListbox and write the data to wherever you need it.
 
R

rascal

Thank you, that works and is a lot simpler, however when I go to add a new
meeting the attendees from the previous meeting are still in the attendees
list for the new meeting, so I must have missed something, but can't figure
it out.
 
L

Linq Adams via AccessMonster.com

I don't know how you're handing things after you have the employees names in
the attendees box, but you just reset it when you go to a different record.
Either

Private Sub Form_Current()
AttendeesListBox.RowSource = ""
End Sub

Or, if you only want to reset it for a new record

Private Sub Form_Current()
If Me.NewRecord then
AttendeesListBox.RowSource = ""
End If
End Sub
 

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