Declare Public
-
- 4StarLounger
- Posts: 579
- Joined: 10 Feb 2010, 17:32
Declare Public
25 years doing this,........
Option Compare Database
Option Explicit
Public reportDir As String
Where do I find where Public is defined?
Option Compare Database
Option Explicit
Public reportDir As String
Where do I find where Public is defined?
-
- Administrator
- Posts: 78620
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: Declare Public
Best wishes,
Hans
Hans
-
- 4StarLounger
- Posts: 579
- Joined: 10 Feb 2010, 17:32
Re: Declare Public
OK - I read both and still do not understand.
reportDir is used here
I believe reportDir is a "path" to a server, but cannot see where it is defined.
This was created by the IT folks and handed to me. At some point I may need to change the server path.
reportDir is used here
Code: Select all
strFileName = reportDir & "HMO ISSUES - LETTERS SENT & RESPONSES\SUPV ISSUES\OPEN ISSUES FOR BAY CLIENTS.xlsx"
This was created by the IT folks and handed to me. At some point I may need to change the server path.
-
- Administrator
- Posts: 78620
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: Declare Public
To find where reportDir is declared, right-click in the word reportDir and select Definition from the context menu.
To find where reportDir is assigned and used, select reportDir, then press Ctrl+F to activate the Find dialog. The word reportDir should automatically be entered into the 'Find What' box.
Under Search, select the 'Current Project' option button, then click Find Next.
To find where reportDir is assigned and used, select reportDir, then press Ctrl+F to activate the Find dialog. The word reportDir should automatically be entered into the 'Find What' box.
Under Search, select the 'Current Project' option button, then click Find Next.
Best wishes,
Hans
Hans
-
- 4StarLounger
- Posts: 579
- Joined: 10 Feb 2010, 17:32
Re: Declare Public
I may not be explaining this correctly, so please forgive me.
I am exporting a report to a specific server/drive.
I need to know what directory reportDir refers to because it may change in the near future.
I am exporting a report to a specific server/drive.
Code: Select all
strFileName = reportDir & "HMO ISSUES - LETTERS SENT & RESPONSES\SUPV ISSUES\OPEN ISSUES FOR BAY CLIENTS.xlsx"
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel12Xml, "OPEN ISSUES FOR BAY CLIENTS", strFileName, True
-
- 2StarLounger
- Posts: 117
- Joined: 22 Feb 2022, 09:04
Re: Declare Public
Search for reportDir = in the whole project.
Could it come from a settings table?
Could it come from a settings table?
Using Access 2007/2019.
Give a man a fish and you feed him for a day. Teach a man to fish and you feed him for a lifetime.
Please, please use code tags when posting code snippets, click the </>icon.
Debug.Print is your lifesaver.
Give a man a fish and you feed him for a day. Teach a man to fish and you feed him for a lifetime.
Please, please use code tags when posting code snippets, click the </>icon.
Debug.Print is your lifesaver.
-
- 4StarLounger
- Posts: 579
- Joined: 10 Feb 2010, 17:32
Re: Declare Public
Doing the search in the whole project just gives me the instances of reportDir in the code.
I'm probably going to get shamed for this, but what if I didn't mention this is a SQL front end?
I'm probably going to get shamed for this, but what if I didn't mention this is a SQL front end?
-
- Administrator
- Posts: 78620
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: Declare Public
That shouldn't matter - the VBA code lives in the frontend, not in the backend.
It's mysterious.
It's mysterious.
Best wishes,
Hans
Hans
-
- 2StarLounger
- Posts: 117
- Joined: 22 Feb 2022, 09:04
Re: Declare Public
So one of those must have reportDir ?Doing the search in the whole project just gives me the instances of reportDir in the code.
If you walk the code what is it's value?
What is a SQL FE?
Using Access 2007/2019.
Give a man a fish and you feed him for a day. Teach a man to fish and you feed him for a lifetime.
Please, please use code tags when posting code snippets, click the </>icon.
Debug.Print is your lifesaver.
Give a man a fish and you feed him for a day. Teach a man to fish and you feed him for a lifetime.
Please, please use code tags when posting code snippets, click the </>icon.
Debug.Print is your lifesaver.
-
- Administrator
- Posts: 78620
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: Declare Public
I assume that Michael meant that the Access database is a frontend for a SQL Server database.
Best wishes,
Hans
Hans
-
- 4StarLounger
- Posts: 579
- Joined: 10 Feb 2010, 17:32
Re: Declare Public
Access front end to SQL backend.
I will try to walk the code.
(at least I used code tags when posting code snippets)
I will try to walk the code.
(at least I used code tags when posting code snippets)
-
- 2StarLounger
- Posts: 117
- Joined: 22 Feb 2022, 09:04
Re: Declare Public
Well if you cannot find it, upload the front end.
That cannot hold a proprietary data surely?
That cannot hold a proprietary data surely?
Using Access 2007/2019.
Give a man a fish and you feed him for a day. Teach a man to fish and you feed him for a lifetime.
Please, please use code tags when posting code snippets, click the </>icon.
Debug.Print is your lifesaver.
Give a man a fish and you feed him for a day. Teach a man to fish and you feed him for a lifetime.
Please, please use code tags when posting code snippets, click the </>icon.
Debug.Print is your lifesaver.
-
- 4StarLounger
- Posts: 579
- Joined: 10 Feb 2010, 17:32
Re: Declare Public
I tracked down the programmer. He's not a very patient person, but I too can be a PITA and I do not give up.
I will post when(if) I hear back from him.
Thanks Hans & Gasman for your continued support.
I will post when(if) I hear back from him.
Thanks Hans & Gasman for your continued support.