update fields in tables

  • Thread starter Thread starter peter junker
  • Start date Start date
P

peter junker

Hello - if id like to update fields in a table, without using a form, is
this possible
automaticly after i left a field.
for example - i put in the coustomer ID - after i did update the field, id
like to update based on the coustomer ID - all the dates directly in this
table ( the fields ) , not in the form!

thanks peter
 
You can do it by executing a SQL statement. The following is necessarily a
generic, abstract example as I don't know what values you need to put into
what fields, etc ...

CurrentProject.Connection.Execute "UPDATE YourTable SET YourField = " &
Me!YourTextBox & " WHERE CustomerID = " & Me!YourCustomerIDTextBox

--
Brendan Reynolds (MVP)
http://brenreyn.blogspot.com

The spammers and script-kiddies have succeeded in making it impossible for
me to use a real e-mail address in public newsgroups. E-mail replies to
this post will be deleted without being read. Any e-mail claiming to be
from brenreyn at indigo dot ie that is not digitally signed by me with a
GlobalSign digital certificate is a forgery and should be deleted without
being read. Follow-up questions should in general be posted to the
newsgroup, but if you have a good reason to send me e-mail, you'll find
a useable e-mail address at the URL above.
 
Hello Brendan,

i have a field in the bestellungen_tbn ( coustomerID ) - after i did choose
the number in the database - non in a form - i'd like to update the database
automaticly- after i put in the coustomerID a query o macro should pick the
street, zip code etc...and update the database - not a form!

CurrentProject.Connection.Execute "UPDATE YourTable SET (my table-name???)
YourField( coustomerID = " &
Me!YourTextBox which field ??? table coustomer or Bestellungen_tbn& "
WHERE CustomerID (which table ) = " & Me!YourCustomerIDTextBox(which table
( and field )

thanks Peter
 
I'm sorry, Peter, I'm afraid I don't understand what you're asking here.

--
Brendan Reynolds (MVP)
http://brenreyn.blogspot.com

The spammers and script-kiddies have succeeded in making it impossible for
me to use a real e-mail address in public newsgroups. E-mail replies to
this post will be deleted without being read. Any e-mail claiming to be
from brenreyn at indigo dot ie that is not digitally signed by me with a
GlobalSign digital certificate is a forgery and should be deleted without
being read. Follow-up questions should in general be posted to the
newsgroup, but if you have a good reason to send me e-mail, you'll find
a useable e-mail address at the URL above.
 
Back
Top