I would like to use a multi-selection listbox to select values and store them in a table. I was able to do this in Access, but am having problems doing this in Project. Does anyone have any suggestions?? Thanks.
I've tried that and it doesn't work. Here is the code that I was using in my .mdb that doesn't work in my .adp...
Function CopySelected(frm As Form) As Integer 'This function inserts the selected emails into a table called EmailTmpTable
Dim ctlSource As Control
Dim ctlDest As Control
Dim intCurrentRow As Integer
Set ctlSource = frm!lstEmail
DoCmd.RunSQL "delete from EmailTmpTable"
For intCurrentRow = 0 To ctlSource.ListCount - 1
If ctlSource.Selected(intCurrentRow) Then
DoCmd.RunSQL "insert into EmailTmpTable values (""" + ctlSource.Column(0, intCurrentRow) + """)"
End If
Next intCurrentRow
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.