autonumber incrementation

  • Thread starter Thread starter forumware
  • Start date Start date
F

forumware

Hi.

I would appreciate it if someone could help me with this:

Table 1

internal id = autonumber

Now i want the internal id in table 2 to point to internal id of table
1 and add a suffix:

table 2
internal id = table1.autonumber + "suffix"

Is this possible in access. I'm stuck in my project....

Thanks,

Forumware
 
You'll need to do that on a data-entry form (not a table). Add a long
integer filed, linked as a foreign key, then add a separate "suffix" field.
You could concatenate them for form/report display. You should still use an
autonumber field as the primary key for your table2.
-Ed
 
Hi.

I would appreciate it if someone could help me with this:

Table 1

internal id = autonumber

Now i want the internal id in table 2 to point to internal id of table
1 and add a suffix:

table 2
internal id = table1.autonumber + "suffix"

Is this possible in access. I'm stuck in my project....

Thanks,

Forumware

Could you explain WHY?

This composite field would violate the principle that fields should be
atomic. I can imagine having TWO fields, one being a Long Integer
foreign key linked to the table1 autonumber value; this could easily
be populated by entering data using a Form bound to Table1 and a
Subform to Table2, using the autonumber fieldname as the master link
field and the related long integer field as the child link field.

You could have code on the Subform's BeforeInsert event to generate
the suffix... but I don't have any idea what you want IN the suffix,
or for that matter why you want it at all!

John W. Vinson[MVP]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top