Forum > Beginners
DBF controls enable/disable
(1/1)
Petrus Vorster:
Hi All
Please guide me.
I have a DBlookupcombobox that contains some info from a record of services.
When the user picks one of those serives, it needs to look through the dataset to see if the servce is free or payable and so forth.
My search works, but it completely messes up my DBFlookupcombobox that wont show some of the entries after the search.
I made this procedure:
--- Code: Pascal [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---Procedure TForm1.GetPrefix();var checknumber:string;begindbf2.DisableControls;checknumber:=Dblookupcombobox2.Text; Dbf2.FilterOptions := [foCaseInsensitive];Dbf2.Filter := 'SMSTEXT=' + QuotedStr(checknumber);Dbf2.Filtered := true;Dbf2.First;while not dbf2.EOF dobegin Label30.caption:=(Dbf2.FieldByName('Prefix').AsString); label31.caption:=(Dbf2.FieldByName('Payable').AsString); dbf2.next; end; dbf2.Filtered:=False; dbf2.EnableControls; dbf2.Refresh; end;
After that enabledcontrols, the DBFlookupcombobox doesnt show some entries.
Please help.
-Peter
Petrus Vorster:
Came up with something that seems to work.
-Regards,
Peter
Navigation
[0] Message Index