bduke,
Thank you for the response.
I have a combo box that displays all the machine names from a record set. Under the combo box is the list box that lists all the work performed related to each machine.
I now add a check box. Once user check the check box, I will need to insert the machine number into a new table.
The check box code is:
Dim x As String
If ChkBox.Checked Then
x = (db100_rec_array(CombEquip.SelectedIndex))
cnDataFile.Execute("INSERT INTO Inspect values x")
End If
When I trace the program, x has the value of "12345", but it didn't insert that value into the table.I hard coded it as
cnDataFile.Execute("INSERT INTO Inspect values '12345')"). It worked.
I noticed that declaring x as a string, the assigned value has double quto of "12345". I tried to declare x as a number and put cnDataFile.Execute("INSERT INTO Inspect values 'x')"), it inserted x into the table.
Am I on the right track? Or is there a better way to do this?
Thank you.