Combo box data.

G

Guest

I have a combo box based on a table, 'Projects' that i need the data limited
to a field in that table.

In this projects table are mutiple rows, each being a different project in
different stages. Once the project is completed I mark in the 'Completed'
field 'Yes' and not from a yes/no box it's hand entered (if that matters).
the project field is simply named Project.

What I need is to only view items in the combo box (that is on a form) that
are marked as 'No' in the completed field on in the projects table in the
'completed' field.
I really hope i explained it properly. If not I can try to elabrate more.
But i'm better of thinking what I want than explaining/impalmenting.

Anyways thanks a ton if you can help.
 
C

Corey-g via AccessMonster.com

Hi Tim,

You will have to change the row source of the combo box to be a query, so
that you can have it remove the unwanted data.

Select * from projects where project = 'No'

Is that correct - you have a table named PROJECTS, and a field in the table
named PROJECT?
In re-reading your post, I think it might be:

Select * from projects where completed = 'No'

Alternatively, you can use the query builder to build the same query, and
save it. Then point the row source to the saved query

HTH's

Corey
 
G

Guest

OK that worked great. Not my only problem is that it lists all of my projects
but all the different versions have an entry each. So right now I has web
version 1, 2 ,3 all not completed. So it is showing 'Web' 3 different times.
Might you have a trick for that as well.

And again thanks a million.
 
C

Corey-g via AccessMonster.com

So you have multiple 'Projects' with the same name repeated? I think you
might has some design issues...

Anyways, just add the 'Distinct' keyword befor the field list in your select
statement...

Select DISTINCT [ field list ] from [table(s)]
where ...

Now, as you seem to have multiple Projects with the same name, you are likely
going to have to change the original query I posted to have the list of
fields rather than all fields (which is what the asterisk does). Otherwise
you will get the same project name if any of the other data in the record is
different (so instead of the ' * ', you will need to have the actual names)

SELECT DISTINCT projects, {other fields}, completed FROM project WHERE
completed = 'No'

** Note statement will not work with out you changing the "{other fields}
list to your field names...

HTH's
 
G

Guest

Thanks again for your insite and help, what you posted is doing exactly what
I need.

And there not design issues, i just hapen to have 3 different versions of
the same website that i'm creating all in different stages of production. I
use the db to track what changes i've made to different projects i'm doing.
I basicly designed a version of the 'Issue Tracker' DB thats in access
already but made it fit what i need it to do. it's a nice little piece of
work if I do say so myself.
And not as many bells and whistles as the issue tracker has (just some of
them). I dont need it to look ultra nice I just ned it to work nicely.

Thanks again for all the help you gave me and all the help others have it's
very much appreciated.
 

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