Requery listbox

A

Annette

I have a main form that has a client information and a listbox of
already entered services. Upon clicking a service entry in the
listbox, a subform appears on the main client form showing the details
of the service selected with all the activity for the selected
service.

I also have a button to add more services for the client. If someone
clicks to add a service, the focus will switch to the subform and they
are able to enter service/activity information. I would like the
listbox at the top of the main form to show the newly added service
without having to click a "requery" button or exiting the form and
coming back in.

Any suggestions?
 
J

John W. Vinson

I have a main form that has a client information and a listbox of
already entered services. Upon clicking a service entry in the
listbox, a subform appears on the main client form showing the details
of the service selected with all the activity for the selected
service.

I also have a button to add more services for the client. If someone
clicks to add a service, the focus will switch to the subform and they
are able to enter service/activity information. I would like the
listbox at the top of the main form to show the newly added service
without having to click a "requery" button or exiting the form and
coming back in.

Any suggestions?

Requery the listbox in the AfterUpdate event of the Subform:

Forms!mainform!listboxname.Requery
--

John W. Vinson [MVP]
Microsoft's replacements for these newsgroups:
http://social.msdn.microsoft.com/Forums/en-US/accessdev/
http://social.answers.microsoft.com/Forums/en-US/addbuz/
and see also http://www.utteraccess.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top