Results 1 to 3 of 3
  1. #1
    Sharkun is offline Novice
    Windows XP Access 2003
    Join Date
    Dec 2010

    Combo Box to change primary key #

    I posted this in query section but maybe I'll get something here. I guess it has more to do with forms than queries.

    I have a service ticket program. The ID number for each ticket is the primary key of the main table. When employees fill out a ticket, they can mark the ticket open or closed (with Yes/No.) I have a query that shows all tickets marked as open. I have a command button to bring up the query. I also have a combo box, showing the results of that query.

    So my problem is that I'd like to click on an open ticket from the combo box and have the form jump to that record. I tried this line of code and included is the result of which I get an error code.

    Private Sub List67_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
    List67.Value = Text69.Value
    End Sub

    Text69 being the ticket ID number generated by access. When I try to do this I get:
    Run-time error '2448'

    You can't assign a value to this object.

    I haven't messed with macros yet, but the more I look into this, I think that it was I have to do.

    But if anyone has any ideas, I would appreciate their time.


  2. #2
    NTC is offline VIP
    Windows Vista Access 2007
    Join Date
    Nov 2009
    the most common purpose of the combobox is to move to a record that is selected. When one inserts the combobox into the header section of a form - the wizard will launch to specifically prompt/set up this task. If yours doesn't - then consider just setting up a new combobox and deleting the old.

    your post title is about 'changing key ID #' - - - you don't want to do that, and this would not be at all involved with what you seek to do.

    Hope this helps.

  3. #3
    Sharkun is offline Novice
    Windows XP Access 2003
    Join Date
    Dec 2010
    I remade the combobox, but I'm not seeing how to jump to the record I've picked from the drop down box?

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

Similar Threads

  1. Combo box change
    By nawaray in forum Programming
    Replies: 4
    Last Post: 01-17-2011, 04:04 AM
  2. Combo boxes both primary keys to select record
    By Alexandre Cote in forum Forms
    Replies: 3
    Last Post: 08-10-2010, 07:11 AM
  3. Using VB to change the value in a combo box
    By Noobie in forum Programming
    Replies: 7
    Last Post: 03-18-2010, 10:07 AM
  4. Change existing combo box to new one
    By snifferpro in forum Forms
    Replies: 3
    Last Post: 08-10-2009, 09:26 AM
  5. Primary Key change macro?
    By gracin in forum Access
    Replies: 0
    Last Post: 03-06-2009, 10:59 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