List Boxes in forms. Help please! :)

  • Thread starter Thread starter DeepEnd
  • Start date Start date
D

DeepEnd

Guest
I am having a lot of trouble trying to understand List Boxes in general and am hoping someone can explain them for me.

My problem is I have a database where a user has one unique ID number, but they can have several departments that they can be linked to in another table. I'd like to be able to have the various departments listed in a List Box with the departments that the user is linked to automatically selected when viewing the form.

Then if I was to add a new user, I'd select each department by using the Multi Select feature and add those details to the existing database.

Does this work or am I way off track here?

I hope that makes sense. My experience to date has been creating tables in Access. Everything else is new to me.

Thanks in advance. :)
 
NO your not off track. You will find this easy. First your tables have to be already defined. You should have a table for your users and a table with your departments (with data already entered) right?. You also need a relationship between the two tables which I assume you already have.

Ok. Now open your form in design view. Make sure you have the tools window, properties window, and fields window(fields of all tables that you want in the form) OPEN.

Next click on the wizard button in the tools window, then click on the list option button. Both should be selected now. NOw go CLICK AND DRAG the field department that you want has a dop down list and drag it to the form. A wizard will appear and just follow the easy steps.

:)

Cheers,

Ghislain Bob Hachey
 
Thanks for that. It was slightly different to how I was approaching it and therefore got me closer :). To answer your questions, yes the data and relationships are already there.

I'm getting the List Box now with the correct details inside. I can multi-select, but when I view existing entries, they are not automatically selected. I'm guessing I need a query or vbscript somewhere to get the selection process to work when viewing the existing entries. But that's where I hit the wall.
 

Users who are viewing this thread

Back
Top Bottom