473,503 Members | 1,814 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Client ID

Cyberdyne
627 Recognized Expert Contributor
Hi guys, I want to make my client ID to appear in this format 06-0001 for client one 06-0002 for client two 06-0003 for client three and so on. I want the number to be generated automatically. here is what I have in the form right now... "06-"0000 but I want to know how to lock it and make it auto number itself with each new client.

Thanks guys.

-Cyberdyne
Oct 6 '06 #1
3 1633
PEB
1,418 Recognized Expert Top Contributor
Hi CyberDyne,

The locking of this field is easy... Go in the properties of the control and check the property locked to true

The autonumbering it's a bit particular and you need a VB code here..

In the First obligatory field of your Form enter Event procedure for After Update and enter the follow:

Me![UKey]=Right(Year(Now()),2)+nz(Dcount("*","Customers","U Key Like '"+Right(Year(Now()),2)+"*'"))+1


It's all!

:)

Nice luck my frien!

:)
Oct 8 '06 #2
Cyberdyne
627 Recognized Expert Contributor
I put the code in so that after the very first entry, which is the client first name the after update follows event procedure with the code

Me![UKey] = Right(Year(Now()), 2) + Nz(DCount("*", "Customers", "UKey Like '" + Right(Year(Now()), 2) + "*'")) + 1

but I get an error in the form, do I have to swap Customers with Case# perhaps?

Tried that and still nothing. What fields should I modify in this code?
Oct 9 '06 #3
PEB
1,418 Recognized Expert Top Contributor
Hi Cyberdyne,

So here you need to change near everyting ;)

Me![UKey] = Right(Year(Now()), 2) + Nz(DCount("*", "Customers", "UKey Like '" + Right(Year(Now()), 2) + "*'")) + 1

UKey with the name of the field where you want to store your key
Customers with the name of the Table with your clients / Customers

And there is no more to replace ;)

Have a nice day my frien!


I put the code in so that after the very first entry, which is the client first name the after update follows event procedure with the code

Me![UKey] = Right(Year(Now()), 2) + Nz(DCount("*", "Customers", "UKey Like '" + Right(Year(Now()), 2) + "*'")) + 1

but I get an error in the form, do I have to swap Customers with Case# perhaps?

Tried that and still nothing. What fields should I modify in this code?
Oct 14 '06 #4

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

Similar topics

5
2542
by: Matt | last post by:
I think this is the basic concept in ASP server-side development. My boss told me web application is NOT client-server application. I argued with him because browser is the client, and the server...
15
4449
by: Michael Rybak | last post by:
hi, everyone. I'm writing a 2-players game that should support network mode. I'm now testing it on 1 PC since I don't have 2. I directly use sockets, and both client and server do...
18
7342
by: cjl | last post by:
Hey all: I know that it is silly in the age of Google to 'lose' something on the internet, but I recently checked out a project that had implemented a database with a subset of SQL in pure...
2
3017
by: Raquel | last post by:
How do I know whether the 'runtime client' and the 'application development client' are installed on my machine? When I issue the command "db2licm -l", it gives the following output: Product...
6
3702
by: Ken Allen | last post by:
I am relatively new to .Net and C#, but I hav ebeen programing in other languages and done some COM work for a number of years. I am attempting to understand how to map an older program...
4
6706
by: rs | last post by:
how I the client tell the server that the socket is closed? or this there an even that informs the server that the clients socket is close? Oh, I am using vb.net 2003 Thanks
2
7557
by: J Huntley Palmer | last post by:
I am having a horrific time integrating uw-imap's c-client for imap support in php. The problem is a whole bunch of "Text relocation remains referenced against symbol" errors during linking....
0
1715
by: khu84 | last post by:
Here is client server very simple code, seems to work with telnet but with with web client code gives blank output. Following is the server code:- <?php function...
2
4083
by: nsaffary | last post by:
hi I hava a client/server program that run correctly when i run it in one computer(local) but when I run client on a one computer and run server run on another, connection does not stablish.(I set...
0
7202
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
7280
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,...
1
6991
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
5578
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5014
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...
0
4672
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3154
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1512
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
736
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.