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