add a record

R

Rpettis31

I have a form with a listbox that has items and I would like to select an
item record from the listbox and lookup the value on another table by opening
up an item details form frmItem_details. I know how to get the value from the
list box, on a focus event
strItem=me.lstbxItemList.column(1).Value however, I do not know how to open
the details form looking up the item that was selected. I would like to
either get the detail record or be able to create a new record.
 
P

PieterLinden via AccessMonster.com

Rpettis31 said:
I have a form with a listbox that has items and I would like to select an
item record from the listbox and lookup the value on another table by opening
up an item details form frmItem_details. I know how to get the value from the
list box, on a focus event
strItem=me.lstbxItemList.column(1).Value however, I do not know how to open
the details form looking up the item that was selected. I would like to
either get the detail record or be able to create a new record.

pass the value (strItem) in the DoCmd.OpenForm command to show only that
record. IF you're only selecting a single value, why not just use a combobox?
 

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