What happens to the 10-digit number if any of the fields from which it is
formed change? If the number needs to be a permanent part of the record,
then you can certainly store the value. If it needs to remain the same even
if any of the fields from which it is constructed change, then you need to
store it. However, if you need the value to change if any of the fields
change, then you should calculate it on the fly.
If the number is subject to change, you certainly do not want it to be part
of a relationship (a linking field). If it is to remain fixed (an invoice
number, for instance) then it can be used as the linking field. However,
you can use any unique value you choose as the linking field. The user
never needs to see it. You can add an Autonumber field to the main table,
and a corresponding Number field to the sub-process table, then relate the
two fields one-to-many. It can be your secret.
Since you specify that the number of sub-processes is subject to change, and
wonder on that basis about adding a New Record button, I suspect there may
be a design issue here. What you need, from what I can tell, is something
like this for your table structure:
tblProcess
ProcessID (Primary Key, or PK)
Other fields that are unique to the Process
tblSubProcess
SubProcessID (Primary Key, or PK)
ProcessID (Foreign Key, or FK)
Other fields that are unique to the sub-process
Create a one-to-many relationship between the ProcessID fields. Build a
form (frmProcess) based on tblProcess, and another (fsubSubProcess) based on
tblSubProcess. In design view, drag the icon for frmSubProcess onto
frmProcess. You can now add any number of sub-process records for any
particular process. If you set the default view of frmSubProcess to
Continuous you can see the subprocesses lined up one above the other on the
screen. If you set the default view to Single you can only view the
sub-processes one at a time. Your choice.
Maybe you already have something of the sort I have described, but your
explanation is rather vague, so I am taking a bit of a guess here.
"matta" <(E-Mail Removed)> wrote in message
news:0D34D231-A45A-449F-AF52-(E-Mail Removed)...
>
>
> "Amy Blankenship" wrote:
>
>> Could you be more specific about what you are trying to achieve?
>>
>
> I have a table which describes a manufacturing process, from the data
> within
> this table I generate a 10digit unique job code.
>
> I have a second table which contain sub-processes which are tied
> to/contained within the master process, and I need a field on both tables
> to
> act as both a database link, but it also needs to mean something to the
> database user, and the only field on the master record I can use is the
> generated job code.
>
> My second question is, as the number of sub-processes tied to a master
> record isn't fixed, is it possible to have a 'Generate/Add new Sub
> Process'
> button on the main master form?
>
> Hope this clarifies?
>
> PS, there may be two replies, the first one got screwed up,
>
> Cheers,
>
> Matt.
|