Selasa, 22 Mei 2012

RE: [MS_AccessPros] checking results of query

 

I knew there was an obvious answer, my brain just wouldn't supply it -
thanks John!

Sue

-----Original Message-----
From: MS_Access_Professionals@yahoogroups.com
[mailto:MS_Access_Professionals@yahoogroups.com] On Behalf Of John
Viescas
Sent: 22 May 2012 11:43
To: MS_Access_Professionals@yahoogroups.com
Subject: RE: [MS_AccessPros] checking results of query

Sue-

Open the resulting query as a Recordset in code first to see if it
returns any rows?

John Viescas, author
Microsoft Office Access 2010 Inside Out
Microsoft Office Access 2007 Inside Out

Building Microsoft Access Applications

Microsoft Office Access 2003 Inside Out

SQL Queries for Mere Mortals

<http://www.viescas.com/> http://www.viescas.com/

(Paris, France)

From: MS_Access_Professionals@yahoogroups.com
[mailto:MS_Access_Professionals@yahoogroups.com] On Behalf Of Sue Hewson
Sent: Tuesday, May 22, 2012 10:31 AM
To: MS_Access_Professionals@yahoogroups.com
Subject: [MS_AccessPros] checking results of query

Hi all

I have a system which I wrote about 10 years ago - it's a tabbed system
so there are 5 multitab forms, including in each case a query form. The
user can select a number of criteria and can then browse the results in
the normal main tab of the form. They get a message if there are no
results, and the Browse button is greyed out.

The original primary reason for the query in this particular case was to
define a subset of records to mailshot, send CVs to, etc, so it was set
up so that results went into a temporary table so that they could be
refined and deleted if necessary, without affecting the underlying
recordset. Therefore after the querydef changed the query was executed,
giving the (number of) results. I've now changed this so that users have
the option of working directly on the results of the query, in the
recordset - but of course as in this case it's not an action query, I
can't execute it. I just want to be able to continue to give the user a
message if there are no results, but either I'm having a stupid moment
or there is no easy solution! Can anyone help, please?

Sue

[Non-text portions of this message have been removed]

[Non-text portions of this message have been removed]

------------------------------------

Yahoo! Groups Links

__._,_.___
Recent Activity:
.

__,_._,___

Tidak ada komentar:

Posting Komentar