Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How can I add "Search By" to my drop down DTC? 1

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Hi. I have a drop down DTC which in bound to a recordset. When I select the first entry, my recordset doesn't refresh itself. Any other selection is fine...

I was thinking that I could resolve this issue by adding a Search By entry that will always show as my first entry.

Does anyone know how I could do this?

Thanks,
Rene
 
Not sure what you mean...
But a list DTC (or any OPTION list) will display the first item UNLESS it is specifically positioned. The list will automatically positioned if the 'DATA' bindings on the General tab of the list/combo are set.

For a List DTC, you can add a 'dummy' entry to the list by...

1. Tell the list recordset to NOT automatically open (implementation tab)
2. In the thisPage_onenter event [add a pageObject DTC to see this event] enter...

if thisPage.firstEntered = true then
'**populate the combo list...
rsMyCodes_List.open
rsMyCodes_List.close
'** combo now populated! Add default row...
cmbMyCodesCombo.addItem &quot;<Select a Code>&quot;,-1,-1

end if

3. In any BeforeUpdate event code (if the combo is Data bound), just check that the selected Combo value is NOT -1.
(Content Management)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top