S
Steven
I have a table in my db that the user named 'user' has no
permissions. I have created an Append Query with Owners
Permssions. When I log in as 'user' and run the query it
updates the table fine. My problem is this.
I can never run a command like this DoCmd.RunSQL :
DoCmd.RunSQL "INSERT INTO Batch05 SELECT Batch05Import.*
FROM Batch05Import WITH OWNERACCESS OPTION;"
Because I will get an error saying that the user does not
have permission....but it works ok with a query built in
the query tab design and setting the permission to owner.
I have Batch01 through Batch10 and do not want to create a
query for each one. Plus the same problem would happen
for Update / Delete etc. The queries built in the query
tab design will become too numerous and cumbersome.
Either how can I:
1). Do this DoCmd.RunSQL "INSERT INTO Batch05 SELECT
Batch05Import.* FROM Batch05Import WITH OWNERACCESS
OPTION;" and make it work on this command even though the
user does not have permission.
OR
2).
Dim CurrentBatch, CurrentBatchImport as String
CurrentBatch = "Batch05"
CurrentBatchImport = "Batch05Import"
AND
Setup the CurrentBatch variable in the tab query design
sql view. For example in this example I would get
normally in the SQL View on the Query Design:
INSERT INTO Batch05 SELECT Batch05Import.* FROM
Batch05Import WITH OWNERACCESS OPTION;
....How can I use CurrentBatch in that SQL VIEW so I can
pass the name of differnt files...Its does not work like a
normal string or concatenation. Can this be done.
Thank you for your help.
Steven.
permissions. I have created an Append Query with Owners
Permssions. When I log in as 'user' and run the query it
updates the table fine. My problem is this.
I can never run a command like this DoCmd.RunSQL :
DoCmd.RunSQL "INSERT INTO Batch05 SELECT Batch05Import.*
FROM Batch05Import WITH OWNERACCESS OPTION;"
Because I will get an error saying that the user does not
have permission....but it works ok with a query built in
the query tab design and setting the permission to owner.
I have Batch01 through Batch10 and do not want to create a
query for each one. Plus the same problem would happen
for Update / Delete etc. The queries built in the query
tab design will become too numerous and cumbersome.
Either how can I:
1). Do this DoCmd.RunSQL "INSERT INTO Batch05 SELECT
Batch05Import.* FROM Batch05Import WITH OWNERACCESS
OPTION;" and make it work on this command even though the
user does not have permission.
OR
2).
Dim CurrentBatch, CurrentBatchImport as String
CurrentBatch = "Batch05"
CurrentBatchImport = "Batch05Import"
AND
Setup the CurrentBatch variable in the tab query design
sql view. For example in this example I would get
normally in the SQL View on the Query Design:
INSERT INTO Batch05 SELECT Batch05Import.* FROM
Batch05Import WITH OWNERACCESS OPTION;
....How can I use CurrentBatch in that SQL VIEW so I can
pass the name of differnt files...Its does not work like a
normal string or concatenation. Can this be done.
Thank you for your help.
Steven.