Results 1 to 6 of 6
  1. #1
    Join Date
    Jul 2005
    Posts
    144

    Red face Unanswered: Combobox to show description in another combobox or textbox on a subform

    Hey guys,
    I have this problem thats driving me crazy and now i am starting to have a headache on the right side of my brain. I am new to access but have learned alot from this forum. Let me explain my problem here..

    I have a form with a subform in my database which is used to save partnumbers and serial numbers along with few other fields.

    1 Partnumber Serial Description
    A6198AR USE454555 Computer

    2 Partnumber Serial Description
    A5598AR USE123455 Laptop

    I have managed to make two combo boxes on a main form with fields partnumber and description so if i choose or scan or type partnumber it shows description on the other combo box.

    But my problem is almost every sales order has more than one partnumber which is why i had to move partnumber, serial and description fields to a subform and now when i did that the description field is not showing description. I have also deleted the fields and redid them but they dont work i have the feeling you cant do that in subform?

    What I would like to have is to be able to scan or choose partnumber in a combobox and description should show on text box (description) instead of combo box.

    1 Partnumber Serial Description
    A6198AR USE454555 Computer

    2 Partnumber Serial Description
    A5598AR USE123455 Laptop

    So what do you guys think? is it possible?

    Thanks Alot

  2. #2
    Join Date
    Apr 2004
    Posts
    173
    Sorry if I'm thinking in the wrong direction here, but here goes. The combo box that has the partnumber is based on a recordsource that contains the list of partnumbers - why not also include the descriptions of those parts. Then when a user selects the part number they see the description. Then in the text box near to the partnumber combo box bind it to the following

    =partnumbercombobox.column(2)

    this will pull the description from the combo boxes recordsource for the partnumber selected. Effectively showing the partnumber in the combo box and the description in the text box. Once again sorry if this is off base, but hope it works.

  3. #3
    Join Date
    Aug 2002
    Location
    Melbourne, Australia
    Posts
    111
    I just answered you in another forum, however here is the attachment I posted there.
    Attached Files Attached Files
    Regards,



    John A

  4. #4
    Join Date
    Jul 2005
    Posts
    144

    Cool

    Quote Originally Posted by mmbosman
    Sorry if I'm thinking in the wrong direction here, but here goes. The combo box that has the partnumber is based on a recordsource that contains the list of partnumbers - why not also include the descriptions of those parts. Then when a user selects the part number they see the description. Then in the text box near to the partnumber combo box bind it to the following

    =partnumbercombobox.column(2)

    this will pull the description from the combo boxes recordsource for the partnumber selected. Effectively showing the partnumber in the combo box and the description in the text box. Once again sorry if this is off base, but hope it works.
    Thanks mmbosman and Ansentry, for replying!

    Let me try ansentry's demo and see if that meets to what i am getting at, meanwhile here is my attach database that will tell you more along the lines of what i am taking about.

    I have tried using two comboboxes in a main form and that seems to work fine but i guess for somereason it doesnt work in a subform.
    This is how it is currently i am not pulling data from anytable i just scan them it works but i dont have any description next to the part/serial numbers.
    In the subform i need a field with description that would showup automatically when i scan or chose the partnumber.

    I hope that make sense
    Attached Files Attached Files
    Last edited by ranjah; 07-24-06 at 11:16.

  5. #5
    Join Date
    Jul 2005
    Posts
    144

    Unhappy I hope this makes sense

    Ok guys,
    I am back, sorry it took so long have been busy lately. First of all thanks ancentry for your demo. I have tried adding that in my form and i am seeing some problems which i need help with. I have some fields in the main form which are required and some are not. For some reason after i enter first record and as i move it to another record i get this error mesg stating orders.employeeID is a required field and blah blah blah, so if i change that to not required it worked as i go on it stops on every field that i have required with same error.

    I cant make all fields non required so what should i do??

    One more thing as i am scanning or choosing the partnumber it moves focus/ highlights to description which is connected to partnumber is there anyway i can have it moved to the new field/new entry?

    I am attaching my dbase for you guys to look at it
    Attached Files Attached Files

  6. #6
    Join Date
    Aug 2002
    Location
    Melbourne, Australia
    Posts
    111
    You don't have a "true" main form and subform. Both your main form Add an Order and Details and your subform OrderDetailsSubform both have the table Orders as their source.

    They should be broken up into two tables;

    1> for Orders - (Main Form)
    2> for OrderDetails (SubForm)

    * Order can have Many OrderDetails (1-Many)

    Have a close look at how the sample I post it put together. I notice that when you select a part number it does not fill in the Serial Number. Have a look at my sample and you will see how it works (it's in the code - after update).

    My advice is don't try to continue until you fix your table structure. Also try naming your tables forms etc so they can be identifield e.g tblOrders frmOrders qryOrderDetails rptOroders (NO Spaces) I also name sub forms as sfrmOrderDetails.

    Other users may not agree but it is the way I do it.

    It not much good posting samples if you don't look at them and try and understand how they work.
    Regards,



    John A

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •