Visual Basic to Access
-
I am using Visual Basic to make a website and I want a user to be able to enter things in a Textbox and have that information put into access. I am using a Inset statement but it does not work. I am useing: INSERT INTO Results (Application_contact) VALUES (AC.[text]) And it does not work does anyone have any ideas how i can have the textbox information put into a access?? PLEASE HELP!!
-
I am using Visual Basic to make a website and I want a user to be able to enter things in a Textbox and have that information put into access. I am using a Inset statement but it does not work. I am useing: INSERT INTO Results (Application_contact) VALUES (AC.[text]) And it does not work does anyone have any ideas how i can have the textbox information put into a access?? PLEASE HELP!!
Ronak085 wrote:
INSERT INTO Results (Application_contact) VALUES (AC.[text])
What is AC, and how are you using this code, in Access ? What does 'does not work' mean ? Does it compile ? What does it do ?
Christian Graus - Microsoft MVP - C++ "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
-
I am using Visual Basic to make a website and I want a user to be able to enter things in a Textbox and have that information put into access. I am using a Inset statement but it does not work. I am useing: INSERT INTO Results (Application_contact) VALUES (AC.[text]) And it does not work does anyone have any ideas how i can have the textbox information put into a access?? PLEASE HELP!!
Am i correct in thinking Application_contact is a field name and AC.[text] is the text within a textbox named AC? If i am correct then the SQL code is wrong. This part
Ronak085 wrote:
VALUES (AC.[text])
will do nothing. For example if you wanted to insert the text 'AC.[text]' then the code would need to look like: VALUES ('AC.[text]') (note a string literal must be enclosed '') if AC.[text] is a variable (which i think it is) it needs to be: VALUES ( '" & AC.[text] & "') string variables must be enclosed '" & & "' Numerics are " & & " and with Access dates are #" & & "# #EDIT# And before anyone else nags me about it. I know parameterized queries are better. Jon
-
I am using Visual Basic to make a website and I want a user to be able to enter things in a Textbox and have that information put into access. I am using a Inset statement but it does not work. I am useing: INSERT INTO Results (Application_contact) VALUES (AC.[text]) And it does not work does anyone have any ideas how i can have the textbox information put into a access?? PLEASE HELP!!
you should try AC.value, i programming in vba of access 2003 and i haven't access to control.text except if he has focus, i use value property to get text from text field.
Manuel say: Greetings from Mexico, Cuando salga el sol, no estare aqui... --------------------------------------- Web: http://www.otakuzone-fanzine.com Forum: http://www.otakuzone-fanzine.com/foro
-
Ronak085 wrote:
INSERT INTO Results (Application_contact) VALUES (AC.[text])
What is AC, and how are you using this code, in Access ? What does 'does not work' mean ? Does it compile ? What does it do ?
Christian Graus - Microsoft MVP - C++ "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
-
Am i correct in thinking Application_contact is a field name and AC.[text] is the text within a textbox named AC? If i am correct then the SQL code is wrong. This part
Ronak085 wrote:
VALUES (AC.[text])
will do nothing. For example if you wanted to insert the text 'AC.[text]' then the code would need to look like: VALUES ('AC.[text]') (note a string literal must be enclosed '') if AC.[text] is a variable (which i think it is) it needs to be: VALUES ( '" & AC.[text] & "') string variables must be enclosed '" & & "' Numerics are " & & " and with Access dates are #" & & "# #EDIT# And before anyone else nags me about it. I know parameterized queries are better. Jon