Event-driven code

  • Thread starter Thread starter Roger
  • Start date Start date
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!
 
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
 
Back
Top