Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Add Method on Conditions Class

Status
Not open for further replies.

suzreid

Technical User
Sep 26, 2000
59
GB
Help!!!

I'm having a real problem trying to use the following piece of code. I don't know if my logic is wrong or what the problem is.

Set BOCond = BODP.Queries.Item(1).Conditions.Add("Dead Patients", "Date of Death", "Between", Me.DTPDateFrom, , Me.DTPDateTo)

Me.DTPDateFrom is a date picker control on a VBA form which is set to date() as the form is initialized.
Date of Death is a date field in the Universe.

Any help is appreciated.


 
You need to add the literal "Constant" after each date parameter, thus ....

Set BOCond = BODP.Queries.Item(1).Conditions.Add("Dead Patients", "Date of Death", "Between", Me.DTPDateFrom, "Constant" , Me.DTPDateTo, "Constant")

see if that works.

(Im with BO!)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top