Added Table to Form SQL: VBA not Detecting ComboBox

Bill Bisco

Custom User Title
Local time
Today, 13:43
Joined
Mar 27, 2009
Messages
92
Dear all,

I have form in which I modified the record source to include another table. Because I did that, the code no longer recognizes my combo box, Plant_Combo. See below.

DoCmd.RunSQL "INSERT INTO Plant_Program (PlantID, ProgramID) VALUES (" & Me.Plant_Combo & "," & Me.ProgramID & ")"

What can I do to get my VBA Code to recognize the combo box on my form now?

Thanks,

Bill
 
Not sure if it will make any difference, but try taking out the space in the name. Something like cboPlantID.
 
Thank you I will try that!
 

Users who are viewing this thread

Back
Top Bottom