My revised DropDown Combo class is now available in the Donwloads section. This combo will now add new records to your lookup table if your users enter new values to the combo. All you have to do is populate 3 custom combo properties to do this.
Until the corrected version is posted, please replace the mAddItem method with the following code:
lparameter lcItem
local lnLen, lnWidth
with This
lnLen = alen(.aList, 1) + 1
lnWidth = alen(.aList, 2)
if lnWidth = 0
dimension .aList[lnLen]
.aList[lnLen] = lcItem
else
dimension .aList[lnLen, lnWidth]
.aList[lnLen, 1] = lcItem
endif
.mFillColumns(lnLen)
if .lUpdateRowSource
This.mUpdateRowSource(lcItem)
endif
if alen(.aList, 1) > 1
=asort(.aList)
endif
.Requery()
endwith
Mark McCasland
Midlothian, TX USA