Auto-populating form fields based on the selection in another field

Rabbitoh

Registered User.
Local time
Tomorrow, 06:48
Joined
Jul 17, 2006
Messages
34
I want to a number of form fields to auto-populate with data obtained from locations on a EXCEL worksheet, based on the selection made in another field on the form.

For example: If "apples" are selected from a drop-down field, then a number of related fields (edit boxes) are to display the attributes of the apple i.e it's colour, it's size, etc. If an orange is selected then the related attributes for it is displayed instead.

Does anyone know how to do this? Here is some sample code to display the blank form but it is the criteria I need to be able to assign for the required conditions.

With DialogSheets("FormAdd1")
<>.DropDowns("Drop Down 62").ListIndex = 0
.DropDowns("Drop Down 63").ListIndex = 0
.EditBoxes("Edit Box 68").Text = Trim(DialogSheets("FormAdd").EditBoxes("Edit Box 204").Text)
<>.EditBoxes("Edit Box 66").Text = Trim(DialogSheets("FormAdd").EditBoxes("Edit Box 144").Text)
.CheckBoxes("Check Box 75").Value = Value
.ListBoxes("List Box 74").Value = 0
.Show
End With
 
Last edited:

Users who are viewing this thread

Back
Top Bottom