Dear all experts:
I have a proplem in this code below - stLinkCriteria = " [CID] = " & [Forms]![Witherdraw_clint_item]![Combo0] & " And " & " [IID] = " & [Forms]![Witherdraw_clint_item]![Combo4] & " And" & " [mo]" & " = Between """ & Forms![Witherdraw_clint_item]![Combo10] & """ And """ & Forms![Witherdraw_clint_item]![Combo12] & """"
-
What the error in that code??!!
I would be crazy
Between should not be used with the '=' sign.
NB. When asking for help with a SQL issue please post the SQL you are asking for help with. Posting the VBA code that should result in the SQL is not very helpful and is not likely to result in quick help for you (It irritates the experts to see this).
PS. Although my suggestion above will fix the syntax of your SQL (so no more error message), it will do nothing for the logic of it. It seems clear that the logic is flawed and you will need to look at that as a separate issue. If you want help with this, be sure to post the relevant supporting info about exactly what you are trying to do and also the details of the data (Fields etc) you're working with.
11 1369
Your trying to use BETWEEN on text strings (Atleast that is how Access will see it, since you enclosed it in quotes. You need to treat them like dates and use teh proper delimiter, see http://bytes.com/topic/access/insigh...eir-delimiters for more information.
Try to replace your quotes by #, and see if that works. Im not sure you can do it without including the day value as well, but you can try.
Dear TheSmileyCoder ,
"Try to replace your quotes by # "
I Know that when i use dates but it`s a date in text field.
Do you Know the broblem if I think in "and" in BETWEEN the code can leave it.
In photo the result value is true but he can run it because "BETWEEN" statment . What can I do?
NeoPa 32,556
Expert Mod 16PB Between should not be used with the '=' sign.
NB. When asking for help with a SQL issue please post the SQL you are asking for help with. Posting the VBA code that should result in the SQL is not very helpful and is not likely to result in quick help for you (It irritates the experts to see this).
PS. Although my suggestion above will fix the syntax of your SQL (so no more error message), it will do nothing for the logic of it. It seems clear that the logic is flawed and you will need to look at that as a separate issue. If you want help with this, be sure to post the relevant supporting info about exactly what you are trying to do and also the details of the data (Fields etc) you're working with.
My Dear NeoPa
How are you?!!
I miss your experiences.
Thnk you for all. No help for that problem nethir than SQL?
Medo
NeoPa 32,556
Expert Mod 16PB
Medo,
Hello. I'm fine thank you. I hope you are too.
I'm curious about your message though. Did you see the start of my post where I included the solution to your problem?
My Dear NeoPa,
No solution included to my problem, your post it`s about SQL solution.
Thank you in advance
(Medo)
NeoPa 32,556
Expert Mod 16PB Medo:
No solution included to my problem, your post it's about SQL solution.
Of course it's a SQL solution. It's a SQL problem. Do you not see the Error Message?
NeoPa
It's a SQL problem. Do you not see the Error Message?
I Know the SQl solution .
But I research in another solution not via SQL.
Thank you NeoPa
your friend ( Medo)
NeoPa 32,556
Expert Mod 16PB
We are clearly having a communication problem. I understand that you're working in a language (English) which is not your first language, and you are doing better than I could in another language. Nevertheless I don't really understand what you're saying about other problems. I only know the problem you originally asked for help with (which is the only problem we can deal with in this thread).
Never mind. I can only say that's all I can help with. I'm sorry if you were looking for something else, but I struggle to comprehend what you mean beyond that.
Maybe (and I'm guessing a bit here) it's another problem you want help with. If so, you can post that in a new thread.
We are clearly having a communication problem.
I`m Sorry for my bad English Between should not be used with the '=' sign.
It`s working now just i remove " =" sign.
This code after update - stLinkCriteria = " [CID] = " & [Forms]![Witherdraw_clint_item]![Combo0] & " And " & " [IID] = " & [Forms]![Witherdraw_clint_item]![Combo4] & " And" & " [mo]" & " Between """ & Forms![Witherdraw_clint_item]![Combo10] & """ And """ & Forms![Witherdraw_clint_item]![Combo12] & """"
-
....
-
DoCmd.OpenReport "excelX", acViewPreview, , stLinkCriteria, acDialog
-
I hope my English will be good as soon.
Thank you NeoPa NeoPa 32,556
Expert Mod 16PB
Not a problem Medo :-)
You have no need to apologise for not being fluent in English. I know I would struggle to make myself clear in any other language.
Sign in to post your reply or Sign up for a free account.
Similar topics
by: JMCN |
last post by:
I have an ftp program that i inherited and i tried to modify it to ftp
over my file however, i receive an error message :
run-time error '3075
syntax error (missing operator) in query expression...
|
by: william |
last post by:
Hello Everyone,
I'm using Access 2000. I entered the following code to do some data
validation, however it is not working. I'm trying to ensure that the
user cannot enter a duplicate inspection...
|
by: Jozef |
last post by:
I have an MDE file that is blowing up with "Error 3075 Function Not
Available", which is normally a reference issue, but, I have no missing
references.
It seems that offending function is a...
|
by: j.rogel |
last post by:
Hello everyone! I am new to this sort of postings so I'm not even sure
if this is the correct place to start. Anyway, I would realy
appreciate any help. I have a some VBA code that works quite...
|
by: jr |
last post by:
Hello everyone! I am new to this sort of postings so I'm not even
sure
if this is the correct place to start. Anyway, I would realy
appreciate any help. I have a some VBA code that works quite...
|
by: MARTINQC |
last post by:
"SELECT ., .Category
INTO tblSiteGroupActiveTicketRawData FROM .Base = 'AAAA') OR (.Base = 'BBBB')) AND (.Status != 'Closed');"
Above SQL string fails with a runtime error 3075 syntax error...
|
by: BinduKatoch |
last post by:
One of the entries in my database has "apostrophe"
I have a form in access... When i try to select that entry from the table it gives me error "syntax error(missing expression) in query...
|
by: kickergirl |
last post by:
I recently created a database in Access 2000 that has been distributed to multiple people using various versions of Access. Each person is using it as a standalone database.
The database has...
|
by: adigga1 |
last post by:
Hello Experts,
I'm about to go grey with this dlookup statement:
I'm trying to run a dlookup statement, I have the correct expression string, etc. but when I run it under the Immediate window...
|
by: timber910 |
last post by:
Hello All,
I'm in need of help here. I have build my query in a query builder in access as a select query. Query runs fine. Changed it to a make table query. Query makes table ok. Copy and pasted...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
| |