Results 1 to 11 of 11
  1. #1
    BRZ-Ryan is offline Competent Performer
    Windows 7 64bit Access 2010 32bit
    Join Date
    Nov 2013
    Posts
    187

    Mimic a label bound to ID field on form


    I am using a combobox populated with ID's (PK) from the bound table on my form. When you click an item in the list, it will navigate to that record ID. When I create a new record, I'd like it to display (new) on new record and populate the ID when the record is created (id created). Anyone have any ideas?

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,902
    Not understanding what you described.

    The combobox is UNBOUND and used to enter filter criteria to find existing record?

    When you create new record, doesn't the ID automatically generate?
    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
    BRZ-Ryan is offline Competent Performer
    Windows 7 64bit Access 2010 32bit
    Join Date
    Nov 2013
    Posts
    187

    Re: Mimic a label bound to ID field on form

    Yes.

    Yes, but how do I make it appear in my unbound combobox? The combo is populated with primary keys (auto number).

    Imagine you had a label bound to the id field. When a new record is created it s set to (new) and once a piece of data is entered it gets updated to the id for that record.

    I'm trying to make easy record navigation where users can select a record by id in a combobox. The selection part is done, I just want it to function like what I had in this location prior, which was a label bound to id.

  4. #4
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,862
    I am not sure I understand your post either but...

    Create a label

    In the form's current event

    If me.newrecord = true then

    me.labelname.visible = true
    else
    me.labelname.visible = false
    end if

  5. #5
    BRZ-Ryan is offline Competent Performer
    Windows 7 64bit Access 2010 32bit
    Join Date
    Nov 2013
    Posts
    187

    Re: Mimic a label bound to ID field on form

    Not even close, did you read my posts?

  6. #6
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,902
    I wouldn't bother having ID for new record show in the unbound combobox. If the combobox LimitToList property is yes, requires code to save the record, requery the combobox, populate combobox.

    Have a textbox bound to the ID field (Locked Yes, TabStop No).

    You are using this autonumber ID for a value that has meaning to the users?
    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.

  7. #7
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,862
    I did. Did you try my suggestion?

  8. #8
    BRZ-Ryan is offline Competent Performer
    Windows 7 64bit Access 2010 32bit
    Join Date
    Nov 2013
    Posts
    187

    Re: Mimic a label bound to ID field on form

    Yes June, the autonumber is the event number for my events db. I'd like it to show when working with new record (new) and when the record has been created (id#). Or just some way of showing the user that a new record was created (no value entered yet so there's technically not a record) and when a value has been selected creating the record

  9. #9
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,902
    Bound textbox should accomplish that.
    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.

  10. #10
    BRZ-Ryan is offline Competent Performer
    Windows 7 64bit Access 2010 32bit
    Join Date
    Nov 2013
    Posts
    187

    Re: Mimic a label bound to ID field on form

    But I want a combobox.. No room for both on my form.. Is it possible?

  11. #11
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,902
    No room for both!? It's possible - just takes some code. The real trick is timing and figuring out what event.
    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: 3
    Last Post: 08-28-2013, 11:08 PM
  2. Replies: 1
    Last Post: 04-26-2013, 05:30 PM
  3. Bound form with bound combobox
    By Jerry8989 in forum Access
    Replies: 2
    Last Post: 12-05-2011, 01:50 PM
  4. Is there a way to mimic user level security in 2007?
    By avarusbrightfyre in forum Security
    Replies: 4
    Last Post: 08-24-2011, 07:36 PM
  5. Replies: 1
    Last Post: 06-23-2010, 09:05 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