help me with some queries please

rajt

New member
Local time
Today, 09:54
Joined
Mar 5, 2008
Messages
4
hi!
i am working on a project on access with visual basic, i want to do the following....
on an access form i have a textbox that is related to a table, and i want that the word that anyone writes there has to be added to the table, so i made this query association but it doesn't work, please someone help me!
query:
INSERT INTO tblNames(name) values(textbox1.text);

:confused: help me please, how do i do that on access?

also i put a command button and made it the way add to table but it lets me but doesn't add it :(

help please!

thank you!
 
SQL statement in the query:-

INSERT INTO tblNames (Name) values ([Forms]![yourFormName]!textbox1)


Code in the ON Click event of the command button:-

DoCmd.OpenQuery "yourQueryName"


Note:
Name is a reserved word in Access. Better avoid using it as a field name.
.
 

Users who are viewing this thread

Back
Top Bottom