Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Simple One - Save new record

Status
Not open for further replies.

ZOR

Technical User
Jan 30, 2002
2,963
GB
I have been away too long from Access. I have a textbox on an unbound form. I type a number in, and press a button called save. It puts the contents of the textbox into a field called TTT in a table called Logs. Can someone please fill me in with the syntax. Thanks
 
Code:
CurrentDb.Execute _
INSERT INTO Logs (TTT) VALUES('" & txtBox.Value & "')"
 
Dont think so? Syntax all in red!!!

Access 2003

Thanks
 
Sorry
Code:
CurrentDb.Execute _
[red]"[/red]INSERT INTO Logs (TTT) VALUES('" & txtBox.Value & "')"
 
Keeps reporting OBJECT REQUIRED? Thanks
 
Are you running DAO or ADO? The above assumed DAO. If its ADO then
Code:
CurrentProject.Connection.Execute _
"INSERT INTO Logs (TTT) VALUES('" & txtBox.Value & "')"
 
Thanks very much, the last one did it. Best regards
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top