using ADO recordsource to populate listbox

Just for chuckles try this instead of populating variables:

MsgBox Me.lstMultipleValues.Column(1)
MsgBox Me.lstMultipleValues.Value

Can you attach the db here?

this gave me a "Invalid use of Null" error.

Not anytime soon, pretty massive DB with confidential data so i'd need to make a copy and strip it down. probably would be able to post till monday.
 
I understand, I just can't see what I'm missing. Curious if a db with that table/form with a hard-coded SQL row source for the combo still throws the error
 
I understand, I just can't see what I'm missing. Curious if a db with that table/form with a hard-coded SQL row source for the combo still throws the error
Same here, i feel like its something stupid simple like a spelling error or something but i've looked over it several times and couldn't see anything.


Tried hard coded rowsource = "SELECT partmatrix.PM_PartNumber AS [Part Number], partmatrix.PM_ToolNumber AS [Tool Number], partmatrix.PM_PartDescription AS Description, partmatrix.PM_PartStatus AS Status
FROM partmatrix
WHERE (((partmatrix.PM_PartNumber)='6150432'))
ORDER BY partmatrix.PM_ToolNumber DESC;"

populates the contents of the listbox just fine as before but still returns Null's when double clicked.

then tried to set the forms recordsource = partmatrix table..... same result.

Then also set the listbox's control source to the part matrix table and still returned null's
 
Can just that form and table be posted here? Or does that table contain confidential data?
 
Can just that form and table be posted here? Or does that table contain confidential data?

the table does but i can create a mock with some filler data. Will have to wait for Monday though. Thanks for all the help, i'll be sure to post something up when I get back in.
 
No problem, have a good weekend. Maybe somebody will see what I'm missing before Monday.
 
What do I search on to recreate the problem?
 
What do I search on to recreate the problem?

if you search one of the part numbers (Should be '12345') it should return multiple values and display the form with the listbox.
 
Ah, the hint is that you can't select a record at all, even with a single click. The Allow Edits property of the form is No, change it to Yes. Also delete the Control Source property of the listbox, which is meaningless when the form has no Record Source.
 
Ah, the hint is that you can't select a record at all, even with a single click. The Allow Edits property of the form is No, change it to Yes. Also delete the Control Source property of the listbox, which is meaningless when the form has no Record Source.

Ah... that got it!

Thanks Pbaldy!
 

Users who are viewing this thread

Back
Top Bottom