[AccessD] Application defined or object error.

Charlotte Foust charlotte.foust at gmail.com
Fri Mar 16 21:48:34 CDT 2012


Do you get an error, or just not find the Lot you want?  Does the Lot
search ever work, say if you never do a search for Variety and just search
on Lot? As I recall, FindFirst doesn't necessarily start at the beginning
of the recordset, but I may be confusing languages... and object models.
You could try doing a movefirst and then findfirst.

Charlotte Foust

On Fri, Mar 16, 2012 at 5:26 PM, Rocky Smolin <rockysmolin at bchacc.com>wrote:

> 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
>
> --
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
>
>
> Website: http://www.databaseadvisors.com
>
>
>


More information about the AccessD mailing list