[AccessD] Multiple Table Search Was => RE: [AccessD] Query giving different results each time

Mitsules, Mark S. (Newport News) Mark.Mitsules at ngc.com
Tue Jul 27 07:18:12 CDT 2004


Thanks Drew.  Meetings seem to be taking over my day so I will get back to
you ASAP with any feedback.

Mark



-----Original Message-----
From: DWUTKA at marlow.com [mailto:DWUTKA at marlow.com] 
Sent: Monday, July 26, 2004 6:05 PM
To: accessd at databaseadvisors.com
Subject: RE: [AccessD] Query giving different results each time


Okay, here ya go.  I built this into a form, because it uses a lot of
'techniques' to get things done. (Class modules, collections, callback
functions (for the list box)), along with all of the associated properties
that need to be set to get things done.  So instead of trying to explain how
to build the form, I'm just posting a link to download it.  Right now, my
DSL is down (in case anyone wondered why the archives on my site weren't
there.....), it will be back up Thursday...so within a few days of that, I
will try to remember to put this file on my website.
(http://www.wolfwares.com)

Until then, I put it on my company's website, for download.

http://www.marlow.com/FindAllData.zip

The zipped database has a form, query, and class module.  Just import all
three into whatever database you want.  Open the form, enter the search
criteria, and click the button.  All applicable hits will be displayed in
the listbox.  You can then double click the listbox to display either the
particular record (if a primary key for that table exists), or for all of
the results off of that table.

Boy, that was actually fun to build!

Drew

FYI:  This code only searches for text, in text and memo fields.  It also
automatically puts astericks around the search criteria, so if you want to
put astericks inside the criteria, go ahead, but they're not necessary on
the outside.  If you want to search number fields, the code could be
modified to do that.  Actually, if there is enough of a request for it, I
could modify the search form to have different search boxes (text, currency,
date/time, etc).  Finally, and this is IMPORTANT, the code uses ADO.  The
sample I built is in 97, which has DAO set by default, but if you use A2k,
make sure you have DAO selected.

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com]On Behalf Of Mark A Matte
Sent: Monday, July 26, 2004 2:35 PM
To: accessd at databaseadvisors.com
Subject: [AccessD] Query giving different results each time


Hello All,

In A97 I am running a local query...I couldn't get the results I wanted...so

I kept treaking my criteria...but then I realized...that if I didn'tchange 
anything...I would get slightly different results...each time I ran it.  It 
would omit 1-5 rows...but not the same ones.

Desperately confused...any insight?

Thanks,

Mark A. Matte

SQL:

SELECT tblPRS_Pending_PHONE.case_id, tblPRS_Pending_PHONE.profile_cm_seq, 
tblPRS_Pending_PHONE.effdt, tblPRS_Pending_PHONE.bo_id, 
tblPRS_Pending_PHONE.primary_ind, tblPRS_Pending_PHONE.phone
FROM tblPRS_Pending_PHONE
WHERE (((tblPRS_Pending_PHONE.effdt)=(SELECT Max(A.effdt) AS MaxOfeffdt
FROM tblPRS_Pending_PHONE A
WHERE  tblPRS_Pending_PHONE.bo_id =  A.bo_id;)) AND 
((tblPRS_Pending_PHONE.primary_ind)="y"));

_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today - it's FREE! 
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/

-- 
_______________________________________________
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com
-- 
_______________________________________________
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com



More information about the AccessD mailing list