Opening Chrome with an added search parameter

Dave E

Registered User.
Local time
Yesterday, 22:58
Joined
Sep 23, 2019
Messages
139
I have my database which has a button to onclick a link to a site with search parameters -

Dim strURL As String, Tempstr As String

Tempstr = Forms!MainOptions!MainView!LatinName
Tempstr = Replace(Tempstr, " ", "+")
strURL = "https://www.google.co.uk/search?hl=en&q=" & Tempstr
Application.FollowHyperlink strURL

It works OK, but Chrome always opens with a Cookie request to Accept or Decline.

I know I only have to make one click to Accept or Decline, but is there a way to avoid the request and go straight to the Google search results?

Thanks

Dave E
 
Don’t use chrome, use another browser that doesn’t want to collect your personal data such as Firefox or opera
 
Firefox is my default browser and it does not prompt for anything; just opens that page.
I briefly made Chrome my default browser and again, no prompt.
Maybe you can carefully review your browser settings. At this point it's not an Access question anymore.
 
Firefox is my default browser and it does not prompt for anything; just opens that page.
I briefly made Chrome my default browser and again, no prompt.
Maybe you can carefully review your browser settings. At this point it's not an Access question anymore.
Thank you for your reply. However, it wasn't very helpful; I wasn't looking to change my browser.

My browser settings are set correctly and the prompt doesn't appear when I use Chrome normally, only when opening the browser from VBA, which is why it remains an Access question.

There must be another Access programmer that has the knowledge to enlighten me on how to phrase the instruction avoiding a cookie request.
I will wait and see. Maybe we'll both learn something.
 
Out of curiosity, does this problem appear when you launch Chrome from VBA in Word, or in Excel or in Outlook? Is it a VBA problem, or an Access problem?
 
Thank you for your reply. However, it wasn't very helpful; I wasn't looking to change my browser.

My browser settings are set correctly and the prompt doesn't appear when I use Chrome normally, only when opening the browser from VBA, which is why it remains an Access question.

There must be another Access programmer that has the knowledge to enlighten me on how to phrase the instruction avoiding a cookie request.
I will wait and see. Maybe we'll both learn something.
Maybe I wasn't clear enough. With both browsers I ran your code, and got no prompts.
I conclude it's not a matter of crafting the URL.
 
Out of curiosity, does this problem appear when you launch Chrome from VBA in Word, or in Excel or in Outlook? Is it a VBA problem, or an Access problem?
Hi.
I haven't tried it Word, Excel or Outlook. Access is my bag. I'm sure that it's something in the strURL that isn't right, that I'm missing something from it that would allow it to skip the prompt.
Tomorrow, I will copy the line to Word and see what happens.
Thanks for your constructive input.
 
Maybe I wasn't clear enough. With both browsers I ran your code, and got no prompts.
I conclude it's not a matter of crafting the URL.
Yes, indeed. I, too, can copy the code into Chrome and it runs without the prompt. I can only assume that the line I use to open the browser with the search parameters is not correct. I agree that line is more to do with Google but when I use it within Access, it becomes, for me, an Access problem.
 
Hi.
I haven't tried it Word, Excel or Outlook. Access is my bag. I'm sure that it's something in the strURL that isn't right, that I'm missing something from it that would allow it to skip the prompt.
Tomorrow, I will copy the line to Word and see what happens.
Thanks for your constructive input.
Focusing on it as "an Access problem" can have the unintended consequence of sidelining a search for other, perhaps more likely, reasons for the problem. If it's a VBA-wide problem, for example, then you search out VBA references in general.
 
Thank you for your reply. However, it wasn't very helpful; I wasn't looking to change my browser
Trying a different browser, like trying from Word would help to isolate the problem, but up to you since nobody else appears to have. The problem
 
I suggest you go to the website using your regular browser (the one where you don't get the message) and open its dev tools. Then, in your storage tab (from its dev tools), look for the cookies tab and see what cookies are there. Now, open the website with the method that you claim is making the browser ask for cookies. Once there, do the same and see if there are any different cookies.

Web developers are the ones who integrate that mechanism to pretend they care about your privacy, if you make a website yourself from scratch, your website won't automatically start asking for spying consent to the poor people who access it. It is you who will have to check whether they have the cookies you need to spy on them.

The web developer is the one who places those cookie acceptance mechanisms.
 
Focusing on it as "an Access problem" can have the unintended consequence of sidelining a search for other, perhaps more likely, reasons for the problem. If it's a VBA-wide problem, for example, then you search out VBA references in general.
Indeed. I am focused on Access simply because the same URL works outside of Access but not not within the VBA.
I tried using the line in Word but it came up with the cookie request. Although, if I paste the same line into the address bar of Chrome, the results page opens with no request. I don't think Chrome's cookies settings are to blame.

I will continue to persue this simple yet annoying, problem.

Thanks for all your help...

Dave E
 
Tempstr is usually a plant name. For the purpose of my tests I have used Tempstr = "Pennisetum"

The actual string content makes no difference.
 

Users who are viewing this thread

Back
Top Bottom