Results 1 to 2 of 2
  1. #1
    5 Star Lounger bfxtrfcmgr's Avatar
    Join Date
    Aug 2002
    Location
    Fresno, California, USA
    Posts
    995
    Thanks
    12
    Thanked 0 Times in 0 Posts

    NotInList...not AGAIN! (2002)

    O.K., I don't know any code but have ordered the books and intend to go into that really spooky world in the near future. For now I am attempting to accomplish what would seem a relatively simple task, from what I have read; And, yes, I have gone back and read posts on this issue all the way back to the beginning of the year. Most of them were way over my head. However, Charlotte had a response on 4/2/02 that seemed simple enough for my gray matter to deal with - so I went with it.

    I have six combo-box's with customer names on an order entry form. These "customers" might also be described as locations because these are actually points of pickup and delivery for a trucking company. The names in the first box can be common to the remaining five because the same named customer can have several different addresses (i.e. Home Depot has the same name for every store, but there are thousands across the country and even several in one city). I have set OnDoubleClick to open a directions form (nearly three thousand entries) for the name displayed in the combo box. May God help you if it happens to be Home Depot - fortunately the records come up in alpha order by city, so at least you can narrow it down with the record selector on the form. Per Charlotte's advise, the RowSourse is set to the appropriate form/query/table in the Directions table and the LimitToList property is set to yes.

    If you attempt to enter a name that is not in the list you get that MS message (and irritating sound) that the entry is not in the list and the Directions form opens. You enter the new name and hit a save button on the form, clisk on close, and it returns you back to the Order form with the name you started to enter that was not in the list. Following normal order entry procedure, you then tab to go to the next cell. As soon as you hit "tab" it starts you back on the same process as before (not in list message and the directions form). If I delete the entry on the Order form and back-tab out of the cell, re-enter the cell, re-enter the name, then the new name is now available.

    Any clues as to what I may have done wrong? Do I just have to wait until I learn code?

    ANY input is much appreciated,
    Bryan
    Bryan,
    Not the smartest critter on the glacier. . .
    . . .but I'm persistent (does that count?)

  2. #2
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,623
    Thanks
    3
    Thanked 60 Times in 60 Posts

    Re: NotInList...not AGAIN! (2002)

    I think the problem here is that you probably need to requery the combo box after you add the item to the list. Code would look something like this air code:
    <font color=blue>
    Private Sub MyCombo_AfterUpdate()

    Me!MyCombo.Requery

    End Sub
    </font color=blue>
    Hope this helps. If you want to dig into this a little further, you can look at the Solutions Database that you can download here.
    Wendell

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •