There's no such thing as a stupid question, but they're the easiest to answer.
JoinTour
Login
 
Tag Cloud
acer bios black screen blue screen boot computer connection crash css dell display driver drivers email error excel firefox firefox 3 game hard drive internet internet explorer itunes laptop lcd linux malware monitor network networking outlook outlook 2003 outlook express password printer problem ram router slow software sound startup trojan usb video virus vista windows windows xp wireless
Business Applications
Search
Search in:
 
Advanced Search
Tech Support Guy Forums > Software & Hardware > Business Applications >
Solved: Acces 2003


HELLO AND WELCOME! Before you can post your question, you'll have to register -- it's completely free! Click here to join today! We highly recommend that you print a copy of our Guide for New Members. Enjoy!

Closed Thread
 
Thread Tools
whschimmel's Avatar
Junior Member with 15 posts.
 
Join Date: Jul 2008
Location: Netherlands
Experience: Intermediate
07-Jul-2008, 10:54 AM #1
Solved: Acces 2003
Dear Sir/Madam,

I'm creating a database for the registration of all our contacts with our customers.

I would like to create a call number for every contact, this call number has to excist from:

customer number + year + month + unique number. This means something like this:

851000-2008-07-00001 (withouth the '-')

Does anybody know how?

Greetz,
Wouter
OBP's Avatar
OBP OBP is offline
Computer Specs
Distinguished Member with 6,566 posts.
 
Join Date: Mar 2005
Location: UK
Experience: An old Basic Programmer
07-Jul-2008, 11:11 AM #2
Wouter, it requires VBA code to do this.
You would have the VBA code in the in the Data Input Form in a Field's "After Update" event procedure.
Does each Customer need the "unique number" to be in sequence or can it just be in sequence accross all Customers.
__________________
.
.
OBP
I do not give up easily
whschimmel's Avatar
Junior Member with 15 posts.
 
Join Date: Jul 2008
Location: Netherlands
Experience: Intermediate
07-Jul-2008, 11:25 AM #3
It may be a sequence across customers
OBP's Avatar
OBP OBP is offline
Computer Specs
Distinguished Member with 6,566 posts.
 
Join Date: Mar 2005
Location: UK
Experience: An old Basic Programmer
07-Jul-2008, 11:54 AM #4
You will have to be very careful with this field, as the Number it would produce
85100020080700001
would be very large and may not display properly, it may be necessary to produce it as a Text field where adding the "-" would make it more readable.
It displays as
8.51000200807E+16
__________________
.
.
OBP
I do not give up easily
whschimmel's Avatar
Junior Member with 15 posts.
 
Join Date: Jul 2008
Location: Netherlands
Experience: Intermediate
07-Jul-2008, 01:08 PM #5
When adding the - character makes the code (and so the database) more workable, it isn't a problem.

But can't the eventual code (851000-2008-07-00001) be created as a text field? That way the number won't be shown as 8.51000200807E+16. Or is it like an autonumber field always generated as a number?
OBP's Avatar
OBP OBP is offline
Computer Specs
Distinguished Member with 6,566 posts.
 
Join Date: Mar 2005
Location: UK
Experience: An old Basic Programmer
07-Jul-2008, 01:18 PM #6
Yes it should be a text field, and you can have the "-" or not in the text field, that is up to you.
Is it possible to post a copy of the database?
It does not need any data in it, I just need to see the Field names and the data input form.
__________________
.
.
OBP
I do not give up easily
whschimmel's Avatar
Junior Member with 15 posts.
 
Join Date: Jul 2008
Location: Netherlands
Experience: Intermediate
07-Jul-2008, 01:40 PM #7
I've added my database. The code has to be generated as the Call-ID field in the tbl_Melding and FORM_Melding.
Attached Files
File Type: rar db1.rar (69.9 KB, 4 views)
OBP's Avatar
OBP OBP is offline
Computer Specs
Distinguished Member with 6,566 posts.
 
Join Date: Mar 2005
Location: UK
Experience: An old Basic Programmer
07-Jul-2008, 02:11 PM #8
Ok I will post something tomorrow.
whschimmel's Avatar
Junior Member with 15 posts.
 
Join Date: Jul 2008
Location: Netherlands
Experience: Intermediate
07-Jul-2008, 02:30 PM #9
Many thanks in advance!
OBP's Avatar
OBP OBP is offline
Computer Specs
Distinguished Member with 6,566 posts.
 
Join Date: Mar 2005
Location: UK
Experience: An old Basic Programmer
07-Jul-2008, 03:04 PM #10
Is Customer Number actually DealerID?
whschimmel's Avatar
Junior Member with 15 posts.
 
Join Date: Jul 2008
Location: Netherlands
Experience: Intermediate
07-Jul-2008, 05:01 PM #11
the customer number is the field 'Dealercode' (851000)
OBP's Avatar
OBP OBP is offline
Computer Specs
Distinguished Member with 6,566 posts.
 
Join Date: Mar 2005
Location: UK
Experience: An old Basic Programmer
08-Jul-2008, 05:47 AM #12
Wouter, are there already records in the database that will need the "Call Number" converted to the new Format?
whschimmel's Avatar
Junior Member with 15 posts.
 
Join Date: Jul 2008
Location: Netherlands
Experience: Intermediate
08-Jul-2008, 05:53 AM #13
no, it's all test data
OBP's Avatar
OBP OBP is offline
Computer Specs
Distinguished Member with 6,566 posts.
 
Join Date: Mar 2005
Location: UK
Experience: An old Basic Programmer
08-Jul-2008, 07:19 AM #14
Wouter, this version has the simpler Customer CallNumber just incrementing for all Customers, you can have it incrementing seperately for each Customer as well.
I have taken the liberty of tidying up your Forms a little and setting the table Relationships for the Tables that supply data to the Melding Table via Combo boxes, to do so I changed the Fields in the melding Table from text to Number type Integer to store the StatusID and UserID rather than the text.
On the Melding Form I have left the dealercode field visible, it does not need to be, it is only there for the VBA code to use.
The VBA uses a New Query called Que_CallNumber.
Attached Files
File Type: zip db1 v 0.1.zip (48.6 KB, 2 views)
__________________
.
.
OBP
I do not give up easily
whschimmel's Avatar
Junior Member with 15 posts.
 
Join Date: Jul 2008
Location: Netherlands
Experience: Intermediate
08-Jul-2008, 10:00 AM #15
Tnx
Thank You! It's working. You saved me hours of searching!!
Closed Thread

THIS THREAD HAS EXPIRED.
Are you having the same problem? We have volunteers ready to answer your question, but first you'll have to join for free. Need help getting started? Check out our Welcome Guide.


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
WELCOME TO TECH SUPPORT GUY! Are you looking for the solution to your computer problem? Join our site today to ask your question -- for free! Our site is run completely by volunteers who help people like you solve computer problems. See our Welcome Guide to get started.



Thread Tools


You Are Using:
Server ID
Advertisements do not imply our endorsement of that product or service.
All times are GMT -4. The time now is 05:45 PM.
Copyright © 1996 - 2008 TechGuy, Inc. All rights reserved.
Powered by vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Powered by Cermak Technologies, Inc.