Unanswered: Help! passing true value from form to query
This I would have thought would be an easy question to answer, but microshit strikes again. I have a form, which an unbound combo box gets its values from a union query. I set an additional value in the union query to <ALL> and then I give an event based on the selection in the combo box. My understanding of access is if you open a query and type True as the criteria for any field it will give you all the records where there is a value in that field. I have tested this directly in the query and it works. However, I try passing this value from my form to the query and it always fails. Here is my simple code:
Private Sub Combo6_AfterUpdate()
If Combo6 = "<ALL>" Then
Combo6.Value = True
Combo6.Value = Combo6
The above code works correctly in passing a null value in a sample database which I am referencing from a book to help me. Why is it not passing a True value to my query????????
Actually the bound column in the combo box is a number, which I have considered, but if I assign a number to the <ALL> value, such as -1, I dont know how to do the other side to make the -1 value represent True. I will post a sample to help anyone to help me.
I d/l your database but don't see a ComboBox labeled as "Combo6"? Which form is that on? Next, exactly what are you wanting to happen with the ComboBox, rather After you select your choice in the ComboBox???