Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default initialize form field from previous entry


I'm using the menu's Data Form function called by a macro to enter new
records to a spreadsheet database used to track employee time to be billed on
client matters. For simplicity, assume the fields corresponding to the
columns in the database a employee, file number, time, code and code
description. It is common that groups of related records are entered in
sequence where, for example, each new record in a group is has the same file
number and employee. Employee and code fields validate from respective lists.
Code decription field populates from a VLOOKUP function based on code field
entered. I'm calling the Data Form from the menu via a macro. Each new
entry, however, begins with a clear cell for each field. I'd like to have
the fields, at least employee and file number fields, for each new record to
be added initialize with the values entered for the immediately previous
record so that the information does not need to be re-entered for each new
record. Is there any way to do this using the Data Form? Will I need to
create a different data entry form in VB? Very much a newbie attempting this
but generally a quick study.

Thanks!


--
Message posted via http://www.officekb.com
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default initialize form field from previous entry


As far as I can tell, You will need to create a text_box Enter privat
sub

I just put 1 small column of data in but the theory should hold tru
for your example. For each field you want to be pre populated you coul
reference the colomn in the last data you entered. I referenced A1 a
the only cell to look at, but in your case you're constantly enterin
in data into multiple columns so you'll have to code in something lik
this for each column of data, and subsequently each text box:

Private Sub TextBox1_Enter()
'locate the column of data you want to reference the last cell in
Range("A1").select
'Find the last cell (assuming no blank cells)
Selection.End(xlDown).Select
TextBox1.Value = Selection.Value
End Sub

Keep in mind you'll also need the requisite TextBox_1Change() to ente
your data into the next cell.

Hope this helps

--
TylerDurde
-----------------------------------------------------------------------
TylerDurden's Profile: http://www.excelforum.com/member.php...fo&userid=1763
View this thread: http://www.excelforum.com/showthread.php?threadid=39021

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
restricting entry into a cell based on entry to a previous cell newbie57 New Users to Excel 1 June 9th 08 05:43 PM
Active X Controls Tabbing from Form Field 2 Form Field Tfrup12 Excel Discussion (Misc queries) 0 February 19th 08 08:15 PM
Form. to ignore cells w/o value from calc from previous Form. Michele Excel Worksheet Functions 2 October 30th 07 02:40 PM
Closing user form in Initialize macro? Don Wiss Excel Programming 4 April 20th 05 08:22 AM
need form to initialize without closing bruce forster Excel Programming 2 April 21st 04 11:57 PM


All times are GMT +1. The time now is 03:21 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"