If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Other > Auto Number Using VB AND ACCESS

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 11-19-03, 08:47
hlenganeet hlenganeet is offline
Registered User
 
Join Date: Nov 2003
Location: South Africa
Posts: 8
Auto Number Using VB AND ACCESS

To insert data into a field of data type Number, we use

"INSERT INTO table
VALUES(" & text1.text & "')"

What need to be used in order to replace text1.text, to insert into a field of data type "Auto Number" in order to Auto Increment using VB and Access

Please, do not mind my English. I am a South African.
Reply With Quote
  #2 (permalink)  
Old 11-22-03, 03:12
shianmiin shianmiin is offline
Registered User
 
Join Date: Nov 2003
Posts: 48
The syntax for insert is

INSERT INTO TABLE (FIELD1, FIELD2, FIELD3)
VALUES (VALUE1, VALUE2, VALUE3)

if data type for FIELD1 is "Auto Number",
you don't have to specify it in the insert statement

i.e.
the insert statement should look like
INSERT INTO TABLE (FIELD2, FIELD3)
VALUES (VALUE2, VALUE3)
__________________
Shianmiin
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On