Results 1 to 4 of 4
  1. #1
    nc22 is offline Novice
    Windows XP Access 2007
    Join Date
    Dec 2012
    Posts
    2

    Selecting multiple values and editing their location

    Hi,

    I would need the ability to select multiple values from either 1 or multiple list boxes and change their location value.

    I have made a make table query with the data needed stored in two fields "Tape Barcode" & "Field1". From there I have created a form but now I am stuck. Cold someone guide me as far as how to be able to select multiple values using the form and changing the selected values location? I am not able to seem to find the answer on my own and the best possible solution.

    Many Thanks,

    Nick

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,633
    I don't understand what you mean by 'selected values location'. What is 'location'? A multi-value listbox is easy to do but using the selected values requires VBA code unless the listbox is bound to a multi-value field in table. I never use multi-value fields.

    Need a better understanding of your data structure and form design. Want to provide db for analysis? Follow instructions at bottom of my post.
    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.

  3. #3
    nc22 is offline Novice
    Windows XP Access 2007
    Join Date
    Dec 2012
    Posts
    2
    I'll see how much I have to remove for me to be able to post the DB.

    But for now:

    I have the form bound to a table. Table was made from a make table query
    The form would contain a multi-value listbox as you say or several list boxes - These would contain all the barcodes from our different matrials.
    The barcodes would be scanned via scanner.
    From there when I would click the "Update" button on the form all the selected values from the various list boxes or multi-value listboxes would have the location field updated on the table to "Reserved".

    Hope this helps for now. I dont mind going the VBA way just would need help as to how to get there.

    Nick

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,633
    The listboxes provide criteria for targeting record(s) for update? Would be easiest if the criteria could be resolved to a unique ID.

    Using listbox selections requires cycling through the listbox and acting on the selected items. Review http://allenbrowne.com/ser-50.html

    In your case, instead of building a complex string for the WHERE CONDITION of an sql in the loop, use code that will update record defined by the individual listbox criteria.

    CurrentDb.Execute "UPDATE tablename SET fieldname='Reserved' WHERE ID=" & Me.listboxname
    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.

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

Similar Threads

  1. Replies: 4
    Last Post: 08-26-2012, 10:51 PM
  2. Import multiple files from one location to new tables
    By shmalex007 in forum Import/Export Data
    Replies: 1
    Last Post: 01-05-2012, 03:49 AM
  3. Update Query selecting multiple values in one field
    By Zipster1967 in forum Queries
    Replies: 1
    Last Post: 08-15-2011, 12:22 PM
  4. Selecting multiple values to be used in a report.
    By mnsemple83 in forum Reports
    Replies: 1
    Last Post: 08-12-2011, 05:10 PM
  5. Multiple events per location Distance tables
    By flebber in forum Database Design
    Replies: 1
    Last Post: 03-13-2010, 08:48 PM

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