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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Going to new record but leaving one field uncleared

Status
Not open for further replies.

hobman

Vendor
Sep 8, 2004
39
US
I really need your help. I have a form that is used as a time tracker.

1.Employees select their name from a drop down combo box (cboName)
2.Click on a drop down to select date (cboDate) AND
3.Enter the hours for the day (txtDate)

Employees would enter their hours for a month or so at a time. Meaning, they would be doing lets say 20 enteries for the month of June. I don't want them to have to select their name each time.

Right now I have a "save" button that saves the entry and "add new" button that clears everything. Is there a way I can clear the "hours" field and the "Date" field cleared but leave the name intact while saving the last record. PLEASE HELP.
 
You may play with the DefaultValue property of the control.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Thanks for the quick reply PHV. I'm not exactly sure in what way you recommended using the default value property control. I can't just specify one name to show up as a default because there are many employees. Each employee will be entering data for many days at a time and I just want their name to stay selected as they go to the next record.

Any help would be appreciated. Thanks in advance.
 
In the AfterUpdate event procedure of the employee name control:
Me![name control].DefaultValue = Chr(34) & Me![name control] & Chr(34)

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Thank you so much PHV, you really deserved TipMaster of the Week award. Thanks again
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top