473,404 Members | 2,179 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,404 software developers and data experts.

i need to generate a same serial number for a particular code in a day

chandru8
145 100+
hi every body
i need a logic , that
for a particular code i need to genrate a serial number for a day should be one
for the next day it should be increment to 2 like this

can any one help me in this
Please..,
its urgent
thanks a lot
Apr 3 '08 #1
8 1453
debasisdas
8,127 Expert 4TB
Try to use system date with a incrementing number .
Apr 3 '08 #2
chandru8
145 100+
Thanks for your reply

I am comparing previous day with the current date

for ex

If Format(Date, "mm/dd/yyyy") > rs.Fields(1) Then
rs.fields(1 ) is previous date from access

the problem is my system date format is dd/mm/yyyy - access format is mm/dd/yyyy

so some times it give me a wrong answer
Apr 3 '08 #3
QVeen72
1,445 Expert 1GB
Hi,

Just use Julian Date Format:

CLng(Date)

Every day it is Incremented by 1

REgards
Veena
Apr 3 '08 #4
chandru8
145 100+
i tried as you said
the value differ due to the format

from access

rs.fields(0) = 04/02/2008 -> mm/dd/yyyy

clng(rs.fields(0)) -> value - 39482

System date - dd/mm/yyyy
Date value for 02/04/2008 clng(date) - 39540

how to handle this date format to find the value
Apr 3 '08 #5
QVeen72
1,445 Expert 1GB
Hi,

Try this :

If Date > Format(rs.Fields(1), "dd-mm-yyyy") Then

Regards
Veena
Apr 3 '08 #6
chandru8
145 100+
iam trying change the date from access to this
Format(rs.Fields(1), "dd-mm-yyyy")


04-03-2008

but its not changing i dont know why?
Apr 3 '08 #7
QVeen72
1,445 Expert 1GB
Hi,

What is the "Format" of that Date Field...?
Have you mentioned any specific format..?

Why dont you drop the Field and Re-create it..?
What is the Regional date setting..?

If regional date setting is mm-dd-yyyy, then it may not allow you to change to dd-mm-yyyy

REgards
Veena
Apr 3 '08 #8
chandru8
145 100+
i tried the format as you given but its not working

my regional setting is dd-mm-yyyy
but access date format mm-dd-yyyy
Apr 3 '08 #9

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: pilar | last post by:
Hi All, It is possible to restrict data entry for 2 fields at the same time?, i know how this may sound for you, please don't insult me (just kidding, this is a great newsgroup). In my first...
29
by: Lauren Wilson | last post by:
Does anyone know how the following info is extracted from the user's computer by a Front Page form? HTTP User Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041107...
2
by: SalimShahzad | last post by:
Dear Gurus, i had written following codes to auto generate the next claim no Private Const strC = "GCT/02/J/" Private Sub Command1_Click() Dim stra, stre As String Dim intb, intd As Integer...
8
by: vicky | last post by:
Hello,I met a question when I wrote the program.I want the program can transmit the data frame continuosly through the RS232 when the communication has been interrupted.But I don't know how to...
9
by: Paul | last post by:
Hi, I have spent the last couple of days researching this issue. And I have also spent time thinking about what is needed. I am distributing my software as shareware. When a customer orders a...
11
by: Alan Mailer | last post by:
A project I'm working on is going to use VB6 as a front end. The back end is going to be pre-existing MS Access 2002 database tables which already have records in them *but do not have any...
20
by: mike | last post by:
I help manage a large web site, one that has over 600 html pages... It's a reference site for ham radio folks and as an example, one page indexes over 1.8 gb of on-line PDF documents. The site...
6
by: Antonio | last post by:
Hi, I would like to have my users register their name and organization name and submit them through email so that we can generate a product key for them. But we have no idea how to generate a...
1
by: cmrhema | last post by:
A big hello to everyone I have dropped on a gridview on asp.net coding done is C# 2005. Here I display the records when a certain condition satisfies. eg. I want to display the details of all...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.