Hi Everyone,
I am here again with a problem. Lots of work has been done on my Email ID creation database, of course with TSDN help.
My problem is that, in my database I have two tables Student Master, which has the basic information like
Stud Code Text PK
First Name Text
Last Name Text
Class Number
Age Number
And another table Email ID table, which has
Stud Code FK
Email ID PK
Creation date Date/Time
I have a form based on the master table and a button which opens the Email form. The Stud Code is passed from the main form. In the Email form the Email ID field is checked for duplicates. The format for the email ID goes like this [First Name].[Last Name]@abc.com. In case of duplication the system has to add 1 or 2 or 3 before @ sign like [First Name].[Last Name]1@abc.com. What my problem is that I want a list box to show the available suggested (format) Email ID's in case of duplication, so that the user can choose form there. And also show which IDs are used by the system.
Thanks and Regards
130975
3 5445
For showing the existing Email ID's you can use a query with the criteria:
LIKE [First Name] & "." & [Last Name] & "%"
To get the needed number when you have duplicates use a Dcount() with the same LIKE in the WHERE section.
Need more assistance ?
Nic;o)
Hi Nico;o
Thanks for quick reply. But the point is not clear to me, should I add a list box in the Email form? If so please give me the details of the list box properties. The two forms are connected with the Stud ID, the Email ID is created according to the name in that Stud ID. The List box should display the same name Email IDs. I am little bit confused. Kindly help.
Thanks and Regards
130975
As stated, forshowing the existing Email ID's you can use a query with the criteria:
LIKE [First Name] & "." & [Last Name] & "%"
So define a listbox (or datasheet subform) on your email form. With this criteria Access will show matches when present.
When you need to issue an emailaddress you'll need to check or the combination exists, to get the needed number when you have duplicates use a Dcount() with the same LIKE in the WHERE section.
The DCount() will be Null when there's no match found so a test like -
IF IsNull(Dcount("*","tblEmailAddresses","EmailAddress like '" & [First Name] & "." & [Last Name] & "%'") then
-
Me.EmailAddress = [First Name] & "." & [Last Name] & "@yoursite.com'")
-
else
-
Me.EmailAddress = [First Name] & "." & [Last Name] & Dcount("*","tblEmailAddresses","EmailAddress like '" & [First Name] & "." & [Last Name] & "%'") & "@yoursite.com"
-
endif
-
Nic;o)
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Jess Austin |
last post by:
hi,
I like the way that Python does lists, and I love the way it does
iterators. But I've decided I don't like what it does with iterators
of lists. Lists are supposed to be mutable sequences,...
|
by: Crimarc |
last post by:
A list with un-sorted members
Along with a sub-list of that list with also un-sorted members
Could you tell me how to delete the sub-list members present in the
given list without first sorting...
|
by: Christine Forber |
last post by:
I wonder if anyone knows of some javascript code to check a
comma-delimited list of email addresses for basic formating.
What I'm looking for is the javascript code to check a form field on
form...
|
by: dam_fool_2003 |
last post by:
friends,
I wanted to learn the various ways of inserting a single list. so:
Method 1:
#include<stdlib.h>
#include<stdio.h>
struct node
{
unsigned int data;
struct node *next;
|
by: prabhat143 |
last post by:
Hi,
Given a singly linked, null terminated list, how can it be converted to
tree? Each node in the list has three attributes: it's ID, it's parent
ID and of course, the next node it's pointing...
|
by: freckred76 |
last post by:
Hi,
I think this might be a VC++ problem. I am using Microsoft Visual
Studio 2005 Full Version (8.0).
I have a simple for loop that iterates over a list using the standard
iterator. The...
|
by: jayesah |
last post by:
Hi All,
List and its iterator work as following way :
list<intmylist;
list<int>::iterator itr;
itr = mylist.begin();
cout << (*itr);
But I want something like this:
|
by: eight02645999 |
last post by:
hi
i have a list (after reading from a file), say
data =
I wanted to insert a word after every 'a', and before every 'd'. so i
use enumerate this list:
for num,item in enumerate(data):
if...
|
by: Grant Edwards |
last post by:
Could whoever is responsible for the gateway that is grabbing
my postings off of Usenet and e-mailing them out please fix the
headers in the mail messages so that I don't get the bounce
messages?...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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,...
|
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...
|
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,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
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...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
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,...
| |