form with multiple queries

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • deepsnow
    New Member
    • Mar 2008
    • 1

    form with multiple queries

    Hi Folks,
    I have one form that 'currently' is populated by 1 query. It is an update form. i need my drop downs in the form to pull all the records from the corresponding tables, so that a complete list may be choosen-from to update the record.

    Is it possible for me to use more than 1 query in the form's properties -Data:Recordsour ce ? I was hoping for an entry like: 'qry1;qry2', but no luck.

    It appears that I may need to remove the qry I have tied to the form and individually assign qry's to the fields? or use subforms inside of the form? -I have not used subforms. What is the access-best-practice solution to this?

    I guess I could assign qry's field by field and write an update routine on the before_update event.

    Any input would be very helpful, thanks in advance for anything you can offer.

    Regrads,

    DE
  • janders468
    Recognized Expert New Member
    • Mar 2008
    • 112

    #2
    You need to tell access how to join those two queries together, if this is possible (i.e. there are fields that can be joined on). Either create a new query that joins the two queries together and set your record source to this query, or go into the design view off your record source and join these two queries. You should then have all of the fields available for your controls.

    Comment

    • Fiddler2
      New Member
      • Mar 2008
      • 19

      #3
      Originally posted by deepsnow
      Hi Folks,
      I have one form that 'currently' is populated by 1 query. It is an update form. i need my drop downs in the form to pull all the records from the corresponding tables, so that a complete list may be choosen-from to update the record.

      Is it possible for me to use more than 1 query in the form's properties -Data:Recordsour ce ? I was hoping for an entry like: 'qry1;qry2', but no luck.

      It appears that I may need to remove the qry I have tied to the form and individually assign qry's to the fields? or use subforms inside of the form? -I have not used subforms. What is the access-best-practice solution to this?

      I guess I could assign qry's field by field and write an update routine on the before_update event.

      Any input would be very helpful, thanks in advance for anything you can offer.

      Regrads,

      DE

      You can reset the recordsource but sometimes Access gets "confused" or there are timing problems or recordlock conflicts.

      After you reset the recordsource, you need to requery the recordset to make it work. This only works if the field names are exactly the same in both record sources. For most applications, this isn't the "normal" way of doing things, however.

      Comment

      Working...