Code Help (1 Viewer)

Jade

Registered User.
Local time
Today, 23:08
Joined
Jun 15, 2001
Messages
24
Hi There,

I have created a database that keeps track of employees time cards. I need help on writing code to make a field that has a default number in it to 0. For example, if an employee enters a number into field 2, field 1 will go from 12 to 0. Can anyone help?

Thanks,
Jen
 

Jack Cowley

Registered User.
Local time
Today, 23:08
Joined
Aug 7, 2000
Messages
2,639
I am not real clear on what you are trying to do but in the After Update event of Field2 you could use code similar to this:

If Not IsNull(Me.Field2) then
Me.Field1 = 0
End if

The code above assumes that Field1 is Numeric and not Text.

If you want you can 'look' at the number that was entered into Field2 and using a Select Case statement set the value of Field1 to a specific number.

[This message has been edited by Jack Cowley (edited 12-28-2001).]
 

Users who are viewing this thread

Top Bottom