G
Guest
Hi !
I am creating a database for keeping the records of all patients admitted in
my hospital.
I want to keep various fields like
1. Indoor patient number which will ba a unique field and also the primary
key for this table.
2. First Name
3. Last Name
4. Consultant name
5. Now there will be various fields that will include res phone numbers,
office phone numbers,
mobile numbers etc.
There will be an OLE field which will carry the photo of the patient
My problem is that:
I want to generate an unique ID for each of my patients .
I want to generate the IP No like this :
First three letters of the first name of the patient/First three letters of
the last name of the patient/
A Random number to be generated by access
To generate this I set the default value of the field "IP No" in the form as =
Left(Trim [First Name],3)/Left(Trim[Last Name],3)/rnd in the expression box .
But when I go out from the design view of the form it says #Err
Where am I going wrong?
Thanks for your time
Dr Alok Modi MD
I am creating a database for keeping the records of all patients admitted in
my hospital.
I want to keep various fields like
1. Indoor patient number which will ba a unique field and also the primary
key for this table.
2. First Name
3. Last Name
4. Consultant name
5. Now there will be various fields that will include res phone numbers,
office phone numbers,
mobile numbers etc.
There will be an OLE field which will carry the photo of the patient
My problem is that:
I want to generate an unique ID for each of my patients .
I want to generate the IP No like this :
First three letters of the first name of the patient/First three letters of
the last name of the patient/
A Random number to be generated by access
To generate this I set the default value of the field "IP No" in the form as =
Left(Trim [First Name],3)/Left(Trim[Last Name],3)/rnd in the expression box .
But when I go out from the design view of the form it says #Err
Where am I going wrong?
Thanks for your time
Dr Alok Modi MD