Tab Property

sandrao

Registered User.
Local time
Today, 15:47
Joined
Sep 6, 2007
Messages
34
I read that the Tag property can be used to store a records value and upon moving to the next new record fill in the forms control with the value stored in that tab property.

How would I go about this? Can anyone give me an example on how to use it and what can be stored and how to retreive it from the previous stored value?
I would like to use this to repeat the value in field e.g. "Agents Name" in the same field in the next new record.

Sandrao
 
Making the next field in records default to the last record.

In the After Update event of the AgentName field put code like this:

Me![AgentName ].Tag = Me![AgentName ].Value

In the On Enter Event of the same field put code like this:

If Not Me.NewRecord Then Exit Sub
If Not (IsNull(Me![AgentName ].Tag) Or Me![AgentName ].Tag = "") Then
Me![AgentName ].Value = Me![AgentName ].Tag
End If

The AgentName will not carry over into your next session with the form but will work as long as the form is open....

HTH
Dave
 

Users who are viewing this thread

Back
Top Bottom