I have a combobox on a form that is assigned to a value list. The rowsource has "Bend";"Puncture";"Torsion";"Impact";"Tension" on the combobox property sheet. My question is how do I duplicate this in VBA. Depending on the value I put in another combobox, I want to edit the values available in this combobox. I tried the following code:
If Forms!frmHeaderEntry!PipeTypeCombo = "Non-UL" Then
TestTypeCombo.RowSource = "Bend"
Else
TestTypeCombo.RowSource = "Bend";"Puncture";"Torsion";"Impact";"Tension"
End If
but I get a syntax error on the line in red (the line with the single value works). I have also tried putting commas between the values. I have also tried removing the quotes. Neither works. What is the proper syntax to accomplish this? I know I can put the values in tables and assign the tables to the rowsource, but I want to keep this little database simple and straightforward.
Thanks.