L
Linda
I have the following code in the oncurrent event of my
form. I'm using Access 97.
What I want to do is that whenever my users enter a new
record that the values previously entered in the fields
hotel and arrivaldate ger carried over when creating a
new record. Strangely enough my code does not seem to
work.
Does anyone see what I'm doing wrong here?
Dim rs As Recordset
Set rs = Me.RecordsetClone
If rs.EOF Or Not Me.NewRecord Then
'don't do anything if there's no records or it is a
new record
Else
With rs
.MoveNext
Me![txtHotel] = .Fields("Hotel")
Me![txtArrivalDate] = .Fields("ArrivalDate")
End With
End If
form. I'm using Access 97.
What I want to do is that whenever my users enter a new
record that the values previously entered in the fields
hotel and arrivaldate ger carried over when creating a
new record. Strangely enough my code does not seem to
work.
Does anyone see what I'm doing wrong here?
Dim rs As Recordset
Set rs = Me.RecordsetClone
If rs.EOF Or Not Me.NewRecord Then
'don't do anything if there's no records or it is a
new record
Else
With rs
.MoveNext
Me![txtHotel] = .Fields("Hotel")
Me![txtArrivalDate] = .Fields("ArrivalDate")
End With
End If