Previous Thread

6/15/2006 12:10:01 PM    Open Query If Condition is Met
I have a database with 3 tables. Each table has an account number field 
 
(account number are 16 digits and in a TEXT format) however the tables are 
 
completely different as are the account numbers that populate them. To go 
 
with the tables are queries that will bring in desired information. What i 
 
would like is for the user to input an account number on a form and have some 
 
code in the background that will find the account number in the table it is 
 
in and open the corresponding query. Is this possible? Thanks for the help. I 
 
have been trying to write code with DLookup but can't seem to get it to do 
 
what I want.



6/15/2006 2:16:00 PM    Re: Open Query If Condition is Met
Todd, 
 
Why do you have the same kind of information in 3 different tables? 
 
-- 
 
Lynn Trapp 
 
MS Access MVP 
 
www.ltcomputerdesigns.com 
 
Access Security: www.ltcomputerdesigns.com/Security.htm 
 
Jeff Conrad's Access Junkie List: 
 
http://home.bendbroadband.com/conradsystems/accessjunkie.html 
 
"Todd" <Todd@discussions.microsoft.com> wrote in message 
 
news:20C02530-C0CB-4ED9-A7AF-63DE319449DB@microsoft.com...

6/15/2006 2:21:43 PM    Re: Open Query If Condition is Met
On Thu, 15 Jun 2006 12:57:01 -0700, Todd 
 
<Todd@discussions.microsoft.com> wrote: 
 
This might be a good case for Subclassing, one of the few instances 
 
where One to One relationships are commonly used. 
 
If you had a table of Disputes, primary key ACCTNUM, with a second 
 
field DisputeType, you could relate it one-to-one to each of these 
 
tables. Your account number search could then home in on just the 
 
desired record; you could base your (say) Cancellation report on a 
 
query joining Disputes to Tbl3. 
 
John W. Vinson[MVP]

6/15/2006 3:49:25 PM    Re: Open Query If Condition is Met
On Thu, 15 Jun 2006 13:59:01 -0700, Todd 
 
<Todd@discussions.microsoft.com> wrote: 
 
I was thinking more that you would have ten queries, one for each 
 
report. They'd all use the same master table but each would use its 
 
own related table for the fields specific for that report. 
 
You would have a separate query on the master table to identify which 
 
type of issue was involved; this could use some VBA code to select the 
 
issue type, and open the appropriate report. 
 
John W. Vinson[MVP]