Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Forms, copying certain fields from current record to new record

Status
Not open for further replies.

blackte

Programmer
Jul 24, 2001
80
US
I have a data entry form, that has siz fields that I would like to carry from one dataentry sheet to the next. This information is the same for the user when in this form. Is there a way to carry these fields. It seems that when I press the add record button, all fields are cleared, and that is fine for most, but these six I would like to keep until the form is close. thanks in advance for any help.

Thanks Travis
 
In the AfterUpdate event you can change Default Value property of the selected controls to what you need:

MyTextBox.DefaultValue = MyTextBox

Then the user will always get the last record they worked on values set as the default value for the next record.

Alternatively, you can use the DLast() function to go the the query supplying the form data and look up the value last used. Set the DefaultValue property of the controls in question to look up the last value entered in their respective field like this:

DLast("[MyField]","MyQuery")

I prefer the second method myself, but it requires that the query being referenced be sorted in the same order as the form.

HTH Joe Miller
joe.miller@flotech.net
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top