Results 1 to 6 of 6
  1. #1
    martixz is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2013
    Posts
    11

    Amount for every SELECTED item in combo box

    I have a problem working with MS Access. There is a table named "40" and a form that fills that table "40 valdymas". In that form combobox "Pavadinimas" fills the table field "Pavadinimas". I need to add a possibility to specify amount of each SELECTED combobox item (for example, 2 of Oligochaeta, 5 of Scorpiones) and expression in table field "Pavadinimas" should be exaclty: 2*Oligochaeta, 5*Scorpiones etc.
    I am not sure whether the problem is explained correctly, but I can try to clarify if it is needed. I would be very thankful.
    Screens:



    Click image for larger version. 

Name:	1234.png 
Views:	25 
Size:	39.2 KB 
ID:	20907

    Click image for larger version. 

Name:	1222.png 
Views:	25 
Size:	28.4 KB 
ID:	20908

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,549
    The query showing the list will need to have the count too.
    select #, item, count([item]) from table

  3. #3
    ssanfu is offline Master of Nothing
    Windows XP Access 2000
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    From the image, it looks like the field "Pavadinimas" is a multi-value field (MVF).
    You might want to rethink this strategy. No experienced programmer I know of uses
    MVFs. I never use them.
    They are a pain to display/report, usually requiring code to do anything useful with them.

    I'm just saying...........

  4. #4
    martixz is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2013
    Posts
    11
    Any more suggested solutions to this problem? Still can't solve it.

  5. #5
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,633
    Don't use MVF's. Otherwise, learn how to build queries with them. https://support.office.com/en-us/art...E9BEBBEC31#bm7
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  6. #6
    ssanfu is offline Master of Nothing
    Windows XP Access 2000
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    You also need a field to store the quantity (ie 2 of Oligochaeta, 5 of Scorpiones).

    You can DISPLAY the quantity with the options in the combo box "Pavadinimas" by concatenating the quantity to the combo box option, but somewhere there needs to be a field that stores that quantity.

    From the sound of your description, you do not have a normalized table structure...... But since I have not seen your table structure, this is just a guess..

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 8
    Last Post: 06-26-2014, 08:52 AM
  2. Query Criteria Based on Item Selected???
    By P.Malius in forum Queries
    Replies: 5
    Last Post: 04-16-2013, 02:09 AM
  3. Combo box - Open at last item selected
    By mitchy1111 in forum Programming
    Replies: 2
    Last Post: 10-07-2011, 07:23 AM
  4. Replies: 7
    Last Post: 08-31-2011, 05:09 PM
  5. Replies: 1
    Last Post: 11-23-2010, 01:30 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums