我的程序如下:procedure trans;
var
    count,i:integer;
begin
    with Form1 do
    begin
        table1.close;
        table1.Open;
        count:=table1.RecordCount;
         pb.Min:= 0;
         pb.Max :=count;
        rxm.Close;
        rxm.Open;
        table1.First;
       for i:=0 to count do
        begin
           rxm.Append;
           rxm.Fields[0].Value:=table1.Fields[0].Value;
           rxm.Fields[1].Value:=table1.Fields[1].Value;
           rxm.Fields[2].Value:=table1.Fields[2].Value;
           rxm.Fields[3].Value:=table1.Fields[3].Value;
           rxm.Fields[4].Value:=table1.Fields[4].Value;
           pb.Position:=i;
           table1.Next;
        end;
    end;
end;procedure TForm1.Button1Click(Sender: TObject);
var
    hThread:Thandle;
    ThreadID:DWord ;
begin
    try
    hThread:=beginThread(nil,0,@trans,nil,0,ThreadId);
    if hThread=0 then
    begin
        showmessage('dfgdfjgdfgdf');
    end;
    except
        ;
   end;
end;
程序执行的错误提示为:Aceess violation at address 004aC94F in module "project1.exe".read of address 0000003E.
请问是什么原因造成的,在线等待