By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,639 Members | 2,276 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,639 IT Pros & Developers. It's quick & easy.

Error 3251 Operation is not supported for this type of object

P: n/a
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
!EntryID = lngEntryID
!PlacementID = intPlacementID
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
Set rst = Nothing

Exit Sub
Select Case Err
Case Else
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,
Nov 13 '05 #1
Share this Question
Share on Google+
2 Replies

P: n/a
Al*********** (Alex Wisnoski) wrote:
.FindFirst "[EntryID] = " & lngEntryID & "And [PlacementID] =

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

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
Nov 13 '05 #2

P: n/a
Tony Toews <tt****> wrote in message news:<ir********************************>. ..
Al*********** (Alex Wisnoski) wrote:
.FindFirst "[EntryID] = " & lngEntryID & "And [PlacementID] =

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


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

Nov 13 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.