dynamic listbox

Public Schedule Face-to-Face & Online Instructor-Led Training - View dates & book

Forum home » Delegate support and help forum » Microsoft Access Training and help » Dynamic listbox

Dynamic listbox

resolvedResolved · Low Priority · Version 2007

Edited on Fri 3 Jun 2011, 12:44

Robert has attended:
Access Advanced course

Dynamic listbox

Is it possible to dynamically change the values in a listbox based on the value selected in another listbox in the same form?

What I want to do is to be able to select a sub-section in list 2 after first selecting the main section in list 1.

Any help greatly appreciated.

RE: Dynamic listbox

Hi Robert, thanks for your query. It is possible, but you'll need to do it in VBA. What you're trying to do is capture the event that occurs when you choose an option in the first listbox, and use that to trigger the population of the second.

Hope this helps,

Anthony

RE: Dynamic listbox

Thanks Anthony.

I put an 'on click' event on the first listbox that requeried the second listbox. This seemed to work ok because the selection criteria of the second listbox was based on the selected value in the first one.

RE: Dynamic listbox

Excellent! Glad it worked!

Anthony


 

Access tip:

Prefixed Autonumbering

When using Date Type = Autonumber as a primary key, clients may require autonumbering to be prefixed with a letter.

For example, P001, where P is the prefixed letter

Instructions
Step 1. Create Field Name
Step 2. Set Data Type to Autonumber
Step 3. Within Field Property General tabsheet,
enter Format property as [backslash]P000



View all Access hints and tips


Server loaded in 0.09 secs.