Text & Number increment.

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a table that it need to have a consecutive number like this:

BRL-00001 and the next capture need to be BRL-00002 and so,,can anyone help
with this??

I have thought to do a Extra table and capture many consecutives numbers,
and put a check box that when I used one consecutive the ckeckBox change to
=true, and the next capture will pick up the next consecutive number if
checkbox is = False.

please help me..
thanks..
 
This is answered almost every day. Have you tried searching and reading
previous posts?
 
I have a table that it need to have a consecutive number like this:
BRL-00001 and the next capture need to be BRL-00002 and so,,can anyone help
with this??

I have thought to do a Extra table and capture many consecutives numbers,
and put a check box that when I used one consecutive the ckeckBox change to
=true, and the next capture will pick up the next consecutive number if
checkbox is = False.

please help me..
thanks..

you just need to hold 1 number, this being the last you used
then you use the code below
I leave it up to your creativity to implement it :')
remember, this is just out of my head so look out for errors

sub control-add-new-record_click()
dim rs as dao.recordset
dim NewRecordNumber as string

NewRecordNumber = RetrieveParameter("ownID")

set rs = me.recordset.clone
rs.addnew
rs.fields("MY-ID").value = NewRecordNumber
rs.update
me.requery
rs.movelast
rs.close

end sub

function RetrieveParameter(ParameterType as string) as string
dim rs as dao.recordset
dim Holdparameter as string

set rs = currentdb.openrecordset("tableallparameters",dbopendynaset)
rs.findfirst "type = '" & parametertype & "'"
HoldParameter = rs.fields("parametervalue") + 1

rs.edit
rs.fields("parametervalue")= HoldParameter
rs.update
rs.close
set rs = nothing

RetrieveParameter = "BRL-" & right(00000 & HoldParameter,5)

end function

good luck
 
Hi Rick, I have searched in many post and didn't find something that can
helping me.

please add an attachment for me please ,,,many thanks...
 
Thank you my friends..

this community is very important as member,

Best regards from Baja California
 
Hi Chriske911, could you send me an example, because I tried many times but
does not working , appear a error message ,,, will appreciate so much if you
send it to me,,,


anyway thanks for your help..

this is my-email.
(e-mail address removed)
 
Hi Chriske911, could you send me an example, because I tried many times but
does not working , appear a error message ,,, will appreciate so much if you
send it to me,,,

anyway thanks for your help..

this is my-email.
(e-mail address removed)

some creativity and insight is needed off course ^^
what and how did you make use of this code?
what are the errors you're getting?

grtz
 

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

Back
Top