ADODB Connection String in the same Database

Agom008

Registered User.
Local time
Tomorrow, 04:19
Joined
Aug 29, 2014
Messages
27
Hi all,

I was wondering how I can connect a query and table with no common ID using the ADODB connect string?

Both are on the same database.
 
You can't. No matter how you connect, without a join you get a Cartesian product coving all possible combinations of the records from the table and query.

The Connect string isn't a substitute for a join.
 
okay, thanks for your reply... how would I go about getting my result? Can I add the same key into query as in table as FK?
 
Could you explain exactly what the tables are and what you want to get back in your query.
 
Hi,

So I have a table called Inputs and a Query called Date Due.

I want to use all the fields in both of the above and in a new query called TotalCalc use this iif statement which takes the fields from the query and table above:

Code:
[SIZE=3][FONT=Calibri]IIF([DateDue]>=[Future],[String_Future],IIF([DateDue]>=[Future],[String_Future],IIF([DateDue]>=[CurrentMonth],[String_CurrentMonth],IIF([DateDue]>=[DueLastMonth],[String_LastMonth],IIF([DateDue]>=[DuePriorMonth],[String_PriorMonth],[String_Older])))))[/FONT][/SIZE]

Inputs has a PK Inputs_ID and I have added Inputs_ID into Date Due and have created a relationship on that ID.
 
What fields are in table INPUTS?
What is the query "Due Date"?Can you show readers the SQL view of the query?
 
Hi jdraw,

So in Date Due Query this is SQL View: SELECT [Calculated Due Date].CalDate, [Calculated Due Date].Date
FROM [Calculated Due Date];


And in Inputs the fields are, Future, Current Month, Due Last Month, Due Prior Month, Older, String_Current, String_LastMonth, String_LastMonth, String_PriorMonth and String_Older
 
hey, so I found out what the reason was I couldn't use the table with query...because of the PK it didn't exsist. Now I get "enter parameter value"...any idea how to fix this? This is the reason for it:
Code:
TotalValue: IIf([DateDue]>=[Future],[String_Future],IIf([DateDue]>=[Future],[String_Future],IIf([DateDue]>=[CurrentMonth],[String_CurrentMonth],IIf([DateDue]>=[DueLastMonth],[String_LastMonth],IIf([DateDue]>=[DuePriorMonth],[String_PriorMonth],[String_Older])))))
 

Users who are viewing this thread

Back
Top Bottom