G
gg
Hi all,
I have a form who's rowsource is programatically modified based on an
options group. The query results in a 10 column list where the user is
allowed to choose only one from the list.
Example: the user is presented with an initial list (we will call them)
"open jobs" that is chosen from a combo box. If the user selects (from
the combo box) "closed jobs" the program will replace the list box's
rowsource to coincide with the new user selection and requery the
source to the list box. And the listbox returns the correct
information in all cases.
Now, I have been trying to access the user selection information in two
ways by referencing the column [me.lstbox.column(4)] and alternately
referencing the "presumably" same data using the field name
[me.lstbox.Recordset.Fields("fldName").
In debug:
Both sets of data are identical using either of the above methods.
UNITL I toggle one of the open/closed job elements in the combo box.
It seems that after a requery of the listbox the data is perfect when
selected with the "column" method and TOTALLY messed up with the
"recordset" method.
The problem seemingly occurs when a requery occurs and my guess is that
the recordset is not being managed properly.
My question:
1. Have any of you encountered this problem before and possibly
resolved it?
2. Since the problem NEVER occurs after Form_Load I h ave been trying
to find methods of closing the recordset and re-initializing it after
the requery takes place but have been unsuccessful. Can comeone here
give me some methods of accompishing this. I am not as proficient as I
would like to be, and therefore am requesting some help here.
Thanks in advance
GG
I have a form who's rowsource is programatically modified based on an
options group. The query results in a 10 column list where the user is
allowed to choose only one from the list.
Example: the user is presented with an initial list (we will call them)
"open jobs" that is chosen from a combo box. If the user selects (from
the combo box) "closed jobs" the program will replace the list box's
rowsource to coincide with the new user selection and requery the
source to the list box. And the listbox returns the correct
information in all cases.
Now, I have been trying to access the user selection information in two
ways by referencing the column [me.lstbox.column(4)] and alternately
referencing the "presumably" same data using the field name
[me.lstbox.Recordset.Fields("fldName").
In debug:
Both sets of data are identical using either of the above methods.
UNITL I toggle one of the open/closed job elements in the combo box.
It seems that after a requery of the listbox the data is perfect when
selected with the "column" method and TOTALLY messed up with the
"recordset" method.
The problem seemingly occurs when a requery occurs and my guess is that
the recordset is not being managed properly.
My question:
1. Have any of you encountered this problem before and possibly
resolved it?
2. Since the problem NEVER occurs after Form_Load I h ave been trying
to find methods of closing the recordset and re-initializing it after
the requery takes place but have been unsuccessful. Can comeone here
give me some methods of accompishing this. I am not as proficient as I
would like to be, and therefore am requesting some help here.
Thanks in advance
GG