Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

adding a record to sql tables from a form

0 views
Skip to first unread message

RON

unread,
Mar 22, 2006, 11:35:24 PM3/22/06
to
hello,
can anyone help me as i am really strugling.

I have made a form in access, with such things as lastname, firstname,
address, etc and people can enter this into text boxes on a form.

then i want an isert button that will take anything that is in those
textboses and put them into a sql table.

i know how to open up a connection to the sql server, but thats where it
ends really

so for example say this form has a field called Lastname and it is in
txtLastName When Insert is pressed I want the text of txtLastName to go
into my SQL Table, named Users for example and I want it to go into the
LastName field

thatnks for any help anyone can provide


TC

unread,
Mar 22, 2006, 11:46:59 PM3/22/06
to
You don't need any code, at all.

Just set the RecordSource property of the form, to the name of the
table. Then set the ControlSource property of each textbox, to the name
of the corresponding field in that table.

Voila! You now have a so-called "bound form". You'll be able to query,
add, edit & delete records to the table, using that form, without
having any code.

Maybe get an introductory Access book? Access can do tons of things,
but it's hard to learn without some help!

HTH,
TC (MVP Access)
http://tc2.atspace.com

RON

unread,
Mar 22, 2006, 11:55:46 PM3/22/06
to
i want to update an SQL Server table with the data that is in my access
forms text boxes.. i dont want to just put this data into a table in
access.

is this still possible or did i miss understand?

"TC" <gg.20.k...@spamgourmet.com> wrote in message
news:1143089219.8...@z34g2000cwc.googlegroups.com...

TC

unread,
Mar 23, 2006, 12:08:46 AM3/23/06
to
Then just create a "linked table". A linked table looks and works just
like a local table, but it actally points to the real table in a
different Access database file, or, a table in a different product such
as SQL*Server.

For various reasons I can not give you a step by step on hw to creae
the linked table. Try googling "linked tables", you'll doubtless find
lots of information. Or someone else will jump in & help. The key thing
is, YES you can easily do what you want, and NO, you do not need any
actual code!

0 new messages