Results 1 to 3 of 3
  1. #1
    civl_eng is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Jul 2017
    Posts
    41

    Show combobox only last and new record


    Hi all, i have a table in form and user can choose number list of combo box, but i want after choose number of list, disable list in textbox and enable list only last and null record,



    and i don't want to show combo box list in filled record again, combo box only enable in last and null record according picture.
    thanks in advanced.(sorry, my english is weak)
    Attached Thumbnails Attached Thumbnails Screenshot (598).png  

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,549
    Don't quite understand what youre asking.
    But i get the null.

  3. #3
    Gicu's Avatar
    Gicu is offline VIP
    Windows 8 Access 2013
    Join Date
    Jul 2015
    Location
    Kelowna, BC, Canada
    Posts
    4,235
    When you say "last" I believe you mean new record (the one on the bottom of your continuous or datasheet form (looks like a table but is actually a form). So technically you want to disable or lock the combo-box if the field is populated and enable it if it is null. You can do that in the OnCurrent event of the form or in the OnEnter event of the combo-box itself:

    Code:
    If IsNull(Me.YourComboName)=True then
       Me.YourComboName.Enabled=True
    else
       Me.YourComboName.Enabled=False
    end if
    or with one liner like that
    Code:
    Me.YourComboName.Enabled=isnull(Me.YourComboName)
    Cheers,
    Vlad

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

Similar Threads

  1. show combobox item instead value
    By Milad Roohi in forum Access
    Replies: 1
    Last Post: 05-26-2016, 03:10 PM
  2. Replies: 2
    Last Post: 04-09-2016, 01:23 PM
  3. Replies: 7
    Last Post: 03-05-2016, 03:04 PM
  4. Replies: 3
    Last Post: 05-03-2015, 10:28 AM
  5. Replies: 1
    Last Post: 02-01-2015, 12:16 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