A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

"HAVING LIKE " & """" & "*" 'Active" & "*" & """" & "



 
 
Thread Tools Display Modes
  #11  
Old March 9th, 2006, 05:02 PM posted to microsoft.public.access.forms
external usenet poster
 
Posts: n/a
Default "HAVING LIKE " & """" & "*" 'Active" & "*" & """" & "

I am seeing the Run-time Error 3021

The immediate window displays

SELECT downloads.Branch_Number, downloads.msglog_text,
downloads.item_id, Min(downloads.msglog_crtdt) AS MinOfmsglog_crtdt
FROM downloads GROUP BY downloads.Branch_Number, downloads.msglog_text,
downloads.item_id HAVING (((downloads.Branch_Number) = 11) AND
((downloads.msglog_text) Like '*active*') AND ((downloads.item_id) =
1));

If I click debug button it highlights MsgBox (rst2.GetString)

  #12  
Old March 9th, 2006, 05:06 PM posted to microsoft.public.access.forms
external usenet poster
 
Posts: n/a
Default "HAVING LIKE " & """" & "*" 'Active" & "*" & """" & "

Oh, comment that out - or if you need it, get rid of the parenthesis -
parens are used when you're passing to a value:
msgbox rst2.GetString

MyString = msgbox(rst2.GetString)


wrote in message
oups.com...
I am seeing the Run-time Error 3021

The immediate window displays

SELECT downloads.Branch_Number, downloads.msglog_text,
downloads.item_id, Min(downloads.msglog_crtdt) AS MinOfmsglog_crtdt
FROM downloads GROUP BY downloads.Branch_Number, downloads.msglog_text,
downloads.item_id HAVING (((downloads.Branch_Number) = 11) AND
((downloads.msglog_text) Like '*active*') AND ((downloads.item_id) =
1));

If I click debug button it highlights MsgBox (rst2.GetString)



  #13  
Old March 9th, 2006, 05:23 PM posted to microsoft.public.access.forms
external usenet poster
 
Posts: n/a
Default "HAVING LIKE " & """" & "*" 'Active" & "*" & """" & "

Also - I totally missed this - Doug Steele pointed out that your wildcard
should be a % not a * - ADO doesn't accept the asterisk.


"SusanV" wrote in message
...
Oh, comment that out - or if you need it, get rid of the parenthesis -
parens are used when you're passing to a value:
msgbox rst2.GetString

MyString = msgbox(rst2.GetString)


wrote in message
oups.com...
I am seeing the Run-time Error 3021

The immediate window displays

SELECT downloads.Branch_Number, downloads.msglog_text,
downloads.item_id, Min(downloads.msglog_crtdt) AS MinOfmsglog_crtdt
FROM downloads GROUP BY downloads.Branch_Number, downloads.msglog_text,
downloads.item_id HAVING (((downloads.Branch_Number) = 11) AND
((downloads.msglog_text) Like '*active*') AND ((downloads.item_id) =
1));

If I click debug button it highlights MsgBox (rst2.GetString)





  #14  
Old March 9th, 2006, 05:32 PM posted to microsoft.public.access.forms
external usenet poster
 
Posts: n/a
Default "HAVING LIKE " & """" & "*" 'Active" & "*" & """" & "

picky
ADO accepts it. It just doesn't treat it as a wildcard character. g
/picky

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)


"SusanV" wrote in message
...
Also - I totally missed this - Doug Steele pointed out that your wildcard
should be a % not a * - ADO doesn't accept the asterisk.



  #15  
Old March 9th, 2006, 05:34 PM posted to microsoft.public.access.forms
external usenet poster
 
Posts: n/a
Default "HAVING LIKE " & """" & "*" 'Active" & "*" & """" & "

LOL! You most definitely got me there!


"Douglas J Steele" wrote in message
...
picky
ADO accepts it. It just doesn't treat it as a wildcard character. g
/picky

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)


"SusanV" wrote in message
...
Also - I totally missed this - Doug Steele pointed out that your wildcard
should be a % not a * - ADO doesn't accept the asterisk.





  #16  
Old March 9th, 2006, 06:08 PM posted to microsoft.public.access.forms
external usenet poster
 
Posts: n/a
Default "HAVING LIKE " & """" & "*" 'Active" & "*" & """" & "

Thanks guys! My Boss is going to love this!

  #17  
Old March 9th, 2006, 06:13 PM posted to microsoft.public.access.forms
external usenet poster
 
Posts: n/a
Default "HAVING LIKE " & """" & "*" 'Active" & "*" & """" & "

Glad to help any time!

;-)

wrote in message
oups.com...
Thanks guys! My Boss is going to love this!



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 12:43 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.