[AccessD] Application defined or object error.

Rocky Smolin rockysmolin at bchacc.com
Fri Mar 16 19:26:47 CDT 2012


Dear List:
 
(This is Access 2003, BTW).  I have a main form and sub form.  Sub form is
named LotSearchFMLotControlSDS.
 
There are two fields on the sub form (among others -) Variety and Lot.
 
There are two combo boxes on the main form - Select Variety and Select Lot.
The user's selection should position the bus form at the first occurrence of
the selected record.
 
Select Variety works, Select Lot does not.
 
In the After Update event of Select Variety:
    Call Me.LotSearchFMLotControlSDS.Form.FindVariety

and in the sub form LotSearchFMLotControlSDS I have 
 
Public Sub FindVariety()
    Me.RecordsetClone.FindFirst "VarietyID = " &
Forms!LotSearchFM!cboSelectVariety.Column(0)
    If Me.RecordsetClone.NoMatch = False Then Me.Bookmark =
Me.RecordsetClone.Bookmark
End Sub

and that works.
 
In the After Update event of Select Lot:
 
    Call Me.LotSearchFMLotControlSDS.Form.FindLot

and that throws the Application defined or object error.
 
In the sub form LotSearchFMLotControlSDS I have 
 
Public Sub FindLot()
    Me.RecordsetClone.FindFirst "LotID = " &
Forms!LotSearchFM!cboLot.Column(0)
    If Me.RecordsetClone.NoMatch = False Then Me.Bookmark =
Me.RecordsetClone.Bookmark
End Sub

I can't see why one would work and one not.
 
Any ideas?
 
MTIA
 
Rocky Smolin
Beach Access Software
858-259-4334
www.bchacc.com <http://www.bchacc.com/> 
www.e-z-mrp.com <http://www.e-z-mrp.com/> 
Skype: rocky.smolin
 


More information about the AccessD mailing list