locked
Access issue with form RRS feed

  • Question

  • I have a form that I just created. I copied some functions over from another form and edited them to match the new form. This form has a sub form that displays data from a table. When you press the select button, the data from the subform where the cursor is, is filled into editable field on the main form.

    When the form is first opened, I call clear() function to set the Me.variables = "" (each one in turn). The clear function also dies a requery of the subform data.

    When the form first opens. Everything works. I select data and it fills the fields on the main form. If I press clear again, the data is removed from the fields. If I press the Select button again, assuming that it will load the data from the subform first row where the cursor is, I get an error. (This works fine when the form is first opened) If I click on another row and then back to the first row, all of a sudden it loads again. I do not understand this because I have a similar form and subform in this same database that function just fine.

    Larry

    Sunday, February 21, 2016 5:25 PM

Answers

  • When the form first opens. Everything works. I select data and it fills the fields on the main form. If I press clear again, the data is removed from the fields. If I press the Select button again, assuming that it will load the data from the subform first row where the cursor is, I get an error. (This works fine when the form is first opened) If I click on another row and then back to the first row, all of a sudden it loads again. I do not understand this because I have a similar form and subform in this same database that function just fine.

    Hi Larry,

    I do not know what kind of error you get, but according to your descrition I think of a focus problem of the subform, after pressing the Clear or Select button.

    You could try to set the focus to the subform control in the OnClick event of the Select button.

    Imb.

    Sunday, February 21, 2016 7:04 PM

All replies

  • When the form first opens. Everything works. I select data and it fills the fields on the main form. If I press clear again, the data is removed from the fields. If I press the Select button again, assuming that it will load the data from the subform first row where the cursor is, I get an error. (This works fine when the form is first opened) If I click on another row and then back to the first row, all of a sudden it loads again. I do not understand this because I have a similar form and subform in this same database that function just fine.

    Hi Larry,

    I do not know what kind of error you get, but according to your descrition I think of a focus problem of the subform, after pressing the Clear or Select button.

    You could try to set the focus to the subform control in the OnClick event of the Select button.

    Imb.

    Sunday, February 21, 2016 7:04 PM
  • my guess is that because you mention that you started with a copied form (that works) - that although you think you altered all the parameters for the new form identity that there is some aspect that has been over looked.

    it would be difficult to troubleshoot via forum, but as Imb notes - state specifically which error is being thrown and exactly when may help.

    Monday, February 22, 2016 3:03 PM