Page 2 of 2 FirstFirst 12
Results 16 to 24 of 24
  1. #16
    veale1009 is offline Novice
    Windows 10 Access 2007
    Join Date
    Feb 2021
    Posts
    13

    Form is not sorted. It displays the list box to choose a record from that then use other fields to the form then, the form with chosen record from list box and entered data to add a new record to another table. Sorry if you think this is repeating the issue, but it is only further describing the problem. Not all of us are VIP's and are trying to learn from those with more knowledge.

  2. #17
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    6,569
    So upload a sample db that shows the issue, as from what you describe is not normal, and something must be causing it.

    Don't be concerned about the VIP status. That just means I have made a good few posts. Hell, you can be expert for quite a small number.
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  3. #18
    CarlettoFed is offline Competent Performer
    Windows 7 64bit Access 2013 32bit
    Join Date
    Dec 2019
    Posts
    274
    Attach a sample file to get a real situation of what you have achieved and thus have a chance to help you.

  4. #19
    moke123's Avatar
    moke123 is offline Me.Dirty=True
    Windows 11 Office 365
    Join Date
    Oct 2012
    Location
    Ma.
    Posts
    1,879
    Have you deleted the listbox and re-built it to rule out corruption?
    If this helped, please click the star * at the bottom left and add to my reputation- Thanks

  5. #20
    davegri's Avatar
    davegri is offline Excess Access
    Windows 11 Access 2019
    Join Date
    May 2012
    Location
    Denver
    Posts
    3,742
    "Form is not sorted. It displays the list box to choose a record from that then use other fields to the form then, the form with chosen record from list box and entered data to add a new record to another table."
    If you read that very carefully, I think maybe the form is unbound. I think OP want to click on a row in the listbox and have the listbox columns displayed in separate fields on the form so that they can be edited (you can't edit a listbox). Then he wants that form to update another table.
    I don't know why the listbox would have a downward row selected at form load unless code made it so.

    We can guess till the cows come home. OP has been asked several times to upload the DB, but...
    Last edited by davegri; 09-22-2024 at 10:14 PM.

  6. #21
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,939
    Perhaps the listbox has a default value set

  7. #22
    moke123's Avatar
    moke123 is offline Me.Dirty=True
    Windows 11 Office 365
    Join Date
    Oct 2012
    Location
    Ma.
    Posts
    1,879
    Quote Originally Posted by CJ_London View Post
    Perhaps the listbox has a default value set
    I had the same thought but it's unclear that a value is selected. Often when developing and you close a form and save changes various properties get saved unintentionally.
    If this helped, please click the star * at the bottom left and add to my reputation- Thanks

  8. #23
    veale1009 is offline Novice
    Windows 10 Access 2007
    Join Date
    Feb 2021
    Posts
    13

    screen shots

    Click image for larger version. 

Name:	inv sample.jpg 
Views:	11 
Size:	64.7 KB 
ID:	52240
    Quote Originally Posted by CarlettoFed View Post
    Attach a sample file to get a real situation of what you have achieved and thus have a chance to help you.
    Click image for larger version. 

Name:	inv sample2.jpg 
Views:	11 
Size:	166.4 KB 
ID:	52241
    This is the for to add invoice. As you can see, the list box is not positioned at the first record. I've included the properties of the list box. WWV

  9. #24
    Minty is offline VIP
    Windows 10 Office 365
    Join Date
    Sep 2017
    Location
    UK - Wiltshire
    Posts
    3,158
    It appears to not be positioned at any record, so you probably want it to select the first one.

    In the forms load event put in something like:

    Code:
    Me.YourListboxControlNameGoesInHere.Selected(0) = True
    Edit: You'll then need to do something to make the form go to the matching record.
    Presumably you already have some code to do that when the list box is clicked, so call that routine.
    DLookup Syntax and others http://access.mvps.org/access/general/gen0018.htm
    Please use the star below the post to say thanks if we have helped !
    ↓↓ It's down here ↓↓

Page 2 of 2 FirstFirst 12
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 6
    Last Post: 05-11-2024, 03:10 AM
  2. Replies: 1
    Last Post: 07-12-2019, 04:15 PM
  3. Replies: 1
    Last Post: 11-05-2015, 04:16 AM
  4. Replies: 4
    Last Post: 07-04-2013, 12:07 PM
  5. Replies: 3
    Last Post: 03-25-2010, 12:31 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