473,548 Members | 2,598 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Error 3251 Operation is not supported for this type of object

I have an A97 application that I am modifying. I have created an
unbound form, "zfrmTestEnterP lacements", with a subform,
"zsfrmSelectPla cement". The intent is to use a combo box on the
primary form to look up 'exhibitor-entry' data and populate a few
fields on this form. The EntryID(number-long data type) will be
passed to a textbox on the subform. The user will then use a combo
box on the subform to look up the appropriate 'placement' for that
entry and select it. All of this works fine. I then want the EntryID
and PlacementID saved in a table, "wtblEntrie s-Placement". This is
where the trouble starts. This table's design is as follows:
Field Name Data Type
ID AutoNumber (Long)
EntryID Number (Long)
PlacementID Number (Integer)
When my 'save' button is clicked I receive Error 3251, "Operation is
not supported for this type of object.". I go into debug and this
line is hi-lited: .FindFirst "[EntryID] = " & lngEntryID & "And
[PlacementID] = " & intPlacementID.

Here is the code for the 'save' button:

Private Sub cmdSaveRecord_C lick()
On Error GoTo Err_Routine
'variable captures procedure name that error occurs in
strProcname = "cmdSaveRecord_ Click"

Dim rst As DAO.Recordset
Set rst = CurrentDb.OpenR ecordset("wtblE ntries-Placement")
With rst
.FindFirst "[EntryID] = " & lngEntryID & "And [PlacementID] =
" & intPlacementID
If .NoMatch Then
.AddNew
!EntryID = lngEntryID
!PlacementID = intPlacementID
.Update
Else
MsgBox "This Entry ID and Placement have previously been
entered." & vbCrLf & "A duplicate record is not allowed." _
& vbCrLf & "This date will be cleared from the form",
vbInformation + vbOKOnly
txtEntryID = ""
cboSelectPlacem ent.Value = ""
End If
End With
rst.Close
Set rst = Nothing

Exit_Routine:
Exit Sub
Err_Routine:
Select Case Err
Case Else
Err_General
End Select
Resume Exit_Routine
End Sub

The subform combo(cboSelect Placement) has a Row Source SQL statement
returning 3 fields with the bound column being column(0), which is the
PlacementID field. This PlacementID field coming into the combo box
is a number(integer) data type.

I am using variables in my FindFirst because I got Error 13 "type
mismatch" messages when I used the controls on the subform. The
variables pick up their values in the cboSelectPlacem ent_AfterUpdate
event. Can someone explain where this error (3251) is coming from and
what the solution is?

Thanks for any assistance,
Alex
Nov 13 '05 #1
2 11915
Al***********@n cmail.net (Alex Wisnoski) wrote:
.FindFirst "[EntryID] = " & lngEntryID & "And [PlacementID] =


Try inserting a space between the double quote and the word And.

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
Nov 13 '05 #2
Tony Toews <tt****@teluspl anet.net> wrote in message news:<ir******* *************** **********@4ax. com>...
Al***********@n cmail.net (Alex Wisnoski) wrote:
.FindFirst "[EntryID] = " & lngEntryID & "And [PlacementID] =


Try inserting a space between the double quote and the word And.

Tony

Thanks for the response. I tried inserting the space as you said but
I am still receiving the same error message. Do you have any other
suggestions?

Thanks,
Alex
Nov 13 '05 #3

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

Similar topics

10
11821
by: Frusterated | last post by:
Hi, I'm using Access-2k under Win-XP... When I have a form with imbedded code it works perfect. Such as the following code example. Dim db as DAO.Database Dim rs as DAO.Recordset Set db = CurrentDB set rs = db.OpenRecordset("MyTable")
3
4293
by: RBohannon | last post by:
I've developed a database in Access 2000 on Windows 2000. I have been asked to put the database on a machine running Windows XP. I copied the database onto the XP machine with some data already in it. Everything seemed to be working correctly, until I tried to import new data. New data is imported into the database from a floppy disk. To...
7
3075
by: Jorgen Haukland, Norway | last post by:
Hi, I have created a Java webservice which runs in IBM WebSphere appserver. I take the WSDL-file and create a VS.NET WinForm application and calls the service running on my PC and everything works fine. So I deploy the webservice on a remote machine (Linux box) and I get an error when calling the service. BUT: I can retrieve the WSDL and...
0
23449
by: HKSHK | last post by:
This list compares the error codes used in VB.NET 2003 with those used in VB6. Error Codes: ============ 3: This Error number is obsolete and no longer used. (Formerly: Return without GoSub) 5: Procedure call or argument is not valid. 6: Overflow. 7: Out of memory.
7
22105
by: Ike | last post by:
Can someone please illuminate to me why, in the following snippet of script, the alert statement in the try-catch gives me ? The file 'http://localhost:1222/roomx1/getdata.php' truly does exist. I'm really lost here and would appreciate anyone's good eye. Thanks, Ike if(typeof window.ActiveXObject != 'undefined'){ req = new...
6
2085
by: Bmack500 | last post by:
Hello, and Thanks in advance! Using: Vstudio 2005, XP, .NET 2.0 I'm getting the following error when running my code below. I'm passing an object array which contains other variables. It happens immediately when it hits the "For" loop: Unable to cast COM object of type 'System.__ComObject' to interface type 'IDirectorySearch'. This...
10
6737
richardhodge
by: richardhodge | last post by:
I am a VB6 database programmer and have run into a small problem. The company I work for primarily uses Microsoft Access 2000 for the database that is the back end for our software. Well the functionality that I am currently working on creates a table in one database and then links it into the primary database that is used by the program to store...
3
6089
by: Jeremy Chapman | last post by:
I've writtin a very simple web service in axis which returns an array of classes. I consume it in a .net app. When receiving the response, my .net app generates an error "Cannot assign object of type System.Object to an object of type PersonWS.WorkGroupData.". I've included the wsdl of the consumed axis web service, the...
2
1801
by: Mittalswati | last post by:
Hi All I am getting the below mentioned error while accessing the page which uses VB.Net Dll ,Please look in to the matter and suggest some solution Unable to cast COM object of type 'Scripting.DictionaryClass' to interface type 'Scripting.IDictionary'. This operation failed because the QueryInterface call on the COM component for...
0
7512
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...
0
7438
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7707
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. ...
1
7466
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...
0
7803
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...
0
6036
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...
1
5362
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3495
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
751
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...

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.