Raskew's Carry Fwd Code

Rich_Lovina

Registered User.
Local time
Tomorrow, 08:55
Joined
Feb 27, 2002
Messages
224
In a past posting Raskew gave following for carry data from one record to new record:

If Not IsNull(Me.Section) Then
Me.Section.DefaultValue = "='" & Me.Section & "'"
'For text fields 'Me.Operatorid.DefaultValue = "='" & Me.OperatorID & "'"
'For date fields 'Me.Operatorid.DefaultValue = "=#" & Me.Operatorid & "#"
'For number fields 'Me.Operatorid.DefaultValue = "=" & Me.Operatorid
Me.Section.TabStop = False
Else
Me.Section.TabStop = True
End If

This, for me works better than an On Enter tagging code plus an After_Update, which if then scrolling back thru recently entered records, changes past records thru the pasting code.

However 2 little questions for any Gurus:

1. When using, the pasting previous data is perfect, but when entering new data cursor jumps to 1st vacant field and ignores the tab stop = yes command. Any suggestions ?

2. If text and numbers are in the field, what is the code ?

Appreciate any inputs. Tks
 
Question 1: Will have to play with it some since I haven't encountered the problem before.

Question 2: If both text and numbers occur in the same field (e.g. "John 123"), then it would have to be a text field. Is there something more about the field that we need to know?
 
Tks your answers. Q1 is not a major problem but users usually stick to keyboard, rather than use mouse, hence its a small aberration.

Q2. Regret the nos appear at random, as they're a location code for a campus of buildings e. CP1-2-31w might mean Bldg CP, Wing 1, 2nd floor, Room 31 West.
Then we might have just a word ( suburb location), then we have another campus where location is MHQ Level 2.
So there's absolutely no pattern on these.
 
Q1) I believe you might want to look into using/disabling SetFocus, it sounds like the code is forcing the cursor into a certain control. Also double-check your tab order, new controls usually get added to the bottom of the list which can make things dizzying for data entry.
Q2) I believe raskew is saying that as long as you're not using the numbers for calculations, making it a text field is fine. Address fields are a good example of this. I doubt you'll be doing any calculations on 'CP1-2-31w '.

HTH,
David R
 
David,

Tks yr immed input. I agree with both and whilst never having touched Focus, I'll quiz up on it a bit.

I did change the tab order back.
 

Users who are viewing this thread

Back
Top Bottom