Results 1 to 14 of 14
  1. #1
    4 Star Lounger
    Join Date
    Apr 2001
    Location
    Guatemala City
    Posts
    515
    Thanks
    0
    Thanked 0 Times in 0 Posts

    using a combo box to find a record on a form (Win XP Access 2003)

    I have a form based on a query which uses two tables, tblInsumos and tblUnidadesDeMedida. I want to fill the form with information from this query and then add a few more fields, including one calculated field, and then create a new record in a third table with the information from the form. For example, I want to select an insumo from tblInsumos, then bring over the correct unit price and description to the form. On the form, I will add the quantity and make the multiplication. Then I will create a new record in another table based on the fields in the form.

    I need help on getting the right information to the form.

    I made a combo box based on the table tblInsumos. The data is displayed OK in the combo box., but it does not let me make a selection

    I was looking at the series based on your post 501771 but still can

  2. #2
    5 Star Lounger
    Join Date
    Nov 2004
    Location
    Wilmington, North Carolina, USA
    Posts
    1,196
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: using a combo box to find a record on a form (Win XP Access 2003)

    Could you post an example please?
    ____________________________
    Jeremy
    "If you spend more on coffee than on IT security, then you will be hacked. What's more, you deserve to be hacked." -Richard Clarke

  3. #3
    4 Star Lounger
    Join Date
    Apr 2001
    Location
    Guatemala City
    Posts
    515
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: using a combo box to find a record on a form (Win XP Access 2003)

    OK.

  4. #4
    5 Star Lounger
    Join Date
    Nov 2004
    Location
    Wilmington, North Carolina, USA
    Posts
    1,196
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: using a combo box to find a record on a form (Win XP Access 2003)

    <P ID="edit" class=small>(Edited by NYIntensity on 21-Aug-05 22:47. Added a suggestion)</P>The problem is that your combo box is bound, so it's trying to change the value, instead of search. Right click on the combo box, go to properties, and erase the Control Source. Next, in the after update event past this:

    'Find the record that matches the control.
    Dim rs As Object

    Set rs = Me.Recordset.Clone
    rs.FindFirst "[IDInsumos] = " & Me![Combo32] & ""
    If Not rs.EOF Then Me.Bookmark = rs.Bookmark

    I would also suggest changing the label for your combo box to something like "escoje una orden", and then create another bound control for your ID.
    ____________________________
    Jeremy
    "If you spend more on coffee than on IT security, then you will be hacked. What&#39;s more, you deserve to be hacked." -Richard Clarke

  5. #5
    4 Star Lounger
    Join Date
    Apr 2001
    Location
    Guatemala City
    Posts
    515
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: using a combo box to find a record on a form (Win XP Access 2003)

    Perfect! Thank you.

  6. #6
    4 Star Lounger
    Join Date
    Apr 2001
    Location
    Guatemala City
    Posts
    515
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: using a combo box to find a record on a form (Win XP Access 2003)

    I found a sample DB that seems to do what I am doing, but it uses no code. Could I send it to you so that you could explain the difference? How can I reduce the size to fit your 100k limit?

    If Data Entry is Yes, then my form does not work. The combo box seems to work, but the unit value and unit of measure fields are not brought forward from the found record..

  7. #7
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: using a combo box to find a record on a form (Win XP Access 2003)

    See <post#=401925>post 401925</post#> for instructions on posting a stripped down copy of a database.

  8. #8
    4 Star Lounger
    Join Date
    Apr 2001
    Location
    Guatemala City
    Posts
    515
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: using a combo box to find a record on a form (Win XP Access 2003)

    I would appreciate your comments comparing this DB to the one referenced in post 510619.

  9. #9
    4 Star Lounger
    Join Date
    Apr 2001
    Location
    Guatemala City
    Posts
    515
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: using a combo box to find a record on a form (Win XP Access 2003)

    The form I am referring to is frmPedidosFinal. Sorry.

  10. #10
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: using a combo box to find a record on a form (Win XP Access 2003)

    As far as I can tell, there is no combo box in frmPedidosFinal or its subform that searches for a record (that's what you wanted to do, wasn't it?)
    Can you explain what you mean?

  11. #11
    4 Star Lounger
    Join Date
    Apr 2001
    Location
    Guatemala City
    Posts
    515
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: using a combo box to find a record on a form (Win XP Access 2003)

    Let

  12. #12
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: using a combo box to find a record on a form (Win XP Access 2003)

    I'm afraid I don't inderstand what your form is supposed to do.

  13. #13
    4 Star Lounger
    Join Date
    Apr 2001
    Location
    Guatemala City
    Posts
    515
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: using a combo box to find a record on a form (Win XP Access 2003)

    It is data entry for costing. I look up a material from a table. The table has the unit cost of the material, the description, and the unit of measure. I add the date, where the material will be used, and the quantity, and then write the data to a file where I accumulate the cost information.

  14. #14
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: using a combo box to find a record on a form (Win XP Access 2003)

    Since you are creating a new record in code, I think that your form should be unbound, i.e. the Record Source should be blank, and the controls should not be bound to fields.
    If the form is unbound, the Data Entry property has no meaning, it should be left as No.

Posting Permissions

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