How do I get access to allow multiple selections?

N

Nadihaha

I'm trying to set up a database to allow us to record What software is on
which computer. I've set up a table list ing the software information, and
one with the computer information. I can get the Multi Selection in the list
box, but is ther anyway of getting the selections to "drop" into another
field once selected so that there is a list of what has been selected??

Many thanks in Advance
 
K

KC-Mass

You have to iterate through the itemsSelected comething in the vein of:

With Forms!frmMyForm!lstSoftwareTitles
For Each VarItem In .ItemsSelected
If Not IsNull(VarItem) Then
'Build up A string
strTitles = strTitles & """" & .Column(0, VarItem) & """, "
End If
Next
End With

Allen Brown has a thourough example on his site.

Regards

Kevin
 
K

KARL DEWEY

I think you need three tables.
Computer --
CompID - autonumber primary key
Model -
CPU -
Memory -
Disk -
etc -

Software --
SoftwareID - autonumber primary key
Software - text
Version -
License -

Comp_Software --
CompID - long integer - foreign key
SoftwareID - long integer - foreign key
Install - DateTime

One-to-many relationship Computer/Comp_Software and Software/Comp_Software.

Use a form/subform for computer/software selection with Master/Child links
on CompID and combo box to select software.

And use another form/subform for software/computer installation with
Master/Child links on SoftwareID.
 
N

Nadihaha

Cool thanks I'll try to decipher those suggestions and give them a go. I had
figured out that I'd need 3 tables but didn't have any idea on how to link
them.

Are there any goos books or websites to help me with this?

I don't want to have to keep pestering you with repeated questions and would
like to "know" how to do it, so I can use my skills for other applications.

Cheers
 
N

Nadihaha

Ok this may seem like a really stupid question, but I'm going to ask it
anyway. When I set up the table Comp_Software I can figure out the long
integer bit but how do I enter the foreign key bit??

Thanks
 
K

KARL DEWEY

It is not something to be entered. It is the 'many' end of a one-to-many
relationship. In the relationship window put the two tables and drag from
primay key field to the foreign key field. Select Referential Integerity and
Cascade Update.
 
K

KARL DEWEY

Open the form that contains the subform, right click and select Properties,
click on the very upper left corner of the subform and then in the properties
window select the Master/Child links.
 

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