If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Use query name in Open recordset statement
Hi all,
I have a database that I created which contained all the objects, including the tabels. I then split the tables out into a back end database and we enabled user level security. I have a statement in both databases that looks like this: rstClients.Open "EmailReminderMedicalVisit", , adOpenKeyset, adLockPessimistic "EmailReminderMedicalVisit" is the name of a query . In the non-split, no security database this works fine. In the split, secured database, I get an error suggesting that Access excepts to see an actual SQL statment as opposed to the name of a query. In other words, Access isn't letting me put a query name there. I know it can be done because it was working in the non-split database. I checked all my library references in both databases and they identical. I know I'm missing something. Does anyone know what may be driving this? Thank you very much, Debbie |
#2
|
|||
|
|||
Use query name in Open recordset statement
Post the exact error message. Open accepts(expects) either.
-- Steve Clark, Access MVP http://www.fmsinc.com/consulting *FREE* Access Tips: http://www.fmsinc.com/free/tips.html "Debbie" wrote in message ... Hi all, I have a database that I created which contained all the objects, including the tabels. I then split the tables out into a back end database and we enabled user level security. I have a statement in both databases that looks like this: rstClients.Open "EmailReminderMedicalVisit", , adOpenKeyset, adLockPessimistic "EmailReminderMedicalVisit" is the name of a query . In the non-split, no security database this works fine. In the split, secured database, I get an error suggesting that Access excepts to see an actual SQL statment as opposed to the name of a query. In other words, Access isn't letting me put a query name there. I know it can be done because it was working in the non-split database. I checked all my library references in both databases and they identical. I know I'm missing something. Does anyone know what may be driving this? Thank you very much, Debbie |
#3
|
|||
|
|||
Use query name in Open recordset statement
Hello,
Sorry for the delay in responded - The message I get is : Runtime error '-2147217900 (80040e14'): Invalid SQL Statement; expected 'DELETE', 'INSERT', 'PROCEDURE','SELECT', or 'UPDATE' If I put the actual SQL statement in, it works. I'm stumped. Thanks for your input. Debbie "Debbie" wrote: Hi all, I have a database that I created which contained all the objects, including the tabels. I then split the tables out into a back end database and we enabled user level security. I have a statement in both databases that looks like this: rstClients.Open "EmailReminderMedicalVisit", , adOpenKeyset, adLockPessimistic "EmailReminderMedicalVisit" is the name of a query . In the non-split, no security database this works fine. In the split, secured database, I get an error suggesting that Access excepts to see an actual SQL statment as opposed to the name of a query. In other words, Access isn't letting me put a query name there. I know it can be done because it was working in the non-split database. I checked all my library references in both databases and they identical. I know I'm missing something. Does anyone know what may be driving this? Thank you very much, Debbie |
#4
|
|||
|
|||
Use query name in Open recordset statement
adCmdText
adCmdTable are the constants used to specify whether the value you are passing is a Table or SQL String rst.Open "tablename", Options:=adcmdTable -- Steve Clark, Access MVP http://www.fmsinc.com/consulting *FREE* Access Tips: http://www.fmsinc.com/free/tips.html "Debbie" wrote in message ... Hello, Sorry for the delay in responded - The message I get is : Runtime error '-2147217900 (80040e14'): Invalid SQL Statement; expected 'DELETE', 'INSERT', 'PROCEDURE','SELECT', or 'UPDATE' If I put the actual SQL statement in, it works. I'm stumped. Thanks for your input. Debbie "Debbie" wrote: Hi all, I have a database that I created which contained all the objects, including the tabels. I then split the tables out into a back end database and we enabled user level security. I have a statement in both databases that looks like this: rstClients.Open "EmailReminderMedicalVisit", , adOpenKeyset, adLockPessimistic "EmailReminderMedicalVisit" is the name of a query . In the non-split, no security database this works fine. In the split, secured database, I get an error suggesting that Access excepts to see an actual SQL statment as opposed to the name of a query. In other words, Access isn't letting me put a query name there. I know it can be done because it was working in the non-split database. I checked all my library references in both databases and they identical. I know I'm missing something. Does anyone know what may be driving this? Thank you very much, Debbie |
#5
|
|||
|
|||
Use query name in Open recordset statement
Steve,
I tried all the options and either got the same message or I got: "Microsoft Access cannot find the input table/query EmailReminderMedicalVisit. Make sure it is spelled correctly or it exists" I don't understand, it worked fine before I split the database and put the security on. Any other ideas? Thanks, Debbie "[MVP] S.Clark" wrote: adCmdText adCmdTable are the constants used to specify whether the value you are passing is a Table or SQL String rst.Open "tablename", Options:=adcmdTable -- Steve Clark, Access MVP http://www.fmsinc.com/consulting *FREE* Access Tips: http://www.fmsinc.com/free/tips.html "Debbie" wrote in message ... Hello, Sorry for the delay in responded - The message I get is : Runtime error '-2147217900 (80040e14'): Invalid SQL Statement; expected 'DELETE', 'INSERT', 'PROCEDURE','SELECT', or 'UPDATE' If I put the actual SQL statement in, it works. I'm stumped. Thanks for your input. Debbie "Debbie" wrote: Hi all, I have a database that I created which contained all the objects, including the tabels. I then split the tables out into a back end database and we enabled user level security. I have a statement in both databases that looks like this: rstClients.Open "EmailReminderMedicalVisit", , adOpenKeyset, adLockPessimistic "EmailReminderMedicalVisit" is the name of a query . In the non-split, no security database this works fine. In the split, secured database, I get an error suggesting that Access excepts to see an actual SQL statment as opposed to the name of a query. In other words, Access isn't letting me put a query name there. I know it can be done because it was working in the non-split database. I checked all my library references in both databases and they identical. I know I'm missing something. Does anyone know what may be driving this? Thank you very much, Debbie |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Parameter thru Form Dialog Box for REPORT | Sandy | Setting Up & Running Reports | 16 | January 10th, 2006 10:06 AM |
Toolbars, Drop-Down Menus | Rick | New Users | 1 | September 21st, 2005 11:17 AM |
Here's a shocker | Mike Labosh | General Discussion | 2 | October 26th, 2004 05:04 PM |
Big number gives error! | Sara Mellen | Running & Setting Up Queries | 8 | October 11th, 2004 02:48 AM |
Display Parameter from Form on Report | sara | Setting Up & Running Reports | 10 | July 19th, 2004 04:54 PM |