473,386 Members | 1,798 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Run-time error '3075'

ahmedtharwat19
Dear all experts:

I have a proplem in this code below



Expand|Select|Wrap|Line Numbers
  1. 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] & """"
  2.  
What the error in that code??!!

I would be crazy
Attached Images
File Type: bmp unleds.bmp (74.0 KB, 211 views)
May 19 '11 #1

✓ answered by NeoPa

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
TheSmileyCoder
2,322 Expert Mod 2GB
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.
May 19 '11 #2
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?
May 19 '11 #3
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.
May 19 '11 #4
My Dear NeoPa

How are you?!!
I miss your experiences.

Thnk you for all. No help for that problem nethir than SQL?
Medo
May 21 '11 #5
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?
May 21 '11 #6
My Dear NeoPa,
No solution included to my problem, your post it`s about SQL solution.
Thank you in advance
(Medo)
May 22 '11 #7
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?
May 22 '11 #8
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)
May 23 '11 #9
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.
May 23 '11 #10
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
Expand|Select|Wrap|Line Numbers
  1. 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] & """"
  2. ....
  3. DoCmd.OpenReport "excelX", acViewPreview, , stLinkCriteria, acDialog
  4.  
I hope my English will be good as soon.

Thank you NeoPa
May 23 '11 #11
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.
May 23 '11 #12

Sign in to post your reply or Sign up for a free account.

Similar topics

1
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...
3
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...
5
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...
0
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...
2
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...
5
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...
1
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...
1
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...
3
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...
3
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...
0
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,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
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...
0
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...
0
BarryA
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
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...
0
marktang
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,...
0
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...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.