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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

insert into a table from a text field

Status
Not open for further replies.

waymond

Programmer
Mar 1, 2005
118
US
I have a text field that displays the data from another pop up box form I need to insert that data once displayed into the table because after the form is closed it loses it value. The field is as400narr
 
You can use the SQL statement Insert.

CurrentDB.Execute "INSERT INTO table (as400narr) VALUES ('" & txtField & "')
 
where do I put the above code to make this work? thank You
 
where does this code reside in the afterupdate or where?

thank You
 
Im trying the following code:

CurrentDb.Execute "INSERT INTO OBJECT(as400narr) VALUES [Forms]! [objQry1] ! [text35]"

is this possible now I am getting syntax errors
Please Help
 
I would use a command button and the On_Click() event.

CurrentDb.Execute "INSERT INTO OBJECT(as400narr) VALUES ('" & [Forms]![objQry1]![text35] & "')
 
still does not work does not update the table with the value
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top