|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Hi...I keep getting a .."syntax error near '!' "...on the following statement at the first 'forms!' statement. Can anyone spot the problem?
WHERE (((tblApHistDetail.PartId) Between Forms!frmBSSImPrintChildExpenses.ChildFrom And Forms!frmBSSImPrintChildExpenses.ChildThru) AND ((tblApHistDetail.GLAcct) Between Forms!frmBSSImPrintChildExpenses.GLFrom And Forms!frmBSSImPrintChildExpenses.GLThru) AND ((tblApHistHeader.InvoiceDate) Between Forms!frmBSSImPrintChildExpenses.DateFrom And Forms!frmBSSImPrintChildExpenses.DateThru)) Your help is appreciated ! Last edited by flaminstar : March 4th, 2004 at 07:02 PM. |
|
#2
|
|||
|
|||
|
not sure but I think you cann't have an ! in your query
try to replace them with something else then run the query |
|
#3
|
|||
|
|||
|
I replaced the '!' with a '.' and that seems to have worked. I don't understand why it doesn't work with the '!'...it should. I have another query with a similar command, although it is giving me a different error msg than the other query...it doesn't seem to matter whether it has an '!' or a '.' in the command stream. Should the command not work the same in both queries? Or am I missing something?
Thanks for your help ! |
|
#4
|
|||
|
|||
|
not sure about this but when you're in a form and you want to query a table you need the !
but when you're in queries, the . will always work. |
|
#5
|
|||
|
|||
|
Here's the error msgs I'm getting now on this query...I've attached the actual query in a .txt file (probably easier to read that way). I'm sure I'm missing something really simple ...
Server: Msg 107, Level 16, State 2, Line 1 The column prefix 'Forms.frmImPrintPmtAdvice' does not match with a table name or alias name used in the query. Server: Msg 107, Level 16, State 1, Line 1 The column prefix 'Forms.frmImPrintPmtAdvice' does not match with a table name or alias name used in the query. Server: Msg 107, Level 16, State 1, Line 1 The column prefix 'Forms.frmImPrintPmtAdvice' does not match with a table name or alias name used in the query. Server: Msg 107, Level 16, State 1, Line 1 The column prefix 'Forms.frmImPrintPmtAdvice' does not match with a table name or alias name used in the query Thanks again |
|
#6
|
|||
|
|||
|
try to re-putting the ! in the query to test it
|
|
#8
|
|||
|
|||
|
I did try putting the '!' back in and got a syntax error. This is a stored procedure I'm trying to create.
|
|
#9
|
|||
|
|||
|
a SP? but what are 'Forms.frmImPrintPmtAdvice' ? parameter you get from your form?
|
|
#10
|
|||
|
|||
|
I have a form called 'frmImPrintPmtAdvice' ...in this form are the fields...CheckFrom, CheckThru,CheckDate,PayFrom and PayThru ..
(See the Where statement appended earlier) |
|
#11
|
|||
|
|||
|
I think you can drop the Forms. in your
Forms.frmImPrintPmtAdvice.CheckFrom |
|
#12
|
|||
|
|||
|
OK...I just tried that...removing 'Forms' from the statement..
I get the similar error ... "The column prefix 'frmImPrintPmtAdvice' does not match with a table name or alias name used in the query." |
|
#13
|
|||
|
|||
|
what ever happen? I have no more idea, but I'm curious to what ever you've solve your problem...give me some news
|
|
#14
|
|||
|
|||
|
Hi...I have not solved the problem yet...still working on it. I have been unable as of yet to get anything to work. I have 2 SP's where this works fine ...and these last 2 that give me the same error described in my last post.
Last edited by flaminstar : April 1st, 2004 at 01:02 PM. |
![]() |
| Viewing: Dev Shed Forums > Databases > MS SQL Development > Syntax question |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|