|
[x]
Posted via EE Mobile
|
||
Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again. |
||
| 10/07/2008 at 10:55AM PDT, ID: 23794636 |
|
[x]
Attachment Details
|
||
|
[x]
The Solution Rating System
|
||
With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.
Your Input Matters If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support. Thank you! |
||
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43: 44: 45: 46: 47: 48: 49: 50: 51: 52: 53: 54: 55: 56: 57: 58: 59: 60: 61: 62: 63: 64: 65: 66: 67: 68: 69: 70: 71: 72: 73: 74: 75: 76: 77: 78: 79: 80: |
Heres the sub form code:
procedure TFormDupLastName.FormCreate(Sender: TObject);
begin
DBGrid1.Columns.LoadFromFile('C:\No25Data\Text\Grid_DupLastName_Width.txt') ;
LabPressBtn.Visible:=True;
end;
//Save grid data
procedure TFormDupLastName.FormClose(Sender: TObject; var Action: TCloseAction);
begin
DBGrid1.Columns.SaveToFile('C:\No25Data\Text\Grid_DupLastName_Width.txt') ;
end;
// Close form button = focus EdSearch
procedure TFormDupLastName.sBitBtn2Click(Sender: TObject);
begin
ADOQuery1.Close;
ADOQuery1.SQL.Clear;
Close;
FormDuplicatesCheck.EdSearch.SetFocus;
LabPressBtn.Visible:=True;
LabDupAdd.Visible:=False;
LabDupName.Visible:=False;
end;
// Dup Last Name
procedure TFormDupLastName.DupLastNameBtnClick(Sender: TObject);
begin
ADOQuery1.Close;
ADOQuery1.SQL.Clear;
ADOQuery1.SQL.Add ('select distinct a.ID as [ID], a.Name_First as [First Name], a.name_last as [Last Name], a.Add_Hsename_nbr as [Hse Number], a.add_Street as [Street], a.add_district as [District] from contacts as A, contacts as B');
ADOQuery1.SQL.Add ('where A.name_first=B.name_first and A.name_last=B.name_last and A.id<>B.id order by a.name_last, a.name_first, a.id');
ADOQuery1.Parameters.Clear;
ADOQuery1.Open;
DBGrid1.Columns.LoadFromFile('C:\No25Data\Text\Grid_DupLastName_Width.txt') ;
LabPressBtn.Visible:=False;
LabDupName.Visible:=true;
LabDupAdd.Visible:=False;
end;
//Dup Address button
procedure TFormDupLastName.DupAddBtnClick(Sender: TObject);
begin
ADOQuery1.Close;
ADOQuery1.SQL.Clear;
ADOQuery1.SQL.Add ('select distinct a.ID as [ID], a.Name_First as [First Name], a.name_last as [Last Name], a.Add_Hsename_nbr as [Hse Number], a.add_Street as [Street], a.add_district as [District] from contacts as A, contacts as B');
ADOQuery1.SQL.Add (' where A.add_street=B.add_street and A.id<>B.id order by a.add_street, a.name_last, a.name_first, a.id');
ADOQuery1.Parameters.Clear;
ADOQuery1.Open;
DBGrid1.Columns.LoadFromFile('C:\No25Data\Text\Grid_DupLastName_Width.txt') ;
LabPressBtn.Visible:=False;
LabDupAdd.Visible:=true;
LabDupName.Visible:=False;
end;
end.
Main Duplicates form code (I've left out the search routine that begins it...)
procedure TFormDuplicatesCheck.sBitBtn1Click(Sender: TObject);
begin
if DataModule1.dtContacts.State in[dsBrowse, dsInsert] then
begin
if sMessageDlg ('Are you really sure you want to'+#13+#10'permanently delete this contact?', mtConfirmation,
[mbYes, mbNo], 0) = mrYes then
DataModule1.dtContacts.Delete ;
edSearch.text:='' ;
end
else
DataModule1.dtContacts.Cancel
end;
procedure TFormDuplicatesCheck.sBitBtn2Click(Sender: TObject);
begin
close;
end;
procedure TFormDuplicatesCheck.DupLastNameBtnClick(Sender: TObject);
begin
FormDupLastName.ShowModal;
end;
procedure TFormDuplicatesCheck.FormClose(Sender: TObject;
var Action: TCloseAction);
begin
DataModule1.dtContacts.Refresh;
end;
end.
|
Advertisement