2012-07-16 3 views
0

데이터를 데이터베이스에 저장하는 양식이 있는데 사용자가 ID를 쓰지 않아도되도록 필드 중 하나를 ID의 줄에 다음 값으로 자동 계산됩니다. 누구에게 아이디어가 있습니까?Access에서 양식의 자동 번호 매기기

+0

은이 문서를 참조하십시오 : http://superuser.com/questions/288087/how-do-i -set-the-first-of-access-in-access의 값 –

답변

2

자동 번호 데이터 형식을 사용하여 테이블을 만듭니다.

0

수동으로 다음

CREATE TABLE TableThatIncrements 
(
    Id AUTOINCREMENT(1001,1) 
) 

는 다른 방법으로 사용하여 기존 테이블에 ID 열을 편집 할 수 있습니다이 문 테이블을 작성하는 경우 : 당신이, 당신이 기사에 따라 변경할 수없는 경우

ALTER TABLE TableThatIncrements 
    ALTER COLUMN Id AUTOINCREMENT(1001,1) 

을 나는 GUI 인터페이스를 통해 언급했다. 이 문서의 단계를 참조하십시오 https://superuser.com/questions/288087/how-do-i-set-the-first-value-of-autonumber-in-access

당신은 Access에서 쿼리를 실행할 수 있습니다 다음을 수행하여 :

Go to the "Create" tab and click "Query Design" 

Just close the window that appears which asks you to select tables, we don't need that. 

Go to the "Design" tab and click the button with the arrow until you get a textual input screen. (By default, it says SELECT;). 

Delete the default text and paste the above query. 

Click "Run".