473,671 Members | 2,446 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Run Time Error 3075 Missing Operator

I have code that works on every from I have created except for the
latest. Here it is:

Private Sub cmdGo_Click()

Dim sSQL As String
Dim selector As String
Dim sText As String

sSQL = "SELECT qryFindRental.[EventID], qryFindRental.[Name],
qryFindRental.[FILENUMBER]," & _
" qryFindRental.[RENTALITEM], qryFindRental.[RENTALDATE],
qryFindRental.[RENTALTYPE]" & _
" FROM qryFindRental" & _
" WHERE qryFindRental." & selector & " LIKE '" & sText & "'"

Me.txtRentalIte m.Visible = True
Me.txtRentalTyp e.Visible = True
Me.txtName.Visi ble = True
Me.txtFileNumbe r.Visible = True
Me.txtRentalDat e.Visible = True
Me.cmdEdit.Visi ble = True
Me.Line10.Visib le = True
Me.RecordSource = sSQL
Me.Requery

End Sub

When I enter text in sText and select the value in my combo box and
click the button I receive the run time error. The difference between
this form and the others is that the code references a query whereas
the others reference a table. Help?

Fred

Aug 8 '06 #1
4 18963
I have 2 words for you; STEP INTO.

Learn it, live it, love it.
fredindy wrote:
I have code that works on every from I have created except for the
latest. Here it is:

Private Sub cmdGo_Click()

Dim sSQL As String
Dim selector As String
Dim sText As String

sSQL = "SELECT qryFindRental.[EventID], qryFindRental.[Name],
qryFindRental.[FILENUMBER]," & _
" qryFindRental.[RENTALITEM], qryFindRental.[RENTALDATE],
qryFindRental.[RENTALTYPE]" & _
" FROM qryFindRental" & _
" WHERE qryFindRental." & selector & " LIKE '" & sText & "'"

Me.txtRentalIte m.Visible = True
Me.txtRentalTyp e.Visible = True
Me.txtName.Visi ble = True
Me.txtFileNumbe r.Visible = True
Me.txtRentalDat e.Visible = True
Me.cmdEdit.Visi ble = True
Me.Line10.Visib le = True
Me.RecordSource = sSQL
Me.Requery

End Sub

When I enter text in sText and select the value in my combo box and
click the button I receive the run time error. The difference between
this form and the others is that the code references a query whereas
the others reference a table. Help?

Fred
Aug 8 '06 #2
I've tried using the step into tool, however, it doesn't work for this
code, or I'm doing something wrong.

ManningFan wrote:
I have 2 words for you; STEP INTO.

Learn it, live it, love it.
fredindy wrote:
I have code that works on every from I have created except for the
latest. Here it is:

Private Sub cmdGo_Click()

Dim sSQL As String
Dim selector As String
Dim sText As String

sSQL = "SELECT qryFindRental.[EventID], qryFindRental.[Name],
qryFindRental.[FILENUMBER]," & _
" qryFindRental.[RENTALITEM], qryFindRental.[RENTALDATE],
qryFindRental.[RENTALTYPE]" & _
" FROM qryFindRental" & _
" WHERE qryFindRental." & selector & " LIKE '" & sText & "'"

Me.txtRentalIte m.Visible = True
Me.txtRentalTyp e.Visible = True
Me.txtName.Visi ble = True
Me.txtFileNumbe r.Visible = True
Me.txtRentalDat e.Visible = True
Me.cmdEdit.Visi ble = True
Me.Line10.Visib le = True
Me.RecordSource = sSQL
Me.Requery

End Sub

When I enter text in sText and select the value in my combo box and
click the button I receive the run time error. The difference between
this form and the others is that the code references a query whereas
the others reference a table. Help?

Fred
Aug 8 '06 #3
Good Lord I'm so blind. I forgot to add this simple declaration

selector = Me.cmbFilter.Va lue
sText = Me.Text1.Value
fredindy wrote:
I've tried using the step into tool, however, it doesn't work for this
code, or I'm doing something wrong.

ManningFan wrote:
I have 2 words for you; STEP INTO.

