Hello,
If anyone can help, would be much appreciated!
I need VBA code to insert into my form to sort my combo box in this order:
1.BLANK OR NULL
2.PENDING
3.CODING REVIEW
4.DEFERRED
5.BILLED
Thank you in advance!
Hello,
If anyone can help, would be much appreciated!
I need VBA code to insert into my form to sort my combo box in this order:
1.BLANK OR NULL
2.PENDING
3.CODING REVIEW
4.DEFERRED
5.BILLED
Thank you in advance!
The row source is from a select query, filed name "TAR STATUS JS"
The purpose of this field is for the user to use the Combo Box in the form to select what he/she has done to the account, which updates the query and main table with the drop down item they selected. All I want to do is have the query sorted or ordered by in particular order by what their selections, as I listed above.
So basically either have a vba code ordered by in the form or a sql ordered by clause added to the query sql statement.
Thanks!
OK, my mistake... What is the SQL of the row source for the combo box?The row source is from a select query, filed name "TAR STATUS JS"
The purpose of this field is for the user to use the Combo Box in the form to select what he/she has done to the account, which updates the query and main table with the drop down item they selected. All I want to do is have the query sorted or ordered by in particular order by what their selections, as I listed above.
So basically either have a vba code ordered by in the form or a sql ordered by clause added to the query sql statement.
Thanks!
No VBA needed.The row source is from a select query, filed name "TAR STATUS JS"
The purpose of this field is for the user to use the Combo Box in the form to select what he/she has done to the account, which updates the query and main table with the drop down item they selected. All I want to do is have the query sorted or ordered by in particular order by what their selections, as I listed above.
So basically either have a vba code ordered by in the form or a sql ordered by clause added to the query sql statement.
Thanks!
In the table where the values are stored, add a field named "Seq" (what I use - but follow your naming convention), type Integer.
Save the table.
Open the table and enter 1, 2, 3, ... in the Seq field for the order you want for the values:
In the query "TAR STATUS JS" , add the field "Seq" to the design grid, set the SORT row to "Accending" and uncheck the check box in the SHOW row. Save the query. (BTW, it is not a good idea to use spaces in object names or special characters.)Code:Desc Seq CODING REVIEW 3 BLANK OR NULL 1 PENDING 2 BILLED 5 DEFERRED 4
When you view the combo box options, they will be sorted.....
Last edited by ssanfu; 03-15-2012 at 01:13 PM. Reason: spelling