Listbox/combobox List Alltables

Jun 14, 2006

Hi guys

Just wondering how could a make a listbox or combobox to have the names of all or some of the tables that are currently in my database

I only know how to get the values from a table or query in RowSource using SQL language... but how can I display the names of the tables

Thanks in advance for the help.. I really appreciate it

View Replies


ADVERTISEMENT

Using A Combobox To To Filter Info Into A Listbox

Mar 2, 2005

Hi there

This im sure is a easy question but I am just trying to learn access so I am having a few problems.

I have made a form that contains 2 comboboxs and a listbox.

How can I use the 2 combobox to filter a table and to place the information into the listbox.
Is it possible to use either 1 of the combo boxes or both to get the filtered result.


Any suggestions would be great!!

TIA!

View 2 Replies View Related

Forms :: Filtering Listbox Using Combobox?

Jun 23, 2015

I'm trying to filter the listbox using a combo box.

So I have a Combo box that has the list of the subjects and a listbox with the list of students.

I wanted to show the list of students who are registered in selected subject.

View 3 Replies View Related

Queries :: Listbox Rowsrc Like Textbox Or Combobox

Apr 5, 2013

Here's a link to a post with background (see the relationships image at the top): [URL] .....

So I got everything to work exactly as I wanted it to.. the listbox has its rowsrc manually changed via VB on form open or record change... so everytime the record changes or the form opens, VB creates a query string that pulls the TFE_Num and TFE_Name from the DB for only those records where the forms current key (me.key.value) equals the TFE_key values. And everything works.

The problem is that this VB based query is very slow... so everytime the record changes, we wait 1-5 seconds for this listbox to pull data and display it. My question is this: Is there a better way to do this, some way that doesn't require VB based SQL statement. I'm asking because all the non-listbox controls on the form use a control source and they get updated instantaniously on form open or record move, but the list boxes that are unbound and are populated using VB SQL are really slow... and there are really only 1 or 2 records ever displayed in the list box.

I have tried to set the rowsource for the list box within the properties tab and comment out the VB SQL code, but haven't succeeded. I suspect the issue is that the form is linked to all fields in the master table while the list box is linked to a 1st and 2nd generation child table... I just can't get it to work! I've tried simple adding the TFE tables and fields to the forms record source poperties, but when I do that I can only navigate to records that have TFEs associated with them.

I suspect I could resolve the issue myself, if only access queries allowed "me.key.value" to be used in the WHERE statement. Am I correct that you cannot do this in Accesses query builder or the SQL version? When I tried, it worked but then I notices the me.key.value got converted to a number (the first record) when it ran the first time.

View 1 Replies View Related

Modules & VBA :: Populate Combobox From Listbox Results

Jun 12, 2015

I have a list of staff that have a conflict of interest with a particular entity. As a result, these staff are not allowed to interview these entities.

I have a query that matches all staff with their respective entities that they have a conflict of interest with (CoI) and that is functioning correctly.

When the form loads to add an interview, there is a listbox that pulls all the people who are not allowed to do an interview with that particular entity. That is also working correctly.

I have a subform, that is a continuous form, which will allow the user to add staff, one at a time, via a drop down box. These people are stored in their own table with a FK Id to the interview table. This also works correctly.

How to filter the combobox on the subform to exclude the people in the listbox.

Here is what I have tried, loosely based on what I have found on Google and researching here. I am 100% sure it is not working correctly, but what I am missing.

The query the listbox is based on has 3 colums, the ID, the Name, and the business contract number.

Code:
Private Sub Form_Load()
Dim strSource As String
Dim i As Integer
For i = 0 To Me.lstCoI.ListCount - 1

[Code] ....

In the immediate window, I get the following result:

SELECT [staff] FROM lutStaff WHERE Staff <> name1
SELECT [staff] FROM lutStaff WHERE Staff <> name2
SELECT [staff] FROM lutStaff WHERE Staff <> name3
SELECT [staff] FROM lutStaff WHERE Staff <> name4
SELECT [staff] FROM lutStaff WHERE Staff <> name5
SELECT [staff] FROM lutStaff WHERE Staff <> name6

The issue is that the box is not filtering all the names out of the list it is built on. It is only filtering out the last name.

Obviously I need to save the results for comparison, but I am at a loss on how to do that.

View 10 Replies View Related

General :: Combobox Filtering Listbox To Only Show Same Records

Apr 4, 2013

Ok I have a list box (CounselorInitials) and a listbox (AssignedToYou)

The list box has 6 columns and is using a query (AssignedToMe). The important one is the 6th one (Counselor). All working off a table called DityLog.

I want to select initials in the combo box and then it will filter the listbox and only show records that are the same.

So if I select initials MC from the combo box I want the Listbox to show all records that have the initals with MC.

View 1 Replies View Related

General :: Put Combobox / Listbox Values In A Separate Table Or Not?

Jan 29, 2015

Whenever I create a combobox, Access asks me if I want to grab the values from another table, or if I just want to manually input the possible values.

