By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,551 Members | 2,741 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,551 IT Pros & Developers. It's quick & easy.

How set to initial value to max+1 of group

P: n/a
A container holds items that can be arranged by a person.
A container may contain only one of a given item.

Containers
-----
ContainerId (unique)
ContainerName (unique)
other columns

Items
-----
ItemId (unique)
ItemName (unique)
other columns

ContainerItems
-----
ContainerId
ItemId (unique Containerid x ItemId)
DisplayIndex (unique Containerid x ItemId x DisplayIndex)
other columns

When an item is added to a container the new record will be
[ContainerId], ItemId, Max(DisplayIndex)+1 where
ContainerId=[ContainerId] as DisplayIndex
Can the max+1 be enforced at the database level, or can it only be
done via a form?

The planned form will contain continuous subform

Container
+-- Items --+
--- Item --- DisplayIndex
--- Item --- DisplayIndex
--- Item --- DisplayIndex

When a new row is added to the subform, what event could be handled to
enforce max+1?
Are there any good 'drag and drop' controls for reordering?

Feb 15 '07 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.