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

Insert information into a table dynamically?

Status
Not open for further replies.

erwin001

IS-IT--Management
Mar 28, 2006
51
US
I'm using the code listed below to insert a dollar sign into an existing table. The record id's already exist in the table. For each specific record, I want to place a dollar sign in the cell based on the record ID. This code doesn't work. Can anyone offer any suggestions.

Code:
DoCmd.RunSQL "INSERT INTO TBL_LoadReport ([" & insertfieldx & "]) VALUES ('$')WHERE [Report ID] = 7"
 
If the record exists, I think you need an update, rather than an append, query:
[tt]"UPDATE TBL_LoadReport SET [" & insertfieldx & "] = '$' WHERE [Report ID]=7"[/tt]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top