Select to view content in your preferred language

PLEASE HELP - Populate combobox

535
2
08-12-2010 01:20 PM
JayKappy
Frequent Contributor
I have a form with a few tabs on it...
What I want to do is select a feature and when the 2nd tab is activated populate the combobox with values from a particular field from a stand alone table.

Example:
I select a feature in the map
In tab 1 the features fields are shown (with a UniqueID)
When I click tab 2 I want to populate all the related records from a stand alone table based on the UniqueID value from the first tab and show the Type field in the combobox.
After the user selects the specific value in the combobox it populates the record in the textboxes on the 2nd tab.  Allowing for update etc. which will be handled with SQL statements.

Can this be done?
Any ideas
Tags (3)
0 Kudos
2 Replies
JayKappy
Frequent Contributor
Anyone have any ideas?

I started with just trying to populate a combobox and am having issues.....
I figure I can write a query....get that to work and them populat the combobox...
I can work on updaing the fields later....
I tried this and the .AddItem is not working...any thoughts

Dim objRS2, objSelLayer2, objEFPageOneControls2, objEditForm2
Set objSelLayer2 = Map.SelectionLayer
Set objRS2 = objSelLayer2.Records

objRS2.Bookmark = Map.SelectionBookmark

Set objEditForm2 = application.map.layers("Supports").forms("EDITFORM")
Set objEFPageOneControls2 = objEditForm2.Pages("page2").Controls

objEFPageOneControls2("Combo1").AddItem = "One"
objEFPageOneControls2("Combo1").AddItem = "Two"
0 Kudos
JayKappy
Frequent Contributor
OK I did this:  Although I do not know why I had to use two parameters ( "value" and "Text" )

objEFPageOneControls2("Combo1").AddItem "One", "One"
objEFPageOneControls2("Combo1").AddItem "Two", "Two"

Now just need a way to write a query that will query the Standalone table to get the records that match the uniqueID.  I then need to populate the combobox with these records (say just he unique id field)
Thoughts?
0 Kudos