home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / database / 8682 < prev    next >
Encoding:
Internet Message Format  |  1992-12-24  |  1.5 KB

  1. Path: sparky!uunet!noc.near.net!transfer.stratus.com!transfer.stratus.com!usenet
  2. From: rscott@vineland.pubs.stratus.com (Richard Scott)
  3. Newsgroups: comp.databases
  4. Subject: Re: Help with Microsoft ACCESS, please
  5. Date: 24 Dec 1992 15:29:43 GMT
  6. Organization: Stratus Computer Inc, Marlboro MA
  7. Lines: 22
  8. Message-ID: <1hcl17INN557@transfer.stratus.com>
  9. References: <1992Dec24.002547.22630@Princeton.EDU>
  10. NNTP-Posting-Host: attila.pubs.stratus.com
  11.  
  12. In article <1992Dec24.002547.22630@Princeton.EDU>  
  13. gdzimmer@phoenix.Princeton.EDU (Gary David Zimmer) writes:
  14. > Questions about Microsoft ACCESS:
  15. >   1)  Is there any way to control the starting value of a counter? Or,
  16. >       alternatively, is there a handy macro that sets the value of a
  17. >       field one greater than the field in the previous record?
  18. I tried to do the same thing you want to do and, after getting an error and  
  19. clicking the help button, found out that counters always start with 1 and you  
  20. cannot convert an existing field (with data in it) into a counter type.  The  
  21. way I got around this was to set the default-value property to an expression  
  22. using the DMax function: =DMax("[field1]", "Table1")+1 where field1 is the  
  23. field I'm setting the default value for and Table1 is the table it's in.  If  
  24. you're using a query-based form to access the table, you need to set the  
  25. default-value property for the control in the same way.  Hope this works for  
  26. you.
  27. -----
  28. Richard Scott
  29. Stratus Computer, Inc.
  30. rscott@vineland.pubs.stratus.com
  31.