Re: RE: How to let a query omit the search key sometimes
From: [MVP] S.Clark (Steve.Clark_NOSPAM_at_FMSInc.com)
Date: 02/11/04
- Next message: [MVP] S.Clark: "Re: Show check box missing"
- Previous message: Damonj: "Delete Duplicate Records???"
- In reply to: Jeff: "Q=9B=9E=E8=A6=86:_RE:_How_to_let_a_query_omit_?= the search key sometimes"
- Next in thread: Jeff: "Q=9B=9E=E8=A6=86:_Re:_RE:_How_to_let_a_query_o?= mit the search key sometimes"
- Reply: Jeff: "Q=9B=9E=E8=A6=86:_Re:_RE:_How_to_let_a_query_o?= mit the search key sometimes"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 11 Feb 2004 10:59:48 -0500
You can use a DCount() to test the number of records, prior to opening the
form.
-- HTH, Steve Clark, Access MVP FMS, Inc. Professional Solutions Group http://www.FMSInc.com -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Is your Access database too slow? Are you ready to upgrade to SQL Server? Contact us for optimization and/or upsizing! http://www.FMSInc.com/consulting -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- "Jeff" <anonymous@discussions.microsoft.com> wrote in message news:66418AEE-C747-4AF1-A26A-F24AF5C356FC@microsoft.com... > Thank you, Steve. I've solved my first problem. The method I use is I build a Query object and set a criterion for searching. I have a query form with a ComboBox to put in my key. As I press a CmdButton to start searching, another result form that uses the Query object as data source is opened. John Vinson tells me to use Forms!formname!comboname OR Forms!formname!comboname IS NULL as my criterion and it works. > Now I am still working on my second problem. When no record is found, the result form is opened incompletely, that is, only a PLAIN blank form without any label or textbox is opened and the program is down. I am trying to execute the Query object first, if no record is found then show a message, cancel sub and exit. If some records are found then open the result form. I still need help.
- Next message: [MVP] S.Clark: "Re: Show check box missing"
- Previous message: Damonj: "Delete Duplicate Records???"
- In reply to: Jeff: "Q=9B=9E=E8=A6=86:_RE:_How_to_let_a_query_omit_?= the search key sometimes"
- Next in thread: Jeff: "Q=9B=9E=E8=A6=86:_Re:_RE:_How_to_let_a_query_o?= mit the search key sometimes"
- Reply: Jeff: "Q=9B=9E=E8=A6=86:_Re:_RE:_How_to_let_a_query_o?= mit the search key sometimes"
- Messages sorted by: [ date ] [ thread ]