How would you use the one filter procedure to filter a text field ignoring case, and the same filter to filer on a >= on a numeric field.. I used a combobox to allow user to selct a field to filter on and a memo to allow the user to enter the filter string. I can get it to work for either one but have to change the code to do so. I'd like it to work for both, or am I going to have to write procedures for different filter types.. SelectedField := cbFilterField.Value; tblUser.Filtered := False; ShowMessage('FILTER : '+SelectedField+' '+FilterMemo.Text); tblUser.Filter := SelectedField+' '+FilterMemo.Text; tblUser.Filtered := True; This will work for SelectedField >= 100 but not on a text field. I Tried to use this by typing in the memo field QuotedStr(FullName) Had to modify this line to .... tblUser.Filter := SelectedField+' = '+QuotedStr(FilterMemo.Text);
I have a delema. In my PAT I have key words for articles in a database and the title,author and date in another. I have combo boxes that contains all the keywords available but I dont know how to code to let people choose a keyword that is in one database and display the title and date and author that is in another, in a DBGrid can you please help me?
Start with a while loop with your keywords looping through that table with an if statement searching for the keywords. Inside that loop you have a nested loop looping through the other table. In an if statement find the field through which you are linking the tables through and display the tile, date and author inside the if.
@Courtney Fanner That usually means where you are displaying the fields in the RichEdit one or more of them has a number data type and you need to add FloatToStr / IntToStr. FloatToStrF(tblXX['FieldName']) or IntTostr(tblXX['FieldName']). Same could happen with boolean fields
hello sir please could you help me solve this problem, I would like to do a filter: on the list of Algerian consumables and the list of items with a higher purchase price than a given price thank you in advance
How would you use the one filter procedure to filter a text field ignoring case, and the same filter to filer on a >= on a numeric field..
I used a combobox to allow user to selct a field to filter on and a memo to allow the user to enter the filter string.
I can get it to work for either one but have to change the code to do so. I'd like it to work for both, or am I going to have to write procedures for
different filter types..
SelectedField := cbFilterField.Value;
tblUser.Filtered := False;
ShowMessage('FILTER : '+SelectedField+' '+FilterMemo.Text);
tblUser.Filter := SelectedField+' '+FilterMemo.Text;
tblUser.Filtered := True;
This will work for SelectedField >= 100 but not on a text field.
I Tried to use this by typing in the memo field QuotedStr(FullName)
Had to modify this line to .... tblUser.Filter := SelectedField+' = '+QuotedStr(FilterMemo.Text);
Ur gonna be the reason I pass grade 12😂😂
MrCraigster123 sameeeeeeee🙌🙌
Same eii😂..I'm writing on friday
same here lol
3 years later
if u write muse never you see result
how to filter a table by respecting uppercase and lowercase in delphi
I have a delema. In my PAT I have key words for articles in a database and the title,author and date in another. I have combo boxes that contains all the keywords available but I dont know how to code to let people choose a keyword that is in one database and display the title and date and author that is in another, in a DBGrid can you please help me?
Start with a while loop with your keywords looping through that table with an if statement searching for the keywords. Inside that loop you have a nested loop looping through the other table. In an if statement find the field through which you are linking the tables through and display the tile, date and author inside the if.
@Courtney Fanner That usually means where you are displaying the fields in the RichEdit one or more of them has a number data type and you need to add FloatToStr / IntToStr. FloatToStrF(tblXX['FieldName']) or IntTostr(tblXX['FieldName']). Same could happen with boolean fields
how to we delete the records but still keep the IDs in the correct order
You can sort by the ID field using code:
Example:
tblUser.Sort := 'UserID ASC' ;
hello sir please could you help me solve this problem, I would like to do a filter:
on the list of Algerian consumables
and the list of items with a higher purchase price than a given price
thank you in advance
Can you you tell me what the field names are and what data types the fields are?
@@MrLongITandCAT hello sir, thank you for your reaction, I have already found the solution to my problem
I have a feeling that you really like the artist Muse 😂
thanks
Спасибо от души просто я тебя люблю