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)
|