Share via

How do you loop a query in access

Anonymous
2012-08-01T00:26:34+00:00

access

how do you loop a query, that will update automatically as you update the database..

Uzair

Microsoft 365 and Office | Access | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

Answer accepted by question author

Anonymous
2012-08-01T20:00:59+00:00

I don't see why you would need to routinely create new queries. An existing Query will run, using whatever criteria and sorting it contains, whenever it's opened or whenever it's requeried, retrieving whatever data is currently  in its table (or tables). If you base a Form on the query, it will let you add or edit records, and the changes will be displayed on the form. You don't need any programming or functions or contortions to do this - that's just what queries are designed to do.

If you're having some specific problem, please post a specific question, with the SQL view of the query you're using, the steps you're performing, and what result you see (and what you want to see instead).

Was this answer helpful?

1 person found this answer helpful.
0 comments No comments

3 additional answers

Sort by: Most helpful
  1. Anonymous
    2012-08-01T09:22:03+00:00

    i dont know how i will be updating it. I will search how to use forms as a means to update the database. 

    want im aiming for is to use a query over and over again without having to create a new one. What i really need is for this function to happen on a database that will continue be added too.

    Uzair

    Was this answer helpful?

    1 person found this answer helpful.
    0 comments No comments
  2. ScottGem 68,830 Reputation points Volunteer Moderator
    2012-08-01T12:11:48+00:00

    Again, your question is unclear. 

    You loop through recordset. A recordset set could be a table or the results of a query.

    An Update query can update a table based on criteria. The criteria can be dynamic using a parameter prompt or, better yet, a form.

    Maybe if you provided an example of what you need to do we can be more specific.

    Was this answer helpful?

    0 comments No comments
  3. Anonymous
    2012-08-01T01:39:25+00:00

    You'll have to post a clearer question. "Loop a query"? How are you updating the database - via a Form (good) or directly in the table datasheet (much more limited)? What display are you trying to update?

    Was this answer helpful?

    0 comments No comments