need emercency help DoCmd.RunSQL Sql error

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • dstyles7
    New Member
    • Mar 2007
    • 8

    need emercency help DoCmd.RunSQL Sql error

    there are two list boxes in a form i have a command populate button that takes the values from the list box and inserts the primary key value from the selected list box into a access table. The table populates correctly it shows a message box

    "You are about to append 1 row(s).
    Once you click yes, you can't undo command to reverse the changes
    Are you sure you want to append the selected rows "YES OR NO"

    The cod behid the populate button is

    Private Sub cmdPopulate_Cli ck()


    Set mDB = CurrentDb
    Dim Sql As String


    Sql = "INSERT INTO FFtolW_FieldLin ks (FFFieldLink, LWFieldLink) Values" _
    & "(" & Me.lstFieldName & "," & Me.lstlwfield & ")"
    Debug.Print

    DoCmd.RunSQL Sql
Working...