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

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, "zfrmTestEnterPlacements", with a subform,
"zsfrmSelectPlacement". 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, "wtblEntries-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_Click()
On Error GoTo Err_Routine
'variable captures procedure name that error occurs in
strProcname = "cmdSaveRecord_Click"

Dim rst As DAO.Recordset
Set rst = CurrentDb.OpenRecordset("wtblEntries-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 = ""
cboSelectPlacement.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(cboSelectPlacement) 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 cboSelectPlacement_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 11892
Al***********@ncmail.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****@telusplanet.net> wrote in message news:<ir********************************@4ax.com>. ..
Al***********@ncmail.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
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 =...
3
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...
7
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...
0
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)...
7
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....
6
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...
10
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...
3
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...
2
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...
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:
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
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
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
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...
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,...

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.