I'm really new to SQL, and has a very basic question that need the experts help here.
I'm trying to pass a user input variable from a unbound input box in a form in MSAccess to run a pass-through
query running MS-SQL7. But it looks like there is no way to pass the variable. Below is the simple SQL code for the Pass-thourgh query:
SELECT ArchiveCDTable.ArchiveCDNo,
ArchiveCDTable.DirectoryAndFile
FROM ArchiveCDTable
WHERE ArchiveCDTable.DirectoryAndFile Like '%"&[ArchiveCDTable.DirectoryAndFile]&"%'
ORDER BY ArchiveCDTable.ArchiveCDNo, ArchiveCDTable.DirectoryAndFile
I have search the Internet and it appears that you can't run the Pass-through query this way since with Pass-through query, MSAccess will send this literal commands directly to the server and it will not understand the parameter calls. So what is the simple way to tackle this?
Thanks in advance for any ideas.
I'm trying to pass a user input variable from a unbound input box in a form in MSAccess to run a pass-through
query running MS-SQL7. But it looks like there is no way to pass the variable. Below is the simple SQL code for the Pass-thourgh query:
SELECT ArchiveCDTable.ArchiveCDNo,
ArchiveCDTable.DirectoryAndFile
FROM ArchiveCDTable
WHERE ArchiveCDTable.DirectoryAndFile Like '%"&[ArchiveCDTable.DirectoryAndFile]&"%'
ORDER BY ArchiveCDTable.ArchiveCDNo, ArchiveCDTable.DirectoryAndFile
I have search the Internet and it appears that you can't run the Pass-through query this way since with Pass-through query, MSAccess will send this literal commands directly to the server and it will not understand the parameter calls. So what is the simple way to tackle this?
Thanks in advance for any ideas.