Combo Box List: Repeated Names Problem

Dec 11, 2004

my search form has a combo box with "make"names. i can add new makes via a other form. so the combo box needs te run via a query so that it can list new makes (so that i can also search them). but, since some makes repeat them selves in the table, sometimes up to 15 times (see atachment 1), the combo box will show 15 times the same make. i just need it to show the make 1 time, all of the makes just 1 time. only way i can do that is to type them my self (see atachment 2). but then new makes that are added later wont be shown in the list.

so: i want that the make is only shown once in the list, and that the list is updated with new makes that are added later. how do i do that?

note: a "make" E.G = Philips, Apple, LG, Microsoft, creative etc (just for the lesser skilled english readers like me )

all help is welcome

View Replies


ADVERTISEMENT

Queries :: Using Field List Combo Box To Set Field Names In Query

Apr 24, 2013

I’m developing a claim tracking database that tracks dates of events that occur in the course of processing a claim; such as, Loss Date, Report Date, Estimate Date, Payment Date, etc. There are 16 different “Events” in all.I currently have the following tables set up:

tblClaim
ClaimID
ClaimNumber
fkEmpID

tblEmployee
EmpID
EmpName

[code]....

What I need to do is create a form where management can choose two or more events, and calculate the average number of days between two of any of the events, for an employee, or all employees.I have created a crosstab query to change the values in the EventName field in tblEvents to field names, and the EventDate as values for the related EventNames. I created another query based on this query to do the DateDiff.

I created combo boxes on my form with the Row Source Type set to Field List, for a list of fields in my crosstab query. I’ve tried to use the following DateDiff function to get the days between the two fields selected in my combo boxes:

Code:
DateDiff("d",[Forms]![frmReportBuilder]![cboEvent1],[Forms]![frmReportBuilder]![cboEvent2])

But I get an error about unrecognized field name or expression for my combo boxes. So I added my combo boxes in the query parameter window, with a data type as both text and value, but with both I get an error “This expression is typed incorrectly or is too complex to be evaluated.” I also specified the column headings in the crosstab but I still am getting the “too complex” error.I’m pretty sure it’s trying to do a Datediff on the literal values in the comboboxes and not recognizing that I’m trying to specify field names.Is it possible to assign field names in DateDiff this way?

View 1 Replies View Related

General :: Rewriting Repeated Blocks Of Code For Combo Boxes

May 10, 2013

I just recently started programming in MS Access. I have some forms with lots of combo boxes. I do not want users to type anything in the boxes, but to only select stuff that is contained in the drop down menus.I found this useful code and I am using it in my combo boxes on the key down event to do what I want.

Private Sub cmb_a_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode <> vbKeyTab And KeyCode <> vbKeyReturn Then KeyCode = 0
End Sub

Private Sub cmb_b_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode <> vbKeyTab And KeyCode <> vbKeyReturn Then KeyCode = 0
End Sub

Private Sub cmb_c_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode <> vbKeyTab And KeyCode <> vbKeyReturn Then KeyCode = 0
End Sub

The issue is because I have so many combo boxes, is there a better way to rewrite the code so I don't have to repeat the same code in 20 places?

View 5 Replies View Related

Field Names In List Box

Jun 16, 2006

I would like to have a listbox that contains all of the fields names from a table. Since the user will be selecting items from this list box, the field names should be referred to by their captions as defined in the table.

The listbox values will change depending on the value selected from another listbox.

Question: using code, how can I fill a list box with field names and display the field caption?

Thanks!
Lisa

View 1 Replies View Related

Remove Names From List Box Upon Selection

May 6, 2005

I have a list box that is filled from a table with names of individuals. What I would like to do is when one of the names is selected it will take it off the list and do this for all the names in the list until all are removed then will reset and have the names avaialble once again. Is this possible and if so how can it be done? Thanks.

View 5 Replies View Related

Print A List Of Table Field Names

Dec 20, 2005

Just a quickie- i hope. :rolleyes:

I am in the process of trying to merge two large databases. I have four tables that really should be one to work in the new DB. I just need to be able to print a list of fields in each table so that I can work on the new combined structure before making the changes. I know I can use the documenter but this produces a very comprehensive list which is much more than I need.
Is there anyway of producing a similar list without the detail, just showing the field names.

Thanks

View 14 Replies View Related

Forms :: Selecting Few Names From A Long List

Mar 22, 2013

I am currently designing an employee personal development and training database.I have 100 employees and the number that would go on a training course might be a handful so selecting four or five names in a subform list from a 100 seems a bit impractical.

I thought of selecting the course in a form from a combo box, selecting the employees using a tickbox in a subform and then running an append query.

View 6 Replies View Related

Modules & VBA :: Populate List Box With Table Names

Jul 10, 2014

I am trying to populate a ListBox with the names of the tables from another database. I have the following function which loops the table names from the database I want. The function is caleld on Form Load and passed into the ListBox but the List Box is empty.The message box in the function does display the table names when called from the form. I just cannot get the list box to populate.

