> Hi everyone
>
[quoted text clipped - 57 lines]
> I don't even know if this code is close to being correct, I will provide
> more details if needed, I would greatly appreciate any help!
You don't say what problem you're having. It appears that you only want to
process a single item from the listbox, so why do you have it set for
multiselect? You could change the Multiselect property to None and do the
following in the DblClick event:
strSQL = "SELECT * FROM AccessNSUnionInquiries" & _
"WHERE Inquiries.InquiryID = " & Me.ViewInquiries
Set rs = CurrentDb.OpenRecordset(strSQL)
' Populate your fields like you do now...
Carl Rapson
Sara - 20 Jun 2007 23:29 GMT
The problem is that the code doesn't work, when I double clcik an item from
the list box it automatically switchs to the visual basic code.
I use basically one item from the list (InquiryID) which is primary key to
the table from where I am retrieving all the information related to that ID.
I m sorry If I am not very clear, it is kind of a complex case for me a
beginner.
> > Hi everyone
> >
[quoted text clipped - 69 lines]
>
> Carl Rapson
Carl Rapson - 21 Jun 2007 16:00 GMT
What do you mean, "switches to the visual basic code"? Do you mean the VBA
code window opens? If so, is a particular line of code highlighted? Does an
error message appear?
You might want to try my suggestion and see if it makes a difference. Just
replace everything from your
For each row...
line through (and including)
strSQL = "SELECT..."
with the code I posted, and see what happens. Note: you also don't need the
Set db = CurrentDb
and
db.Close
Set db = Nothing
lines, because you're not using the 'db' variable.
Carl Rapson
> The problem is that the code doesn't work, when I double clcik an item
> from
[quoted text clipped - 83 lines]
>>
>> Carl Rapson