Activate Check Box on form from action on other form

SoxPats83

Registered User.
Local time
Today, 18:14
Joined
May 7, 2010
Messages
196
i have a check box on a form that is not enabled and is locked, my goal is to have that check box become "checked" when a certain action is performed on another form. for example: if the check box is on "form1" it is unchecked by default. i open "form2" and trigger any one of 4 option buttons, and upon triggering any one of those 4 option buttons, the check box on "form1" magically becomes checked.

Thanks
 
i have a check box on a form that is not enabled and is locked, my goal is to have that check box become "checked" when a certain action is performed on another form. for example: if the check box is on "form1" it is unchecked by default. i open "form2" and trigger any one of 4 option buttons, and upon triggering any one of those 4 option buttons, the check box on "form1" magically becomes checked.

Thanks

I would look at the macro side of Access to start with to get the basic actions sorted, ie you want to open a form, you then want to goto a control.

Then save the macro and place the macro on an empty form in design view then you can convert the macro to VBA code, then I would look at the trigger field and behind it use the Events for after update to run the code.

You haven't mentioned which Version of MS Access you are using so the convert to VBA is either under the tools menu or under the database tools tab.

Hope this helps.
 
do you have any suggestions on how to construct this macro?
 
Can you zip a copy of your database and upload it to this thread (take any sensitive data out, and also make sure the size of the zipped database meets the rules of the forum) and I will take a look, if you tell me which form and which control and what the conditions are that you want to work with.

I will explain what I will have done once I have seen the database to help you understand Access a little more.
 
sorry, uploading it is something that i am not able to do. the description i gave originally is about as clear as i could get. i am open to suggestion on running a query in a macro. that may be something that works for me???
 
If you can't upload the database it makes it harder for people to sort things out. You haven't stated anything about which fields you want to use and what your conditions are! It would help if you can do this.

What is your Access knowledge like? If someone gives you the steps can you follow them and adapt them to your specific needs.

If so then please provide form name's and Field names, what your conditions need to be.
 
i am pretty confident that i can follow steps. especially macro related.

what i have is a form in datasheet view, one of the collums in this datasheet view is a check box. my goal is to make that check box (which is not enabled and is locked) become checked once 1 of 4 options are selected from an option group on another form. i hope that makes a bit more sense than my earlier post. sorry if it is unclear, i have been staring down this problem for quiet a while now.
 
To create your macro, follow these instructions:

Go to your macro window and select New

If using MS Access 2007 select to show all arguments at the top.

Select OpenForm
In the arguments below select the form name

Add another option just below the first argument at the top
GoToControl
In the arguments below type in the control name

Save your macro and name it, something like mcrGoToControl, Close the macro

Now create a new Form in design view

Press F11 to show the navigation pane, then drag your macro into the form, this will create a command button.

Then look for the Database Tools Tab and you will see on the left Convert Form MACRO to Visual Basic, Select this option and it will ask to add error handline and comments, select Yes or OK then you will get a message stating it has converted the macro

Display the Command Button properties and on the On Click Evetn it will give you the code.

These are the steps to follow to get the code to open a form and goto a control.

in the code you will have to add the following after the gotocontrol line
me.the control name goes here.value=True


if me.the control name goes here.value = true then
me.the control name goes here.visible=True
else
me.the control name goes here.visible = False
End if
 

Users who are viewing this thread

Back
Top Bottom