referencing

  • Thread starter Thread starter paddy
  • Start date Start date
P

paddy

Hello, i have a field called Index which combines the
autonumber of each field with the Reference field. eg
when the recors autonumber is one and the reference is
EDU, the Index field becomes EDU/1. This is fine and what
im after, except im looking to keep an individual count
for each reference. Say for example the next item has
reference PCE, then the index is PCE/2. Then theres a 3rd
item which is EDU, so its index will be EDU/3. This is the
3rd item, but not the 3rd EDU item. What im trying to do,
with no sucess, is in this case have the EDU/2, as its the
2nd EDU item, even though its the 3rd item in total. Your
help would be greatly appreciated.Thanks, Paddy!
 
I dont think you could do this using an autonumber field
in the same table (as the autonumber always increases so
the resulting combined value is as you say). what you
could try doing is splitting the table so that each
reference field is in a different field with their own
autonumber. For you queries etc you could then try a
union query to join the results together. (bit of a long
way round - depends on what you want). I am also sure
that there will be other solutions

Craig

PS you may be able to do it with a bit of VBA but I am
afraid thats beyond my expertise
 
Certainly its not autonumber that'll solve your issue. What I did once was
make a query that counts the number of times any instance was present + 1.
Then I had a function that read this number from the query and this is what
I used in my primary key - a function.


Kailash Kalyani
MEA Developer Support Center
ITWorx on behalf Microsoft EMEA GTSC
 
Back
Top