number fields

W

wilfried

want to give in where I can find the stamp in my books).and in each
book I can put 50 stamps (with documentations about the composer and
his works, where he was born, died, ....). So I have created two fields

who can count in the tabel stamps wehere I made a field composers that

I linked with the tabel composers, ...

The field ZegelsInBoek is a text with notation: ="06/" &
format(tussen,"0000") & "/" & format(einde,"00") with
inputmask 00/0000/01


06 refers to stamps about composers and do NEVER change
0001 refers to the book (see under)
01 refers to the first stamp in the book


This last field has an influence in himself (field ZegelsInBoek) and
the second field (boek).See under.
When the stamp 06/0001/50 is done. It has to change in 06/0002/01. And
so one.


The field boek is a text with notation: =laatste boek and imputmask
2006/00
2006 refers to the year
01 is the first book I made during the year 2006) than count + 1, so
2006/02 ... 2006/ in one year
The counting + 1 depends of the result of the file ZegelsInBook
When we have a new year the new value has to be 2007 and the counting
start again with 01...2007/02


I want to try with the


Dim rs as recordset
Dim tussen, laatste,einde
Set rs=dbengine(0)(0).openrecordset("Select max(zegels) as
grootste,max(boek) as grootsteboek from table")
Laatste=rs!grootste
Laatsteboek=rs!grootsteboek
If val(mid(laatste,9))=30 then
Tussen=val(mid(laatste,6,4))+1
Einde=1
Laatsteboek=left(laatsteboek,7) &
format(val(mid(laatsteboek,8)+1))
Else
Tussen=val(mid(laatste,6,4))
Einde= val(mid(laatste,9))+1
Endif


I want to place this code after input of a stamp ad I hope dat the
numberfield will start automaticully
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top