Re: Test for query results
- From: "CJ" <private@xxxxxxxxxxxxxx>
- Date: Sat, 30 Apr 2005 05:09:00 GMT
Brilliant, got it, thanks very much.
One more related question.
I would like this report to keep the focus and stay in front, but the
message box comes up, you click OK and the switchboard pops in front.
I have tried using the SelectObject function, and also setting the report to
modal (which I do not like).
Any thoughts?
Thanks for your help.
C
"MGFoster" <me@xxxxxxxxxxx> wrote in message
news:I7xce.1277$BE3.1032@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> CJ wrote:
>> Hi everybody:
>>
>> I do not know how to test for results in a query.
>>
>> I have qryExpiry that tests to see if an expiry date has been reached. I
>> would like this query to run at the startup of my database. If there are
>> records, I need a message box to pop up and then clicking on an OK button
>> in the message box would open the rptExpiry but if there are no records
>> in the query recordset then I just want things to continue as normal.
>>
>> How do I go about accomplishing this?
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Create an AutoExec macro that runs a function like the following:
>
> Public Function IsExpired()
>
> If DCount("*","qryExpiry") > 0 Then
> MsgBox "Expiry Records",vbInformation
> DoCmd.OpenReport "rptExpiry"
> End If
>
> End Function
> --
> MGFoster:::mgf00 <at> earthlink <decimal-point> net
> Oakland, CA (USA)
>
> -----BEGIN PGP SIGNATURE-----
> Version: PGP for Personal Privacy 5.0
> Charset: noconv
>
> iQA/AwUBQnKeaYechKqOuFEgEQLUbgCg2D0SzanPEnDY+Af3ropNM+GmVw0AnA5G
> /lV8q391NYRnaIes2bfzSpj6
> =E045
> -----END PGP SIGNATURE-----
.
- Follow-Ups:
- Re: Test for query results
- From: CJ
- Re: Test for query results
- References:
- Test for query results
- From: CJ
- Re: Test for query results
- From: MGFoster
- Test for query results
- Prev by Date: Re: Add autonumber field in query
- Next by Date: Re: Update parent table
- Previous by thread: Re: Test for query results
- Next by thread: Re: Test for query results
- Index(es):