TIP: Click on subject to list as thread! ANSI
echo: parrots
to: PAUL QUINN
from: KATHY JOHNSON
date: 1998-05-24 09:43:00
subject: Traffic

PQ>Gotcha here, mate... east coast of OZ.
We're getting out to Australia again? We had a feed to Oz once, but
it got cut off somehow a while back. I'm glad to see it's up and running
again!
PQ>I... can't type... any more... either... reaching for the keyboard... 
hile
PQ>our newest cockatiel, Dino, is... shredding... my T-shirt.  =8*)
And what's wrong with that?  Isn't that what birds are for?
To make you buy new clothes regularly......?
--Kathy
 * SLMR 2.1a * Not only am I a master of suspense, but...
--- Maximus 3.01                       
---------------
Next conference: FIDO Message Area
Next topic: 226 Windows Access

FIDO MESSAGE AREA==> TOPIC: 226 WINDOWS ACCESS Ref: D5K00000Date: 05/13/96
From: CHRIS CHRISTIANSEN                                    Time: 12:00am
\/To: MATTHEW JOHNSON                                     (Read 7 times)
Subj: Increment by 1

CC> I want to increment a numeric string by 1 (or perhaps I want to "on
CC> open" add one to the maximum value).
MJ>This is basically what I do.
MJ>1) in the on-open event assign a variable to hold the value of the 
MJ>Max_ID number.
MJ>2) I place navigator buttons on the form which check this value and wil
MJ>not the the user go into a new black record.
MJ>3) I have a 'new record' button which goes to a new record, adds one to
MJ>the Max_ID and assigns it to the ID field (which on is usually RO).
MJ>it has been the best compromise I 
MJ>have found between the way Access wants to do things and the way I want
MJ>to do things.
MJ>The hardest things are the simplest and the simplest things are the 
MJ>hardest....
Matt thanks for responding.  Here's another way to do it.
Under BeforeInsert use the following
[ID] = NextRequestNumber()
and create the following function
Function NextRequestNumber () As Long
Dim MyDb As Database
Dim MyShot As Snapshot
Dim tmp As Long
Set MyDb = OpenDatabase("E:\Access\Helpdesk.mdb")
Set MyShot = MyDb.CreateSnapshot("Support Requests")
MyShot.MoveLast
tmp = MyShot("ID")
NextRequestNumber = tmp + 1
Set MyShot = Nothing
MyDb.Close
End Function
There is a slight delay between when you start to enter a new record and 
the new ID number is entered but it's acceptable.
Don't forget
Sub Main ()
AppDir = "E:\ACCESS\"
ChDir AppDir
End Sub
___
 * WR 1.33 # 73 * 100,000 lemmings can't be wrong.
--- Maximus 2.02
(1:138/102)
---------------
* Origin: bloom county bbs * Parrots HQ * (313)582-0888 (1:2410/400)
* Origin: Awakening - Lakewood WA (206)582-5579 HST16/V32b/VFC/V34

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.