ComboBox Changes value of Checkbox

Galan

Registered User.
Local time
Today, 17:24
Joined
Oct 6, 2003
Messages
19
Here's another Top 1,000 stupid Question:

i have a combobox which has 6 colums on one of the colums it has a yes/no cell from table Inventroy. How can I make the ComboBox change the value of the checkbox based on the data on table inventory??

I have the following code

Private Sub carmodel_AfterUpdate()

Me.carlice = Me.carmodel.Column(6)
Me.carnum = Me.carmodel.Column(3)
Me.carcolor = Me.carmodel.Column(2)
Me.mileout = Me.carmodel.Column(7)
Me.checkrented = Me.carmodel.Column(5)
End Sub

But this doent change :-( see the Form is made up of Table Client, which is to get all the client information & the current car that the client wants to rent. The Car Selection part, is where the combobox is at, which is connected to the Inventory Table, & the Check box is what changes the value yes/no.
 
With checkboxes you need to specify the dot notation ".Value", like so:
Code:
Me.checkrented.value = Me.carmodel.Column(5)

but you may need to convert the Me.carmodel.Column(5) value into a 0 or -1 for it to work corectly. I don't think passing it a yes or no, true or false string will work:

0=No=False
-1=Yes=True
 
Clark,

Yes your right, its -1 / 0. The Combo Box display yes/no How can I tell Access if that selection on the Combobox has a yes (-1) to check the checkbox?? If not the to leave it alone??
 
Just set the control source of the checkbox to =Nz([carmodel].[Column](5)), in fact you could do that for all of these text boxes and do away with the code alltogether
 
Great Rich Thanx, However Is their anyway to make it so that is clickable,
It says it cant be edit because Its bound to (=Nz([carmodel].[Column](5)) . Also I would like to know where I can find a Tutorial on those expression cause I have no Idea how to work with does. THANK you!!!!
 

Users who are viewing this thread

Back
Top Bottom