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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Yes/no = new tbl

Status
Not open for further replies.
Dec 9, 2008
68
0
0
US
Ok I can't find a hint or even a smidge of this anywhere.
ive got is actually 2 database's into 1. What I've got is a list of names on the "Employee database" On another is forms. What I'm looking to do is

a Yes/no that is tied to a check box. If the check box is infact checked what I would like it to do. Is put all those check names into another dropdown. Basic principle is YES someone is able to do this [See drop-down with name} or NO someone is not able to do this [Won't see name in drop-down]

I've been digging for a couple days but nothing is making sence to my little access mind. Wish this was Cisco stuff =P

Thanks!
 
How are ya Torturednacho . . .

In the following sample SQL [blue]you![/blue] substitute proper names in [purple]purple[/purple]:

Code:
[blue]SELECT [purple][B][I]FieldName1[/I][/B][/purple], [purple][B][I]FieldName2[/I][/B][/purple]
FROM [purple][B][I]TableName[/I][/B][/purple] IN [purple][B][I]"Path\FileName.extension"[/I][/B][/purple]
WHERE ([[purple][B][I]CheckboxName[/I][/B][/purple]]=True);[/blue]
When your done just copy/paste the SQL to the [blue]RowSource[/blue] of your combobox or listbox. Save the form and perform your testing.

[blue]Your Thoughts? . . .[/blue]

BTW: Welcome to [blue]Tek-Tips![/blue] [thumbsup2] Do have a look at one of the links at the bottom of my post. The links will help you [blue]ask better questions[/blue], get [blue]quick responses[/blue], [blue]better answers[/blue], and insite into [blue]etiquette[/blue] here in the forums. Again . . . Welcome to [blue]Tek-Tips![/blue] [thumbsup2] [blue]Its Worthy Reading![/blue]

See Ya! . . . . . .

Be sure to see thread181-473997 [blue]Worthy Reading![/blue] [thumbsup2]
Also faq181-2886 [blue]Worthy Reading![/blue] [thumbsup2]
 
Ace,

Thanks for the reply althought I'm an access newbi.I was wondering if you could give me alittle more information as to where I actually put this string in. I gather in Field1,Field 2 is the name of the individual the flag will be set for?. Tablename is obvious but what is the Path\Filename ? I'm unsure what that is about.
Also the Where CheckBoxname is the list of individuals?
 
Maybe you need to tell us your table/field structure and some sample data so we can be clear about what you want. And when you say you have "2 databases into 1" what exactly do you mean? Thanks.

Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244. Basics at
 
Torturednacho . . .

[blue]"Path\FileName.extension"[/blue] is the location of your [blue]Employee database[/blue]. Example: [blue]"C:\Database\Employee.mdb"[/blue] ... and the entire SQL becomes the [blue]RowSource[/blue] of your new combobox. But put this on hold for now, you need to do something more important that will make things easier for you ... that is [blue]setting a link[/blue] to the employee table in the employee database. When done you'll be able to work with the employee table as if it actually existed in your forms db. So . . .
[ol][li]Open the forms db.[/li]
[li]From the menubar select [blue]File[/blue]-[blue]Get External Data[/blue]-[blue]Link Tables[/blue].[/li]
A [blue]Link[/blue] dialog open. Here you navigate to the employee db, select it, and on the bottom right select the [blue]Link[/blue] button.[/li]
[li]A [blue]Link Tables[/blue] dialog opens. Select the employee table and click [blue]OK[/blue].[/li]
[li]In the forms db goto the tables window and you should see the table (it'll have a right pointing arrow on the left side of the table icon.[/li]
[li][blue]Done![/blue][/li][/ol]
The above changes the SQL to:
Code:
[blue]SELECT [purple][b]FieldName1[/b][/purple], [purple][b]FieldName2[/b][/purple]
[purple][b]FROM TableName[/b][/purple]
WHERE ([[purple][b]CheckboxName[/b][/purple]]=True);[/blue]
... however, before you get excited about your [blue]checkbox schema[/blue], we need to go over this check box.

From what you've revealed I'm suggesting you use a [blue]multi-select Listbox[/blue] instead! This would alleviate the checkbox all together. But your schema may not allow this. If it doesn't then you'll have to add a checkbox in the employee table and go thru the rigors of updating the checkboxes.

The question is: How do you intend to use the combobox once its setup?

[blue]your thoughts/ . . .[/blue]

BTW: As far as code is concerned I hope you see the importance of [blue]providing actual names of objects you mention! . . .[/blue]

See Ya! . . . . . .

Be sure to see thread181-473997 [blue]Worthy Reading![/blue] [thumbsup2]
Also faq181-2886 [blue]Worthy Reading![/blue] [thumbsup2]
 
Ok the details of the db. It's a coaching/employee improvement db. There are over 100 employees so we created a employee only db with employees,orginization,manager.

We then created a coaching database with all the other information for this specific coaching database. We are using the employee database on 3 other databases we use.
This is where the checkbox comes in. In our enviroment only certain people are going to be able to use this coaching database hence the combobox.

out of 100 employees only 15 or so are able to actually coach someone. Thats why we need the combobox to be able to check someone off saying "Yes they can coach" and the name appear in a seperate field on the finished product
 
Torturednacho . . .

Did you perform the steps I asked?

[blue]Your Thoughts . . .[/blue]

See Ya! . . . . . .

Be sure to see thread181-473997 [blue]Worthy Reading![/blue] [thumbsup2]
Also faq181-2886 [blue]Worthy Reading![/blue] [thumbsup2]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top