
recordset record position change upon the Datacombo change...
I just had a problem like this....I have a fully
bound datacombo, I change the value, the text
changes but the datasource recordset doesn't -
until you move off the current record that is(I
can see why, but there should be a way of forcing
it).
This is a bit tedious - especially when you only
have one record in the recordset that's being
changed.
I shoved a bit of code....
rs.absoluteposition = rs.absoluteposition
before calling rs.update and it works.
Hope this helps.
Chris.
In article
Jim in Cleveland
Quote:
> > Edwin,
> > If you do find the answer PLEASE E-mail
me, I am having the same
Quote:
> > problem.
> > So far, no one can tell me how to fix
this problem.
> > > I got a Datacobo and bind the list to a
Recordset....
> > > datacombo1.boundcolumn = "BankCode"
> > > set datacombo1.rowsource = Rs1
> > > datacombo1.listfield = "BankDesc"
> > > 'I didnt set the datasource coz we just
pick a value from the
Quote:
> > > list(datacombo1.boundtext)!
> > > When I select/move/scroll the list item in
the datacombo i tried to print
Quote:
> > > the boundtext .. it displayed
correctly ,but when i try to get the other
Quote:
> > > column value from the same recordset (Rs1)
e.g. print
> > > Rs1.fields("BankLocation") .... It always
stay at the First record !!!!!
Quote:
> > > What can i do.??
> > > Actually I did think about to do a Rs.Find
method... but It's seem it will
Quote:
> > > have problems when u use the same recordset
with diff. datacmobo , is it?
Quote:
> I posted an answer for a similar issue with
the DBCombo control this
Quote:
> past week. Maybe the same idea will help you
too. Remember that your
Quote:
> DataCombo is loaded from the RowSource
recordset; there is no magical
Quote:
> connection after it is loaded. You need to
create the interaction
Quote:
> yourself: in the _Change event of the
DataCombo control, place the
Quote:
> following code:
> Rs1.Bookmark = DataCombo1.SelectedItem
> Now when you change the selected item in the
DataCombo, your position
Quote:
> in the RowSource recordset moves to the record
for the selected item -
Quote:
> you can then refer to any field of that
particular record.
> This approach may produce unpredictable
results if there are any
Quote:
> deletions/additions to RowSource recordset
without a corresponding
Quote:
> ReFill/Refresh of the DataCombo. Also, as
Edwin mentioned, there will
Quote:
> be problems using one recordset as RowSource
for two DataCombo
> controls: your position in the recordset will
be based on the DataCombo
Quote:
> that was changed most recently (since you can't
be two places at once).
Quote:
> Possible solution: set separate Bookmark names
for each DataCombo - when
Quote:
> you want to reference some field for the record
selected in DataCombo1,
Quote:
> refer to Bookmark1; for the record in
DataCombo2, refer to Bookmark2.
Quote:
> I hope this helps.
> --
> Jim in Cleveland
> If you're writing to me, in my address
> change "REAL_Address.see.below"
to "worldnet.att.net"
Quote:
> "What's so funny 'bout peace, love &
understanding?"
> - Nick Lowe
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.