Hi Experts,
I need to copy all variables from a list box and place them into a table, I guess that I need to loop the below? the list box is called Sup_Card_List.
Private Sub CmdCopyCards_Click()
Dim sqlD As String
Dim Value9 As String
Value9 = Me.ComponentID
sqlD = "INSERT INTO tblCardtoComponent(Card_ref,Component_ref)VALUES(" & Me.Sup_Card_List & ", " & Value9 & ")"
CurrentDb.Execute sqlD, dbFailOnError
Call RequeryList2
End Sub
This is the query which populates the list box;
SELECT DISTINCT qryCards.CardtoComponentID, qryCards.Card, qryCards.Card_EOL, qryCards.Description FROM qryCards ORDER BY qryCards.Card;
So for each listbox line I need to copy information into a table.....
any help willl be greatly appreciated
I need to copy all variables from a list box and place them into a table, I guess that I need to loop the below? the list box is called Sup_Card_List.
Private Sub CmdCopyCards_Click()
Dim sqlD As String
Dim Value9 As String
Value9 = Me.ComponentID
sqlD = "INSERT INTO tblCardtoComponent(Card_ref,Component_ref)VALUES(" & Me.Sup_Card_List & ", " & Value9 & ")"
CurrentDb.Execute sqlD, dbFailOnError
Call RequeryList2
End Sub
This is the query which populates the list box;
SELECT DISTINCT qryCards.CardtoComponentID, qryCards.Card, qryCards.Card_EOL, qryCards.Description FROM qryCards ORDER BY qryCards.Card;
So for each listbox line I need to copy information into a table.....
any help willl be greatly appreciated