Gunakan pernyataan SQL
Misalnya dari module saya buat ini.
Function CreateT()
'1. Autonumber start di nomor 4, naiknya 2
strSQL = "CREATE TABLE test1 (No COUNTER (4,2) CONSTRAINT MyNo PRIMARY
KEY, Test Text(50), Umur DateTime);"
Call RunSQL(strSQL)
'2. Autonumber start di nomor 1, naiknya 1 strSQL = "CREATE TABLE
test2 (No COUNTER CONSTRAINT MyNo PRIMARY KEY, Test Text(50), Umur
DateTime);"
Call RunSQL(strSQL)
End Function
Function RunSQL(ByVal strSQL As String)
DoCmd.SetWarnings False
DoCmd.RunSQL strSQL, True
DoCmd.SetWarnings True
End Function
Salam,
Edy WIYONO
On 4/16/08, Steve Hanz <[EMAIL PROTECTED]> wrote:
>
> Minta tolong donk, bagaimana membuat autonumber dengan VBA tanpa memakai
> autonumber access.
>
> trims
>
>
>
> Steve Hanz
>
> Information Technology Department
>
> Bumimulia Indah Lestari, PT
>
> Jl. Jababeka XVI Kav. V No. 65 A Cikarang Bekasi
>
> Office Phone : +62 21 8936478 Ext. 251
>
> Faximile : +62 21 8936480
>
> Mobile : 62 815 7863 3583 or 62 818 0270 6485
>
> Email : [EMAIL PROTECTED] or [EMAIL PROTECTED]
>
> **
>
> * <http://www.bumimulia.com/>*
>
> "This e-mail (including any attachments) is intended solely for the
> addressee and could contain information that is confidential; If you are not
> the intended recipient, you are hereby notified that any use, disclosure,
> copying or dissemination of this e-mail and any attachment is strictly
> prohibited and you should immediately delete it. This message does not
> necessarily reflect the views of *Bumimulia Indah Lestari.* Although this
> e-mail has been checked for computer viruses, *Bumimulia Indah
> Lestari*accepts no liability for any damage caused by any virus and any
> malicious
> code transmitted by this e-mail. Therefore, the recipient should check again
> for the risk of viruses, malicious codes, etc as a result of e-mail
> transmission through Internet"
>
>
>
>