Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Select all in a field...Access 97...from a combo box

Status
Not open for further replies.

murphysdad

Technical User
May 20, 2002
41
US
Here is what I have. In a work order system, we indentify types of work to be done by different types of tags.

I have my associates select one of the three types of tags: Maintenance, Operator, or Safety and it creates a report. They want an option to choose "all" so that they can get all types of tags that need to be completed in a certain department or line(rather than just Maintenance, Operator, etc.)

How do I write code to have "all" = true (or whatever makes all entries come up.)

The form they select which type of tag is: frmCreateReportIncomplete

The combo box is: tagtype

I would also like to add this option to my other combo boxes that show departments(so you could choose all departments) and another one that shows lines(all lines under that one department.)

Thank you for any help with this!!!

Jeremy

"I'll be back"
 
You can not select more than one option in a combobox UNLESS you include the option "All" in your list and then via your code "LightUp" the option signs.

But you could make an Option group and then have this reflect your 3/4/5 options

Rgds
Herman
 
Yeah! I want to choose "all" and have an if...then statement say if combo box = all then have criteria = true.

I am just not sure how to write it in Access97 code.
 
Ok "Dad" :)

First you will need to have a nuique number (autonumber/Key) in your table this should the first field in your combobox (lenght set to 0 in/cm)
Lets assume that the record no for All is 4 then the code could be something like this on the after update on the combo:

Select case Me!Combo
case 1
me!Maintenance.visible=true
me!Operator.visible=false
me!Safety.visible =false
case 2
me!Maintenance.visible=false
me!Operator.visible=true
me!Safety.visible =false
case 3
me!Maintenance.visible=false
me!Operator.visible=false
me!Safety.visible =true
case 4
me!Maintenance.visible=true
me!Operator.visible=true
me!Safety.visible =true
case else
me!Maintenance.visible=false
me!Operator.visible=false
me!Safety.visible =false
end select

Rgds
Herman
 
I am a little confused. when you speak of table, which table are you refering to. the main collection of data table or the table used for the combo box information?

sorry, i am new at this!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top