Greetings all,
I have a popup form that is mostly populated with information from a table based off a user's selection from the form the popup is initiated from. They select a record from a dropdown, which pulls the information displayed in the popup form.
In this popup form, the user then enters a quantity number and a few other details. When they click the "Add" button to run the sql statement and insert the details into a new table, I get an error that looks like
????? ' TableName ' ????????
I am using Access '97 on XP.
Here is my code for the "Add" on-click event:
The sql statement works if I run it without the form open using the output of my debug.print. After I get this error, if I open the "Queue" table, it appears to be locked as in no records can be inserted in table view. I have searched the forums and have been unable to find anything similar. Any information would be appreciated!
I have a popup form that is mostly populated with information from a table based off a user's selection from the form the popup is initiated from. They select a record from a dropdown, which pulls the information displayed in the popup form.
In this popup form, the user then enters a quantity number and a few other details. When they click the "Add" button to run the sql statement and insert the details into a new table, I get an error that looks like
????? ' TableName ' ????????
I am using Access '97 on XP.
Here is my code for the "Add" on-click event:
Code:
Dim ShortPN As String
Dim DueDteConv As Date
Dim mySQL As String
If [OverrideDefaultNum] = "Yes" Then
ShortPN = [OverrideNum]
Else
ShortPN = [DefaultPartNum]
End If
DueDteConv = Format([DueDte], "m/d/yyyy")
mySQL = "INSERT INTO Queue
(ShortPN, Qty, Setup, Machine1, Machine2, EntryDte, DueDte) " _
& "VALUES ('" & ShortPN & "'," & [Qty] & "," & [Setup] & ",'" & [Priority1]& "','" & [Priority2] & "',#" & Date & "#,#" & DueDteConv & "#);"
DoCmd.RunSQL mySQL
DoCmd.Close
Comment