Event-driven code

R

Roger

I hope someone can help me with a simple code; I'd be very
appreciative! How would I write the an event-driven code
that will: store data from a listbox (FormA) to a
particular field(1) of a table(Z)?

Thanks in advance for any and all help!
 
A

Alex Dybenko

in case you use DAO:
in listbox afterupdate event write:

currentdb.execute "Update Z set Field1=" & me.Listbox1

if field have text type then

currentdb.execute "Update Z set Field1='" & me.Listbox1 & "'"

also you need to add where to locate a record where you want to store, else
you update all records
 

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