473,386 Members | 1,702 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.

runtime error '3077' help please

Hi everybody, I'm getting a syntax error message with my code below (using a combo box to pull data from a table), the combo box will work a few times and then this message pops up.

Runtime error :'3077'
Syntax error (missing operator) in expression

The code is below with...

rs.FindFirst "[Property] = '" & Me![Combo4] & "'"

highlighted in yellow

but I can't see what may be wrong with it, the full expression is below

Option Compare Database

Private Sub Combo4_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object

Set rs = Me.Recordset.Clone
rs.FindFirst "[Property] = '" & Me![Combo4] & "'"
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
End Sub

Thanks for any help. Eddie
May 28 '07 #1
3 12450
ADezii
8,834 Expert 8TB
Hi everybody, I'm getting a syntax error message with my code below (using a combo box to pull data from a table), the combo box will work a few times and then this message pops up.

Runtime error :'3077'
Syntax error (missing operator) in expression

The code is below with...

rs.FindFirst "[Property] = '" & Me![Combo4] & "'"

highlighted in yellow

but I can't see what may be wrong with it, the full expression is below

Option Compare Database

Private Sub Combo4_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object

Set rs = Me.Recordset.Clone
rs.FindFirst "[Property] = '" & Me![Combo4] & "'"
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
End Sub

Thanks for any help. Eddie
There are only 2 potential problems that I can see:
  1. rs should not be dimensioned as a Generic Object, it is a Recordset Object, so:
    Expand|Select|Wrap|Line Numbers
    1. Dim rs As Recordset
  2. If Property is a Numeric Value, you need to change the syntax for the FindFirst Method as so:
    Expand|Select|Wrap|Line Numbers
    1.  'Only if [Property] is Numeric
    2. rs.FindFirst "[Property] = " & Me![Combo4] 
May 29 '07 #2
Awesome, thank you so much. Ed
May 29 '07 #3
ADezii
8,834 Expert 8TB
Awesome, thank you so much. Ed
Ed, glad I was able to assist you. Let me know how you make out.
May 29 '07 #4

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

Similar topics

0
by: Jennifer | last post by:
Could you please report the following problem to your VC customer support? THANKS! Jennifer The problem is specific to the VC.Net and VC.Net 2003 <xlocinfo> headers. The problem is that if...
0
by: Tim Sharrock | last post by:
We have hit an internal compiler error when processing a very long array initialiser (for a lookup table). Most of the compiler versions we tried compiled the code successfully, but very slowly...
0
by: Peter Ross | last post by:
Using V1.1 of the framework, I try and compile the following as a module. #using <mscorlib.dll> __gc public class Test : public System::Object { }; $ cl /clr:noAssembly /LD test.cpp...
1
by: Marco [Stinger] | last post by:
Hi I'm writing a C# app with VS2003 for WinCE4 / 5 x86. I must call some functions on a Embedded C++ Dll (I have the source code of it). The dll's Header is: #ifdef INTERFACE_EXPORTS #define...
10
by: PufferFish | last post by:
Hi folks, I hope that this is the correct group for these things, apologies if not. I've got a strange compiler error. It appears to be similar to the issue described in knowledgebase...
0
by: shashikant.mundlik | last post by:
Hi All, My .NET IDE is crashing when trying to attach any process in ASP.net application and try to debug. The error message is as follows. Faulting application devenv.exe, version 7.10.3077.0,...
1
by: Marcus Kwok | last post by:
I am not sure if this is related to my previous thread ("NullReferenceException with value struct") so I am starting a new thread. I saw in...
1
by: kvarada | last post by:
Hello Experts, I am building my application on WinNT.4.0_i386_MSVC.7.1 platform. When I build the application on a stand alone machine, it builds fine. But when I build the same application from a...
7
by: jclover | last post by:
I'm using multiple criteria to pull up records in a form. However, whenever the "Retailer" field has a text string with an apostophe in it (example: Fred's Electronics), it errors out "3077". I'm...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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,...
0
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...

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.