check box based on a data field

jalverson

Registered User.
Local time
Today, 10:37
Joined
Oct 27, 2004
Messages
42
When a part number is set up in our manufacturing software, the user clicks a check box to mark the part as purchased. I'm creating a similar form and want to have a check box display the same information. The manufacturing database stores the check box as Y when checked and N when not checked.

I tried 2 different ways to add code in the BeforeUpdate but neither is working.

First Example:

if Purchased = "Y" then check295 = True
else checkbox295 = False

Second Example

If Purchased = "Y" then check295 = -1
else checkbox295 = 0

What changes do I need to make to this code to get it to work? Thanks for your help,

Jeff
 
shouldnt you be doing it in the after update since your returning the boolean of the result of the checkbox? and dont u need an end if?
 
I moved the code to the afterupdate and it still not working. You are correct. I had the end if statement as part of the code but left it out of the example that I typed. If it helps, the checkbox is for display purposes and the user cannot change the checkmark by clicking on the box. The value should be passed from the manufacturing database and displayed as a check box.

Thanks for your help,

Jeff
 

Users who are viewing this thread

Back
Top Bottom