U
unhinged
G'day all,
I have inherited a system with a search function screen that is acting
weird. There are actually two search screens, both constructed in a
similar fashion, but the first does what it is supposed to do and the
second is misbehaving.
The form has a bunch of unbound controls allowing the user to enter
search criteria. The only mandatory criteria is the sort order, which
is set from a combo box. The data source for the combo box is a table,
sys_GAPSSortBy, which contains a list of query names and a user-
friendly label for use by the combo box. When the user clicks the
"Search" button, the rowsource for the list box is updated with the
query name from sys_GAPSSortBy, and then a requery is performed on the
list box.
The queries show the same data but have different sort orders - why
there isn't just one query that gets modified in code, I don't know.
There are two queries which sort on a formatted date field (ascending
and descending) and they sort the date as though it was text. With the
working search screen, I included the unmodified date field and sorted
on that without displaying it and that now works. Not so with the GAPS
search form, even though I have modified the queries in exactly the
same fashion.
I also do not get the correct headers for these queries in the list
box, and checking has revealed that they are also incorrect in
datasheet view (and so is the sort order... weird!).
Does anybody have any clue what the problem is here? If it is
corruption, is there an automated method for recreating the faulty
objects?
Ta,
Daniel.
I have inherited a system with a search function screen that is acting
weird. There are actually two search screens, both constructed in a
similar fashion, but the first does what it is supposed to do and the
second is misbehaving.
The form has a bunch of unbound controls allowing the user to enter
search criteria. The only mandatory criteria is the sort order, which
is set from a combo box. The data source for the combo box is a table,
sys_GAPSSortBy, which contains a list of query names and a user-
friendly label for use by the combo box. When the user clicks the
"Search" button, the rowsource for the list box is updated with the
query name from sys_GAPSSortBy, and then a requery is performed on the
list box.
The queries show the same data but have different sort orders - why
there isn't just one query that gets modified in code, I don't know.
There are two queries which sort on a formatted date field (ascending
and descending) and they sort the date as though it was text. With the
working search screen, I included the unmodified date field and sorted
on that without displaying it and that now works. Not so with the GAPS
search form, even though I have modified the queries in exactly the
same fashion.
I also do not get the correct headers for these queries in the list
box, and checking has revealed that they are also incorrect in
datasheet view (and so is the sort order... weird!).
Does anybody have any clue what the problem is here? If it is
corruption, is there an automated method for recreating the faulty
objects?
Ta,
Daniel.