Really? Anyway to make some of the criteria optional? I thought as long as I used "OR" I would essentially be making the criteria optional??? Hmmmm....
Thanks! --- In [email protected], "Tom Oakes" <[EMAIL PROTECTED]> wrote: > > Are there values in all of the form fields? You'd get an error if any of > them are null... > > Tom Oakes > Personal PC Consultants, Inc. > [EMAIL PROTECTED] > 503.230.0911 (O) > 402.968.6946 (C) > 734.264.0911 (F) > > > > _____ > > From: [email protected] > [mailto:[EMAIL PROTECTED] On Behalf Of kjsnead > Sent: Thursday, January 12, 2006 1:34 PM > To: [email protected] > Subject: [AccessDevelopers] Re: Syntax help for Search Criteria > > > I changed the syntax to include the delimeters (I hope correctly) > that you identified, but I am still recieving a syntax error. Not > when closing the VB editor, but when running. The syntax now reads: > > stLinkCriteria = "[CCBNumber] = " & Me![cmbCCBNumber] & " Or > [sfPVCS_Labels].[PVCSLabel] = '" & Me![cmbPVCSLabel] & "' OR > ([Production Release Date] Between #" & Me![cmbReleaseBegDate] & "# > AND #" & Me![cmbReleaseEndDate] & "#)" > > > --- In [email protected], "Tom Oakes" <[EMAIL PROTECTED]> > wrote: > > > > It doesn't look like you're correctly delimiting fields: > > > > 1) Text fields require string delimiters, which are apostophes. > > 2) Date fields require the pound/number sign, #. > > 3) Numeric fields need no delimiter. > > > > So....try this: > > > > stLinkCriteria = "[CCBNumber] = " & Me![cmbCCBNumber] & " Or Me. > > [sfPVCS_Labels].[PVCSlabel] = '" & Me![cmbPVCSLabel] & "' OR > > ([Production Release Date] Between #" & Me![cmbReleaseBegDate] > & "# > > AND #" & Me![cmbReleaseEndDate] & "#)" > > > > > > > > Tom Oakes > > Personal PC Consultants, Inc. > > [EMAIL PROTECTED] > > 503.230.0911 (O) > > 402.968.6946 (C) > > 734.264.0911 (F) > > > > > > > > _____ > > > > From: [email protected] > > [mailto:[EMAIL PROTECTED] On Behalf Of kjsnead > > Sent: Thursday, January 12, 2006 11:54 AM > > To: [email protected] > > Subject: [AccessDevelopers] Syntax help for Search Criteria > > > > > > I am building a search form "fSearchIG" that allows users to > search > > records using 3 different criteria (OR) filtering the > > form "fCCInstallationGuide". However, the syntax below keeps > > getting an error stating that the open form operation is canceled. > > My guess is my syntax is wrong. Can someone help verity my syntax? > > > > Datatypes are: > > [CCBNumber] - Number > > [PVCSlabel] - Text > > [Production Release Date] - Date > > > > Syntax behing the form "fSearchIG': > > Dim stDocName As String > > Dim stLinkCriteria As String > > > > stDocName = "fCCInstallationGuide" > > > > 'Use the statement below when using the "fSearchIG" form > > > > stLinkCriteria = "[CCBNumber] = '" & Me![cmbCCBNumber] & "' Or Me. > > [sfPVCS_Labels].[PVCSlabel] = " & Me![cmbPVCSLabel] & " OR > > ([Production Release Date] Between " & Me![cmbReleaseBegDate] & " > > AND " & Me![cmbReleaseEndDate] & ")" > > > > DoCmd.OpenForm stDocName, , , stLinkCriteria > > > > Any help is greatly appreciated!!! > > > > > > > > > > > > > > > > > > Please zip all files prior to uploading to Files section. > > > > > > > > > > SPONSORED LINKS > > Microsoft > > <http://groups.yahoo.com/gads? > t=ms&k=Microsoft+access+developer&w1=Microsoft > > > +access+developer&w2=Microsoft+access+help&w3=Microsoft+access+databa > se&w4=M > > > icrosoft+access+training&w5=Microsoft+access+training+course&w6=Micro > soft+ac > > cess+programming&c=6&s=193&.sig=d-CjBIrYOH9NCKHYFeGZJA> access > developer > > Microsoft > > <http://groups.yahoo.com/gads? > t=ms&k=Microsoft+access+help&w1=Microsoft+acce > > > ss+developer&w2=Microsoft+access+help&w3=Microsoft+access+database&w4 > =Micros > > > oft+access+training&w5=Microsoft+access+training+course&w6=Microsoft+ > access+ > > programming&c=6&s=193&.sig=crx-d4AAhdklv_VozGVAUw> access help > Microsoft > > <http://groups.yahoo.com/gads? > t=ms&k=Microsoft+access+database&w1=Microsoft+ > > > access+developer&w2=Microsoft+access+help&w3=Microsoft+access+databas > e&w4=Mi > > > crosoft+access+training&w5=Microsoft+access+training+course&w6=Micros > oft+acc > > ess+programming&c=6&s=193&.sig=qg2hDuQNweByMCX0NU7cEA> access > database > > Microsoft > > <http://groups.yahoo.com/gads? > t=ms&k=Microsoft+access+training&w1=Microsoft+ > > > access+developer&w2=Microsoft+access+help&w3=Microsoft+access+databas > e&w4=Mi > > > crosoft+access+training&w5=Microsoft+access+training+course&w6=Micros > oft+acc > > ess+programming&c=6&s=193&.sig=bLZHqTqWUQny609X1OkmNA> access > training > > Microsoft > > <http://groups.yahoo.com/gads? > t=ms&k=Microsoft+access+training+course&w1=Mic > > > rosoft+access+developer&w2=Microsoft+access+help&w3=Microsoft+access+ > databas > > > e&w4=Microsoft+access+training&w5=Microsoft+access+training+course&w6 > =Micros > > oft+access+programming&c=6&s=193&.sig=d8GQXfQW3RZ64rOfzIMo8A> > access > > training course Microsoft > > <http://groups.yahoo.com/gads? > t=ms&k=Microsoft+access+programming&w1=Microso > > > ft+access+developer&w2=Microsoft+access+help&w3=Microsoft+access+data > base&w4 > > > =Microsoft+access+training&w5=Microsoft+access+training+course&w6=Mic > rosoft+ > > access+programming&c=6&s=193&.sig=iXDlL79-kkgjv6fLyFu3Sg> access > programming > > > > > > _____ > > > > YAHOO! GROUPS LINKS > > > > > > > > * Visit your group "AccessDevelopers > > <http://groups.yahoo.com/group/AccessDevelopers> " on the web. > > > > > > * To unsubscribe from this group, send an email to: > > [EMAIL PROTECTED] > > <mailto:[EMAIL PROTECTED] > subject=Unsubscribe> > > > > > > * Your use of Yahoo! Groups is subject to the Yahoo! Terms of > Service > > <http://docs.yahoo.com/info/terms/> . > > > > > > _____ > > > > > > > > > > Please zip all files prior to uploading to Files section. > > > > > SPONSORED LINKS > Microsoft > <http://groups.yahoo.com/gads? t=ms&k=Microsoft+access+developer&w1=Microsoft > +access+developer&w2=Microsoft+access+help&w3=Microsoft+access+databa se&w4=M > icrosoft+access+training&w5=Microsoft+access+training+course&w6=Micro soft+ac > cess+programming&c=6&s=193&.sig=d-CjBIrYOH9NCKHYFeGZJA> access developer > Microsoft > <http://groups.yahoo.com/gads? t=ms&k=Microsoft+access+help&w1=Microsoft+acce > ss+developer&w2=Microsoft+access+help&w3=Microsoft+access+database&w4 =Micros > oft+access+training&w5=Microsoft+access+training+course&w6=Microsoft+ access+ > programming&c=6&s=193&.sig=crx-d4AAhdklv_VozGVAUw> access help Microsoft > <http://groups.yahoo.com/gads? t=ms&k=Microsoft+access+database&w1=Microsoft+ > access+developer&w2=Microsoft+access+help&w3=Microsoft+access+databas e&w4=Mi > crosoft+access+training&w5=Microsoft+access+training+course&w6=Micros oft+acc > ess+programming&c=6&s=193&.sig=qg2hDuQNweByMCX0NU7cEA> access database > Microsoft > <http://groups.yahoo.com/gads? t=ms&k=Microsoft+access+training&w1=Microsoft+ > access+developer&w2=Microsoft+access+help&w3=Microsoft+access+databas e&w4=Mi > crosoft+access+training&w5=Microsoft+access+training+course&w6=Micros oft+acc > ess+programming&c=6&s=193&.sig=bLZHqTqWUQny609X1OkmNA> access training > Microsoft > <http://groups.yahoo.com/gads? t=ms&k=Microsoft+access+training+course&w1=Mic > rosoft+access+developer&w2=Microsoft+access+help&w3=Microsoft+access+ databas > e&w4=Microsoft+access+training&w5=Microsoft+access+training+course&w6 =Micros > oft+access+programming&c=6&s=193&.sig=d8GQXfQW3RZ64rOfzIMo8A> access > training course Microsoft > <http://groups.yahoo.com/gads? t=ms&k=Microsoft+access+programming&w1=Microso > ft+access+developer&w2=Microsoft+access+help&w3=Microsoft+access+data base&w4 > =Microsoft+access+training&w5=Microsoft+access+training+course&w6=Mic rosoft+ > access+programming&c=6&s=193&.sig=iXDlL79-kkgjv6fLyFu3Sg> access programming > > > _____ > > YAHOO! GROUPS LINKS > > > > * Visit your group "AccessDevelopers > <http://groups.yahoo.com/group/AccessDevelopers> " on the web. > > > * To unsubscribe from this group, send an email to: > [EMAIL PROTECTED] > <mailto:[EMAIL PROTECTED] subject=Unsubscribe> > > > * Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service > <http://docs.yahoo.com/info/terms/> . > > > _____ > Please zip all files prior to uploading to Files section. Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/AccessDevelopers/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
