This one always gets me in a bind & I can't seem to find the answer anywhere... I would like to open a report where the field in the record source is a variable. The following works fine where the field is boolean:
DoCmd.OpenReport "rptReport", acViewPreview, , "[StringFieldName] = -1"
I would like the [StringFieldName] part of the where condition to be selected from a combobox on the same form. For example, Me.cboComboBox.Column(1). I never get the syntax right to get this to work, so would greatly appreciate any help! (I've tried many combinations but I am obviously misunderstanding the correct syntax).
DoCmd.OpenReport "rptReport", acViewPreview, , "[StringFieldName] = -1"
I would like the [StringFieldName] part of the where condition to be selected from a combobox on the same form. For example, Me.cboComboBox.Column(1). I never get the syntax right to get this to work, so would greatly appreciate any help! (I've tried many combinations but I am obviously misunderstanding the correct syntax).