View Full Version : Complicated Teaser


mark curtis
11-10-2000, 07:25 PM
Dear all,

I have a form in 97 that is split into ten tabs. One of my tabs stores start and end dates for a project and another stores changes requests against that project. What I want to do is this:

When a user enters data for a project the first time using the project tab the project start date field is not locked but the next time a user tries to update the start date field they must have raised a change control on the change tab and entered the change id on the project tab next to the start date or the start date field will be locked. Some validating checking will be needed to check that the change id is linked to that project id.

The reason I need this is to stop project managers changing the start dates when a project slips.

If anyone needs more info please mail me.

Thanks
Mark

Fornatian
11-11-2000, 08:20 AM
try this:

in the oncurrent event of the form(which by definition runs when the form changes records or goes to new)

If Me![StartDate]="" or isnull(Me![StartDate]) Then
Me![StartDate].enabled = true
End if

Should prevent the start date being enabled when the form has an entry in that field.

Also for the Change ID(I don't quite understand the implications) - I assume it is a password affair for changing the StartDate, if so put this code in the on exit event of the Change ID field:

If Me![ChangeID] = whatever the password is,if dynamic then reference here THEN
Me![Start Date].enabled = true
else
Msgbox "Change ID incorrect, please try again"
Me![Change ID] = ""
Me![Change ID].setfocus
end if

Note: you must set the start date enabled property set to "No" OR reverse the logic of the above arguments

try something like the above.

ian