[AccessD] Row number in form

Jim Dettman jimdettman at verizon.net
Tue Jan 22 10:43:41 CST 2008



  One place it would work well is numbering child rows.  I.e. Order or PO
line items.  The PK would be the Order number and  line number (or rather it
would be a unique candidate key for you surrogate folks).  

Jim.

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Charlotte Foust
Sent: Tuesday, January 22, 2008 11:28 AM
To: Access Developers discussion and problem solving
Subject: Re: [AccessD] Row number in form

But what purpose does it actually serve?  Wouldn't a CreatedBy and
CreatedDate field make more sense?

Charlotte Foust 

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Gustav Brock
Sent: Tuesday, January 22, 2008 7:09 AM
To: accessd at databaseadvisors.com
Subject: Re: [AccessD] Row number in form

Hi Susan

It does, in fact it _is_ that record number.

You can use it in a multi-user environment if you don't rely on it as a
kind of unique Id as you may get duplicate entries in the table behind
for this field.

/gustav

>>> ssharkins at gmail.com 22-01-2008 15:59:32 >>>
So, this displays a record number, similar to the form's navigational
toolbar? I'm not why you'd need anything extra in a multi-user
environment -- wouldn't this rely on the form's recordset and not the
data source?

Susan H.


> Hi all
>
> If you in a form wish to store a row number in records added, I found 
> an extremely simple method I haven't seen anywhere else:
>
>  Private Sub Form_BeforeInsert(Cancel As Integer)
>    Me!RowNo.Value = Me.CurrentRecord
>  End Sub
>
> Of course, in a multi-user environment, this must somehow be isolated 
> for a single user's entries.
>
> /gustav



-- 
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