Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Two List Boxes - Can only select one value

Hi,

I have created two list boxes, one which shows the year and the other which shows the month.  Both look at a field called logdate and an expression showing

=YEAR(logdate) and =Month(logdate) respectively.

I want to be able to select the year as 2012 and then select the Month as June.  However I can only seem to select one of the other (e.g: I can only select June or 2012, not June 2012). 

Is there a way in which I can do this?

Also I was wondering if someone could tell me how to re-arrange a list box.  Is currently shows from left to right (Aug, Sept, Oct etc.)  I want it to show Jan, Feb, Mar, Apr etc.

I have attached a file of the section that I am currently looking at.

Regards,

Jon Ditchfield

1 Solution

Accepted Solutions
Not applicable
Author

I have managed to sort this out myself.  In my load script I ran the following:

LOAD *, [logdate] as Logdate_month;

Select *

from opencall

where suppgroup IN ('Financial','Business')

order by callref desc

Then I went into my List Box Properties, General Tab and under Field edited the expression which was showing as:

=Year(logdate) (thanks again to Swuehl). And left it how it was.

However on the Monthly one, I amended the expression to show =Month(logdate_month)

I can select the year and the month, however if I select both the ticks are removed from both, but the query still works.

View solution in original post

3 Replies
swuehl
MVP
MVP

Try a ascending numerical sort order and disable the sort by state.

In your attached sample, Jun is a possible value if 2012 is selected. Are you saying that on selecting Jun, 2012 gets deselected again?

Not applicable
Author

Hi Swuehl,

Thanks for the ascending in numberical sort order, that worked brilliantly.

In my attached sample, if I select 2012, only certain values in the month show (as we have not yet reached sept etc) however if I then click June, 2012 get deselected and all of June shows. 

I want the users to be able to select the year and the month they require.

Regards,

Jon

Not applicable
Author

I have managed to sort this out myself.  In my load script I ran the following:

LOAD *, [logdate] as Logdate_month;

Select *

from opencall

where suppgroup IN ('Financial','Business')

order by callref desc

Then I went into my List Box Properties, General Tab and under Field edited the expression which was showing as:

=Year(logdate) (thanks again to Swuehl). And left it how it was.

However on the Monthly one, I amended the expression to show =Month(logdate_month)

I can select the year and the month, however if I select both the ticks are removed from both, but the query still works.