473,322 Members | 1,522 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,322 software developers and data experts.

Run-time error 3075 syntax error (missing operator) open on double click from listbox

10 Byte
Hello,
My goal is to open a specific record from a list box to populate a different form with that specific data that was double clicked on. My column name is Claim ID 15 on the list box and in the master table that contains all data. This column contains values such as C123456789. On the Master table, Claim ID 15's data type is short text. When I double click on the row in the list box it gives me the following error: Run-time error '3075': syntax error (missing operator)in query expression '[Claim_ID_15=C123456789'.

Expand|Select|Wrap|Line Numbers
  1. Private Sub SearchList_DblClick(Cancel As Integer)
  2.     DoCmd.OpenForm "profileForm", , , "Claim ID 15=" & SearchList
  3.  
  4. End Sub
  5.  
  6.  
I have a rudimentary understanding of visual basic, thank you in advance.
Jun 8 '20 #1

✓ answered by Gilley178

Thank you for the advice! I made the following changes and it worked:

Expand|Select|Wrap|Line Numbers
  1.  
  2. Private Sub SearchList_DblClick(Cancel As Integer)
  3.     DoCmd.OpenForm "profileForm", , , "[Claim ID 15]='" & SearchList & "'"
  4.  
  5. End Sub

4 2409
SioSio
272 256MB
Hi.
Maybe

"Claim ID 15 = '" & SearchList & "'"
Jun 9 '20 #2
Gilley178
10 Byte
Thank you for the response. I updated the code and it to:

Expand|Select|Wrap|Line Numbers
  1. Private Sub SearchList_DblClick(Cancel As Integer)
  2.     DoCmd.OpenForm "profileForm", , , "Claim ID 15= '" & SearchList & "'"
  3.  
  4. End Sub
  5.  
However it still resulted in a runtime error with the same message.
Jun 9 '20 #3
Rabbit
12,516 Expert Mod 8TB
You should avoid spaces in object names. If you do use them, you have to surround the name in square brackets. Otherwise it has no way of knowing when a name begins and when it ends.
Jun 9 '20 #4
Gilley178
10 Byte
Thank you for the advice! I made the following changes and it worked:

Expand|Select|Wrap|Line Numbers
  1.  
  2. Private Sub SearchList_DblClick(Cancel As Integer)
  3.     DoCmd.OpenForm "profileForm", , , "[Claim ID 15]='" & SearchList & "'"
  4.  
  5. End Sub
Jun 9 '20 #5

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

Similar topics

1
by: chug | last post by:
I'm not a programmer but it's my job to solve this. Can someone help me with this error message? Microsoft OLE DB Provider for ODBC Drivers error '80040e14' Syntax error (missing operator)...
1
by: Justin R | last post by:
Hey I am really stuck and can't figure out what is wrong here is the code line and surrounding code, if anyone can help i would appreciate it. Thanks This first line is the line that has a problem...
1
by: Keneryan | last post by:
The following is my code..... I was trying to accept users' feed back and save it to the database.... It works once and then keeps bringing the above error message... (Microsoft..... Syntax...
7
by: 3c4j5d | last post by:
I am having difficulty in adding an additional table to a SQL statement. Basically, I want to add that the INSERT should take place if not found in this additional table. I will attach a file...
3
by: Bennett72 | last post by:
Hello - I'm getting a run time error 3075 (missing operator) in my query expression and cannot seem to determine why. I cut a snippet of code (see below) and ran the statement in a sql query view...
1
by: sushma somesh | last post by:
HI, my code for search is rec.Open "select * from Body_Markings_new where Part Number like '%" & txtsearch.Text & "%' ", conn, adOpenDynamic, adLockOptimistic after compiling this code getting...
2
by: pptechs | last post by:
Hello. In dying need of assistance. All I am trying to do is search a table for a valid user ID for a form login screen and I am getting error : "Run-time error 3075 syntax error (missing...
3
by: irenenys | last post by:
Below is my code. Highlighted error is DoCmd.ApplyFilter task (Line #19) Not too sure what is wrong, really new to access programming. Option Compare Database Private Sub SearchB_Click() '...
3
by: DeltaEchoMikeIT | last post by:
Hi Folks, I keep getting the error when I select a name with an apostraphe, such as in the name "O'Connor" : Run-time error '3075': Syntax error (missing operator) in query expression...
8
by: FusionAtomix | last post by:
hello, I'm trying to get my list box database to open up another form that contains more information on the selected record. I can get it to open the form just fine, but it always opens o the...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.