Results 1 to 5 of 5
  1. #1
    joecamel9166 is offline Advanced Beginner
    Windows 10 Access 2013 64bit
    Join Date
    Feb 2016
    Posts
    85

    Edit records from listbox

    I am entering parts into a repair.
    I have a combobox to select the part, then the textbox for description is automatically filled, then I enter the quantity.

    I have an unbound listbox that displays the records that I entered based on a query.

    I have this all set up so I can add and delete just fine. What I want to do is select the record by dbl click from the listbox and have the part number, description, quantity boxes fill with that record so I can change the partnumber or quantity if needed.

    This is all on the same form. I am not using subforms. (tried and couldn't get it to work)



    If I need to, I can use it like it is and if an error is made entering the part, I can delete it and reenter the correct part. This is just for convenience.

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,917
    What code did you have in the DoubleClick event of the ListBox?

  3. #3
    joecamel9166 is offline Advanced Beginner
    Windows 10 Access 2013 64bit
    Join Date
    Feb 2016
    Posts
    85
    I tried using dlookup.
    Me.cmbPartID = dlookup(me.lstPartList.column,3)
    that filled in the the correct info, but started a new record.
    I tried playing with the DoCmd.gotorecord and DoCmd.findrecord, but I couldn't get those to work.

  4. #4
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,917
    Quote Originally Posted by joecamel9166 View Post
    I have an unbound listbox that displays the records that I entered based on a query.
    This line seems inconsistent.

  5. #5
    joecamel9166 is offline Advanced Beginner
    Windows 10 Access 2013 64bit
    Join Date
    Feb 2016
    Posts
    85
    Once I get to work, I can break down it down more.

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

Similar Threads

  1. Replies: 1
    Last Post: 07-10-2014, 03:09 PM
  2. Using VBA to look for and edit certain records
    By element32d in forum Programming
    Replies: 13
    Last Post: 11-16-2012, 07:01 PM
  3. Replies: 14
    Last Post: 12-26-2011, 07:32 PM
  4. for next with edit records
    By JJCHCK in forum Programming
    Replies: 15
    Last Post: 10-27-2011, 10:38 AM
  5. Form not letting me edit records
    By bbylls in forum Forms
    Replies: 3
    Last Post: 12-16-2009, 09:30 AM

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