home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / database / 6459 < prev    next >
Encoding:
Text File  |  1992-08-31  |  2.4 KB  |  63 lines

  1. Newsgroups: comp.databases
  2. Path: sparky!uunet!haven.umd.edu!darwin.sura.net!uvaarpa!murdoch!csissun12.ee.Virginia.EDU!cyj9h
  3. From: cyj9h@csissun12.ee.Virginia.EDU (Charles Y. Choi)
  4. Subject: Yet Another Simple (?) Question on Paradox
  5. Message-ID: <1992Aug31.195806.13243@murdoch.acc.Virginia.EDU>
  6. Keywords: Unique Record Field, Paradox
  7. Sender: usenet@murdoch.acc.Virginia.EDU
  8. Organization: University of Virginia
  9. Distribution: na
  10. Date: Mon, 31 Aug 1992 19:58:06 GMT
  11. Lines: 50
  12.  
  13.  
  14. Here's a question that I've yet to figure out.  When creating a new record,
  15. how can you get a field in that record (say ID) to automatically be filled
  16. in with the record number?  For example
  17. ____________________________________________________________
  18. Rec. #  |   ID   |  First   |  Last | ...
  19. ------------------------------------------------------------
  20.    1    |   1    |  Jane    | Smith |
  21. ------------------------------------------------------------
  22.    2    |   2    |   Bob    | Frank |
  23. ------------------------------------------------------------
  24.    3    |   3    |  Mary    |  Jane |
  25.             ^
  26.     As each new record in this table is generated, an ID number is
  27.     generated.  A problem though is if you enter a blank record.  If you
  28.     write a macro that reads the record number and inserts it into ID
  29.     during EDIT mode, when you save the table, the synchronization
  30.     between the record number and the ID is lost.
  31.  
  32. _____________________________________EDIT___________________
  33. Rec. #  |   ID   |  First   |  Last | ...
  34. ------------------------------------------------------------
  35.    1    |   1    |  Jane    | Smith |
  36. ------------------------------------------------------------
  37.    2    |        |          |       |
  38. ------------------------------------------------------------
  39.    3    |   3    |  Mary    |  Jane |
  40.  
  41. After saving...
  42. _____________________________________MAIN___________________
  43. Rec. #  |   ID   |  First   |  Last | ...
  44. ------------------------------------------------------------
  45.    1    |   1    |  Jane    | Smith |
  46. ------------------------------------------------------------
  47.    2    |   3    |  Mary    |  Jane |
  48.  
  49.  
  50. So what do I want?  All I really want to do is have an automated
  51. way of generating a unique ID for each record period.
  52.  
  53. Can anybody here help?
  54.  
  55. Thanks!
  56.  
  57.  
  58. -Charles Y. Choi
  59. cyj9h@Virginia.EDU
  60. -- 
  61. "What a morning!  Birds, fish, frogs, and humans!"
  62.                                       -Maya the Bee
  63.