Results 1 to 11 of 11
  1. #1
    derek7467 is offline Advanced Beginner
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2013
    Posts
    46

    Form Editing my Table


    Greetings all!

    I built a form that displays my table. I turned Tab Stop off on all but a name that is a combo box limited to a list. For some reason, that name field is editable, which i turned off but... Now when i click the dropdown i can hover over a name, but cant click it. I can click it when i allow the field to be editable. This is trivial, can someone point me to the property to set?

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    By 'turned off' do you mean set as Locked Yes? Why would you want to click a dropdown on a non-editable combobox? Can't have it both ways. Only editable combobox will allow click to select item from list because that is one way to edit the combobox.
    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
    derek7467 is offline Advanced Beginner
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2013
    Posts
    46
    yes its locked for editing. i want it so that i ca click the dropdown and view the record for whatever i click on. I know its possible because its acting like i want in another form ive seen built by someone else. only difference is that there is vba code on the onload fucntion. i havent looked at that code yet

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    What do you mean by 'view the record'? You want to go to record or filter the form based on combobox selection? That must be an UNBOUND and unlocked combobox.
    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.

  5. #5
    derek7467 is offline Advanced Beginner
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2013
    Posts
    46
    i want to make the selection and filter the form based on that selection

  6. #6
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    Then unlock the combobox and don't bind it.

    What method are you using? Options:

    1. dynamic parameterized query as form RecordSource

    2. set the Filter and FilterOn properties of form

    3. go to record
    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
    derek7467 is offline Advanced Beginner
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2013
    Posts
    46
    i wasnt binding it. i was setting it in the combo box settings to find values on form by it. i will try ur options and see how it goes

  8. #8
    Missinglinq's Avatar
    Missinglinq is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    May 2012
    Location
    Richmond (Virginia, not North Yorkshire!)
    Posts
    3,018
    If the list of names is short enough that you can live with the users having to scroll down to the name, rather than beginning to enter a name in and having it move to the appropriate name, you can leave the Combobox unlocked but prevent keyboard input, using code like this:

    Code:
    Private Sub ComboBoxName_KeyDown(KeyCode As Integer, Shift As Integer)
     
     Select Case KeyCode
      
     Case vbKeyReturn, vbKeyTab, vbKeyUp, vbKeyDown
       KeyCode = KeyCode  'Accept these keys
     
      Case Else
       KeyCode = 0 'Block all other keys
     
    End Select
    
    End Sub

    Linq ;0)>

  9. #9
    derek7467 is offline Advanced Beginner
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2013
    Posts
    46
    what action should i put that code on?

  10. #10
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    Linq's code is in the KeyDown event of combobox. Create the event for your combobox and paste the code into it.

    Do you know how to create VBA event procedures?
    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.

  11. #11
    derek7467 is offline Advanced Beginner
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2013
    Posts
    46
    thanks guys, i added the code in, but it wasnt what i wanted so i sat for a minute and thought about my issue. IT WAS BOUND! I made it unbound and now i can use the drop down field and nothing is getting edited. Next issue is tab to next record stopped working. Anyway to make both the drop down and tab work together? (tab property is set to NO on all but the employee combo box which is set to Yes

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

Similar Threads

  1. Editing a table with form via VBA
    By WickidWe in forum Forms
    Replies: 7
    Last Post: 12-12-2013, 08:48 PM
  2. Replies: 3
    Last Post: 10-19-2013, 10:21 AM
  3. Editing Records In Table Using Form
    By ffezz in forum Programming
    Replies: 3
    Last Post: 03-14-2012, 01:40 AM
  4. Replies: 1
    Last Post: 05-17-2010, 12:03 PM
  5. Editing a Linked Table
    By amndza in forum Access
    Replies: 2
    Last Post: 01-21-2009, 01:27 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