Added Table to Form SQL: VBA not Detecting ComboBox (1 Viewer)

Bill Bisco

Custom User Title
Local time
Today, 07:08
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
 

TJPoorman

Registered User.
Local time
Today, 06:08
Joined
Jul 23, 2013
Messages
402
Not sure if it will make any difference, but try taking out the space in the name. Something like cboPlantID.
 

Bill Bisco

Custom User Title
Local time
Today, 07:08
Joined
Mar 27, 2009
Messages
92
Thank you I will try that!
 

Users who are viewing this thread

Top Bottom