OK, I'm praying that this can be done...

wrek

Registered User.
Local time
Today, 07:41
Joined
Jun 14, 2001
Messages
88
Hi,

Someone please tell me that variables can be used in SQL statements? Is there any possible way?

Heres the SQL:
SELECT [Equipment Docs 1].EQ_COMPONENT_TAG, ORSUSR_TIDECDRW.DOCUMENT_TYPE, ORSUSR_TIDECDRW.DOCUMENT_SUB_TYPE, ORSUSR_TIDECDRW.DOCUMENT_NBR, ORSUSR_TIDECDRW.DOC_SHEET_NBR, Null AS Action, Null AS [Action Note] INTO [Equipment Docs Temp]
FROM [Equipment Docs 1] INNER JOIN ORSUSR_TIDECDRW ON [Equipment Docs 1].oc = ORSUSR_TIDECDRW.OWNER_CODE_50;

for the INTO clause I want to be able to specify,

INTO [Equipment Docs Temp] & [Forms]![Form - Change Record]![Subform Admin].[Form]![ChangeID];

Is this possible?

(The reason is I have a make table query that runs before a form is open - bound to that temp table. Then after the user inputs/modifies in that form, I run anappend query, appending the changes to the Master table. I want to make sure the above make table query makes a table with a different name every time so two different users dont corrupt each others temp data.)

[This message has been edited by wrek (edited 08-09-2001).]
 
Isn't there a way I can execute SQL statements through VBA?

The Execute method accomplish this?
 
Hi Pat,

I've restructured my queries to reflect what you've suggested - making one Master table, with an additional ID field. That was helpful. Thanks.

One more question though. Should I attach the subforms to the master table (the recordsource, I mean)...or should I make a query pulling out the relevant UserID?
 

Users who are viewing this thread

Back
Top Bottom