none
Field combo not refresh RRS feed

  • Question

  • Hello
    I have two fields that open a table of materials I want to be updated after adding materials that did not exist. combo selects a field for code and one for description. After calling to form soda adds items the two fields but only freshens this code not by description.

    the form has a call to another form articles in the event it does is
     
       As String Dim stDocName
        As String Dim stLinkCriteria

        stDocName = "materials"
       
     
       
       DoCmd.OpenForm stDocName
       
     
       

      Me. [DENOMINACIONH] .Requery
     Me. [COD_SUBMATERIAL] .Requery

    this field if cooling [cod_submaterial

    SELECT DISTINCTROW SUBMATERIALES.COD_SUBMATERIAL, MATERIALES.DENOMINACION, SUBMATERIALES.NUMSERIE, MATERIALES.MARCA, MATERIALES.MODELO, SUBMATERIALES.COD_MATERIAL
    Submaterials MATERIALS FROM INNER JOIN ON MATERIALES.COD_MATERIAL = SUBMATERIALES.COD_MATERIAL
    ORDER BY SUBMATERIALES.COD_SUBMATERIAL, SUBMATERIALES.NUMSERIE;

    This does not cool denominacion_h

    SELECT DISTINCTROW MATERIALES.DENOMINACION, SUBMATERIALES.COD_SUBMATERIAL, SUBMATERIALES.NUMSERIE, SUBMATERIALES.COD_MATERIAL, SUBMATERIALES.MARCA, SUBMATERIALES.MODELO
    Submaterials MATERIALS FROM INNER JOIN ON MATERIALES.COD_MATERIAL = SUBMATERIALES.COD_MATERIAL
    ORDER BY SUBMATERIALES.COD_SUBMATERIAL, SUBMATERIALES.NUMSERIE;


    which may be why not refresh for description
    Wednesday, October 14, 2015 8:06 AM

Answers

  • I have solved the problem. but I do not know why I not refresh the two combo boxes have relocated the following code

      Me. [DENOMINACIONH] .Requery
      Me. [COD_SUBMATERIAL] .Requery

    elsewhere in the program and it works perfecttly.

    Thanks for your help

    Friday, October 16, 2015 8:47 AM

All replies

  • Hi javierVFM,

    >> After calling to form soda adds items the two fields but only freshens this code not by description.

    Did you mean one combobox work and another did not?
    With ComboBox.Requery, it updates the data underlying a specified control that’s on the active form. Based on your vba code, I could not find obvious error.

    But I did not understand your sql statement, what did this “Submaterials MATERIALS FROM INNER JOIN ON MATERIALES.COD_MATERIAL =”? There is no table in From statement.

    I suggest you copy your two sql statement, and paste them in query view to check the results.

    Best Regards,

    Edward


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.


    Thursday, October 15, 2015 7:07 AM
  • javierVFM - Due to translation errors, I can't understand everything that you posted, but I think it may work for you if you change your opening of the "materials" form so that it opens in dialog mode.  Instead of this:

        DoCmd.OpenForm stDocName

    Try this:

       DoCmd.OpenForm stDocName, WindowMode:=acDialog


    Dirk Goldgar, MS Access MVP
    Access tips: www.datagnostics.com/tips.html

    Thursday, October 15, 2015 3:39 PM
  • I have solved the problem. but I do not know why I not refresh the two combo boxes have relocated the following code

      Me. [DENOMINACIONH] .Requery
      Me. [COD_SUBMATERIAL] .Requery

    elsewhere in the program and it works perfecttly.

    Thanks for your help

    Friday, October 16, 2015 8:47 AM
  • Hi javierVFM,

    I am glad your issue has been resolved, and I suggest you mark your reply as answer to close this thread.

    Best Regards,

    Edward


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.


    Monday, October 19, 2015 7:38 AM