recordset findnew - failing only when form is called rather than basic

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • newriver
    New Member
    • May 2010
    • 5

    recordset findnew - failing only when form is called rather than basic

    I have a form that I am creating for an Access 2003 db (I'll call this "addform"). I go the form working as desired and decided to now call it from another form, which I'll call "callingfor m".

    In addform, I do create a recordsetclone and do a Findfirst to get the desired record (I get the name off of a combobox) and fill in two text fields. This works well when I just work with this form directly.

    I then added a button on callingform to open addform. The form comes up, the combo box comes up ok, but on performing the Findfirst, it suddenly fails to find the record (which obviously exist as the combo is based on a Select). Why would it fail when called from another form rather than when operated directly?

    While "addform" will eventually get around to adding a record into a table, it has not gotten that far and the table that is being queried at this point is readonly.

    Thank you,
    David
  • newriver
    New Member
    • May 2010
    • 5

    #2
    Originally posted by newriver
    I have a form that I am creating for an Access 2003 db (I'll call this "addform"). I go the form working as desired and decided to now call it from another form, which I'll call "callingfor m".

    In addform, I do create a recordsetclone and do a Findfirst to get the desired record (I get the name off of a combobox) and fill in two text fields. This works well when I just work with this form directly.

    I then added a button on callingform to open addform. The form comes up, the combo box comes up ok, but on performing the Findfirst, it suddenly fails to find the record (which obviously exist as the combo is based on a Select). Why would it fail when called from another form rather than when operated directly?

    While "addform" will eventually get around to adding a record into a table, it has not gotten that far and the table that is being queried at this point is readonly.

    Thank you,
    David
    I just found the issue. I was using acFormAdd instead of acFormEdit on the OpenForm. Once I changed this parameter, it worked.

    Comment

    Working...