General discussion

  • Creator
    Topic
  • #2131177

    Access 97

    Locked

    by s.gibb ·

    I am trying to populate a series of form controls using a Query. However, when I run the form i get the #Name? Error message. I belive this to be as a result ofhte control being unable to see the query. The query has been tested and works perfectly.the path I am using to access the field in the form is =[GetCompanyDetails]![CustomerCompanyName] where GetComapnyDetails is the name of the query and CustomerCompanyName is the field i want to place in the form control! Any advice would be gratek appreiciated!!!

    Regards

    Stephen

All Comments

  • Author
    Replies
    • #3568446

      Access 97

      by sl-campbell ·

      In reply to Access 97

      You are trying to assign the controlsource to something that doesn’t exist. You need to set the Form’s datasource to the query and then assign the control’s controlsource to the field that you want – this is then the bound mode. Set the form’s datasource to GetComapnyDetails and the control’s(textbox?) controlsource to CustomerCompanyName.

      If you want the controls to have unbound mode then you need to create a recordset object in code, say on the form load event, and then assign each control’s value property on the form to a field in the current record each time the recordset is repositioned.

      • #3568507

        Access 97

        by s.gibb ·

        In reply to Access 97

        ALOT OF SHITE

    • #3568506

      Access 97

      by s.gibb ·

      In reply to Access 97

      This question was closed by the author

Viewing 1 reply thread