Microsoft Access Forms

emuplains

New member
Joined
Sep 7, 2005
Messages
3
Programming Experience
1-3
I am having problems specifying multiple WhereConditions to open a Microsoft Forms based on some clauses. The sections of code I am using to open the form without a clause works and is below:

If clause = "" Then
' Open the form in normal mode
oAccess.DoCmd.OpenForm(FormName:=rep, _
View:=Access.AcFormView.acPreview)
End If

I am trying to pass a Wherecondition of a Date using the following code and I get a dialog box in Access opening with market_date as the heading:

If Not clause = "" Then
' Open the form with date as clause
oAccess.DoCmd.OpenForm(FormName:=rep, _
View:=Access.AcFormView.acPreview, _
WhereCondition:="market_date=#" + clause + "#")
End If

I also tried to use multiple WhereConditions with no luck. If someone could shed some light on this subject for me it would be very helpful.

Thanks in advance.
 
Back
Top