descriptions for options in list?

nutritiouspig

Well-known Member
Joined
Jan 8, 2003
Messages
615
here's my setup:

I have a combobox which references a table containing different reports and report names. I want to come up with a way to have a description of the report that is selected from the combobox list, to come up in an area to the right of it. I want to use the same area for every description. Any suggestions on a way to do this?

I am pretty new in Access, thanks for any help! :whistle:

~s
 

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
A combobox can display multiple columns (fields) for each row (record) of data. Add a description field to the table and display it.

Alternatively, slightly more complex, you could add some code to the 'afterupdate' event for the combo-box that pushes field values into a text box (to the right as you suggest).

My guess is the first option (multiple columns) will handle your problem.

Mike
 
Upvote 0
I already have it set up as suggested in your first solution.

Like:

Report 1
Report 2
Report 3

That would be in the drop down from the combo box list. What I want is to have it so that if "Report 1" is selected, off to the right is an explination of what "Report 1" is.

i.e., "Report 1 pulls team information for the date range selected....etc...etc...etc..."

So if Report 2 is selected from the combobox list, a different explination shows in the same place as the explination for Report 1, and so on.

Hope that makes sense.


|-------------| |-------------------|
|combo box | |ex[plination field|
|-------------| |-------------------|
 
Upvote 0
The easiest way to do this is to use multiple columns and leave the combo box wider. I understand what you're getting at though.

Generally, what you're going to have to do is create a form event that triggers after you select a specific pull down item in the combo box and pass that value to an existing text box.

I like the _AfterUpdate event for this.

Start by creating a text box appropriately located/shaped. (txt1)
Now, each of the fields in the source table for a combo box is accessible using syntax such as:

Me.fieldname1 Me.fieldname2 Me.fieldname3

So, going back to the description field in the source table (fld_desc)

In the afterupdate event, put this:
Code:
Me.Txt1.Value = Me.fld_desc

Now, a pointer - this only works if the recordsource for the form happens to be the same table as the combo-box. This is because the fields are available as properties inside the form.

Mike
 
Upvote 0

Forum statistics

Threads
1,221,792
Messages
6,161,995
Members
451,735
Latest member
Deasejm

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top