General discussion

Locked

dynamic combobox

By sadbhavana ·
I use Micorsoft Access 2000. I have a form which contains among others one field(refctrl) and a combobox (refsubj). Depending on whether the field refctrl is blank or filled in the items to be displayed in the combo box refsubj should be dynamicallyregulated. How can this be done? What is the VBA code that will help?

This conversation is currently closed to new comments.

3 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

dynamic combobox

by andrew In reply to dynamic combobox

Here's one way:

Add code to the Text box Change event handler:

Private Sub Text1_Change()
If Text1.Text <> "" Then
Me.Combo1.RowSource = "SELECT Table1.key FROM Table1;"
End If
End Sub

Test the field and set the combo's RowSource property if not blank.

Collapse -

dynamic combobox

by sadbhavana In reply to dynamic combobox

Poster rated this answer

Collapse -

dynamic combobox

by sadbhavana In reply to dynamic combobox

This question was closed by the author

Back to Web Development Forum
3 total posts (Page 1 of 1)  

Related Discussions

Related Forums