This is what I am doign to refresh the combobox after I update or create a new record in the dbf.Is this what you are refering to or are you talking about updating the dbf?I simply call this subNote is you are usign the DBF as a lookup table then it has to be in the same folder as the .axf file. (Where you set it in ArcStudio in the listvalues tab of the control properties of the combobox)If all you are doing is calling it for a query etc then it can be anywhere...
Sub PopulateListBoxMUTCDPage
Dim objRS4, objSelLayer4, objEFPageOneControls4, objEditForm4
Set objSelLayer4 = Map.SelectionLayer
Set objRS4 = objSelLayer4.Records
objRS4.Bookmark = Map.SelectionBookmark
Set objEditForm4 = application.map.layers("Supports").forms("EDITFORM")
Set objEFPageOneControls4 = objEditForm4.Pages("page3").Controls
Dim MUTCD_CodeValue
MUTCD_CodeValue = objEFPageOneControls4("mutcd_code").Value
'msgbox MUTCD_CodeValue
objEFPageOneControls4("List1").Clear
' SPECIFY THE PATH TO LOCATE THE DBF FILE FOR QUERYING
Dim path
path = "C:\GPS_data_collections\Packets_Outgoing\Support_Signs_Data_Collection_2011\MUTCD_Code.dbf"
Dim pDS
Set pDS = Application.CreateAppObject("RecordSet")
pDS.Open(path)
pDS.Find("MUTCD_CODE")
pDS.MoveFirst
Do While Not pDS.EOF
Dim Description, ObjectID
Description = pDS.Fields("MUTCD_CODE").Value
ObjectID = pDS.Fields("MUTCD_CODE").Value
objEFPageOneControls4("List1").AddItem ObjectID, Description
pDS.MoveNext
Loop
pDS.Close
Set pDS = Nothing
End Sub
WAIT A SECODN I AM CONFUSING MYSELF HERE....THT updates a list box on have on my form...this will update the combobox after saving the record in teh dbfCall this sub
Sub Save
....code to Save or Update the dbf
Call PopulateMUTCDCodeComboBox
End Sub
Sub PopulateMUTCDCodeComboBox
Dim objRS4, objSelLayer4, objEFPageOneControls4, objEditForm4
Set objSelLayer4 = Map.SelectionLayer
Set objRS4 = objSelLayer4.Records
objRS4.Bookmark = Map.SelectionBookmark
Set objEditForm4 = application.map.layers("Supports").forms("EDITFORM")
Set objEFPageOneControls4 = objEditForm4.Pages("page2").Controls
objEFPageOneControls4("mutcd_code").Clear
MsgBox "The MUTCD Code List is Updating, Please hold on!" & vbnewline & "The combobox will populate shortly", vbExclamation, "MUTCD Updating"
Dim path
' Desktop path
path = "C:\GPS_data_collections\StreetSign_Collection_ArcPAD\Packets_Outgoing\Support_Signs_Data_Collection_2011\MUTCD_Code.dbf"
Dim pDS
Set pDS = Application.CreateAppObject("RecordSet")
pDS.Open(path)
pDS.Find("MUTCD_CODE")
pDS.MoveFirst
Do While Not pDS.EOF
Dim varMUTCDCode
varMUTCDCode = pDS.Fields("MUTCD_CODE").Value
objEFPageOneControls4("mutcd_code").AddItem varMUTCDCode, varMUTCDCode
pDS.MoveNext
Loop
pDS.Close
Set pDS = Nothing
End Sub