Help with form

stauartadair

Registered User.
Local time
Today, 11:19
Joined
Sep 28, 2007
Messages
12
Hello all,

I've got a form with a field called courier comment. At the moment users enter a comment in this box and then put a tick in another field called cc in to confirm that they have entered the comment.

Its not working very well as users are putting comments in and forgetting the tick so I want to automate the process so when the field courier comment is changed then the field cc in changes to yes.

My approach has been to go to he properties of the courier comment field - Event - On Change and in the expression builder enter [cc in] = yes.
Unfortunately this doesnt work so I'm a bit stuck.

Thanks

Stu
 
you should be right there, in the "on change" event of the text box, click CODE builder then in the code builder type

"cc_in.value = true"

if of course the check box is called cc_in
 
Thanks - I was putting in yes instead of true !!!
What does the .value bit do after the field name ?

Stu
 
You do NOT need to put it in the On Change event. That will fire with every keystroke if something changes. Just put it in the After Update event (not property) of the text box and put something like:

Me.YourCheckboxname = True

you don't need the .value part but you can if you wish and there are no quotes around any of it.
 
like bob says you dont need the .value bit..
i still use it though a remenant of my C++ days and i program code for other people to edit so it helps them understand
 
Ok must be a bit thick guys so bear with me. I've logged on this evening to give your suggestions a try.

If I enter CC In = True I get an error that the macro cant be found
If I enter =CC In = True I get an error that the operation requires perinthesis
If I enter =[CC In] = True I dont get an error but it doesnt work

I've tried all 3 options by adding the .value bit after CC In but it still makes no difference
Stu
 
Ok must be a bit thick guys so bear with me. I've logged on this evening to give your suggestions a try.

If I enter CC In = True I get an error that the macro cant be found
If I enter =CC In = True I get an error that the operation requires perinthesis
If I enter =[CC In] = True I dont get an error but it doesnt work

I've tried all 3 options by adding the .value bit after CC In but it still makes no difference
Stu

Because the liklihood is that you are putting it in the PROPERTY and not the Code Window:
http://www.btabdevelopment.com/main/QuickTutorials/Wheretoputcodeforevents/tabid/56/Default.aspx
 
Thats cracked it and its the first time I've added any VBA code to a database :D

Thanks for your help.
 
Thats cracked it and its the first time I've added any VBA code to a database :D

Thanks for your help.

GladWeCouldHelp.png
 

Users who are viewing this thread

Back
Top Bottom