Code:

Public Function ListTables()
Dim db As Database
Dim i As Integer
Dim s As String
Dim tdefs As TableDefs, tdef As TableDef
Set db = DBEngine.OpenDatabase("C:MyPathAnalyzed Tables.mdb")

[code]...

View 5 Replies View Related

How To List All The Column Names For A Given Table Using A Single Query?

Dec 16, 2005

:mad: :mad:
Hi folks,

I wonder how can I list all the column names for a given table using a single query? I know how to do it in SQL using system tables, but no idea how to do that in Access.

Thanks.

View 1 Replies View Related

General :: Pulling Certain Names From A Query To Populate A List Box?

Jun 19, 2015

I have a form set up (in a list box) to show our salespeople what parts they have yet to get out of inventory but have a sales order for. The list box shows a list of all the salespeoples names. My manager wants me to show ONLY the salespeople that have populated fields in this list box. The list box currently shows all the salespeople, but I want to see only the ones that have inventory that has yet to shipped. How do I go about this?

View 4 Replies View Related

Forms :: Multiple Instances Where Inactive Names Should Not Show On List

Mar 22, 2013

We have a form that will have one combo box for Associates (like Employee in the OPs DB) which I've got set to show only active Associates for new entry per the tips in the above thread, but we'll also have a combo box for Developer which I need to function the same way. I don't know how to add that part to the On Current event?

Code:
Private Sub Form_Current()
Dim strComboRowSource As String
If Me.NewRecord Then
strComboRowSource = "SELECT T_Associates.AssociateID, T_Associates.Associate, T_Associates.Active " & _
"FROM T_Associates " & _
"WHERE (((T_Associates.Active)=True));"

[Code] .....

View 4 Replies View Related

Multivalue List In Table - Displaying Names Separated By Comma

Sep 30, 2011

I created a multivalue list in my table. It contains a list of names and a checkbox. I designed the form based on this and am able to check off multiple names. When I go back to look at the table, it stores in each name separated by a comma. So far so good.

When I create a report to display the data, it displays it as 1,2,3..etc., instead of the names separated by a comma.

What do I need to do to display the names ?

View 5 Replies View Related

Forms :: Drop Down List Linked To Table - Names Not Appearing Alphabetically

Sep 14, 2014

I have drop down list linked to table included "agent names" , the names appeared normally in the form but not Alphabetic (A-Z) although the table was alphabetic .

View 1 Replies View Related

Repeating Names In Combo Box

Aug 6, 2007

Hello to all on this site, I am hoping someone here can help me in my journey to learning Access. I have some experience writing simple/moderate code in VBA for Excel, but I am now using Access to create a database to monitor/track progress on projects for an initiative at my work place.

My question revolves around using Combo Boxes. I have one table/form (tblEventSummary/frmEventSummary) where the user will enter data regarding a project they are working on. One field is called txtEventLeader. What I want to do is to create a combobox which will allow the user to either select a name from the dropdown list (of names that have been previously used) or to enter a new one. When entering a future form, I want any new names used to also be displayed in the combobox.

I was kind of successful doing this already using a query (qryEmployees), but if the same name is used in txtEventLeader, I then see that name twice in the combobox and in the associated query. I would appreciate any recommendations for what to do here. Hopefully I was able to ask a clear enough question...

View 2 Replies View Related

Show Field Names In Combo Box

Dec 30, 2005

Hi,

How do you display the names of field for a table in a combo box. I know how to do it in mySQL "DESCRIBE employee_data", is there a SQL command in access to do this?

thanks

Sean

View 6 Replies View Related

Forms :: Search Combo Box With Multiple Last Names

Jan 19, 2014

I have a combo box that brings up records for an individual. I have people with the same last names and have their first names showing on the combo box list, but when i choose one of them, it will always go to the name of the person who was entered first, so matter who i pick(that has the same last name).

View 1 Replies View Related

Modules & VBA :: Populate Combo Box With Names Of Installed Fonts On Computer

Jan 22, 2014

I need to give users the ability to change the font of a field in a report. The field shows a barcode.

I thought of using the CommonDlg class to show the Windows font-selecting dialog box, but installed barcode fonts show as a barcode. I need to show the font name.

So I need to populate a combo box with the names of all fonts installed on a computer.
The fonts reside in C:windowsfonts

I have searched Google for a solution but cannot find one.

How do I populate a combo box with the names of all fonts installed on a computer?

View 4 Replies View Related

Forms :: Cascading Combo Boxes For Table And Field Names

May 15, 2013

Currently, I have a form with a combobox that lists all of the names of the tables inside my database. Depending on the table selected in the first combobox, I would like to have another combobox which allows the user to choose from the field names inside that table.

View 3 Replies View Related

Having A List Of Record Names Displayed And Opening The Full Record Via Click

Sep 13, 2005

Im not sure if this is the right place to put this but I was wondering if you could help me:

Say I have database with forms that display records or people ie name, address, postcode, etc. What I want to do is display a list of Names then from that list I can double, single click and open the record details.

