Results 1 to 12 of 12
  1. #1
    MikicaMika is offline Novice
    Windows 8 Access 2013
    Join Date
    Jan 2016
    Posts
    6

    Problem with combobox

    Okay, people, I need to create a certain from but I have no idea how to do it.



    I have these two tables.

    Table Worker:

    ID, Name, Last Name, Gender, Office_ID. Id is a primary key.

    Office:

    ID, Name, Adress. ID is a primary key.

    Relationship: Office_ID - ID

    My task is this:

    Create a form Office which contains all the columns from a table Office. Column ID must be replaces with a combo box. Values in combo box are chose wfrom a table Worker and this field must remember ID(Worker). The list in combo box must not show the primary key of a table Worker.

    No idea how to do it. Please help.

  2. #2
    MikicaMika is offline Novice
    Windows 8 Access 2013
    Join Date
    Jan 2016
    Posts
    6
    Anybody?

  3. #3
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows 7 32bit Access 2013
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,610
    I think you should be able to do most of this using the wizard.

    Use the wizard to create the form.
    Delete the ID control on the form and create a combo box control with the wizard to replace it.
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

  4. #4
    MikicaMika is offline Novice
    Windows 8 Access 2013
    Join Date
    Jan 2016
    Posts
    6
    I know, but the wizard is whats giving me the trouble.

    Because once I select ID and let's say Gender, I hide ID and the only thing I can store in the field is the Gender. But ID must be stored but not shown in combo list. Tried fucking everything and it still wont run. It's so frustrating, I almost broke the laptop.

  5. #5
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows 7 32bit Access 2013
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,610
    What are the current settings of the following properties of the combo box:

    Control Source
    Row Source
    Column Count
    Column Widths
    Bound Column
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

  6. #6
    MikicaMika is offline Novice
    Windows 8 Access 2013
    Join Date
    Jan 2016
    Posts
    6
    Quote Originally Posted by Bob Fitz View Post
    What are the current settings of the following properties of the combo box:

    Control Source
    Row Source
    Column Count
    Column Widths
    Bound Column
    Control Source: Worker
    Row Source: SELECT Worker.ID, Worker.Gender FROM Worker;
    Column Count: 2
    Column Widths: 0";1"
    Bound Column: 1

    Sorry for taking your time Bob. :/

  7. #7
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows 7 32bit Access 2013
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,610
    Try changing the Control Source property to ID
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

  8. #8
    MikicaMika is offline Novice
    Windows 8 Access 2013
    Join Date
    Jan 2016
    Posts
    6
    Quote Originally Posted by Bob Fitz View Post
    Try changing the Control Source property to ID
    Now it doesn't allow me to select anything in combobox. Oh God, I hate this.

    Thank you anyway.

  9. #9
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows 7 32bit Access 2013
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,610
    can you post a copy of your db
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

  10. #10
    MikicaMika is offline Novice
    Windows 8 Access 2013
    Join Date
    Jan 2016
    Posts
    6
    Quote Originally Posted by Bob Fitz View Post
    can you post a copy of your db
    I don't know how to do that.

  11. #11
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows 7 32bit Access 2013
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,610
    To provide db: Make copy, remove confidential data, run compact & repair, zip w/Windows Compression if over 500KB (2MB zip allowed), attach to post. Attachment Manager is below the Advanced post editor window, click Go Advanced below the Quick Reply window.
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

  12. #12
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows 7 32bit Access 2013
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,610
    Attached is an example of what I think you are trying to do
    Attached Files Attached Files
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

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

Similar Threads

  1. Combobox setting other combobox values problem
    By maxmaggot in forum Programming
    Replies: 8
    Last Post: 06-30-2013, 07:18 AM
  2. Replies: 3
    Last Post: 05-16-2013, 08:21 PM
  3. Problem with ComboBox
    By cheyanne in forum Forms
    Replies: 3
    Last Post: 06-05-2012, 05:06 PM
  4. Sorting by combobox problem
    By wsurritte in forum Access
    Replies: 11
    Last Post: 02-28-2011, 02:11 PM
  5. Combobox problem
    By newitsupport in forum Access
    Replies: 1
    Last Post: 09-26-2009, 01:03 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