Click here to Skip to main content
15,907,281 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Dear friends.
i am trying to save an Id field which is set to autonumber in access 2007 and formated to "00000000". When saving records fro backend (access) it saved automatically in this format but when saving from vb6 it is saving only like 3,4 instead of 00000003 and 0000004.


Please help me.
Thanks
Sarfaraz
Posted
Updated 25-Dec-12 7:16am
v2

1 solution

Dear friends
I have figured the answer for this question.
Here is the code
VB
Text1.Text = 1
Text1.Text = Format(Text1, "00000000")

Also please set the format for the Id field in access table to "00000000" first.


Thanks
Sarfaraz
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900