[AccessD] Increment Child #s

Stuart McLachlan stuart at lexacorp.com.pg
Wed Nov 17 15:38:35 CST 2010


That's the way I generally  do it.  Why do you find it "yuk"?

-- 
Stuart

On 17 Nov 2010 at 13:56, Arthur Fuller wrote:

> Assume:
> 
> T1 - parent file, say CustomerOrders
> T2 - child file, say CustomerOrderItems
> 
> Goal:
> 
> Inherit the PK from T1, but add an Item# column that enumerates the
> Items on said Order, so...
> 
> CO1
>     Item 1
>     Item 2
> CO2
>     Item 1
>     Item 2
> 
> I wrote some code to do a Dmax() call using the Parent PK but yuk! I'm
> trying to find a slicker way to do this, ideally so that I can default
> the Item# value for the next new record. Any ideas how this might be
> done?
> 
> TIA
> A.
> -- 
> 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