View Full Version : Autopopulate field(s) in existing records


RWIC
12-01-2000, 08:05 AM
Creating a survey that consists of 25 records. Asking them to supply a score for each record and select the department they work for.
I would rather not have them select their department for each of the 25 records.
How do I autopopulate the department field for the remaining 24 records, after they make the initial department selection in record 1?
Thanks for your help.

Jack Cowley
12-01-2000, 08:21 AM
In the After Update event of the Department Field text box put code like this:

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

In the On Enter event of the Department Field text box put code like this:

If Not (IsNull(Me![Department].Tag) Or Me![Department].Tag = "") Then
Me![Deparment].Value = Me![Department].Tag
End If

Change 'Department' to the correct name of your field.

When the user enters the Department field in subsequent records the department name will be entered automatically.

(Thanks to Candace Tripp for this Code.)

Jack Cowley
12-01-2000, 09:32 AM
Hmmmm. Seems to be working for me, but I have only two columns in my Combo box and the bound column is the one that I want to carry forward. Check which column is bound and see if that is in fact the one that you want to carry forward

RWIC
12-01-2000, 12:20 PM
Jack, thanks for the code, it did work.
One more question, how do I turn off the navigation buttons (that are on every form)at the bottom of the form?
Found out that if some idiot were to use those buttons and go to the last record, they can circumvent the 'autofill' that your code created.
Thanks.