need a unique combination in a form

E

ejjohn

I have aquired a database that has 3 pieces of information
A Department
A Location
A Name
The combination of Department and Location generates a name BUT you can have
more than one combination that generates the same name
for example OB/Gyn and 11th Street is OBGYN Moore Clinic
but OB/Gyn and 1500 suite is also OBGYN Moore Clinic
The data is coming out of another source so I can't change it

What I want to do is
1 Create a form that will allow me to select from a combo/list box a
department and a location and it gives me the name
2 Have a form which allows user to add a location or department or name
(depending on what is missing)
 
W

Wayne-I-M

I assume the the Department, Location and Name are all in the same table

Create a new select query

SELECT TableName.ID, TableName.Department, TableName.Location, TableName.Name
FROM TableName;


Create 3 combos
1 = ID and Department (widths 0;2 - Bound column = 2)
Limit to list = No
SELECT QueryName.ID, QueryName.Department FROM QueryName ORDER BY
[Department];

2 = ID and Location (widths 0;2 - Bound column = 2)
Limit to list = No
SELECT QueryName.ID, QueryName.Location FROM QueryName ORDER BY [Location];


3 = ID and Name (widths 0;2 - Bound column = 2)
Limit to list = No
SELECT QueryName.ID, QueryName.Name FROM QueryName ORDER BY [Name];
 
W

Wayne-I-M

Soory pressed send by mistake

Create a new text box box
=[1stCombo] & " " & [2ndCombo] & " " & [3rdCombo]

Doing this you will be able to select from the combos and also write "stuff"
into them if the item you want is not there. Your text box will show your
reference

Good luck
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top