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

I still need help with this run time error!!!!!!

Status
Not open for further replies.

chubby

Programmer
Apr 28, 2001
278
US
I have check the spelling of my tables. Double checked the code and I still can't figure out the problem with my code. I'm still getting a run time error '3192'

Private Sub UIC_tbl_ID_NotInList(NewData As String, Response As Integer)
DoCmd.RunSQL ("INSERT INTO UIC_tbl_ID (UIC_tbl_ID_) VALUES ('" & NewData & "')")
Response = acDataErrAdded
Me.UIC_tbl_ID.SetFocus

End Sub
 
Is this Access or SQL Server table???
You have to do it like so in Access. "Values" does not work.

example 1: gets data from another table

INSERT INTO Grocerys1 ( Barcode, Description )
SELECT Grocerys.Barcode, Grocerys.Description
FROM Grocerys;

Example 2: data from other variables

INSERT INTO Grocerys1 ( Barcode, Description )
SELECT 35335 AS expr1, [flour] AS expr2;

Access is weird but that works



DougP, MCP

Visit my WEB site to see how Bar-codes can help you be more productive
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top