bringing info down to next line

Rudeman76

Registered User.
Local time
Today, 07:02
Joined
Jun 9, 2007
Messages
11
I am using a form in the Tabular format. I have 7 columns in the form. Some of the info is the same on the next line. Is there a way to bring down the same info onto the naxt line without having to keep entering it in. For example I have a Time column where the user enters in a time, usually for the next two entries the time is the same. I would like it so when the user enters in the time, it will be entered into the next entry so they do not have to enter it again. Is this possible?
 
This will do it!
Code:
Private Sub YourControlName_AfterUpdate()
   YourControlName.DefaultValue = YourControlName
End Sub

Good Luck!
 
kinda works

thanks. it works when i enter in a umber but when i enter in a string it gives me #name? on the next line
 
Sorry! :D Suddenly had fire engines outside the house this morning and I forgot where I was by the time I got back in the house! Must have hit the send key on my way out. Yes, the code you got works for numeric values, but for text values you need this:

Code:
Private Sub YourControlName_AfterUpdate()
If Not IsNull(Me.YourControlName.Value) Then
  YourControlName.DefaultValue = """" & Me.YourControlName.Value & """"
End If
End Sub
 

Users who are viewing this thread

Back
Top Bottom