[AccessD] Error 3070 - field not recognized

Rocky Smolin rockysmolin at bchacc.com
Tue Oct 12 13:38:20 CDT 2010


OK per a snip I saw on the web I changed the routine to use rs dimmed as a
DAO.Recordset.  There are two combo boxes the user can use to find a record
- one for a part number, one for a lot number.  The part number one works,
lot number one fails:

Private Sub cboLotSerialReferences_AfterUpdate()

strSQL = "fldLotSerialReference = '" _
        & Me.cboLotSerialReferences.Column(0) & "'"

Set rs = Me.subfrmLotSerial.Form.RecordsetClone

rs.FindFirst strSQL
Me.subfrmLotSerial.Form.Bookmark = rs.Bookmark

End Sub

Private Sub cboPart_AfterUpdate()

strSQL = "fldLotSerialPartNumber= '" _
        & Me.cboPart.Column(0) & "'"

Set rs = Me.subfrmLotSerial.Form.RecordsetClone

rs.FindFirst strSQL
Me.subfrmLotSerial.Form.Bookmark = rs.Bookmark

End Sub


Rocky
 

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Rocky Smolin
Sent: Tuesday, October 12, 2010 10:47 AM
To: 'Access Developers discussion and problem solving'
Subject: [AccessD] Error 3070 - field not recognized

Dear List:

This has got to be something simple that I'm just not seeing because I've
used this technique for years with no problem.  But I'm stumped.

User selects a value from a combo box (in this case a lot number) and I use
.FindFirst and .Bookmark to set the record selector to the selected record
on a continuous form.  The combo box is on the main form, continuous form is
a sub form.  (BTW I tried putting the combo right on the subform but had the
same problem.)

Here's the code:

Private Sub cboLotSerialReferences_AfterUpdate()

Dim strSQL As String

strSQL = "fldLotSerialReference = '" _
        & Me.cboLotSerialReferences.Column(0) & "'"

MsgBox strSQL
        
Me.subfrmLotSerial.Form.RecordsetClone.FindFirst strSQL Me.Bookmark =
Me.RecordsetClone.Bookmark

End Sub


where fldLotSerial is a bound field on the subform.  The MsgBox shows
fldLotSerialReference = 'aaa'.  On the .FindFirst statement I get error 3070
- Microsoft Jet database engine does not recognize 'fldLotSerialReference'
as a valid field name or expression.

Any clues?

 

MTIA

 

Rocky Smolin

Beach Access Software

858-259-4334

Skype: rocky.smolin

www.e-z-mrp.com <http://www.e-z-mrp.com/> 

www.bchacc.com <http://www.bchacc.com/> 

 

 





More information about the AccessD mailing list