# Re: about defin field

Posted by jen on October 03, 1998 at 00:40:16:

In Reply to: Re: about defin field posted by AndyLin on October 02, 1998 at 09:18:26:

: : 请问各位 VB 高手, 如何在 输入时, 定义栏位

: : 例 :
: : 新增时, idno 自动编号, idno 编码方式 = 年月日+流水号

: :
: : 承蒙赐教, 不胜感激 !!!!
: :
: 我通常有2种作法
: 1 再设计一个 table 用来纪录其他 table 目前编号到多少
: 2 直接在你所要异动之 table 找出最大值然后再加一

Sorry, 意思表达有些不对

Yes, I am create a table , 记录目前的 record number

but, I don't know how to assign on vb6

when I use foxpro , command like it :

select 1
use a
mmno = no
if substr(mmno,1,6) = substr(dtoc(date()),1,2)+; substr(dtoc(date()),4,2)+;
substr(dtoc(date()),7,2)
mmno = str(val(mmno)+1)
else
mmno = substr(dtoc(date()),1,2)+; substr(dtoc(date()),4,2)+;
substr(dtoc(date()),7,2)+"0001"
endif
select 2
use b
replace no with mmno

Plase tell me

thanks and sorry again !!!

Follow Ups:

- Re: about defin field AndyLin 09:33:18 10/03/98 (1)
  - Re: about defin field jen 23:29:24 10/04/98 (0)