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

Check to see that fields are not null

Status
Not open for further replies.

nkiefer

Programmer
May 21, 2001
86
US
My company uses the custom text fields in Project 2000. When we create a new task we must populate the custom fields. Is it possible to check each task and see if the required fields are populated?

My thought was to use vba and run a procedure when the user saves the project, loop through each task and check to see if each required field has data in it. If it does not select the field for the user so they can enter data in it.

Either do this automatically when the user saves the project or have a toolbar button do the same when the user desires.
 
dim t as task
for each t in activeproject.tasks
If not t is nothing then
t.text1 = "abc"
t.text2 = "def"
end if
next

Hook it to the BeforeSave or BeforeClose event

I'm working with P98 right now but don't think there is an InsertTask event that you can link it to. You wouldn't want to do that, though, because you might want some blank lines to make the "spreadsheet" portion look pretty.

Alternatively, you could attach the sub to a button and clicking on the button would open a line and then do the work above.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top