danbrownlow
Mar 4 2008, 06:46 AM
Hey all! For a uni' project, I have to create a fictional database for a pretend video hire shop. I have a list and have all my customer names and I need to make some E-Mail addresses, although I don't want to have to manually type out all the E-Mail addresses.
I was thinking, because a majority of peoples E-Mail addresses are basically (firstname).(surname)@company.com, and I have peoples first and last names stored in the table I could write a formula or piece of VBA code to help me with this.
Is there anyway of being able to do this using Access 2007 (Don't ask, we have to use it =])
Thanks in advance for anyone who can help!
Dan Brownlow.
groovicus
Mar 4 2008, 10:50 AM
If you can read a list that happens to contain names, and split those names from the list, then you can easily combine them into an email address. Use your language of choice. Depending on the length of your list, it might take longer to create the program than it would to actually just type in the names....
Moving this to the programming forum.
danbrownlow
Mar 4 2008, 11:38 AM
What I did in the end was to use Excel, copy and paste the name's in a constantate (forgot how to spell it) into a string and then copied them back into Access. I was going to to type in but, I've got 80 entries and that could take some time. Thanks anyway.
I have another question.. Do you know how to make a custom ID for a customer using say, there first and last name? No worries but thought you might be able to lend a hand.
Sorry about having to move, wasn't really sure where to put the post.
Dan
groovicus
Mar 4 2008, 12:49 PM
Do you mean a custom ID other than the id given to the entity by Access?
danbrownlow
Mar 4 2008, 02:09 PM
Well, I'm doing a database for a video rental shop, and within the company are 3 stores. What I wanted to have, was have a unique identifier that was say, the branch code, followed by last digits of customer name and then a number. I've tried numerous things but I can't seem to get it working.
Might just stick with something more simple lol.
Thanks again.
groovicus
Mar 4 2008, 04:18 PM
What I was trying to get at is that all relational databases have the ability to assign a unique primary key to entities, and that could serve as the unique user id. No extra steps needed, other than to add a column to the database.
danbrownlow
Mar 4 2008, 06:29 PM
Lol, oh sorry, yea' I knew that thanks =]
Was just trying to make it a bit more exciting for myself lol. Databases aren't my favorite part of computing to be honest.
Alan-LB
Mar 19 2008, 10:58 PM
If you want something exciting switch the computer off and go abseiling or white-water rafting!!
Usually a Customer ID is the first few letters of the last name, then the initials, and maybe a number.
Eg - Fred Smith might be SMIF01
The Branch name would only be usefull if you are developing the program for use in several branches - and then only if there were a real need for one branch to have access to the customers of another branch.
Unless you have a very large number of clients, sorting your Database on Client Last name then the First name should give you an easily accessible list.
Alan
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please
click here.