Re: Easier / different way to do this
- From: "Terry Kreft" <terry.kreft@xxxxxxxxx>
- Date: Thu, 10 Nov 2005 15:58:29 -0000
It is bad practice to rely on the recordcount property. You are better off
using a SQL statement like
SELECT Count(*)
FROM YourTable
WHERE SomeCriteria
and check the value of field 0 in the recordset returned.
--
Terry Kreft
"TD" <dlee@xxxxxxxxxxx> wrote in message
news:1131559617.534299.95290@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
>I now use a DAO connection SQL statement, and recordcount to check to
> see if a number the user has input into a textbox is already in the
> database. If the number dose exist I use the MsgBox() to inform the
> user as such. A new record cannot be created until the user enters a
> number that is unique.
>
> I know I can set the field in the table to force a unique number but
> was wondering if there was a way to do everything I'm now doing without
> using VBA to do it? Sometimes I feel I like I don't use all of the
> built in features of Access when I revert to using VBA. Don't get me
> wrong as I like using code to do things but want to learn all I can
> about Access.
>
> Thanks,
> TD
>
.
- References:
- Easier / different way to do this
- From: TD
- Easier / different way to do this
- Prev by Date: Re: Saving Pivotchart as an image
- Next by Date: Re: O.T. - trying to sync w/ nist time server...
- Previous by thread: Easier / different way to do this
- Next by thread: Align numbers right in list
- Index(es):
Relevant Pages
|
Loading