Wrox Programmer Forums
|
Access VBA Discuss using VBA for Access programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 19th, 2006, 12:43 PM
Registered User
 
Join Date: Sep 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Query query results?

EVENTS:
1 Query opened selecting "PROCESSED = NO"
2 User checks those that should be "PROCESSED = YES"
3 When query is closed, send email for records that have changed

so...
because the records I want to select are not unique in the table, can I query the query results rather than the table?
 
Old September 20th, 2006, 06:36 AM
Friend of Wrox
 
Join Date: Mar 2004
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default

I am not sure what you want here.

It looks like you are opening a form based ona query where the [Processed] field = No (checkbox).

Then the user puts a check in the [Processed] check box.

Then when the form is closed (On Close event) an email should be triggered emailing someone that records have been changed.

I am not sure about the last question. What is your issue here? If the query only returns [Processed] = No, then you can't use those results.

I would suggest opening the query, and copying the PK's into an array. The PKs in the array all = [Processed] = No. When the form closes, open a recordset on your queried table and, using one connection, but many recordsets, open a query on the main table one PK at a time and check to see if [Processed] now = Yes. If so, package information in a variable for later use in the email. Once the record checking is done, then send the email.

I am sure there are more elegant ways of doing this. So let's see a post so I can keep learning.

Does this help?


mmcdonal





Similar Threads
Thread Thread Starter Forum Replies Last Post
Edit Query Results in Results Grid druid2112 SQL Server 2005 1 June 28th, 2007 08:49 AM
Split Query Results voskoue Access VBA 2 June 1st, 2007 10:08 AM
different results were given for the same query madhusrp SQL Server 2000 2 May 9th, 2006 01:54 AM
Crosstab query with no results edubbelaar Access 0 November 22nd, 2004 06:12 AM
Refresh Query Results Ben Access VBA 2 February 10th, 2004 10:58 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.