View Full Version : problem with or


asp_learner
01-09-2002, 05:44 AM
I have a form where I am allowing the user to either user a combobox for a date period or to chose from two text boxes for a start and end date.

On the report I have a textbox with the followingsource: =[Forms]![Request Date for Quarterly Report]![cboWhatQuarter].[Column](1) Or [Forms]![Request Date for Quarterly Report]![txtStartDate]

I can only get this code to work if I offer only a combobox to choose period. I want the user to have the flexibility of entering their own dates as well. Is there anything wrong in my data source for the textbox

Thanks,
Eva

Rich
01-09-2002, 06:04 AM
Cheat a little, just keep the reference to the one text box on the form, in the after update or change event of the combo set the value in the text box
ie. Me.txtBox = Me.cboWhatQuarter.Column(1)
you could disable the combo box if the user types directly into the text box
HTH

asp_learner
01-09-2002, 09:17 AM
You made my day. That worked great.

Many Thanks,
Eva

[This message has been edited by asp_learner (edited 01-09-2002).]