Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Access 2003 - Auto Update Query in Form?

Status
Not open for further replies.

njellis

IS-IT--Management
Jul 17, 2006
29
This is my first access database I'm working on, and I've got the hang of things -- but still trying to figure out details to things. So, I apologize if my question seems remedial.

table1: CustomerInfo
table2: Appointments

Query1: CompleteJobs
Query2: IncompleteJobs

Form Src = Customer Info
Subforms for Query 1 and 2 are in the "customer info" Form.


They way it works is there is a tickbox for "Job Complete?". If marked yes, query1 will catch it and list it. If its not marked yes, it'll fall in the list for query2. That all works great. But I would like it to automatically update, without having to change to another record and come back. What I mean is, if I check the "tick" to yes in the "incomplete jobs" list, I would like to to remove from that list, and put it in "completed jobs" right then and there, without me having to click an "update" or anything besides updating the record.

How can I somehow make the query "automatically run" if a record changes in the table its based on? Or is there another better way of doing that?

Thank you very much.
 
You can use code to requery the subforms in the after update event of the check box. The code might look something like:
Code:
   Me.Parent.sfrmComplete.requery
   Me.Parent.sfrmIncomplete.requery

You will need to substitute your subform names.

Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top