My question is: is one of the two solutions "better" than the other?

Let's imagine I am creating a Form where I can create a new Contact, and in a listbox (with multiple selections allowed) I want to list the possible character traits, so I have

- Funny
- Annoying
- Smart
- Interesting
- Good-looking
- ...

I think that if I need to store in the Contact records these possible traits, I will have to create a Many-to-Many relationship (therefor creating a junction table) between Contact and Traits.

On the other hand, could I do everything without grabbing values from an extra table and directly inputting the values in the listbox? How would these elements be stored in the Contact record if I allow multiple values in one single field?

View 9 Replies View Related

Forms :: Using ComboBox To Look-up A Multivalued Field And Select Items In Listbox?

Jul 21, 2014

I'm creating a Form called Pharmacy where I can select a [Diagnosis] from a combo box in the form. This combo box source references a table called tblDiagnosis where each Diagnosis also has a multi-valued field called [Indications].

The Pharmacy form also has a multi-select listbox with all possible Indications. I would like to write a VBA code such that when a Diagnosis is selected, the Indications for that Diagnosis are automatically selected/highlighted in the listbox on the form as well.

As such, by selecting a Diagnosis, all the indications attached to that Diagnosis will automatically be selected; however, if additional indications are needed, they can still be selected afterward.

I know that there is a function Me!Listbox.Selected(i) = True, where i is the row of the entry in the listbox. However, the i in the listbox does not correspond to the ID of the Indication. I think that if there is a way to select listbox items by name, that would be much more efficient.

The reason I have a listbox, is because this listbox of Indications then references another table called tblDrugs where all drugs that are approved for the selected indications selected are filtered and displayed.

View 1 Replies View Related

Modules & VBA :: Changing Combobox Text Based On Listbox Selection

Jul 26, 2013

I have a listbox with several options.

When the user selects one of these items, i want a combo box's text to be changed to the selected item in the list box.

The listbox is named : D_OutputLsb
The combobox is named : D_ComponentNameCmb

View 4 Replies View Related

Modules & VBA :: Combobox / Listbox Change Event Populate Values In It

Nov 21, 2013

I am trying to write a code that will execute at the change even of the combobox/Listbox and when a character is typed in it then all the data from "DocumentType" field whose first character matches with the first character typed in Combo/Listbox will be stored in it.

The following code doesn't work:

Private Sub ComboBox4_Change()
Dim strText, strFind As String
strText = Me.ComboBox4.Text
If Len(Trim(strText)) > 0 Then
strFind = "BarcodeRef like '" & strText & "*'"
End If

[Code] .....

View 1 Replies View Related

General :: Lookup Combobox - Field Show Number Instead Of Text In Listbox

Jul 7, 2014

I have a field in a table where it is a lookup is a combo box. So this makes the data type of the field a number when in reality it is a text. When I have this field show in a list box it shows the number instead of the text.

View 5 Replies View Related

Register A Student To Multiple Classes (forms, Combobox, Checkbox, Listbox, Query)

Oct 7, 2005

Hello everyone,

I tried to post this yesterday but it didn't go through for some reasons.

I've attached my database that contains student, classes, and couple other tables. I also created couples of forms and I wanted to register a single student to multiple classes at once.

For example: There're 3 classes (Math, English, History) on 1/3/2006. Student A wants to register 2 classes, Math and English. I should be able to check those two and submit and I'm done.

Currently, I have to select Math and assigns to student A, then select English. That's not good at all. What if there're 10 classes in one day and a student just want to register 8 classes? I have to do eight times.

It'd be great if you could help me. Thank you in advance.
Isabel

View 2 Replies View Related

Register Multiple Classes For A Student (form, Combobox, Checkbox, Radio, Listbox)

Oct 6, 2005

Hello,

I'm interested to know how I can select a (1) student and assigns to multiple classes.

Attached I have the database with some tables and forms. Please take a look. I can assign a student to a class, on a specific day but I couldn't figure out how to select multiple classes at once.

Thank you for your generous help.
Isabel

View 10 Replies View Related

Combobox List Condition

Jun 13, 2006

how do i make 2nd combobox list based on 1st combobox list, mean if i choose A at 1st combobox, only A1-A5 option appear, and when i select B at 1st combobox, only B1-B8 appear to select at 2nd combobox..

TQ

View 1 Replies View Related

Combobox List Sticks

Oct 4, 2006

I have a form with a subform in datasheet view with a combobox on it. When a user presses the Arrow to dropdown the menu it will stick on the screen after they leave the field. Any idea's?

View 3 Replies View Related

Combobox With Value List In A Report

Sep 13, 2004

I want to have a combobox in a report ,

In a report using a query with a field named: "plantno" and as criteria" :Like [Fill in the plantno]
I can put in a plantno.That is working Oke!
I want to do the same thing as above but then that i want to see
a combobox with a few plantno,s which are put in a valuelist,so that i dont have to type in plantno,s
but that i only can choose out a valuelist.

