Hi Folks
I'm trying to create a database that, for the purposes of this thread, contains data on three different types of document and the hyperlinks between them. I have four tables:
- Doc1Table
- Doc2Table
- Doc3Table
- LinksTable
LinksTable is an associate table that consists of two columns, LinkFrom and LinkTo, and is populated with values from the AutoNumber ID column in each DocTable.
Now, here's the problem.
Corresponding to each DocTable is a DocForm. Each DocForm contains two subforms, one of which populates the LinkFrom column in LinksTable and the other of which populates the LinkTo column. The subforms consist of combo boxes that, by means of UNION queries, list all the documents of all three types in the database. The combo boxes display the familiar (non-unique) names of the documents but send the corresponding (unique) IDs to LinksTable.
So suppose I'm in record 6 of Doc1Form and I select 'Skill Document', a type 2 document with ID 8, in its LinkTo subform. LinksTable will look like this:
Code:
ID..........LinkFrom.......LinkTo
1................6...............8
Now suppose I'm in record 7 of Doc2Form and I select 'Beast Document', a type 3 document also with ID 8, in its LinkTo subform. LinksTable will look like this:
Code:
ID.........LinkFrom......LinkTo
1...............6...............8
2...............7...............8
So the LinkTo column will contain the same value for two different documents. How can I get Access to recognise that the 8 in the first row denotes a different document from the 8 in the second row? Is there any way of determining which number autonumbering starts with, so that Doc1Table could start with 1000, Doc2Table with 2000 and Doc3Table with 3000? Alternatively, is there any way of prefixing autonumbering with a letter, so that Doc1Table could contain A1 etc., Doc2Table A2 etc. and Doc3Table A3 etc.?
I hope I've made the problem clear enough. Your help would be very welcome.
Best wishes
Remster