Referencing "non-bound" columns in a listbox

L

Lance

Hello,

I currently have a list box, which lists 4 fields from 1 table (uses 5
including autoID)

AutoID
Name (text)
Amount (number)
Date (date)
Paid (Yes/No)

Data is inserted into this listbox from a menu, that lets you select
the name, amount, and date.

I would like to be able to select an item in the listbox, and then
click a button that will toggle the "paid" field from no to yes.

My approach was to have the button run an update query, which depending
upon the record selected, would check the Paid field, and then update
it to the opposite (so if yes, then query runs no, if no, then query
runs yes).

However, I cannot figure out how to pull the value from the listbox for
the paid field, to check this?

Any ideas?

Thanks,

lance
 
R

Rick Brandt

Lance said:
Hello,

I currently have a list box, which lists 4 fields from 1 table (uses 5
including autoID)

AutoID
Name (text)
Amount (number)
Date (date)
Paid (Yes/No)

Data is inserted into this listbox from a menu, that lets you select
the name, amount, and date.

I would like to be able to select an item in the listbox, and then
click a button that will toggle the "paid" field from no to yes.

My approach was to have the button run an update query, which
depending upon the record selected, would check the Paid field, and
then update it to the opposite (so if yes, then query runs no, if no,
then query runs yes).

However, I cannot figure out how to pull the value from the listbox
for the paid field, to check this?

Any ideas?

Me!NameOfListBox.Column(4)

The column numbers start with zero.
 

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