[AccessD] searching into a union query...

Dan Waters dwaters at usinternet.com
Sun Apr 1 13:39:40 CDT 2007


This is what I do:

Dim stg as String
Dim rst as DAO.Recordset

stg = "SELECT Title FROM tblName" _
	    & " WHERE Title = '" & txtTitle & "'"
Set rst = Currentdb.Openrecordset(stg,dbopensnapshot)
If rst.EOF = False then
	Msgbox txtTitle & " already exists!"
End if
rst.close
Set rst = nothing


Dan
-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Kostas
Konstantinidis
Sent: Sunday, April 01, 2007 1:20 PM
To: Access Developers discussion and problem solving
Subject: Re: [AccessD] searching into a union query...

Hi Dev,
may be I was not so specific in my previous message.
So, what I want to know is not the duplicates records general
but typing a Title to know if that record there is into the database

thank's
/kostas


----- Original Message ----- 
From: "Dan Waters" <dwaters at usinternet.com>
To: "'Access Developers discussion and problem solving'" 
<accessd at databaseadvisors.com>
Sent: Sunday, April 01, 2007 9:08 PM
Subject: Re: [AccessD] searching into a union query...


> Hi Kostas,
>
> Off the top of my head, there is a wizard in Access to write a 'Look for
> Duplicates' query.  You should be able to run it against this Union query.
>
> HTH,
> Dan
>
> -----Original Message-----
> From: accessd-bounces at databaseadvisors.com
> [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Kostas
> Konstantinidis
> Sent: Sunday, April 01, 2007 12:56 PM
> To: Access Developers discussion and problem solving
> Subject: [AccessD] searching into a union query...
>
> hey group,
> I use the follown union
>
> SELECT [Title], [Year], [IDdirector], [IDcomposer]
> FROM [MT_basic_char]
>
> UNION ALL SELECT [title_collection], [year_collection],
> [IDdirector_collection], [IDcomposer_collection]
> FROM [RT_AM_COLLECTION_SUBFORM];
>
> because of about 15000 records what I need to know is if there is a 
> [Title]
> either in MT_basic_char or in RT_AM_COLLECTION
> I was wondering if it could be possible to make a button, when clicking to
> get back a searching form on that Union Query
> something like the default msaccess's
>
>    Screen.PreviousControl.SetFocus
>    DoCmd.DoMenuItem acFormBar, acEditMenu, 10, , acMenuVer70
>
> but on that specific Union Query
>
> many thank's
> /kostas
>
>
> -- 
> 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
>
> 


-- 
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