From Lambert.Heenan at aig.com Thu Oct 1 07:56:37 2015 From: Lambert.Heenan at aig.com (Heenan, Lambert) Date: Thu, 1 Oct 2015 12:56:37 +0000 Subject: [AccessD] Access / Oracle Distinct queries - Distinct not working! In-Reply-To: <560C6733.12402.1D1DC74D@stuart.lexacorp.com.pg> References: <560C6733.12402.1D1DC74D@stuart.lexacorp.com.pg> Message-ID: No. It's just a plain vanilla DELECT DISTINCT FROM... query. If I do Select APLICANT_ID from MyQuery Group By Applicant_ID Then I get the right number back. Lambert -----Original Message----- From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Stuart McLachlan Sent: Wednesday, September 30, 2015 6:50 PM To: 'Access-D Email\aaccessd at databaseadvisors.com'' Subject: Re: [AccessD] Access / Oracle Distinct queries - Distinct not working! Do you have GROUP BY APPLICANT_ID in the new query? On 30 Sep 2015 at 16:04, Heenan, Lambert wrote: > Cross Posted to Access-l and Access-d. > > Here's a very strange thing. I have a pass-through query that connects > to an Oracle Db and returns a set of rows with Applicant IDs, and > Medical Review IDs (MUR). There can be, and are multiple MUR IDs per > Applicant ID. > > When I run the query in Access 2010 I get 8,429 rows back. When I use > the Pass-through as the source for a new query and run SELECT DISTINCT > APPLICANT_ID FROM MyQuery, to find out the number of unique applicants > in the dataset then that query also returns 8,429 rows, and I see > Applicant IDs repeated in the results. Distinct has had no effect. > > On the other hand, if I run the exact same select distinct query in > Toad, then I get back the expected result: 3,829 unique applicants. > Likewise, if I use the first pass-through query as toe source for a > make-table query and the run SELECT DISTINCT on the temporary table > just created, then I get 3,829 rows. > > What gives? > > Lambert > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From Lambert.Heenan at aig.com Thu Oct 1 08:06:09 2015 From: Lambert.Heenan at aig.com (Heenan, Lambert) Date: Thu, 1 Oct 2015 13:06:09 +0000 Subject: [AccessD] Access / Oracle Distinct queries - Distinct not working! In-Reply-To: References: <560C6733.12402.1D1DC74D@stuart.lexacorp.com.pg> Message-ID: That's "SELECT DISTINCT" of course. Too early in the morning for my spelling neurons to function! -----Original Message----- From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Heenan, Lambert Sent: Thursday, October 01, 2015 8:57 AM To: 'Access-D Email\aaccessd at databaseadvisors.com'' Subject: Re: [AccessD] Access / Oracle Distinct queries - Distinct not working! No. It's just a plain vanilla DELECT DISTINCT FROM... query. If I do Select APLICANT_ID from MyQuery Group By Applicant_ID Then I get the right number back. Lambert -----Original Message----- From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Stuart McLachlan Sent: Wednesday, September 30, 2015 6:50 PM To: 'Access-D Email\aaccessd at databaseadvisors.com'' Subject: Re: [AccessD] Access / Oracle Distinct queries - Distinct not working! Do you have GROUP BY APPLICANT_ID in the new query? On 30 Sep 2015 at 16:04, Heenan, Lambert wrote: > Cross Posted to Access-l and Access-d. > > Here's a very strange thing. I have a pass-through query that connects > to an Oracle Db and returns a set of rows with Applicant IDs, and > Medical Review IDs (MUR). There can be, and are multiple MUR IDs per > Applicant ID. > > When I run the query in Access 2010 I get 8,429 rows back. When I use > the Pass-through as the source for a new query and run SELECT DISTINCT > APPLICANT_ID FROM MyQuery, to find out the number of unique applicants > in the dataset then that query also returns 8,429 rows, and I see > Applicant IDs repeated in the results. Distinct has had no effect. > > On the other hand, if I run the exact same select distinct query in > Toad, then I get back the expected result: 3,829 unique applicants. > Likewise, if I use the first pass-through query as toe source for a > make-table query and the run SELECT DISTINCT on the temporary table > just created, then I get 3,829 rows. > > What gives? > > Lambert > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From Lambert.Heenan at aig.com Thu Oct 1 09:39:58 2015 From: Lambert.Heenan at aig.com (Heenan, Lambert) Date: Thu, 1 Oct 2015 14:39:58 +0000 Subject: [AccessD] Access / Oracle Distinct queries - Distinct not working! In-Reply-To: <560C6733.12402.1D1DC74D@stuart.lexacorp.com.pg> References: <560C6733.12402.1D1DC74D@stuart.lexacorp.com.pg> Message-ID: OK. All bets are off. Today when I run the 'problem' query it returns the correct result! I am 99.99% sure that yesterday I ran SELECT DISTINCT APPLICANT_ID FROM MyQuery And not SELECT DISTINCTROW APPLICANT_ID FROM MyQuery But today DISTINCT is doing what it's supposed to do!!! Sorry if I wasted anyone's time. -----Original Message----- From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Stuart McLachlan Sent: Wednesday, September 30, 2015 6:50 PM To: 'Access-D Email\aaccessd at databaseadvisors.com'' Subject: Re: [AccessD] Access / Oracle Distinct queries - Distinct not working! Do you have GROUP BY APPLICANT_ID in the new query? On 30 Sep 2015 at 16:04, Heenan, Lambert wrote: > Cross Posted to Access-l and Access-d. > > Here's a very strange thing. I have a pass-through query that connects > to an Oracle Db and returns a set of rows with Applicant IDs, and > Medical Review IDs (MUR). There can be, and are multiple MUR IDs per > Applicant ID. > > When I run the query in Access 2010 I get 8,429 rows back. When I use > the Pass-through as the source for a new query and run SELECT DISTINCT > APPLICANT_ID FROM MyQuery, to find out the number of unique applicants > in the dataset then that query also returns 8,429 rows, and I see > Applicant IDs repeated in the results. Distinct has had no effect. > > On the other hand, if I run the exact same select distinct query in > Toad, then I get back the expected result: 3,829 unique applicants. > Likewise, if I use the first pass-through query as toe source for a > make-table query and the run SELECT DISTINCT on the temporary table > just created, then I get 3,829 rows. > > What gives? > > Lambert > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From bensonforums at gmail.com Thu Oct 1 09:50:58 2015 From: bensonforums at gmail.com (Bill Benson) Date: Thu, 1 Oct 2015 10:50:58 -0400 Subject: [AccessD] Access / Oracle Distinct queries - Distinct not working! In-Reply-To: References: <560C6733.12402.1D1DC74D@stuart.lexacorp.com.pg> Message-ID: Never a waste of time. I learned about the difference between Access's Unique Records and Unique Values relative to DISTINCTROW and DISTINCT, respectively, properties in the design window which I had forgotten about. And that DISTINCTROW is not for single tables but for joined table queries at least in the Access environment. Brain improved. On Thu, Oct 1, 2015 at 10:39 AM, Heenan, Lambert wrote: > OK. All bets are off. Today when I run the 'problem' query it returns the > correct result! I am 99.99% sure that yesterday I ran > > SELECT DISTINCT APPLICANT_ID FROM MyQuery > > And not > > SELECT DISTINCTROW APPLICANT_ID FROM MyQuery > > But today DISTINCT is doing what it's supposed to do!!! > > Sorry if I wasted anyone's time. > > > > -----Original Message----- > From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of > Stuart McLachlan > Sent: Wednesday, September 30, 2015 6:50 PM > To: 'Access-D Email\aaccessd at databaseadvisors.com'' > Subject: Re: [AccessD] Access / Oracle Distinct queries - Distinct not > working! > > Do you have GROUP BY APPLICANT_ID in the new query? > > On 30 Sep 2015 at 16:04, Heenan, Lambert wrote: > > > Cross Posted to Access-l and Access-d. > > > > Here's a very strange thing. I have a pass-through query that connects > > to an Oracle Db and returns a set of rows with Applicant IDs, and > > Medical Review IDs (MUR). There can be, and are multiple MUR IDs per > > Applicant ID. > > > > When I run the query in Access 2010 I get 8,429 rows back. When I use > > the Pass-through as the source for a new query and run SELECT DISTINCT > > APPLICANT_ID FROM MyQuery, to find out the number of unique applicants > > in the dataset then that query also returns 8,429 rows, and I see > > Applicant IDs repeated in the results. Distinct has had no effect. > > > > On the other hand, if I run the exact same select distinct query in > > Toad, then I get back the expected result: 3,829 unique applicants. > > Likewise, if I use the first pass-through query as toe source for a > > make-table query and the run SELECT DISTINCT on the temporary table > > just created, then I get 3,829 rows. > > > > What gives? > > > > Lambert > > > > > > -- > > AccessD mailing list > > AccessD at databaseadvisors.com > > http://databaseadvisors.com/mailman/listinfo/accessd > > Website: http://www.databaseadvisors.com > > > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > From Lambert.Heenan at aig.com Thu Oct 1 10:47:34 2015 From: Lambert.Heenan at aig.com (Heenan, Lambert) Date: Thu, 1 Oct 2015 15:47:34 +0000 Subject: [AccessD] Access / Oracle Distinct queries - Distinct not working! In-Reply-To: References: <560C6733.12402.1D1DC74D@stuart.lexacorp.com.pg> Message-ID: Finally got to the bottom of this, or close to the bottom, and so I thought I'd post this so the community is aware of the 'gotcha' I stumbled across. The reason my select distinct query was not working was that the column APPLICANT_ID in Oracle table is defined as VARCHAR2(255, CHAR), but when I use the pass-through query, Access is seeing it as a Memo field for some reason. TO fix this I cast the column in the pass-through to force it to be text... CAST (LA. APPLICANT _ID AS VARCHAR2 (20)) APPLICANT _ID, And that then allows the select distinct query to do its job. Lambert -----Original Message----- From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Heenan, Lambert Sent: Thursday, October 01, 2015 10:40 AM To: 'Access-D Email\aaccessd at databaseadvisors.com'' Cc: 'ACCESS-L Email (ACCESS-L at PEACH.EASE.LSOFT.COM)' Subject: Re: [AccessD] Access / Oracle Distinct queries - Distinct not working! OK. All bets are off. Today when I run the 'problem' query it returns the correct result! I am 99.99% sure that yesterday I ran SELECT DISTINCT APPLICANT_ID FROM MyQuery And not SELECT DISTINCTROW APPLICANT_ID FROM MyQuery But today DISTINCT is doing what it's supposed to do!!! Sorry if I wasted anyone's time. -----Original Message----- From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Stuart McLachlan Sent: Wednesday, September 30, 2015 6:50 PM To: 'Access-D Email\aaccessd at databaseadvisors.com'' Subject: Re: [AccessD] Access / Oracle Distinct queries - Distinct not working! Do you have GROUP BY APPLICANT_ID in the new query? On 30 Sep 2015 at 16:04, Heenan, Lambert wrote: > Cross Posted to Access-l and Access-d. > > Here's a very strange thing. I have a pass-through query that connects > to an Oracle Db and returns a set of rows with Applicant IDs, and > Medical Review IDs (MUR). There can be, and are multiple MUR IDs per > Applicant ID. > > When I run the query in Access 2010 I get 8,429 rows back. When I use > the Pass-through as the source for a new query and run SELECT DISTINCT > APPLICANT_ID FROM MyQuery, to find out the number of unique applicants > in the dataset then that query also returns 8,429 rows, and I see > Applicant IDs repeated in the results. Distinct has had no effect. > > On the other hand, if I run the exact same select distinct query in > Toad, then I get back the expected result: 3,829 unique applicants. > Likewise, if I use the first pass-through query as toe source for a > make-table query and the run SELECT DISTINCT on the temporary table > just created, then I get 3,829 rows. > > What gives? > > Lambert > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From Lambert.Heenan at aig.com Thu Oct 1 12:19:42 2015 From: Lambert.Heenan at aig.com (Heenan, Lambert) Date: Thu, 1 Oct 2015 17:19:42 +0000 Subject: [AccessD] Access / Oracle Distinct queries - Distinct not working! In-Reply-To: References: <560C6733.12402.1D1DC74D@stuart.lexacorp.com.pg> Message-ID: Not sure why, but my follow-up post did not appear. Repeated below. ----------------------------------- Finally got to the bottom of this, or close to the bottom, and so I thought I'd post this so the community is aware of the 'gotcha' I stumbled across. The reason my select distinct query was not working was that the column APPLICANT_ID in Oracle table is defined as VARCHAR2(255, CHAR), but when I use the pass-through query, Access is seeing it as a Memo field for some reason. To fix this I cast the column in the pass-through to force it to be text... CAST (LA. APPLICANT _ID AS VARCHAR2 (20)) APPLICANT _ID, And that then allows the select distinct query to do its job. Lambert -----Original Message----- From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Bill Benson Sent: Thursday, October 01, 2015 10:51 AM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Access / Oracle Distinct queries - Distinct not working! Never a waste of time. I learned about the difference between Access's Unique Records and Unique Values relative to DISTINCTROW and DISTINCT, respectively, properties in the design window which I had forgotten about. And that DISTINCTROW is not for single tables but for joined table queries at least in the Access environment. Brain improved. On Thu, Oct 1, 2015 at 10:39 AM, Heenan, Lambert wrote: > OK. All bets are off. Today when I run the 'problem' query it returns > the correct result! I am 99.99% sure that yesterday I ran > > SELECT DISTINCT APPLICANT_ID FROM MyQuery > > And not > > SELECT DISTINCTROW APPLICANT_ID FROM MyQuery > > But today DISTINCT is doing what it's supposed to do!!! > > Sorry if I wasted anyone's time. > > > > -----Original Message----- > From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf > Of Stuart McLachlan > Sent: Wednesday, September 30, 2015 6:50 PM > To: 'Access-D Email\aaccessd at databaseadvisors.com'' > Subject: Re: [AccessD] Access / Oracle Distinct queries - Distinct not > working! > > Do you have GROUP BY APPLICANT_ID in the new query? > > On 30 Sep 2015 at 16:04, Heenan, Lambert wrote: > > > Cross Posted to Access-l and Access-d. > > > > Here's a very strange thing. I have a pass-through query that > > connects to an Oracle Db and returns a set of rows with Applicant > > IDs, and Medical Review IDs (MUR). There can be, and are multiple > > MUR IDs per Applicant ID. > > > > When I run the query in Access 2010 I get 8,429 rows back. When I > > use the Pass-through as the source for a new query and run SELECT > > DISTINCT APPLICANT_ID FROM MyQuery, to find out the number of unique > > applicants in the dataset then that query also returns 8,429 rows, > > and I see Applicant IDs repeated in the results. Distinct has had no effect. > > > > On the other hand, if I run the exact same select distinct query in > > Toad, then I get back the expected result: 3,829 unique applicants. > > Likewise, if I use the first pass-through query as toe source for a > > make-table query and the run SELECT DISTINCT on the temporary table > > just created, then I get 3,829 rows. > > > > What gives? > > > > Lambert > > > > > > -- > > AccessD mailing list > > AccessD at databaseadvisors.com > > http://databaseadvisors.com/mailman/listinfo/accessd > > Website: http://www.databaseadvisors.com > > > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From gustav at cactus.dk Fri Oct 2 09:35:52 2015 From: gustav at cactus.dk (Gustav Brock) Date: Fri, 2 Oct 2015 14:35:52 +0000 Subject: [AccessD] OT Friday Special: Elon Musk Message-ID: Hi all Speak about a man with a vision on behalf of humanity. Can it be greater? You know, of course, about Elon Musk, but in a remarkable interview last Sunday on the primary Danish broadcasting channel he really sets the distance to the usual crowd of bragging business people who are mostly in it for the money: https://www.dr.dk/tv/se/21-soendag/21-soendag-2015-09-27#!/ Go to 25:55 at the time bar in the footer. The interview lasts for about 12 minutes. The in-between cuts are in Danish but you will probably guess what they deal with except, perhaps, for the information that a large contract with NASA was what in the last second saved him from bankruptcy. We need more people of this quality. /gustav From fuller.artful at gmail.com Fri Oct 2 10:40:05 2015 From: fuller.artful at gmail.com (Arthur Fuller) Date: Fri, 2 Oct 2015 11:40:05 -0400 Subject: [AccessD] OT Friday Special: Elon Musk In-Reply-To: References: Message-ID: Gustav, Agreed, most emphatically. On Fri, Oct 2, 2015 at 10:35 AM, Gustav Brock wrote: > Hi all > > Speak about a man with a vision on behalf of humanity. Can it be greater? > > You know, of course, about Elon Musk, but in a remarkable interview last > Sunday on the primary Danish broadcasting channel he really sets the > distance to the usual crowd of bragging business people who are mostly in > it for the money: > > https://www.dr.dk/tv/se/21-soendag/21-soendag-2015-09-27#!/ > > Go to 25:55 at the time bar in the footer. The interview lasts for > about 12 minutes. > > The in-between cuts are in Danish but you will probably guess what they > deal with except, perhaps, for the information that a large contract with > NASA was what in the last second saved him from bankruptcy. > > We need more people of this quality. > > /gustav > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > -- Arthur From tinanfields at torchlake.com Fri Oct 2 11:22:12 2015 From: tinanfields at torchlake.com (Tina Norris Fields) Date: Fri, 2 Oct 2015 12:22:12 -0400 Subject: [AccessD] Access 2013 - open WPS files? Message-ID: <560EAF34.50306@torchlake.com> Hi Gang, Still working on a database for a law firm. They would like to open certain WordPerfect files from inside Access. Can Access do that, or, do I have to convince them to convert the wps files to doc or docx files? Thanks, TNF -- Tina Norris Fields tinanfields-at-torchlake-dot-com 231-322-2787 From steve at goodhall.info Fri Oct 2 11:29:30 2015 From: steve at goodhall.info (Steve Goodhall) Date: Fri, 02 Oct 2015 12:29:30 -0400 Subject: [AccessD] Access 2013 - open WPS files? Message-ID: If Word can open it you should be able to create a Word.Application object and use it to open or convert the file. Steve Goodhall Tina Norris Fields wrote: >Hi Gang, > >Still working on a database for a law firm. They would like to open >certain WordPerfect files from inside Access. Can Access do that, or, >do I have to convince them to convert the wps files to doc or docx files? > >Thanks, >TNF > >-- >Tina Norris Fields >tinanfields-at-torchlake-dot-com >231-322-2787 > >-- >AccessD mailing list >AccessD at databaseadvisors.com >http://databaseadvisors.com/mailman/listinfo/accessd >Website: http://www.databaseadvisors.com From accessd at shaw.ca Fri Oct 2 20:49:10 2015 From: accessd at shaw.ca (Jim Lawrence) Date: Fri, 2 Oct 2015 19:49:10 -0600 (MDT) Subject: [AccessD] OT Friday Special: Elon Musk In-Reply-To: Message-ID: <860246072.31647448.1443836950636.JavaMail.root@shaw.ca> Hi Gustav: Eton Musk is a modern hero...a man with true vision. We can sure use many more like him. Jim ----- Original Message ----- From: "Gustav Brock" To: "Access Developers discussion and problem solving" Sent: Friday, October 2, 2015 7:35:52 AM Subject: [AccessD] OT Friday Special: Elon Musk Hi all Speak about a man with a vision on behalf of humanity. Can it be greater? You know, of course, about Elon Musk, but in a remarkable interview last Sunday on the primary Danish broadcasting channel he really sets the distance to the usual crowd of bragging business people who are mostly in it for the money: https://www.dr.dk/tv/se/21-soendag/21-soendag-2015-09-27#!/ Go to 25:55 at the time bar in the footer. The interview lasts for about 12 minutes. The in-between cuts are in Danish but you will probably guess what they deal with except, perhaps, for the information that a large contract with NASA was what in the last second saved him from bankruptcy. We need more people of this quality. /gustav -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From stuart at lexacorp.com.pg Sat Oct 3 00:44:38 2015 From: stuart at lexacorp.com.pg (Stuart McLachlan) Date: Sat, 03 Oct 2015 15:44:38 +1000 Subject: [AccessD] OT Friday Special: Elon Musk In-Reply-To: <860246072.31647448.1443836950636.JavaMail.root@shaw.ca> References: , <860246072.31647448.1443836950636.JavaMail.root@shaw.ca> Message-ID: <560F6B46.2474.477E611@stuart.lexacorp.com.pg> With great effort, I will refrain from stating my opinion of him! :) On 2 Oct 2015 at 19:49, Jim Lawrence wrote: > Hi Gustav: > > Eton Musk is a modern hero...a man with true vision. We can sure use > many more like him. > > Jim > > ----- Original Message ----- > From: "Gustav Brock" > To: "Access Developers discussion and problem solving" > Sent: Friday, October 2, 2015 7:35:52 > AM Subject: [AccessD] OT Friday Special: Elon Musk > > Hi all > > Speak about a man with a vision on behalf of humanity. Can it be > greater? > > You know, of course, about Elon Musk, but in a remarkable interview > last Sunday on the primary Danish broadcasting channel he really sets > the distance to the usual crowd of bragging business people who are > mostly in it for the money: > > https://www.dr.dk/tv/se/21-soendag/21-soendag-2015-09-27#!/ > > Go to 25:55 at the time bar in the footer. The interview lasts for > about 12 minutes. > > The in-between cuts are in Danish but you will probably guess what > they deal with except, perhaps, for the information that a large > contract with NASA was what in the last second saved him from > bankruptcy. > > We need more people of this quality. > > /gustav > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > From stuart at lexacorp.com.pg Sat Oct 3 01:04:31 2015 From: stuart at lexacorp.com.pg (Stuart McLachlan) Date: Sat, 03 Oct 2015 16:04:31 +1000 Subject: [AccessD] Access 2013 - open WPS files? In-Reply-To: <560EAF34.50306@torchlake.com> References: <560EAF34.50306@torchlake.com> Message-ID: <560F6FEF.22863.48A19DE@stuart.lexacorp.com.pg> You can open any file which has an assocated application from within Access. As long as the .wpd (or whatever) extension is associated with WP, just pass the full file path/name to the function below and it will open in WP. 'Best to place this declaration in a stand alone module Public Declare Function ShellExecute Lib "SHELL32.DLL" _ Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, _ ByVal lpFile As String, ByVal lpParameters As String, _ ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long 'I oftern call the following function from the DoubleClick event of a textbox which shows the filename. Function OpenFileInApplication(Filename as string) as long 'Opens any file in its assocated application If (Dir$(Filename) > "") Then ShellExecute Application.hWndAccessApp, "Open", Filename, "", "", vbNormalFocus Else MsgBox FileName & " not found!" OpenFileInApplication = 1 End If End Function -- Stuart On 2 Oct 2015 at 12:22, Tina Norris Fields wrote: > Hi Gang, > > Still working on a database for a law firm. They would like to open > certain WordPerfect files from inside Access. Can Access do that, or, > do I have to convince them to convert the wps files to doc or docx > files? > > Thanks, > TNF > > -- > Tina Norris Fields > tinanfields-at-torchlake-dot-com > 231-322-2787 > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > From accessd at shaw.ca Sat Oct 3 01:07:28 2015 From: accessd at shaw.ca (Jim Lawrence) Date: Sat, 3 Oct 2015 00:07:28 -0600 (MDT) Subject: [AccessD] OT Friday Special: Elon Musk In-Reply-To: <560F6B46.2474.477E611@stuart.lexacorp.com.pg> Message-ID: <1814455917.31753273.1443852448192.JavaMail.root@shaw.ca> Ha ha ha... Jim ----- Original Message ----- From: "Stuart McLachlan" To: "Access Developers discussion and problem solving" Sent: Friday, October 2, 2015 10:44:38 PM Subject: Re: [AccessD] OT Friday Special: Elon Musk With great effort, I will refrain from stating my opinion of him! :) On 2 Oct 2015 at 19:49, Jim Lawrence wrote: > Hi Gustav: > > Eton Musk is a modern hero...a man with true vision. We can sure use > many more like him. > > Jim > > ----- Original Message ----- > From: "Gustav Brock" > To: "Access Developers discussion and problem solving" > Sent: Friday, October 2, 2015 7:35:52 > AM Subject: [AccessD] OT Friday Special: Elon Musk > > Hi all > > Speak about a man with a vision on behalf of humanity. Can it be > greater? > > You know, of course, about Elon Musk, but in a remarkable interview > last Sunday on the primary Danish broadcasting channel he really sets > the distance to the usual crowd of bragging business people who are > mostly in it for the money: > > https://www.dr.dk/tv/se/21-soendag/21-soendag-2015-09-27#!/ > > Go to 25:55 at the time bar in the footer. The interview lasts for > about 12 minutes. > > The in-between cuts are in Danish but you will probably guess what > they deal with except, perhaps, for the information that a large > contract with NASA was what in the last second saved him from > bankruptcy. > > We need more people of this quality. > > /gustav > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From bensonforums at gmail.com Sat Oct 3 07:43:27 2015 From: bensonforums at gmail.com (Bill Benson) Date: Sat, 3 Oct 2015 08:43:27 -0400 Subject: [AccessD] OT Friday Special: Elon Musk In-Reply-To: References: Message-ID: "We're just making a joke, you know ... SEx" I have heard a lot of this in a TED talk I think (his philosophy). But wanting to have a city on Mars? Is that because E.M. really is Terminator type AI come back from the future and is on a mission to push out all humans from Earth (to Mars) so they can enjoy our eco-system without humans screwing it up to the point that even machines cannot function? On Fri, Oct 2, 2015 at 10:35 AM, Gustav Brock wrote: > Hi all > > Speak about a man with a vision on behalf of humanity. Can it be greater? > > You know, of course, about Elon Musk, but in a remarkable interview last > Sunday on the primary Danish broadcasting channel he really sets the > distance to the usual crowd of bragging business people who are mostly in > it for the money: > > https://www.dr.dk/tv/se/21-soendag/21-soendag-2015-09-27#!/ > > Go to 25:55 at the time bar in the footer. The interview lasts for > about 12 minutes. > > The in-between cuts are in Danish but you will probably guess what they > deal with except, perhaps, for the information that a large contract with > NASA was what in the last second saved him from bankruptcy. > > We need more people of this quality. > > /gustav > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > From jim at therareshop.com Sat Oct 3 09:55:00 2015 From: jim at therareshop.com (Jim Hale) Date: Sat, 3 Oct 2015 09:55:00 -0500 Subject: [AccessD] OT Friday Special: Elon Musk In-Reply-To: <1814455917.31753273.1443852448192.JavaMail.root@shaw.ca> References: <560F6B46.2474.477E611@stuart.lexacorp.com.pg> <1814455917.31753273.1443852448192.JavaMail.root@shaw.ca> Message-ID: <00b601d0fdeb$7a839510$6f8abf30$@therareshop.com> Meanwhile back on earth Tesla is losing altitude. Jim H Tesla Doesn't Have Much Breathing Room What Tesla didn't say during its Model X unveiling was most important for investors ByCharley Grant Updated Sept. 30, 2015 5:46 p.m. ET 24 COMMENTS WSJ | 2015-09-30T21:46:00.000Z Tesla Motors' new Model X Signature crossover vehicle will protect its passengers from biological warfare. That's great, so long as you don't roll down the window. And investors might be concerned with some more prosaic risks surrounding the rollout of the Model X. Tesla unveiled a higher-end version of the Model X which costs $132,000, and delivered a handful of cars on Tuesday evening. Among the unique features on the car is a HEPA air filter. But it was what Tesla didn't say that might be of more interest to investors. Namely, it didn't give details about the base price of the Model X. Nor did Tesla give an update on when the Model X will be in full production. It was originally slated to roll out in 2013. This information is important because Tesla is counting on strong Model X sales to reach its guidance of 50,000 to 55,000 vehicle deliveries in 2015. Tesla already has lowered this guidance once. Any further reductions could cast doubt on the company's ability to achieve scale. Tesla warned in August that a "one-week pushout of this ramp due to an issue at even a single supplier could reduce Model X production by approximately 800 units for the quarter." For a big car maker, such a small miss wouldn't matter that much. But Tesla, and more importantly its stock, it will. The shares have so far this year outperformed the S&P 500 by about 18 percentage points and it trades at about 150 times forward earnings. In that sort of rarefied atmosphere, even a small miss could leave investors gasping -----Original Message----- From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Jim Lawrence Sent: Saturday, October 03, 2015 1:07 AM To: Access Developers discussion and problem solving Subject: Re: [AccessD] OT Friday Special: Elon Musk Ha ha ha... Jim ----- Original Message ----- From: "Stuart McLachlan" To: "Access Developers discussion and problem solving" Sent: Friday, October 2, 2015 10:44:38 PM Subject: Re: [AccessD] OT Friday Special: Elon Musk With great effort, I will refrain from stating my opinion of him! :) On 2 Oct 2015 at 19:49, Jim Lawrence wrote: > Hi Gustav: > > Eton Musk is a modern hero...a man with true vision. We can sure use > many more like him. > > Jim > > ----- Original Message ----- > From: "Gustav Brock" > To: "Access Developers discussion and problem solving" > Sent: Friday, October 2, 2015 7:35:52 > AM Subject: [AccessD] OT Friday Special: Elon Musk > > Hi all > > Speak about a man with a vision on behalf of humanity. Can it be > greater? > > You know, of course, about Elon Musk, but in a remarkable interview > last Sunday on the primary Danish broadcasting channel he really sets > the distance to the usual crowd of bragging business people who are > mostly in it for the money: > > https://www.dr.dk/tv/se/21-soendag/21-soendag-2015-09-27#!/ > > Go to 25:55 at the time bar in the footer. The interview lasts for > about 12 minutes. > > The in-between cuts are in Danish but you will probably guess what > they deal with except, perhaps, for the information that a large > contract with NASA was what in the last second saved him from > bankruptcy. > > We need more people of this quality. > > /gustav > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From bensonforums at gmail.com Sat Oct 3 10:37:28 2015 From: bensonforums at gmail.com (Bill Benson) Date: Sat, 3 Oct 2015 11:37:28 -0400 Subject: [AccessD] OT Friday Special: Elon Musk In-Reply-To: <00b601d0fdeb$7a839510$6f8abf30$@therareshop.com> References: <560F6B46.2474.477E611@stuart.lexacorp.com.pg> <1814455917.31753273.1443852448192.JavaMail.root@shaw.ca> <00b601d0fdeb$7a839510$6f8abf30$@therareshop.com> Message-ID: Jim, don't make him ... cry ... again. On Sat, Oct 3, 2015 at 10:55 AM, Jim Hale wrote: > Meanwhile back on earth Tesla is losing altitude. > > Jim H > > Tesla Doesn't Have Much Breathing Room > > What Tesla didn't say during its Model X unveiling was most important for > investors > > > ByCharley Grant Updated Sept. 30, 2015 5:46 p.m. ET 24 COMMENTS > > WSJ | 2015-09-30T21:46:00.000Z > > > > > Tesla Motors' new Model X Signature crossover vehicle will protect its > passengers from biological warfare. That's great, so long as you don't roll > down the window. > > And investors might be concerned with some more prosaic risks surrounding > the rollout of the Model X. > > Tesla unveiled a higher-end version of the Model X which costs $132,000, > and > delivered a handful of cars on Tuesday evening. Among the unique features > on > the car is a HEPA air filter. > > But it was what Tesla didn't say that might be of more interest to > investors. Namely, it didn't give details about the base price of the Model > X. Nor did Tesla give an update on when the Model X will be in full > production. It was originally slated to roll out in 2013. > > This information is important because Tesla is counting on strong Model X > sales to reach its guidance of 50,000 to 55,000 vehicle deliveries in 2015. > > Tesla already has lowered this guidance once. Any further reductions could > cast doubt on the company's ability to achieve scale. Tesla warned in > August > that a "one-week pushout of this ramp due to an issue at even a single > supplier could reduce Model X production by approximately 800 units for the > quarter." > > For a big car maker, such a small miss wouldn't matter that much. But > Tesla, > and more importantly its stock, it will. The shares have so far this year > outperformed the S&P 500 by about 18 percentage points and it trades at > about 150 times forward earnings. > > In that sort of rarefied atmosphere, even a small miss could leave > investors > gasping > > -----Original Message----- > From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of > Jim > Lawrence > Sent: Saturday, October 03, 2015 1:07 AM > To: Access Developers discussion and problem solving > > Subject: Re: [AccessD] OT Friday Special: Elon Musk > > Ha ha ha... > > Jim > > ----- Original Message ----- > From: "Stuart McLachlan" > To: "Access Developers discussion and problem solving" > > Sent: Friday, October 2, 2015 10:44:38 PM > Subject: Re: [AccessD] OT Friday Special: Elon Musk > > With great effort, I will refrain from stating my opinion of him! > > :) > > > > On 2 Oct 2015 at 19:49, Jim Lawrence wrote: > > > Hi Gustav: > > > > Eton Musk is a modern hero...a man with true vision. We can sure use > > many more like him. > > > > Jim > > > > ----- Original Message ----- > > From: "Gustav Brock" > > To: "Access Developers discussion and problem solving" > > Sent: Friday, October 2, 2015 7:35:52 > > AM Subject: [AccessD] OT Friday Special: Elon Musk > > > > Hi all > > > > Speak about a man with a vision on behalf of humanity. Can it be > > greater? > > > > You know, of course, about Elon Musk, but in a remarkable interview > > last Sunday on the primary Danish broadcasting channel he really sets > > the distance to the usual crowd of bragging business people who are > > mostly in it for the money: > > > > https://www.dr.dk/tv/se/21-soendag/21-soendag-2015-09-27#!/ > > > > Go to 25:55 at the time bar in the footer. The interview lasts for > > about 12 minutes. > > > > The in-between cuts are in Danish but you will probably guess what > > they deal with except, perhaps, for the information that a large > > contract with NASA was what in the last second saved him from > > bankruptcy. > > > > We need more people of this quality. > > > > /gustav > > -- > > AccessD mailing list > > AccessD at databaseadvisors.com > > http://databaseadvisors.com/mailman/listinfo/accessd > > Website: http://www.databaseadvisors.com > > -- > > AccessD mailing list > > AccessD at databaseadvisors.com > > http://databaseadvisors.com/mailman/listinfo/accessd > > Website: http://www.databaseadvisors.com > > > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > From tinanfields at torchlake.com Sat Oct 3 16:07:20 2015 From: tinanfields at torchlake.com (Tina Norris Fields) Date: Sat, 3 Oct 2015 17:07:20 -0400 Subject: [AccessD] Access 2013 - open WPS files? In-Reply-To: <560F6FEF.22863.48A19DE@stuart.lexacorp.com.pg> References: <560EAF34.50306@torchlake.com> <560F6FEF.22863.48A19DE@stuart.lexacorp.com.pg> Message-ID: <56104388.8070407@torchlake.com> Aha! Exactly what I should have though about - the associated application. Thank you, Stuart! Grabbing your code right this instant. TNF Tina Norris Fields tinanfields-at-torchlake-dot-com 231-322-2787 On 10/03/15 2:04 AM, Stuart McLachlan wrote: > You can open any file which has an assocated application from within Access. > > As long as the .wpd (or whatever) extension is associated with WP, just pass the full file > path/name to the function below and it will open in WP. > > 'Best to place this declaration in a stand alone module > Public Declare Function ShellExecute Lib "SHELL32.DLL" _ > Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, _ > ByVal lpFile As String, ByVal lpParameters As String, _ > ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long > > > 'I oftern call the following function from the DoubleClick event of a textbox which shows the > filename. > > Function OpenFileInApplication(Filename as string) as long > 'Opens any file in its assocated application > > If (Dir$(Filename) > "") Then > ShellExecute Application.hWndAccessApp, "Open", Filename, "", "", vbNormalFocus > Else > MsgBox FileName & " not found!" > OpenFileInApplication = 1 > End If > > End Function > From newsgrps at dalyn.co.nz Wed Oct 7 18:34:58 2015 From: newsgrps at dalyn.co.nz (David Emerson) Date: Thu, 8 Oct 2015 12:34:58 +1300 Subject: [AccessD] Stored Procedure as Rowsource for Chart Message-ID: <005701d10158$c8356f70$58a04e50$@dalyn.co.nz> Hi Listers, I have a simpler report with a single chart. I want to use a stored procedure as the rowsource. How do I do this? I have tried putting the procedure name in the rowsource field but this doesn't work (which doesn't surprise me). Here is the procedure call: EXEC dbo.sprptReferralTypeValueMonth '2015-06-01' I am guessing that I need to set a ADODB.Recordset when the report is loaded but I am not sure what to do with the recordset once I have it. Regards David Emerson Dalyn Software Ltd Wellington, New Zealand From dw-murphy at cox.net Wed Oct 7 18:49:55 2015 From: dw-murphy at cox.net (Doug Murphy) Date: Wed, 7 Oct 2015 16:49:55 -0700 Subject: [AccessD] MySQL db on Arvixe linux server Message-ID: <013301d1015a$dddb5b80$99921280$@cox.net> This is kind of an off the wall question. I know several folks on this list have used Arvixe for hosting websites/databases. Most databases are probably SQL Server on Windows hosting servers. I need to try to link an Access front end to a MySql database on an Arvixe Linux server. Anyone done this? Doug From stuart at lexacorp.com.pg Wed Oct 7 18:50:30 2015 From: stuart at lexacorp.com.pg (Stuart McLachlan) Date: Thu, 08 Oct 2015 09:50:30 +1000 Subject: [AccessD] Stored Procedure as Rowsource for Chart In-Reply-To: <005701d10158$c8356f70$58a04e50$@dalyn.co.nz> References: <005701d10158$c8356f70$58a04e50$@dalyn.co.nz> Message-ID: <5615AFC6.6873.3279481@stuart.lexacorp.com.pg> Use a Passthrough query as the source. You can generate the querydef for the PT query programmatically if you need to pass parameters to your procedure. A good howto with appropriate examples is here: http://www.databasejournal.com/features/msaccess/article.php/3407531/How-to-Execute-SQ L-Stored-Procedures-from-Microsoft-Access.htm -- Stuart On 8 Oct 2015 at 12:34, David Emerson wrote: > Hi Listers, > > > > I have a simpler report with a single chart. I want to use a stored > procedure as the rowsource. How do I do this? I have tried putting > the procedure name in the rowsource field but this doesn't work (which > doesn't surprise me). > > > > Here is the procedure call: EXEC dbo.sprptReferralTypeValueMonth > '2015-06-01' > > > > I am guessing that I need to set a ADODB.Recordset when the report is > loaded but I am not sure what to do with the recordset once I have it. > > > > Regards > > David Emerson > Dalyn Software Ltd > Wellington, New Zealand > > > > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > From newsgrps at dalyn.co.nz Wed Oct 7 19:24:09 2015 From: newsgrps at dalyn.co.nz (David Emerson) Date: Thu, 8 Oct 2015 13:24:09 +1300 Subject: [AccessD] Stored Procedure as Rowsource for Chart In-Reply-To: <5615AFC6.6873.3279481@stuart.lexacorp.com.pg> References: <005701d10158$c8356f70$58a04e50$@dalyn.co.nz> <5615AFC6.6873.3279481@stuart.lexacorp.com.pg> Message-ID: <006501d1015f$a6841550$f38c3ff0$@dalyn.co.nz> Thanks Stuart, I looked at the article but I don't think it quite fits my problem. I already have code to get the results from a passthrough query. My problem is how and where I can set the Chart rowsource so that the data from the stored procedure is used. Here is the code (simplified) for the passthrough query: Public grst1 As DAO.Recordset Public Sub basReportPassThroughQuery(strSproc As String) ' Sample Call (Report and 1 sub report) 'strSproc = "EXEC dbo.spsrpClientQualitySurvey " & Nz(Me!txtID, 0) 'Call basReportPassThroughQuery(strSproc) Dim strTempQueryName As String, qdefTemp As DAO.QueryDef strTempQueryName = "qryTempQuery" CurrentDb.QueryDefs.Delete strTempQueryName 'In case exists Set qdefTemp = CurrentDb.CreateQueryDef(strTempQueryName) qdefTemp.ReturnsRecords = True qdefTemp.ODBCTimeout = 120 qdefTemp.Connect = "ODBC;DRIVER=SQL Server;SERVER=Servername;DATABASE=database;Trusted_Connection=Yes" qdefTemp.SQL = strSproc Set grst1 = qdefTemp.OpenRecordset End Sub Now that I have the recordset how do I get the chart to use it? Regards David -----Original Message----- From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Stuart McLachlan Sent: Thursday, 8 October 2015 12:51 p.m. To: Access Developers discussion and problem solving Subject: Re: [AccessD] Stored Procedure as Rowsource for Chart Use a Passthrough query as the source. You can generate the querydef for the PT query programmatically if you need to pass parameters to your procedure. A good howto with appropriate examples is here: http://www.databasejournal.com/features/msaccess/article.php/3407531/How-to- Execute-SQL-Stored-Procedures-from-Microsoft-Access.htm -- Stuart On 8 Oct 2015 at 12:34, David Emerson wrote: > Hi Listers, > > I have a simpler report with a single chart. I want to use a stored > procedure as the rowsource. How do I do this? I have tried putting > the procedure name in the rowsource field but this doesn't work (which > doesn't surprise me). > > Here is the procedure call: EXEC dbo.sprptReferralTypeValueMonth > '2015-06-01' > > I am guessing that I need to set a ADODB.Recordset when the report is > loaded but I am not sure what to do with the recordset once I have it. > > Regards > > David Emerson > Dalyn Software Ltd > Wellington, New Zealand From stuart at lexacorp.com.pg Wed Oct 7 19:28:09 2015 From: stuart at lexacorp.com.pg (Stuart McLachlan) Date: Thu, 08 Oct 2015 10:28:09 +1000 Subject: [AccessD] MySQL db on Arvixe linux server In-Reply-To: <013301d1015a$dddb5b80$99921280$@cox.net> References: <013301d1015a$dddb5b80$99921280$@cox.net> Message-ID: <5615B899.11242.34A0E91@stuart.lexacorp.com.pg> Install the MySQL ODBC driver on the Access machine. https://dev.mysql.com/downloads/connector/odbc/ Then just connect to MySql the same way as any other ODBC source. Just make sure that the MySQL server is configured to allow connections from other IP locations. It is common to configure it on web servers so that only localhost can connect to it. -- Stuart On 7 Oct 2015 at 16:49, Doug Murphy wrote: > This is kind of an off the wall question. I know several folks on this > list have used Arvixe for hosting websites/databases. Most databases > are probably SQL Server on Windows hosting servers. I need to try to > link an Access front end to a MySql database on an Arvixe Linux > server. Anyone done this? > > Doug > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > From stuart at lexacorp.com.pg Wed Oct 7 19:38:05 2015 From: stuart at lexacorp.com.pg (Stuart McLachlan) Date: Thu, 08 Oct 2015 10:38:05 +1000 Subject: [AccessD] Stored Procedure as Rowsource for Chart In-Reply-To: <006501d1015f$a6841550$f38c3ff0$@dalyn.co.nz> References: <005701d10158$c8356f70$58a04e50$@dalyn.co.nz>, <5615AFC6.6873.3279481@stuart.lexacorp.com.pg>, <006501d1015f$a6841550$f38c3ff0$@dalyn.co.nz> Message-ID: <5615BAED.4849.35326C3@stuart.lexacorp.com.pg> Don't use a temp query. Used a stored query. Create a Passthrough query as qryChartData which calls your SP with some date. Save that query. Set that query as the row source. Assuming that you open the report from a button click somewhere and you have the desired date available then in your code modify and save the qryDef.SQL of qryChartData before opening the report. On 8 Oct 2015 at 13:24, David Emerson wrote: > Thanks Stuart, I looked at the article but I don't think it quite > fits my problem. > > I already have code to get the results from a passthrough query. My > problem is how and where I can set the Chart rowsource so that the > data from the stored procedure is used. > > Here is the code (simplified) for the passthrough query: > > Public grst1 As DAO.Recordset > > Public Sub basReportPassThroughQuery(strSproc As String) > ' Sample Call (Report and 1 sub report) > 'strSproc = "EXEC dbo.spsrpClientQualitySurvey " & Nz(Me!txtID, 0) > 'Call basReportPassThroughQuery(strSproc) > > Dim strTempQueryName As String, qdefTemp As DAO.QueryDef > > strTempQueryName = "qryTempQuery" > CurrentDb.QueryDefs.Delete strTempQueryName 'In case exists > Set qdefTemp = CurrentDb.CreateQueryDef(strTempQueryName) > qdefTemp.ReturnsRecords = True > qdefTemp.ODBCTimeout = 120 > qdefTemp.Connect = "ODBC;DRIVER=SQL > Server;SERVER=Servername;DATABASE=database;Trusted_Connection=Yes" > > qdefTemp.SQL = strSproc > > Set grst1 = qdefTemp.OpenRecordset > > End Sub > > Now that I have the recordset how do I get the chart to use it? > > Regards > > David > > -----Original Message----- > From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf > Of Stuart McLachlan Sent: Thursday, 8 October 2015 12:51 p.m. To: > Access Developers discussion and problem solving Subject: Re: > [AccessD] Stored Procedure as Rowsource for Chart > > Use a Passthrough query as the source. > > You can generate the querydef for the PT query programmatically if > you need to pass parameters to your procedure. > > A good howto with appropriate examples is here: > > http://www.databasejournal.com/features/msaccess/article.php/3407531/H > ow-to- Execute-SQL-Stored-Procedures-from-Microsoft-Access.htm > > -- > Stuart > > On 8 Oct 2015 at 12:34, David Emerson wrote: > > > Hi Listers, > > > > I have a simpler report with a single chart. I want to use a stored > > procedure as the rowsource. How do I do this? I have tried putting > > the procedure name in the rowsource field but this doesn't work > > (which doesn't surprise me). > > > > Here is the procedure call: EXEC dbo.sprptReferralTypeValueMonth > > '2015-06-01' > > > > I am guessing that I need to set a ADODB.Recordset when the report > > is loaded but I am not sure what to do with the recordset once I > > have it. > > > > Regards > > > > David Emerson > > Dalyn Software Ltd > > Wellington, New Zealand > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > From newsgrps at dalyn.co.nz Wed Oct 7 21:27:06 2015 From: newsgrps at dalyn.co.nz (David Emerson) Date: Thu, 8 Oct 2015 15:27:06 +1300 Subject: [AccessD] Stored Procedure as Rowsource for Chart In-Reply-To: <5615BAED.4849.35326C3@stuart.lexacorp.com.pg> References: <005701d10158$c8356f70$58a04e50$@dalyn.co.nz>, <5615AFC6.6873.3279481@stuart.lexacorp.com.pg>, <006501d1015f$a6841550$f38c3ff0$@dalyn.co.nz> <5615BAED.4849.35326C3@stuart.lexacorp.com.pg> Message-ID: <007501d10170$d37d6370$7a782a50$@dalyn.co.nz> Thanks Stuart - that was the missing piece. Putting the name of the query in the Rowsource property. Much appreciated. David -----Original Message----- From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Stuart McLachlan Sent: Thursday, 8 October 2015 1:38 p.m. To: Access Developers discussion and problem solving Subject: Re: [AccessD] Stored Procedure as Rowsource for Chart Don't use a temp query. Used a stored query. Create a Passthrough query as qryChartData which calls your SP with some date. Save that query. Set that query as the row source. Assuming that you open the report from a button click somewhere and you have the desired date available then in your code modify and save the qryDef.SQL of qryChartData before opening the report. On 8 Oct 2015 at 13:24, David Emerson wrote: > Thanks Stuart, I looked at the article but I don't think it quite > fits my problem. > > I already have code to get the results from a passthrough query. My > problem is how and where I can set the Chart rowsource so that the > data from the stored procedure is used. > > Here is the code (simplified) for the passthrough query: > > Public grst1 As DAO.Recordset > > Public Sub basReportPassThroughQuery(strSproc As String) ' Sample Call > (Report and 1 sub report) 'strSproc = "EXEC > dbo.spsrpClientQualitySurvey " & Nz(Me!txtID, 0) 'Call > basReportPassThroughQuery(strSproc) > > Dim strTempQueryName As String, qdefTemp As DAO.QueryDef > > strTempQueryName = "qryTempQuery" > CurrentDb.QueryDefs.Delete strTempQueryName 'In case exists > Set qdefTemp = CurrentDb.CreateQueryDef(strTempQueryName) > qdefTemp.ReturnsRecords = True > qdefTemp.ODBCTimeout = 120 > qdefTemp.Connect = "ODBC;DRIVER=SQL > Server;SERVER=Servername;DATABASE=database;Trusted_Connection=Yes" > > qdefTemp.SQL = strSproc > > Set grst1 = qdefTemp.OpenRecordset > > End Sub > > Now that I have the recordset how do I get the chart to use it? > > Regards > > David > > -----Original Message----- > From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf > Of Stuart McLachlan Sent: Thursday, 8 October 2015 12:51 p.m. To: > Access Developers discussion and problem solving Subject: Re: > [AccessD] Stored Procedure as Rowsource for Chart > > Use a Passthrough query as the source. > > You can generate the querydef for the PT query programmatically if you > need to pass parameters to your procedure. > > A good howto with appropriate examples is here: > > http://www.databasejournal.com/features/msaccess/article.php/3407531/H > ow-to- Execute-SQL-Stored-Procedures-from-Microsoft-Access.htm > > -- > Stuart > > On 8 Oct 2015 at 12:34, David Emerson wrote: > > > Hi Listers, > > > > I have a simpler report with a single chart. I want to use a stored > > procedure as the rowsource. How do I do this? I have tried putting > > the procedure name in the rowsource field but this doesn't work > > (which doesn't surprise me). > > > > Here is the procedure call: EXEC dbo.sprptReferralTypeValueMonth > > '2015-06-01' > > > > I am guessing that I need to set a ADODB.Recordset when the report > > is loaded but I am not sure what to do with the recordset once I > > have it. > > > > Regards > > > > David Emerson > > Dalyn Software Ltd > > Wellington, New Zealand > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From accessd at shaw.ca Wed Oct 7 23:41:02 2015 From: accessd at shaw.ca (Jim Lawrence) Date: Wed, 7 Oct 2015 22:41:02 -0600 (MDT) Subject: [AccessD] Stored Procedure as Rowsource for Chart In-Reply-To: <006501d1015f$a6841550$f38c3ff0$@dalyn.co.nz> Message-ID: <1398027378.35386319.1444279262097.JavaMail.root@shaw.ca> Hi David: Here is an overly simplified Youtube vid of connecting MS Access to a MySQL DB: https://www.youtube.com/watch?v=F06hvR6ksh4 Here is a link to some comprehensive lists of database to database connection string: http://www.connectionstrings.com and http://www.dofactory.com/reference/connection-strings and http://www.carlprothman.net/Default.aspx?tabid=90 Aside: If you use the standard method of generating an ODBC connect, the file created can be stripped down to a basic string by changing the file's extension to ".txt" and using the resultant connection text string directly within your Access connection module. Do you have direct root access to the MySQL DB that you will be using? HTH Jim ----- Original Message ----- From: "David Emerson" To: "Access Developers discussion and problem solving" Sent: Wednesday, October 7, 2015 5:24:09 PM Subject: Re: [AccessD] Stored Procedure as Rowsource for Chart Thanks Stuart, I looked at the article but I don't think it quite fits my problem. I already have code to get the results from a passthrough query. My problem is how and where I can set the Chart rowsource so that the data from the stored procedure is used. Here is the code (simplified) for the passthrough query: Public grst1 As DAO.Recordset Public Sub basReportPassThroughQuery(strSproc As String) ' Sample Call (Report and 1 sub report) 'strSproc = "EXEC dbo.spsrpClientQualitySurvey " & Nz(Me!txtID, 0) 'Call basReportPassThroughQuery(strSproc) Dim strTempQueryName As String, qdefTemp As DAO.QueryDef strTempQueryName = "qryTempQuery" CurrentDb.QueryDefs.Delete strTempQueryName 'In case exists Set qdefTemp = CurrentDb.CreateQueryDef(strTempQueryName) qdefTemp.ReturnsRecords = True qdefTemp.ODBCTimeout = 120 qdefTemp.Connect = "ODBC;DRIVER=SQL Server;SERVER=Servername;DATABASE=database;Trusted_Connection=Yes" qdefTemp.SQL = strSproc Set grst1 = qdefTemp.OpenRecordset End Sub Now that I have the recordset how do I get the chart to use it? Regards David -----Original Message----- From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Stuart McLachlan Sent: Thursday, 8 October 2015 12:51 p.m. To: Access Developers discussion and problem solving Subject: Re: [AccessD] Stored Procedure as Rowsource for Chart Use a Passthrough query as the source. You can generate the querydef for the PT query programmatically if you need to pass parameters to your procedure. A good howto with appropriate examples is here: http://www.databasejournal.com/features/msaccess/article.php/3407531/How-to- Execute-SQL-Stored-Procedures-from-Microsoft-Access.htm -- Stuart On 8 Oct 2015 at 12:34, David Emerson wrote: > Hi Listers, > > I have a simpler report with a single chart. I want to use a stored > procedure as the rowsource. How do I do this? I have tried putting > the procedure name in the rowsource field but this doesn't work (which > doesn't surprise me). > > Here is the procedure call: EXEC dbo.sprptReferralTypeValueMonth > '2015-06-01' > > I am guessing that I need to set a ADODB.Recordset when the report is > loaded but I am not sure what to do with the recordset once I have it. > > Regards > > David Emerson > Dalyn Software Ltd > Wellington, New Zealand -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From dw-murphy at cox.net Thu Oct 8 00:11:39 2015 From: dw-murphy at cox.net (doug) Date: Wed, 07 Oct 2015 22:11:39 -0700 Subject: [AccessD] Stored Procedure as Rowsource for Chart Message-ID: <9fc4dkj0ul7vmkap3k5u253y.1444281021552@email.android.com> Jim, I am guessing not. The db is on a shared hosting account.? -------- Original message -------- From: Jim Lawrence Date:10/07/2015 9:41 PM (GMT-08:00) To: Access Developers discussion and problem solving Subject: Re: [AccessD] Stored Procedure as Rowsource for Chart Hi David: Here is an overly simplified Youtube vid of connecting MS Access to a MySQL DB: https://www.youtube.com/watch?v=F06hvR6ksh4 Here is a link to some comprehensive lists of database to database connection string: http://www.connectionstrings.com and http://www.dofactory.com/reference/connection-strings and http://www.carlprothman.net/Default.aspx?tabid=90 Aside: If you use the standard method of generating an ODBC connect, the file created can be stripped down to a basic string by changing the file's extension to ".txt" and using the resultant connection text string directly within your Access connection module. Do you have direct root access to the MySQL DB that you will be using? HTH Jim ----- Original Message ----- From: "David Emerson" To: "Access Developers discussion and problem solving" Sent: Wednesday, October 7, 2015 5:24:09 PM Subject: Re: [AccessD] Stored Procedure as Rowsource for Chart Thanks Stuart, I looked at the article but I don't think it quite fits my problem. I already have code to get the results from a passthrough query. My problem is how and where I can set the Chart rowsource so that the data from the stored procedure is used. Here is the code (simplified) for the passthrough query: Public grst1 As DAO.Recordset Public Sub basReportPassThroughQuery(strSproc As String) ' Sample Call (Report and 1 sub report) 'strSproc = "EXEC dbo.spsrpClientQualitySurvey " & Nz(Me!txtID, 0) 'Call basReportPassThroughQuery(strSproc) Dim strTempQueryName As String, qdefTemp As DAO.QueryDef strTempQueryName = "qryTempQuery" CurrentDb.QueryDefs.Delete strTempQueryName 'In case exists Set qdefTemp = CurrentDb.CreateQueryDef(strTempQueryName) qdefTemp.ReturnsRecords = True qdefTemp.ODBCTimeout = 120 qdefTemp.Connect = "ODBC;DRIVER=SQL Server;SERVER=Servername;DATABASE=database;Trusted_Connection=Yes" qdefTemp.SQL = strSproc Set grst1 = qdefTemp.OpenRecordset End Sub Now that I have the recordset how do I get the chart to use it? Regards David -----Original Message----- From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Stuart McLachlan Sent: Thursday, 8 October 2015 12:51 p.m. To: Access Developers discussion and problem solving Subject: Re: [AccessD] Stored Procedure as Rowsource for Chart Use a Passthrough query as the source. You can generate the querydef for the PT query programmatically if you need to pass parameters to your procedure. A good howto with appropriate examples is here: http://www.databasejournal.com/features/msaccess/article.php/3407531/How-to- Execute-SQL-Stored-Procedures-from-Microsoft-Access.htm -- Stuart On 8 Oct 2015 at 12:34, David Emerson wrote: > Hi Listers, > > I have a simpler report with a single chart. I want to use a stored > procedure as the rowsource. How do I do this? I have tried putting > the procedure name in the rowsource field but this doesn't work (which > doesn't surprise me). > > Here is the procedure call: EXEC dbo.sprptReferralTypeValueMonth > '2015-06-01' > > I am guessing that I need to set a ADODB.Recordset when the report is > loaded but I am not sure what to do with the recordset once I have it. > > Regards > > David Emerson > Dalyn Software Ltd > Wellington, New Zealand -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From dw-murphy at cox.net Thu Oct 8 00:12:55 2015 From: dw-murphy at cox.net (doug) Date: Wed, 07 Oct 2015 22:12:55 -0700 Subject: [AccessD] Stored Procedure as Rowsource for Chart Message-ID: <3mlmtpodpk5qey574akhcue2.1444281134460@email.android.com> Sorry, you were answering a different post.? -------- Original message -------- From: Jim Lawrence Date:10/07/2015 9:41 PM (GMT-08:00) To: Access Developers discussion and problem solving Subject: Re: [AccessD] Stored Procedure as Rowsource for Chart Hi David: Here is an overly simplified Youtube vid of connecting MS Access to a MySQL DB: https://www.youtube.com/watch?v=F06hvR6ksh4 Here is a link to some comprehensive lists of database to database connection string: http://www.connectionstrings.com and http://www.dofactory.com/reference/connection-strings and http://www.carlprothman.net/Default.aspx?tabid=90 Aside: If you use the standard method of generating an ODBC connect, the file created can be stripped down to a basic string by changing the file's extension to ".txt" and using the resultant connection text string directly within your Access connection module. Do you have direct root access to the MySQL DB that you will be using? HTH Jim ----- Original Message ----- From: "David Emerson" To: "Access Developers discussion and problem solving" Sent: Wednesday, October 7, 2015 5:24:09 PM Subject: Re: [AccessD] Stored Procedure as Rowsource for Chart Thanks Stuart, I looked at the article but I don't think it quite fits my problem. I already have code to get the results from a passthrough query. My problem is how and where I can set the Chart rowsource so that the data from the stored procedure is used. Here is the code (simplified) for the passthrough query: Public grst1 As DAO.Recordset Public Sub basReportPassThroughQuery(strSproc As String) ' Sample Call (Report and 1 sub report) 'strSproc = "EXEC dbo.spsrpClientQualitySurvey " & Nz(Me!txtID, 0) 'Call basReportPassThroughQuery(strSproc) Dim strTempQueryName As String, qdefTemp As DAO.QueryDef strTempQueryName = "qryTempQuery" CurrentDb.QueryDefs.Delete strTempQueryName 'In case exists Set qdefTemp = CurrentDb.CreateQueryDef(strTempQueryName) qdefTemp.ReturnsRecords = True qdefTemp.ODBCTimeout = 120 qdefTemp.Connect = "ODBC;DRIVER=SQL Server;SERVER=Servername;DATABASE=database;Trusted_Connection=Yes" qdefTemp.SQL = strSproc Set grst1 = qdefTemp.OpenRecordset End Sub Now that I have the recordset how do I get the chart to use it? Regards David -----Original Message----- From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Stuart McLachlan Sent: Thursday, 8 October 2015 12:51 p.m. To: Access Developers discussion and problem solving Subject: Re: [AccessD] Stored Procedure as Rowsource for Chart Use a Passthrough query as the source. You can generate the querydef for the PT query programmatically if you need to pass parameters to your procedure. A good howto with appropriate examples is here: http://www.databasejournal.com/features/msaccess/article.php/3407531/How-to- Execute-SQL-Stored-Procedures-from-Microsoft-Access.htm -- Stuart On 8 Oct 2015 at 12:34, David Emerson wrote: > Hi Listers, > > I have a simpler report with a single chart. I want to use a stored > procedure as the rowsource. How do I do this? I have tried putting > the procedure name in the rowsource field but this doesn't work (which > doesn't surprise me). > > Here is the procedure call: EXEC dbo.sprptReferralTypeValueMonth > '2015-06-01' > > I am guessing that I need to set a ADODB.Recordset when the report is > loaded but I am not sure what to do with the recordset once I have it. > > Regards > > David Emerson > Dalyn Software Ltd > Wellington, New Zealand -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From stuart at lexacorp.com.pg Thu Oct 8 00:22:33 2015 From: stuart at lexacorp.com.pg (Stuart McLachlan) Date: Thu, 08 Oct 2015 15:22:33 +1000 Subject: [AccessD] MySQL db on Arvixe linux server In-Reply-To: <9fc4dkj0ul7vmkap3k5u253y.1444281021552@email.android.com> References: <9fc4dkj0ul7vmkap3k5u253y.1444281021552@email.android.com> Message-ID: <5615FD99.12441.4579552@stuart.lexacorp.com.pg> I've changed the subject back to the appropriate one. If it's on a shared hosting account, you almost certainly will not be able to access it from Access. The best I've ever managed in that situation is to export the data locally at one end as plain text, compress it, upload/download it via FTP , uncompress and then import at the other end. It's a lot of work. Still, it's worth contacting the hosting provider and checking whether you can have remote access. -- Stuart On 7 Oct 2015 at 22:11, doug wrote: > Jim, > > I am guessing not. The db is on a shared hosting account.? > > -------- Original message -------- > From: Jim Lawrence > Date:10/07/2015 9:41 PM (GMT-08:00) > To: Access Developers discussion and problem solving > Subject: Re: [AccessD] Stored Procedure > as Rowsource for Chart > > Hi David: > > Here is an overly simplified Youtube vid of connecting MS Access to a > MySQL DB: https://www.youtube.com/watch?v=F06hvR6ksh4 > > Here is a link to some comprehensive lists of database to database > connection string: http://www.connectionstrings.com and > http://www.dofactory.com/reference/connection-strings and > http://www.carlprothman.net/Default.aspx?tabid=90 > > Aside: If you use the standard method of generating an ODBC connect, > the file created can be stripped down to a basic string by changing > the file's extension to ".txt" and using the resultant connection text > string directly within your Access connection module. > > Do you have direct root access to the MySQL DB that you will be using? > > > HTH > Jim > From newsgrps at dalyn.co.nz Thu Oct 8 01:47:27 2015 From: newsgrps at dalyn.co.nz (David Emerson) Date: Thu, 8 Oct 2015 19:47:27 +1300 Subject: [AccessD] Stored Procedure as Rowsource for Chart In-Reply-To: <1398027378.35386319.1444279262097.JavaMail.root@shaw.ca> References: <006501d1015f$a6841550$f38c3ff0$@dalyn.co.nz> <1398027378.35386319.1444279262097.JavaMail.root@shaw.ca> Message-ID: <00e901d10195$328fe120$97afa360$@dalyn.co.nz> Hi Jim, Thanks for your response. Stuart solved the problem for me. Regards David -----Original Message----- From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Jim Lawrence Sent: Thursday, 8 October 2015 5:41 p.m. To: Access Developers discussion and problem solving Subject: Re: [AccessD] Stored Procedure as Rowsource for Chart Hi David: Here is an overly simplified Youtube vid of connecting MS Access to a MySQL DB: https://www.youtube.com/watch?v=F06hvR6ksh4 Here is a link to some comprehensive lists of database to database connection string: http://www.connectionstrings.com and http://www.dofactory.com/reference/connection-strings and http://www.carlprothman.net/Default.aspx?tabid=90 Aside: If you use the standard method of generating an ODBC connect, the file created can be stripped down to a basic string by changing the file's extension to ".txt" and using the resultant connection text string directly within your Access connection module. Do you have direct root access to the MySQL DB that you will be using? HTH Jim ----- Original Message ----- From: "David Emerson" To: "Access Developers discussion and problem solving" Sent: Wednesday, October 7, 2015 5:24:09 PM Subject: Re: [AccessD] Stored Procedure as Rowsource for Chart Thanks Stuart, I looked at the article but I don't think it quite fits my problem. I already have code to get the results from a passthrough query. My problem is how and where I can set the Chart rowsource so that the data from the stored procedure is used. Here is the code (simplified) for the passthrough query: Public grst1 As DAO.Recordset Public Sub basReportPassThroughQuery(strSproc As String) ' Sample Call (Report and 1 sub report) 'strSproc = "EXEC dbo.spsrpClientQualitySurvey " & Nz(Me!txtID, 0) 'Call basReportPassThroughQuery(strSproc) Dim strTempQueryName As String, qdefTemp As DAO.QueryDef strTempQueryName = "qryTempQuery" CurrentDb.QueryDefs.Delete strTempQueryName 'In case exists Set qdefTemp = CurrentDb.CreateQueryDef(strTempQueryName) qdefTemp.ReturnsRecords = True qdefTemp.ODBCTimeout = 120 qdefTemp.Connect = "ODBC;DRIVER=SQL Server;SERVER=Servername;DATABASE=database;Trusted_Connection=Yes" qdefTemp.SQL = strSproc Set grst1 = qdefTemp.OpenRecordset End Sub Now that I have the recordset how do I get the chart to use it? Regards David -----Original Message----- From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Stuart McLachlan Sent: Thursday, 8 October 2015 12:51 p.m. To: Access Developers discussion and problem solving Subject: Re: [AccessD] Stored Procedure as Rowsource for Chart Use a Passthrough query as the source. You can generate the querydef for the PT query programmatically if you need to pass parameters to your procedure. A good howto with appropriate examples is here: http://www.databasejournal.com/features/msaccess/article.php/3407531/How-to- Execute-SQL-Stored-Procedures-from-Microsoft-Access.htm -- Stuart On 8 Oct 2015 at 12:34, David Emerson wrote: > Hi Listers, > > I have a simpler report with a single chart. I want to use a stored > procedure as the rowsource. How do I do this? I have tried putting > the procedure name in the rowsource field but this doesn't work (which > doesn't surprise me). > > Here is the procedure call: EXEC dbo.sprptReferralTypeValueMonth > '2015-06-01' > > I am guessing that I need to set a ADODB.Recordset when the report is > loaded but I am not sure what to do with the recordset once I have it. > > Regards > > David Emerson > Dalyn Software Ltd > Wellington, New Zealand -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From dw-murphy at cox.net Thu Oct 8 10:34:04 2015 From: dw-murphy at cox.net (Doug Murphy) Date: Thu, 8 Oct 2015 08:34:04 -0700 Subject: [AccessD] MySQL db on Arvixe linux server In-Reply-To: References: <9fc4dkj0ul7vmkap3k5u253y.1444281021552@email.android.com> Message-ID: <004901d101de$c39822b0$4ac86810$@cox.net> Thanks Stuart, Is it possible to connect using ADO and perform operations programmatically? I am not clear on why connections are limited on Linux servers. It seems the MySql odbc driver likes to connect on port 3306. Is that typically blocked on Linux servers. When I have a MySql database on a Windows shared hosting server I can connect with ADO. The application I am looking at is simple and has only one main table. It would be easy to keep Access on the client computer synchronized with the server db if we can connect. Thanks Doug -----Original Message----- From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Stuart McLachlan Sent: Wednesday, October 07, 2015 10:23 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] MySQL db on Arvixe linux server I've changed the subject back to the appropriate one. If it's on a shared hosting account, you almost certainly will not be able to access it from Access. The best I've ever managed in that situation is to export the data locally at one end as plain text, compress it, upload/download it via FTP , uncompress and then import at the other end. It's a lot of work. Still, it's worth contacting the hosting provider and checking whether you can have remote access. -- Stuart On 7 Oct 2015 at 22:11, doug wrote: > Jim, > > I am guessing not. The db is on a shared hosting account.? > > -------- Original message -------- > From: Jim Lawrence > Date:10/07/2015 9:41 PM (GMT-08:00) > To: Access Developers discussion and problem solving > Subject: Re: [AccessD] Stored Procedure > as Rowsource for Chart > > Hi David: > > Here is an overly simplified Youtube vid of connecting MS Access to a > MySQL DB: https://www.youtube.com/watch?v=F06hvR6ksh4 > > Here is a link to some comprehensive lists of database to database > connection string: http://www.connectionstrings.com and > http://www.dofactory.com/reference/connection-strings and > http://www.carlprothman.net/Default.aspx?tabid=90 > > Aside: If you use the standard method of generating an ODBC connect, > the file created can be stripped down to a basic string by changing > the file's extension to ".txt" and using the resultant connection text > string directly within your Access connection module. > > Do you have direct root access to the MySQL DB that you will be using? > > > HTH > Jim > -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From davidmcafee at gmail.com Thu Oct 8 16:06:45 2015 From: davidmcafee at gmail.com (David McAfee) Date: Thu, 8 Oct 2015 14:06:45 -0700 Subject: [AccessD] Windows Taskbar question: Access apps move around In-Reply-To: References: Message-ID: Am I the only one experiencing this? I see how two people asked a similar question, but they were never answered: http://answers.microsoft.com/en-us/windows/forum/windows_vista-windows_programs/how-do-i-move-taskbar-buttons-to-a-new-location/8559c6ac-f683-4a2a-966e-f6d0c93a6140?auth=1 This is really driving me nuts! D On Wed, Sep 16, 2015 at 11:08 AM, David McAfee wrote: > Windows Server 2008 R2 Standard > > I have three similarly named Access databases open. > > Their names are long enough that the three MDBs appear to have the same > name. > > I know which one is which, or so I thought... > > > I have a FY1415 version on the left, a FY1516 in the middle and a new > style FY1516 version on the right. > > I am doing certain things in one and not the others. > > I paste/or change some date criteria in one of the MDbs and all of the > sudden it's not returning the correct results. > > I now notice that the new 1516 is on the left, 1415 is in the middle and > 1516 is on the right! > > WTF!!! > > Is there a way to prevent Windows from moving them? > > > From stuart at lexacorp.com.pg Thu Oct 8 16:23:43 2015 From: stuart at lexacorp.com.pg (Stuart McLachlan) Date: Fri, 09 Oct 2015 07:23:43 +1000 Subject: [AccessD] MySQL db on Arvixe linux server In-Reply-To: <004901d101de$c39822b0$4ac86810$@cox.net> References: <9fc4dkj0ul7vmkap3k5u253y.1444281021552@email.android.com>, , <004901d101de$c39822b0$4ac86810$@cox.net> Message-ID: <5616DEDF.23292.7C78F6B@stuart.lexacorp.com.pg> It's not MySql or Linex Servers. It's a matter of basic security. Web hosting organisations need to lock down their systems very tightly because they are under constant attack using every newly identified security bug in their environment. I'm surprised that your Windows host provider has opened MyDQL server to remote connection from outside their environment, very few do so. Yes you can use ADO with the ODBC driver, but again, only if the DB engine accepts the connection. FWIW, You should do the same with any corporate SQL Server installation inside a LAN for secruity reasons - configure it to only allow connections from the same sub-net. -- Stuart On 8 Oct 2015 at 8:34, Doug Murphy wrote: > Thanks Stuart, > > Is it possible to connect using ADO and perform operations > programmatically? I am not clear on why connections are limited on > Linux servers. It seems the MySql odbc driver likes to connect on port > 3306. Is that typically blocked on Linux servers. When I have a MySql > database on a Windows shared hosting server I can connect with ADO. > The application I am looking at is simple and has only one main table. > It would be easy to keep Access on the client computer synchronized > with the server db if we can connect. > > Thanks > > Doug > > -----Original Message----- > From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf > Of Stuart McLachlan Sent: Wednesday, October 07, 2015 10:23 PM To: > Access Developers discussion and problem solving Subject: Re: > [AccessD] MySQL db on Arvixe linux server > > I've changed the subject back to the appropriate one. > > If it's on a shared hosting account, you almost certainly will not be > able to access it from Access. > > The best I've ever managed in that situation is to export the data > locally at one end as plain text, compress it, upload/download it via > FTP , uncompress and then import at the other end. It's a lot of > work. > > > Still, it's worth contacting the hosting provider and checking whether > you can have remote access. > > -- > Stuart > > On 7 Oct 2015 at 22:11, doug wrote: > > > Jim, > > > > I am guessing not. The db is on a shared hosting account.? > > > > -------- Original message -------- > > From: Jim Lawrence > > Date:10/07/2015 9:41 PM (GMT-08:00) > > To: Access Developers discussion and problem solving > > Subject: Re: [AccessD] Stored > > Procedure as Rowsource for Chart > > > > Hi David: > > > > Here is an overly simplified Youtube vid of connecting MS Access to > > a MySQL DB: https://www.youtube.com/watch?v=F06hvR6ksh4 > > > > Here is a link to some comprehensive lists of database to database > > connection string: http://www.connectionstrings.com and > > http://www.dofactory.com/reference/connection-strings and > > http://www.carlprothman.net/Default.aspx?tabid=90 > > > > Aside: If you use the standard method of generating an ODBC connect, > > the file created can be stripped down to a basic string by changing > > the file's extension to ".txt" and using the resultant connection > > text string directly within your Access connection module. > > > > Do you have direct root access to the MySQL DB that you will be > > using? > > > > > > HTH > > Jim > > > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > From jamesbutton at blueyonder.co.uk Thu Oct 8 16:38:53 2015 From: jamesbutton at blueyonder.co.uk (James Button) Date: Thu, 8 Oct 2015 22:38:53 +0100 Subject: [AccessD] Windows Taskbar question: Access apps move around In-Reply-To: References: Message-ID: Maybe 'group' apps on the taskbar will get you a single entry for Access apps on the taskbar and then select from the rise-up? List JimB -----Original Message----- From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of David McAfee Sent: Thursday, October 8, 2015 10:07 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Windows Taskbar question: Access apps move around Am I the only one experiencing this? I see how two people asked a similar question, but they were never answered: http://answers.microsoft.com/en-us/windows/forum/windows_vista-windows_programs/ how-do-i-move-taskbar-buttons-to-a-new-location/8559c6ac-f683-4a2a-966e-f6d0c93a 6140?auth=1 This is really driving me nuts! D On Wed, Sep 16, 2015 at 11:08 AM, David McAfee wrote: > Windows Server 2008 R2 Standard > > I have three similarly named Access databases open. > > Their names are long enough that the three MDBs appear to have the same > name. > > I know which one is which, or so I thought... > > > I have a FY1415 version on the left, a FY1516 in the middle and a new > style FY1516 version on the right. > > I am doing certain things in one and not the others. > > I paste/or change some date criteria in one of the MDbs and all of the > sudden it's not returning the correct results. > > I now notice that the new 1516 is on the left, 1415 is in the middle and > 1516 is on the right! > > WTF!!! > > Is there a way to prevent Windows from moving them? > > > -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From davidmcafee at gmail.com Thu Oct 8 18:14:42 2015 From: davidmcafee at gmail.com (David McAfee) Date: Thu, 8 Oct 2015 16:14:42 -0700 Subject: [AccessD] Windows Taskbar question: Access apps move around In-Reply-To: References: Message-ID: I think that's why I'm not getting an answer. Everyone I see uses Grouped programs on the task bar, I've never liked them. Grrr! On Thu, Oct 8, 2015 at 2:38 PM, James Button wrote: > Maybe 'group' apps on the taskbar will get you a single entry for Access > apps on > the taskbar and then select from the rise-up? List > > JimB > > -----Original Message----- > From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of > David > McAfee > Sent: Thursday, October 8, 2015 10:07 PM > To: Access Developers discussion and problem solving > Subject: Re: [AccessD] Windows Taskbar question: Access apps move around > > Am I the only one experiencing this? > > I see how two people asked a similar question, but they were never > answered: > > http://answers.microsoft.com/en-us/windows/forum/windows_vista-windows_programs/ > > how-do-i-move-taskbar-buttons-to-a-new-location/8559c6ac-f683-4a2a-966e-f6d0c93a > 6140?auth=1 > > This is really driving me nuts! > > D > > > On Wed, Sep 16, 2015 at 11:08 AM, David McAfee > wrote: > > > Windows Server 2008 R2 Standard > > > > I have three similarly named Access databases open. > > > > Their names are long enough that the three MDBs appear to have the same > > name. > > > > I know which one is which, or so I thought... > > > > > > I have a FY1415 version on the left, a FY1516 in the middle and a new > > style FY1516 version on the right. > > > > I am doing certain things in one and not the others. > > > > I paste/or change some date criteria in one of the MDbs and all of the > > sudden it's not returning the correct results. > > > > I now notice that the new 1516 is on the left, 1415 is in the middle and > > 1516 is on the right! > > > > WTF!!! > > > > Is there a way to prevent Windows from moving them? > > > > > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > From dw-murphy at cox.net Thu Oct 8 18:23:36 2015 From: dw-murphy at cox.net (Doug Murphy) Date: Thu, 8 Oct 2015 16:23:36 -0700 Subject: [AccessD] MySQL db on Arvixe linux server In-Reply-To: References: <9fc4dkj0ul7vmkap3k5u253y.1444281021552@email.android.com>, , <004901d101de$c39822b0$4ac86810$@cox.net> Message-ID: <010801d10220$5b995700$12cc0500$@cox.net> Can't speak for all hosts, but the few I am familiar with seem to allow it on Windows servers. Maybe Windows is so bad with security they don't bother. You can do this on Azure also, connect to a SQL server db that is. They do allow you to set which IP addresses can connect. But if you don't have a fixed IP that isn't very helpful. -----Original Message----- From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Stuart McLachlan Sent: Thursday, October 08, 2015 2:24 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] MySQL db on Arvixe linux server It's not MySql or Linex Servers. It's a matter of basic security. Web hosting organisations need to lock down their systems very tightly because they are under constant attack using every newly identified security bug in their environment. I'm surprised that your Windows host provider has opened MyDQL server to remote connection from outside their environment, very few do so. Yes you can use ADO with the ODBC driver, but again, only if the DB engine accepts the connection. FWIW, You should do the same with any corporate SQL Server installation inside a LAN for secruity reasons - configure it to only allow connections from the same sub-net. -- Stuart On 8 Oct 2015 at 8:34, Doug Murphy wrote: > Thanks Stuart, > > Is it possible to connect using ADO and perform operations > programmatically? I am not clear on why connections are limited on > Linux servers. It seems the MySql odbc driver likes to connect on port > 3306. Is that typically blocked on Linux servers. When I have a MySql > database on a Windows shared hosting server I can connect with ADO. > The application I am looking at is simple and has only one main table. > It would be easy to keep Access on the client computer synchronized > with the server db if we can connect. > > Thanks > > Doug > > -----Original Message----- > From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf > Of Stuart McLachlan Sent: Wednesday, October 07, 2015 10:23 PM To: > Access Developers discussion and problem solving Subject: Re: > [AccessD] MySQL db on Arvixe linux server > > I've changed the subject back to the appropriate one. > > If it's on a shared hosting account, you almost certainly will not be > able to access it from Access. > > The best I've ever managed in that situation is to export the data > locally at one end as plain text, compress it, upload/download it via > FTP , uncompress and then import at the other end. It's a lot of > work. > > > Still, it's worth contacting the hosting provider and checking whether > you can have remote access. > > -- > Stuart > > On 7 Oct 2015 at 22:11, doug wrote: > > > Jim, > > > > I am guessing not. The db is on a shared hosting account. > > > > -------- Original message -------- > > From: Jim Lawrence > > Date:10/07/2015 9:41 PM (GMT-08:00) > > To: Access Developers discussion and problem solving > > Subject: Re: [AccessD] Stored > > Procedure as Rowsource for Chart > > > > Hi David: > > > > Here is an overly simplified Youtube vid of connecting MS Access to > > a MySQL DB: https://www.youtube.com/watch?v=F06hvR6ksh4 > > > > Here is a link to some comprehensive lists of database to database > > connection string: http://www.connectionstrings.com and > > http://www.dofactory.com/reference/connection-strings and > > http://www.carlprothman.net/Default.aspx?tabid=90 > > > > Aside: If you use the standard method of generating an ODBC connect, > > the file created can be stripped down to a basic string by changing > > the file's extension to ".txt" and using the resultant connection > > text string directly within your Access connection module. > > > > Do you have direct root access to the MySQL DB that you will be > > using? > > > > > > HTH > > Jim > > > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From darren at activebilling.com.au Thu Oct 8 20:17:55 2015 From: darren at activebilling.com.au (Darren - Active Billing) Date: Fri, 9 Oct 2015 12:17:55 +1100 Subject: [AccessD] Stored Procedure as Rowsource for Chart In-Reply-To: <00e901d10195$328fe120$97afa360$@dalyn.co.nz> References: <006501d1015f$a6841550$f38c3ff0$@dalyn.co.nz> <1398027378.35386319.1444279262097.JavaMail.root@shaw.ca> <00e901d10195$328fe120$97afa360$@dalyn.co.nz> Message-ID: <97808E74-824B-43F3-AF82-E5B9F88648D6@activebilling.com.au> Glad it?s been resolved - FYI - I have an MS Access/SQL Demo I can send over if you like. It employs the passthrough method Stuart is advocating. Lemme know off-list Any me too?s off list - thanks Darren __________________________________________________________________________________________________________________________________ > On 8 Oct 2015, at 5:47 pm, David Emerson wrote: > > Hi Jim, > > Thanks for your response. Stuart solved the problem for me. > > Regards > > David > > -----Original Message----- > From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Jim > Lawrence > Sent: Thursday, 8 October 2015 5:41 p.m. > To: Access Developers discussion and problem solving > Subject: Re: [AccessD] Stored Procedure as Rowsource for Chart > > Hi David: > > Here is an overly simplified Youtube vid of connecting MS Access to a MySQL > DB: https://www.youtube.com/watch?v=F06hvR6ksh4 > > Here is a link to some comprehensive lists of database to database > connection string: http://www.connectionstrings.com and > http://www.dofactory.com/reference/connection-strings and > http://www.carlprothman.net/Default.aspx?tabid=90 > > Aside: If you use the standard method of generating an ODBC connect, the > file created can be stripped down to a basic string by changing the file's > extension to ".txt" and using the resultant connection text string directly > within your Access connection module. > > Do you have direct root access to the MySQL DB that you will be using? > > HTH > Jim > > ----- Original Message ----- > From: "David Emerson" > To: "Access Developers discussion and problem solving" > > Sent: Wednesday, October 7, 2015 5:24:09 PM > Subject: Re: [AccessD] Stored Procedure as Rowsource for Chart > > Thanks Stuart, I looked at the article but I don't think it quite fits my > problem. > > I already have code to get the results from a passthrough query. My problem > is how and where I can set the Chart rowsource so that the data from the > stored procedure is used. > > Here is the code (simplified) for the passthrough query: > > Public grst1 As DAO.Recordset > > Public Sub basReportPassThroughQuery(strSproc As String) ' Sample Call > (Report and 1 sub report) 'strSproc = "EXEC dbo.spsrpClientQualitySurvey " & > Nz(Me!txtID, 0) 'Call basReportPassThroughQuery(strSproc) > > Dim strTempQueryName As String, qdefTemp As DAO.QueryDef > > strTempQueryName = "qryTempQuery" > CurrentDb.QueryDefs.Delete strTempQueryName 'In case exists > Set qdefTemp = CurrentDb.CreateQueryDef(strTempQueryName) > qdefTemp.ReturnsRecords = True > qdefTemp.ODBCTimeout = 120 > qdefTemp.Connect = "ODBC;DRIVER=SQL > Server;SERVER=Servername;DATABASE=database;Trusted_Connection=Yes" > > qdefTemp.SQL = strSproc > > Set grst1 = qdefTemp.OpenRecordset > > End Sub > > Now that I have the recordset how do I get the chart to use it? > > Regards > > David > > -----Original Message----- > From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of > Stuart McLachlan > Sent: Thursday, 8 October 2015 12:51 p.m. > To: Access Developers discussion and problem solving > Subject: Re: [AccessD] Stored Procedure as Rowsource for Chart > > Use a Passthrough query as the source. > > You can generate the querydef for the PT query programmatically if you need > to pass parameters to your procedure. > > A good howto with appropriate examples is here: > > http://www.databasejournal.com/features/msaccess/article.php/3407531/How-to- > Execute-SQL-Stored-Procedures-from-Microsoft-Access.htm > > -- > Stuart > > On 8 Oct 2015 at 12:34, David Emerson wrote: > >> Hi Listers, >> >> I have a simpler report with a single chart. I want to use a stored >> procedure as the rowsource. How do I do this? I have tried putting >> the procedure name in the rowsource field but this doesn't work (which >> doesn't surprise me). >> >> Here is the procedure call: EXEC dbo.sprptReferralTypeValueMonth >> '2015-06-01' >> >> I am guessing that I need to set a ADODB.Recordset when the report is >> loaded but I am not sure what to do with the recordset once I have it. >> >> Regards >> >> David Emerson >> Dalyn Software Ltd >> Wellington, New Zealand > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com From gustav at cactus.dk Fri Oct 9 01:26:59 2015 From: gustav at cactus.dk (Gustav Brock) Date: Fri, 9 Oct 2015 06:26:59 +0000 Subject: [AccessD] Windows Taskbar question: Access apps move around Message-ID: Hi David Windows 10 and Windows Server 2012+ allows this, though not within a stacked set of icons. /gustav -----Oprindelig meddelelse----- Fra: AccessD [mailto:accessd-bounces at databaseadvisors.com] P? vegne af David McAfee Sendt: 8. oktober 2015 23:07 Til: Access Developers discussion and problem solving Emne: Re: [AccessD] Windows Taskbar question: Access apps move around Am I the only one experiencing this? I see how two people asked a similar question, but they were never answered: http://answers.microsoft.com/en-us/windows/forum/windows_vista-windows_programs/how-do-i-move-taskbar-buttons-to-a-new-location/8559c6ac-f683-4a2a-966e-f6d0c93a6140?auth=1 This is really driving me nuts! D On Wed, Sep 16, 2015 at 11:08 AM, David McAfee wrote: > Windows Server 2008 R2 Standard > > I have three similarly named Access databases open. > > Their names are long enough that the three MDBs appear to have the > same name. > > I know which one is which, or so I thought... > > > I have a FY1415 version on the left, a FY1516 in the middle and a new > style FY1516 version on the right. > > I am doing certain things in one and not the others. > > I paste/or change some date criteria in one of the MDbs and all of > the sudden it's not returning the correct results. > > I now notice that the new 1516 is on the left, 1415 is in the middle > and 1516 is on the right! > > WTF!!! > > Is there a way to prevent Windows from moving them? From Lambert.Heenan at aig.com Fri Oct 9 08:06:09 2015 From: Lambert.Heenan at aig.com (Heenan, Lambert) Date: Fri, 9 Oct 2015 13:06:09 +0000 Subject: [AccessD] Windows Taskbar question: Access apps move around In-Reply-To: References: Message-ID: I usually use groups, but I just turned that off and checked. In Windows 7 just click and drag and the app icons move where you want them. With grouping turned on you can move the whole group the same way. Same deal with Windows 10. Lambert -----Original Message----- From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of David McAfee Sent: Thursday, October 08, 2015 5:07 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Windows Taskbar question: Access apps move around Am I the only one experiencing this? I see how two people asked a similar question, but they were never answered: http://answers.microsoft.com/en-us/windows/forum/windows_vista-windows_programs/how-do-i-move-taskbar-buttons-to-a-new-location/8559c6ac-f683-4a2a-966e-f6d0c93a6140?auth=1 This is really driving me nuts! D On Wed, Sep 16, 2015 at 11:08 AM, David McAfee wrote: > Windows Server 2008 R2 Standard > > I have three similarly named Access databases open. > > Their names are long enough that the three MDBs appear to have the > same name. > > I know which one is which, or so I thought... > > > I have a FY1415 version on the left, a FY1516 in the middle and a new > style FY1516 version on the right. > > I am doing certain things in one and not the others. > > I paste/or change some date criteria in one of the MDbs and all of > the sudden it's not returning the correct results. > > I now notice that the new 1516 is on the left, 1415 is in the middle > and > 1516 is on the right! > > WTF!!! > > Is there a way to prevent Windows from moving them? > > > -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From accessd at shaw.ca Fri Oct 9 08:52:07 2015 From: accessd at shaw.ca (Jim Lawrence) Date: Fri, 9 Oct 2015 07:52:07 -0600 (MDT) Subject: [AccessD] MySQL db on Arvixe linux server In-Reply-To: <5616DEDF.23292.7C78F6B@stuart.lexacorp.com.pg> Message-ID: <1275894534.36391501.1444398727481.JavaMail.root@shaw.ca> I would suspect that the data base in question is isolated from their regular network. Forward facing servers are always susceptible to attack but there are many ways to secure a network. Here is a link to an article I was just reading when I saw this post...it may be interesting. https://www.digitalocean.com/community/tutorials/7-security-measures-to-protect-your-servers Jim ----- Original Message ----- From: "Stuart McLachlan" To: "Access Developers discussion and problem solving" Sent: Thursday, October 8, 2015 2:23:43 PM Subject: Re: [AccessD] MySQL db on Arvixe linux server It's not MySql or Linex Servers. It's a matter of basic security. Web hosting organisations need to lock down their systems very tightly because they are under constant attack using every newly identified security bug in their environment. I'm surprised that your Windows host provider has opened MyDQL server to remote connection from outside their environment, very few do so. Yes you can use ADO with the ODBC driver, but again, only if the DB engine accepts the connection. FWIW, You should do the same with any corporate SQL Server installation inside a LAN for secruity reasons - configure it to only allow connections from the same sub-net. -- Stuart On 8 Oct 2015 at 8:34, Doug Murphy wrote: > Thanks Stuart, > > Is it possible to connect using ADO and perform operations > programmatically? I am not clear on why connections are limited on > Linux servers. It seems the MySql odbc driver likes to connect on port > 3306. Is that typically blocked on Linux servers. When I have a MySql > database on a Windows shared hosting server I can connect with ADO. > The application I am looking at is simple and has only one main table. > It would be easy to keep Access on the client computer synchronized > with the server db if we can connect. > > Thanks > > Doug > > -----Original Message----- > From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf > Of Stuart McLachlan Sent: Wednesday, October 07, 2015 10:23 PM To: > Access Developers discussion and problem solving Subject: Re: > [AccessD] MySQL db on Arvixe linux server > > I've changed the subject back to the appropriate one. > > If it's on a shared hosting account, you almost certainly will not be > able to access it from Access. > > The best I've ever managed in that situation is to export the data > locally at one end as plain text, compress it, upload/download it via > FTP , uncompress and then import at the other end. It's a lot of > work. > > > Still, it's worth contacting the hosting provider and checking whether > you can have remote access. > > -- > Stuart > > On 7 Oct 2015 at 22:11, doug wrote: > > > Jim, > > > > I am guessing not. The db is on a shared hosting account.? > > > > -------- Original message -------- > > From: Jim Lawrence > > Date:10/07/2015 9:41 PM (GMT-08:00) > > To: Access Developers discussion and problem solving > > Subject: Re: [AccessD] Stored > > Procedure as Rowsource for Chart > > > > Hi David: > > > > Here is an overly simplified Youtube vid of connecting MS Access to > > a MySQL DB: https://www.youtube.com/watch?v=F06hvR6ksh4 > > > > Here is a link to some comprehensive lists of database to database > > connection string: http://www.connectionstrings.com and > > http://www.dofactory.com/reference/connection-strings and > > http://www.carlprothman.net/Default.aspx?tabid=90 > > > > Aside: If you use the standard method of generating an ODBC connect, > > the file created can be stripped down to a basic string by changing > > the file's extension to ".txt" and using the resultant connection > > text string directly within your Access connection module. > > > > Do you have direct root access to the MySQL DB that you will be > > using? > > > > > > HTH > > Jim > > > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From davidmcafee at gmail.com Fri Oct 9 11:02:55 2015 From: davidmcafee at gmail.com (David McAfee) Date: Fri, 9 Oct 2015 09:02:55 -0700 Subject: [AccessD] Windows Taskbar question: Access apps move around In-Reply-To: References: Message-ID: The thing that is getting me is that Windows is moving them on me. I have a bunch of windows open, so the task bar is pretty full. I'm working with similarly named files, so I can only see the first part of the name. I do know which window each on is, until Windows moves them on me. I think it is like a most used moves to the left, or something like that. for the Access files, I have temporarily changed the Application Title in the Startup screen, but it doesn't help with the Excel files or VBA windows. GRRRR D On Fri, Oct 9, 2015 at 6:06 AM, Heenan, Lambert wrote: > I usually use groups, but I just turned that off and checked. In Windows 7 > just click and drag and the app icons move where you want them. With > grouping turned on you can move the whole group the same way. > > Same deal with Windows 10. > > Lambert > > -----Original Message----- > From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of > David McAfee > Sent: Thursday, October 08, 2015 5:07 PM > To: Access Developers discussion and problem solving > Subject: Re: [AccessD] Windows Taskbar question: Access apps move around > > Am I the only one experiencing this? > > I see how two people asked a similar question, but they were never > answered: > > http://answers.microsoft.com/en-us/windows/forum/windows_vista-windows_programs/how-do-i-move-taskbar-buttons-to-a-new-location/8559c6ac-f683-4a2a-966e-f6d0c93a6140?auth=1 > > This is really driving me nuts! > > D > > > On Wed, Sep 16, 2015 at 11:08 AM, David McAfee > wrote: > > > Windows Server 2008 R2 Standard > > > > I have three similarly named Access databases open. > > > > Their names are long enough that the three MDBs appear to have the > > same name. > > > > I know which one is which, or so I thought... > > > > > > I have a FY1415 version on the left, a FY1516 in the middle and a new > > style FY1516 version on the right. > > > > I am doing certain things in one and not the others. > > > > I paste/or change some date criteria in one of the MDbs and all of > > the sudden it's not returning the correct results. > > > > I now notice that the new 1516 is on the left, 1415 is in the middle > > and > > 1516 is on the right! > > > > WTF!!! > > > > Is there a way to prevent Windows from moving them? > > > > > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > From rockysmolin at bchacc.com Fri Oct 9 14:02:52 2015 From: rockysmolin at bchacc.com (Rocky Smolin) Date: Fri, 9 Oct 2015 12:02:52 -0700 Subject: [AccessD] 64 bit app Message-ID: Dear List: I develop in A2003 still - 32 bit. A user needs the app (mde) to run in the 64 bit version of Office. What's the quickest/easiest way to give him what he wants? MTIA Rocky Smolin Beach Access Software 858-259-4334 www.bchacc.com www.e-z-mrp.com Skype: rocky.smolin From jamesbutton at blueyonder.co.uk Fri Oct 9 14:50:11 2015 From: jamesbutton at blueyonder.co.uk (James Button) Date: Fri, 9 Oct 2015 20:50:11 +0100 Subject: [AccessD] 64 bit app In-Reply-To: References: Message-ID: AFAIK, and I'd expect there'll be lots of contradictions/corrections if I'm wrong. The 64 bit version of Office uses different library files So - the quickest way - get him to compile any code needed on his system and report to you any libraries missing Those should only be any that you have specifically detailed in your code. If you have not specified any libraries then compiling (or just telling Excel etc.) to run the macros should sort out the 64 vs 32 bit version. HOWEVER - If you have used forms then you may need to have them recreated under that 64 bit version - again design mode and just 'touching' the forms within the code should get them regenerated. Major point would be to ask them why they are using the 64 bit version of Office, when even Microsoft says you should stick with the 32 bit version unless you need the larger file handling (and code processed tables etc.) capabilities of the 64 bit version HOWEVER - remember that 2003 is defunct, not getting fixes and considered unsafe - so you should have moved to a supported version - 2010 or later - YES a be-ribboned version! JimB -----Original Message----- From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Rocky Smolin Sent: Friday, October 9, 2015 8:03 PM To: 'Access Developers discussion and problem solving' Subject: [AccessD] 64 bit app Dear List: I develop in A2003 still - 32 bit. A user needs the app (mde) to run in the 64 bit version of Office. What's the quickest/easiest way to give him what he wants? MTIA Rocky Smolin Beach Access Software 858-259-4334 www.bchacc.com www.e-z-mrp.com Skype: rocky.smolin -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From Lambert.Heenan at aig.com Fri Oct 9 14:55:02 2015 From: Lambert.Heenan at aig.com (Heenan, Lambert) Date: Fri, 9 Oct 2015 19:55:02 +0000 Subject: [AccessD] Windows Taskbar question: Access apps move around In-Reply-To: References: Message-ID: Ah well. That is another advantage of grouping. In Windows 7 if you click on a grouped icon set then you will see a list of all the windows in the group, with a large amount of text shown. Windows 10 gives you a row of thumbnails of the open windows - possible not as useful as the text of the title bars. Lambert -----Original Message----- From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of David McAfee Sent: Friday, October 09, 2015 12:03 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Windows Taskbar question: Access apps move around The thing that is getting me is that Windows is moving them on me. I have a bunch of windows open, so the task bar is pretty full. I'm working with similarly named files, so I can only see the first part of the name. I do know which window each on is, until Windows moves them on me. I think it is like a most used moves to the left, or something like that. for the Access files, I have temporarily changed the Application Title in the Startup screen, but it doesn't help with the Excel files or VBA windows. GRRRR D On Fri, Oct 9, 2015 at 6:06 AM, Heenan, Lambert wrote: > I usually use groups, but I just turned that off and checked. In > Windows 7 just click and drag and the app icons move where you want > them. With grouping turned on you can move the whole group the same way. > > Same deal with Windows 10. > > Lambert > > -----Original Message----- > From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf > Of David McAfee > Sent: Thursday, October 08, 2015 5:07 PM > To: Access Developers discussion and problem solving > Subject: Re: [AccessD] Windows Taskbar question: Access apps move > around > > Am I the only one experiencing this? > > I see how two people asked a similar question, but they were never > answered: > > http://answers.microsoft.com/en-us/windows/forum/windows_vista-windows > _programs/how-do-i-move-taskbar-buttons-to-a-new-location/8559c6ac-f68 > 3-4a2a-966e-f6d0c93a6140?auth=1 > > This is really driving me nuts! > > D > > > On Wed, Sep 16, 2015 at 11:08 AM, David McAfee > wrote: > > > Windows Server 2008 R2 Standard > > > > I have three similarly named Access databases open. > > > > Their names are long enough that the three MDBs appear to have the > > same name. > > > > I know which one is which, or so I thought... > > > > > > I have a FY1415 version on the left, a FY1516 in the middle and a > > new style FY1516 version on the right. > > > > I am doing certain things in one and not the others. > > > > I paste/or change some date criteria in one of the MDbs and all of > > the sudden it's not returning the correct results. > > > > I now notice that the new 1516 is on the left, 1415 is in the middle > > and > > 1516 is on the right! > > > > WTF!!! > > > > Is there a way to prevent Windows from moving them? > > > > > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From DMcGillivray at ctc.ca.gov Fri Oct 9 15:14:30 2015 From: DMcGillivray at ctc.ca.gov (McGillivray, Don) Date: Fri, 9 Oct 2015 20:14:30 +0000 Subject: [AccessD] 64 bit app In-Reply-To: References: Message-ID: Hi Rocky, I have no doubt that others on the list are more knowledgeable than I am, but I just encountered the same need for the first time this week. Here's what I learned/did: 1. Because Access 32-bit cannot live on the same machine as Access 64-bit, you need a separate workstation (or virtual machine) running the 64-bit version of Access. 2. Essentially, you can use the same code base (mdb/accdb) but it has to be compiled (converted to mde/accde) using the 64-bit version. (Does A2003 have a 64-bit version?) 3. If your code includes API calls, you will need to make the "Declare" parts conditionally compilable according to the "bitness" of the environment. Here's a snip from my app as an example: This tests for "bitness" and compiles accordingly. #If Win64 Then Private Declare PtrSafe Function CreateProcessA Lib "kernel32" ( _ ByVal lpApplicationName As LongLong, _ ByVal lpCommandLine As String, _ ByVal lpProcessAttributes As LongLong, _ ByVal lpThreadAttributes As LongLong, _ ByVal bInheritHandles As LongLong, _ ByVal dwCreationFlags As LongLong, _ ByVal lpEnvironment As LongLong, _ ByVal lpCurrentDirectory As LongLong, _ lpStartupInfo As typStartupInfo, _ lpProcessInformation As typProcInfo) As LongLong #Else Private Declare Function CreateProcessA Lib "kernel32" ( _ ByVal lpApplicationName As Long, _ ByVal lpCommandLine As String, _ ByVal lpProcessAttributes As Long, _ ByVal lpThreadAttributes As Long, _ ByVal bInheritHandles As Long, _ ByVal dwCreationFlags As Long, _ ByVal lpEnvironment As Long, _ ByVal lpCurrentDirectory As Long, _ lpStartupInfo As typStartupInfo, _ lpProcessInformation As typProcInfo) As Long #End If You may also have to make some of the other variable declarations in your API code conditional, too. I confess that the API code in my app is totally cribbed, and my understanding of it and the implications of dual compiling are quite limited. There may be other cases where conditional compiling is necessary, but I didn't run into any other problems on that score, so can't speak to that. Google and experts here will be your friends for this. 4. In my situation compiling on the 64-bit system breaks some references that I have to go back and repair before continuing to develop in the 32-bit environment. This may be a bit of a wild card, depending on what you have specified as external references. In my situation, the app is installed in-house only, so the range of possible configurations is limited, and my 64-bit machine is set up exactly like all of our 64-bit users' machines. Others on the list may have better and more specific advice for dealing with this. This is rather brief, but I hope it gets the ball rolling for you. With luck somebody else will chime in with more and better ideas. Don -----Original Message----- From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Rocky Smolin Sent: Friday, October 09, 2015 12:03 PM To: 'Access Developers discussion and problem solving' Subject: [AccessD] 64 bit app Dear List: I develop in A2003 still - 32 bit. A user needs the app (mde) to run in the 64 bit version of Office. What's the quickest/easiest way to give him what he wants? MTIA Rocky Smolin Beach Access Software 858-259-4334 www.bchacc.com www.e-z-mrp.com Skype: rocky.smolin -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From jamesbutton at blueyonder.co.uk Fri Oct 9 15:16:54 2015 From: jamesbutton at blueyonder.co.uk (James Button) Date: Fri, 9 Oct 2015 21:16:54 +0100 Subject: [AccessD] Windows Taskbar question: Access apps move around In-Reply-To: References: Message-ID: OP did not mention being the adventurous sort - Re Win 10 Possibly not as useful! Possibly? JimB Required to be adventurous as (?!?"$%^) clients supported! -----Original Message----- From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Heenan, Lambert Sent: Friday, October 9, 2015 8:55 PM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Windows Taskbar question: Access apps move around Ah well. That is another advantage of grouping. In Windows 7 if you click on a grouped icon set then you will see a list of all the windows in the group, with a large amount of text shown. Windows 10 gives you a row of thumbnails of the open windows - possible not as useful as the text of the title bars. Lambert -----Original Message----- From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of David McAfee Sent: Friday, October 09, 2015 12:03 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Windows Taskbar question: Access apps move around The thing that is getting me is that Windows is moving them on me. I have a bunch of windows open, so the task bar is pretty full. I'm working with similarly named files, so I can only see the first part of the name. I do know which window each on is, until Windows moves them on me. I think it is like a most used moves to the left, or something like that. for the Access files, I have temporarily changed the Application Title in the Startup screen, but it doesn't help with the Excel files or VBA windows. GRRRR D On Fri, Oct 9, 2015 at 6:06 AM, Heenan, Lambert wrote: > I usually use groups, but I just turned that off and checked. In > Windows 7 just click and drag and the app icons move where you want > them. With grouping turned on you can move the whole group the same way. > > Same deal with Windows 10. > > Lambert > > -----Original Message----- > From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf > Of David McAfee > Sent: Thursday, October 08, 2015 5:07 PM > To: Access Developers discussion and problem solving > Subject: Re: [AccessD] Windows Taskbar question: Access apps move > around > > Am I the only one experiencing this? > > I see how two people asked a similar question, but they were never > answered: > > http://answers.microsoft.com/en-us/windows/forum/windows_vista-windows > _programs/how-do-i-move-taskbar-buttons-to-a-new-location/8559c6ac-f68 > 3-4a2a-966e-f6d0c93a6140?auth=1 > > This is really driving me nuts! > > D > > > On Wed, Sep 16, 2015 at 11:08 AM, David McAfee > wrote: > > > Windows Server 2008 R2 Standard > > > > I have three similarly named Access databases open. > > > > Their names are long enough that the three MDBs appear to have the > > same name. > > > > I know which one is which, or so I thought... > > > > > > I have a FY1415 version on the left, a FY1516 in the middle and a > > new style FY1516 version on the right. > > > > I am doing certain things in one and not the others. > > > > I paste/or change some date criteria in one of the MDbs and all of > > the sudden it's not returning the correct results. > > > > I now notice that the new 1516 is on the left, 1415 is in the middle > > and > > 1516 is on the right! > > > > WTF!!! > > > > Is there a way to prevent Windows from moving them? > > > > > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From DMcGillivray at ctc.ca.gov Fri Oct 9 15:19:29 2015 From: DMcGillivray at ctc.ca.gov (McGillivray, Don) Date: Fri, 9 Oct 2015 20:19:29 +0000 Subject: [AccessD] 64 bit app In-Reply-To: References: Message-ID: The code snip wrapped strangely. Trying again: #If Win64 Then Private Declare PtrSafe Function CreateProcessA Lib "kernel32" ( _ ByVal lpApplicationName As LongLong, _ ByVal lpCommandLine As String, _ ByVal lpProcessAttributes As LongLong, _ ByVal lpThreadAttributes As LongLong, _ ByVal bInheritHandles As LongLong, _ ByVal dwCreationFlags As LongLong, _ ByVal lpEnvironment As LongLong, _ ByVal lpCurrentDirectory As LongLong, _ lpStartupInfo As typStartupInfo, _ lpProcessInformation As typProcInfo) As LongLong #Else Private Declare Function CreateProcessA Lib "kernel32" ( _ ByVal lpApplicationName As Long, _ ByVal lpCommandLine As String, _ ByVal lpProcessAttributes As Long, _ ByVal lpThreadAttributes As Long, _ ByVal bInheritHandles As Long, _ ByVal dwCreationFlags As Long, _ ByVal lpEnvironment As Long, _ ByVal lpCurrentDirectory As Long, _ lpStartupInfo As typStartupInfo, _ lpProcessInformation As typProcInfo) As Long #End If -----Original Message----- From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of McGillivray, Don Sent: Friday, October 09, 2015 1:15 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] 64 bit app Hi Rocky, I have no doubt that others on the list are more knowledgeable than I am, but I just encountered the same need for the first time this week. Here's what I learned/did: 1. Because Access 32-bit cannot live on the same machine as Access 64-bit, you need a separate workstation (or virtual machine) running the 64-bit version of Access. 2. Essentially, you can use the same code base (mdb/accdb) but it has to be compiled (converted to mde/accde) using the 64-bit version. (Does A2003 have a 64-bit version?) 3. If your code includes API calls, you will need to make the "Declare" parts conditionally compilable according to the "bitness" of the environment. Here's a snip from my app as an example: This tests for "bitness" and compiles accordingly. #If Win64 Then Private Declare PtrSafe Function CreateProcessA Lib "kernel32" ( _ ByVal lpApplicationName As LongLong, _ ByVal lpCommandLine As String, _ ByVal lpProcessAttributes As LongLong, _ ByVal lpThreadAttributes As LongLong, _ ByVal bInheritHandles As LongLong, _ ByVal dwCreationFlags As LongLong, _ ByVal lpEnvironment As LongLong, _ ByVal lpCurrentDirectory As LongLong, _ lpStartupInfo As typStartupInfo, _ lpProcessInformation As typProcInfo) As LongLong #Else Private Declare Function CreateProcessA Lib "kernel32" ( _ ByVal lpApplicationName As Long, _ ByVal lpCommandLine As String, _ ByVal lpProcessAttributes As Long, _ ByVal lpThreadAttributes As Long, _ ByVal bInheritHandles As Long, _ ByVal dwCreationFlags As Long, _ ByVal lpEnvironment As Long, _ ByVal lpCurrentDirectory As Long, _ lpStartupInfo As typStartupInfo, _ lpProcessInformation As typProcInfo) As Long #End If You may also have to make some of the other variable declarations in your API code conditional, too. I confess that the API code in my app is totally cribbed, and my understanding of it and the implications of dual compiling are quite limited. There may be other cases where conditional compiling is necessary, but I didn't run into any other problems on that score, so can't speak to that. Google and experts here will be your friends for this. 4. In my situation compiling on the 64-bit system breaks some references that I have to go back and repair before continuing to develop in the 32-bit environment. This may be a bit of a wild card, depending on what you have specified as external references. In my situation, the app is installed in-house only, so the range of possible configurations is limited, and my 64-bit machine is set up exactly like all of our 64-bit users' machines. Others on the list may have better and more specific advice for dealing with this. This is rather brief, but I hope it gets the ball rolling for you. With luck somebody else will chime in with more and better ideas. Don -----Original Message----- From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Rocky Smolin Sent: Friday, October 09, 2015 12:03 PM To: 'Access Developers discussion and problem solving' Subject: [AccessD] 64 bit app Dear List: I develop in A2003 still - 32 bit. A user needs the app (mde) to run in the 64 bit version of Office. What's the quickest/easiest way to give him what he wants? MTIA Rocky Smolin Beach Access Software 858-259-4334 www.bchacc.com www.e-z-mrp.com Skype: rocky.smolin -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From davidmcafee at gmail.com Fri Oct 9 15:22:18 2015 From: davidmcafee at gmail.com (David McAfee) Date: Fri, 9 Oct 2015 13:22:18 -0700 Subject: [AccessD] Windows Taskbar question: Access apps move around In-Reply-To: References: Message-ID: I'm ready to throw this computer out the window! I don't ever remember having this problem on any other computer. On Fri, Oct 9, 2015 at 1:16 PM, James Button wrote: > OP did not mention being the adventurous sort - > Re Win 10 Possibly not as useful! > Possibly? > > JimB > Required to be adventurous as (?!?"$%^) clients supported! > > > -----Original Message----- > From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of > Heenan, > Lambert > Sent: Friday, October 9, 2015 8:55 PM > To: 'Access Developers discussion and problem solving' > Subject: Re: [AccessD] Windows Taskbar question: Access apps move around > > Ah well. That is another advantage of grouping. In Windows 7 if you click > on a > grouped icon set then you will see a list of all the windows in the group, > with > a large amount of text shown. Windows 10 gives you a row of thumbnails of > the > open windows - possible not as useful as the text of the title bars. > > Lambert > > > -----Original Message----- > From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of > David > McAfee > Sent: Friday, October 09, 2015 12:03 PM > To: Access Developers discussion and problem solving > Subject: Re: [AccessD] Windows Taskbar question: Access apps move around > > The thing that is getting me is that Windows is moving them on me. > I have a bunch of windows open, so the task bar is pretty full. > > I'm working with similarly named files, so I can only see the first part > of the > name. > > I do know which window each on is, until Windows moves them on me. > > I think it is like a most used moves to the left, or something like that. > for the Access files, I have temporarily changed the Application Title in > the > Startup screen, but it doesn't help with the Excel files or VBA windows. > > GRRRR > > D > > > On Fri, Oct 9, 2015 at 6:06 AM, Heenan, Lambert > wrote: > > > I usually use groups, but I just turned that off and checked. In > > Windows 7 just click and drag and the app icons move where you want > > them. With grouping turned on you can move the whole group the same way. > > > > Same deal with Windows 10. > > > > Lambert > > > > -----Original Message----- > > From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf > > Of David McAfee > > Sent: Thursday, October 08, 2015 5:07 PM > > To: Access Developers discussion and problem solving > > Subject: Re: [AccessD] Windows Taskbar question: Access apps move > > around > > > > Am I the only one experiencing this? > > > > I see how two people asked a similar question, but they were never > > answered: > > > > http://answers.microsoft.com/en-us/windows/forum/windows_vista-windows > > _programs/how-do-i-move-taskbar-buttons-to-a-new-location/8559c6ac-f68 > > 3-4a2a-966e-f6d0c93a6140?auth=1 > > > > This is really driving me nuts! > > > > D > > > > > > On Wed, Sep 16, 2015 at 11:08 AM, David McAfee > > wrote: > > > > > Windows Server 2008 R2 Standard > > > > > > I have three similarly named Access databases open. > > > > > > Their names are long enough that the three MDBs appear to have the > > > same name. > > > > > > I know which one is which, or so I thought... > > > > > > > > > I have a FY1415 version on the left, a FY1516 in the middle and a > > > new style FY1516 version on the right. > > > > > > I am doing certain things in one and not the others. > > > > > > I paste/or change some date criteria in one of the MDbs and all of > > > the sudden it's not returning the correct results. > > > > > > I now notice that the new 1516 is on the left, 1415 is in the middle > > > and > > > 1516 is on the right! > > > > > > WTF!!! > > > > > > Is there a way to prevent Windows from moving them? > > > > > > > > > > > -- > > AccessD mailing list > > AccessD at databaseadvisors.com > > http://databaseadvisors.com/mailman/listinfo/accessd > > Website: http://www.databaseadvisors.com > > > > -- > > AccessD mailing list > > AccessD at databaseadvisors.com > > http://databaseadvisors.com/mailman/listinfo/accessd > > Website: http://www.databaseadvisors.com > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > From DMcGillivray at ctc.ca.gov Fri Oct 9 15:24:02 2015 From: DMcGillivray at ctc.ca.gov (McGillivray, Don) Date: Fri, 9 Oct 2015 20:24:02 +0000 Subject: [AccessD] 64 bit app In-Reply-To: References: Message-ID: Oh well. Just note the "#Else" and "#End If" that don't appear at the leftmost indent level where I intended them to be. -----Original Message----- From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of McGillivray, Don Sent: Friday, October 09, 2015 1:19 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] 64 bit app The code snip wrapped strangely. Trying again: #If Win64 Then Private Declare PtrSafe Function CreateProcessA Lib "kernel32" ( _ ByVal lpApplicationName As LongLong, _ ByVal lpCommandLine As String, _ ByVal lpProcessAttributes As LongLong, _ ByVal lpThreadAttributes As LongLong, _ ByVal bInheritHandles As LongLong, _ ByVal dwCreationFlags As LongLong, _ ByVal lpEnvironment As LongLong, _ ByVal lpCurrentDirectory As LongLong, _ lpStartupInfo As typStartupInfo, _ lpProcessInformation As typProcInfo) As LongLong #Else Private Declare Function CreateProcessA Lib "kernel32" ( _ ByVal lpApplicationName As Long, _ ByVal lpCommandLine As String, _ ByVal lpProcessAttributes As Long, _ ByVal lpThreadAttributes As Long, _ ByVal bInheritHandles As Long, _ ByVal dwCreationFlags As Long, _ ByVal lpEnvironment As Long, _ ByVal lpCurrentDirectory As Long, _ lpStartupInfo As typStartupInfo, _ lpProcessInformation As typProcInfo) As Long #End If From rockysmolin at bchacc.com Fri Oct 9 15:30:21 2015 From: rockysmolin at bchacc.com (Rocky Smolin) Date: Fri, 9 Oct 2015 13:30:21 -0700 Subject: [AccessD] 64 bit app In-Reply-To: References: Message-ID: Thanks Don. Looks like a go. I have the 64-bit Version of Office 2010 and can set up a VM to install it. Best, Rocky -----Original Message----- From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of McGillivray, Don Sent: Friday, October 09, 2015 1:15 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] 64 bit app Hi Rocky, I have no doubt that others on the list are more knowledgeable than I am, but I just encountered the same need for the first time this week. Here's what I learned/did: 1. Because Access 32-bit cannot live on the same machine as Access 64-bit, you need a separate workstation (or virtual machine) running the 64-bit version of Access. 2. Essentially, you can use the same code base (mdb/accdb) but it has to be compiled (converted to mde/accde) using the 64-bit version. (Does A2003 have a 64-bit version?) 3. If your code includes API calls, you will need to make the "Declare" parts conditionally compilable according to the "bitness" of the environment. Here's a snip from my app as an example: This tests for "bitness" and compiles accordingly. #If Win64 Then Private Declare PtrSafe Function CreateProcessA Lib "kernel32" ( _ ByVal lpApplicationName As LongLong, _ ByVal lpCommandLine As String, _ ByVal lpProcessAttributes As LongLong, _ ByVal lpThreadAttributes As LongLong, _ ByVal bInheritHandles As LongLong, _ ByVal dwCreationFlags As LongLong, _ ByVal lpEnvironment As LongLong, _ ByVal lpCurrentDirectory As LongLong, _ lpStartupInfo As typStartupInfo, _ lpProcessInformation As typProcInfo) As LongLong #Else Private Declare Function CreateProcessA Lib "kernel32" ( _ ByVal lpApplicationName As Long, _ ByVal lpCommandLine As String, _ ByVal lpProcessAttributes As Long, _ ByVal lpThreadAttributes As Long, _ ByVal bInheritHandles As Long, _ ByVal dwCreationFlags As Long, _ ByVal lpEnvironment As Long, _ ByVal lpCurrentDirectory As Long, _ lpStartupInfo As typStartupInfo, _ lpProcessInformation As typProcInfo) As Long #End If You may also have to make some of the other variable declarations in your API code conditional, too. I confess that the API code in my app is totally cribbed, and my understanding of it and the implications of dual compiling are quite limited. There may be other cases where conditional compiling is necessary, but I didn't run into any other problems on that score, so can't speak to that. Google and experts here will be your friends for this. 4. In my situation compiling on the 64-bit system breaks some references that I have to go back and repair before continuing to develop in the 32-bit environment. This may be a bit of a wild card, depending on what you have specified as external references. In my situation, the app is installed in-house only, so the range of possible configurations is limited, and my 64-bit machine is set up exactly like all of our 64-bit users' machines. Others on the list may have better and more specific advice for dealing with this. This is rather brief, but I hope it gets the ball rolling for you. With luck somebody else will chime in with more and better ideas. Don -----Original Message----- From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Rocky Smolin Sent: Friday, October 09, 2015 12:03 PM To: 'Access Developers discussion and problem solving' Subject: [AccessD] 64 bit app Dear List: I develop in A2003 still - 32 bit. A user needs the app (mde) to run in the 64 bit version of Office. What's the quickest/easiest way to give him what he wants? MTIA Rocky Smolin Beach Access Software 858-259-4334 www.bchacc.com www.e-z-mrp.com Skype: rocky.smolin -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com --- This email has been checked for viruses by Avast antivirus software. https://www.avast.com/antivirus From charlotte.foust at gmail.com Fri Oct 9 15:43:24 2015 From: charlotte.foust at gmail.com (Charlotte Foust) Date: Fri, 9 Oct 2015 13:43:24 -0700 Subject: [AccessD] MZ-Tools 8.0 Message-ID: Am I the last one to know that MZ-Tools is now out in a version that supports Visual Studio *AND* VBA? I'm blown away by this because I have used earlier versions in the several environments and they had quite different capabilities. Now the VBA version has bells and whistles I've never even seen before! WooHoo! There are separate implementations for earlier versions of Office and for VB 5 and 6 as well. I haven't had this much fun since I turned 70. Charlotte Foust (916) 206-4336 From robert at servicexp.com Sat Oct 10 08:01:00 2015 From: robert at servicexp.com (Robert) Date: Sat, 10 Oct 2015 09:01:00 -0400 Subject: [AccessD] MZ-Tools 8.0 In-Reply-To: References: Message-ID: <004101d1035b$b7846730$268d3590$@com> Thanks for the 'heads up'; didn't know about the release either.. WBR Robert -----Original Message----- From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Charlotte Foust Sent: Friday, October 09, 2015 4:43 PM To: Access Developers discussion and problem solving Subject: [AccessD] MZ-Tools 8.0 Am I the last one to know that MZ-Tools is now out in a version that supports Visual Studio *AND* VBA? I'm blown away by this because I have used earlier versions in the several environments and they had quite different capabilities. Now the VBA version has bells and whistles I've never even seen before! WooHoo! There are separate implementations for earlier versions of Office and for VB 5 and 6 as well. I haven't had this much fun since I turned 70. Charlotte Foust (916) 206-4336 -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From bensonforums at gmail.com Sat Oct 10 08:14:59 2015 From: bensonforums at gmail.com (Bill Benson) Date: Sat, 10 Oct 2015 09:14:59 -0400 Subject: [AccessD] MZ-Tools 8.0 In-Reply-To: <004101d1035b$b7846730$268d3590$@com> References: <004101d1035b$b7846730$268d3590$@com> Message-ID: Don't they do any marketing? Anyone ever seen anything but word of mouth? On Oct 10, 2015 9:02 AM, "Robert" wrote: > Thanks for the 'heads up'; didn't know about the release either.. > > WBR > Robert > > > -----Original Message----- > From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of > Charlotte Foust > Sent: Friday, October 09, 2015 4:43 PM > To: Access Developers discussion and problem solving > Subject: [AccessD] MZ-Tools 8.0 > > Am I the last one to know that MZ-Tools is now out in a version that > supports Visual Studio *AND* VBA? I'm blown away by this because I have > used earlier versions in the several environments and they had quite > different capabilities. Now the VBA version has bells and whistles I've > never even seen before! WooHoo! There are separate implementations for > earlier versions of Office and for VB 5 and 6 as well. I haven't had this > much fun since I turned 70. > > > Charlotte Foust > (916) 206-4336 > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > From jimdettman at verizon.net Mon Oct 12 09:29:51 2015 From: jimdettman at verizon.net (Jim Dettman) Date: Mon, 12 Oct 2015 10:29:51 -0400 Subject: [AccessD] 64 bit app In-Reply-To: References: Message-ID: <91AD7F6AF9E8456BA8E93B5863C90158@XPS> Rocky, In addition to what's been said, look at the second comment in the thread here: http://rdsrc.us/yrb0iS Which gives you some links for an code inspector and docs on all the calls for 64 bit that you might need to modify. Also keep in mind one other thing; *everything* out of your app needs to be 64 bit. That means any references, 3rd party controls, DLL's, ODBC Drivers that would be used all need to be 64 bit. Most are still avoiding 64 bit because a lot of software is still not available in 64 bit editions. That's changing a bit finally, but there's still a lot out there not available for 64 bit. I'd tell your client to be very careful moving into 64 bit. Make sure they look at everything they use and verify that it is available for 64 bit. Some after doing so find it worth the effort to move back to 32 bit. Jim. -----Original Message----- From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Rocky Smolin Sent: Friday, October 09, 2015 03:03 PM To: 'Access Developers discussion and problem solving' Subject: [AccessD] 64 bit app Dear List: I develop in A2003 still - 32 bit. A user needs the app (mde) to run in the 64 bit version of Office. What's the quickest/easiest way to give him what he wants? MTIA Rocky Smolin Beach Access Software 858-259-4334 www.bchacc.com www.e-z-mrp.com Skype: rocky.smolin -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From jimdettman at verizon.net Mon Oct 12 09:31:16 2015 From: jimdettman at verizon.net (Jim Dettman) Date: Mon, 12 Oct 2015 10:31:16 -0400 Subject: [AccessD] MZ-Tools 8.0 In-Reply-To: <004101d1035b$b7846730$268d3590$@com> References: <004101d1035b$b7846730$268d3590$@com> Message-ID: <427A4F5D1404443681AEEC939036FB4F@XPS> It was only just released and one important note; it's no longer free. Well worth the money (and long overdue IMHO), but it does cost now. Jim. -----Original Message----- From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Robert Sent: Saturday, October 10, 2015 09:01 AM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] MZ-Tools 8.0 Thanks for the 'heads up'; didn't know about the release either.. WBR Robert -----Original Message----- From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Charlotte Foust Sent: Friday, October 09, 2015 4:43 PM To: Access Developers discussion and problem solving Subject: [AccessD] MZ-Tools 8.0 Am I the last one to know that MZ-Tools is now out in a version that supports Visual Studio *AND* VBA? I'm blown away by this because I have used earlier versions in the several environments and they had quite different capabilities. Now the VBA version has bells and whistles I've never even seen before! WooHoo! There are separate implementations for earlier versions of Office and for VB 5 and 6 as well. I haven't had this much fun since I turned 70. Charlotte Foust (916) 206-4336 -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From rockysmolin at bchacc.com Mon Oct 12 10:05:45 2015 From: rockysmolin at bchacc.com (Rocky Smolin) Date: Mon, 12 Oct 2015 08:05:45 -0700 Subject: [AccessD] 64 bit app In-Reply-To: <91AD7F6AF9E8456BA8E93B5863C90158@XPS> References: <91AD7F6AF9E8456BA8E93B5863C90158@XPS> Message-ID: <4ECB774146EA47128399852B3225AFE3@HAL9007> Thanks Jim. The guy who wants to know is the guy who acquired my manufacturing system a couple of years ago. I'm going to forward your response to him as I will not have to actually implement a 64-bit version of the program. R -----Original Message----- From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Jim Dettman Sent: Monday, October 12, 2015 7:30 AM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] 64 bit app Rocky, In addition to what's been said, look at the second comment in the thread here: http://rdsrc.us/yrb0iS Which gives you some links for an code inspector and docs on all the calls for 64 bit that you might need to modify. Also keep in mind one other thing; *everything* out of your app needs to be 64 bit. That means any references, 3rd party controls, DLL's, ODBC Drivers that would be used all need to be 64 bit. Most are still avoiding 64 bit because a lot of software is still not available in 64 bit editions. That's changing a bit finally, but there's still a lot out there not available for 64 bit. I'd tell your client to be very careful moving into 64 bit. Make sure they look at everything they use and verify that it is available for 64 bit. Some after doing so find it worth the effort to move back to 32 bit. Jim. -----Original Message----- From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Rocky Smolin Sent: Friday, October 09, 2015 03:03 PM To: 'Access Developers discussion and problem solving' Subject: [AccessD] 64 bit app Dear List: I develop in A2003 still - 32 bit. A user needs the app (mde) to run in the 64 bit version of Office. What's the quickest/easiest way to give him what he wants? MTIA Rocky Smolin Beach Access Software 858-259-4334 www.bchacc.com www.e-z-mrp.com Skype: rocky.smolin -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com --- This email has been checked for viruses by Avast antivirus software. https://www.avast.com/antivirus From jimdettman at verizon.net Mon Oct 12 10:32:15 2015 From: jimdettman at verizon.net (Jim Dettman) Date: Mon, 12 Oct 2015 11:32:15 -0400 Subject: [AccessD] 64 bit app In-Reply-To: <4ECB774146EA47128399852B3225AFE3@HAL9007> References: <91AD7F6AF9E8456BA8E93B5863C90158@XPS> <4ECB774146EA47128399852B3225AFE3@HAL9007> Message-ID: <78795EC59A354EA5921FDD04DC76B3CB@XPS> You might want to give them this link as well: https://support.office.com/en-us/article/Choose-the-32-bit-or-64-bit-version -of-Office-2dee7807-8f95-4d0c-b5fe-6c6f49b8d261 and when they say very large, they mean "very large", like over 2GB. I would hazard a guess that for 90% of us out there, we don't even come close. Outside of working with large files, the feature set is identical and of course, you don't need the 64 bit version just because you have a 64 bit OS (this is one I run over and over again - people just assume they need the 64 bit version or there's some advantage because they have a 64 bit OS). Jim. -----Original Message----- From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Rocky Smolin Sent: Monday, October 12, 2015 11:06 AM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] 64 bit app Thanks Jim. The guy who wants to know is the guy who acquired my manufacturing system a couple of years ago. I'm going to forward your response to him as I will not have to actually implement a 64-bit version of the program. R -----Original Message----- From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Jim Dettman Sent: Monday, October 12, 2015 7:30 AM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] 64 bit app Rocky, In addition to what's been said, look at the second comment in the thread here: http://rdsrc.us/yrb0iS Which gives you some links for an code inspector and docs on all the calls for 64 bit that you might need to modify. Also keep in mind one other thing; *everything* out of your app needs to be 64 bit. That means any references, 3rd party controls, DLL's, ODBC Drivers that would be used all need to be 64 bit. Most are still avoiding 64 bit because a lot of software is still not available in 64 bit editions. That's changing a bit finally, but there's still a lot out there not available for 64 bit. I'd tell your client to be very careful moving into 64 bit. Make sure they look at everything they use and verify that it is available for 64 bit. Some after doing so find it worth the effort to move back to 32 bit. Jim. -----Original Message----- From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Rocky Smolin Sent: Friday, October 09, 2015 03:03 PM To: 'Access Developers discussion and problem solving' Subject: [AccessD] 64 bit app Dear List: I develop in A2003 still - 32 bit. A user needs the app (mde) to run in the 64 bit version of Office. What's the quickest/easiest way to give him what he wants? MTIA Rocky Smolin Beach Access Software 858-259-4334 www.bchacc.com www.e-z-mrp.com Skype: rocky.smolin -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com --- This email has been checked for viruses by Avast antivirus software. https://www.avast.com/antivirus -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From ssharkins at gmail.com Mon Oct 12 10:59:40 2015 From: ssharkins at gmail.com (Susan Harkins) Date: Mon, 12 Oct 2015 11:59:40 -0400 Subject: [AccessD] From a reader Message-ID: Any recommendations: "Hey Susan, The built in Access 'switchboard' hasn't changed since Access 2.0 -- I remember that version :-) Are there add-ins available that you might recommend (UI Builder is one) that can update the look and feel to something more modern-looking and more functional?" Susan H. From charlotte.foust at gmail.com Mon Oct 12 15:19:14 2015 From: charlotte.foust at gmail.com (Charlotte Foust) Date: Mon, 12 Oct 2015 13:19:14 -0700 Subject: [AccessD] From a reader In-Reply-To: References: Message-ID: Forget switchboards! Navigation forms are the way to go, and you don't need an add-in since 2010. In fact, I've been thinking about seeing if you were interested in co-authoring an article on them.? Charlotte Foust (916) 206-4336 On Mon, Oct 12, 2015 at 8:59 AM, Susan Harkins wrote: > Any recommendations: > > "Hey Susan, The built in Access 'switchboard' hasn't changed since Access > 2.0 -- I remember that version :-) > Are there add-ins available that you might recommend (UI Builder is one) > that can update the look and feel to something more modern-looking and more > functional?" > > Susan H. > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > From charlotte.foust at gmail.com Mon Oct 12 15:20:31 2015 From: charlotte.foust at gmail.com (Charlotte Foust) Date: Mon, 12 Oct 2015 13:20:31 -0700 Subject: [AccessD] MZ-Tools 8.0 In-Reply-To: <427A4F5D1404443681AEEC939036FB4F@XPS> References: <004101d1035b$b7846730$268d3590$@com> <427A4F5D1404443681AEEC939036FB4F@XPS> Message-ID: But it's very reasonable and they're discounting it by about 50% off that right now.? Charlotte Foust (916) 206-4336 On Mon, Oct 12, 2015 at 7:31 AM, Jim Dettman wrote: > > It was only just released and one important note; it's no longer free. > Well worth the money (and long overdue IMHO), but it does cost now. > > Jim. > > -----Original Message----- > From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of > Robert > Sent: Saturday, October 10, 2015 09:01 AM > To: 'Access Developers discussion and problem solving' > Subject: Re: [AccessD] MZ-Tools 8.0 > > Thanks for the 'heads up'; didn't know about the release either.. > > WBR > Robert > > > -----Original Message----- > From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of > Charlotte Foust > Sent: Friday, October 09, 2015 4:43 PM > To: Access Developers discussion and problem solving > Subject: [AccessD] MZ-Tools 8.0 > > Am I the last one to know that MZ-Tools is now out in a version that > supports Visual Studio *AND* VBA? I'm blown away by this because I have > used earlier versions in the several environments and they had quite > different capabilities. Now the VBA version has bells and whistles I've > never even seen before! WooHoo! There are separate implementations for > earlier versions of Office and for VB 5 and 6 as well. I haven't had this > much fun since I turned 70. > > > Charlotte Foust > (916) 206-4336 > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > From dw-murphy at cox.net Mon Oct 12 17:35:11 2015 From: dw-murphy at cox.net (Doug Murphy) Date: Mon, 12 Oct 2015 15:35:11 -0700 Subject: [AccessD] From a reader In-Reply-To: References: Message-ID: <009a01d1053e$414bc150$c3e343f0$@cox.net> Not a fan of navigation forms. I am more of a build your own fan using html links so the nav form works more like a web page, which everyone is used to. I used navigation forms in a project that used embedded Excel charts and we kept getting a save dialog when we moved off the chart tab. Turns out the navigation form unloads the object when you move off. Don?t know if this is still a problem, but it was in A 2010. -----Original Message----- From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Charlotte Foust Sent: Monday, October 12, 2015 1:19 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] From a reader Forget switchboards! Navigation forms are the way to go, and you don't need an add-in since 2010. In fact, I've been thinking about seeing if you were interested in co-authoring an article on them.? Charlotte Foust (916) 206-4336 On Mon, Oct 12, 2015 at 8:59 AM, Susan Harkins wrote: > Any recommendations: > > "Hey Susan, The built in Access 'switchboard' hasn't changed since > Access > 2.0 -- I remember that version :-) > Are there add-ins available that you might recommend (UI Builder is > one) that can update the look and feel to something more > modern-looking and more functional?" > > Susan H. > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From charlotte.foust at gmail.com Mon Oct 12 19:04:41 2015 From: charlotte.foust at gmail.com (Charlotte Foust) Date: Mon, 12 Oct 2015 17:04:41 -0700 Subject: [AccessD] From a reader In-Reply-To: <009a01d1053e$414bc150$c3e343f0$@cox.net> References: <009a01d1053e$414bc150$c3e343f0$@cox.net> Message-ID: It's not a problem if you plan for that. My clients love their navigation form interfaces. YMMV Charlotte Foust (916) 206-4336 On Mon, Oct 12, 2015 at 3:35 PM, Doug Murphy wrote: > Not a fan of navigation forms. I am more of a build your own fan using > html links so the nav form works more like a web page, which everyone is > used to. I used navigation forms in a project that used embedded Excel > charts and we kept getting a save dialog when we moved off the chart tab. > Turns out the navigation form unloads the object when you move off. Don?t > know if this is still a problem, but it was in A 2010. > > -----Original Message----- > From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of > Charlotte Foust > Sent: Monday, October 12, 2015 1:19 PM > To: Access Developers discussion and problem solving > Subject: Re: [AccessD] From a reader > > Forget switchboards! Navigation forms are the way to go, and you don't > need an add-in since 2010. In fact, I've been thinking about seeing if you > were interested in co-authoring an article on them.? > > Charlotte Foust > (916) 206-4336 > > On Mon, Oct 12, 2015 at 8:59 AM, Susan Harkins > wrote: > > > Any recommendations: > > > > "Hey Susan, The built in Access 'switchboard' hasn't changed since > > Access > > 2.0 -- I remember that version :-) > > Are there add-ins available that you might recommend (UI Builder is > > one) that can update the look and feel to something more > > modern-looking and more functional?" > > > > Susan H. > > -- > > AccessD mailing list > > AccessD at databaseadvisors.com > > http://databaseadvisors.com/mailman/listinfo/accessd > > Website: http://www.databaseadvisors.com > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > From jimdettman at verizon.net Tue Oct 13 12:32:02 2015 From: jimdettman at verizon.net (Jim Dettman) Date: Tue, 13 Oct 2015 13:32:02 -0400 Subject: [AccessD] Not sure if this was posted or not... Message-ID: <90C292CD6C6E41FBB0B9E03F443D4E59@XPS> All, Not sure if this was posted or not...if so, sorry for the dup. The Access Dev team is soliciting ideas, so here's your chance for your voice to be heard. The sites allow the general public to submit comments, requests, and feedback. For web apps: User Voice - Access Web Apps and for the desktop: User Voice - Access Client Apps Jim. From rockysmolin at bchacc.com Tue Oct 13 18:17:22 2015 From: rockysmolin at bchacc.com (Rocky Smolin) Date: Tue, 13 Oct 2015 16:17:22 -0700 Subject: [AccessD] Password Protected Back End Message-ID: Dear List: A few years back I password protected a back end and made the appropriate changes in the VBA to accommodate. Mostly where I Set db = CurrentDb, I substituted: Dim wrkJet As Workspace Set wrkJet = CreateWorkspace("", "admin", "", dbUseJet) Set db = DBEngine.OpenDatabase(gstrDB, False, False, ";pwd=avery") which worked just fine. So now I have to do the same thing for another app and after making that change in the opening form, everything seems to work fine. Except the combo box with the user names is blank and when I ran the query that's the Row Source for that combo box I get the error "Not a Valid Password". So I combed through the first app to see what I might have done differently but can't find anything. That error is global to all the queries in the app. And all of the forms give that error and in design view all the bound text boxes have an invalid control source. Trying to relink the tables using the linked table manager I get the same result. Won't link - "Not a valid password" So, there's something my senior brain can't remember about how I got all these object to recognize the back end. Anybody know what I need to do? MTIA Rocky Smolin Beach Access Software 858-259-4334 www.bchacc.com www.e-z-mrp.com Skype: rocky.smolin From bensonforums at gmail.com Tue Oct 13 20:08:21 2015 From: bensonforums at gmail.com (Bill Benson) Date: Tue, 13 Oct 2015 21:08:21 -0400 Subject: [AccessD] Password Protected Back End In-Reply-To: References: Message-ID: Can you use ADO, set up a credentialed connection object, run the queries to populate the controls and work with them unbound? Other than that I actually thought you just set up linked tables in the front end in lieu of direct access to the backend. I have heard that stores the password somewhere in the system tables, which might be undesirable for you. But sounds like you have tried that and it isn't working for you. On Oct 13, 2015 7:18 PM, "Rocky Smolin" wrote: > Dear List: > > A few years back I password protected a back end and made the appropriate > changes in the VBA to accommodate. Mostly where I Set db = CurrentDb, I > substituted: > > Dim wrkJet As Workspace > Set wrkJet = CreateWorkspace("", "admin", "", dbUseJet) > Set db = DBEngine.OpenDatabase(gstrDB, False, False, ";pwd=avery") > > which worked just fine. So now I have to do the same thing for another app > and after making that change in the opening form, everything seems to work > fine. > > Except the combo box with the user names is blank and when I ran the query > that's the Row Source for that combo box I get the error "Not a Valid > Password". > > So I combed through the first app to see what I might have done differently > but can't find anything. That error is global to all the queries in the > app. > And all of the forms give that error and in design view all the bound text > boxes have an invalid control source. > > Trying to relink the tables using the linked table manager I get the same > result. Won't link - "Not a valid password" > > So, there's something my senior brain can't remember about how I got all > these object to recognize the back end. Anybody know what I need to do? > > MTIA > > Rocky Smolin > Beach Access Software > 858-259-4334 > www.bchacc.com > www.e-z-mrp.com > Skype: rocky.smolin > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > From rockysmolin at bchacc.com Tue Oct 13 22:38:15 2015 From: rockysmolin at bchacc.com (Rocky Smolin) Date: Tue, 13 Oct 2015 20:38:15 -0700 Subject: [AccessD] Password Protected Back End In-Reply-To: References: Message-ID: <8FF9DAD6540743F79145852319FA7788@HAL9007> No I don't want to go to ADO - too much rewrite - they're in a deep sweat to cross the finish line. I know this woks in the other app. I just can't remember how I did it (old guy, you know). r -----Original Message----- From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Bill Benson Sent: Tuesday, October 13, 2015 6:08 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Password Protected Back End Can you use ADO, set up a credentialed connection object, run the queries to populate the controls and work with them unbound? Other than that I actually thought you just set up linked tables in the front end in lieu of direct access to the backend. I have heard that stores the password somewhere in the system tables, which might be undesirable for you. But sounds like you have tried that and it isn't working for you. On Oct 13, 2015 7:18 PM, "Rocky Smolin" wrote: > Dear List: > > A few years back I password protected a back end and made the > appropriate changes in the VBA to accommodate. Mostly where I Set db > = CurrentDb, I > substituted: > > Dim wrkJet As Workspace > Set wrkJet = CreateWorkspace("", "admin", "", dbUseJet) > Set db = DBEngine.OpenDatabase(gstrDB, False, False, ";pwd=avery") > > which worked just fine. So now I have to do the same thing for > another app and after making that change in the opening form, > everything seems to work fine. > > Except the combo box with the user names is blank and when I ran the > query that's the Row Source for that combo box I get the error "Not a > Valid Password". > > So I combed through the first app to see what I might have done > differently but can't find anything. That error is global to all the > queries in the app. > And all of the forms give that error and in design view all the bound > text boxes have an invalid control source. > > Trying to relink the tables using the linked table manager I get the > same result. Won't link - "Not a valid password" > > So, there's something my senior brain can't remember about how I got > all these object to recognize the back end. Anybody know what I need to do? > > MTIA > > Rocky Smolin > Beach Access Software > 858-259-4334 > www.bchacc.com www.e-z-mrp.com > > Skype: rocky.smolin > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com --- This email has been checked for viruses by Avast antivirus software. https://www.avast.com/antivirus From newsgrps at dalyn.co.nz Wed Oct 14 15:31:23 2015 From: newsgrps at dalyn.co.nz (David Emerson) Date: Thu, 15 Oct 2015 09:31:23 +1300 Subject: [AccessD] Filtering Passthrough Query for Subreport Message-ID: <001b01d106bf$4ba8d110$e2fa7330$@dalyn.co.nz> Hi Listers, Following up from my previous problem, I have another report which displays information for a single client. It has a subreport with several records for claims. Each claim may have several packages so there is a subreport in the Claims subreport for packages. Just prior to opening the report I create the passthrough queries and use the client ID to get all package records for the client. The package query is called qryTempQuery4. Then in the Package Subreport recordsource I have put the following: qryTempQuery4. This returns all package records for all claims under each claim record (as would be expected). The query for the package subreport needs to be filtered based on the claim record. I am having problems with determining how I can filter the Package passthrough query with the claim ID for filtering the package records. I have tried putting the following in the Package Subreport recordsource property but this doesn't return any records at all: SELECT.* FROM qryTempQuery4 WHERE qryTempQuery4.ClaimID = [reports]![rptClientDetailHeld].[Report]![srpClientDetailClaim].[report]![tx tClaimID]; I have tried putting qryTempQuery4 in the Package Subreport recordsource property and the following in the Filter property (still no records): qryTempQuery4.ClaimID = [reports]![rptClientDetailHeld].[Report]![srpClientDetailClaim].[report]![tx tClaimID] Any other hints to help me solve this? Regards David Emerson Dalyn Software Ltd Wellington, New Zealand -----Original Message----- From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of David Emerson Sent: Thursday, 8 October 2015 3:27 p.m. To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Stored Procedure as Rowsource for Chart Thanks Stuart - that was the missing piece. Putting the name of the query in the Rowsource property. Much appreciated. David -----Original Message----- From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Stuart McLachlan Sent: Thursday, 8 October 2015 1:38 p.m. To: Access Developers discussion and problem solving Subject: Re: [AccessD] Stored Procedure as Rowsource for Chart Don't use a temp query. Used a stored query. Create a Passthrough query as qryChartData which calls your SP with some date. Save that query. Set that query as the row source. Assuming that you open the report from a button click somewhere and you have the desired date available then in your code modify and save the qryDef.SQL of qryChartData before opening the report. On 8 Oct 2015 at 13:24, David Emerson wrote: > Thanks Stuart, I looked at the article but I don't think it quite > fits my problem. > > I already have code to get the results from a passthrough query. My > problem is how and where I can set the Chart rowsource so that the > data from the stored procedure is used. > > Here is the code (simplified) for the passthrough query: > > Public grst1 As DAO.Recordset > > Public Sub basReportPassThroughQuery(strSproc As String) ' Sample Call > (Report and 1 sub report) 'strSproc = "EXEC > dbo.spsrpClientQualitySurvey " & Nz(Me!txtID, 0) 'Call > basReportPassThroughQuery(strSproc) > > Dim strTempQueryName As String, qdefTemp As DAO.QueryDef > > strTempQueryName = "qryTempQuery" > CurrentDb.QueryDefs.Delete strTempQueryName 'In case exists > Set qdefTemp = CurrentDb.CreateQueryDef(strTempQueryName) > qdefTemp.ReturnsRecords = True > qdefTemp.ODBCTimeout = 120 > qdefTemp.Connect = "ODBC;DRIVER=SQL > Server;SERVER=Servername;DATABASE=database;Trusted_Connection=Yes" > > qdefTemp.SQL = strSproc > > Set grst1 = qdefTemp.OpenRecordset > > End Sub > > Now that I have the recordset how do I get the chart to use it? > > Regards > > David > From bradm at blackforestltd.com Wed Oct 14 16:42:43 2015 From: bradm at blackforestltd.com (Brad Marks) Date: Wed, 14 Oct 2015 21:42:43 +0000 Subject: [AccessD] How to Change Font Color after Link is Clicked on Access 2007 Report In-Reply-To: <013b01d03db8$a953e9b0$fbfbbd10$@net> References: <6EE85296E0E742168E2302D884BF2D13@HAL9007> <326391091.111693751.1422660346543.JavaMail.root@cds018> <97044157AE6442948960BFC29F70AB1B@HAL9007> <013b01d03db8$a953e9b0$fbfbbd10$@net> Message-ID: All, We have an Access report that displays Sales Orders. If more order details are needed, a user can click on the Sales Order ID and a second report is shown with all of the order details. Recently, one of our users has asked if the color of the specific order that was selected could be changed so that they can more easily see which orders have been selected. This would be similar to how an internet browser works when the colors of links to "visited" sites are changed. Is there a way to change the font color for a specific detail item on one line of a report? Thanks, Brad From bensonforums at gmail.com Wed Oct 14 21:06:25 2015 From: bensonforums at gmail.com (Bill Benson) Date: Wed, 14 Oct 2015 22:06:25 -0400 Subject: [AccessD] Filtering Passthrough Query for Subreport In-Reply-To: <001b01d106bf$4ba8d110$e2fa7330$@dalyn.co.nz> References: <001b01d106bf$4ba8d110$e2fa7330$@dalyn.co.nz> Message-ID: In general, I set a querydef variable to the base query, assign the SQL property to a string, and parse and otherwise manipulate that string to re-develop the needed SQL statement to become the necessary recordsource. I have not tried (recently) this in respect of a pass-through query but I can't think of any immediate reason this would not work. Naturally if doing this you will want a different temporary query so constructed for every report and subreport because otherwise you cannot open reports up side by side (ie, if you were to change the actual query that might be relied upon by more than one report or subreport, then this will confuse Access). Mileage may vary.... On Wed, Oct 14, 2015 at 4:31 PM, David Emerson wrote: > Hi Listers, > > Following up from my previous problem, I have another report which > displays > information for a single client. It has a subreport with several records > for claims. Each claim may have several packages so there is a subreport > in > the Claims subreport for packages. > > Just prior to opening the report I create the passthrough queries and use > the client ID to get all package records for the client. The package query > is called qryTempQuery4. > > Then in the Package Subreport recordsource I have put the following: > qryTempQuery4. This returns all package records for all claims under each > claim record (as would be expected). > > The query for the package subreport needs to be filtered based on the claim > record. I am having problems with determining how I can filter the Package > passthrough query with the claim ID for filtering the package records. > > I have tried putting the following in the Package Subreport recordsource > property but this doesn't return any records at all: > SELECT.* FROM qryTempQuery4 WHERE qryTempQuery4.ClaimID = > > [reports]![rptClientDetailHeld].[Report]![srpClientDetailClaim].[report]![tx > tClaimID]; > > I have tried putting qryTempQuery4 in the Package Subreport recordsource > property and the following in the Filter property (still no records): > qryTempQuery4.ClaimID = > > [reports]![rptClientDetailHeld].[Report]![srpClientDetailClaim].[report]![tx > tClaimID] > > Any other hints to help me solve this? > > Regards > > David Emerson > Dalyn Software Ltd > Wellington, New Zealand > > > > -----Original Message----- > From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of > David Emerson > Sent: Thursday, 8 October 2015 3:27 p.m. > To: 'Access Developers discussion and problem solving' > Subject: Re: [AccessD] Stored Procedure as Rowsource for Chart > > Thanks Stuart - that was the missing piece. Putting the name of the query > in the Rowsource property. > > Much appreciated. > > David > > -----Original Message----- > From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of > Stuart McLachlan > Sent: Thursday, 8 October 2015 1:38 p.m. > To: Access Developers discussion and problem solving > Subject: Re: [AccessD] Stored Procedure as Rowsource for Chart > > Don't use a temp query. Used a stored query. > > Create a Passthrough query as qryChartData which calls your SP with some > date. > Save that query. > Set that query as the row source. > > Assuming that you open the report from a button click somewhere and you > have > the desired date available then in your code modify and save the > qryDef.SQL > of qryChartData before opening the report. > > > > On 8 Oct 2015 at 13:24, David Emerson wrote: > > > Thanks Stuart, I looked at the article but I don't think it quite > > fits my problem. > > > > I already have code to get the results from a passthrough query. My > > problem is how and where I can set the Chart rowsource so that the > > data from the stored procedure is used. > > > > Here is the code (simplified) for the passthrough query: > > > > Public grst1 As DAO.Recordset > > > > Public Sub basReportPassThroughQuery(strSproc As String) ' Sample Call > > (Report and 1 sub report) 'strSproc = "EXEC > > dbo.spsrpClientQualitySurvey " & Nz(Me!txtID, 0) 'Call > > basReportPassThroughQuery(strSproc) > > > > Dim strTempQueryName As String, qdefTemp As DAO.QueryDef > > > > strTempQueryName = "qryTempQuery" > > CurrentDb.QueryDefs.Delete strTempQueryName 'In case exists > > Set qdefTemp = CurrentDb.CreateQueryDef(strTempQueryName) > > qdefTemp.ReturnsRecords = True > > qdefTemp.ODBCTimeout = 120 > > qdefTemp.Connect = "ODBC;DRIVER=SQL > > Server;SERVER=Servername;DATABASE=database;Trusted_Connection=Yes" > > > > qdefTemp.SQL = strSproc > > > > Set grst1 = qdefTemp.OpenRecordset > > > > End Sub > > > > Now that I have the recordset how do I get the chart to use it? > > > > Regards > > > > David > > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > From bensonforums at gmail.com Wed Oct 14 21:24:34 2015 From: bensonforums at gmail.com (Bill Benson) Date: Wed, 14 Oct 2015 22:24:34 -0400 Subject: [AccessD] How to Change Font Color after Link is Clicked on Access 2007 Report In-Reply-To: References: <6EE85296E0E742168E2302D884BF2D13@HAL9007> <326391091.111693751.1422660346543.JavaMail.root@cds018> <97044157AE6442948960BFC29F70AB1B@HAL9007> <013b01d03db8$a953e9b0$fbfbbd10$@net> Message-ID: Brad, just playing with Current event, for the report, this seemed to produce a reveolving color scheme. It is imperfectly constructed, I was just trying to see what it might do. Private Sub Report_Current() Static MyColorindex As Long Dim ctrl As Control For Each ctrl In Controls If TypeName(ctrl) = "Textbox" Then Select Case MyColorindex Case Is = vbRed ctrl.ForeColor = vbRed MyColorindex = vbBlack Case Is = vbBlack ctrl.ForeColor = vbBlack MyColorindex = 5 Case Is = vbBlue ctrl.ForeColor = vbBlue MyColorindex = vbRed Case Else MyColorindex = vbRed End Select End If Next End Sub On Wed, Oct 14, 2015 at 5:42 PM, Brad Marks wrote: > All, > > We have an Access report that displays Sales Orders. If more order > details are needed, a user can click on the Sales Order ID and a second > report is shown with all of the order details. > > Recently, one of our users has asked if the color of the specific order > that was selected could be changed so that they can more easily see which > orders have been selected. > > This would be similar to how an internet browser works when the colors of > links to "visited" sites are changed. > > Is there a way to change the font color for a specific detail item on one > line of a report? > > Thanks, > > Brad > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > From newsgrps at dalyn.co.nz Thu Oct 15 01:07:07 2015 From: newsgrps at dalyn.co.nz (David Emerson) Date: Thu, 15 Oct 2015 19:07:07 +1300 Subject: [AccessD] Filtering Passthrough Query for Subreport In-Reply-To: References: <001b01d106bf$4ba8d110$e2fa7330$@dalyn.co.nz> Message-ID: <006c01d1070f$b95081e0$2bf185a0$@dalyn.co.nz> Thanks Bill, but I think you have highlighted my problem - where do I update the recordsource so that the correct records are filtered? My examples below tried to apply the filters in the properties. Perhaps I should be trying it in code but I can't find a place where it works. I have tried putting this in the Detail_Format event of the srpClientDetailClaim subreport but I get an error message (below): [Reports]![rptClientDetailHeld].[Report]![srpClientDetailClaim].[Report].srp ClientDetailClaimPackage.Report.Requery Error 2467 message: The expression you entered refers to an object that is closed or doesn't exist. I have put msgbox [Reports]![rptClientDetailHeld].[Report]![srpClientDetailClaim].[Report].srp ClientDetailClaimPackage.Report.Name after the report is opened and I get the report name so I know the reference is right but not in the right place. Any further help anyone? Regards David -----Original Message----- From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Bill Benson Sent: Thursday, 15 October 2015 3:06 p.m. To: Access Developers discussion and problem solving Subject: Re: [AccessD] Filtering Passthrough Query for Subreport In general, I set a querydef variable to the base query, assign the SQL property to a string, and parse and otherwise manipulate that string to re-develop the needed SQL statement to become the necessary recordsource. I have not tried (recently) this in respect of a pass-through query but I can't think of any immediate reason this would not work. Naturally if doing this you will want a different temporary query so constructed for every report and subreport because otherwise you cannot open reports up side by side (ie, if you were to change the actual query that might be relied upon by more than one report or subreport, then this will confuse Access). Mileage may vary.... On Wed, Oct 14, 2015 at 4:31 PM, David Emerson wrote: > Hi Listers, > > Following up from my previous problem, I have another report which > displays > information for a single client. It has a subreport with several records > for claims. Each claim may have several packages so there is a > subreport in the Claims subreport for packages. > > Just prior to opening the report I create the passthrough queries and > use the client ID to get all package records for the client. The > package query is called qryTempQuery4. > > Then in the Package Subreport recordsource I have put the following: > qryTempQuery4. This returns all package records for all claims under > each claim record (as would be expected). > > The query for the package subreport needs to be filtered based on the > claim record. I am having problems with determining how I can filter > the Package passthrough query with the claim ID for filtering the package records. > > I have tried putting the following in the Package Subreport > recordsource property but this doesn't return any records at all: > SELECT.* FROM qryTempQuery4 WHERE qryTempQuery4.ClaimID = > > [reports]![rptClientDetailHeld].[Report]![srpClientDetailClaim].[repor > t]![tx > tClaimID]; > > I have tried putting qryTempQuery4 in the Package Subreport > recordsource property and the following in the Filter property (still no records): > qryTempQuery4.ClaimID = > > [reports]![rptClientDetailHeld].[Report]![srpClientDetailClaim].[report]![tx tClaimID] > > Any other hints to help me solve this? > > Regards > > David Emerson > Dalyn Software Ltd > Wellington, New Zealand > > > > -----Original Message----- > From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf > Of David Emerson > Sent: Thursday, 8 October 2015 3:27 p.m. > To: 'Access Developers discussion and problem solving' > Subject: Re: [AccessD] Stored Procedure as Rowsource for Chart > > Thanks Stuart - that was the missing piece. Putting the name of the > query in the Rowsource property. > > Much appreciated. > > David > > -----Original Message----- > From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf > Of Stuart McLachlan > Sent: Thursday, 8 October 2015 1:38 p.m. > To: Access Developers discussion and problem solving > Subject: Re: [AccessD] Stored Procedure as Rowsource for Chart > > Don't use a temp query. Used a stored query. > > Create a Passthrough query as qryChartData which calls your SP with > some date. > Save that query. > Set that query as the row source. > > Assuming that you open the report from a button click somewhere and > you have the desired date available then in your code modify and save > the qryDef.SQL of qryChartData before opening the report. > > > > On 8 Oct 2015 at 13:24, David Emerson wrote: > > > Thanks Stuart, I looked at the article but I don't think it quite > > fits my problem. > > > > I already have code to get the results from a passthrough query. My > > problem is how and where I can set the Chart rowsource so that the > > data from the stored procedure is used. > > > > Here is the code (simplified) for the passthrough query: > > > > Public grst1 As DAO.Recordset > > > > Public Sub basReportPassThroughQuery(strSproc As String) ' Sample Call > > (Report and 1 sub report) 'strSproc = "EXEC > > dbo.spsrpClientQualitySurvey " & Nz(Me!txtID, 0) 'Call > > basReportPassThroughQuery(strSproc) > > > > Dim strTempQueryName As String, qdefTemp As DAO.QueryDef > > > > strTempQueryName = "qryTempQuery" > > CurrentDb.QueryDefs.Delete strTempQueryName 'In case exists > > Set qdefTemp = CurrentDb.CreateQueryDef(strTempQueryName) > > qdefTemp.ReturnsRecords = True > > qdefTemp.ODBCTimeout = 120 > > qdefTemp.Connect = "ODBC;DRIVER=SQL > > Server;SERVER=Servername;DATABASE=database;Trusted_Connection=Yes" > > > > qdefTemp.SQL = strSproc > > > > Set grst1 = qdefTemp.OpenRecordset > > > > End Sub > > > > Now that I have the recordset how do I get the chart to use it? > > > > Regards > > > > David From bensonforums at gmail.com Thu Oct 15 03:26:54 2015 From: bensonforums at gmail.com (Bill Benson) Date: Thu, 15 Oct 2015 04:26:54 -0400 Subject: [AccessD] Filtering Passthrough Query for Subreport In-Reply-To: <006c01d1070f$b95081e0$2bf185a0$@dalyn.co.nz> References: <001b01d106bf$4ba8d110$e2fa7330$@dalyn.co.nz> <006c01d1070f$b95081e0$2bf185a0$@dalyn.co.nz> Message-ID: Why no reference to Me? On Oct 15, 2015 2:08 AM, "David Emerson" wrote: > Thanks Bill, but I think you have highlighted my problem - where do I > update > the recordsource so that the correct records are filtered? > > My examples below tried to apply the filters in the properties. Perhaps I > should be trying it in code but I can't find a place where it works. I > have > tried putting this in the Detail_Format event of the srpClientDetailClaim > subreport but I get an error message (below): > > > > [Reports]![rptClientDetailHeld].[Report]![srpClientDetailClaim].[Report].srp > ClientDetailClaimPackage.Report.Requery > > Error 2467 message: The expression you entered refers to an object that is > closed or doesn't exist. > > I have put msgbox > > [Reports]![rptClientDetailHeld].[Report]![srpClientDetailClaim].[Report].srp > ClientDetailClaimPackage.Report.Name after the report is opened and I get > the report name so I know the reference is right but not in the right > place. > > Any further help anyone? > > Regards > > David > > -----Original Message----- > From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of > Bill Benson > Sent: Thursday, 15 October 2015 3:06 p.m. > To: Access Developers discussion and problem solving > Subject: Re: [AccessD] Filtering Passthrough Query for Subreport > > In general, I set a querydef variable to the base query, assign the SQL > property to a string, and parse and otherwise manipulate that string to > re-develop the needed SQL statement to become the necessary recordsource. I > have not tried (recently) this in respect of a pass-through query but I > can't think of any immediate reason this would not work. > > Naturally if doing this you will want a different temporary query so > constructed for every report and subreport because otherwise you cannot > open > reports up side by side (ie, if you were to change the actual query that > might be relied upon by more than one report or subreport, then this will > confuse Access). > > Mileage may vary.... > > On Wed, Oct 14, 2015 at 4:31 PM, David Emerson > wrote: > > > Hi Listers, > > > > Following up from my previous problem, I have another report which > > displays > > information for a single client. It has a subreport with several > records > > for claims. Each claim may have several packages so there is a > > subreport in the Claims subreport for packages. > > > > Just prior to opening the report I create the passthrough queries and > > use the client ID to get all package records for the client. The > > package query is called qryTempQuery4. > > > > Then in the Package Subreport recordsource I have put the following: > > qryTempQuery4. This returns all package records for all claims under > > each claim record (as would be expected). > > > > The query for the package subreport needs to be filtered based on the > > claim record. I am having problems with determining how I can filter > > the Package passthrough query with the claim ID for filtering the package > records. > > > > I have tried putting the following in the Package Subreport > > recordsource property but this doesn't return any records at all: > > SELECT.* FROM qryTempQuery4 WHERE qryTempQuery4.ClaimID = > > > > [reports]![rptClientDetailHeld].[Report]![srpClientDetailClaim].[repor > > t]![tx > > tClaimID]; > > > > I have tried putting qryTempQuery4 in the Package Subreport > > recordsource property and the following in the Filter property (still no > records): > > qryTempQuery4.ClaimID = > > > > > > [reports]![rptClientDetailHeld].[Report]![srpClientDetailClaim].[report]![tx > tClaimID] > > > > Any other hints to help me solve this? > > > > Regards > > > > David Emerson > > Dalyn Software Ltd > > Wellington, New Zealand > > > > > > > > -----Original Message----- > > From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf > > Of David Emerson > > Sent: Thursday, 8 October 2015 3:27 p.m. > > To: 'Access Developers discussion and problem solving' > > Subject: Re: [AccessD] Stored Procedure as Rowsource for Chart > > > > Thanks Stuart - that was the missing piece. Putting the name of the > > query in the Rowsource property. > > > > Much appreciated. > > > > David > > > > -----Original Message----- > > From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf > > Of Stuart McLachlan > > Sent: Thursday, 8 October 2015 1:38 p.m. > > To: Access Developers discussion and problem solving > > Subject: Re: [AccessD] Stored Procedure as Rowsource for Chart > > > > Don't use a temp query. Used a stored query. > > > > Create a Passthrough query as qryChartData which calls your SP with > > some date. > > Save that query. > > Set that query as the row source. > > > > Assuming that you open the report from a button click somewhere and > > you have the desired date available then in your code modify and save > > the qryDef.SQL of qryChartData before opening the report. > > > > > > > > On 8 Oct 2015 at 13:24, David Emerson wrote: > > > > > Thanks Stuart, I looked at the article but I don't think it quite > > > fits my problem. > > > > > > I already have code to get the results from a passthrough query. My > > > problem is how and where I can set the Chart rowsource so that the > > > data from the stored procedure is used. > > > > > > Here is the code (simplified) for the passthrough query: > > > > > > Public grst1 As DAO.Recordset > > > > > > Public Sub basReportPassThroughQuery(strSproc As String) ' Sample Call > > > (Report and 1 sub report) 'strSproc = "EXEC > > > dbo.spsrpClientQualitySurvey " & Nz(Me!txtID, 0) 'Call > > > basReportPassThroughQuery(strSproc) > > > > > > Dim strTempQueryName As String, qdefTemp As DAO.QueryDef > > > > > > strTempQueryName = "qryTempQuery" > > > CurrentDb.QueryDefs.Delete strTempQueryName 'In case exists > > > Set qdefTemp = CurrentDb.CreateQueryDef(strTempQueryName) > > > qdefTemp.ReturnsRecords = True > > > qdefTemp.ODBCTimeout = 120 > > > qdefTemp.Connect = "ODBC;DRIVER=SQL > > > Server;SERVER=Servername;DATABASE=database;Trusted_Connection=Yes" > > > > > > qdefTemp.SQL = strSproc > > > > > > Set grst1 = qdefTemp.OpenRecordset > > > > > > End Sub > > > > > > Now that I have the recordset how do I get the chart to use it? > > > > > > Regards > > > > > > David > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > From newsgrps at dalyn.co.nz Thu Oct 15 13:33:27 2015 From: newsgrps at dalyn.co.nz (David Emerson) Date: Fri, 16 Oct 2015 07:33:27 +1300 Subject: [AccessD] Filtering Passthrough Query for Subreport In-Reply-To: References: <001b01d106bf$4ba8d110$e2fa7330$@dalyn.co.nz> <006c01d1070f$b95081e0$2bf185a0$@dalyn.co.nz> Message-ID: <001401d10777$fbc88460$f3598d20$@dalyn.co.nz> I didn't think it would make any difference, and I wanted to check the reference from outside the report to see if it was valid (which it was). My problem was that I couldn't even find an event that happened after the Detail subreport was in existence, but before it got the data set. -----Original Message----- From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Bill Benson Sent: Thursday, 15 October 2015 9:27 p.m. To: Access Developers discussion and problem solving Subject: Re: [AccessD] Filtering Passthrough Query for Subreport Why no reference to Me? On Oct 15, 2015 2:08 AM, "David Emerson" wrote: > Thanks Bill, but I think you have highlighted my problem - where do I > update the recordsource so that the correct records are filtered? > > My examples below tried to apply the filters in the properties. > Perhaps I should be trying it in code but I can't find a place where > it works. I have tried putting this in the Detail_Format event of the > srpClientDetailClaim subreport but I get an error message (below): > > > > [Reports]![rptClientDetailHeld].[Report]![srpClientDetailClaim].[Repor > t].srp ClientDetailClaimPackage.Report.Requery > > Error 2467 message: The expression you entered refers to an object > that is closed or doesn't exist. > > I have put msgbox > > [Reports]![rptClientDetailHeld].[Report]![srpClientDetailClaim].[Repor > t].srp ClientDetailClaimPackage.Report.Name after the report is opened > and I get the report name so I know the reference is right but not in > the right place. > > Any further help anyone? > > Regards > > David > > -----Original Message----- > From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf > Of Bill Benson > Sent: Thursday, 15 October 2015 3:06 p.m. > To: Access Developers discussion and problem solving > Subject: Re: [AccessD] Filtering Passthrough Query for Subreport > > In general, I set a querydef variable to the base query, assign the > SQL property to a string, and parse and otherwise manipulate that > string to re-develop the needed SQL statement to become the necessary > recordsource. I have not tried (recently) this in respect of a > pass-through query but I can't think of any immediate reason this would not work. > > Naturally if doing this you will want a different temporary query so > constructed for every report and subreport because otherwise you > cannot open reports up side by side (ie, if you were to change the > actual query that might be relied upon by more than one report or > subreport, then this will confuse Access). > > Mileage may vary.... > > On Wed, Oct 14, 2015 at 4:31 PM, David Emerson > wrote: > > > Hi Listers, > > > > Following up from my previous problem, I have another report which > > displays > > information for a single client. It has a subreport with several > records > > for claims. Each claim may have several packages so there is a > > subreport in the Claims subreport for packages. > > > > Just prior to opening the report I create the passthrough queries > > and use the client ID to get all package records for the client. > > The package query is called qryTempQuery4. > > > > Then in the Package Subreport recordsource I have put the following: > > qryTempQuery4. This returns all package records for all claims > > under each claim record (as would be expected). > > > > The query for the package subreport needs to be filtered based on > > the claim record. I am having problems with determining how I can > > filter the Package passthrough query with the claim ID for filtering > > the package > records. > > > > I have tried putting the following in the Package Subreport > > recordsource property but this doesn't return any records at all: > > SELECT.* FROM qryTempQuery4 WHERE qryTempQuery4.ClaimID = > > > > [reports]![rptClientDetailHeld].[Report]![srpClientDetailClaim].[rep > > or > > t]![tx > > tClaimID]; > > > > I have tried putting qryTempQuery4 in the Package Subreport > > recordsource property and the following in the Filter property > > (still no > records): > > qryTempQuery4.ClaimID = > > > > > > [reports]![rptClientDetailHeld].[Report]![srpClientDetailClaim].[repor > t]![tx > tClaimID] > > > > Any other hints to help me solve this? > > > > Regards > > > > David Emerson > > Dalyn Software Ltd > > Wellington, New Zealand > > > > > > > > -----Original Message----- > > From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On > > Behalf Of David Emerson > > Sent: Thursday, 8 October 2015 3:27 p.m. > > To: 'Access Developers discussion and problem solving' > > Subject: Re: [AccessD] Stored Procedure as Rowsource for Chart > > > > Thanks Stuart - that was the missing piece. Putting the name of the > > query in the Rowsource property. > > > > Much appreciated. > > > > David > > > > -----Original Message----- > > From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On > > Behalf Of Stuart McLachlan > > Sent: Thursday, 8 October 2015 1:38 p.m. > > To: Access Developers discussion and problem solving > > Subject: Re: [AccessD] Stored Procedure as Rowsource for Chart > > > > Don't use a temp query. Used a stored query. > > > > Create a Passthrough query as qryChartData which calls your SP with > > some date. > > Save that query. > > Set that query as the row source. > > > > Assuming that you open the report from a button click somewhere and > > you have the desired date available then in your code modify and > > save the qryDef.SQL of qryChartData before opening the report. > > > > > > > > On 8 Oct 2015 at 13:24, David Emerson wrote: > > > > > Thanks Stuart, I looked at the article but I don't think it quite > > > fits my problem. > > > > > > I already have code to get the results from a passthrough query. > > > My problem is how and where I can set the Chart rowsource so that > > > the data from the stored procedure is used. > > > > > > Here is the code (simplified) for the passthrough query: > > > > > > Public grst1 As DAO.Recordset > > > > > > Public Sub basReportPassThroughQuery(strSproc As String) ' Sample > > > Call (Report and 1 sub report) 'strSproc = "EXEC > > > dbo.spsrpClientQualitySurvey " & Nz(Me!txtID, 0) 'Call > > > basReportPassThroughQuery(strSproc) > > > > > > Dim strTempQueryName As String, qdefTemp As DAO.QueryDef > > > > > > strTempQueryName = "qryTempQuery" > > > CurrentDb.QueryDefs.Delete strTempQueryName 'In case exists > > > Set qdefTemp = CurrentDb.CreateQueryDef(strTempQueryName) > > > qdefTemp.ReturnsRecords = True > > > qdefTemp.ODBCTimeout = 120 > > > qdefTemp.Connect = "ODBC;DRIVER=SQL > > > Server;SERVER=Servername;DATABASE=database;Trusted_Connection=Yes" > > > > > > qdefTemp.SQL = strSproc > > > > > > Set grst1 = qdefTemp.OpenRecordset > > > > > > End Sub > > > > > > Now that I have the recordset how do I get the chart to use it? > > > > > > Regards > > > > > > David > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From bradm at blackforestltd.com Fri Oct 16 10:11:50 2015 From: bradm at blackforestltd.com (Brad Marks) Date: Fri, 16 Oct 2015 15:11:50 +0000 Subject: [AccessD] =?windows-1252?q?JobBOSS_Database_=96_Access_2007_Repor?= =?windows-1252?q?ting?= In-Reply-To: References: <6EE85296E0E742168E2302D884BF2D13@HAL9007> <326391091.111693751.1422660346543.JavaMail.root@cds018> <97044157AE6442948960BFC29F70AB1B@HAL9007> <013b01d03db8$a953e9b0$fbfbbd10$@net> Message-ID: All, A friend of mine recently started work for a small (30 person) metal fabrication firm that uses a purchased package called JobBOSS. He is not satisfied with the built-in JobBOSS reports and has asked me if there is perhaps a better way to pull data from the JobBOSS database and create custom reports. I would like to use Access to create reports by pulling data from the JobBOSS database via ODBC. Has anyone ever worked with this database? Thanks, Brad From bensonforums at gmail.com Fri Oct 16 10:12:12 2015 From: bensonforums at gmail.com (Bill Benson) Date: Fri, 16 Oct 2015 11:12:12 -0400 Subject: [AccessD] Filtering Passthrough Query for Subreport In-Reply-To: <006c01d1070f$b95081e0$2bf185a0$@dalyn.co.nz> References: <001b01d106bf$4ba8d110$e2fa7330$@dalyn.co.nz> <006c01d1070f$b95081e0$2bf185a0$@dalyn.co.nz> Message-ID: I would think you could use the Report Open event to modify the SQL of the recordsource, whether or not the recordsource is a passthrough. But I haven't done it, maybe you already tried that. On Thu, Oct 15, 2015 at 2:07 AM, David Emerson wrote: > Thanks Bill, but I think you have highlighted my problem - where do I > update > the recordsource so that the correct records are filtered? > > My examples below tried to apply the filters in the properties. Perhaps I > should be trying it in code but I can't find a place where it works. I > have > tried putting this in the Detail_Format event of the srpClientDetailClaim > subreport but I get an error message (below): > > > > [Reports]![rptClientDetailHeld].[Report]![srpClientDetailClaim].[Report].srp > ClientDetailClaimPackage.Report.Requery > > Error 2467 message: The expression you entered refers to an object that is > closed or doesn't exist. > > I have put msgbox > > [Reports]![rptClientDetailHeld].[Report]![srpClientDetailClaim].[Report].srp > ClientDetailClaimPackage.Report.Name after the report is opened and I get > the report name so I know the reference is right but not in the right > place. > > Any further help anyone? > > Regards > > David > > -----Original Message----- > From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of > Bill Benson > Sent: Thursday, 15 October 2015 3:06 p.m. > To: Access Developers discussion and problem solving > Subject: Re: [AccessD] Filtering Passthrough Query for Subreport > > In general, I set a querydef variable to the base query, assign the SQL > property to a string, and parse and otherwise manipulate that string to > re-develop the needed SQL statement to become the necessary recordsource. I > have not tried (recently) this in respect of a pass-through query but I > can't think of any immediate reason this would not work. > > Naturally if doing this you will want a different temporary query so > constructed for every report and subreport because otherwise you cannot > open > reports up side by side (ie, if you were to change the actual query that > might be relied upon by more than one report or subreport, then this will > confuse Access). > > Mileage may vary.... > > On Wed, Oct 14, 2015 at 4:31 PM, David Emerson > wrote: > > > Hi Listers, > > > > Following up from my previous problem, I have another report which > > displays > > information for a single client. It has a subreport with several > records > > for claims. Each claim may have several packages so there is a > > subreport in the Claims subreport for packages. > > > > Just prior to opening the report I create the passthrough queries and > > use the client ID to get all package records for the client. The > > package query is called qryTempQuery4. > > > > Then in the Package Subreport recordsource I have put the following: > > qryTempQuery4. This returns all package records for all claims under > > each claim record (as would be expected). > > > > The query for the package subreport needs to be filtered based on the > > claim record. I am having problems with determining how I can filter > > the Package passthrough query with the claim ID for filtering the package > records. > > > > I have tried putting the following in the Package Subreport > > recordsource property but this doesn't return any records at all: > > SELECT.* FROM qryTempQuery4 WHERE qryTempQuery4.ClaimID = > > > > [reports]![rptClientDetailHeld].[Report]![srpClientDetailClaim].[repor > > t]![tx > > tClaimID]; > > > > I have tried putting qryTempQuery4 in the Package Subreport > > recordsource property and the following in the Filter property (still no > records): > > qryTempQuery4.ClaimID = > > > > > > [reports]![rptClientDetailHeld].[Report]![srpClientDetailClaim].[report]![tx > tClaimID] > > > > Any other hints to help me solve this? > > > > Regards > > > > David Emerson > > Dalyn Software Ltd > > Wellington, New Zealand > > > > > > > > -----Original Message----- > > From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf > > Of David Emerson > > Sent: Thursday, 8 October 2015 3:27 p.m. > > To: 'Access Developers discussion and problem solving' > > Subject: Re: [AccessD] Stored Procedure as Rowsource for Chart > > > > Thanks Stuart - that was the missing piece. Putting the name of the > > query in the Rowsource property. > > > > Much appreciated. > > > > David > > > > -----Original Message----- > > From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf > > Of Stuart McLachlan > > Sent: Thursday, 8 October 2015 1:38 p.m. > > To: Access Developers discussion and problem solving > > Subject: Re: [AccessD] Stored Procedure as Rowsource for Chart > > > > Don't use a temp query. Used a stored query. > > > > Create a Passthrough query as qryChartData which calls your SP with > > some date. > > Save that query. > > Set that query as the row source. > > > > Assuming that you open the report from a button click somewhere and > > you have the desired date available then in your code modify and save > > the qryDef.SQL of qryChartData before opening the report. > > > > > > > > On 8 Oct 2015 at 13:24, David Emerson wrote: > > > > > Thanks Stuart, I looked at the article but I don't think it quite > > > fits my problem. > > > > > > I already have code to get the results from a passthrough query. My > > > problem is how and where I can set the Chart rowsource so that the > > > data from the stored procedure is used. > > > > > > Here is the code (simplified) for the passthrough query: > > > > > > Public grst1 As DAO.Recordset > > > > > > Public Sub basReportPassThroughQuery(strSproc As String) ' Sample Call > > > (Report and 1 sub report) 'strSproc = "EXEC > > > dbo.spsrpClientQualitySurvey " & Nz(Me!txtID, 0) 'Call > > > basReportPassThroughQuery(strSproc) > > > > > > Dim strTempQueryName As String, qdefTemp As DAO.QueryDef > > > > > > strTempQueryName = "qryTempQuery" > > > CurrentDb.QueryDefs.Delete strTempQueryName 'In case exists > > > Set qdefTemp = CurrentDb.CreateQueryDef(strTempQueryName) > > > qdefTemp.ReturnsRecords = True > > > qdefTemp.ODBCTimeout = 120 > > > qdefTemp.Connect = "ODBC;DRIVER=SQL > > > Server;SERVER=Servername;DATABASE=database;Trusted_Connection=Yes" > > > > > > qdefTemp.SQL = strSproc > > > > > > Set grst1 = qdefTemp.OpenRecordset > > > > > > End Sub > > > > > > Now that I have the recordset how do I get the chart to use it? > > > > > > Regards > > > > > > David > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > From rockysmolin at bchacc.com Fri Oct 16 10:18:21 2015 From: rockysmolin at bchacc.com (Rocky Smolin) Date: Fri, 16 Oct 2015 08:18:21 -0700 Subject: [AccessD] JobBOSS Database - Access 2007 Reporting In-Reply-To: References: <6EE85296E0E742168E2302D884BF2D13@HAL9007><326391091.111693751.1422660346543.JavaMail.root@cds018><97044157AE6442948960BFC29F70AB1B@HAL9007><013b01d03db8$a953e9b0$fbfbbd10$@net> Message-ID: <8002416BB0BC4A08A4531199C9DBF0C1@HAL9007> I'm familiar with it but only from the outside as it competed indirectly with my MRP product. What was it written in? Rocky Smolin Beach Access Software 858-259-4334 www.bchacc.com www.e-z-mrp.com Skype: rocky.smolin -----Original Message----- From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Brad Marks Sent: Friday, October 16, 2015 8:12 AM To: Access Developers discussion and problem solving Subject: [AccessD] JobBOSS Database - Access 2007 Reporting All, A friend of mine recently started work for a small (30 person) metal fabrication firm that uses a purchased package called JobBOSS. He is not satisfied with the built-in JobBOSS reports and has asked me if there is perhaps a better way to pull data from the JobBOSS database and create custom reports. I would like to use Access to create reports by pulling data from the JobBOSS database via ODBC. Has anyone ever worked with this database? Thanks, Brad -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com --- This email has been checked for viruses by Avast antivirus software. https://www.avast.com/antivirus From bradm at blackforestltd.com Fri Oct 16 10:26:54 2015 From: bradm at blackforestltd.com (Brad Marks) Date: Fri, 16 Oct 2015 15:26:54 +0000 Subject: [AccessD] JobBOSS Database - Access 2007 Reporting In-Reply-To: <8002416BB0BC4A08A4531199C9DBF0C1@HAL9007> References: <6EE85296E0E742168E2302D884BF2D13@HAL9007><326391091.111693751.1422660346543.JavaMail.root@cds018><97044157AE6442948960BFC29F70AB1B@HAL9007><013b01d03db8$a953e9b0$fbfbbd10$@net> <8002416BB0BC4A08A4531199C9DBF0C1@HAL9007> Message-ID: Rocky, I don't know much about it. In fact, I have not ever seen it work. My friend just mentioned it and I did a little digging on the internet. I don't know what language was used to build it. However, it appears that the database is Microsoft SQL Server, so the data should be available via ODBC. Thanks, Brad ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -----Original Message----- From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Rocky Smolin Sent: Friday, October 16, 2015 10:18 AM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] JobBOSS Database - Access 2007 Reporting I'm familiar with it but only from the outside as it competed indirectly with my MRP product. What was it written in? Rocky Smolin Beach Access Software 858-259-4334 www.bchacc.com www.e-z-mrp.com Skype: rocky.smolin -----Original Message----- From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Brad Marks Sent: Friday, October 16, 2015 8:12 AM To: Access Developers discussion and problem solving Subject: [AccessD] JobBOSS Database - Access 2007 Reporting All, A friend of mine recently started work for a small (30 person) metal fabrication firm that uses a purchased package called JobBOSS. He is not satisfied with the built-in JobBOSS reports and has asked me if there is perhaps a better way to pull data from the JobBOSS database and create custom reports. I would like to use Access to create reports by pulling data from the JobBOSS database via ODBC. Has anyone ever worked with this database? Thanks, Brad -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com --- This email has been checked for viruses by Avast antivirus software. https://www.avast.com/antivirus -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From rockysmolin at bchacc.com Fri Oct 16 10:35:23 2015 From: rockysmolin at bchacc.com (Rocky Smolin) Date: Fri, 16 Oct 2015 08:35:23 -0700 Subject: [AccessD] JobBOSS Database - Access 2007 Reporting In-Reply-To: References: <6EE85296E0E742168E2302D884BF2D13@HAL9007><326391091.111693751.1422660346543.JavaMail.root@cds018><97044157AE6442948960BFC29F70AB1B@HAL9007><013b01d03db8$a953e9b0$fbfbbd10$@net><8002416BB0BC4A08A4531199C9DBF0C1@HAL9007> Message-ID: <4CF7B83002EC49EEA216A05783AA1578@HAL9007> If that's the case, and the developer(s) used descriptive table and field names, it should be pretty easy to identify where the fields are that have the data they want. R -----Original Message----- From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Brad Marks Sent: Friday, October 16, 2015 8:27 AM To: Access Developers discussion and problem solving Subject: Re: [AccessD] JobBOSS Database - Access 2007 Reporting Rocky, I don't know much about it. In fact, I have not ever seen it work. My friend just mentioned it and I did a little digging on the internet. I don't know what language was used to build it. However, it appears that the database is Microsoft SQL Server, so the data should be available via ODBC. Thanks, Brad ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -----Original Message----- From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Rocky Smolin Sent: Friday, October 16, 2015 10:18 AM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] JobBOSS Database - Access 2007 Reporting I'm familiar with it but only from the outside as it competed indirectly with my MRP product. What was it written in? Rocky Smolin Beach Access Software 858-259-4334 www.bchacc.com www.e-z-mrp.com Skype: rocky.smolin -----Original Message----- From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Brad Marks Sent: Friday, October 16, 2015 8:12 AM To: Access Developers discussion and problem solving Subject: [AccessD] JobBOSS Database - Access 2007 Reporting All, A friend of mine recently started work for a small (30 person) metal fabrication firm that uses a purchased package called JobBOSS. He is not satisfied with the built-in JobBOSS reports and has asked me if there is perhaps a better way to pull data from the JobBOSS database and create custom reports. I would like to use Access to create reports by pulling data from the JobBOSS database via ODBC. Has anyone ever worked with this database? Thanks, Brad -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com --- This email has been checked for viruses by Avast antivirus software. https://www.avast.com/antivirus -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com --- This email has been checked for viruses by Avast antivirus software. https://www.avast.com/antivirus From newsgrps at dalyn.co.nz Fri Oct 16 15:26:22 2015 From: newsgrps at dalyn.co.nz (David Emerson) Date: Sat, 17 Oct 2015 09:26:22 +1300 Subject: [AccessD] Filtering Passthrough Query for Subreport In-Reply-To: References: <001b01d106bf$4ba8d110$e2fa7330$@dalyn.co.nz> <006c01d1070f$b95081e0$2bf185a0$@dalyn.co.nz> Message-ID: <001701d10850$ecd89d80$c689d880$@dalyn.co.nz> I could try this but I don't think it will work because the source needs to change as the parent record changes - on Open may only fire up once when it is opened. -----Original Message----- From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Bill Benson Sent: Saturday, 17 October 2015 4:12 a.m. To: Access Developers discussion and problem solving Subject: Re: [AccessD] Filtering Passthrough Query for Subreport I would think you could use the Report Open event to modify the SQL of the recordsource, whether or not the recordsource is a passthrough. But I haven't done it, maybe you already tried that. On Thu, Oct 15, 2015 at 2:07 AM, David Emerson wrote: > Thanks Bill, but I think you have highlighted my problem - where do I > update the recordsource so that the correct records are filtered? > > My examples below tried to apply the filters in the properties. > Perhaps I should be trying it in code but I can't find a place where > it works. I have tried putting this in the Detail_Format event of the > srpClientDetailClaim subreport but I get an error message (below): > > > > [Reports]![rptClientDetailHeld].[Report]![srpClientDetailClaim].[Repor > t].srp ClientDetailClaimPackage.Report.Requery > > Error 2467 message: The expression you entered refers to an object > that is closed or doesn't exist. > > I have put msgbox > > [Reports]![rptClientDetailHeld].[Report]![srpClientDetailClaim].[Repor > t].srp ClientDetailClaimPackage.Report.Name after the report is opened > and I get the report name so I know the reference is right but not in > the right place. > > Any further help anyone? > > Regards > > David > > -----Original Message----- > From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf > Of Bill Benson > Sent: Thursday, 15 October 2015 3:06 p.m. > To: Access Developers discussion and problem solving > Subject: Re: [AccessD] Filtering Passthrough Query for Subreport > > In general, I set a querydef variable to the base query, assign the > SQL property to a string, and parse and otherwise manipulate that > string to re-develop the needed SQL statement to become the necessary > recordsource. I have not tried (recently) this in respect of a > pass-through query but I can't think of any immediate reason this would not work. > > Naturally if doing this you will want a different temporary query so > constructed for every report and subreport because otherwise you > cannot open reports up side by side (ie, if you were to change the > actual query that might be relied upon by more than one report or > subreport, then this will confuse Access). > > Mileage may vary.... > > On Wed, Oct 14, 2015 at 4:31 PM, David Emerson > wrote: > > > Hi Listers, > > > > Following up from my previous problem, I have another report which > > displays > > information for a single client. It has a subreport with several > records > > for claims. Each claim may have several packages so there is a > > subreport in the Claims subreport for packages. > > > > Just prior to opening the report I create the passthrough queries > > and use the client ID to get all package records for the client. > > The package query is called qryTempQuery4. > > > > Then in the Package Subreport recordsource I have put the following: > > qryTempQuery4. This returns all package records for all claims > > under each claim record (as would be expected). > > > > The query for the package subreport needs to be filtered based on > > the claim record. I am having problems with determining how I can > > filter the Package passthrough query with the claim ID for filtering > > the package > records. > > > > I have tried putting the following in the Package Subreport > > recordsource property but this doesn't return any records at all: > > SELECT.* FROM qryTempQuery4 WHERE qryTempQuery4.ClaimID = > > > > [reports]![rptClientDetailHeld].[Report]![srpClientDetailClaim].[rep > > or > > t]![tx > > tClaimID]; > > > > I have tried putting qryTempQuery4 in the Package Subreport > > recordsource property and the following in the Filter property > > (still no > records): > > qryTempQuery4.ClaimID = > > > > > > [reports]![rptClientDetailHeld].[Report]![srpClientDetailClaim].[repor > t]![tx > tClaimID] > > > > Any other hints to help me solve this? > > > > Regards > > > > David Emerson > > Dalyn Software Ltd > > Wellington, New Zealand > > > > > > > > -----Original Message----- > > From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On > > Behalf Of David Emerson > > Sent: Thursday, 8 October 2015 3:27 p.m. > > To: 'Access Developers discussion and problem solving' > > Subject: Re: [AccessD] Stored Procedure as Rowsource for Chart > > > > Thanks Stuart - that was the missing piece. Putting the name of the > > query in the Rowsource property. > > > > Much appreciated. > > > > David > > > > -----Original Message----- > > From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On > > Behalf Of Stuart McLachlan > > Sent: Thursday, 8 October 2015 1:38 p.m. > > To: Access Developers discussion and problem solving > > Subject: Re: [AccessD] Stored Procedure as Rowsource for Chart > > > > Don't use a temp query. Used a stored query. > > > > Create a Passthrough query as qryChartData which calls your SP with > > some date. > > Save that query. > > Set that query as the row source. > > > > Assuming that you open the report from a button click somewhere and > > you have the desired date available then in your code modify and > > save the qryDef.SQL of qryChartData before opening the report. > > > > > > > > On 8 Oct 2015 at 13:24, David Emerson wrote: > > > > > Thanks Stuart, I looked at the article but I don't think it quite > > > fits my problem. > > > > > > I already have code to get the results from a passthrough query. > > > My problem is how and where I can set the Chart rowsource so that > > > the data from the stored procedure is used. > > > > > > Here is the code (simplified) for the passthrough query: > > > > > > Public grst1 As DAO.Recordset > > > > > > Public Sub basReportPassThroughQuery(strSproc As String) ' Sample > > > Call (Report and 1 sub report) 'strSproc = "EXEC > > > dbo.spsrpClientQualitySurvey " & Nz(Me!txtID, 0) 'Call > > > basReportPassThroughQuery(strSproc) > > > > > > Dim strTempQueryName As String, qdefTemp As DAO.QueryDef > > > > > > strTempQueryName = "qryTempQuery" > > > CurrentDb.QueryDefs.Delete strTempQueryName 'In case exists > > > Set qdefTemp = CurrentDb.CreateQueryDef(strTempQueryName) > > > qdefTemp.ReturnsRecords = True > > > qdefTemp.ODBCTimeout = 120 > > > qdefTemp.Connect = "ODBC;DRIVER=SQL > > > Server;SERVER=Servername;DATABASE=database;Trusted_Connection=Yes" > > > > > > qdefTemp.SQL = strSproc > > > > > > Set grst1 = qdefTemp.OpenRecordset > > > > > > End Sub > > > > > > Now that I have the recordset how do I get the chart to use it? > > > > > > Regards > > > > > > David > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From bensonforums at gmail.com Fri Oct 16 16:58:36 2015 From: bensonforums at gmail.com (Bill Benson) Date: Fri, 16 Oct 2015 17:58:36 -0400 Subject: [AccessD] Filtering Passthrough Query for Subreport In-Reply-To: <001701d10850$ecd89d80$c689d880$@dalyn.co.nz> References: <001b01d106bf$4ba8d110$e2fa7330$@dalyn.co.nz> <006c01d1070f$b95081e0$2bf185a0$@dalyn.co.nz> <001701d10850$ecd89d80$c689d880$@dalyn.co.nz> Message-ID: I'd be surprised if you could not find an event to suit. On Oct 16, 2015 4:27 PM, "David Emerson" wrote: > I could try this but I don't think it will work because the source needs to > change as the parent record changes - on Open may only fire up once when it > is opened. > > -----Original Message----- > From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of > Bill Benson > Sent: Saturday, 17 October 2015 4:12 a.m. > To: Access Developers discussion and problem solving > Subject: Re: [AccessD] Filtering Passthrough Query for Subreport > > I would think you could use the Report Open event to modify the SQL of the > recordsource, whether or not the recordsource is a passthrough. But I > haven't done it, maybe you already tried that. > > On Thu, Oct 15, 2015 at 2:07 AM, David Emerson > wrote: > > > Thanks Bill, but I think you have highlighted my problem - where do I > > update the recordsource so that the correct records are filtered? > > > > My examples below tried to apply the filters in the properties. > > Perhaps I should be trying it in code but I can't find a place where > > it works. I have tried putting this in the Detail_Format event of the > > srpClientDetailClaim subreport but I get an error message (below): > > > > > > > > [Reports]![rptClientDetailHeld].[Report]![srpClientDetailClaim].[Repor > > t].srp ClientDetailClaimPackage.Report.Requery > > > > Error 2467 message: The expression you entered refers to an object > > that is closed or doesn't exist. > > > > I have put msgbox > > > > [Reports]![rptClientDetailHeld].[Report]![srpClientDetailClaim].[Repor > > t].srp ClientDetailClaimPackage.Report.Name after the report is opened > > and I get the report name so I know the reference is right but not in > > the right place. > > > > Any further help anyone? > > > > Regards > > > > David > > > > -----Original Message----- > > From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf > > Of Bill Benson > > Sent: Thursday, 15 October 2015 3:06 p.m. > > To: Access Developers discussion and problem solving > > Subject: Re: [AccessD] Filtering Passthrough Query for Subreport > > > > In general, I set a querydef variable to the base query, assign the > > SQL property to a string, and parse and otherwise manipulate that > > string to re-develop the needed SQL statement to become the necessary > > recordsource. I have not tried (recently) this in respect of a > > pass-through query but I can't think of any immediate reason this would > not work. > > > > Naturally if doing this you will want a different temporary query so > > constructed for every report and subreport because otherwise you > > cannot open reports up side by side (ie, if you were to change the > > actual query that might be relied upon by more than one report or > > subreport, then this will confuse Access). > > > > Mileage may vary.... > > > > On Wed, Oct 14, 2015 at 4:31 PM, David Emerson > > wrote: > > > > > Hi Listers, > > > > > > Following up from my previous problem, I have another report which > > > displays > > > information for a single client. It has a subreport with several > > records > > > for claims. Each claim may have several packages so there is a > > > subreport in the Claims subreport for packages. > > > > > > Just prior to opening the report I create the passthrough queries > > > and use the client ID to get all package records for the client. > > > The package query is called qryTempQuery4. > > > > > > Then in the Package Subreport recordsource I have put the following: > > > qryTempQuery4. This returns all package records for all claims > > > under each claim record (as would be expected). > > > > > > The query for the package subreport needs to be filtered based on > > > the claim record. I am having problems with determining how I can > > > filter the Package passthrough query with the claim ID for filtering > > > the package > > records. > > > > > > I have tried putting the following in the Package Subreport > > > recordsource property but this doesn't return any records at all: > > > SELECT.* FROM qryTempQuery4 WHERE qryTempQuery4.ClaimID = > > > > > > [reports]![rptClientDetailHeld].[Report]![srpClientDetailClaim].[rep > > > or > > > t]![tx > > > tClaimID]; > > > > > > I have tried putting qryTempQuery4 in the Package Subreport > > > recordsource property and the following in the Filter property > > > (still no > > records): > > > qryTempQuery4.ClaimID = > > > > > > > > > > [reports]![rptClientDetailHeld].[Report]![srpClientDetailClaim].[repor > > t]![tx > > tClaimID] > > > > > > Any other hints to help me solve this? > > > > > > Regards > > > > > > David Emerson > > > Dalyn Software Ltd > > > Wellington, New Zealand > > > > > > > > > > > > -----Original Message----- > > > From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On > > > Behalf Of David Emerson > > > Sent: Thursday, 8 October 2015 3:27 p.m. > > > To: 'Access Developers discussion and problem solving' > > > Subject: Re: [AccessD] Stored Procedure as Rowsource for Chart > > > > > > Thanks Stuart - that was the missing piece. Putting the name of the > > > query in the Rowsource property. > > > > > > Much appreciated. > > > > > > David > > > > > > -----Original Message----- > > > From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On > > > Behalf Of Stuart McLachlan > > > Sent: Thursday, 8 October 2015 1:38 p.m. > > > To: Access Developers discussion and problem solving > > > Subject: Re: [AccessD] Stored Procedure as Rowsource for Chart > > > > > > Don't use a temp query. Used a stored query. > > > > > > Create a Passthrough query as qryChartData which calls your SP with > > > some date. > > > Save that query. > > > Set that query as the row source. > > > > > > Assuming that you open the report from a button click somewhere and > > > you have the desired date available then in your code modify and > > > save the qryDef.SQL of qryChartData before opening the report. > > > > > > > > > > > > On 8 Oct 2015 at 13:24, David Emerson wrote: > > > > > > > Thanks Stuart, I looked at the article but I don't think it quite > > > > fits my problem. > > > > > > > > I already have code to get the results from a passthrough query. > > > > My problem is how and where I can set the Chart rowsource so that > > > > the data from the stored procedure is used. > > > > > > > > Here is the code (simplified) for the passthrough query: > > > > > > > > Public grst1 As DAO.Recordset > > > > > > > > Public Sub basReportPassThroughQuery(strSproc As String) ' Sample > > > > Call (Report and 1 sub report) 'strSproc = "EXEC > > > > dbo.spsrpClientQualitySurvey " & Nz(Me!txtID, 0) 'Call > > > > basReportPassThroughQuery(strSproc) > > > > > > > > Dim strTempQueryName As String, qdefTemp As DAO.QueryDef > > > > > > > > strTempQueryName = "qryTempQuery" > > > > CurrentDb.QueryDefs.Delete strTempQueryName 'In case exists > > > > Set qdefTemp = CurrentDb.CreateQueryDef(strTempQueryName) > > > > qdefTemp.ReturnsRecords = True > > > > qdefTemp.ODBCTimeout = 120 > > > > qdefTemp.Connect = "ODBC;DRIVER=SQL > > > > Server;SERVER=Servername;DATABASE=database;Trusted_Connection=Yes" > > > > > > > > qdefTemp.SQL = strSproc > > > > > > > > Set grst1 = qdefTemp.OpenRecordset > > > > > > > > End Sub > > > > > > > > Now that I have the recordset how do I get the chart to use it? > > > > > > > > Regards > > > > > > > > David > > > > -- > > AccessD mailing list > > AccessD at databaseadvisors.com > > http://databaseadvisors.com/mailman/listinfo/accessd > > Website: http://www.databaseadvisors.com > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > From newsgrps at dalyn.co.nz Fri Oct 16 19:01:09 2015 From: newsgrps at dalyn.co.nz (David Emerson) Date: Sat, 17 Oct 2015 13:01:09 +1300 Subject: [AccessD] Filtering Passthrough Query for Subreport In-Reply-To: References: <001b01d106bf$4ba8d110$e2fa7330$@dalyn.co.nz> <006c01d1070f$b95081e0$2bf185a0$@dalyn.co.nz> <001701d10850$ecd89d80$c689d880$@dalyn.co.nz> Message-ID: <001d01d1086e$ee2b87b0$ca829710$@dalyn.co.nz> All the events I tried came back with this error: Error 2467 message: The expression you entered refers to an object that is closed or doesn't exist. Apparently it is because the sub subreport is created before the subreport. I may need to save the data into a table and run the reports off tables using main and child links. Thanks for the help though. Regards David -----Original Message----- From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Bill Benson Sent: Saturday, 17 October 2015 10:59 a.m. To: Access Developers discussion and problem solving Subject: Re: [AccessD] Filtering Passthrough Query for Subreport I'd be surprised if you could not find an event to suit. On Oct 16, 2015 4:27 PM, "David Emerson" wrote: > I could try this but I don't think it will work because the source > needs to change as the parent record changes - on Open may only fire > up once when it is opened. > > -----Original Message----- > From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf > Of Bill Benson > Sent: Saturday, 17 October 2015 4:12 a.m. > To: Access Developers discussion and problem solving > Subject: Re: [AccessD] Filtering Passthrough Query for Subreport > > I would think you could use the Report Open event to modify the SQL of > the recordsource, whether or not the recordsource is a passthrough. > But I haven't done it, maybe you already tried that. > > On Thu, Oct 15, 2015 at 2:07 AM, David Emerson > wrote: > > > Thanks Bill, but I think you have highlighted my problem - where do > > I update the recordsource so that the correct records are filtered? > > > > My examples below tried to apply the filters in the properties. > > Perhaps I should be trying it in code but I can't find a place where > > it works. I have tried putting this in the Detail_Format event of > > the srpClientDetailClaim subreport but I get an error message (below): > > > > > > > > [Reports]![rptClientDetailHeld].[Report]![srpClientDetailClaim].[Rep > > or t].srp ClientDetailClaimPackage.Report.Requery > > > > Error 2467 message: The expression you entered refers to an object > > that is closed or doesn't exist. > > > > I have put msgbox > > > > [Reports]![rptClientDetailHeld].[Report]![srpClientDetailClaim].[Rep > > or t].srp ClientDetailClaimPackage.Report.Name after the report is > > opened and I get the report name so I know the reference is right > > but not in the right place. > > > > Any further help anyone? > > > > Regards > > > > David > > > > -----Original Message----- > > From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On > > Behalf Of Bill Benson > > Sent: Thursday, 15 October 2015 3:06 p.m. > > To: Access Developers discussion and problem solving > > Subject: Re: [AccessD] Filtering Passthrough Query for Subreport > > > > In general, I set a querydef variable to the base query, assign the > > SQL property to a string, and parse and otherwise manipulate that > > string to re-develop the needed SQL statement to become the > > necessary recordsource. I have not tried (recently) this in respect > > of a pass-through query but I can't think of any immediate reason > > this would > not work. > > > > Naturally if doing this you will want a different temporary query so > > constructed for every report and subreport because otherwise you > > cannot open reports up side by side (ie, if you were to change the > > actual query that might be relied upon by more than one report or > > subreport, then this will confuse Access). > > > > Mileage may vary.... > > > > On Wed, Oct 14, 2015 at 4:31 PM, David Emerson > > > > wrote: > > > > > Hi Listers, > > > > > > Following up from my previous problem, I have another report > > > which displays > > > information for a single client. It has a subreport with several > > records > > > for claims. Each claim may have several packages so there is a > > > subreport in the Claims subreport for packages. > > > > > > Just prior to opening the report I create the passthrough queries > > > and use the client ID to get all package records for the client. > > > The package query is called qryTempQuery4. > > > > > > Then in the Package Subreport recordsource I have put the following: > > > qryTempQuery4. This returns all package records for all claims > > > under each claim record (as would be expected). > > > > > > The query for the package subreport needs to be filtered based on > > > the claim record. I am having problems with determining how I can > > > filter the Package passthrough query with the claim ID for > > > filtering the package > > records. > > > > > > I have tried putting the following in the Package Subreport > > > recordsource property but this doesn't return any records at all: > > > SELECT.* FROM qryTempQuery4 WHERE qryTempQuery4.ClaimID = > > > > > > [reports]![rptClientDetailHeld].[Report]![srpClientDetailClaim].[r > > > ep > > > or > > > t]![tx > > > tClaimID]; > > > > > > I have tried putting qryTempQuery4 in the Package Subreport > > > recordsource property and the following in the Filter property > > > (still no > > records): > > > qryTempQuery4.ClaimID = > > > > > > > > > > [reports]![rptClientDetailHeld].[Report]![srpClientDetailClaim].[rep > > or > > t]![tx > > tClaimID] > > > > > > Any other hints to help me solve this? > > > > > > Regards > > > > > > David Emerson > > > Dalyn Software Ltd > > > Wellington, New Zealand > > > > > > > > > > > > -----Original Message----- > > > From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On > > > Behalf Of David Emerson > > > Sent: Thursday, 8 October 2015 3:27 p.m. > > > To: 'Access Developers discussion and problem solving' > > > Subject: Re: [AccessD] Stored Procedure as Rowsource for Chart > > > > > > Thanks Stuart - that was the missing piece. Putting the name of > > > the query in the Rowsource property. > > > > > > Much appreciated. > > > > > > David > > > > > > -----Original Message----- > > > From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On > > > Behalf Of Stuart McLachlan > > > Sent: Thursday, 8 October 2015 1:38 p.m. > > > To: Access Developers discussion and problem solving > > > Subject: Re: [AccessD] Stored Procedure as Rowsource for Chart > > > > > > Don't use a temp query. Used a stored query. > > > > > > Create a Passthrough query as qryChartData which calls your SP > > > with some date. > > > Save that query. > > > Set that query as the row source. > > > > > > Assuming that you open the report from a button click somewhere > > > and you have the desired date available then in your code modify > > > and save the qryDef.SQL of qryChartData before opening the report. > > > > > > > > > > > > On 8 Oct 2015 at 13:24, David Emerson wrote: > > > > > > > Thanks Stuart, I looked at the article but I don't think it > > > > quite fits my problem. > > > > > > > > I already have code to get the results from a passthrough query. > > > > My problem is how and where I can set the Chart rowsource so > > > > that the data from the stored procedure is used. > > > > > > > > Here is the code (simplified) for the passthrough query: > > > > > > > > Public grst1 As DAO.Recordset > > > > > > > > Public Sub basReportPassThroughQuery(strSproc As String) ' > > > > Sample Call (Report and 1 sub report) 'strSproc = "EXEC > > > > dbo.spsrpClientQualitySurvey " & Nz(Me!txtID, 0) 'Call > > > > basReportPassThroughQuery(strSproc) > > > > > > > > Dim strTempQueryName As String, qdefTemp As DAO.QueryDef > > > > > > > > strTempQueryName = "qryTempQuery" > > > > CurrentDb.QueryDefs.Delete strTempQueryName 'In case exists > > > > Set qdefTemp = CurrentDb.CreateQueryDef(strTempQueryName) > > > > qdefTemp.ReturnsRecords = True > > > > qdefTemp.ODBCTimeout = 120 > > > > qdefTemp.Connect = "ODBC;DRIVER=SQL > > > > Server;SERVER=Servername;DATABASE=database;Trusted_Connection=Yes" > > > > > > > > qdefTemp.SQL = strSproc > > > > > > > > Set grst1 = qdefTemp.OpenRecordset > > > > > > > > End Sub > > > > > > > > Now that I have the recordset how do I get the chart to use it? > > > > > > > > Regards > > > > > > > > David From bensonforums at gmail.com Fri Oct 16 23:49:56 2015 From: bensonforums at gmail.com (Bill Benson) Date: Sat, 17 Oct 2015 00:49:56 -0400 Subject: [AccessD] Filtering Passthrough Query for Subreport In-Reply-To: References: <001b01d106bf$4ba8d110$e2fa7330$@dalyn.co.nz> <006c01d1070f$b95081e0$2bf185a0$@dalyn.co.nz> <001701d10850$ecd89d80$c689d880$@dalyn.co.nz> <001d01d1086e$ee2b87b0$ca829710$@dalyn.co.nz> Message-ID: On Fri, Oct 16, 2015 at 8:51 PM, Bill Benson wrote: > Did you really have a space between the r and the t in report? > > [Reports]![rptClientDetailHeld].[Report]![srpClientDetailClaim].[Repor > t].srp ClientDetailClaimPackage.Report.Requery > On Oct 16, 2015 8:02 PM, "David Emerson" wrote: > >> All the events I tried came back with this error: >> >> Error 2467 message: The expression you entered refers to an object that >> is >> closed or doesn't exist. >> >> Apparently it is because the sub subreport is created before the >> subreport. >> >> I may need to save the data into a table and run the reports off tables >> using main and child links. >> >> Thanks for the help though. >> >> Regards >> > From newsgrps at dalyn.co.nz Sat Oct 17 03:30:40 2015 From: newsgrps at dalyn.co.nz (David Emerson) Date: Sat, 17 Oct 2015 21:30:40 +1300 Subject: [AccessD] Filtering Passthrough Query for Subreport In-Reply-To: References: <001b01d106bf$4ba8d110$e2fa7330$@dalyn.co.nz> <006c01d1070f$b95081e0$2bf185a0$@dalyn.co.nz> <001701d10850$ecd89d80$c689d880$@dalyn.co.nz> <001d01d1086e$ee2b87b0$ca829710$@dalyn.co.nz> Message-ID: <004901d108b6$1ba39330$52eab990$@dalyn.co.nz> No space - just bad word wrapping. -----Original Message----- From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Bill Benson Sent: Saturday, 17 October 2015 5:50 p.m. To: Access Developers discussion and problem solving Subject: Re: [AccessD] Filtering Passthrough Query for Subreport On Fri, Oct 16, 2015 at 8:51 PM, Bill Benson wrote: > Did you really have a space between the r and the t in report? > > [Reports]![rptClientDetailHeld].[Report]![srpClientDetailClaim].[Repor > t].srp ClientDetailClaimPackage.Report.Requery > On Oct 16, 2015 8:02 PM, "David Emerson" wrote: > >> All the events I tried came back with this error: >> >> Error 2467 message: The expression you entered refers to an object >> that is closed or doesn't exist. >> >> Apparently it is because the sub subreport is created before the >> subreport. >> >> I may need to save the data into a table and run the reports off >> tables using main and child links. >> >> Thanks for the help though. >> >> Regards >> > -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From bensonforums at gmail.com Sat Oct 17 06:05:33 2015 From: bensonforums at gmail.com (Bill Benson) Date: Sat, 17 Oct 2015 07:05:33 -0400 Subject: [AccessD] Filtering Passthrough Query for Subreport In-Reply-To: <001b01d106bf$4ba8d110$e2fa7330$@dalyn.co.nz> References: <001b01d106bf$4ba8d110$e2fa7330$@dalyn.co.nz> Message-ID: David, I am going back to the beginning to try to understand better what you are up against here. I think the problem here is that one cannot change the recordsource of a subreport at runtime, the way you can with a subform. A subform has a current event in which you can turn off, adjust, and turn off the source object, change the sql of the sourceobject's underlying object, reset the sourceobject, and requery the control's form property. Reports and subreports don't operate that way. I don't think this has to do with the passthrough aspect. I think you have to redesign this as a client, claims, packages report, and work with grouping and sorting to achieve your objective. On Wed, Oct 14, 2015 at 4:31 PM, David Emerson wrote: > Hi Listers, > > Following up from my previous problem, I have another report which > displays > information for a single client. It has a subreport with several records > for claims. Each claim may have several packages so there is a subreport > in > the Claims subreport for packages. > > Just prior to opening the report I create the passthrough queries and use > the client ID to get all package records for the client. The package query > is called qryTempQuery4. > > Then in the Package Subreport recordsource I have put the following: > qryTempQuery4. This returns all package records for all claims under each > claim record (as would be expected). > > The query for the package subreport needs to be filtered based on the claim > record. I am having problems with determining how I can filter the Package > passthrough query with the claim ID for filtering the package records. > > I have tried putting the following in the Package Subreport recordsource > property but this doesn't return any records at all: > SELECT.* FROM qryTempQuery4 WHERE qryTempQuery4.ClaimID = > > [reports]![rptClientDetailHeld].[Report]![srpClientDetailClaim].[report]![tx > tClaimID]; > > I have tried putting qryTempQuery4 in the Package Subreport recordsource > property and the following in the Filter property (still no records): > qryTempQuery4.ClaimID = > > [reports]![rptClientDetailHeld].[Report]![srpClientDetailClaim].[report]![tx > tClaimID] > > Any other hints to help me solve this? > > Regards > > David Emerson > Dalyn Software Ltd > Wellington, New Zealand > > > From jimdettman at verizon.net Sat Oct 17 07:33:22 2015 From: jimdettman at verizon.net (Jim Dettman) Date: Sat, 17 Oct 2015 08:33:22 -0400 Subject: [AccessD] Filtering Passthrough Query for Subreport In-Reply-To: <001d01d1086e$ee2b87b0$ca829710$@dalyn.co.nz> References: <001b01d106bf$4ba8d110$e2fa7330$@dalyn.co.nz> <006c01d1070f$b95081e0$2bf185a0$@dalyn.co.nz> <001701d10850$ecd89d80$c689d880$@dalyn.co.nz> <001d01d1086e$ee2b87b0$ca829710$@dalyn.co.nz> Message-ID: <76B1B8D4D7844911B4CFC265F6BD8EEB@XPS> David, Unless I'm missing something, it's sounds like your trying to over think this. Simply set the sub reports record source to the base query, then set the master/child links as appropriate. The sub reports will requery as the main report record changes. Jim. -----Original Message----- From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of David Emerson Sent: Friday, October 16, 2015 08:01 PM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Filtering Passthrough Query for Subreport All the events I tried came back with this error: Error 2467 message: The expression you entered refers to an object that is closed or doesn't exist. Apparently it is because the sub subreport is created before the subreport. I may need to save the data into a table and run the reports off tables using main and child links. Thanks for the help though. Regards David -----Original Message----- From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Bill Benson Sent: Saturday, 17 October 2015 10:59 a.m. To: Access Developers discussion and problem solving Subject: Re: [AccessD] Filtering Passthrough Query for Subreport I'd be surprised if you could not find an event to suit. On Oct 16, 2015 4:27 PM, "David Emerson" wrote: > I could try this but I don't think it will work because the source > needs to change as the parent record changes - on Open may only fire > up once when it is opened. > > -----Original Message----- > From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf > Of Bill Benson > Sent: Saturday, 17 October 2015 4:12 a.m. > To: Access Developers discussion and problem solving > Subject: Re: [AccessD] Filtering Passthrough Query for Subreport > > I would think you could use the Report Open event to modify the SQL of > the recordsource, whether or not the recordsource is a passthrough. > But I haven't done it, maybe you already tried that. > > On Thu, Oct 15, 2015 at 2:07 AM, David Emerson > wrote: > > > Thanks Bill, but I think you have highlighted my problem - where do > > I update the recordsource so that the correct records are filtered? > > > > My examples below tried to apply the filters in the properties. > > Perhaps I should be trying it in code but I can't find a place where > > it works. I have tried putting this in the Detail_Format event of > > the srpClientDetailClaim subreport but I get an error message (below): > > > > > > > > [Reports]![rptClientDetailHeld].[Report]![srpClientDetailClaim].[Rep > > or t].srp ClientDetailClaimPackage.Report.Requery > > > > Error 2467 message: The expression you entered refers to an object > > that is closed or doesn't exist. > > > > I have put msgbox > > > > [Reports]![rptClientDetailHeld].[Report]![srpClientDetailClaim].[Rep > > or t].srp ClientDetailClaimPackage.Report.Name after the report is > > opened and I get the report name so I know the reference is right > > but not in the right place. > > > > Any further help anyone? > > > > Regards > > > > David > > > > -----Original Message----- > > From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On > > Behalf Of Bill Benson > > Sent: Thursday, 15 October 2015 3:06 p.m. > > To: Access Developers discussion and problem solving > > Subject: Re: [AccessD] Filtering Passthrough Query for Subreport > > > > In general, I set a querydef variable to the base query, assign the > > SQL property to a string, and parse and otherwise manipulate that > > string to re-develop the needed SQL statement to become the > > necessary recordsource. I have not tried (recently) this in respect > > of a pass-through query but I can't think of any immediate reason > > this would > not work. > > > > Naturally if doing this you will want a different temporary query so > > constructed for every report and subreport because otherwise you > > cannot open reports up side by side (ie, if you were to change the > > actual query that might be relied upon by more than one report or > > subreport, then this will confuse Access). > > > > Mileage may vary.... > > > > On Wed, Oct 14, 2015 at 4:31 PM, David Emerson > > > > wrote: > > > > > Hi Listers, > > > > > > Following up from my previous problem, I have another report > > > which displays > > > information for a single client. It has a subreport with several > > records > > > for claims. Each claim may have several packages so there is a > > > subreport in the Claims subreport for packages. > > > > > > Just prior to opening the report I create the passthrough queries > > > and use the client ID to get all package records for the client. > > > The package query is called qryTempQuery4. > > > > > > Then in the Package Subreport recordsource I have put the following: > > > qryTempQuery4. This returns all package records for all claims > > > under each claim record (as would be expected). > > > > > > The query for the package subreport needs to be filtered based on > > > the claim record. I am having problems with determining how I can > > > filter the Package passthrough query with the claim ID for > > > filtering the package > > records. > > > > > > I have tried putting the following in the Package Subreport > > > recordsource property but this doesn't return any records at all: > > > SELECT.* FROM qryTempQuery4 WHERE qryTempQuery4.ClaimID = > > > > > > [reports]![rptClientDetailHeld].[Report]![srpClientDetailClaim].[r > > > ep > > > or > > > t]![tx > > > tClaimID]; > > > > > > I have tried putting qryTempQuery4 in the Package Subreport > > > recordsource property and the following in the Filter property > > > (still no > > records): > > > qryTempQuery4.ClaimID = > > > > > > > > > > [reports]![rptClientDetailHeld].[Report]![srpClientDetailClaim].[rep > > or > > t]![tx > > tClaimID] > > > > > > Any other hints to help me solve this? > > > > > > Regards > > > > > > David Emerson > > > Dalyn Software Ltd > > > Wellington, New Zealand > > > > > > > > > > > > -----Original Message----- > > > From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On > > > Behalf Of David Emerson > > > Sent: Thursday, 8 October 2015 3:27 p.m. > > > To: 'Access Developers discussion and problem solving' > > > Subject: Re: [AccessD] Stored Procedure as Rowsource for Chart > > > > > > Thanks Stuart - that was the missing piece. Putting the name of > > > the query in the Rowsource property. > > > > > > Much appreciated. > > > > > > David > > > > > > -----Original Message----- > > > From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On > > > Behalf Of Stuart McLachlan > > > Sent: Thursday, 8 October 2015 1:38 p.m. > > > To: Access Developers discussion and problem solving > > > Subject: Re: [AccessD] Stored Procedure as Rowsource for Chart > > > > > > Don't use a temp query. Used a stored query. > > > > > > Create a Passthrough query as qryChartData which calls your SP > > > with some date. > > > Save that query. > > > Set that query as the row source. > > > > > > Assuming that you open the report from a button click somewhere > > > and you have the desired date available then in your code modify > > > and save the qryDef.SQL of qryChartData before opening the report. > > > > > > > > > > > > On 8 Oct 2015 at 13:24, David Emerson wrote: > > > > > > > Thanks Stuart, I looked at the article but I don't think it > > > > quite fits my problem. > > > > > > > > I already have code to get the results from a passthrough query. > > > > My problem is how and where I can set the Chart rowsource so > > > > that the data from the stored procedure is used. > > > > > > > > Here is the code (simplified) for the passthrough query: > > > > > > > > Public grst1 As DAO.Recordset > > > > > > > > Public Sub basReportPassThroughQuery(strSproc As String) ' > > > > Sample Call (Report and 1 sub report) 'strSproc = "EXEC > > > > dbo.spsrpClientQualitySurvey " & Nz(Me!txtID, 0) 'Call > > > > basReportPassThroughQuery(strSproc) > > > > > > > > Dim strTempQueryName As String, qdefTemp As DAO.QueryDef > > > > > > > > strTempQueryName = "qryTempQuery" > > > > CurrentDb.QueryDefs.Delete strTempQueryName 'In case exists > > > > Set qdefTemp = CurrentDb.CreateQueryDef(strTempQueryName) > > > > qdefTemp.ReturnsRecords = True > > > > qdefTemp.ODBCTimeout = 120 > > > > qdefTemp.Connect = "ODBC;DRIVER=SQL > > > > Server;SERVER=Servername;DATABASE=database;Trusted_Connection=Yes" > > > > > > > > qdefTemp.SQL = strSproc > > > > > > > > Set grst1 = qdefTemp.OpenRecordset > > > > > > > > End Sub > > > > > > > > Now that I have the recordset how do I get the chart to use it? > > > > > > > > Regards > > > > > > > > David -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From newsgrps at dalyn.co.nz Sat Oct 17 20:17:42 2015 From: newsgrps at dalyn.co.nz (David Emerson) Date: Sun, 18 Oct 2015 14:17:42 +1300 Subject: [AccessD] Filtering Passthrough Query for Subreport In-Reply-To: <76B1B8D4D7844911B4CFC265F6BD8EEB@XPS> References: <001b01d106bf$4ba8d110$e2fa7330$@dalyn.co.nz> <006c01d1070f$b95081e0$2bf185a0$@dalyn.co.nz> <001701d10850$ecd89d80$c689d880$@dalyn.co.nz> <001d01d1086e$ee2b87b0$ca829710$@dalyn.co.nz> <76B1B8D4D7844911B4CFC265F6BD8EEB@XPS> Message-ID: <001b01d10942$c9e73780$5db5a680$@dalyn.co.nz> Taking up Bill and Jim's excellent advice I am going back to basics and have started afresh. Here is where I am at: I have a report which displays information for a single client. It has a subreport with several records for claims. Each claim may have several packages so there is a subreport in the Claims subreport for packages. Just prior to opening the report I create the passthrough queries and use the client ID to get all claim, and package records for the client. The Claim query is called qryTempQuery3. It returns all claims for the client and includes a field called ClaimID. The package query is called qryTempQuery4. It returns all packages for all claims and included a field called ClaimIDNo which links packages to the claim record. I have checked the results of these queries and the records are showing correctly. In the Claims Subreport I have made the Recordsource qryTempQuery3. In the Packages Subreport (which is a subreport in the Claims subreport) I have made the Recordsource qryTempQuery4. In the Claim Subreport object I have set the Link Master Fields property to ClaimID, and the Link Child Fields property to ClaimIDNo When I run the report for a client I get the Claims subreport repeating for every claim but I do not get any records showing for the packages. If I remove the Link Master Field and Link Child Field properties then the reports run and all the package records appear under each claim. If I had any hair left I would be tearing it out by now. Regards David -----Original Message----- From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Jim Dettman Sent: Sunday, 18 October 2015 1:33 a.m. To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Filtering Passthrough Query for Subreport David, Unless I'm missing something, it's sounds like your trying to over think this. Simply set the sub reports record source to the base query, then set the master/child links as appropriate. The sub reports will requery as the main report record changes. Jim. From newsgrps at dalyn.co.nz Sun Oct 18 12:49:01 2015 From: newsgrps at dalyn.co.nz (David Emerson) Date: Mon, 19 Oct 2015 06:49:01 +1300 Subject: [AccessD] Filtering Passthrough Query for Subreport In-Reply-To: References: <001b01d106bf$4ba8d110$e2fa7330$@dalyn.co.nz> Message-ID: <002a01d109cd$463725e0$d2a571a0$@dalyn.co.nz> Hi Bill, I even tried saving the data as tables and using them as the source of the sub reports but couldn't get them to work (not sure why because I have not had problems will Access tables and queries. In the end I combined the two subreports into one query and used grouping to achieve the same result. Pity I couldn't nut this one out but at least I have a working solution. Thanks for your efforts. Regards David -----Original Message----- From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Bill Benson Sent: Sunday, 18 October 2015 12:06 a.m. To: Access Developers discussion and problem solving Subject: Re: [AccessD] Filtering Passthrough Query for Subreport David, I am going back to the beginning to try to understand better what you are up against here. I think the problem here is that one cannot change the recordsource of a subreport at runtime, the way you can with a subform. A subform has a current event in which you can turn off, adjust, and turn off the source object, change the sql of the sourceobject's underlying object, reset the sourceobject, and requery the control's form property. Reports and subreports don't operate that way. I don't think this has to do with the passthrough aspect. I think you have to redesign this as a client, claims, packages report, and work with grouping and sorting to achieve your objective. On Wed, Oct 14, 2015 at 4:31 PM, David Emerson wrote: > Hi Listers, > > Following up from my previous problem, I have another report which > displays > information for a single client. It has a subreport with several records > for claims. Each claim may have several packages so there is a > subreport in the Claims subreport for packages. > > Just prior to opening the report I create the passthrough queries and > use the client ID to get all package records for the client. The > package query is called qryTempQuery4. > > Then in the Package Subreport recordsource I have put the following: > qryTempQuery4. This returns all package records for all claims under > each claim record (as would be expected). > > The query for the package subreport needs to be filtered based on the > claim record. I am having problems with determining how I can filter > the Package passthrough query with the claim ID for filtering the package records. > > I have tried putting the following in the Package Subreport > recordsource property but this doesn't return any records at all: > SELECT.* FROM qryTempQuery4 WHERE qryTempQuery4.ClaimID = > > [reports]![rptClientDetailHeld].[Report]![srpClientDetailClaim].[repor > t]![tx > tClaimID]; > > I have tried putting qryTempQuery4 in the Package Subreport > recordsource property and the following in the Filter property (still no records): > qryTempQuery4.ClaimID = > > [reports]![rptClientDetailHeld].[Report]![srpClientDetailClaim].[repor > t]![tx > tClaimID] > > Any other hints to help me solve this? > > Regards > > David Emerson > Dalyn Software Ltd > Wellington, New Zealand Website: http://www.databaseadvisors.com From bensonforums at gmail.com Sun Oct 18 16:41:28 2015 From: bensonforums at gmail.com (Bill Benson) Date: Sun, 18 Oct 2015 17:41:28 -0400 Subject: [AccessD] Filtering Passthrough Query for Subreport In-Reply-To: <002a01d109cd$463725e0$d2a571a0$@dalyn.co.nz> References: <001b01d106bf$4ba8d110$e2fa7330$@dalyn.co.nz> <002a01d109cd$463725e0$d2a571a0$@dalyn.co.nz> Message-ID: I suspect that its due to the impossibility of changing a record source for subports at runtime. You were bound to have to resort to grouping. Good to have a solution! On Oct 18, 2015 1:50 PM, "David Emerson" wrote: > Hi Bill, > > I even tried saving the data as tables and using them as the source of the > sub reports but couldn't get them to work (not sure why because I have not > had problems will Access tables and queries. In the end I combined the two > subreports into one query and used grouping to achieve the same result. > > Pity I couldn't nut this one out but at least I have a working solution. > > Thanks for your efforts. > > Regards > > David > > -----Original Message----- > From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of > Bill Benson > Sent: Sunday, 18 October 2015 12:06 a.m. > To: Access Developers discussion and problem solving > Subject: Re: [AccessD] Filtering Passthrough Query for Subreport > > David, I am going back to the beginning to try to understand better what > you > are up against here. I think the problem here is that one cannot change the > recordsource of a subreport at runtime, the way you can with a subform. > A subform has a current event in which you can turn off, adjust, and turn > off the source object, change the sql of the sourceobject's underlying > object, reset the sourceobject, and requery the control's form property. > Reports and subreports don't operate that way. > > I don't think this has to do with the passthrough aspect. > > I think you have to redesign this as a client, claims, packages report, and > work with grouping and sorting to achieve your objective. > > > > On Wed, Oct 14, 2015 at 4:31 PM, David Emerson > wrote: > > > Hi Listers, > > > > Following up from my previous problem, I have another report which > > displays > > information for a single client. It has a subreport with several > records > > for claims. Each claim may have several packages so there is a > > subreport in the Claims subreport for packages. > > > > Just prior to opening the report I create the passthrough queries and > > use the client ID to get all package records for the client. The > > package query is called qryTempQuery4. > > > > Then in the Package Subreport recordsource I have put the following: > > qryTempQuery4. This returns all package records for all claims under > > each claim record (as would be expected). > > > > The query for the package subreport needs to be filtered based on the > > claim record. I am having problems with determining how I can filter > > the Package passthrough query with the claim ID for filtering the package > records. > > > > I have tried putting the following in the Package Subreport > > recordsource property but this doesn't return any records at all: > > SELECT.* FROM qryTempQuery4 WHERE qryTempQuery4.ClaimID = > > > > [reports]![rptClientDetailHeld].[Report]![srpClientDetailClaim].[repor > > t]![tx > > tClaimID]; > > > > I have tried putting qryTempQuery4 in the Package Subreport > > recordsource property and the following in the Filter property (still no > records): > > qryTempQuery4.ClaimID = > > > > [reports]![rptClientDetailHeld].[Report]![srpClientDetailClaim].[repor > > t]![tx > > tClaimID] > > > > Any other hints to help me solve this? > > > > Regards > > > > David Emerson > > Dalyn Software Ltd > > Wellington, New Zealand > Website: http://www.databaseadvisors.com > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > From fuller.artful at gmail.com Mon Oct 19 08:36:22 2015 From: fuller.artful at gmail.com (Arthur Fuller) Date: Mon, 19 Oct 2015 09:36:22 -0400 Subject: [AccessD] Open Access as Administrator Message-ID: I'm trying to install an add-in and am being told that I must be an administrator. How do I open Access as Administrator? -- Arthur From RRANTHON at sentara.com Mon Oct 19 08:41:13 2015 From: RRANTHON at sentara.com (RANDALL R ANTHONY) Date: Mon, 19 Oct 2015 13:41:13 +0000 Subject: [AccessD] Open Access as Administrator In-Reply-To: References: Message-ID: Should be able to right click the icon/.exe and select Run As Administrator. -----Original Message----- From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Arthur Fuller Sent: Monday, October 19, 2015 9:36 AM To: Access Developers discussion and problem solving Subject: [AccessD] Open Access as Administrator I'm trying to install an add-in and am being told that I must be an administrator. How do I open Access as Administrator? -- Arthur -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From jamesbutton at blueyonder.co.uk Mon Oct 19 08:45:55 2015 From: jamesbutton at blueyonder.co.uk (James Button) Date: Mon, 19 Oct 2015 14:45:55 +0100 Subject: [AccessD] Open Access as Administrator In-Reply-To: References: Message-ID: Right-click and look for run as administrator Or maybe a shortcut with appropriate authority JimB -----Original Message----- From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Arthur Fuller Sent: Monday, October 19, 2015 2:36 PM To: Access Developers discussion and problem solving Subject: [AccessD] Open Access as Administrator I'm trying to install an add-in and am being told that I must be an administrator. How do I open Access as Administrator? -- Arthur -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From Salato at ky.gov Sat Oct 24 09:48:12 2015 From: Salato at ky.gov (FW Salato Center) Date: Sat, 24 Oct 2015 14:48:12 +0000 Subject: [AccessD] Looking for easy form solution Message-ID: Here's the setup - I apologize if I'm giving more information than you guys really need. I have a table of individual animals. I have a lookup table of species. Each animal is identified by a species. I also have tables for medical records and vaccines, which relate to the individual animals. Updating medical records and vaccinations for individual animals is easy and already in place. I spent a full week going through paper records and inputting records for the last several years. However, we do have several multi-animal exhibits where the most efficient input solution for the vet and animal care staff is to pull up a herd or flock option that initially selects all of that species and lets them make the medical or vaccine update for all. Rarely will they need to update an individual - but that will happen in the case of specific illness or injury. So, in the case of flocks and herds, we need a multiple-selection action type form. That form needs to be flexible enough that we can deselect individual animals because on rare occasionally, one or two of the herd or flock will not be part of the procedure. I need a form that displays all the animals of the same species - not difficult. I can do that. I want a select/deselect control that lets the user remove an animal from the group. Not sure about that one. After deselecting any individual as necessary, the user can then input the necessary medical or vaccine information - probably via a subform - and click OK to commit. I already have the forms that we're using to update these records for individuals. I'm wondering if I could use it as a subform in the multi-select main form? I'm not sure if this is something that the main/sub form arrangement can handle or if I'll need to create a Recordset object to update the underlying tables. I'm seriously overthinking it because every time I start in with a solution, I change my mind. I could use a little strategic discussion on the best way to accomplish this. I prefer the easiest route and I can't help but think this should be simpler than I'm making it. Thanks in advance. Susan H. From rockysmolin at bchacc.com Sat Oct 24 09:53:06 2015 From: rockysmolin at bchacc.com (Rocky Smolin) Date: Sat, 24 Oct 2015 07:53:06 -0700 Subject: [AccessD] Looking for easy form solution In-Reply-To: References: Message-ID: <5D5D7AF07B8D41A7A2C74DF5F93C317A@HAL9007> How's this? Add a "deselect" flag to the animal record - default False. On the form where all the animals are displayed a toggle Show Deselected/Don't Show Deselected. Then Don't Show is selected, add a filter to the form to filter out the deselected animals. Any possibilities there? r -----Original Message----- From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of FW Salato Center Sent: Saturday, October 24, 2015 7:48 AM To: Access Developers discussion and problem solving Subject: [AccessD] Looking for easy form solution Here's the setup - I apologize if I'm giving more information than you guys really need. I have a table of individual animals. I have a lookup table of species. Each animal is identified by a species. I also have tables for medical records and vaccines, which relate to the individual animals. Updating medical records and vaccinations for individual animals is easy and already in place. I spent a full week going through paper records and inputting records for the last several years. However, we do have several multi-animal exhibits where the most efficient input solution for the vet and animal care staff is to pull up a herd or flock option that initially selects all of that species and lets them make the medical or vaccine update for all. Rarely will they need to update an individual - but that will happen in the case of specific illness or injury. So, in the case of flocks and herds, we need a multiple-selection action type form. That form needs to be flexible enough that we can deselect individual animals because on rare occasionally, one or two of the herd or flock will not be part of the procedure. I need a form that displays all the animals of the same species - not difficult. I can do that. I want a select/deselect control that lets the user remove an animal from the group. Not sure about that one. After deselecting any individual as necessary, the user can then input the necessary medical or vaccine information - probably via a subform - and click OK to commit. I already have the forms that we're using to update these records for individuals. I'm wondering if I could use it as a subform in the multi-select main form? I'm not sure if this is something that the main/sub form arrangement can handle or if I'll need to create a Recordset object to update the underlying tables. I'm seriously overthinking it because every time I start in with a solution, I change my mind. I could use a little strategic discussion on the best way to accomplish this. I prefer the easiest route and I can't help but think this should be simpler than I'm making it. Thanks in advance. Susan H. -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com --- This email has been checked for viruses by Avast antivirus software. https://www.avast.com/antivirus From rockysmolin at bchacc.com Sat Oct 24 09:56:08 2015 From: rockysmolin at bchacc.com (Rocky Smolin) Date: Sat, 24 Oct 2015 07:56:08 -0700 Subject: [AccessD] Looking for easy form solution In-Reply-To: <5D5D7AF07B8D41A7A2C74DF5F93C317A@HAL9007> References: <5D5D7AF07B8D41A7A2C74DF5F93C317A@HAL9007> Message-ID: <361F9FB810434F26BDA382610E7D2231@HAL9007> Forgot - o the form where the individuals are displayed you also need a checkbox bound to the deselect flag. :) r -----Original Message----- From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Rocky Smolin Sent: Saturday, October 24, 2015 7:53 AM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Looking for easy form solution How's this? Add a "deselect" flag to the animal record - default False. On the form where all the animals are displayed a toggle Show Deselected/Don't Show Deselected. Then Don't Show is selected, add a filter to the form to filter out the deselected animals. Any possibilities there? r -----Original Message----- From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of FW Salato Center Sent: Saturday, October 24, 2015 7:48 AM To: Access Developers discussion and problem solving Subject: [AccessD] Looking for easy form solution Here's the setup - I apologize if I'm giving more information than you guys really need. I have a table of individual animals. I have a lookup table of species. Each animal is identified by a species. I also have tables for medical records and vaccines, which relate to the individual animals. Updating medical records and vaccinations for individual animals is easy and already in place. I spent a full week going through paper records and inputting records for the last several years. However, we do have several multi-animal exhibits where the most efficient input solution for the vet and animal care staff is to pull up a herd or flock option that initially selects all of that species and lets them make the medical or vaccine update for all. Rarely will they need to update an individual - but that will happen in the case of specific illness or injury. So, in the case of flocks and herds, we need a multiple-selection action type form. That form needs to be flexible enough that we can deselect individual animals because on rare occasionally, one or two of the herd or flock will not be part of the procedure. I need a form that displays all the animals of the same species - not difficult. I can do that. I want a select/deselect control that lets the user remove an animal from the group. Not sure about that one. After deselecting any individual as necessary, the user can then input the necessary medical or vaccine information - probably via a subform - and click OK to commit. I already have the forms that we're using to update these records for individuals. I'm wondering if I could use it as a subform in the multi-select main form? I'm not sure if this is something that the main/sub form arrangement can handle or if I'll need to create a Recordset object to update the underlying tables. I'm seriously overthinking it because every time I start in with a solution, I change my mind. I could use a little strategic discussion on the best way to accomplish this. I prefer the easiest route and I can't help but think this should be simpler than I'm making it. Thanks in advance. Susan H. -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com --- This email has been checked for viruses by Avast antivirus software. https://www.avast.com/antivirus -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com --- This email has been checked for viruses by Avast antivirus software. https://www.avast.com/antivirus From Salato at ky.gov Sat Oct 24 10:06:40 2015 From: Salato at ky.gov (FW Salato Center) Date: Sat, 24 Oct 2015 15:06:40 +0000 Subject: [AccessD] Looking for easy form solution In-Reply-To: <5D5D7AF07B8D41A7A2C74DF5F93C317A@HAL9007> References: <5D5D7AF07B8D41A7A2C74DF5F93C317A@HAL9007> Message-ID: Rocky, I considered adding the Yes/No field to the individual table, but it's only use would be for updating the flock/herd stock. It certainly would be easier than anything else I've come up with. I put it aside because it kind of breaks normalization rules, but the truth is, I break them when doing so suits me, so I see no reason not to take this easier route. I did explore alternatives, but I keep coming back to this. I hadn't considered refiltering the form based on the select/deselect field -- but visually, I suppose it might make the user feel better. I would be using the field to update or not update. Do you guys thing requerying for visual impact is important to the user -- it might be. Susan H. How's this? Add a "deselect" flag to the animal record - default False. On the form where all the animals are displayed a toggle Show Deselected/Don't Show Deselected. Then Don't Show is selected, add a filter to the form to filter out the deselected animals. Any possibilities there? r From Salato at ky.gov Sat Oct 24 10:07:33 2015 From: Salato at ky.gov (FW Salato Center) Date: Sat, 24 Oct 2015 15:07:33 +0000 Subject: [AccessD] Looking for easy form solution In-Reply-To: <361F9FB810434F26BDA382610E7D2231@HAL9007> References: <5D5D7AF07B8D41A7A2C74DF5F93C317A@HAL9007> <361F9FB810434F26BDA382610E7D2231@HAL9007> Message-ID: Yeah, I know that. :) Thanks for discussing this with me. Susan H. Forgot - o the form where the individuals are displayed you also need a checkbox bound to the deselect flag. :) r From rockysmolin at bchacc.com Sat Oct 24 10:16:10 2015 From: rockysmolin at bchacc.com (Rocky Smolin) Date: Sat, 24 Oct 2015 08:16:10 -0700 Subject: [AccessD] Looking for easy form solution In-Reply-To: References: <5D5D7AF07B8D41A7A2C74DF5F93C317A@HAL9007> Message-ID: You won't have to requery. When you set the filter in code it does a requery. r -----Original Message----- From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of FW Salato Center Sent: Saturday, October 24, 2015 8:07 AM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Looking for easy form solution Rocky, I considered adding the Yes/No field to the individual table, but it's only use would be for updating the flock/herd stock. It certainly would be easier than anything else I've come up with. I put it aside because it kind of breaks normalization rules, but the truth is, I break them when doing so suits me, so I see no reason not to take this easier route. I did explore alternatives, but I keep coming back to this. I hadn't considered refiltering the form based on the select/deselect field -- but visually, I suppose it might make the user feel better. I would be using the field to update or not update. Do you guys thing requerying for visual impact is important to the user -- it might be. Susan H. How's this? Add a "deselect" flag to the animal record - default False. On the form where all the animals are displayed a toggle Show Deselected/Don't Show Deselected. Then Don't Show is selected, add a filter to the form to filter out the deselected animals. Any possibilities there? r -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com --- This email has been checked for viruses by Avast antivirus software. https://www.avast.com/antivirus From bensonforums at gmail.com Sat Oct 24 10:56:56 2015 From: bensonforums at gmail.com (Bill Benson) Date: Sat, 24 Oct 2015 11:56:56 -0400 Subject: [AccessD] Looking for easy form solution In-Reply-To: References: Message-ID: Do Flocks and Herds vis a vis their individual animal constituents act like parent and children in the sense that a parent has many children but the children will only ever have one parent (you know what I mean, all Access children are raised by single parents). On Sat, Oct 24, 2015 at 10:48 AM, FW Salato Center wrote: > Here's the setup - I apologize if I'm giving more information than you > guys really need. > > I have a table of individual animals. I have a lookup table of species. > Each animal is identified by a species. I also have tables for medical > records and vaccines, which relate to the individual animals. > Updating medical records and vaccinations for individual animals is easy > and already in place. I spent a full week going through paper records and > inputting records for the last several years. > > However, we do have several multi-animal exhibits where the most efficient > input solution for the vet and animal care staff is to pull up a herd or > flock option that initially selects all of that species and lets them make > the medical or vaccine update for all. Rarely will they need to update an > individual - but that will happen in the case of specific illness or > injury. So, in the case of flocks and herds, we need a multiple-selection > action type form. That form needs to be flexible enough that we can > deselect individual animals because on rare occasionally, one or two of the > herd or flock will not be part of the procedure. > > I need a form that displays all the animals of the same species - not > difficult. I can do that. > I want a select/deselect control that lets the user remove an animal from > the group. Not sure about that one. > After deselecting any individual as necessary, the user can then input the > necessary medical or vaccine information - probably via a subform - and > click OK to commit. I already have the forms that we're using to update > these records for individuals. I'm wondering if I could use it as a subform > in the multi-select main form? I'm not sure if this is something that the > main/sub form arrangement can handle or if I'll need to create a Recordset > object to update the underlying tables. > > I'm seriously overthinking it because every time I start in with a > solution, I change my mind. I could use a little strategic discussion on > the best way to accomplish this. I prefer the easiest route and I can't > help but think this should be simpler than I'm making it. > > Thanks in advance. > > Susan H. > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > From Salato at ky.gov Sat Oct 24 11:37:27 2015 From: Salato at ky.gov (FW Salato Center) Date: Sat, 24 Oct 2015 16:37:27 +0000 Subject: [AccessD] Looking for easy form solution In-Reply-To: References: Message-ID: The use of flocks and herds is strictly livestock terminology for the discussion. They're all individuals. However, when a species is all housed together in the same exhibit, such as the deer, bison, elk, box turtles, quail, turkey... most procedures will be performed on all at the same time. For instance, the vet might collect a single fecal sample for testing -- no way to tell which deer it's from, and They're still all individuals and a parent, not a child to the flock or herd. But, I'm not sure I understood your question, so maybe I didn't answer it either. :) However, I have considered breaking the rules a bit where the quail are concerned. Right not they're not banded and we probably won't do so. The problem with some animals -- like the quail -- they are too timid for the banding process. It will cause them more stress than it's worth to track them. However, we do want to keep some kind of info on them, even if it's just to say, "Removed two dead; added two females, current stock is now 14" or "One female appears in poor health; will keep an eye on her and remove if no improvement" in a comments field. So, I am considering adding the term flock as a name, ided by species and then updating the entire flock that way, since we won't be iding them as individuals. It's not exactly "right" but would work because in this case, we would never be tracking a treatment to an individual because we can't id them as individuals to track! :) Susan h. Do Flocks and Herds vis a vis their individual animal constituents act like parent and children in the sense that a parent has many children but the children will only ever have one parent (you know what I mean, all Access children are raised by single parents). From Salato at ky.gov Sat Oct 24 11:59:41 2015 From: Salato at ky.gov (FW Salato Center) Date: Sat, 24 Oct 2015 16:59:41 +0000 Subject: [AccessD] Looking for easy form solution In-Reply-To: References: Message-ID: I really botched that up -- the phone rang and I forgot where I was -- sorry. What I was trying to say in the first paragraph regarding terminology... For instance, the vet might collect a single fecal sample for testing -- no way to tell which deer it's from. All testing and results are applied to all the stock. If she finds worms, they're all treated. However, an individual might sustain an injury and need treatment or surgery. They're all still individuals. Susan H. The use of flocks and herds is strictly livestock terminology for the discussion. They're all individuals. However, when a species is all housed together in the same exhibit, such as the deer, bison, elk, box turtles, quail, turkey... most procedures will be performed on all at the same time. For instance, the vet might collect a single fecal sample for testing -- no way to tell which deer it's from, and They're still all individuals and a parent, not a child to the flock or herd. But, I'm not sure I understood your question, so maybe I didn't answer it either. :) However, I have considered breaking the rules a bit where the quail are concerned. Right not they're not banded and we probably won't do so. The problem with some animals -- like the quail -- they are too timid for the banding process. It will cause them more stress than it's worth to track them. However, we do want to keep some kind of info on them, even if it's just to say, "Removed two dead; added two females, current stock is now 14" or "One female appears in poor health; will keep an eye on her and remove if no improvement" in a comments field. So, I am considering adding the term flock as a name, ided by species and then updating the entire flock that way, since we won't be iding them as individuals. It's not exactly "right" but would work because in this case, we would never be tracking a treatment to an individual because we can't id them as individuals to track! :) Susan h. Do Flocks and Herds vis a vis their individual animal constituents act like parent and children in the sense that a parent has many children but the children will only ever have one parent (you know what I mean, all Access children are raised by single parents). -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From Salato at ky.gov Sat Oct 24 12:03:04 2015 From: Salato at ky.gov (FW Salato Center) Date: Sat, 24 Oct 2015 17:03:04 +0000 Subject: [AccessD] Looking for easy form solution In-Reply-To: <361F9FB810434F26BDA382610E7D2231@HAL9007> References: <5D5D7AF07B8D41A7A2C74DF5F93C317A@HAL9007> <361F9FB810434F26BDA382610E7D2231@HAL9007> Message-ID: You know, if you don't work with Access frequently, you forgot a lot -- at least I have. I added a Yes/No field to the Individual table and left the default value blank. I don't want to set it to Yes by default, it just seems dangerous since I won't be using it any other way. So, in the form, I set the control's Default Value to -1. Didn't work -- when the form opens, the Select Yes/No field is still not selected. I tried code when opening the form -- still not setting the field to Yes. It's a Datasheet form. This should be simple. It's based on a query, but for no other reason than good form -- it isn't a multi-table query. Susan H. Forgot - o the form where the individuals are displayed you also need a checkbox bound to the deselect flag. :) From rockysmolin at bchacc.com Sat Oct 24 12:14:43 2015 From: rockysmolin at bchacc.com (Rocky Smolin) Date: Sat, 24 Oct 2015 10:14:43 -0700 Subject: [AccessD] Looking for easy form solution In-Reply-To: References: Message-ID: <86FD17354A184A5081F8842A7E789027@HAL9007> How do you identify individuals? Are they tagged? r -----Original Message----- From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of FW Salato Center Sent: Saturday, October 24, 2015 10:00 AM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Looking for easy form solution I really botched that up -- the phone rang and I forgot where I was -- sorry. What I was trying to say in the first paragraph regarding terminology... For instance, the vet might collect a single fecal sample for testing -- no way to tell which deer it's from. All testing and results are applied to all the stock. If she finds worms, they're all treated. However, an individual might sustain an injury and need treatment or surgery. They're all still individuals. Susan H. The use of flocks and herds is strictly livestock terminology for the discussion. They're all individuals. However, when a species is all housed together in the same exhibit, such as the deer, bison, elk, box turtles, quail, turkey... most procedures will be performed on all at the same time. For instance, the vet might collect a single fecal sample for testing -- no way to tell which deer it's from, and They're still all individuals and a parent, not a child to the flock or herd. But, I'm not sure I understood your question, so maybe I didn't answer it either. :) However, I have considered breaking the rules a bit where the quail are concerned. Right not they're not banded and we probably won't do so. The problem with some animals -- like the quail -- they are too timid for the banding process. It will cause them more stress than it's worth to track them. However, we do want to keep some kind of info on them, even if it's just to say, "Removed two dead; added two females, current stock is now 14" or "One female appears in poor health; will keep an eye on her and remove if no improvement" in a comments field. So, I am considering adding the term flock as a name, ided by species and then updating the entire flock that way, since we won't be iding them as individuals. It's not exactly "right" but would work because in this case, we would never be tracking a treatment to an individual because we can't id them as individuals to track! :) Susan h. Do Flocks and Herds vis a vis their individual animal constituents act like parent and children in the sense that a parent has many children but the children will only ever have one parent (you know what I mean, all Access children are raised by single parents). -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com --- This email has been checked for viruses by Avast antivirus software. https://www.avast.com/antivirus From rockysmolin at bchacc.com Sat Oct 24 12:16:44 2015 From: rockysmolin at bchacc.com (Rocky Smolin) Date: Sat, 24 Oct 2015 10:16:44 -0700 Subject: [AccessD] Looking for easy form solution In-Reply-To: References: <5D5D7AF07B8D41A7A2C74DF5F93C317A@HAL9007><361F9FB810434F26BDA382610E7D2231@HAL9007> Message-ID: <9ADB32A755F341CFBE9E1821042A57D6@HAL9007> Make the default value in the table False. You may have to run a quick update query one time to set the value of the added field to False in the existing records. But all other records which are added should set that field to false as default. r -----Original Message----- From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of FW Salato Center Sent: Saturday, October 24, 2015 10:03 AM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Looking for easy form solution You know, if you don't work with Access frequently, you forgot a lot -- at least I have. I added a Yes/No field to the Individual table and left the default value blank. I don't want to set it to Yes by default, it just seems dangerous since I won't be using it any other way. So, in the form, I set the control's Default Value to -1. Didn't work -- when the form opens, the Select Yes/No field is still not selected. I tried code when opening the form -- still not setting the field to Yes. It's a Datasheet form. This should be simple. It's based on a query, but for no other reason than good form -- it isn't a multi-table query. Susan H. Forgot - o the form where the individuals are displayed you also need a checkbox bound to the deselect flag. :) -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com --- This email has been checked for viruses by Avast antivirus software. https://www.avast.com/antivirus From Salato at ky.gov Sat Oct 24 13:48:15 2015 From: Salato at ky.gov (FW Salato Center) Date: Sat, 24 Oct 2015 18:48:15 +0000 Subject: [AccessD] Looking for easy form solution In-Reply-To: <86FD17354A184A5081F8842A7E789027@HAL9007> References: <86FD17354A184A5081F8842A7E789027@HAL9007> Message-ID: All animals are ided by name, tag number, or some other unique code. For instance, the box turtles have filed notches in specific scutes. So R1 means the notch is in the first scute on the right. We're still working on a system for some of the species, such as the snakes. -----Original Message----- From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Rocky Smolin Sent: Saturday, October 24, 2015 1:15 PM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Looking for easy form solution How do you identify individuals? Are they tagged? r -----Original Message----- From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of FW Salato Center Sent: Saturday, October 24, 2015 10:00 AM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Looking for easy form solution I really botched that up -- the phone rang and I forgot where I was -- sorry. What I was trying to say in the first paragraph regarding terminology... For instance, the vet might collect a single fecal sample for testing -- no way to tell which deer it's from. All testing and results are applied to all the stock. If she finds worms, they're all treated. However, an individual might sustain an injury and need treatment or surgery. They're all still individuals. Susan H. The use of flocks and herds is strictly livestock terminology for the discussion. They're all individuals. However, when a species is all housed together in the same exhibit, such as the deer, bison, elk, box turtles, quail, turkey... most procedures will be performed on all at the same time. For instance, the vet might collect a single fecal sample for testing -- no way to tell which deer it's from, and They're still all individuals and a parent, not a child to the flock or herd. But, I'm not sure I understood your question, so maybe I didn't answer it either. :) However, I have considered breaking the rules a bit where the quail are concerned. Right not they're not banded and we probably won't do so. The problem with some animals -- like the quail -- they are too timid for the banding process. It will cause them more stress than it's worth to track them. However, we do want to keep some kind of info on them, even if it's just to say, "Removed two dead; added two females, current stock is now 14" or "One female appears in poor health; will keep an eye on her and remove if no improvement" in a comments field. So, I am considering adding the term flock as a name, ided by species and then updating the entire flock that way, since we won't be iding them as individuals. It's not exactly "right" but would work because in this case, we would never be tracking a treatment to an individual because we can't id them as individuals to track! :) Susan h. Do Flocks and Herds vis a vis their individual animal constituents act like parent and children in the sense that a parent has many children but the children will only ever have one parent (you know what I mean, all Access children are raised by single parents). -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com --- This email has been checked for viruses by Avast antivirus software. https://www.avast.com/antivirus -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From Salato at ky.gov Sat Oct 24 14:37:33 2015 From: Salato at ky.gov (FW Salato Center) Date: Sat, 24 Oct 2015 19:37:33 +0000 Subject: [AccessD] Looking for easy form solution In-Reply-To: <9ADB32A755F341CFBE9E1821042A57D6@HAL9007> References: <5D5D7AF07B8D41A7A2C74DF5F93C317A@HAL9007><361F9FB810434F26BDA382610E7D2231@HAL9007> <9ADB32A755F341CFBE9E1821042A57D6@HAL9007> Message-ID: Rocky, I did. First, I tried to set the default value at the form level. When you open the form without filtering, the checkbox controls are selected. When I open the form with a filter, they aren't. So, I tried setting them after opening -- still doesn't work. No error, it just doesn't do anything. DoCmd.OpenForm "Medical Update by Species", , , strFilter Forms![Medical Update by Species]!booSelect.DefaultValue = -1 Susan H. Make the default value in the table False. You may have to run a quick update query one time to set the value of the added field to False in the existing records. But all other records which are added should set that field to false as default. r From Salato at ky.gov Sat Oct 24 14:39:49 2015 From: Salato at ky.gov (FW Salato Center) Date: Sat, 24 Oct 2015 19:39:49 +0000 Subject: [AccessD] Looking for easy form solution In-Reply-To: <9ADB32A755F341CFBE9E1821042A57D6@HAL9007> References: <5D5D7AF07B8D41A7A2C74DF5F93C317A@HAL9007><361F9FB810434F26BDA382610E7D2231@HAL9007> <9ADB32A755F341CFBE9E1821042A57D6@HAL9007> Message-ID: The other problem is how to set the procedure or vaccine for all of them. Can't use a subform in a Datasheet view form. Well, I suppose you could, but in this case, that would be silly. ;) Susan H. Make the default value in the table False. You may have to run a quick update query one time to set the value of the added field to False in the existing records. But all other records which are added should set that field to false as default. r -----Original Message----- From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of FW Salato Center Sent: Saturday, October 24, 2015 10:03 AM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Looking for easy form solution You know, if you don't work with Access frequently, you forgot a lot -- at least I have. I added a Yes/No field to the Individual table and left the default value blank. I don't want to set it to Yes by default, it just seems dangerous since I won't be using it any other way. So, in the form, I set the control's Default Value to -1. Didn't work -- when the form opens, the Select Yes/No field is still not selected. I tried code when opening the form -- still not setting the field to Yes. It's a Datasheet form. This should be simple. It's based on a query, but for no other reason than good form -- it isn't a multi-table query. Susan H. Forgot - o the form where the individuals are displayed you also need a checkbox bound to the deselect flag. :) -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com --- This email has been checked for viruses by Avast antivirus software. https://www.avast.com/antivirus -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From Salato at ky.gov Sat Oct 24 15:09:23 2015 From: Salato at ky.gov (FW Salato Center) Date: Sat, 24 Oct 2015 20:09:23 +0000 Subject: [AccessD] Looking for easy form solution In-Reply-To: References: <5D5D7AF07B8D41A7A2C74DF5F93C317A@HAL9007><361F9FB810434F26BDA382610E7D2231@HAL9007> <9ADB32A755F341CFBE9E1821042A57D6@HAL9007> Message-ID: I was totally abusing the whole thing -- I'm such a ditz. You said it, but it didn't quite connect. Setting the Value property in code only changes the first record instead of all of them because of course it's the selected record. If I rely on the easy way -- the Yes/No at the table level (bound), unselecting a record will change it at the table level, which is just more trouble than it's worth. I should've gone the Recordset method in the first place. Talking in SQL has always come easier to me anyway. It's raining here and it's cold so I'm sure that played some measure in my calamity. :) Sounds better than admitting I've forgotten everything I knew and that I'm no longer competent in Access. That hurts. Susan H. Rocky, I did. First, I tried to set the default value at the form level. When you open the form without filtering, the checkbox controls are selected. When I open the form with a filter, they aren't. So, I tried setting them after opening -- still doesn't work. No error, it just doesn't do anything. DoCmd.OpenForm "Medical Update by Species", , , strFilter Forms![Medical Update by Species]!booSelect.DefaultValue = -1 Susan H. Make the default value in the table False. You may have to run a quick update query one time to set the value of the added field to False in the existing records. But all other records which are added should set that field to false as default. r -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From Salato at ky.gov Sat Oct 24 15:36:25 2015 From: Salato at ky.gov (FW Salato Center) Date: Sat, 24 Oct 2015 20:36:25 +0000 Subject: [AccessD] Looking for easy form solution In-Reply-To: References: <5D5D7AF07B8D41A7A2C74DF5F93C317A@HAL9007><361F9FB810434F26BDA382610E7D2231@HAL9007> <9ADB32A755F341CFBE9E1821042A57D6@HAL9007> Message-ID: A temp table is looking really good right now. Susan H. I was totally abusing the whole thing -- I'm such a ditz. You said it, but it didn't quite connect. Setting the Value property in code only changes the first record instead of all of them because of course it's the selected record. If I rely on the easy way -- the Yes/No at the table level (bound), unselecting a record will change it at the table level, which is just more trouble than it's worth. I should've gone the Recordset method in the first place. Talking in SQL has always come easier to me anyway. It's raining here and it's cold so I'm sure that played some measure in my calamity. :) Sounds better than admitting I've forgotten everything I knew and that I'm no longer competent in Access. That hurts. Susan H. Rocky, I did. First, I tried to set the default value at the form level. When you open the form without filtering, the checkbox controls are selected. When I open the form with a filter, they aren't. So, I tried setting them after opening -- still doesn't work. No error, it just doesn't do anything. DoCmd.OpenForm "Medical Update by Species", , , strFilter Forms![Medical Update by Species]!booSelect.DefaultValue = -1 Susan H. Make the default value in the table False. You may have to run a quick update query one time to set the value of the added field to False in the existing records. But all other records which are added should set that field to false as default. r -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From rockysmolin at bchacc.com Sat Oct 24 17:37:08 2015 From: rockysmolin at bchacc.com (Rocky Smolin) Date: Sat, 24 Oct 2015 15:37:08 -0700 Subject: [AccessD] Looking for easy form solution In-Reply-To: References: <5D5D7AF07B8D41A7A2C74DF5F93C317A@HAL9007><361F9FB810434F26BDA382610E7D2231@HAL9007><9ADB32A755F341CFBE9E1821042A57D6@HAL9007> Message-ID: <237ADDE7A580491FBEC899B8D87CDD9E@HAL9007> I always liked a few lines of code to do something myself. What was in strFilter? r -----Original Message----- From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of FW Salato Center Sent: Saturday, October 24, 2015 1:09 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Looking for easy form solution I was totally abusing the whole thing -- I'm such a ditz. You said it, but it didn't quite connect. Setting the Value property in code only changes the first record instead of all of them because of course it's the selected record. If I rely on the easy way -- the Yes/No at the table level (bound), unselecting a record will change it at the table level, which is just more trouble than it's worth. I should've gone the Recordset method in the first place. Talking in SQL has always come easier to me anyway. It's raining here and it's cold so I'm sure that played some measure in my calamity. :) Sounds better than admitting I've forgotten everything I knew and that I'm no longer competent in Access. That hurts. Susan H. Rocky, I did. First, I tried to set the default value at the form level. When you open the form without filtering, the checkbox controls are selected. When I open the form with a filter, they aren't. So, I tried setting them after opening -- still doesn't work. No error, it just doesn't do anything. DoCmd.OpenForm "Medical Update by Species", , , strFilter Forms![Medical Update by Species]!booSelect.DefaultValue = -1 Susan H. Make the default value in the table False. You may have to run a quick update query one time to set the value of the added field to False in the existing records. But all other records which are added should set that field to false as default. r -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com --- This email has been checked for viruses by Avast antivirus software. https://www.avast.com/antivirus From stuart at lexacorp.com.pg Sat Oct 24 19:58:19 2015 From: stuart at lexacorp.com.pg (Stuart McLachlan) Date: Sun, 25 Oct 2015 10:58:19 +1000 Subject: [AccessD] Looking for easy form solution In-Reply-To: <237ADDE7A580491FBEC899B8D87CDD9E@HAL9007> References: , , <237ADDE7A580491FBEC899B8D87CDD9E@HAL9007> Message-ID: <562C292B.22176.281EB5BA@stuart.lexacorp.com.pg> I've done similar on many occassions: An unbound form with a multi-select listbox, combobox with list of flocks/herds, appropriate fields for treatment details and a Go button. 1. User selects flock/herd in Combobox: Populate the listbox with the appropriate animals/fowls Set all rows of the listbox to selected. 2. User deselects animals/birds as necessary using Ctrl +Click. (You can also have a couple of buttons to "Select All" and "Deslect All" beside the list). 3. User enters treatment details. 4. User clicks "Go" button. Step through selected items in listbox and record the treatment details about each one in turn. -- Stuart On 24 Oct 2015 at 15:37, Rocky Smolin wrote: > I always liked a few lines of code to do something myself. > > What was in strFilter? > > r > > -----Original Message----- > From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf > Of FW Salato Center Sent: Saturday, October 24, 2015 1:09 PM To: > Access Developers discussion and problem solving Subject: Re: > [AccessD] Looking for easy form solution > > I was totally abusing the whole thing -- I'm such a ditz. You said it, > but it didn't quite connect. Setting the Value property in code only > changes the first record instead of all of them because of course it's > the selected record. > > If I rely on the easy way -- the Yes/No at the table level (bound), > unselecting a record will change it at the table level, which is just > more trouble than it's worth. > > I should've gone the Recordset method in the first place. Talking in > SQL has always come easier to me anyway. > > > > It's raining here and it's cold so I'm sure that played some measure > in my calamity. :) Sounds better than admitting I've forgotten > everything I knew and that I'm no longer competent in Access. That > hurts. > > Susan H. > > Rocky, I did. > > First, I tried to set the default value at the form level. When you > open the form without filtering, the checkbox controls are selected. > When I open the form with a filter, they aren't. So, I tried setting > them after opening -- still doesn't work. No error, it just doesn't do > anything. > > DoCmd.OpenForm "Medical Update by Species", , , strFilter > Forms![Medical Update by Species]!booSelect.DefaultValue = -1 > > Susan H. > > > Make the default value in the table False. You may have to run a > quick update query one time to set the value of the added field to > False in the existing records. But all other records which are added > should set that field to false as default. > > r > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > > > --- > This email has been checked for viruses by Avast antivirus software. > https://www.avast.com/antivirus > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > From bensonforums at gmail.com Sat Oct 24 21:22:57 2015 From: bensonforums at gmail.com (Bill Benson) Date: Sat, 24 Oct 2015 22:22:57 -0400 Subject: [AccessD] Looking for easy form solution In-Reply-To: <562C292B.22176.281EB5BA@stuart.lexacorp.com.pg> References: <237ADDE7A580491FBEC899B8D87CDD9E@HAL9007> <562C292B.22176.281EB5BA@stuart.lexacorp.com.pg> Message-ID: Yup... Well explained Stuart. On Oct 24, 2015 8:59 PM, "Stuart McLachlan" wrote: > I've done similar on many occassions: > > An unbound form with a multi-select listbox, > combobox with list of flocks/herds, appropriate fields for treatment > details and a Go button. > > 1. User selects flock/herd in Combobox: > Populate the listbox with the appropriate animals/fowls > Set all rows of the listbox to selected. > > 2. User deselects animals/birds as necessary using Ctrl +Click. (You can > also have a couple > of buttons to "Select All" and "Deslect All" beside the list). > > 3. User enters treatment details. > > 4. User clicks "Go" button. > Step through selected items in listbox and record the treatment details > about each one in > turn. > > -- > Stuart > > > > On 24 Oct 2015 at 15:37, Rocky Smolin wrote: > > > I always liked a few lines of code to do something myself. > > > > What was in strFilter? > > > > r > > > > -----Original Message----- > > From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf > > Of FW Salato Center Sent: Saturday, October 24, 2015 1:09 PM To: > > Access Developers discussion and problem solving Subject: Re: > > [AccessD] Looking for easy form solution > > > > I was totally abusing the whole thing -- I'm such a ditz. You said it, > > but it didn't quite connect. Setting the Value property in code only > > changes the first record instead of all of them because of course it's > > the selected record. > > > > If I rely on the easy way -- the Yes/No at the table level (bound), > > unselecting a record will change it at the table level, which is just > > more trouble than it's worth. > > > > I should've gone the Recordset method in the first place. Talking in > > SQL has always come easier to me anyway. > > > > > > > > It's raining here and it's cold so I'm sure that played some measure > > in my calamity. :) Sounds better than admitting I've forgotten > > everything I knew and that I'm no longer competent in Access. That > > hurts. > > > > Susan H. > > > > Rocky, I did. > > > > First, I tried to set the default value at the form level. When you > > open the form without filtering, the checkbox controls are selected. > > When I open the form with a filter, they aren't. So, I tried setting > > them after opening -- still doesn't work. No error, it just doesn't do > > anything. > > > > DoCmd.OpenForm "Medical Update by Species", , , strFilter > > Forms![Medical Update by Species]!booSelect.DefaultValue = -1 > > > > Susan H. > > > > > > Make the default value in the table False. You may have to run a > > quick update query one time to set the value of the added field to > > False in the existing records. But all other records which are added > > should set that field to false as default. > > > > r > > > > > > -- > > AccessD mailing list > > AccessD at databaseadvisors.com > > http://databaseadvisors.com/mailman/listinfo/accessd > > Website: http://www.databaseadvisors.com > > > > -- > > AccessD mailing list > > AccessD at databaseadvisors.com > > http://databaseadvisors.com/mailman/listinfo/accessd > > Website: http://www.databaseadvisors.com > > > > > > --- > > This email has been checked for viruses by Avast antivirus software. > > https://www.avast.com/antivirus > > > > -- > > AccessD mailing list > > AccessD at databaseadvisors.com > > http://databaseadvisors.com/mailman/listinfo/accessd > > Website: http://www.databaseadvisors.com > > > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > From fuller.artful at gmail.com Sun Oct 25 06:56:06 2015 From: fuller.artful at gmail.com (Arthur Fuller) Date: Sun, 25 Oct 2015 07:56:06 -0400 Subject: [AccessD] MZ-Tools 8.0 for VBA Message-ID: Having used MZT 3.0 for many years, I was pleased to learn of the new version, so I grabbed it ran the setup program, but I can't figure out where its files got copied to. Hence I can't use the add-in manager to add it in. Can someone tell me where the installed files are located? -- Arthur From ssharkins at gmail.com Sun Oct 25 07:10:52 2015 From: ssharkins at gmail.com (Susan Harkins) Date: Sun, 25 Oct 2015 08:10:52 -0400 Subject: [AccessD] Looking for easy form solution In-Reply-To: References: <237ADDE7A580491FBEC899B8D87CDD9E@HAL9007> <562C292B.22176.281EB5BA@stuart.lexacorp.com.pg> Message-ID: A list box is something I started considering yesterday afternoon. I'm glad you mentioned it -- it kind of confirms for me the direction I think I'll go on Tuesday. Thank you! Susan H. On Sat, Oct 24, 2015 at 10:22 PM, Bill Benson wrote: > Yup... Well explained Stuart. > On Oct 24, 2015 8:59 PM, "Stuart McLachlan" > wrote: > > > I've done similar on many occassions: > > > > An unbound form with a multi-select listbox, > > combobox with list of flocks/herds, appropriate fields for treatment > > details and a Go button. > > > > 1. User selects flock/herd in Combobox: > > Populate the listbox with the appropriate animals/fowls > > Set all rows of the listbox to selected. > > > > 2. User deselects animals/birds as necessary using Ctrl +Click. (You can > > also have a couple > > of buttons to "Select All" and "Deslect All" beside the list). > > > > 3. User enters treatment details. > > > > 4. User clicks "Go" button. > > Step through selected items in listbox and record the treatment details > > about each one in > > turn. > > > > -- > > Stuart > > > > > > > > On 24 Oct 2015 at 15:37, Rocky Smolin wrote: > > > > > I always liked a few lines of code to do something myself. > > > > > > What was in strFilter? > > > > > > r > > > > > > -----Original Message----- > > > From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf > > > Of FW Salato Center Sent: Saturday, October 24, 2015 1:09 PM To: > > > Access Developers discussion and problem solving Subject: Re: > > > [AccessD] Looking for easy form solution > > > > > > I was totally abusing the whole thing -- I'm such a ditz. You said it, > > > but it didn't quite connect. Setting the Value property in code only > > > changes the first record instead of all of them because of course it's > > > the selected record. > > > > > > If I rely on the easy way -- the Yes/No at the table level (bound), > > > unselecting a record will change it at the table level, which is just > > > more trouble than it's worth. > > > > > > I should've gone the Recordset method in the first place. Talking in > > > SQL has always come easier to me anyway. > > > > > > > > > > > > It's raining here and it's cold so I'm sure that played some measure > > > in my calamity. :) Sounds better than admitting I've forgotten > > > everything I knew and that I'm no longer competent in Access. That > > > hurts. > > > > > > Susan H. > > > > > > Rocky, I did. > > > > > > First, I tried to set the default value at the form level. When you > > > open the form without filtering, the checkbox controls are selected. > > > When I open the form with a filter, they aren't. So, I tried setting > > > them after opening -- still doesn't work. No error, it just doesn't do > > > anything. > > > > > > DoCmd.OpenForm "Medical Update by Species", , , strFilter > > > Forms![Medical Update by Species]!booSelect.DefaultValue = -1 > > > > > > Susan H. > > > > > > > > > Make the default value in the table False. You may have to run a > > > quick update query one time to set the value of the added field to > > > False in the existing records. But all other records which are added > > > should set that field to false as default. > > > > > > r > > > > > > > > > -- > > > AccessD mailing list > > > AccessD at databaseadvisors.com > > > http://databaseadvisors.com/mailman/listinfo/accessd > > > Website: http://www.databaseadvisors.com > > > > > > -- > > > AccessD mailing list > > > AccessD at databaseadvisors.com > > > http://databaseadvisors.com/mailman/listinfo/accessd > > > Website: http://www.databaseadvisors.com > > > > > > > > > --- > > > This email has been checked for viruses by Avast antivirus software. > > > https://www.avast.com/antivirus > > > > > > -- > > > AccessD mailing list > > > AccessD at databaseadvisors.com > > > http://databaseadvisors.com/mailman/listinfo/accessd > > > Website: http://www.databaseadvisors.com > > > > > > > > > -- > > AccessD mailing list > > AccessD at databaseadvisors.com > > http://databaseadvisors.com/mailman/listinfo/accessd > > Website: http://www.databaseadvisors.com > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > From robert at servicexp.com Sun Oct 25 07:15:03 2015 From: robert at servicexp.com (Robert) Date: Sun, 25 Oct 2015 08:15:03 -0400 Subject: [AccessD] MZ-Tools 8.0 for VBA In-Reply-To: References: Message-ID: <001f01d10f1e$c8b95640$5a2c02c0$@com> That's strange, The installer is all I needed to run. New version was installed and when I opened up the Access programming IDE was waiting to be used. WBR Robert -----Original Message----- From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Arthur Fuller Sent: Sunday, October 25, 2015 7:56 AM To: Access Developers discussion and problem solving Subject: [AccessD] MZ-Tools 8.0 for VBA Having used MZT 3.0 for many years, I was pleased to learn of the new version, so I grabbed it ran the setup program, but I can't figure out where its files got copied to. Hence I can't use the add-in manager to add it in. Can someone tell me where the installed files are located? -- Arthur -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From fuller.artful at gmail.com Sun Oct 25 07:27:39 2015 From: fuller.artful at gmail.com (Arthur Fuller) Date: Sun, 25 Oct 2015 08:27:39 -0400 Subject: [AccessD] MZ-Tools 8.0 for VBA In-Reply-To: <001f01d10f1e$c8b95640$5a2c02c0$@com> References: <001f01d10f1e$c8b95640$5a2c02c0$@com> Message-ID: Thanks, Robert. I had assumed that I'd have to run the Add-In Manager to load MZ-T but you're quite right -- there it is, already installed. Silly me. Arthur On Sun, Oct 25, 2015 at 8:15 AM, Robert wrote: > That's strange, The installer is all I needed to run. New version was > installed and when I opened up the Access programming IDE was waiting to be > used. > > WBR > Robert From Salato at ky.gov Wed Oct 28 11:33:06 2015 From: Salato at ky.gov (FW Salato Center) Date: Wed, 28 Oct 2015 16:33:06 +0000 Subject: [AccessD] Looking for easy form solution In-Reply-To: References: <237ADDE7A580491FBEC899B8D87CDD9E@HAL9007> <562C292B.22176.281EB5BA@stuart.lexacorp.com.pg> Message-ID: This route is working well. I'm wondering though, if I should go to the trouble of displaying the records "to be" committed beforehand and giving the user a last chance to remove an animal? If the user makes a mistake, it's no big deal to pull up the medical records and delete an individual record, but they'd have to remember to do so. I'm inclined not to do this and add it later if they ask for it. It seems like a lot of work to me. Susan H. A list box is something I started considering yesterday afternoon. I'm glad you mentioned it -- it kind of confirms for me the direction I think I'll go on Tuesday. Thank you! Susan H. > > > I've done similar on many occassions: > > > > 4. User clicks "Go" button. > > Step through selected items in listbox and record the treatment > > details about each one in turn. From jamesbutton at blueyonder.co.uk Wed Oct 28 11:59:59 2015 From: jamesbutton at blueyonder.co.uk (James Button) Date: Wed, 28 Oct 2015 16:59:59 -0000 Subject: [AccessD] Looking for easy form solution In-Reply-To: References: <237ADDE7A580491FBEC899B8D87CDD9E@HAL9007> <562C292B.22176.281EB5BA@stuart.lexacorp.com.pg> Message-ID: I don't remember you posting anything indicating that you have an ID and timestamp on each entry, but that makes it a lot easier to 'extract' a set of changes in order to review and change them, and also to go through as an audit trail - Who did what to the database (and by implication the animals) in what order, and when. Also facilitates things like checking waiting periods before other actions can be performed - Re confirmation actions - Well, I just spent an hour entering that, and now I have to check each and every part of the entry - Oh! yes of course I did it all correctly! Followed the day after by Ah! - Only 12 doses gone from the cupboard and I seem to remember making a 14 entry set! JimB -----Original Message----- From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of FW Salato Center Sent: Wednesday, October 28, 2015 4:33 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Looking for easy form solution This route is working well. I'm wondering though, if I should go to the trouble of displaying the records "to be" committed beforehand and giving the user a last chance to remove an animal? If the user makes a mistake, it's no big deal to pull up the medical records and delete an individual record, but they'd have to remember to do so. I'm inclined not to do this and add it later if they ask for it. It seems like a lot of work to me. Susan H. A list box is something I started considering yesterday afternoon. I'm glad you mentioned it -- it kind of confirms for me the direction I think I'll go on Tuesday. Thank you! Susan H. > > > I've done similar on many occassions: > > > > 4. User clicks "Go" button. > > Step through selected items in listbox and record the treatment > > details about each one in turn. -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From davidmcafee at gmail.com Wed Oct 28 12:16:30 2015 From: davidmcafee at gmail.com (David McAfee) Date: Wed, 28 Oct 2015 10:16:30 -0700 Subject: [AccessD] Is there a way to determine months with 31 days that start on tuesday? Message-ID: I'm trying to determine a given week number for a given month in order to auto-run a certain process in Access. If a given week has four or more business days (M-F) in a week, we count it. We only have processes for weeks 1-4. I have brought up the fact that there are months with five, four or more days weeks, such as December 2015. December 2015 doesn't matter to my company as the 5th week, we are shut down, so no 5th week process is needed. I was trying to determine, via code, if there was a way to list any month like this for the next three years. I don't know which is easier to determine (1,2 or 3): 1. All months with 31 days that start (1st) on Tuesday 2. Months with 5 weeks of four or more business days (M-F) 3. Some built in method? Does anyone have an idea? Thanks, David From paul.hartland at googlemail.com Wed Oct 28 12:57:37 2015 From: paul.hartland at googlemail.com (Paul Hartland) Date: Wed, 28 Oct 2015 17:57:37 +0000 Subject: [AccessD] Is there a way to determine months with 31 days that start on tuesday? In-Reply-To: References: Message-ID: I have some code (similar also available on either here or another site) that builds a table of dates using a from and to year, which caters for everyday, then flags business days, bank holidays, weekends, week number, quarter etc etc, then I basically just run any queries using that table. I am off work sick at moment, but have the works laptop the code is in SQL but willing to post a copy if required. On 28 October 2015 at 17:16, David McAfee wrote: > I'm trying to determine a given week number for a given month in order to > auto-run a certain process in Access. > > If a given week has four or more business days (M-F) in a week, we count > it. > We only have processes for weeks 1-4. > > I have brought up the fact that there are months with five, four or more > days weeks, such as December 2015. > > December 2015 doesn't matter to my company as the 5th week, we are shut > down, so no 5th week process is needed. > > I was trying to determine, via code, if there was a way to list any month > like this for the next three years. > > I don't know which is easier to determine (1,2 or 3): > 1. All months with 31 days that start (1st) on Tuesday > 2. Months with 5 weeks of four or more business days (M-F) > 3. Some built in method? > > Does anyone have an idea? > > Thanks, > David > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > -- Paul Hartland paul.hartland at googlemail.com From Salato at ky.gov Wed Oct 28 13:13:33 2015 From: Salato at ky.gov (FW Salato Center) Date: Wed, 28 Oct 2015 18:13:33 +0000 Subject: [AccessD] Looking for easy form solution In-Reply-To: References: <237ADDE7A580491FBEC899B8D87CDD9E@HAL9007> <562C292B.22176.281EB5BA@stuart.lexacorp.com.pg> Message-ID: I don't think we need anything quite so grand. :) Only a few people will be entering data and it'll be the same people entering the same data. The list box selects all of the flock/herd by default and I'll train them to click an individual they want to exclude, but I can see them forgetting that step. If they do, they can pull up the view records form and delete it. :) Susan H. I don't remember you posting anything indicating that you have an ID and timestamp on each entry, but that makes it a lot easier to 'extract' a set of changes in order to review and change them, and also to go through as an audit trail - Who did what to the database (and by implication the animals) in what order, and when. Also facilitates things like checking waiting periods before other actions can be performed - Re confirmation actions - Well, I just spent an hour entering that, and now I have to check each and every part of the entry - Oh! yes of course I did it all correctly! Followed the day after by Ah! - Only 12 doses gone from the cupboard and I seem to remember making a 14 entry set! JimB This route is working well. I'm wondering though, if I should go to the trouble of displaying the records "to be" committed beforehand and giving the user a last chance to remove an animal? If the user makes a mistake, it's no big deal to pull up the medical records and delete an individual record, but they'd have to remember to do so. I'm inclined not to do this and add it later if they ask for it. It seems like a lot of work to me. Susan H. From gustav at cactus.dk Wed Oct 28 13:54:07 2015 From: gustav at cactus.dk (Gustav Brock) Date: Wed, 28 Oct 2015 18:54:07 +0000 Subject: [AccessD] Is there a way to determine months with 31 days that start on tuesday? In-Reply-To: References: Message-ID: Hi David That's a bit tricky. You could use the function below to find the first Tuesday of the month of the date in question, and then the first Tuesday of the next month. If your date falls between these two dates, it belongs to "a week of the month". If not, it is of the month before or after. When settled, calculate the count of weeks (1 + DateDiff( "ww", ..)) between the found first Tuesday and the date in question. Public Function DateMonthWeekday( _ Optional ByVal bytWeekdayOccurrence As Byte, _ Optional ByVal datDateInMonth As Date, _ Optional ByVal bytWeekday As Byte) _ As Date Const cintDaysInWeek As Integer = 7 Dim intDayOffset As Integer Dim datMonthFirst As Date Dim datWeekday As Date ' Calculates occurrence of bytWeekday of the month of datDateInMonth. ' If bytWeekdayOccurrence is 0 the first occurrence of bytWeekday of the month is assumed. ' If bytWeekdayOccurrence is 5 or anything else different from 0 to 4, the ' last occurrence of bytWeekday of the month is assumed. ' If no date for the month is supplied, today's date is used. ' If bytWeekday is not the Value of a weekday, the weekday of datDateInMonth is used. ' Returns the date as a date/time Value. ' ' 2008-09-12, Cactus Data ApS, CPH. ' 2009-12-10. Calculation of last occurrence changed to call of DateMonthLastWeekday(). If datDateInMonth = 0 Then ' No date is specified. datDateInMonth = Date End If ' Validate bytWeekday. Select Case bytWeekday Case _ vbMonday, _ vbTuesday, _ vbWednesday, _ vbThursday, _ vbFriday, _ vbSaturday, _ vbSunday Case Else ' Zero, none or invalid value for weekday. bytWeekday = Weekday(datDateInMonth, vbSunday) End Select ' Validate bytWeekdayOccurrence. If bytWeekdayOccurrence = 0 Then bytWeekdayOccurrence = 1 End If Select Case bytWeekdayOccurrence Case 1, 2, 3, 4 datMonthFirst = DateSerial(Year(datDateInMonth), Month(datDateInMonth), 1) ' Find offset of bytWeekday from first day of month. intDayOffset = (bytWeekday - Weekday(datMonthFirst, vbSunday) + cintDaysInWeek) Mod cintDaysInWeek ' Find offset for occurence no. of bytWeekday from first day of month. intDayOffset = intDayOffset + cintDaysInWeek * (bytWeekdayOccurrence - 1) datWeekday = DateAdd("d", intDayOffset, datMonthFirst) Case Else datWeekday = DateMonthLastWeekday(datDateInMonth, bytWeekday) End Select DateMonthWeekday = datWeekday End Function Public Function DateMonthLastWeekday( _ Optional ByVal datDateInMonth As Date, _ Optional ByVal bytWeekday As Byte) _ As Date ' Calculates last occurrence of bytWeekday of the month of datDateInMonth. ' If no date for the month is supplied, today's date is used. ' If no weekday is supplied, the weekday of the supplied date is used. ' Returns the date as a date/time Value. ' ' 2007-01-25, Cactus Data ApS, CPH. ' 2009-12-10. Calculation of bytDayDiff simplified. ' Parameters made optional. Dim datLastDay As Date Dim bytDayDiff As Byte ' No specific error handling. On Error Resume Next If datDateInMonth = 0 Then datDateInMonth = Date End If ' Validate bytWeekday. Select Case bytWeekday Case _ vbMonday, _ vbTuesday, _ vbWednesday, _ vbThursday, _ vbFriday, _ vbSaturday, _ vbSunday Case Else ' Zero, none or invalid value for weekday. bytWeekday = Weekday(datDateInMonth, vbSunday) End Select ' Find last day of the month of datDateInMonth. datLastDay = DateSerial(Year(datDateInMonth), Month(datDateInMonth) + 1, 0) ' Determine number of days between last day of month and last lngWeekday of month ' by assuming lngWeekday being the first day of a week. bytDayDiff = Weekday(datLastDay, bytWeekday) - 1 ' Calculate closest preceding weekday of the last day including this. DateMonthLastWeekday = DateAdd("d", -bytDayDiff, datLastDay) End Function /gustav ________________________________________ Fra: AccessD p? vegne af David McAfee Sendt: 28. oktober 2015 18:16 Til: Access Developers discussion and problem solving Emne: [AccessD] Is there a way to determine months with 31 days that start on tuesday? I'm trying to determine a given week number for a given month in order to auto-run a certain process in Access. If a given week has four or more business days (M-F) in a week, we count it. We only have processes for weeks 1-4. I have brought up the fact that there are months with five, four or more days weeks, such as December 2015. December 2015 doesn't matter to my company as the 5th week, we are shut down, so no 5th week process is needed. I was trying to determine, via code, if there was a way to list any month like this for the next three years. I don't know which is easier to determine (1,2 or 3): 1. All months with 31 days that start (1st) on Tuesday 2. Months with 5 weeks of four or more business days (M-F) 3. Some built in method? Does anyone have an idea? Thanks, David From davidmcafee at gmail.com Wed Oct 28 14:23:15 2015 From: davidmcafee at gmail.com (David McAfee) Date: Wed, 28 Oct 2015 12:23:15 -0700 Subject: [AccessD] Is there a way to determine months with 31 days that start on tuesday? In-Reply-To: References: Message-ID: Thanks. I ended up working on something similar to what you have below, but ended up doing something like Paul suggested. I've been looking at an Excel sheet that I made up some time ago, which consists four sets (31, 30, 29 and 28 day) of calendars each beginning with a different day of the week, for a total of 28 calendars. I transposed the data into four columns: WeekDayNo, DateDayNo, WeekNo and MaxDays (all integers) It ended up being 837 rows (only 5 of which are a "week5" number) I wrote the following functions in VBA: Public Function GetWeekNumberForDate(ByVal theDate As Date) As Integer Dim WhereClause As String WhereClause = "DayNo=" & Weekday(theDate) & " AND DayOfMonth = " & Day(theDate) & " AND MaxDaysOfMonth=" & Day(LastDayInMonth(theDate)) GetWeekNumberForDate = CInt(DLookup("WeekNo", "tblCalendarDays", WhereClause)) End Function Public Function LastDayInMonth(ByVal AnyDate As Date) As Date LastDayInMonth = DateAdd("m", 1, DateSerial(Year(AnyDate), Month(AnyDate), 1)) - 1 End Function I then wrote a function going out three years and only three months come up: 3/2016, 8/2017 & 5/2018 I'm going to use this function as it runs pretty quick, but at least I have my 5 week months that I was looking for. Thanks everyone! David From jwcolby at gmail.com Thu Oct 29 11:35:48 2015 From: jwcolby at gmail.com (John Colby) Date: Thu, 29 Oct 2015 12:35:48 -0400 Subject: [AccessD] Invalid column name dbo. Message-ID: I have a query which is taking hours to complete. IMHO it shouldn't and so I am trying to speed things up by preselecting data in temp tables. I create the table and a unique index on it, then insert the data, about 900K rows. Notice the two select statements which I created for testing how long it took to return data. The first select runs just fine, and finishes selecting the data in about 13 seconds. The second select then joins the temp table to a largish table (7+ billion rows). It likewise returns the data in about the same time, the same number of rows as the first select. The problem is that it presents an error in the messages tab Msg 207, Level 16, State 1, Procedure usp_MovesSimmons, Line 72 Invalid column name 'dbo'. I cannot see where there is a column named .dbo in the second select. To reiterate - No error message if I uncomment the first statement and run just that select. Error if I comment that out and run just the second select. WEIRD! Can anyone see what I may be missing? Create Table #MovePKs (PKMove int, St char(2), Zip char(5), MSA Char (4), MSAPlusName varchar(100)); CREATE UNIQUE CLUSTERED INDEX IX_1 on #MovePKs (PKMove) insert into #MovePKs (PKMove, St, Zip, MSA, MSAPlusName) SELECT _DataDB101.dbo.AZData.pk, _DataDB101.dbo.AZData.st, _DataDB101.dbo.AZData.zip5, ZipCodes.dbo.vZipStSimple.MSA, ZipCodes.dbo.vZipStSimple.MSAPlusName FROM _DataDB101.dbo.AZData INNER JOIN ZipCodes.dbo.vZipStSimple ON _DataDB101.dbo.AZData.zip5 = ZipCodes.dbo.vZipStSimple.Zip WHERE (NOT (_DataDB101.dbo.AZData.HashPerson IS NULL)) AND (_DataDB101.dbo.AZData.AddrValid IN ('V', 'E', 'PO')) AND (_DataDB101.dbo.AZData.movedate_ >= @FromYrMo) AND (_DataDB101.dbo.AZData.movedate_ <= @ToYrMo) --Select St, Zip, MSA, MSAPlusName from #MovePKs Select St, Zip, MSA, MSAPlusName from #MovePKs Inner Join _DataSimmonsProtocolSimple.dbo.tblDB101SimmonsResultSimple ON #MovePKs.dbo.PKMove = _DataSimmonsProtocolSimple.dbo.tblDB101SimmonsResultSimple.PKDb101 -- John W. Colby Colby Consulting From DMcGillivray at ctc.ca.gov Thu Oct 29 12:24:52 2015 From: DMcGillivray at ctc.ca.gov (McGillivray, Don) Date: Thu, 29 Oct 2015 17:24:52 +0000 Subject: [AccessD] Invalid column name dbo. In-Reply-To: References: Message-ID: Hi John, WAG here, as I have no experience with SQL Server, but in the join clause you refer to the join value from #MovePKs as #MovePKs.dbo.PKMove. Maybe that should be #MovePKs. PKMove? That is, lose the .dbo in the middle. -----Original Message----- From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of John Colby Sent: Thursday, October 29, 2015 9:36 AM To: Discussion concerning MS SQL Server; Access Developers discussion and problem solving Subject: [AccessD] Invalid column name dbo. I have a query which is taking hours to complete. IMHO it shouldn't and so I am trying to speed things up by preselecting data in temp tables. I create the table and a unique index on it, then insert the data, about 900K rows. Notice the two select statements which I created for testing how long it took to return data. The first select runs just fine, and finishes selecting the data in about 13 seconds. The second select then joins the temp table to a largish table (7+ billion rows). It likewise returns the data in about the same time, the same number of rows as the first select. The problem is that it presents an error in the messages tab Msg 207, Level 16, State 1, Procedure usp_MovesSimmons, Line 72 Invalid column name 'dbo'. I cannot see where there is a column named .dbo in the second select. To reiterate - No error message if I uncomment the first statement and run just that select. Error if I comment that out and run just the second select. WEIRD! Can anyone see what I may be missing? Create Table #MovePKs (PKMove int, St char(2), Zip char(5), MSA Char (4), MSAPlusName varchar(100)); CREATE UNIQUE CLUSTERED INDEX IX_1 on #MovePKs (PKMove) insert into #MovePKs (PKMove, St, Zip, MSA, MSAPlusName) SELECT _DataDB101.dbo.AZData.pk, _DataDB101.dbo.AZData.st, _DataDB101.dbo.AZData.zip5, ZipCodes.dbo.vZipStSimple.MSA, ZipCodes.dbo.vZipStSimple.MSAPlusName FROM _DataDB101.dbo.AZData INNER JOIN ZipCodes.dbo.vZipStSimple ON _DataDB101.dbo.AZData.zip5 = ZipCodes.dbo.vZipStSimple.Zip WHERE (NOT (_DataDB101.dbo.AZData.HashPerson IS NULL)) AND (_DataDB101.dbo.AZData.AddrValid IN ('V', 'E', 'PO')) AND (_DataDB101.dbo.AZData.movedate_ >= @FromYrMo) AND (_DataDB101.dbo.AZData.movedate_ <= @ToYrMo) --Select St, Zip, MSA, MSAPlusName from #MovePKs Select St, Zip, MSA, MSAPlusName from #MovePKs Inner Join _DataSimmonsProtocolSimple.dbo.tblDB101SimmonsResultSimple ON #MovePKs.dbo.PKMove = _DataSimmonsProtocolSimple.dbo.tblDB101SimmonsResultSimple.PKDb101 -- John W. Colby Colby Consulting -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From Chester_Kaup at kindermorgan.com Thu Oct 29 13:52:13 2015 From: Chester_Kaup at kindermorgan.com (Kaup, Chester) Date: Thu, 29 Oct 2015 18:52:13 +0000 Subject: [AccessD] Invalid column name dbo. In-Reply-To: References: Message-ID: <8E16E03987F1FD4FB0A9BEBF7CC160CB08A2D2D2@HOUEX11.kindermorgan.com> I concur. dbo is the default SQL server schema. It has been my experience access does not like that in front of the file name. -----Original Message----- From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of McGillivray, Don Sent: Thursday, October 29, 2015 12:25 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Invalid column name dbo. Hi John, WAG here, as I have no experience with SQL Server, but in the join clause you refer to the join value from #MovePKs as #MovePKs.dbo.PKMove. Maybe that should be #MovePKs. PKMove? That is, lose the .dbo in the middle. -----Original Message----- From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of John Colby Sent: Thursday, October 29, 2015 9:36 AM To: Discussion concerning MS SQL Server; Access Developers discussion and problem solving Subject: [AccessD] Invalid column name dbo. I have a query which is taking hours to complete. IMHO it shouldn't and so I am trying to speed things up by preselecting data in temp tables. I create the table and a unique index on it, then insert the data, about 900K rows. Notice the two select statements which I created for testing how long it took to return data. The first select runs just fine, and finishes selecting the data in about 13 seconds. The second select then joins the temp table to a largish table (7+ billion rows). It likewise returns the data in about the same time, the same number of rows as the first select. The problem is that it presents an error in the messages tab Msg 207, Level 16, State 1, Procedure usp_MovesSimmons, Line 72 Invalid column name 'dbo'. I cannot see where there is a column named .dbo in the second select. To reiterate - No error message if I uncomment the first statement and run just that select. Error if I comment that out and run just the second select. WEIRD! Can anyone see what I may be missing? Create Table #MovePKs (PKMove int, St char(2), Zip char(5), MSA Char (4), MSAPlusName varchar(100)); CREATE UNIQUE CLUSTERED INDEX IX_1 on #MovePKs (PKMove) insert into #MovePKs (PKMove, St, Zip, MSA, MSAPlusName) SELECT _DataDB101.dbo.AZData.pk, _DataDB101.dbo.AZData.st, _DataDB101.dbo.AZData.zip5, ZipCodes.dbo.vZipStSimple.MSA, ZipCodes.dbo.vZipStSimple.MSAPlusName FROM _DataDB101.dbo.AZData INNER JOIN ZipCodes.dbo.vZipStSimple ON _DataDB101.dbo.AZData.zip5 = ZipCodes.dbo.vZipStSimple.Zip WHERE (NOT (_DataDB101.dbo.AZData.HashPerson IS NULL)) AND (_DataDB101.dbo.AZData.AddrValid IN ('V', 'E', 'PO')) AND (_DataDB101.dbo.AZData.movedate_ >= @FromYrMo) AND (_DataDB101.dbo.AZData.movedate_ <= @ToYrMo) --Select St, Zip, MSA, MSAPlusName from #MovePKs Select St, Zip, MSA, MSAPlusName from #MovePKs Inner Join _DataSimmonsProtocolSimple.dbo.tblDB101SimmonsResultSimple ON #MovePKs.dbo.PKMove = _DataSimmonsProtocolSimple.dbo.tblDB101SimmonsResultSimple.PKDb101 -- John W. Colby Colby Consulting -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From stuart at lexacorp.com.pg Thu Oct 29 17:09:12 2015 From: stuart at lexacorp.com.pg (Stuart McLachlan) Date: Fri, 30 Oct 2015 08:09:12 +1000 Subject: [AccessD] [dba-SQLServer] Invalid column name dbo. In-Reply-To: <563296A9.28553.413A4D8A@stuart.lexacorp.com.pg> References: , <563296A9.28553.413A4D8A@stuart.lexacorp.com.pg> Message-ID: <56329908.8843.414391CA@stuart.lexacorp.com.pg> Damn. Make that #MovePKs.PKMove and #MovePKs.dbo.PKMove On 30 Oct 2015 at 7:59, Stuart McLachlan wrote: > You have a column #MovePKs.Zip > > You are trying to join on #MOvePKs.dbo.Zip > > > -- > Stuart > > On 29 Oct 2015 at 12:35, John Colby wrote: > > > > > Msg 207, Level 16, State 1, Procedure usp_MovesSimmons, Line 72 > > Invalid column name 'dbo'. > > > > I cannot see where there is a column named .dbo in the second > > select. > > > > > > Create Table #MovePKs (PKMove int, St char(2), Zip char(5), MSA Char > ... > > insert into #MovePKs (PKMove, St, Zip, MSA, MSAPlusName) > ... > > from #MovePKs > > Inner Join > > _DataSimmonsProtocolSimple.dbo.tblDB101SimmonsResultSimple ON > > #MovePKs.dbo.PKMove = > ^^^^^^ > > > _DataSimmonsProtocolSimple.dbo.tblDB101SimmonsResultSimple.PKDb101 > > _______________________________________________ > dba-SQLServer mailing list > dba-SQLServer at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-sqlserver > http://www.databaseadvisors.com > > From jwelz at hotmail.com Thu Oct 29 18:03:53 2015 From: jwelz at hotmail.com (Jurgen Welz) Date: Thu, 29 Oct 2015 23:03:53 +0000 Subject: [AccessD] Opening Files from BLOB in SQL Server 2012 In-Reply-To: <56329908.8843.414391CA@stuart.lexacorp.com.pg> References: , <563296A9.28553.413A4D8A@stuart.lexacorp.com.pg>, <56329908.8843.414391CA@stuart.lexacorp.com.pg> Message-ID: I'm attempting to access files of various types stored by an accounting application. I've found an old knowledge base article applicable to Access versions 1 though 97: https://support.microsoft.com/en-us/kb/103257 I'm using an ODBC connection because that's what we have been using universally and it remains solid. It works to read the file data from the database column because the binary data I'm pulling matches the file size of the item stored. The problem I'm having is when I write the file to disk, it is showing up with exactly 1/2 the size. It is like I'm writing a 32 bit file into a 16 bit file system. Attempts to open the files written to the file system result in a report that the file is damaged or corrupt. If, for example, I've got a file made of 10 chunks 100 bytes long plus 30 bytes, as the file is written and the first 30 bytes is added to the file, it reports as size of 15 bytes and an additional 50 bytes as each additional chunk is appended to the file. Does anyone have a suggestion as to how I might store and or just open these files. File types are Office documents, various image types, pdfs, msg or any number of other file types for which we generally have applications. We are running Windows Server 2012 R2 64 bit and Office 32 bit. Jurgen Welz Edmonton, AB From stuart at lexacorp.com.pg Thu Oct 29 18:18:47 2015 From: stuart at lexacorp.com.pg (Stuart McLachlan) Date: Fri, 30 Oct 2015 09:18:47 +1000 Subject: [AccessD] Opening Files from BLOB in SQL Server 2012 In-Reply-To: References: , <56329908.8843.414391CA@stuart.lexacorp.com.pg>, Message-ID: <5632A957.24091.4183461C@stuart.lexacorp.com.pg> How are you writing the files? i.e. Are you doing an OPEN.... FOR OUTPUT... or OPEN... FOR BINARY... It sounds like the write process is trying to convert Wide Characters to ASCII. Make sure that you are opening for BINARY (If the code was for 97 and earlier, it would have text stored as ASCII so you would not have the Wide -> ASCII conversion concerns) On 29 Oct 2015 at 23:03, Jurgen Welz wrote: > I'm attempting to access files of various types stored by an > accounting application. I've found an old knowledge base article > applicable to Access versions 1 though 97: > https://support.microsoft.com/en-us/kb/103257 > > I'm using an ODBC connection because that's what we have been using > universally and it remains solid. It works to read the file data from > the database column because the binary data I'm pulling matches the > file size of the item stored. The problem I'm having is when I write > the file to disk, it is showing up with exactly 1/2 the size. It is > like I'm writing a 32 bit file into a 16 bit file system. Attempts to > open the files written to the file system result in a report that the > file is damaged or corrupt. > > If, for example, I've got a file made of 10 chunks 100 bytes long plus > 30 bytes, as the file is written and the first 30 bytes is added to > the file, it reports as size of 15 bytes and an additional 50 bytes as > each additional chunk is appended to the file. > > Does anyone have a suggestion as to how I might store and or just open > these files. File types are Office documents, various image types, > pdfs, msg or any number of other file types for which we generally > have applications. We are running Windows Server 2012 R2 64 bit and > Office 32 bit. > > Jurgen Welz > Edmonton, AB > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > From jwelz at hotmail.com Fri Oct 30 08:53:40 2015 From: jwelz at hotmail.com (Jurgen Welz) Date: Fri, 30 Oct 2015 13:53:40 +0000 Subject: [AccessD] Opening Files from BLOB in SQL Server 2012 In-Reply-To: <5632A957.24091.4183461C@stuart.lexacorp.com.pg> References: , <56329908.8843.414391CA@stuart.lexacorp.com.pg>, , <5632A957.24091.4183461C@stuart.lexacorp.com.pg> Message-ID: I pretty much used the sample code at the link. The relevant line read: Open Destination For Binary As DestFile The Blobs are created by what I assume is a 64 bit accounting package and we are using our internally developed project management software to be able to provide broader access to some of the data stored by this system. I guess I'm going to have to look at the file written by Access 2013 with a hex editor and compare with the original file written to the blob by the other application. I expect I'm going to have to OR each 32 bits with a 64 bit buffer and write that result. Time for Google. Jurgen Welz Edmonton Alberta ________________________________________ From: AccessD on behalf of Stuart McLachlan Sent: October 29, 2015 5:18 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Opening Files from BLOB in SQL Server 2012 How are you writing the files? i.e. Are you doing an OPEN.... FOR OUTPUT... or OPEN... FOR BINARY... It sounds like the write process is trying to convert Wide Characters to ASCII. Make sure that you are opening for BINARY (If the code was for 97 and earlier, it would have text stored as ASCII so you would not have the Wide -> ASCII conversion concerns) On 29 Oct 2015 at 23:03, Jurgen Welz wrote: > I'm attempting to access files of various types stored by an > accounting application. I've found an old knowledge base article > applicable to Access versions 1 though 97: > https://support.microsoft.com/en-us/kb/103257 > > I'm using an ODBC connection because that's what we have been using > universally and it remains solid. It works to read the file data from > the database column because the binary data I'm pulling matches the > file size of the item stored. The problem I'm having is when I write > the file to disk, it is showing up with exactly 1/2 the size. It is > like I'm writing a 32 bit file into a 16 bit file system. Attempts to > open the files written to the file system result in a report that the > file is damaged or corrupt. > > If, for example, I've got a file made of 10 chunks 100 bytes long plus > 30 bytes, as the file is written and the first 30 bytes is added to > the file, it reports as size of 15 bytes and an additional 50 bytes as > each additional chunk is appended to the file. > > Does anyone have a suggestion as to how I might store and or just open > these files. File types are Office documents, various image types, > pdfs, msg or any number of other file types for which we generally > have applications. We are running Windows Server 2012 R2 64 bit and > Office 32 bit. > > Jurgen Welz > Edmonton, AB > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From jamesbutton at blueyonder.co.uk Fri Oct 30 10:18:23 2015 From: jamesbutton at blueyonder.co.uk (James Button) Date: Fri, 30 Oct 2015 15:18:23 -0000 Subject: [AccessD] Opening Files from BLOB in SQL Server 2012 In-Reply-To: References: , <56329908.8843.414391CA@stuart.lexacorp.com.pg>, , <5632A957.24091.4183461C@stuart.lexacorp.com.pg> Message-ID: AFAIK The data within (almost) all apps files is not effected by the 32 or 64 bitness of the OS or App. HOWEVER The bitness of the app may matter is there are DLL's or similar components used from common libraries. E.G. Don't expect add-ins for Excel, or compiled scripting modules to work with both 64 and 32 bit versions. Mostly any app used to open a BLOB will be run within it's own 'environment area within the windows OS. JimB -----Original Message----- From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Jurgen Welz Sent: Friday, October 30, 2015 1:54 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Opening Files from BLOB in SQL Server 2012 I pretty much used the sample code at the link. The relevant line read: Open Destination For Binary As DestFile The Blobs are created by what I assume is a 64 bit accounting package and we are using our internally developed project management software to be able to provide broader access to some of the data stored by this system. I guess I'm going to have to look at the file written by Access 2013 with a hex editor and compare with the original file written to the blob by the other application. I expect I'm going to have to OR each 32 bits with a 64 bit buffer and write that result. Time for Google. Jurgen Welz Edmonton Alberta ________________________________________ From: AccessD on behalf of Stuart McLachlan Sent: October 29, 2015 5:18 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Opening Files from BLOB in SQL Server 2012 How are you writing the files? i.e. Are you doing an OPEN.... FOR OUTPUT... or OPEN... FOR BINARY... It sounds like the write process is trying to convert Wide Characters to ASCII. Make sure that you are opening for BINARY (If the code was for 97 and earlier, it would have text stored as ASCII so you would not have the Wide -> ASCII conversion concerns) On 29 Oct 2015 at 23:03, Jurgen Welz wrote: > I'm attempting to access files of various types stored by an > accounting application. I've found an old knowledge base article > applicable to Access versions 1 though 97: > https://support.microsoft.com/en-us/kb/103257 > > I'm using an ODBC connection because that's what we have been using > universally and it remains solid. It works to read the file data from > the database column because the binary data I'm pulling matches the > file size of the item stored. The problem I'm having is when I write > the file to disk, it is showing up with exactly 1/2 the size. It is > like I'm writing a 32 bit file into a 16 bit file system. Attempts to > open the files written to the file system result in a report that the > file is damaged or corrupt. > > If, for example, I've got a file made of 10 chunks 100 bytes long plus > 30 bytes, as the file is written and the first 30 bytes is added to > the file, it reports as size of 15 bytes and an additional 50 bytes as > each additional chunk is appended to the file. > > Does anyone have a suggestion as to how I might store and or just open > these files. File types are Office documents, various image types, > pdfs, msg or any number of other file types for which we generally > have applications. We are running Windows Server 2012 R2 64 bit and > Office 32 bit. > > Jurgen Welz > Edmonton, AB > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From jwelz at hotmail.com Fri Oct 30 11:31:16 2015 From: jwelz at hotmail.com (Jurgen Welz) Date: Fri, 30 Oct 2015 16:31:16 +0000 Subject: [AccessD] Opening Files from BLOB in SQL Server 2012 In-Reply-To: References: , <56329908.8843.414391CA@stuart.lexacorp.com.pg>, , <5632A957.24091.4183461C@stuart.lexacorp.com.pg> , Message-ID: I haven't had much luck with this issue yet. The .FieldSize property of the recordset data field containing the blob used by the GetChunk reports one size, being the actual source file size, but the variable containing the retrieved 'Chunk' has a string length 1/2 the size even when told to pull the entire FieldSize. I also know that if I have a large file, it does not run out of data as it pulls each additional chunk. It just returns 1/2 the data to the interim variable being written to the file system. I'm now testing with a small text file stored in blob and none of the characters survives the GetChunk method so it's looking like each character is somehow truncated. J ________________________________________ From: AccessD on behalf of James Button Sent: October 30, 2015 9:18 AM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Opening Files from BLOB in SQL Server 2012 AFAIK The data within (almost) all apps files is not effected by the 32 or 64 bitness of the OS or App. HOWEVER The bitness of the app may matter is there are DLL's or similar components used from common libraries. E.G. Don't expect add-ins for Excel, or compiled scripting modules to work with both 64 and 32 bit versions. Mostly any app used to open a BLOB will be run within it's own 'environment area within the windows OS. JimB -----Original Message----- From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Jurgen Welz Sent: Friday, October 30, 2015 1:54 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Opening Files from BLOB in SQL Server 2012 I pretty much used the sample code at the link. The relevant line read: Open Destination For Binary As DestFile The Blobs are created by what I assume is a 64 bit accounting package and we are using our internally developed project management software to be able to provide broader access to some of the data stored by this system. I guess I'm going to have to look at the file written by Access 2013 with a hex editor and compare with the original file written to the blob by the other application. I expect I'm going to have to OR each 32 bits with a 64 bit buffer and write that result. Time for Google. Jurgen Welz Edmonton Alberta ________________________________________ From: AccessD on behalf of Stuart McLachlan Sent: October 29, 2015 5:18 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Opening Files from BLOB in SQL Server 2012 How are you writing the files? i.e. Are you doing an OPEN.... FOR OUTPUT... or OPEN... FOR BINARY... It sounds like the write process is trying to convert Wide Characters to ASCII. Make sure that you are opening for BINARY (If the code was for 97 and earlier, it would have text stored as ASCII so you would not have the Wide -> ASCII conversion concerns) On 29 Oct 2015 at 23:03, Jurgen Welz wrote: > I'm attempting to access files of various types stored by an > accounting application. I've found an old knowledge base article > applicable to Access versions 1 though 97: > https://support.microsoft.com/en-us/kb/103257 > > I'm using an ODBC connection because that's what we have been using > universally and it remains solid. It works to read the file data from > the database column because the binary data I'm pulling matches the > file size of the item stored. The problem I'm having is when I write > the file to disk, it is showing up with exactly 1/2 the size. It is > like I'm writing a 32 bit file into a 16 bit file system. Attempts to > open the files written to the file system result in a report that the > file is damaged or corrupt. > > If, for example, I've got a file made of 10 chunks 100 bytes long plus > 30 bytes, as the file is written and the first 30 bytes is added to > the file, it reports as size of 15 bytes and an additional 50 bytes as > each additional chunk is appended to the file. > > Does anyone have a suggestion as to how I might store and or just open > these files. File types are Office documents, various image types, > pdfs, msg or any number of other file types for which we generally > have applications. We are running Windows Server 2012 R2 64 bit and > Office 32 bit. > > Jurgen Welz > Edmonton, AB From gustav at cactus.dk Fri Oct 30 11:51:26 2015 From: gustav at cactus.dk (Gustav Brock) Date: Fri, 30 Oct 2015 16:51:26 +0000 Subject: [AccessD] Opening Files from BLOB in SQL Server 2012 Message-ID: Hi J?rgen It sounds like a unicode issue. I dealt with that once - converting to pure ASCII - as you can read about here - at btnSend_Click() mid page:: http://www.devx.com/vb/Article/42242/0/page/2 Now that's a string not a blob, but it might give you a clue. /gustav -----Oprindelig meddelelse----- Fra: AccessD [mailto:accessd-bounces at databaseadvisors.com] P? vegne af Jurgen Welz Sendt: 30. oktober 2015 17:31 Til: Access Developers discussion and problem solving Emne: Re: [AccessD] Opening Files from BLOB in SQL Server 2012 I haven't had much luck with this issue yet. The .FieldSize property of the recordset data field containing the blob used by the GetChunk reports one size, being the actual source file size, but the variable containing the retrieved 'Chunk' has a string length 1/2 the size even when told to pull the entire FieldSize. I also know that if I have a large file, it does not run out of data as it pulls each additional chunk. It just returns 1/2 the data to the interim variable being written to the file system. I'm now testing with a small text file stored in blob and none of the characters survives the GetChunk method so it's looking like each character is somehow truncated. J ________________________________________ From: AccessD on behalf of James Button Sent: October 30, 2015 9:18 AM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Opening Files from BLOB in SQL Server 2012 AFAIK The data within (almost) all apps files is not effected by the 32 or 64 bitness of the OS or App. HOWEVER The bitness of the app may matter is there are DLL's or similar components used from common libraries. E.G. Don't expect add-ins for Excel, or compiled scripting modules to work with both 64 and 32 bit versions. Mostly any app used to open a BLOB will be run within it's own 'environment area within the windows OS. JimB -----Original Message----- From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Jurgen Welz Sent: Friday, October 30, 2015 1:54 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Opening Files from BLOB in SQL Server 2012 I pretty much used the sample code at the link. The relevant line read: Open Destination For Binary As DestFile The Blobs are created by what I assume is a 64 bit accounting package and we are using our internally developed project management software to be able to provide broader access to some of the data stored by this system. I guess I'm going to have to look at the file written by Access 2013 with a hex editor and compare with the original file written to the blob by the other application. I expect I'm going to have to OR each 32 bits with a 64 bit buffer and write that result. Time for Google. Jurgen Welz Edmonton Alberta ________________________________________ From: AccessD on behalf of Stuart McLachlan Sent: October 29, 2015 5:18 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Opening Files from BLOB in SQL Server 2012 How are you writing the files? i.e. Are you doing an OPEN.... FOR OUTPUT... or OPEN... FOR BINARY... It sounds like the write process is trying to convert Wide Characters to ASCII. Make sure that you are opening for BINARY (If the code was for 97 and earlier, it would have text stored as ASCII so you would not have the Wide -> ASCII conversion concerns) On 29 Oct 2015 at 23:03, Jurgen Welz wrote: > I'm attempting to access files of various types stored by an > accounting application. I've found an old knowledge base article > applicable to Access versions 1 though 97: > https://support.microsoft.com/en-us/kb/103257 > > I'm using an ODBC connection because that's what we have been using > universally and it remains solid. It works to read the file data from > the database column because the binary data I'm pulling matches the > file size of the item stored. The problem I'm having is when I write > the file to disk, it is showing up with exactly 1/2 the size. It is > like I'm writing a 32 bit file into a 16 bit file system. Attempts to > open the files written to the file system result in a report that the > file is damaged or corrupt. > > If, for example, I've got a file made of 10 chunks 100 bytes long plus > 30 bytes, as the file is written and the first 30 bytes is added to > the file, it reports as size of 15 bytes and an additional 50 bytes as > each additional chunk is appended to the file. > > Does anyone have a suggestion as to how I might store and or just open > these files. File types are Office documents, various image types, > pdfs, msg or any number of other file types for which we generally > have applications. We are running Windows Server 2012 R2 64 bit and > Office 32 bit. > > Jurgen Welz > Edmonton, AB From jwelz at hotmail.com Fri Oct 30 12:59:33 2015 From: jwelz at hotmail.com (Jurgen Welz) Date: Fri, 30 Oct 2015 17:59:33 +0000 Subject: [AccessD] Opening Files from BLOB in SQL Server 2012 In-Reply-To: References: Message-ID: I have it working now. Sample code writing to the debug window using the text file in the blob. Function WriteBLOB() Dim FileLength As Long Dim FileData As String Dim db As DAO.Database Dim r As DAO.Recordset Dim lngI As Long Dim bytes() As Byte On Error GoTo ErrorHandler Set db = CurrentDb Set r = db.OpenRecordset("SELECT AttachmentData FROM HQAF WHERE AttachmentID = 60366", dbOpenSnapshot) FileLength = r(0).FieldSize() ReDim bytes(0 To FileLength) bytes = r(0).GetChunk(0, FileLength) FileData = StrConv(bytes(), vbUnicode) Debug.Print FileData Exit Function ErrorHandler: 'Resume 0 Exit Function End Function ________________________________________ From: AccessD on behalf of Gustav Brock Sent: October 30, 2015 10:51 AM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Opening Files from BLOB in SQL Server 2012 Hi J?rgen It sounds like a unicode issue. I dealt with that once - converting to pure ASCII - as you can read about here - at btnSend_Click() mid page:: http://www.devx.com/vb/Article/42242/0/page/2 Now that's a string not a blob, but it might give you a clue. /gustav -----Oprindelig meddelelse----- Fra: AccessD [mailto:accessd-bounces at databaseadvisors.com] P? vegne af Jurgen Welz Sendt: 30. oktober 2015 17:31 Til: Access Developers discussion and problem solving Emne: Re: [AccessD] Opening Files from BLOB in SQL Server 2012 I haven't had much luck with this issue yet. The .FieldSize property of the recordset data field containing the blob used by the GetChunk reports one size, being the actual source file size, but the variable containing the retrieved 'Chunk' has a string length 1/2 the size even when told to pull the entire FieldSize. I also know that if I have a large file, it does not run out of data as it pulls each additional chunk. It just returns 1/2 the data to the interim variable being written to the file system. I'm now testing with a small text file stored in blob and none of the characters survives the GetChunk method so it's looking like each character is somehow truncated. J ________________________________________ From: AccessD on behalf of James Button Sent: October 30, 2015 9:18 AM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Opening Files from BLOB in SQL Server 2012 AFAIK The data within (almost) all apps files is not effected by the 32 or 64 bitness of the OS or App. HOWEVER The bitness of the app may matter is there are DLL's or similar components used from common libraries. E.G. Don't expect add-ins for Excel, or compiled scripting modules to work with both 64 and 32 bit versions. Mostly any app used to open a BLOB will be run within it's own 'environment area within the windows OS. JimB -----Original Message----- From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Jurgen Welz Sent: Friday, October 30, 2015 1:54 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Opening Files from BLOB in SQL Server 2012 I pretty much used the sample code at the link. The relevant line read: Open Destination For Binary As DestFile The Blobs are created by what I assume is a 64 bit accounting package and we are using our internally developed project management software to be able to provide broader access to some of the data stored by this system. I guess I'm going to have to look at the file written by Access 2013 with a hex editor and compare with the original file written to the blob by the other application. I expect I'm going to have to OR each 32 bits with a 64 bit buffer and write that result. Time for Google. Jurgen Welz Edmonton Alberta ________________________________________ From: AccessD on behalf of Stuart McLachlan Sent: October 29, 2015 5:18 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Opening Files from BLOB in SQL Server 2012 How are you writing the files? i.e. Are you doing an OPEN.... FOR OUTPUT... or OPEN... FOR BINARY... It sounds like the write process is trying to convert Wide Characters to ASCII. Make sure that you are opening for BINARY (If the code was for 97 and earlier, it would have text stored as ASCII so you would not have the Wide -> ASCII conversion concerns) On 29 Oct 2015 at 23:03, Jurgen Welz wrote: > I'm attempting to access files of various types stored by an > accounting application. I've found an old knowledge base article > applicable to Access versions 1 though 97: > https://support.microsoft.com/en-us/kb/103257 > > I'm using an ODBC connection because that's what we have been using > universally and it remains solid. It works to read the file data from > the database column because the binary data I'm pulling matches the > file size of the item stored. The problem I'm having is when I write > the file to disk, it is showing up with exactly 1/2 the size. It is > like I'm writing a 32 bit file into a 16 bit file system. Attempts to > open the files written to the file system result in a report that the > file is damaged or corrupt. > > If, for example, I've got a file made of 10 chunks 100 bytes long plus > 30 bytes, as the file is written and the first 30 bytes is added to > the file, it reports as size of 15 bytes and an additional 50 bytes as > each additional chunk is appended to the file. > > Does anyone have a suggestion as to how I might store and or just open > these files. File types are Office documents, various image types, > pdfs, msg or any number of other file types for which we generally > have applications. We are running Windows Server 2012 R2 64 bit and > Office 32 bit. > > Jurgen Welz > Edmonton, AB -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From jwelz at hotmail.com Fri Oct 30 14:42:54 2015 From: jwelz at hotmail.com (Jurgen Welz) Date: Fri, 30 Oct 2015 19:42:54 +0000 Subject: [AccessD] Opening Files from BLOB in SQL Server 2012 In-Reply-To: References: , Message-ID: It turns out that you don't need to do the Unicode conversion if you write the byte array directly to the file system. The sample code I had from the old knowledgebase article used a string variable but that step is unnecessary as is taking fixed size chunks out of the file in a loop plus any remainders. I have an error logger (LogErr), a function that returns a pointer to a persistent database object (fnDB, that instantiates it if it doesn't exist), a logged in user name function (fnUserName Api call) and a file launcher (RunApp Api Call) that opens files based on extension with the default windows file association. All users running the application have a folder with the base path defined in strFilePathName since that's where the application runs from. The function is passed the AttachmentID, grabs the data from the blob, writes it to the location with the file extension with which it was uploaded and saves it with the extension name. If a person opened a file and then ran the function again with the same file ID while that file is open, there would be a file access error so I'll build a check to see whether such a file already exists (Dir())and if so, whether it is open (Open strPathFileName For Binary Access Read Lock Read As intFile) and if it is, append a version suffix in a loop until the incremented version suffix reaches an unfound and/or unlocked version) before saving and opening it a subsequent time. Barring the replacement of the assignment statement for the strFilePathName with a function that returns the file name for opening concurrent versions of the same file, the following is getting the job done. Public Function ShowFile(lngID As Long) 'AttachmentID is primary Key of Blob file record 'AttachmentFileType is the file extension including the '.' - ie '.txt' or '.docx' On Error GoTo ErrorHandler Dim db As DAO.Database Dim r As DAO.Recordset Dim strUser As String Dim lngFileLength As Long Dim lngI As Long Dim intFile As Integer Dim bytes() As Byte Dim strFilePathName As String strUser = fnUserName Set db = fnDB Set r = db.OpenRecordset("SELECT AttachmentData, AttachmentFileType FROM HQAF WHERE AttachmentID = " & lngID, dbOpenSnapshot) strFilePathName = "C:\Users\" & strUser & "\GOM\" & lngID & r(1) intFile = FreeFile Open strFilePathName For Binary As intFile lngFileLength = r(0).FieldSize() ReDim bytes(0 To lngFileLength) bytes = r(0).GetChunk(0, lngFileLength) Put intFile, , bytes Close intFile RunApp strFilePathName, 1 ExitRoutine: On Error Resume Next r.Close Set r = Nothing Set db = Nothing Exit Function ErrorHandler: With Err Select Case .Number Case Else LogErr "modBlob", "ShowFile", .Description, .Number End Select End With 'Resume 0 Resume ExitRoutine End Function From stuart at lexacorp.com.pg Fri Oct 30 16:31:37 2015 From: stuart at lexacorp.com.pg (Stuart McLachlan) Date: Sat, 31 Oct 2015 07:31:37 +1000 Subject: [AccessD] Opening Files from BLOB in SQL Server 2012 In-Reply-To: Message-ID: <5633E1B9.8598.46478768@stuart.lexacorp.com.pg> That's about what I suggested, except that it was your intermediate code rather than the final write that had problems because of the way 97 and before stored text as ASCII while it now stores it as Wide. As soon as you passed chnks through a string variable in your code, you ran into this fundamental difference -- Stuart On 30 Oct 2015 at 19:42, Jurgen Welz wrote: > It turns out that you don't need to do the Unicode conversion if you > write the byte array directly to the file system. The sample code I > had from the old knowledgebase article used a string variable but that > step is unnecessary as is taking fixed size chunks out of the file in > a loop plus any remainders.