Who can help me?

View 2 Replies View Related

Can Combobox Value List Be Altered At Run Time?

Feb 6, 2005

Is it possible to alter the values displayed in a combo-box dropdown at run time. I tried using the following bit of code in a listbox's 'After Update' event , but it does not alter the combo-box's value list.

dim strSponProjStatus as string
dim StrNonSponProjStatus as string

strSponProjStatus = "Seed ; Growth; Consolidation; Phase Out; Closed"
StrNonSponProjStatus = "Under Nego;Funded;Part Funded;Suspended;Unfunded"


Me.cboProjectStatus.RowSourceType = "valuelist"

If Me.cboFundingSource = "Sponsorship-ADP" Then
Me.cboProjectStatus.RowSource = strSponProjStatus
Else
Me.cboProjectStatus.RowSource = StrNonSponProjStatus
End If



Any suggestions as to why this is not working?

Cheers :eek:

View 2 Replies View Related

General :: Default Value Combobox But Not In List

Jun 11, 2012

(I'm upgrading an old database)

I have a combobox who lists te values of a table.

In that table are say: 5 records filled with a,b,c,d,e.

In my form i have a combobox who is default filled with a blank field, but i can select a,b,c,d or e.

If i select nothing in the combobox, the value has to be set at "0"

But i cannot add "0" as a value in de table of the dropdownlist.

if i can get the value default for "0" i'm happy, but if i can display the "0" as default in the combobox, i'm very happy.

View 2 Replies View Related

Doesn't Recognise Values As On The List In A Combobox

Jan 24, 2005

Hi,

I have a table of records, with one field of the records a combobox populated by a select query based onanother table.

My problem ism that it doesn't seem to recognise any of the values as on the list, though deleting one character and then replacing it results in the value being accepted with no problems.

This is a database I have inherited (Cheers predecessor!), the table is populated with a few thousand records and scrolling through this table results in an error message on this field for every record and is making displaying data on this form a nightmare! Anyone know of the cause or of a quick fix?

I don't know the history of this table unfortunately.

Cheers in advance

John

View 6 Replies View Related

List Data In Subfrom Based On Combobox

Oct 26, 2005

i just to know how to list the all data at subform that same thing that i selected at combobox..

ok for example..

i want to list all car part that purchased in nov 2005 at subform...
date(nov 2005) selected from combo box...
then if i change other date (ex: dec 2005) it update n view new parts..

is there need some coding at macros?

plz help me im new with access... :confused:

View 2 Replies View Related

Combobox List A Year Of Saturday Dates

Oct 31, 2006

I have a form and I need a combobox on the form to produce a list of Dates for every Saturday starting from the current day displayed in a short format for the user to select. Does anyone have an idea how I could manage that?

I was going to make a table and write in each one and use that for the rowsource, but someone said that there might be a way to do that dynamically.

View 6 Replies View Related

Form Search Combobox - Not In List Message

Jan 24, 2007

When you use a combobox to search values in the form - and someone searches for a value that isn't there - the form just defaults to the first entry. Is there a way of putting a message box that says "This is a new patient" (or something like that). The NotInList event doesn't work - any ideas??

View 2 Replies View Related

Modules & VBA :: Msgbox With Combobox Value Ii Not In List Event

Jan 23, 2015

I currently use this code to trigger a not in list event, ask the user if they want to add it to the respective table, and then add it.

I'd like to be able to add the text in the combo box that triggers the event to show up in the msgbox.

Private Sub cboCategory_NotInList(NewData As String, Response As Integer)
Const Message1 = "The data you have entered " & me.cbocategory.text &" is not in the current dataset."
Const Message2 = "Add now?"
Const Title = "Unknown entry in CATEGORY Field..."
Const NL = vbCrLf & vbCrLf

[Code] ....

View 2 Replies View Related

Modules & VBA :: ComboBox - Record Selection From List

Mar 25, 2015

I have 1 combo box contains 2 columns look-up directly from the properties(Not VBA)

Now i want to select record from the list

Example: i want to select PM-1234-1111 so i dont want to type starting letter PM to select but i want to type 234 or 123 or somewhere in the middle or end to filter that contained text in all the items is it possible?

Any Property settings or any VBA code?

View 1 Replies View Related

Modules & VBA :: How To Update List Of Values In A Combobox

Sep 25, 2014

I have a combo box which gets its values from sql server using a query which is called "get_query_reason", which works fine. Now I want to update combo box values based on a user selection, st string. Have written the code, but does not work:

Dim qDef As QueryDef
Dim Query As String
Dim st As String
Dim rs As Recordset
st = "SOV"
Set qDef = CurrentDb.QueryDefs("get_query_reason")

[Code] ....

View 2 Replies View Related

Forms :: Combobox Value List As Control Source

Oct 20, 2014

I have a combobox with a value list as the control source. I have a user who clicks the drop-down, but there are no options. Every other user is able to view these options, and this user has no problem with any other combobox with a value list.

View 3 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved