从VB6以8位数格式保存2007年acccess中的自动编号字段 [英] Save Autonumber field in acccess 2007 from VB6 in 8 digit format

查看:73
本文介绍了从VB6以8位数格式保存2007年acccess中的自动编号字段的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

亲爱的朋友。

我正在尝试保存一个Id字段,该字段在访问2007中设置为自动编号并格式化为00000000。保存后端(访问)记录时,它会以这种格式自动保存,但从vb6保存时,只保存为3,4而不是00000003和0000004.





请帮帮我。

谢谢

Sarfaraz

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

推荐答案

亲爱的朋友们/>
我已经找到了这个问题的答案。

这是代码

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



另请首先将访问表中Id字段的格式设置为00000000。





谢谢

Sarfaraz


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


Thanks
Sarfaraz


这篇关于从VB6以8位数格式保存2007年acccess中的自动编号字段的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