Set a property on a subform

grogmi1

Registered User.
Local time
Today, 10:33
Joined
Oct 26, 2012
Messages
56
Hello,

I am looking for some help with a Yes/No tick box on a subform. I have a combo box (combo20) on my main form which finds records on my main form and the relevant matching details on my subform.
What I would like to do is -------------When the Vehicle number is selected from the combo box on the main form, a yes/no box will be un-ticked on the sub form.

Can this be done ?

Main form name: CarAdEntry_FRM
Sub form name: CarHist_FRM
Combo box on main form name: combo20
Yes/No control on subform: ActiveAD

Thank you
 
Absolutely. On the combo box's After Update Event, use:

Me.[CarHist_FRM]![ActiveAD] = False

Referencing your control can be tricky. And there are more than one way to refer to them. This method has always worked for me...
 
Thanks for the reply. I tried putting the exact above statement into the After Update Event and it didn't work. Sorry, I'm a bit of a Access dummie so any steps on how to do this would be much appreciated
 
I have no code at the moment just a combo box on a form that looks up records
 
I am referring to the words "code" you typed into the afterupdate event for the combo box.

If that cant work for you, post a scaled down version of your DB?
 
I entered exactly this :

Me.[CarHist_FRM]![ActiveAD] = False
 
In design view, when you right click on combo20 control, choose Properties. On the Events tab, select After Update. It should have [Event Procedure] in the field. All the way to the right should be a small box with three dots.

Click on the dots which will take you to the VBA editor. Select the code you see there and paste it here so I can see exactly what you are working with. Without that, we will be here for quite some time until we can drill down to the issue.
 
Scratch that, It works !!!! Id entered the control name incorrectly. Thankyou so much for you help
 
Yeah, Access isn't good at figuring out what you really meant to type and can be quite the prude if you don't get it right.

Glad it worked, best of luck with the rest of your project.

Salute!
 

Users who are viewing this thread

Back
Top Bottom