Certain list box columns? (1 Viewer)

vent

Registered User.
Local time
Today, 03:25
Joined
May 5, 2017
Messages
160
Hi everyone

I have a table with 14 column fields and on a separate form has a list box with the record source set to this table and text boxes bound to the first 11 columns, so when the user selects a row in the list box, the text boxes autopopulate with their respective column info. However my new task to add 2 more important column fields. The goal is for the list box to display 5 of the total 13 columns, but the textboxes to include the rest of the columns. Essentially the user sees the information in the 5 columns and the text boxes include additional information. Before I play around with this as I've had some issues with Access crashing on me lately, does anyone have any advice or information on how I can display a few specific columns from a table onto a listbox, but have the textboxes display the rest? Thank you!
 

isladogs

MVP / VIP
Local time
Today, 07:25
Joined
Jan 14, 2017
Messages
18,186
Its very straightforward.
You've already explained the idea & just need to implement it

In the listbox, include the PK field as the first hidden column then select the other 5 fields you want to display
 

vent

Registered User.
Local time
Today, 03:25
Joined
May 5, 2017
Messages
160
I changed the query to only show the desired columns in the list box, but when I try to set the textboxes' control source to the rest of the column values, I don't see them in the dropdown. I also set the form's record source to the query as well. Thoughts? And much thanks from a rookie.
 
Last edited:

Minty

AWF VIP
Local time
Today, 07:25
Joined
Jul 26, 2013
Messages
10,355
Bring all the columns you want into the list box source. Put the list box columns widths to 2;2;2;2;2;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0 (you get the idea)

You will only see the first 5, but all 14/18 (how ever many) will be able to be referenced in the Listbox column() properties.
 

vent

Registered User.
Local time
Today, 03:25
Joined
May 5, 2017
Messages
160
Bring all the columns you want into the list box source. Put the list box columns widths to 2;2;2;2;2;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0 (you get the idea)

You will only see the first 5, but all 14/18 (how ever many) will be able to be referenced in the Listbox column() properties.


I went ahead and did that but how do i make the textboxes reference the other hidden columns? I click the dropdown under control source and nothing appears. Thanks!
 

Users who are viewing this thread

Top Bottom