Updating Listbox Values

G

Guest

I have a form whereby the values are linked to an SQL database. Right now I
want to add a listbox featuring the change history of an SAF issue. The outer
part of the form uses the SAF table, while the inner one I am using uses the
table called IssueAudit.

After getting the query, I have the values shown in the listbox. I only
wanted the change history thing to look for records that has a change in
CATEGORY. That was done.

However, I am stuck with the final part: I want my values in the listbox to
correspond to the SAF_NO value stored in the SAF table (we also have one as
the FK for the IssueAudit table). I could only get the complete list, but my
intention is that whenever I go to the next record, I want the listbox to
show the values of the next record base on the SAF_NO. How can I accomplish
that?

I am not sure how to do this but help is deeply appreciated.
 
A

Arvin Meyer [MVP]

I ma not positive that I fully understand your issue, but it seems as though
requerying the listbox should solve the problem. If your listbox is based on
a table, change its rowsource to a query or select statement that uses
criteria to get the data you want to see. In the form's after update event,
you can requery the listbox with:

Me.ListBoxName.Requery

and get the new result.
 
G

Guest

My form is split into two parts with the listbox appears in the inner part -
as a subform. The data should match the SAF no which appears in the outer
part of the form.

But when it comes to form coding, how can I accomplish this?
I mean, when when the SAF no moves to the next number, the listbox should
change its values to match the data corresponding to the SAF.

Still stuck.
 

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

Top