TIP: Click on subject to list as thread! ANSI
echo: win_access
to: MATTHEW JOHNSON
from: SHAPOOR ENGINEER
date: 1996-09-20 00:00:00
subject: Re: SET CARRY ON

Antwort zur Mail von Matthew Johnson vom 16.09.96
zum Thema "SET CARRY ON"
Matthew,
just happend to pass by, so I don't know who originaly asked how to  
implement "SET CARRY ON" in ACCESS.
KM>> In DbaseII & III you could use the command 'SET CARRY ON' (I pretty
KM>> sure that's what it was called) to automatically copy the
KM>> information from the last record into a new record.
MJ> Sounds fairly simple to implement. Just use the BeforeUpdate
MJ> event to store the current value and the OnCurrent event to set the
MJ> value for the new record.
Why store the information seperatly, when the information is in the  
record?
The following code is quite generic and can be used to copy the data from  
the last record into a new record.
Sub Form_Current ()
    On Error Resume Next
    Dim strIstNeu As String
    Dim a As Integer
    strIstNeu = Me.Bookmark
    If Err = 3021 Then
        Dim rs As Recordset
        Set rs = Me.Recordsetclone
        rs.MoveLast
        For a = 1 To rs.Fields.Count - 1
            Me(rs.Fields(a).Name) = rs.Fields(a)
        Next a
    End If
End Sub
Gude
Shapoor
--- CrossPoint v3.11 R
---------------
* Origin: Kites are born to die in the sky (2:2444/5132.2)

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™.