Combobox Count
Feb 7, 2008
Hi guys I know how to count a listbox value, but how can I count a combobox, I'm trying to count the results in the combobox. for example if the comobobox has three itmes in it how can I count them in a textbox?Thanks.
View Replies
ADVERTISEMENT
Apr 26, 2015
I am trying to use a combobox called Manufacturer to select which table the combobox called Model gets it's rowsource from using the code below.
Code:
Private Sub Manufacturer_AfterUpdate()
If (Me.Manufacturer.Value = "Siemens") Then
Me.Model.RowSourceType = "Table/Query"
Me.Model.Recordset = "SeimensTable"
Me.Model.RowSource = "SELECT Model FROM SeimensTable"
Else
If (Me.Manufacturer.Value = "Samsung") Then
Me.Model.RowSourceType = "Table/Query"
Me.Model.Recordset = "SamsungTable"
Me.Model.RowSource = "SELECT Model FROM SamsungTable"
End If
End If
End Sub
But when I run the form and select Manufacturer. Combobox Model remains empty. tell me what I'm doing wrong?
View 5 Replies
View Related
Jan 13, 2005
How would I modify multiple comboboxes in subforms at the same time. For example.. In main form ComboboxA user selects 1992, Combobox1 in subform1 is also changed to 1992, as well as Combobox2 in subform 2.
Whats the best way to do this?
View 2 Replies
View Related
Apr 22, 2005
I have 2 comboboxes, the first one is called "activity", whereby I have 3 options to choose from, and the second is called "level".
When I click an "activity", for example Drawings, I want the "level" combobox to list a unique set of options for that category. and if I click on a different "activity" for example Planning, I want the "level" combobox to show a completely different set of options.
If anyone can give me any help on how to do this then I would be very grateful!!
Thanks
Angela :eek:
View 2 Replies
View Related
Jan 25, 2006
I've tried searching the forums and haven't found quite what i'm looking for. I would like to be able to change the source for a combobox based on another combobox. The simplest way i can summarize that is i want to be able to choose A or B, depending on my choice i want another combobox to display all the values that A or B can have.
Thanks
Jim
I'm not sure I worded that very well. :(
View 1 Replies
View Related
Feb 25, 2008
Hey all,
I've read some tutorials on this sort of thing, but I can't seem to piece it all together to achieve what I want.
I have a table Products that contains the fields Product, Size and Brand. I also have a form, frmProducts, that has a combobox linked to each of the fields in the Products table. I want to be able to select a product from the first combobox, tab to the Brand combobox and have only those brands associated with the product already selected.
This is how I think it should work:
1.ComboBox1 selects productA
2.ComboBox2 takes its options from a query that searches Products table for all instances of productA and displays all available brands. brandA is selected.
3.ComboBox3 get its options from another query that searches for all instances of productA that also have brandA and displays all available sizes.
What I'm having trouble with in particular is passing the data between queries. For example, I can't figure out how to tell the query to search for all instances of productA when its defined by the first combobox. Do I have to store it as a variable somewhere?
I hope I've been clear.
View 6 Replies
View Related
Apr 13, 2006
I have a table tblBookings.
In this table it has a bookingID, CustomerID and some other none relevant details.
The CustomerID comes from table tblCustomer. i.e a customerID must exist in the customer table to be allowed in the bookings table tblBookings
A customer can exist in tblCustomer without existing in the booking table.
I am trying to write a query that will list each and every customer ID in the tblCustomer and count the number of bookings that that customer has (even if it is zero).
I have a query that will count the bookings if they exist in the booking table and display the number of times that a customer appears in the bookings table.
SELECT tblBookings.CustomerID, Count(tblBookings.CustomerID) AS NoOfBookings
FROM tblBookings
GROUP BY tblBookings.CustomerID;
How do I create a query that will do this but list all customers even if they don't exist in the bookings table (but obviously occur in the customers table)
I am trying to create a similar query where all bookings per hotel are listed even if no bookings are made for that hotel. I am guessing the answer is the same as above.
The Ritz. Bookings 0
The Hilton. Bookings 3
The Carlton. Bookings 0
The Lowry. Bookings 2
For every hotel.
That kind of thing.
If you need more information please shout.
View 3 Replies
View Related
Aug 16, 2015
I have a table that has 5M+ accounting line entries. Below is an example of one accounting journal in the table.
BUSN_UNIT_IJRNL_DJRNL_ICNCY_CMONY_A
CB0014/07/20140002888269323AUD16797
CB0014/07/20140002888269323AUD-16797
CB0017/07/20140002888269323AUD16797
CB0017/07/20140002888269323AUD-16797
The journal ID above was an accounting entry, debit $16,797 and credit $-16,797. because it was entered as a reversing journal in the system, the table has captured the Journal ID with 2 dates. For my purpose i only want the one date (MIN) date, the total amount of the journal (either the debit or credit amount 16,797) and the total number of lines the journal ID has so in this instance I want the count to be 2 and not 4.
Right now this is what i get
BUSN_UNIT_I JRNL_I CNCY_C SumOfMONY_A CountOfJRNL_I MinOfJRNL_D
CB001 0002888269 AUD 0 4 4/07/2014
This is the output i would like
BUSN_UNIT_I JRNL_I CNCY_C SumofMONY_A CountofJRNL_I MinOfJRNL_D
CB0010002888269323 AUD16797 2 4/07/2014
Im thinking with the total sum because theres debits and credits is there a way to do the absolute value of the journal MONY_A then divide by 2?
current SQL
SELECT [One Year Data Lines].JRNL_I, [One Year Data Lines].CNCY_C, Count([One Year Data Lines].JRNL_I) AS CountOfJRNL_I, Min([One Year Data Lines].JRNL_D) AS MinOfJRNL_D, [One Year Data Lines].BUSN_UNIT_I, Sum([One Year Data Lines].MONY_A) AS SumOfMONY_A
FROM [One Year Data Lines]
GROUP BY [One Year Data Lines].JRNL_I, [One Year Data Lines].CNCY_C, [One Year Data Lines].BUSN_UNIT_I
HAVING ((([One Year Data Lines].JRNL_I)="0002888269") AND (([One Year Data Lines].CNCY_C)="aud"));
View 9 Replies
View Related
Sep 20, 2005
Hi,
Just spent the past hour in here trying to nut this one out, but not sure I've found something quite the same...though I know the answer will be painfully simple.
I have a customer table and a product table, and a query that groups customer first and last names along with a count of products per customer e.g. 1,1,3,2,3,4,2,1 indicates customer A buys qty 1 of product z, customer B buys qty 1 of product x, cust C buys qty 3 of product y and so on.
All I need to do now is do something to also output the total number of products. ie as per example above, 1+1+3+2+3+4+2+1 to get 17.
Can I do a count of the count or do I do some sort of sum of the count results?
I've tried everything I'm capable of as a newbie, and I'm not having any progress.
Any help appreciated.
View 2 Replies
View Related
Sep 5, 2006
Hi all,
Do someone have a way to do a count function in a Reports to let the report showing the details at the same time do the accumulating of the number??
I had try so many way but it not work~~!!! Pls i need someone help cause i stuck my report there without the accumulating of the number, Thanks.
Regard,
alex
View 4 Replies
View Related
Jun 6, 2005
If I want the combo box to read entry's from one table and then store in another table how would this be done? I think it has to be done with the query builder but I am not sure. I am sorta new to Access.
View 2 Replies
View Related
Dec 8, 2006
Hello,
I have an invoice form with its detail subform that I have been stuck with for a while. The main problem is on the detail subform, here is what I have:
1. I have 5 fields, DepartmentID, ProductID, Qty, Price, Total.
2. The department is a combobox and I want to select the department that the product is from. Example: If I will be selling a pvc pipe I should select PVC Department.
3. Once I select the department I want the product combobox to only show the products from that department. So I select Electrical Department I can only see what items belong to the Electrical Department.
That is basicaly what I need it to do. So, I worked hard on this looked at samples, read threathds, pull all my hair out, almost done eating all my nails, and most of you know how that goes!!!!
Well finaly after sleepless nights I got something to work!!! I was able to make the product combobox only show the items from that department, Man I was jumping of joy!!! I turnon my radio and put on "Eye of the tiger" and started boxing away!!!! jejeje
Well, I started to make it look pretty, changing the looks and changing the comboboxes to show me the name of the department not the ID, worked good, than I changed the product combobox to show the name not the ID and something went wrong......
The department combobox does a requery of the product combobox everytime I select the department for a new item. So for some reason it makes the product code from the other item disapear....I cant figure it out!!
I have attached the DB, goto frmFactura there is already one invoice started, I have selected the PVC Dept and the Product, you can also see the prtoduct code, once you goto the next item and select another department the prodcode desapears but the prodid stays...
CAN YOU HELP ME PLEASE!!!!!
View 3 Replies
View Related
Jan 22, 2008
Hallo,
Simple question, is their a way of showing the value on the combo box without saving it in a table. Therefore, when you open the form again next time the value last selected is viewed again.
Thanks
View 1 Replies
View Related
Mar 8, 2005
On a form i have 25 comboboxes with names the form is based on a table (tblpersons) with the key personID now how can i in all the comboboxes in the event before update
doing the following:
when i select a name in a combobox before update i want to search in all the combobowes of that name i selected not 2x selected is and and if not then the name must in the field otherwise it would tell me that thr name al is selected in another combobox. If the name i selected is ok then this name must not again availible in the combobox
can someone help me with that code please?
Is this with a loop?
View 4 Replies
View Related
Apr 18, 2005
I want to have a combobox draw its information from more then one column in the same row from the table, but show as only one column when a user clicks on the combobox in the form.
Example of what I am doing...
Table with contact information:
Contact, Phone1, Phone2, Phone3
Combobox on form for contact log: (what I want but not sure how to do)
Phone = (Phone1, Phone2, Phone3 in a single column)
I need the combobox to be able to select each phone number seperatly from that contact so I can show which number was called.
View 4 Replies
View Related
Jun 12, 2005
I know there have been old threads on this issue. I have done a search and read them. That is how I got this far. I was able to search the Web, find a Govt site with a list of every zipcode in the country. It was a text file so I converted it in excel and then imported into an Access table. I now have a 4 field table with every zip in the country-city,state,and Zipplus a auto number field as my primary key. My db is name and address intensive in multiple tables. I want to use a combobox to lookup and display city,state and zip on my forms from this table instead of storing the information. However, If I do this and then want to generate a mailing list how can I do this if the city,state,zip info has only been displayed from a combobox and not stored in the underlying table? Since I am using an autonumber as the primary key for the city,state,zip table can I include a field for that pk in an invisible field and just store that? If anyone wants the table of zipcodes let me know. I'll be happy to upload it.
View 1 Replies
View Related
Aug 5, 2005
I have a form for entering data. I use a combo box linked to a table to select a record that has a person's SSN, Name and city. Once the proper record is highligted and selected only the first column is visible in the combobox. Is there any way to keep all 3 columns visible once a record is selected in the combobox?
View 1 Replies
View Related
Jul 14, 2013
When i try to update a field using a lookup instead of giving me the name of the employee and Customer it only offers their respective ID numbers. How can i change this?
View 1 Replies
View Related
Apr 17, 2006
I've been searching these forums but couldn't find what I'm looking for. Here's what I need - maybe I'm going about it the wrong way.
I have a table called Customers. For each customer (custid) there can be multiple contacts - contact1, contact2, etc. each with their own phone, e-mail, etc.
I have a form called New Job - when I enter a new job and select the customer - I would like to have a drop down box of the available contacts for that customer (based on custid). Everything I've seen so far only allows me to have a drop down from the same field - not multiple contact fields.
Any thoughts?
Thanks!!!!
View 3 Replies
View Related
Apr 23, 2006
i searched for similar combobox features, nut didn't find any that helped.
i have 2 unbound combos that get heir values from different tables
first combo1 gets its values from a query
SELECT [tbl_music].[MID], [tbl_music].[Artist], [tbl_music].[Song], [tbl_music].[CID] FROM tbl_music;
combo2 gets values from
SELECT [tbl_category].[CID], [tbl_category].[Category] FROM tbl_category;
IDs are autonumber and primary
The CID fields in the tables are in a 1..* relationship
Both are constructed with the wizard and the ID columns are hidden.
What i need is:
when selecting something from combo1, the combo 2 should show the right category for that song.
Hope i explained clearly enough.
I tried to use the dlookup function, but i get error 94, invalid use of null.
i'm using the afterupdate event.
I can update a textbox text, but can't do so with the combobox value.
Any ideas what i'm donig wrong :confused: :confused: :confused:
View 10 Replies
View Related
Jun 15, 2005
Hi I really have a problem in MS access.
I created a combo box which as 2 columns, eg Plant ID and Plant name
I need to have the Plant ID on the left and Plant Name on the right which it is at them moment, however....
When I choose an option inthe combo box, it will display the Plant ID number in the textbox because it is on left (its the 1st column in the drop down box)
.... I want it to show the plant name instead, but still have the plant id colun on the left and plant name onthe right when i click the arrow of the drop down box,
sry if its confusing, i need an anwser ASAP, thanks!
View 1 Replies
View Related
Jul 13, 2005
I've seen comboboxes before that by typing the first letter of the word your looking for it will go to the first word matching that letter, but then by typing that letter again it will go to the next word starting with that letter:
Such as in a "Choose Your State" box by typing "M" it selects Massachusetts then by typing m again it selects Maryland, the third time it selects Maine... and so on. I would like to add this to a cbobox on a form but havent had any luck. I have searched the forum but didnt find anything pertaining to this. Any help or suggestions on where to get this info is greatly appreciated.
JO
View 1 Replies
View Related
Oct 19, 2005
hi, i'm a newbie, i've got a question about combobox:
i've a form "Order" and a subform "suborder" with a combobox based on a table "Object" with this value: ID, Object, Price, Category. When i choose a value, the combobox returns to the "suborder" table ID value...now, is possible to returns also the others value to that table??
Please answer me....sorry for my bad english i'm italian
Thanks early!!!
View 2 Replies
View Related
Oct 19, 2005
hi, i'm a newbie, i've got a question about combobox:
i've a form "Order" and a subform "suborder" with a combobox based on a table "Object" with this value: ID, Object, Price, Category. When i choose a value, the combobox returns to the "suborder" table ID value...now, is possible to returns also the other values to that table??
Please answer me....sorry for my bad english i'm italian
Thanks early!!!
View 1 Replies
View Related
Jan 15, 2008
I don´t get this effect: I am struggling with a cascading combobox problem, could you help me, please?
form is frm_Principal. Combobox are Categoria, 2ª Categoria and 3ª Categoria. Where´s the error?
http://www.drupload.com/uploads/211DB_MM08.rar
thanx so much
View 4 Replies
View Related
Jan 21, 2008
Hi,
i have placed a combo box on my form using the wizard. the form is based on a table which is related to a query to reduce the amount of entries. when i scroll through the records, i only see the correct numbers based on the event however, when i add the combo box, it shows ALL entriesin the table instead of the ones i can scroll through. the numbers seen are-
1,7,9,10,23,24,28,29,32,33,38, these are all payment numbers based on a name. the combo box shows all payment numbers 1,2,3,4,5,6,7,8,9,10 an so on. can this be altered to show only the available record numbers?
the payment number is also the primary id number for that table.
many thanks,
Nigel
View 4 Replies
View Related