Selecting new record in listbox after record is added 
Author Message
 Selecting new record in listbox after record is added

I have a listbox that when a user selects an items, the other controls are
automatically updated with the cloned recordset bookmark:

Set rs = Me.Recordset.Clone
    rs.FindFirst "[ID] = " & Me![lstClients]
    Me.Bookmark = rs.Bookmark

However, when a user adds a record, the item selected in the list stays the
same, but the controls display the added record.  How do I get the listbox
to update itself to display the record that was just added.  I've tried
list.refresh, requery, form.requery, refresh, repaint, all of the above and
then some.



Tue, 04 Jan 2005 07:27:58 GMT  
 Selecting new record in listbox after record is added
What about lstClients = Me.ID

Jack


Quote:
> I have a listbox that when a user selects an items, the other controls are
> automatically updated with the cloned recordset bookmark:

> Set rs = Me.Recordset.Clone
>     rs.FindFirst "[ID] = " & Me![lstClients]
>     Me.Bookmark = rs.Bookmark

> However, when a user adds a record, the item selected in the list stays
the
> same, but the controls display the added record.  How do I get the listbox
> to update itself to display the record that was just added.  I've tried
> list.refresh, requery, form.requery, refresh, repaint, all of the above
and
> then some.



Tue, 04 Jan 2005 08:05:37 GMT  
 Selecting new record in listbox after record is added
That was so simple!  Thanks.


Quote:
> What about lstClients = Me.ID

> Jack



> > I have a listbox that when a user selects an items, the other controls
are
> > automatically updated with the cloned recordset bookmark:

> > Set rs = Me.Recordset.Clone
> >     rs.FindFirst "[ID] = " & Me![lstClients]
> >     Me.Bookmark = rs.Bookmark

> > However, when a user adds a record, the item selected in the list stays
> the
> > same, but the controls display the added record.  How do I get the
listbox
> > to update itself to display the record that was just added.  I've tried
> > list.refresh, requery, form.requery, refresh, repaint, all of the above
> and
> > then some.



Wed, 05 Jan 2005 04:31:24 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Adding a new record to a form whose record source is a listbox

2. Problem Adding New Record using Select-Record Combo Box

3. Stopping a user add a new record after adding a record

4. I am attempting to add new records to a SQL Server 7 database from Microsoft

5. synchronize record counter with record selected off of listbox

6. Synchronize record counter with record selected off a listbox

7. Select item in listbox the record just added

8. New record added to listbox, but won't load rec in form when selec

9. Highlight selected record in listbox ; resize listbox

10. Open New Record combo with previous record combo choice selected


 
Powered by phpBB® Forum Software © phpBB Group