Id call my self and amatuer at access and am probably guessing this is done via vscript or something else, but any help will do.

Thanks
Alex

View 14 Replies View Related

Populate A List Box With Table Names & Table Data

Feb 27, 2008

I have 2 questions/problems:

1. I want to populate a list box with all the Tables Names in my Database using VBA.

2. I also want to create another List Box or Grid (or any thing that will show table data) that when i have select a Table Name (See above (1)) it will show all the data in that table in the List Box. Was thinking some kind of SQL using vba to populate the list box?

Any ideas or help will be much appreciated

Richard

View 1 Replies View Related

Counting Repeated Data

Oct 11, 2007

I have qrys that show current info and also repeated info. A request has been brought to me to now count how many times the repeated data has been repeated.

The data is updated daily, so the repeated record would need to increase in the number of it's occurances by 1 each day.

Any guidance on how to accomplish this is GREATLY appreciated! :)

View 5 Replies View Related

30 Cap Limit On Repeated Forms?

Jan 16, 2006

when i change a form so that instead of single form its multiple forms it seems to only want display 30 instead of the 62 that exist. is there a quick fix this?

if not is there a way to make it display the next 30?

as now it says "record 30 of 62" when it gets to the bottom of the form... ;/

any help is much appreaciated ta. <3

View 3 Replies View Related

Select One Record For Each Repeated Entry

Mar 6, 2006

Hello All,
In my table, I have some records that are duplicated (aside from the primary key).
How can I select only one record from each set of duplicated entries? (There may be more than 2 of each of the duplicated records, but I only need to pull one of them...doesn't matter which one.)

i.e...Like a 'Find Duplicates' query, but only returning the top 1 primary key from each duplicated set.

Thanks,
Sarge.

View 2 Replies View Related

Query Returning 3 Repeated Records Per ID?

Mar 15, 2006

I am trying to build a query which will find the costs from a set of tables where the client has costs.

The client has a cost on booking a fee, he has a hotel room cost and a room facility cost.

My query brings up what I want but each result is repeated 3 times.

I don't know why, can someone correct me please.

SELECT DISTINCT Addresses.ID, Holiday_Bookings.Initial_Cost, Room_Facilities.Cost, Rooms.BasicCostPerNight
FROM ((Room_Facilities INNER JOIN ((Hotels INNER JOIN Rooms ON Hotels.HotelID = Rooms.HotelID) INNER JOIN Stops ON Hotels.HotelID = Stops.HotelID) ON Room_Facilities.FacilityID = Rooms.FacilityID) INNER JOIN (Routes INNER JOIN WalkTypes ON Routes.RouteID = WalkTypes.RouteID) ON Stops.StopID = Routes.Arrive_In) INNER JOIN (Holiday_Bookings INNER JOIN (Groups INNER JOIN (Clients INNER JOIN Addresses ON Clients.ID = Addresses.ID) ON Groups.ID = Clients.GroupID) ON Holiday_Bookings.ID = Clients.ClientID) ON WalkTypes.Walk_TypeID = Groups.GroupID;

View 3 Replies View Related

Replacing Repeated Values From Recrods?

Mar 4, 2007

Attaching a sample mdb file. I have TABLE1, TABLE2 and QUERY1, QUERY2 in my mdb file.

I want Query1 Value 4 once in Query2. It should not be repeated again with [SBNO] values 5 time.

Value 4 in Query 2 shows with only 1st record and remaing 5 records shows 0 value instead of 4.

How is it possible.? Can anyone help me.

View 3 Replies View Related

Can I Use A Query To Show Only One Of Each Repeated Data

Nov 7, 2007

I am really new to using access and I have a massive table 16000 or more entries. What I need to do is take this example data :

VPIAddress
001:99_97_AO
001:99_96_AO
001:99_0_AI
001:986_51_CI
001:986_50_CI
001:985_51_CI
001:985_50_CI
001:984_50_CI
001:983_51_CI
001:983_50_CI

(This is just a tiny fragment of the total data)

The 001: to the first '_' is the important bit this is defining a "Router" what I need to do is total up how many '001:*_' there are, not including duplicate numbers.

Firstly if I understood this (http://www.access-programmers.co.uk/forums/showthread.php?t=92001) post correctly I need to have all the VPIAddress the same. If this is correct is there a way to get access to delete the data after the first '_' ? (I would of posted in this tread but i didnt think that would be right, if im wrong mods move the post :) )

Secondly will the info in that post help me to reduce the data into this :

VPIAddress
001:99_
001:986_
001:985_
001:984_
001:983_

So that I can then see how many Physical "routers" there are

If any one can help me and tell me that my idea will work then tell me how to do it id be extremely happy!

Even if any one says that wont work and gives me the correct way to do it and does a virtual "Clip around the Head" and call me a Daft Bugga I would still be happy because I wouldn't have to trawl through the entire 16000+ entries deleting and modifying.

View 4 Replies View Related







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