09-02-2015, 11:39 AM
السلام عليكم هذا الإجراء شغال ومجرب 100%
procedure TForm1.SpeedButton1Click(Sender: TObject);
begin
if Table1.RecordCount=0 Then
Maskedit1.Text:='Ar-001'
ELSE
begin
if (Table1.RecordCount+1<10) then
Maskedit1.Text:='Ar-00'+inttostr(Table1.RecordCount+1) else
Maskedit1.Text:='Ar-0'+inttostr(Table1.RecordCount+1);
if (Table1.RecordCount+1>=100) then
Maskedit1.Text:='Ar-'+inttostr(Table1.RecordCount+1);
end;
بالتوفيق
procedure TForm1.SpeedButton1Click(Sender: TObject);
begin
if Table1.RecordCount=0 Then
Maskedit1.Text:='Ar-001'
ELSE
begin
if (Table1.RecordCount+1<10) then
Maskedit1.Text:='Ar-00'+inttostr(Table1.RecordCount+1) else
Maskedit1.Text:='Ar-0'+inttostr(Table1.RecordCount+1);
if (Table1.RecordCount+1>=100) then
Maskedit1.Text:='Ar-'+inttostr(Table1.RecordCount+1);
end;
بالتوفيق