Learn it, live it, love it.
fredindy wrote:
I have code that works on every from I have created except for the
latest. Here it is:
>
Private Sub cmdGo_Click()
>
Dim sSQL As String
Dim selector As String
Dim sText As String
>
sSQL = "SELECT qryFindRental.[EventID], qryFindRental.[Name],
qryFindRental.[FILENUMBER]," & _
" qryFindRental.[RENTALITEM], qryFindRental.[RENTALDATE],
qryFindRental.[RENTALTYPE]" & _
" FROM qryFindRental" & _
" WHERE qryFindRental." & selector & " LIKE '" & sText & "'"
>
Me.txtRentalIte m.Visible = True
Me.txtRentalTyp e.Visible = True
Me.txtName.Visi ble = True
Me.txtFileNumbe r.Visible = True
Me.txtRentalDat e.Visible = True
Me.cmdEdit.Visi ble = True
Me.Line10.Visib le = True
Me.RecordSource = sSQL
Me.Requery
>
End Sub
>
When I enter text in sText and select the value in my combo box and
click the button I receive the run time error. The difference between
this form and the others is that the code references a query whereas
the others reference a table. Help?
>
Fred
Aug 8 '06 #4
"fredindy" <fs*****@yahoo. comwrote in message
<11************ *********@n13g2 000cwa.googlegr oups.com>:
I've tried using the step into tool, however, it doesn't work for
this code, or I'm doing something wrong.
No, I don't think you are wrong. I don't think step into will work in
form event code. Set a breakpoint (F9) on one of the first executable
lines of the sub, then go back to the form and trigger the event, then
continue with step into (F8).

--
Roy-Vidar
Aug 8 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
2430
by: khan | last post by:
getting, error, 3075 Syntax Error (Missing Operator) in query expression '8WHERE .=1' Dim TotalQty As Integer TotalQty = DLookup("", "", "=" & Forms!!)
4
18218
by: khan | last post by:
getting, error, 3075 Syntax Error (Missing Operator) in query expression '8WHERE .=1' Dim TotalQty As Integer TotalQty = DLookup("", "", "=" & Forms!!)
1
2564
by: Mike N. | last post by:
Hello- I have a normal application split into a frontend and backend. The tables are in the backend. All tables open correctly from the backend. When in the OBJECTS window (F11) in the front end, one table will not open in datasheet view. I get the error message 3075 "Syntax error (missing operator) in query expression 'sort sequence'" All other tables open correctly, and they are all linked correctly. All I do is click on "OPEN" in...
3
1243
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 date for the same room. I'm getting the following error message: Runtime error 3075. Syntax error (missing operator) in query expression '(Room = 189B) AND (InspectionDate = #10/05/05#)'. Here is the code:
6
5438
by: Nadnerb78 | last post by:
Please see code below: strSQL = "SELECT Max(EntryType) AS MaxOfEntryType " & _ "FROM tblForecastData GROUP BY BusinessLine, , Week " & _ "HAVING ((()='" & xx & "') AND ((Week)=" & xx & ")) " I don't understand why I am receiving the following error: Run-time error '3075':
5
3474
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 (operator missing). I cannot figure this one out. Any assistance would be appreciated.
1
2613
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 multiple forms that collect information on individual people. In fact there are 5 forms per person. The first and second form write data to the same table. The VBA code below is what happens when the user continues to the second form to enter more...
5
2394
by: Ledo | last post by:
I have a form that I want to show invoices in a date range. When clicking on the button I get the following error: Run Time Error 3075 Syntax error (missing operator) in query expression '(Invoice Date Between #08/27/2008 And #08/27/2008#)' Here is the code associated w/the error: Dim strReport As String 'Name of report to open. Dim strField As String 'Name of your date field. Dim strWhere As String 'Where...
22
2811
by: ozgenaga | last post by:
Hi guys, I am trying to insert new data records to a table but I am getting a run-time error. I would appreciate any kind of help. Here is my code: Sub WorstQueryEver() Dim db As Database
6
2887
by: ahd2008 | last post by:
Hi, I have a table for the enrollment of the employees: Employee ID Session ID Status(In-Progress;Complete;Cancel;No-Show;Waiting List) as Combo Box Plan Remarks
0
8483
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8926
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8824
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8603
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8673
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7444
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
4416
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2818
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1815
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.