using ADO recordsource to populate listbox (1 Viewer)

JJSHEP89

Registered User.
Local time
Today, 12:22
Joined
Aug 18, 2016
Messages
121
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.
 

pbaldy

Wino Moderator
Staff member
Local time
Today, 10:22
Joined
Aug 30, 2003
Messages
36,125
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
 

JJSHEP89

Registered User.
Local time
Today, 12:22
Joined
Aug 18, 2016
Messages
121
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
 

pbaldy

Wino Moderator
Staff member
Local time
Today, 10:22
Joined
Aug 30, 2003
Messages
36,125
Can just that form and table be posted here? Or does that table contain confidential data?
 

JJSHEP89

Registered User.
Local time
Today, 12:22
Joined
Aug 18, 2016
Messages
121
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.
 

pbaldy

Wino Moderator
Staff member
Local time
Today, 10:22
Joined
Aug 30, 2003
Messages
36,125
No problem, have a good weekend. Maybe somebody will see what I'm missing before Monday.
 

JJSHEP89

Registered User.
Local time
Today, 12:22
Joined
Aug 18, 2016
Messages
121
took a while but here's the stripped down version
 

Attachments

  • IC Stripped.accdb
    768 KB · Views: 147

pbaldy

Wino Moderator
Staff member
Local time
Today, 10:22
Joined
Aug 30, 2003
Messages
36,125
What do I search on to recreate the problem?
 

JJSHEP89

Registered User.
Local time
Today, 12:22
Joined
Aug 18, 2016
Messages
121
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.
 

pbaldy

Wino Moderator
Staff member
Local time
Today, 10:22
Joined
Aug 30, 2003
Messages
36,125
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.
 

JJSHEP89

Registered User.
Local time
Today, 12:22
Joined
Aug 18, 2016
Messages
121
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

Top Bottom