From mar.ko at verizon.net Mon Dec 2 20:08:38 2019 From: mar.ko at verizon.net (Mark Simms) Date: Tue, 3 Dec 2019 02:08:38 +0000 (UTC) Subject: [AccessD] Office 365 update issue ? References: <1843284226.2396484.1575338918718.ref@mail.yahoo.com> Message-ID: <1843284226.2396484.1575338918718@mail.yahoo.com> VBA code that was working for over 4 years suddenly threw an error last week.It was basically adding a new record into a table whose primary key is ID (autonumber).A duplicate key error message is being thrown (3022).Has anyone encountered this problem ? A compact and repair on the back-end database did not resolve the issue.I have confirmed with the client that they are subscribed to Office 365. Mark Simms marksimms at verizon.net From jimdettman at verizon.net Mon Dec 2 20:21:51 2019 From: jimdettman at verizon.net (Jim Dettman) Date: Mon, 2 Dec 2019 21:21:51 -0500 Subject: [AccessD] Office 365 update issue ? In-Reply-To: <1843284226.2396484.1575338918718@mail.yahoo.com> References: <1843284226.2396484.1575338918718.ref@mail.yahoo.com> <1843284226.2396484.1575338918718@mail.yahoo.com> Message-ID: Take a look at: https://support.office.com/en-us/article/access-error-query-is-corrupt-fad205a5-9fd4-49f1-be83-f21636caedec Bad bug in Access Jim Sent from my iPhone > On Dec 2, 2019, at 9:08 PM, Mark Simms via AccessD wrote: > > VBA code that was working for over 4 years suddenly threw an error last week.It was basically adding a new record into a table whose primary key is ID (autonumber).A duplicate key error message is being thrown (3022).Has anyone encountered this problem ? A compact and repair on the back-end database did not resolve the issue.I have confirmed with the client that they are subscribed to Office 365. > > Mark Simms > marksimms at verizon.net > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com From jimdettman at verizon.net Mon Dec 2 20:24:15 2019 From: jimdettman at verizon.net (Jim Dettman) Date: Mon, 2 Dec 2019 21:24:15 -0500 Subject: [AccessD] Office 365 update issue ? In-Reply-To: <1843284226.2396484.1575338918718@mail.yahoo.com> References: <1843284226.2396484.1575338918718.ref@mail.yahoo.com> <1843284226.2396484.1575338918718@mail.yahoo.com> Message-ID: <6F24C493-8B85-42EB-9494-2A53620A157D@verizon.net> Actually not what I thought after re-reading. Failures of auto numbers have occurred in the past. Sometimes a form of corruption. You?ll need to reset the auto number value. Jim Sent from my iPhone > On Dec 2, 2019, at 9:08 PM, Mark Simms via AccessD wrote: > > VBA code that was working for over 4 years suddenly threw an error last week.It was basically adding a new record into a table whose primary key is ID (autonumber).A duplicate key error message is being thrown (3022).Has anyone encountered this problem ? A compact and repair on the back-end database did not resolve the issue.I have confirmed with the client that they are subscribed to Office 365. > > Mark Simms > marksimms at verizon.net > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com From paul.hartland at googlemail.com Mon Dec 2 20:24:16 2019 From: paul.hartland at googlemail.com (Paul Hartland) Date: Tue, 3 Dec 2019 02:24:16 +0000 Subject: [AccessD] Office 365 update issue ? In-Reply-To: <1843284226.2396484.1575338918718@mail.yahoo.com> References: <1843284226.2396484.1575338918718.ref@mail.yahoo.com> <1843284226.2396484.1575338918718@mail.yahoo.com> Message-ID: Hope its not the same problem I had a few years back, was on an old version of Access can't remember which, but suddenly new records wouldn't insert because of a duplicate number, the field was an autonumber & primary key, like you a compact & repair failed to resolve the issue and it had me for hours (maybe days thinking about it) until I found an article something like in a certain situation if a record is deleted that has an autonumber field the autonumber may lose its sequence, for example you have 5 records with the autonumber running 1,2,3,4,5 record 3 is deleted, then for some reason the next record is given the autonumber of 3 and no problem since 3 was deleted but then the next record inserted tries to assign 4, 4 is already there...bang duplicate....In the end the only solution I could come up with was resetting the autonumber & relinking all related tables etc right pain. Paul On Tue, 3 Dec 2019, 02:09 Mark Simms via AccessD, < accessd at databaseadvisors.com> wrote: > VBA code that was working for over 4 years suddenly threw an error last > week.It was basically adding a new record into a table whose primary key is > ID (autonumber).A duplicate key error message is being thrown (3022).Has > anyone encountered this problem ? A compact and repair on the back-end > database did not resolve the issue.I have confirmed with the client that > they are subscribed to Office 365. > > Mark Simms > marksimms at verizon.net > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > From jimdettman at verizon.net Mon Dec 2 20:26:03 2019 From: jimdettman at verizon.net (Jim Dettman) Date: Mon, 2 Dec 2019 21:26:03 -0500 Subject: [AccessD] Office 365 update issue ? In-Reply-To: <1843284226.2396484.1575338918718@mail.yahoo.com> References: <1843284226.2396484.1575338918718.ref@mail.yahoo.com> <1843284226.2396484.1575338918718@mail.yahoo.com> Message-ID: <6C086DF3-686B-480E-9EFA-237810D831BC@verizon.net> Fyi: https://support.microsoft.com/en-us/help/812718/how-to-reset-an-autonumber-field-value-in-access Jim Sent from my iPhone > On Dec 2, 2019, at 9:08 PM, Mark Simms via AccessD wrote: > > VBA code that was working for over 4 years suddenly threw an error last week.It was basically adding a new record into a table whose primary key is ID (autonumber).A duplicate key error message is being thrown (3022).Has anyone encountered this problem ? A compact and repair on the back-end database did not resolve the issue.I have confirmed with the client that they are subscribed to Office 365. > > Mark Simms > marksimms at verizon.net > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com From wrwehler at gmail.com Tue Dec 3 08:13:20 2019 From: wrwehler at gmail.com (Ryan W) Date: Tue, 3 Dec 2019 08:13:20 -0600 Subject: [AccessD] SQL Server (Linux) Message-ID: Have any of you spent any time with SQL Server on Linux? I just fired it up yesterday for testing. So far so good, other than the lack of Maintenance Plans and SSRS. Just looking for first hand experience. I know it should be the same, since it's technically running in a very small container or abstraction layer. From mar.ko at verizon.net Tue Dec 3 14:27:22 2019 From: mar.ko at verizon.net (Mark Simms) Date: Tue, 3 Dec 2019 20:27:22 +0000 (UTC) Subject: [AccessD] Office 365 update issue ? In-Reply-To: <6F24C493-8B85-42EB-9494-2A53620A157D@verizon.net> References: <1843284226.2396484.1575338918718.ref@mail.yahoo.com> <1843284226.2396484.1575338918718@mail.yahoo.com> <6F24C493-8B85-42EB-9494-2A53620A157D@verizon.net> Message-ID: <2064294740.2845002.1575404843004@mail.yahoo.com> Well the errors keep building....users now getting a 3340 error "query is corrupt" in a procedure that has not changed for years...as well as the UPDATE query.I need help on doing a rollback of some office 365 updates that obviously have occurred recently.Windows 10 environment. (Remember I had the problem with the database corruption that was resolved by a registry fix...Windows 10 only)Is it possible these new errors are also specific to Windows 10 as well ? Mark Simms marksimms at verizon.net -----Original Message----- From: Jim Dettman To: Access Developers discussion and problem solving Cc: Mark Simms Sent: Mon, Dec 2, 2019 9:24 pm Subject: Re: [AccessD] Office 365 update issue ? Actually not what I thought after re-reading.? Failures of auto numbers have occurred in the past. Sometimes a form of corruption.? ? You?ll need to reset the auto number value. Jim Sent from my iPhone > On Dec 2, 2019, at 9:08 PM, Mark Simms via AccessD wrote: > > VBA code that was working for over 4 years suddenly threw an error last week.It was basically adding a new record into a table whose primary key is ID (autonumber).A duplicate key error message is being thrown (3022).Has anyone encountered this problem ? A compact and repair on the back-end database did not resolve the issue.I have confirmed with the client that they are subscribed to Office 365. > > Mark Simms > marksimms at verizon.net > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com From jeff.developer at gmail.com Tue Dec 3 14:49:36 2019 From: jeff.developer at gmail.com (Jeff Barrows) Date: Tue, 3 Dec 2019 14:49:36 -0600 Subject: [AccessD] Office 365 update issue ? In-Reply-To: <2064294740.2845002.1575404843004@mail.yahoo.com> References: <1843284226.2396484.1575338918718.ref@mail.yahoo.com> <1843284226.2396484.1575338918718@mail.yahoo.com> <6F24C493-8B85-42EB-9494-2A53620A157D@verizon.net> <2064294740.2845002.1575404843004@mail.yahoo.com> Message-ID: <01df01d5aa1b$2d5064e0$87f12ea0$@gmail.com> Go online, the query issue is a known problem and the fix should already be out. I had the issue last week with half of my Office 365 installs. Check to see if there is an update available from within MS Access. Thank you, Jeff Barrows jeff.developer at gmail.com -----Original Message----- From: AccessD On Behalf Of Mark Simms via AccessD Sent: Tuesday, December 3, 2019 2:27 PM To: accessd at databaseadvisors.com Cc: Mark Simms Subject: Re: [AccessD] Office 365 update issue ? Well the errors keep building....users now getting a 3340 error "query is corrupt" in a procedure that has not changed for years...as well as the UPDATE query.I need help on doing a rollback of some office 365 updates that obviously have occurred recently.Windows 10 environment. (Remember I had the problem with the database corruption that was resolved by a registry fix...Windows 10 only)Is it possible these new errors are also specific to Windows 10 as well ? Mark Simms marksimms at verizon.net -----Original Message----- From: Jim Dettman To: Access Developers discussion and problem solving Cc: Mark Simms Sent: Mon, Dec 2, 2019 9:24 pm Subject: Re: [AccessD] Office 365 update issue ? Actually not what I thought after re-reading. Failures of auto numbers have occurred in the past. Sometimes a form of corruption. You?ll need to reset the auto number value. Jim Sent from my iPhone > On Dec 2, 2019, at 9:08 PM, Mark Simms via AccessD wrote: > > VBA code that was working for over 4 years suddenly threw an error last week.It was basically adding a new record into a table whose primary key is ID (autonumber).A duplicate key error message is being thrown (3022).Has anyone encountered this problem ? A compact and repair on the back-end database did not resolve the issue.I have confirmed with the client that they are subscribed to Office 365. > > Mark Simms > marksimms at verizon.net > > -- > 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 wrwehler at gmail.com Tue Dec 3 14:55:46 2019 From: wrwehler at gmail.com (Ryan W) Date: Tue, 3 Dec 2019 14:55:46 -0600 Subject: [AccessD] Office 365 update issue ? In-Reply-To: <2064294740.2845002.1575404843004@mail.yahoo.com> References: <1843284226.2396484.1575338918718.ref@mail.yahoo.com> <1843284226.2396484.1575338918718@mail.yahoo.com> <6F24C493-8B85-42EB-9494-2A53620A157D@verizon.net> <2064294740.2845002.1575404843004@mail.yahoo.com> Message-ID: query is corrupt is a patch that came down that was faulty.... you gotta back it out. On Tue, Dec 3, 2019 at 2:28 PM Mark Simms via AccessD < accessd at databaseadvisors.com> wrote: > Well the errors keep building....users now getting a 3340 error "query is > corrupt" in a procedure that has not changed for years...as well as the > UPDATE query.I need help on doing a rollback of some office 365 updates > that obviously have occurred recently.Windows 10 environment. (Remember I > had the problem with the database corruption that was resolved by a > registry fix...Windows 10 only)Is it possible these new errors are also > specific to Windows 10 as well ? > Mark Simms > marksimms at verizon.net > > > -----Original Message----- > From: Jim Dettman > To: Access Developers discussion and problem solving < > accessd at databaseadvisors.com> > Cc: Mark Simms > Sent: Mon, Dec 2, 2019 9:24 pm > Subject: Re: [AccessD] Office 365 update issue ? > > Actually not what I thought after re-reading. Failures of auto numbers > have occurred in the past. Sometimes a form of corruption. You?ll need > to reset the auto number value. > > Jim > > Sent from my iPhone > > > On Dec 2, 2019, at 9:08 PM, Mark Simms via AccessD < > accessd at databaseadvisors.com> wrote: > > > > VBA code that was working for over 4 years suddenly threw an error last > week.It was basically adding a new record into a table whose primary key is > ID (autonumber).A duplicate key error message is being thrown (3022).Has > anyone encountered this problem ? A compact and repair on the back-end > database did not resolve the issue.I have confirmed with the client that > they are subscribed to Office 365. > > > > Mark Simms > > marksimms at verizon.net > > > > -- > > 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 Dec 3 15:00:18 2019 From: jimdettman at verizon.net (Jim Dettman) Date: Tue, 3 Dec 2019 16:00:18 -0500 Subject: [AccessD] Office 365 update issue ? In-Reply-To: <2064294740.2845002.1575404843004@mail.yahoo.com> References: <1843284226.2396484.1575338918718.ref@mail.yahoo.com> <1843284226.2396484.1575338918718@mail.yahoo.com> <6F24C493-8B85-42EB-9494-2A53620A157D@verizon.net> <2064294740.2845002.1575404843004@mail.yahoo.com> Message-ID: <051301d5aa1c$aba10380$02e30a80$@verizon.net> Two separate problems, both of which I actually managed to hit already... Jim. -----Original Message----- From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Mark Simms via AccessD Sent: Tuesday, December 3, 2019 3:27 PM To: accessd at databaseadvisors.com Cc: Mark Simms Subject: Re: [AccessD] Office 365 update issue ? Well the errors keep building....users now getting a 3340 error "query is corrupt" in a procedure that has not changed for years...as well as the UPDATE query.I need help on doing a rollback of some office 365 updates that obviously have occurred recently.Windows 10 environment. (Remember I had the problem with the database corruption that was resolved by a registry fix...Windows 10 only)Is it possible these new errors are also specific to Windows 10 as well ? Mark Simms marksimms at verizon.net -----Original Message----- From: Jim Dettman To: Access Developers discussion and problem solving Cc: Mark Simms Sent: Mon, Dec 2, 2019 9:24 pm Subject: Re: [AccessD] Office 365 update issue ? Actually not what I thought after re-reading. Failures of auto numbers have occurred in the past. Sometimes a form of corruption. You?ll need to reset the auto number value. Jim Sent from my iPhone > On Dec 2, 2019, at 9:08 PM, Mark Simms via AccessD wrote: > > VBA code that was working for over 4 years suddenly threw an error last week.It was basically adding a new record into a table whose primary key is ID (autonumber).A duplicate key error message is being thrown (3022).Has anyone encountered this problem ? A compact and repair on the back-end database did not resolve the issue.I have confirmed with the client that they are subscribed to Office 365. > > Mark Simms > marksimms at verizon.net > > -- > 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 Tue Dec 3 15:57:44 2019 From: rockysmolin at bchacc.com (rockysmolin bchacc.com) Date: Tue, 3 Dec 2019 21:57:44 +0000 Subject: [AccessD] Office 365 update issue ? In-Reply-To: References: <1843284226.2396484.1575338918718.ref@mail.yahoo.com> <1843284226.2396484.1575338918718@mail.yahoo.com> <6F24C493-8B85-42EB-9494-2A53620A157D@verizon.net> <2064294740.2845002.1575404843004@mail.yahoo.com> Message-ID: Maybe this will help: https://support.office.com/en-us/article/access-error-query-is-corrupt-fad205a5-9fd4-49f1-be83-f21636caedec https://tinyurl.com/udosljf Rocky Smolin Beach Access Software 760-683-5777 www.bchacc.com www.e-z-mrp.com Skype: rocky.smolin -----Original Message----- From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Ryan W Sent: Tuesday, December 03, 2019 12:56 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Office 365 update issue ? query is corrupt is a patch that came down that was faulty.... you gotta back it out. On Tue, Dec 3, 2019 at 2:28 PM Mark Simms via AccessD < accessd at databaseadvisors.com> wrote: > Well the errors keep building....users now getting a 3340 error "query is > corrupt" in a procedure that has not changed for years...as well as the > UPDATE query.I need help on doing a rollback of some office 365 updates > that obviously have occurred recently.Windows 10 environment. (Remember I > had the problem with the database corruption that was resolved by a > registry fix...Windows 10 only)Is it possible these new errors are also > specific to Windows 10 as well ? > Mark Simms > marksimms at verizon.net > > > -----Original Message----- > From: Jim Dettman > To: Access Developers discussion and problem solving < > accessd at databaseadvisors.com> > Cc: Mark Simms > Sent: Mon, Dec 2, 2019 9:24 pm > Subject: Re: [AccessD] Office 365 update issue ? > > Actually not what I thought after re-reading. Failures of auto numbers > have occurred in the past. Sometimes a form of corruption. You?ll need > to reset the auto number value. > > Jim > > Sent from my iPhone > > > On Dec 2, 2019, at 9:08 PM, Mark Simms via AccessD < > accessd at databaseadvisors.com> wrote: > > > > VBA code that was working for over 4 years suddenly threw an error last > week.It was basically adding a new record into a table whose primary key is > ID (autonumber).A duplicate key error message is being thrown (3022).Has > anyone encountered this problem ? A compact and repair on the back-end > database did not resolve the issue.I have confirmed with the client that > they are subscribed to Office 365. > > > > Mark Simms > > marksimms at verizon.net > > > > -- > > 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 mar.ko at verizon.net Tue Dec 3 17:44:16 2019 From: mar.ko at verizon.net (Mark Simms) Date: Tue, 3 Dec 2019 23:44:16 +0000 (UTC) Subject: [AccessD] Office 365 update issue ? In-Reply-To: References: <1843284226.2396484.1575338918718.ref@mail.yahoo.com> <1843284226.2396484.1575338918718@mail.yahoo.com> <6F24C493-8B85-42EB-9494-2A53620A157D@verizon.net> <2064294740.2845002.1575404843004@mail.yahoo.com> Message-ID: <551542179.2883650.1575416656712@mail.yahoo.com> Thanks enormously for that Rocky.....The article pointed to another article on how to revert to previous Office 365 versions....and how to shutoff automatic updates. Mark Simms marksimms at verizon.net -----Original Message----- From: rockysmolin bchacc.com To: Access Developers discussion and problem solving Sent: Tue, Dec 3, 2019 4:58 pm Subject: Re: [AccessD] Office 365 update issue ? Maybe this will help: https://support.office.com/en-us/article/access-error-query-is-corrupt-fad205a5-9fd4-49f1-be83-f21636caedec https://tinyurl.com/udosljf Rocky Smolin Beach Access Software 760-683-5777 www.bchacc.com www.e-z-mrp.com Skype: rocky.smolin -----Original Message----- From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Ryan W Sent: Tuesday, December 03, 2019 12:56 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Office 365 update issue ? query is corrupt is a patch that came down that was faulty.... you gotta back it out. On Tue, Dec 3, 2019 at 2:28 PM Mark Simms via AccessD < accessd at databaseadvisors.com> wrote: > Well the errors keep building....users now getting a 3340 error "query is > corrupt" in a procedure that has not changed for years...as well as the > UPDATE query.I need help on doing a rollback of some office 365 updates > that obviously have occurred recently.Windows 10 environment. (Remember I > had the problem with the database corruption that was resolved by a > registry fix...Windows 10 only)Is it possible these new errors are also > specific to Windows 10 as well ? > Mark Simms > marksimms at verizon.net > > > -----Original Message----- > From: Jim Dettman > To: Access Developers discussion and problem solving < > accessd at databaseadvisors.com> > Cc: Mark Simms > Sent: Mon, Dec 2, 2019 9:24 pm > Subject: Re: [AccessD] Office 365 update issue ? > > Actually not what I thought after re-reading.? Failures of auto numbers > have occurred in the past. Sometimes a form of corruption.? ? You?ll need > to reset the auto number value. > > Jim > > Sent from my iPhone > > > On Dec 2, 2019, at 9:08 PM, Mark Simms via AccessD < > accessd at databaseadvisors.com> wrote: > > > > VBA code that was working for over 4 years suddenly threw an error last > week.It was basically adding a new record into a table whose primary key is > ID (autonumber).A duplicate key error message is being thrown (3022).Has > anyone encountered this problem ? A compact and repair on the back-end > database did not resolve the issue.I have confirmed with the client that > they are subscribed to Office 365. > > > > Mark Simms > > marksimms at verizon.net > > > > -- > > 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 Chester_Kaup at kindermorgan.com Wed Dec 4 09:57:10 2019 From: Chester_Kaup at kindermorgan.com (Kaup, Chester) Date: Wed, 4 Dec 2019 15:57:10 +0000 Subject: [AccessD] Problem with IIF statement Message-ID: <3b5098b9b5c045d18b19e0cdb754ec04@kindermorgan.com> I have the following IIF statement ProducerCount: IIf(Nz([Oil],0+Nz([Wtrp],0)+Nz([HCGas],0)+Nz([Co2P],0))>0,1,0) The value of Oil, Wtrp and CO2P are 0. The value of HCGas is 7258. The result of the IF statement is 0 I tried adding all 4 values together and got a sum of 7258. All values are defined a type double in the source table. I don't understand what is happening. Maybe there is a better way to write the query. Thanks for your assistance. From gustav at cactus.dk Wed Dec 4 10:00:40 2019 From: gustav at cactus.dk (Gustav Brock) Date: Wed, 4 Dec 2019 16:00:40 +0000 Subject: [AccessD] Problem with IIF statement In-Reply-To: <3b5098b9b5c045d18b19e0cdb754ec04@kindermorgan.com> References: <3b5098b9b5c045d18b19e0cdb754ec04@kindermorgan.com> Message-ID: Hi Chester Try with this correction: ProducerCount: IIf(Nz([Oil],0)+Nz([Wtrp],0)+Nz([HCGas],0)+Nz([Co2P],0)>0,1,0) /gustav -----Oprindelig meddelelse----- Fra: AccessD P? vegne af Kaup, Chester Sendt: 4. december 2019 16:57 Til: 'Access Developers discussion and problem solving' Emne: [AccessD] Problem with IIF statement I have the following IIF statement ProducerCount: IIf(Nz([Oil],0+Nz([Wtrp],0)+Nz([HCGas],0)+Nz([Co2P],0))>0,1,0) The value of Oil, Wtrp and CO2P are 0. The value of HCGas is 7258. The result of the IF statement is 0 I tried adding all 4 values together and got a sum of 7258. All values are defined a type double in the source table. I don't understand what is happening. Maybe there is a better way to write the query. Thanks for your assistance. From wrwehler at gmail.com Wed Dec 4 10:01:31 2019 From: wrwehler at gmail.com (Ryan W) Date: Wed, 4 Dec 2019 10:01:31 -0600 Subject: [AccessD] Problem with IIF statement In-Reply-To: <3b5098b9b5c045d18b19e0cdb754ec04@kindermorgan.com> References: <3b5098b9b5c045d18b19e0cdb754ec04@kindermorgan.com> Message-ID: First glance you're missing a right Paren on the first Nz([Oil,0 piece of code and/or it appears you have it way out before your less than sign? On Wed, Dec 4, 2019 at 9:57 AM Kaup, Chester wrote: > I have the following IIF statement > > ProducerCount: > IIf(Nz([Oil],0+Nz([Wtrp],0)+Nz([HCGas],0)+Nz([Co2P],0))>0,1,0) > > The value of Oil, Wtrp and CO2P are 0. The value of HCGas is 7258. The > result of the IF statement is 0 > > I tried adding all 4 values together and got a sum of 7258. All values are > defined a type double in the source table. > > I don't understand what is happening. Maybe there is a better way to write > the query. > > Thanks for your assistance. > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > From Chester_Kaup at kindermorgan.com Wed Dec 4 10:08:58 2019 From: Chester_Kaup at kindermorgan.com (Kaup, Chester) Date: Wed, 4 Dec 2019 16:08:58 +0000 Subject: [AccessD] Problem with IIF statement In-Reply-To: References: <3b5098b9b5c045d18b19e0cdb754ec04@kindermorgan.com> Message-ID: <265f97fc876c47e19c50f30f9829960b@kindermorgan.com> Thank You very much. Been looking at it too long. -----Original Message----- From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Gustav Brock via AccessD Sent: Wednesday, December 04, 2019 10:01 AM To: Access Developers discussion and problem solving Cc: Gustav Brock Subject: Re: [AccessD] Problem with IIF statement [This email message was received from the Internet and came from outside of Kinder Morgan] Hi Chester Try with this correction: ProducerCount: IIf(Nz([Oil],0)+Nz([Wtrp],0)+Nz([HCGas],0)+Nz([Co2P],0)>0,1,0) /gustav -----Oprindelig meddelelse----- Fra: AccessD P? vegne af Kaup, Chester Sendt: 4. december 2019 16:57 Til: 'Access Developers discussion and problem solving' Emne: [AccessD] Problem with IIF statement I have the following IIF statement ProducerCount: IIf(Nz([Oil],0+Nz([Wtrp],0)+Nz([HCGas],0)+Nz([Co2P],0))>0,1,0) The value of Oil, Wtrp and CO2P are 0. The value of HCGas is 7258. The result of the IF statement is 0 I tried adding all 4 values together and got a sum of 7258. All values are defined a type double in the source table. I don't understand what is happening. Maybe there is a better way to write the query. Thanks for your assistance. -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From mar.ko at verizon.net Wed Dec 4 18:28:43 2019 From: mar.ko at verizon.net (Mark Simms) Date: Thu, 5 Dec 2019 00:28:43 +0000 (UTC) Subject: [AccessD] Office 365 update issue ? In-Reply-To: <551542179.2883650.1575416656712@mail.yahoo.com> References: <1843284226.2396484.1575338918718.ref@mail.yahoo.com> <1843284226.2396484.1575338918718@mail.yahoo.com> <6F24C493-8B85-42EB-9494-2A53620A157D@verizon.net> <2064294740.2845002.1575404843004@mail.yahoo.com> <551542179.2883650.1575416656712@mail.yahoo.com> Message-ID: <2036129402.3603087.1575505723258@mail.yahoo.com> I just discovered MSFT came out with an updated Office 365 update dated 12/3/2019...version 1911.Hopefully this fixes the problems caused by the earlier faulty updates. Mark Simms marksimms at verizon.net -----Original Message----- From: Mark Simms via AccessD To: accessd Cc: Mark Simms Sent: Tue, Dec 3, 2019 6:45 pm Subject: Re: [AccessD] Office 365 update issue ? Thanks enormously for that Rocky.....The article pointed to another article on how to revert to previous Office 365 versions....and how to shutoff automatic updates. Mark Simms marksimms at verizon.net -----Original Message----- From: rockysmolin bchacc.com To: Access Developers discussion and problem solving Sent: Tue, Dec 3, 2019 4:58 pm Subject: Re: [AccessD] Office 365 update issue ? Maybe this will help: https://support.office.com/en-us/article/access-error-query-is-corrupt-fad205a5-9fd4-49f1-be83-f21636caedec https://tinyurl.com/udosljf Rocky Smolin Beach Access Software 760-683-5777 www.bchacc.com www.e-z-mrp.com Skype: rocky.smolin -----Original Message----- From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Ryan W Sent: Tuesday, December 03, 2019 12:56 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Office 365 update issue ? query is corrupt is a patch that came down that was faulty.... you gotta back it out. On Tue, Dec 3, 2019 at 2:28 PM Mark Simms via AccessD < accessd at databaseadvisors.com> wrote: > Well the errors keep building....users now getting a 3340 error "query is > corrupt" in a procedure that has not changed for years...as well as the > UPDATE query.I need help on doing a rollback of some office 365 updates > that obviously have occurred recently.Windows 10 environment. (Remember I > had the problem with the database corruption that was resolved by a > registry fix...Windows 10 only)Is it possible these new errors are also > specific to Windows 10 as well ? > Mark Simms > marksimms at verizon.net > > > -----Original Message----- > From: Jim Dettman > To: Access Developers discussion and problem solving < > accessd at databaseadvisors.com> > Cc: Mark Simms > Sent: Mon, Dec 2, 2019 9:24 pm > Subject: Re: [AccessD] Office 365 update issue ? > > Actually not what I thought after re-reading.? Failures of auto numbers > have occurred in the past. Sometimes a form of corruption.? ? You?ll need > to reset the auto number value. > > Jim > > Sent from my iPhone > > > On Dec 2, 2019, at 9:08 PM, Mark Simms via AccessD < > accessd at databaseadvisors.com> wrote: > > > > VBA code that was working for over 4 years suddenly threw an error last > week.It was basically adding a new record into a table whose primary key is > ID (autonumber).A duplicate key error message is being thrown (3022).Has > anyone encountered this problem ? A compact and repair on the back-end > database did not resolve the issue.I have confirmed with the client that > they are subscribed to Office 365. > > > > Mark Simms > > marksimms at verizon.net > > > > -- > > 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 accessd at shaw.ca Sun Dec 8 01:39:29 2019 From: accessd at shaw.ca (Jim Lawrence) Date: Sun, 8 Dec 2019 00:39:29 -0700 (MST) Subject: [AccessD] SQL Server (Linux) In-Reply-To: References: Message-ID: <1703291017.753823682.1575790769094.JavaMail.zimbra@shaw.ca> I have been planning to do that for months but have kept putting it off...too many other things that seem important. Which version of Linux as you using? Was the installation straight-forward or did it require some level of complexity? How are you integrating it with your Microsoft FE applications? Anything else that we here should know. Please keep me posted. Jim ----- Original Message ----- From: "Ryan W" To: "Access Developers discussion and problem solving" Sent: Tuesday, December 3, 2019 6:13:20 AM Subject: [AccessD] SQL Server (Linux) Have any of you spent any time with SQL Server on Linux? I just fired it up yesterday for testing. So far so good, other than the lack of Maintenance Plans and SSRS. Just looking for first hand experience. I know it should be the same, since it's technically running in a very small container or abstraction layer. -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From wrwehler at gmail.com Sun Dec 8 08:43:52 2019 From: wrwehler at gmail.com (Ryan W) Date: Sun, 8 Dec 2019 08:43:52 -0600 Subject: [AccessD] SQL Server (Linux) In-Reply-To: <1703291017.753823682.1575790769094.JavaMail.zimbra@shaw.ca> References: <1703291017.753823682.1575790769094.JavaMail.zimbra@shaw.ca> Message-ID: <3A66F372-3A7D-4836-83B5-93D0EC44D9B7@gmail.com> CentOS 7 and the QuickStart guide to add the repos and run the config was easy as pie. This would replace my aging sql server 2008 instance and we would still use our access FE. SSRS is not available under Linux and the transaction level backup option on veeam backup and replication doesn?t work on linux so I?m not sure if I?ll stick with it or not since I like periodic transaction log backups. I guess this is a Linux limitation for veeam at the moment Sent from my iPhone > On Dec 8, 2019, at 1:40 AM, Jim Lawrence wrote: > > ?I have been planning to do that for months but have kept putting it off...too many other things that seem important. > > Which version of Linux as you using? Was the installation straight-forward or did it require some level of complexity? How are you integrating it with your Microsoft FE applications? > > Anything else that we here should know. Please keep me posted. > > Jim > > ----- Original Message ----- > From: "Ryan W" > To: "Access Developers discussion and problem solving" > Sent: Tuesday, December 3, 2019 6:13:20 AM > Subject: [AccessD] SQL Server (Linux) > > Have any of you spent any time with SQL Server on Linux? I just fired it up > yesterday for testing. So far so good, other than the lack of Maintenance > Plans and SSRS. > > Just looking for first hand experience. I know it should be the same, > since it's technically running in a very small container or abstraction > layer. > -- > 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 Sun Dec 8 22:34:28 2019 From: accessd at shaw.ca (Jim Lawrence) Date: Sun, 8 Dec 2019 21:34:28 -0700 (MST) Subject: [AccessD] SQL Server (Linux) In-Reply-To: <3A66F372-3A7D-4836-83B5-93D0EC44D9B7@gmail.com> References: <1703291017.753823682.1575790769094.JavaMail.zimbra@shaw.ca> <3A66F372-3A7D-4836-83B5-93D0EC44D9B7@gmail.com> Message-ID: <200621385.757942711.1575866068916.JavaMail.zimbra@shaw.ca> Thank you for that. I am also tired of my own old 2008 SQL server instance. You have given me some encouragement to go the next step. There will probably be a number of features that do not appear to work under Linux but if tradition holds true there is always work-arounds. If I discover any solutions I will post you. Jim ----- Original Message ----- From: "Ryan W" To: "Access Developers discussion and problem solving" Sent: Sunday, December 8, 2019 6:43:52 AM Subject: Re: [AccessD] SQL Server (Linux) CentOS 7 and the QuickStart guide to add the repos and run the config was easy as pie. This would replace my aging sql server 2008 instance and we would still use our access FE. SSRS is not available under Linux and the transaction level backup option on veeam backup and replication doesn?t work on linux so I?m not sure if I?ll stick with it or not since I like periodic transaction log backups. I guess this is a Linux limitation for veeam at the moment Sent from my iPhone > On Dec 8, 2019, at 1:40 AM, Jim Lawrence wrote: > > ?I have been planning to do that for months but have kept putting it off...too many other things that seem important. > > Which version of Linux as you using? Was the installation straight-forward or did it require some level of complexity? How are you integrating it with your Microsoft FE applications? > > Anything else that we here should know. Please keep me posted. > > Jim > > ----- Original Message ----- > From: "Ryan W" > To: "Access Developers discussion and problem solving" > Sent: Tuesday, December 3, 2019 6:13:20 AM > Subject: [AccessD] SQL Server (Linux) > > Have any of you spent any time with SQL Server on Linux? I just fired it up > yesterday for testing. So far so good, other than the lack of Maintenance > Plans and SSRS. > > Just looking for first hand experience. I know it should be the same, > since it's technically running in a very small container or abstraction > layer. > -- > 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 Chester_Kaup at kindermorgan.com Mon Dec 9 11:15:16 2019 From: Chester_Kaup at kindermorgan.com (Kaup, Chester) Date: Mon, 9 Dec 2019 17:15:16 +0000 Subject: [AccessD] Query not returning desired results Message-ID: <3089055ba6274f73bc2c3bf8b7cca8ae@kindermorgan.com> I have a query in which I want to exclude records when one field equals a certain value and another field in the same record is null. So far it have been unsuccessful after several attempts of moving around parenthesis. Here is my statement. I defer to and appreciate the assistance of other members WHERE ((([tbl 3 Month Running Inj Data].Other_Pattern)<>"PAT 28-5A" And ([tbl 3 Month Running Inj Data].Other_Pattern)<>"PAT 56-6A") AND (([tbl 3 Month Running Inj Data].Other_Pattern_as_Well_API) Is Null) AND ((Allocations.Date)=#11/1/1948#)) Also tried this WHERE (([tbl 3 Month Running Inj Data].Other_Pattern<>"PAT 28-5A" AND [tbl 3 Month Running Inj Data].Other_Pattern<>"PAT 56-6A" AND [tbl 3 Month Running Inj Data].Other_Pattern_as_Well_API Is Null) AND Allocations.Date=#11/1/1948#) From gustav at cactus.dk Mon Dec 9 12:17:28 2019 From: gustav at cactus.dk (Gustav Brock) Date: Mon, 9 Dec 2019 18:17:28 +0000 Subject: [AccessD] Query not returning desired results In-Reply-To: <3089055ba6274f73bc2c3bf8b7cca8ae@kindermorgan.com> References: <3089055ba6274f73bc2c3bf8b7cca8ae@kindermorgan.com> Message-ID: Hi Chester > one field equals a certain value but you have that field to exclude two certain values. /gustav ________________________________ Fra: AccessD p? vegne af Kaup, Chester Sendt: 9. december 2019 18:15 Til: 'Access Developers discussion and problem solving' Emne: [AccessD] Query not returning desired results I have a query in which I want to exclude records when one field equals a certain value and another field in the same record is null. So far it have been unsuccessful after several attempts of moving around parenthesis. Here is my statement. I defer to and appreciate the assistance of other members WHERE ((([tbl 3 Month Running Inj Data].Other_Pattern)<>"PAT 28-5A" And ([tbl 3 Month Running Inj Data].Other_Pattern)<>"PAT 56-6A") AND (([tbl 3 Month Running Inj Data].Other_Pattern_as_Well_API) Is Null) AND ((Allocations.Date)=#11/1/1948#)) Also tried this WHERE (([tbl 3 Month Running Inj Data].Other_Pattern<>"PAT 28-5A" AND [tbl 3 Month Running Inj Data].Other_Pattern<>"PAT 56-6A" AND [tbl 3 Month Running Inj Data].Other_Pattern_as_Well_API Is Null) AND Allocations.Date=#11/1/1948#) -- From stuart at lexacorp.com.pg Mon Dec 9 14:54:08 2019 From: stuart at lexacorp.com.pg (Stuart McLachlan) Date: Tue, 10 Dec 2019 06:54:08 +1000 Subject: [AccessD] Query not returning desired results In-Reply-To: <3089055ba6274f73bc2c3bf8b7cca8ae@kindermorgan.com> References: <3089055ba6274f73bc2c3bf8b7cca8ae@kindermorgan.com> Message-ID: <5DEEB470.15211.137804A7@stuart.lexacorp.com.pg> hey are all AND conditions, so for a start, just get rid of all parentheses. On 9 Dec 2019 at 17:15, Kaup, Chester wrote: > I have a query in which I want to exclude records when one field > equals a certain value and another field in the same record is null. > So far it have been unsuccessful after several attempts of moving > around parenthesis. Here is my statement. I defer to and appreciate > the assistance of other members > > WHERE ((([tbl 3 Month Running Inj Data].Other_Pattern)<>"PAT 28-5A" > And ([tbl 3 Month Running Inj Data].Other_Pattern)<>"PAT 56-6A") AND > (([tbl 3 Month Running Inj Data].Other_Pattern_as_Well_API) Is Null) > AND ((Allocations.Date)=#11/1/1948#)) > > Also tried this > > WHERE (([tbl 3 Month Running Inj Data].Other_Pattern<>"PAT 28-5A" AND > [tbl 3 Month Running Inj Data].Other_Pattern<>"PAT 56-6A" AND [tbl 3 > Month Running Inj Data].Other_Pattern_as_Well_API Is Null) AND > Allocations.Date=#11/1/1948#) > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > From Chester_Kaup at kindermorgan.com Tue Dec 10 08:19:20 2019 From: Chester_Kaup at kindermorgan.com (Kaup, Chester) Date: Tue, 10 Dec 2019 14:19:20 +0000 Subject: [AccessD] Query not returning desired results In-Reply-To: References: <3089055ba6274f73bc2c3bf8b7cca8ae@kindermorgan.com> Message-ID: I am not following what you are saying. Please elaborate. -----Original Message----- From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Gustav Brock via AccessD Sent: Monday, December 09, 2019 12:17 PM To: Access Developers discussion and problem solving Cc: Gustav Brock Subject: Re: [AccessD] Query not returning desired results [This email message was received from the Internet and came from outside of Kinder Morgan] Hi Chester > one field equals a certain value but you have that field to exclude two certain values. /gustav ________________________________ Fra: AccessD p? vegne af Kaup, Chester Sendt: 9. december 2019 18:15 Til: 'Access Developers discussion and problem solving' Emne: [AccessD] Query not returning desired results I have a query in which I want to exclude records when one field equals a certain value and another field in the same record is null. So far it have been unsuccessful after several attempts of moving around parenthesis. Here is my statement. I defer to and appreciate the assistance of other members WHERE ((([tbl 3 Month Running Inj Data].Other_Pattern)<>"PAT 28-5A" And ([tbl 3 Month Running Inj Data].Other_Pattern)<>"PAT 56-6A") AND (([tbl 3 Month Running Inj Data].Other_Pattern_as_Well_API) Is Null) AND ((Allocations.Date)=#11/1/1948#)) Also tried this WHERE (([tbl 3 Month Running Inj Data].Other_Pattern<>"PAT 28-5A" AND [tbl 3 Month Running Inj Data].Other_Pattern<>"PAT 56-6A" AND [tbl 3 Month Running Inj Data].Other_Pattern_as_Well_API Is Null) AND Allocations.Date=#11/1/1948#) -- -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From Chester_Kaup at kindermorgan.com Tue Dec 10 08:20:47 2019 From: Chester_Kaup at kindermorgan.com (Kaup, Chester) Date: Tue, 10 Dec 2019 14:20:47 +0000 Subject: [AccessD] Query not returning desired results In-Reply-To: <5DEEB470.15211.137804A7@stuart.lexacorp.com.pg> References: <3089055ba6274f73bc2c3bf8b7cca8ae@kindermorgan.com> <5DEEB470.15211.137804A7@stuart.lexacorp.com.pg> Message-ID: <8a7b1bfc291a4f559120e5ee09949e6a@kindermorgan.com> Got rid of all the unneeded parentheses but still got the same incorrect result. Thanks for the help. -----Original Message----- From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Stuart McLachlan Sent: Monday, December 09, 2019 2:54 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Query not returning desired results [This email message was received from the Internet and came from outside of Kinder Morgan] hey are all AND conditions, so for a start, just get rid of all parentheses. On 9 Dec 2019 at 17:15, Kaup, Chester wrote: > I have a query in which I want to exclude records when one field > equals a certain value and another field in the same record is null. > So far it have been unsuccessful after several attempts of moving > around parenthesis. Here is my statement. I defer to and appreciate > the assistance of other members > > WHERE ((([tbl 3 Month Running Inj Data].Other_Pattern)<>"PAT 28-5A" > And ([tbl 3 Month Running Inj Data].Other_Pattern)<>"PAT 56-6A") AND > (([tbl 3 Month Running Inj Data].Other_Pattern_as_Well_API) Is Null) > AND ((Allocations.Date)=#11/1/1948#)) > > Also tried this > > WHERE (([tbl 3 Month Running Inj Data].Other_Pattern<>"PAT 28-5A" AND > [tbl 3 Month Running Inj Data].Other_Pattern<>"PAT 56-6A" AND [tbl 3 > Month Running Inj Data].Other_Pattern_as_Well_API Is Null) AND > Allocations.Date=#11/1/1948#) > > -- > 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 paul.hartland at googlemail.com Tue Dec 10 08:44:40 2019 From: paul.hartland at googlemail.com (Paul Hartland) Date: Tue, 10 Dec 2019 14:44:40 +0000 Subject: [AccessD] Query not returning desired results In-Reply-To: <8a7b1bfc291a4f559120e5ee09949e6a@kindermorgan.com> References: <3089055ba6274f73bc2c3bf8b7cca8ae@kindermorgan.com> <5DEEB470.15211.137804A7@stuart.lexacorp.com.pg> <8a7b1bfc291a4f559120e5ee09949e6a@kindermorgan.com> Message-ID: What is the full query, maybe there is something slightly wrong in the from sql as your referencing two tables in the where, may make a little more sense to see the full query. Paul On Tue, 10 Dec 2019, 14:21 Kaup, Chester, wrote: > Got rid of all the unneeded parentheses but still got the same incorrect > result. Thanks for the help. > > -----Original Message----- > From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of > Stuart McLachlan > Sent: Monday, December 09, 2019 2:54 PM > To: Access Developers discussion and problem solving > Subject: Re: [AccessD] Query not returning desired results > > [This email message was received from the Internet and came from outside > of Kinder Morgan] > > > hey are all AND conditions, so for a start, just get rid of all > parentheses. > > > On 9 Dec 2019 at 17:15, Kaup, Chester wrote: > > > I have a query in which I want to exclude records when one field > > equals a certain value and another field in the same record is null. > > So far it have been unsuccessful after several attempts of moving > > around parenthesis. Here is my statement. I defer to and appreciate > > the assistance of other members > > > > WHERE ((([tbl 3 Month Running Inj Data].Other_Pattern)<>"PAT 28-5A" > > And ([tbl 3 Month Running Inj Data].Other_Pattern)<>"PAT 56-6A") AND > > (([tbl 3 Month Running Inj Data].Other_Pattern_as_Well_API) Is Null) > > AND ((Allocations.Date)=#11/1/1948#)) > > > > Also tried this > > > > WHERE (([tbl 3 Month Running Inj Data].Other_Pattern<>"PAT 28-5A" AND > > [tbl 3 Month Running Inj Data].Other_Pattern<>"PAT 56-6A" AND [tbl 3 > > Month Running Inj Data].Other_Pattern_as_Well_API Is Null) AND > > Allocations.Date=#11/1/1948#) > > > > -- > > 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 Chester_Kaup at kindermorgan.com Tue Dec 10 08:51:40 2019 From: Chester_Kaup at kindermorgan.com (Kaup, Chester) Date: Tue, 10 Dec 2019 14:51:40 +0000 Subject: [AccessD] Query not returning desired results In-Reply-To: References: <3089055ba6274f73bc2c3bf8b7cca8ae@kindermorgan.com> <5DEEB470.15211.137804A7@stuart.lexacorp.com.pg> <8a7b1bfc291a4f559120e5ee09949e6a@kindermorgan.com> Message-ID: Here is the whole query. Thanks for looking at this SELECT [qry 3 Months Running Injection Data Totals].Well_In_CO2PAT, [tbl 3 Month Running Inj Data].Well_in_CO2PAT_API, [tbl 3 Month Running Inj Data].ProductionMonth, [tbl 3 Month Running Inj Data].Other_Pattern, [tbl 3 Month Running Inj Data].Other_Pattern_as_Well, [tbl 3 Month Running Inj Data].Other_Pattern_as_Well_API, [tbl 3 Month Running Inj Data].[3mo_rbi], [qry 3 Months Running Injection Data Totals].SumOf3mo_rbi, IIf([SumOf3mo_rbi]=0,Allocations.Factor_2,[3mo_rbi]/[SumOf3mo_rbi]) AS Factor_2 INTO [tbl 3 Month Factor 2] FROM ([qry 3 Months Running Injection Data Totals] INNER JOIN [tbl 3 Month Running Inj Data] ON ([qry 3 Months Running Injection Data Totals].Well_in_CO2PAT_API = [tbl 3 Month Running Inj Data].Well_in_CO2PAT_API) AND ([qry 3 Months Running Injection Data Totals].ProductionMonth = [tbl 3 Month Running Inj Data].ProductionMonth)) INNER JOIN Allocations ON ([tbl 3 Month Running Inj Data].Well_in_CO2PAT_API = Allocations.ChildPID) AND ([tbl 3 Month Running Inj Data].Other_Pattern = Allocations.PID) WHERE [tbl 3 Month Running Inj Data].Other_Pattern<>"PAT 28-5A" And [tbl 3 Month Running Inj Data].Other_Pattern<>"PAT 56-6A" AND [tbl 3 Month Running Inj Data].Other_Pattern_as_Well_API Is Null AND Allocations.Date=#11/1/1948# GROUP BY [qry 3 Months Running Injection Data Totals].Well_In_CO2PAT, [tbl 3 Month Running Inj Data].Well_in_CO2PAT_API, [tbl 3 Month Running Inj Data].ProductionMonth, [tbl 3 Month Running Inj Data].Other_Pattern, [tbl 3 Month Running Inj Data].Other_Pattern_as_Well, [tbl 3 Month Running Inj Data].Other_Pattern_as_Well_API, [tbl 3 Month Running Inj Data].[3mo_rbi], [qry 3 Months Running Injection Data Totals].SumOf3mo_rbi, IIf([SumOf3mo_rbi]=0,Allocations.Factor_2,[3mo_rbi]/[SumOf3mo_rbi]); -----Original Message----- From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Paul Hartland via AccessD Sent: Tuesday, December 10, 2019 8:45 AM To: Access Developers discussion and problem solving Cc: Paul Hartland Subject: Re: [AccessD] Query not returning desired results [This email message was received from the Internet and came from outside of Kinder Morgan] What is the full query, maybe there is something slightly wrong in the from sql as your referencing two tables in the where, may make a little more sense to see the full query. Paul On Tue, 10 Dec 2019, 14:21 Kaup, Chester, wrote: > Got rid of all the unneeded parentheses but still got the same incorrect > result. Thanks for the help. > > -----Original Message----- > From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of > Stuart McLachlan > Sent: Monday, December 09, 2019 2:54 PM > To: Access Developers discussion and problem solving > Subject: Re: [AccessD] Query not returning desired results > > [This email message was received from the Internet and came from outside > of Kinder Morgan] > > > hey are all AND conditions, so for a start, just get rid of all > parentheses. > > > On 9 Dec 2019 at 17:15, Kaup, Chester wrote: > > > I have a query in which I want to exclude records when one field > > equals a certain value and another field in the same record is null. > > So far it have been unsuccessful after several attempts of moving > > around parenthesis. Here is my statement. I defer to and appreciate > > the assistance of other members > > > > WHERE ((([tbl 3 Month Running Inj Data].Other_Pattern)<>"PAT 28-5A" > > And ([tbl 3 Month Running Inj Data].Other_Pattern)<>"PAT 56-6A") AND > > (([tbl 3 Month Running Inj Data].Other_Pattern_as_Well_API) Is Null) > > AND ((Allocations.Date)=#11/1/1948#)) > > > > Also tried this > > > > WHERE (([tbl 3 Month Running Inj Data].Other_Pattern<>"PAT 28-5A" AND > > [tbl 3 Month Running Inj Data].Other_Pattern<>"PAT 56-6A" AND [tbl 3 > > Month Running Inj Data].Other_Pattern_as_Well_API Is Null) AND > > Allocations.Date=#11/1/1948#) > > > > -- > > 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 Tue Dec 10 08:56:29 2019 From: gustav at cactus.dk (Gustav Brock) Date: Tue, 10 Dec 2019 14:56:29 +0000 Subject: [AccessD] Query not returning desired results Message-ID: Hi Chester You have: <>"PAT 28-5A" and: <>"PAT 56-6A" That excludes certain values, it doesn't include. /gustav -----Oprindelig meddelelse----- Fra: AccessD P? vegne af Kaup, Chester Sendt: 10. december 2019 15:19 Til: 'Access Developers discussion and problem solving' Emne: Re: [AccessD] Query not returning desired results I am not following what you are saying. Please elaborate. -----Original Message----- From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Gustav Brock via AccessD Sent: Monday, December 09, 2019 12:17 PM To: Access Developers discussion and problem solving Cc: Gustav Brock Subject: Re: [AccessD] Query not returning desired results [This email message was received from the Internet and came from outside of Kinder Morgan] Hi Chester > one field equals a certain value but you have that field to exclude two certain values. /gustav ________________________________ Fra: AccessD p? vegne af Kaup, Chester Sendt: 9. december 2019 18:15 Til: 'Access Developers discussion and problem solving' Emne: [AccessD] Query not returning desired results I have a query in which I want to exclude records when one field equals a certain value and another field in the same record is null. So far it have been unsuccessful after several attempts of moving around parenthesis. Here is my statement. I defer to and appreciate the assistance of other members WHERE ((([tbl 3 Month Running Inj Data].Other_Pattern)<>"PAT 28-5A" And ([tbl 3 Month Running Inj Data].Other_Pattern)<>"PAT 56-6A") AND (([tbl 3 Month Running Inj Data].Other_Pattern_as_Well_API) Is Null) AND ((Allocations.Date)=#11/1/1948#)) Also tried this WHERE (([tbl 3 Month Running Inj Data].Other_Pattern<>"PAT 28-5A" AND [tbl 3 Month Running Inj Data].Other_Pattern<>"PAT 56-6A" AND [tbl 3 Month Running Inj Data].Other_Pattern_as_Well_API Is Null) AND Allocations.Date=#11/1/1948#) From stuart at lexacorp.com.pg Tue Dec 10 09:00:33 2019 From: stuart at lexacorp.com.pg (Stuart McLachlan) Date: Wed, 11 Dec 2019 01:00:33 +1000 Subject: [AccessD] Query not returning desired results In-Reply-To: <8a7b1bfc291a4f559120e5ee09949e6a@kindermorgan.com> References: <3089055ba6274f73bc2c3bf8b7cca8ae@kindermorgan.com>, <5DEEB470.15211.137804A7@stuart.lexacorp.com.pg>, <8a7b1bfc291a4f559120e5ee09949e6a@kindermorgan.com> Message-ID: <5DEFB311.6804.175AAA3D@stuart.lexacorp.com.pg> You said: "where one field equals a certain value and another field is null" but that's not what your code does. It includes all values for Other_Pattern except two. On 10 Dec 2019 at 14:20, Kaup, Chester wrote: > Got rid of all the unneeded parentheses but still got the same > incorrect result. Thanks for the help. > > -----Original Message----- > From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf > Of Stuart McLachlan Sent: Monday, December 09, 2019 2:54 PM To: Access > Developers discussion and problem solving Subject: Re: [AccessD] Query > not returning desired results > > [This email message was received from the Internet and came from > outside of Kinder Morgan] > > > hey are all AND conditions, so for a start, just get rid of all > parentheses. > > > On 9 Dec 2019 at 17:15, Kaup, Chester wrote: > > > I have a query in which I want to exclude records when one field > > equals a certain value and another field in the same record is null. > > So far it have been unsuccessful after several attempts of moving > > around parenthesis. Here is my statement. I defer to and appreciate > > the assistance of other members > > > > WHERE ((([tbl 3 Month Running Inj Data].Other_Pattern)<>"PAT 28-5A" > > And ([tbl 3 Month Running Inj Data].Other_Pattern)<>"PAT 56-6A") AND > > (([tbl 3 Month Running Inj Data].Other_Pattern_as_Well_API) Is Null) > > AND ((Allocations.Date)=#11/1/1948#)) > > > > Also tried this > > > > WHERE (([tbl 3 Month Running Inj Data].Other_Pattern<>"PAT 28-5A" > > AND [tbl 3 Month Running Inj Data].Other_Pattern<>"PAT 56-6A" AND > > [tbl 3 Month Running Inj Data].Other_Pattern_as_Well_API Is Null) > > AND Allocations.Date=#11/1/1948#) > > > > -- > > 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 paul.hartland at googlemail.com Tue Dec 10 09:07:19 2019 From: paul.hartland at googlemail.com (Paul Hartland) Date: Tue, 10 Dec 2019 15:07:19 +0000 Subject: [AccessD] Query not returning desired results In-Reply-To: References: <3089055ba6274f73bc2c3bf8b7cca8ae@kindermorgan.com> <5DEEB470.15211.137804A7@stuart.lexacorp.com.pg> <8a7b1bfc291a4f559120e5ee09949e6a@kindermorgan.com> Message-ID: This bit looks ok as long as its the correct fields linking, believe me done that moee than once & sat there wondering why things don't work lol, then in theory the results of the query should be correct, if I had access on my laptop at home I would ask if you minded sending me a bit of the data from each table & try to help more, but without seeing the data in two tables its a bit hard to see why it may be returning the incorrect results. INNER JOIN Allocations ON ([tbl 3 Month Running Inj Data].Well_in_CO2PAT_API = Allocations.ChildPID) AND ([tbl 3 Month Running Inj Data].Other_Pattern = Allocations.PID) On Tue, 10 Dec 2019, 14:52 Kaup, Chester, wrote: > Here is the whole query. Thanks for looking at this > > SELECT [qry 3 Months Running Injection Data Totals].Well_In_CO2PAT, > [tbl 3 Month Running Inj Data].Well_in_CO2PAT_API, > [tbl 3 Month Running Inj Data].ProductionMonth, > [tbl 3 Month Running Inj Data].Other_Pattern, > [tbl 3 Month Running Inj Data].Other_Pattern_as_Well, > [tbl 3 Month Running Inj Data].Other_Pattern_as_Well_API, > [tbl 3 Month Running Inj Data].[3mo_rbi], > [qry 3 Months Running Injection Data Totals].SumOf3mo_rbi, > IIf([SumOf3mo_rbi]=0,Allocations.Factor_2,[3mo_rbi]/[SumOf3mo_rbi]) AS > Factor_2 INTO [tbl 3 Month Factor 2] > FROM ([qry 3 Months Running Injection Data Totals] > INNER JOIN [tbl 3 Month Running Inj Data] ON ([qry 3 Months Running > Injection Data Totals].Well_in_CO2PAT_API = [tbl 3 Month Running Inj > Data].Well_in_CO2PAT_API) > AND ([qry 3 Months Running Injection Data Totals].ProductionMonth = [tbl 3 > Month Running Inj Data].ProductionMonth)) > INNER JOIN Allocations ON ([tbl 3 Month Running Inj > Data].Well_in_CO2PAT_API = Allocations.ChildPID) > AND ([tbl 3 Month Running Inj Data].Other_Pattern = Allocations.PID) > WHERE [tbl 3 Month Running Inj Data].Other_Pattern<>"PAT 28-5A" > And [tbl 3 Month Running Inj Data].Other_Pattern<>"PAT 56-6A" > AND [tbl 3 Month Running Inj Data].Other_Pattern_as_Well_API Is Null > AND Allocations.Date=#11/1/1948# > GROUP BY [qry 3 Months Running Injection Data Totals].Well_In_CO2PAT, > [tbl 3 Month Running Inj Data].Well_in_CO2PAT_API, > [tbl 3 Month Running Inj Data].ProductionMonth, > [tbl 3 Month Running Inj Data].Other_Pattern, > [tbl 3 Month Running Inj Data].Other_Pattern_as_Well, > [tbl 3 Month Running Inj Data].Other_Pattern_as_Well_API, > [tbl 3 Month Running Inj Data].[3mo_rbi], > [qry 3 Months Running Injection Data Totals].SumOf3mo_rbi, > IIf([SumOf3mo_rbi]=0,Allocations.Factor_2,[3mo_rbi]/[SumOf3mo_rbi]); > > -----Original Message----- > From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of > Paul Hartland via AccessD > Sent: Tuesday, December 10, 2019 8:45 AM > To: Access Developers discussion and problem solving > Cc: Paul Hartland > Subject: Re: [AccessD] Query not returning desired results > > [This email message was received from the Internet and came from outside > of Kinder Morgan] > > > What is the full query, maybe there is something slightly wrong in the from > sql as your referencing two tables in the where, may make a little more > sense to see the full query. > > Paul > > > > On Tue, 10 Dec 2019, 14:21 Kaup, Chester, > wrote: > > > Got rid of all the unneeded parentheses but still got the same incorrect > > result. Thanks for the help. > > > > -----Original Message----- > > From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of > > Stuart McLachlan > > Sent: Monday, December 09, 2019 2:54 PM > > To: Access Developers discussion and problem solving > > Subject: Re: [AccessD] Query not returning desired results > > > > [This email message was received from the Internet and came from outside > > of Kinder Morgan] > > > > > > hey are all AND conditions, so for a start, just get rid of all > > parentheses. > > > > > > On 9 Dec 2019 at 17:15, Kaup, Chester wrote: > > > > > I have a query in which I want to exclude records when one field > > > equals a certain value and another field in the same record is null. > > > So far it have been unsuccessful after several attempts of moving > > > around parenthesis. Here is my statement. I defer to and appreciate > > > the assistance of other members > > > > > > WHERE ((([tbl 3 Month Running Inj Data].Other_Pattern)<>"PAT 28-5A" > > > And ([tbl 3 Month Running Inj Data].Other_Pattern)<>"PAT 56-6A") AND > > > (([tbl 3 Month Running Inj Data].Other_Pattern_as_Well_API) Is Null) > > > AND ((Allocations.Date)=#11/1/1948#)) > > > > > > Also tried this > > > > > > WHERE (([tbl 3 Month Running Inj Data].Other_Pattern<>"PAT 28-5A" AND > > > [tbl 3 Month Running Inj Data].Other_Pattern<>"PAT 56-6A" AND [tbl 3 > > > Month Running Inj Data].Other_Pattern_as_Well_API Is Null) AND > > > Allocations.Date=#11/1/1948#) > > > > > > -- > > > 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 Chester_Kaup at kindermorgan.com Tue Dec 10 09:13:17 2019 From: Chester_Kaup at kindermorgan.com (Kaup, Chester) Date: Tue, 10 Dec 2019 15:13:17 +0000 Subject: [AccessD] Query not returning desired results In-Reply-To: <5DEFB311.6804.175AAA3D@stuart.lexacorp.com.pg> References: <3089055ba6274f73bc2c3bf8b7cca8ae@kindermorgan.com>, <5DEEB470.15211.137804A7@stuart.lexacorp.com.pg>, <8a7b1bfc291a4f559120e5ee09949e6a@kindermorgan.com> <5DEFB311.6804.175AAA3D@stuart.lexacorp.com.pg> Message-ID: <447544831eff403d809e30cd969b6a7b@kindermorgan.com> Put another way what I want to do is exclude records where the field Other Pattern contains one of two values (all other values are acceptable) and the field Other_Pattern_as_Well_API is null for those Other Pattern 2 values. Here is an example of a record that should be excluded. Hope that makes sense Well_In_CO2PAT Well_in_CO2PAT_API ProductionMonth Other_Pattern Other_Pattern_as_Well Other_Pattern_as_Well_API 3mo_rbi SumOf3mo_rbi Factor_2 28-10 42415305460000 11/1/2019 PAT 28-5A 28-5A 195497.44 1,691,433.78 0.12 -----Original Message----- From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Stuart McLachlan Sent: Tuesday, December 10, 2019 9:01 AM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Query not returning desired results [This email message was received from the Internet and came from outside of Kinder Morgan] You said: "where one field equals a certain value and another field is null" but that's not what your code does. It includes all values for Other_Pattern except two. On 10 Dec 2019 at 14:20, Kaup, Chester wrote: > Got rid of all the unneeded parentheses but still got the same > incorrect result. Thanks for the help. > > -----Original Message----- > From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf > Of Stuart McLachlan Sent: Monday, December 09, 2019 2:54 PM To: Access > Developers discussion and problem solving Subject: Re: [AccessD] Query > not returning desired results > > [This email message was received from the Internet and came from > outside of Kinder Morgan] > > > hey are all AND conditions, so for a start, just get rid of all > parentheses. > > > On 9 Dec 2019 at 17:15, Kaup, Chester wrote: > > > I have a query in which I want to exclude records when one field > > equals a certain value and another field in the same record is null. > > So far it have been unsuccessful after several attempts of moving > > around parenthesis. Here is my statement. I defer to and appreciate > > the assistance of other members > > > > WHERE ((([tbl 3 Month Running Inj Data].Other_Pattern)<>"PAT 28-5A" > > And ([tbl 3 Month Running Inj Data].Other_Pattern)<>"PAT 56-6A") AND > > (([tbl 3 Month Running Inj Data].Other_Pattern_as_Well_API) Is Null) > > AND ((Allocations.Date)=#11/1/1948#)) > > > > Also tried this > > > > WHERE (([tbl 3 Month Running Inj Data].Other_Pattern<>"PAT 28-5A" > > AND [tbl 3 Month Running Inj Data].Other_Pattern<>"PAT 56-6A" AND > > [tbl 3 Month Running Inj Data].Other_Pattern_as_Well_API Is Null) > > AND Allocations.Date=#11/1/1948#) > > > > -- > > 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 stuart at lexacorp.com.pg Tue Dec 10 09:21:44 2019 From: stuart at lexacorp.com.pg (Stuart McLachlan) Date: Wed, 11 Dec 2019 01:21:44 +1000 Subject: [AccessD] Query not returning desired results In-Reply-To: References: <3089055ba6274f73bc2c3bf8b7cca8ae@kindermorgan.com>, , Message-ID: <5DEFB808.16390.176E0CD6@stuart.lexacorp.com.pg> I find your long space filled table and query names and copious bracketing together with long run on lines makes all of your problem SQL hard to analyse. Suggest you get in the habit of using aliases and only bracket where necessary. I can analyse this much easier: SELECT q3.Well_In_CO2PAT, t3.Well_in_CO2PAT_API, t3.ProductionMonth, t3.Other_Pattern, t3.Other_Pattern_as_Well, t3.Other_Pattern_as_Well_API, t3.3mo_rbi, q3.SumOf3mo_rbi, IIf(SumOf3mo_rbi=0,al.Factor_2,3mo_rbi/SumOf3mo_rbi) AS Factor_2 INTO [tbl 3 Month Factor 2] FROM [qry 3 Months Running Injection Data Totals] q3 INNER JOIN [tbl 3 Month Running Inj Data] t3 ON q3.Well_in_CO2PAT_API = t3.Well_in_CO2PAT_API AND q3.ProductionMonth = t3.ProductionMonth INNER JOIN Allocations al ON t3.Well_in_CO2PAT_API = al.ChildPID AND t3.Other_Pattern = al.PID WHERE t3.Other_Pattern <> "PAT 28-5A" And t3.Other_Pattern <>"PAT 56-6A" AND t3.Other_Pattern_as_Well_API Is Null AND al.Date=#11/1/1948# GROUP BY q3.Well_In_CO2PAT, t3.Well_in_CO2PAT_API, t3.ProductionMonth, t3.Other_Pattern, t3.Other_Pattern_as_Well, t3.Other_Pattern_as_Well_API, t3.3mo_rbi, q3.SumOf3mo_rbi, IIf(SumOf3mo_rbi=0,al.Factor_2,3mo_rbi/SumOf3mo_rbi; That said, I can't see anything wrong with that SQL. Can you tell us what data is being included or excluded that should not be? On 10 Dec 2019 at 14:51, Kaup, Chester wrote: > Here is the whole query. Thanks for looking at this > > SELECT [qry 3 Months Running Injection Data Totals].Well_In_CO2PAT, > [tbl 3 Month Running Inj Data].Well_in_CO2PAT_API, [tbl 3 Month > Running Inj Data].ProductionMonth, [tbl 3 Month Running Inj > Data].Other_Pattern, [tbl 3 Month Running Inj > Data].Other_Pattern_as_Well, [tbl 3 Month Running Inj > Data].Other_Pattern_as_Well_API, [tbl 3 Month Running Inj > Data].[3mo_rbi], [qry 3 Months Running Injection Data > Totals].SumOf3mo_rbi, > IIf([SumOf3mo_rbi]=0,Allocations.Factor_2,[3mo_rbi]/[SumOf3mo_rbi]) AS > Factor_2 INTO [tbl 3 Month Factor 2] FROM ([qry 3 Months Running > Injection Data Totals] INNER JOIN [tbl 3 Month Running Inj Data] ON > ([qry 3 Months Running Injection Data Totals].Well_in_CO2PAT_API = > [tbl 3 Month Running Inj Data].Well_in_CO2PAT_API) AND ([qry 3 Months > Running Injection Data Totals].ProductionMonth = [tbl 3 Month Running > Inj Data].ProductionMonth)) INNER JOIN Allocations ON ([tbl 3 Month > Running Inj Data].Well_in_CO2PAT_API = Allocations.ChildPID) AND ([tbl > 3 Month Running Inj Data].Other_Pattern = Allocations.PID) WHERE [tbl > 3 Month Running Inj Data].Other_Pattern<>"PAT 28-5A" And [tbl 3 Month > Running Inj Data].Other_Pattern<>"PAT 56-6A" AND [tbl 3 Month Running > Inj Data].Other_Pattern_as_Well_API Is Null AND > Allocations.Date=#11/1/1948# GROUP BY [qry 3 Months Running Injection > Data Totals].Well_In_CO2PAT, [tbl 3 Month Running Inj > Data].Well_in_CO2PAT_API, [tbl 3 Month Running Inj > Data].ProductionMonth, [tbl 3 Month Running Inj Data].Other_Pattern, > [tbl 3 Month Running Inj Data].Other_Pattern_as_Well, [tbl 3 Month > Running Inj Data].Other_Pattern_as_Well_API, [tbl 3 Month Running Inj > Data].[3mo_rbi], [qry 3 Months Running Injection Data > Totals].SumOf3mo_rbi, > IIf([SumOf3mo_rbi]=0,Allocations.Factor_2,[3mo_rbi]/[SumOf3mo_rbi]); > From paul.hartland at googlemail.com Tue Dec 10 09:47:24 2019 From: paul.hartland at googlemail.com (Paul Hartland) Date: Tue, 10 Dec 2019 15:47:24 +0000 Subject: [AccessD] Query not returning desired results In-Reply-To: <447544831eff403d809e30cd969b6a7b@kindermorgan.com> References: <3089055ba6274f73bc2c3bf8b7cca8ae@kindermorgan.com> <5DEEB470.15211.137804A7@stuart.lexacorp.com.pg> <8a7b1bfc291a4f559120e5ee09949e6a@kindermorgan.com> <5DEFB311.6804.175AAA3D@stuart.lexacorp.com.pg> <447544831eff403d809e30cd969b6a7b@kindermorgan.com> Message-ID: I cant really see anything wrong with the query as such, I would remove all the open and closing brackets though and clean it up a little but thats just a personal approach, if you are getting results returned that include PAT 28-5A or PAT 56-6A then I would suggest that either the field ' Other_Pattern_as_Well_API' is blank and not null or the dates are differeng in the linked allocations table On Tue, 10 Dec 2019, 15:14 Kaup, Chester, wrote: > Put another way what I want to do is exclude records where the field Other > Pattern contains one of two values (all other values are acceptable) and > the field Other_Pattern_as_Well_API is null for those Other Pattern 2 > values. Here is an example of a record that should be excluded. Hope that > makes sense > > Well_In_CO2PAT Well_in_CO2PAT_API ProductionMonth Other_Pattern > Other_Pattern_as_Well Other_Pattern_as_Well_API 3mo_rbi > SumOf3mo_rbi Factor_2 > 28-10 42415305460000 11/1/2019 > PAT 28-5A 28-5A > 195497.44 1,691,433.78 0.12 > > -----Original Message----- > From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of > Stuart McLachlan > Sent: Tuesday, December 10, 2019 9:01 AM > To: Access Developers discussion and problem solving > Subject: Re: [AccessD] Query not returning desired results > > [This email message was received from the Internet and came from outside > of Kinder Morgan] > > > You said: "where one field equals a certain value and another field is > null" > but that's not what your code does. > > It includes all values for Other_Pattern except two. > > > > > On 10 Dec 2019 at 14:20, Kaup, Chester wrote: > > > Got rid of all the unneeded parentheses but still got the same > > incorrect result. Thanks for the help. > > > > -----Original Message----- > > From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf > > Of Stuart McLachlan Sent: Monday, December 09, 2019 2:54 PM To: Access > > Developers discussion and problem solving Subject: Re: [AccessD] Query > > not returning desired results > > > > [This email message was received from the Internet and came from > > outside of Kinder Morgan] > > > > > > hey are all AND conditions, so for a start, just get rid of all > > parentheses. > > > > > > On 9 Dec 2019 at 17:15, Kaup, Chester wrote: > > > > > I have a query in which I want to exclude records when one field > > > equals a certain value and another field in the same record is null. > > > So far it have been unsuccessful after several attempts of moving > > > around parenthesis. Here is my statement. I defer to and appreciate > > > the assistance of other members > > > > > > WHERE ((([tbl 3 Month Running Inj Data].Other_Pattern)<>"PAT 28-5A" > > > And ([tbl 3 Month Running Inj Data].Other_Pattern)<>"PAT 56-6A") AND > > > (([tbl 3 Month Running Inj Data].Other_Pattern_as_Well_API) Is Null) > > > AND ((Allocations.Date)=#11/1/1948#)) > > > > > > Also tried this > > > > > > WHERE (([tbl 3 Month Running Inj Data].Other_Pattern<>"PAT 28-5A" > > > AND [tbl 3 Month Running Inj Data].Other_Pattern<>"PAT 56-6A" AND > > > [tbl 3 Month Running Inj Data].Other_Pattern_as_Well_API Is Null) > > > AND Allocations.Date=#11/1/1948#) > > > > > > -- > > > 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 Chester_Kaup at kindermorgan.com Tue Dec 10 09:57:18 2019 From: Chester_Kaup at kindermorgan.com (Kaup, Chester) Date: Tue, 10 Dec 2019 15:57:18 +0000 Subject: [AccessD] Query not returning desired results In-Reply-To: <5DEFB808.16390.176E0CD6@stuart.lexacorp.com.pg> References: <3089055ba6274f73bc2c3bf8b7cca8ae@kindermorgan.com>, , <5DEFB808.16390.176E0CD6@stuart.lexacorp.com.pg> Message-ID: You make a valid point about my ugly SQL statement. The issue is that the two Other Pattern values are being excluded but instead of excluding these values when the field Other_Pattern_as_Well_API Is Null is null the query is including all records where the field Other_Pattern_as_Well_API Is Null is null Example of a valid records Well_In_CO2PAT Well_in_CO2PAT_API ProductionMonth Other_Pattern Other_Pattern_as_Well Other_Pattern_as_Well_API 3mo_rbi SumOf3mo_rbi Factor_2 10-1 42415031090000 11/1/2019 PAT 10-1 10-1 4241503109 256117.4 256,117.40 1.00 10-10 42415304550000 11/1/2019 PAT 10-1 10-1 4241503109 256117.4 1,156,496.68 0.22 10-10 42415304550000 11/1/2019 PAT 10-1M 10-1M 4241535075 103812.816237479 1,156,496.68 0.09 10-10 42415304550000 11/1/2019 PAT 10-5A 10-5A 4241535062 457659.706363636 1,156,496.68 0.40 10-10 42415304550000 11/1/2019 PAT 11-5A 11-5A 4241534970 87307.7045454545 1,156,496.68 0.08 10-10 42415304550000 11/1/2019 PAT 11-5M 11-5M 4241535044 51235.5777634696 1,156,496.68 0.04 10-10 42415304550000 11/1/2019 PAT 11-8A 11-8A 4241534997 200363.48 1,156,496.68 0.17 10-10 42415304550000 11/1/2019 PAT 11-8B 11-8B 4241534998 0 1,156,496.68 0.00 10-10A 42415350480000 11/1/2019 PAT 10-1 10-1 4241503109 256117.4 1,156,496.68 0.22 10-10A 42415350480000 11/1/2019 PAT 10-1M 10-1M 4241535075 103812.816237479 1,156,496.68 0.09 10-10A 42415350480000 11/1/2019 PAT 10-5A 10-5A 4241535062 457659.706363636 1,156,496.68 0.40 10-10A 42415350480000 11/1/2019 PAT 11-5A 11-5A 4241534970 87307.7045454545 1,156,496.68 0.08 10-10A 42415350480000 11/1/2019 PAT 11-5M 11-5M 4241535044 51235.5777634696 1,156,496.68 0.04 10-10A 42415350480000 11/1/2019 PAT 11-8A 11-8A 4241534997 200363.48 1,156,496.68 0.17 10-10A 42415350480000 11/1/2019 PAT 11-8B 11-8B 4241534998 0 1,156,496.68 0.00 Example of invalid records Well_In_CO2PAT Well_in_CO2PAT_API ProductionMonth Other_Pattern Other_Pattern_as_Well Other_Pattern_as_Well_API 3mo_rbi SumOf3mo_rbi Factor_2 28-10 42415305460000 11/1/2019 PAT 28-5A 28-5A 195497.44 1,691,433.78 0.12 28-14 42415306150000 11/1/2019 PAT 28-5A 28-5A 195497.44 2,055,450.20 0.10 28-17 42415324490000 11/1/2019 PAT 28-5A 28-5A 195497.44 1,344,883.87 0.15 28-18 42415345120000 11/1/2019 PAT 28-5A 28-5A 195497.44 1,137,363.88 0.17 28-5 42415030820000 11/1/2019 PAT 28-5A 28-5A 195497.44 390,994.88 0.50 28-5AL 42415345070001 11/1/2019 PAT 28-5A 28-5A 195497.44 390,994.88 0.50 28-5AS 42415345070000 11/1/2019 PAT 28-5A 28-5A 195497.44 390,994.88 0.50 28-9 42415304030000 11/1/2019 PAT 28-5A 28-5A 195497.44 1,393,984.50 0.14 28-9A 42415345110000 11/1/2019 PAT 28-5A 28-5A 195497.44 1,393,984.50 0.14 -----Original Message----- From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Stuart McLachlan Sent: Tuesday, December 10, 2019 9:22 AM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Query not returning desired results [This email message was received from the Internet and came from outside of Kinder Morgan] I find your long space filled table and query names and copious bracketing together with long run on lines makes all of your problem SQL hard to analyse. Suggest you get in the habit of using aliases and only bracket where necessary. I can analyse this much easier: SELECT q3.Well_In_CO2PAT, t3.Well_in_CO2PAT_API, t3.ProductionMonth, t3.Other_Pattern, t3.Other_Pattern_as_Well, t3.Other_Pattern_as_Well_API, t3.3mo_rbi, q3.SumOf3mo_rbi, IIf(SumOf3mo_rbi=0,al.Factor_2,3mo_rbi/SumOf3mo_rbi) AS Factor_2 INTO [tbl 3 Month Factor 2] FROM [qry 3 Months Running Injection Data Totals] q3 INNER JOIN [tbl 3 Month Running Inj Data] t3 ON q3.Well_in_CO2PAT_API = t3.Well_in_CO2PAT_API AND q3.ProductionMonth = t3.ProductionMonth INNER JOIN Allocations al ON t3.Well_in_CO2PAT_API = al.ChildPID AND t3.Other_Pattern = al.PID WHERE t3.Other_Pattern <> "PAT 28-5A" And t3.Other_Pattern <>"PAT 56-6A" AND t3.Other_Pattern_as_Well_API Is Null AND al.Date=#11/1/1948# GROUP BY q3.Well_In_CO2PAT, t3.Well_in_CO2PAT_API, t3.ProductionMonth, t3.Other_Pattern, t3.Other_Pattern_as_Well, t3.Other_Pattern_as_Well_API, t3.3mo_rbi, q3.SumOf3mo_rbi, IIf(SumOf3mo_rbi=0,al.Factor_2,3mo_rbi/SumOf3mo_rbi; That said, I can't see anything wrong with that SQL. Can you tell us what data is being included or excluded that should not be? On 10 Dec 2019 at 14:51, Kaup, Chester wrote: > Here is the whole query. Thanks for looking at this > > SELECT [qry 3 Months Running Injection Data Totals].Well_In_CO2PAT, > [tbl 3 Month Running Inj Data].Well_in_CO2PAT_API, [tbl 3 Month > Running Inj Data].ProductionMonth, [tbl 3 Month Running Inj > Data].Other_Pattern, [tbl 3 Month Running Inj > Data].Other_Pattern_as_Well, [tbl 3 Month Running Inj > Data].Other_Pattern_as_Well_API, [tbl 3 Month Running Inj > Data].[3mo_rbi], [qry 3 Months Running Injection Data > Totals].SumOf3mo_rbi, > IIf([SumOf3mo_rbi]=0,Allocations.Factor_2,[3mo_rbi]/[SumOf3mo_rbi]) AS > Factor_2 INTO [tbl 3 Month Factor 2] FROM ([qry 3 Months Running > Injection Data Totals] INNER JOIN [tbl 3 Month Running Inj Data] ON > ([qry 3 Months Running Injection Data Totals].Well_in_CO2PAT_API = > [tbl 3 Month Running Inj Data].Well_in_CO2PAT_API) AND ([qry 3 Months > Running Injection Data Totals].ProductionMonth = [tbl 3 Month Running > Inj Data].ProductionMonth)) INNER JOIN Allocations ON ([tbl 3 Month > Running Inj Data].Well_in_CO2PAT_API = Allocations.ChildPID) AND ([tbl > 3 Month Running Inj Data].Other_Pattern = Allocations.PID) WHERE [tbl > 3 Month Running Inj Data].Other_Pattern<>"PAT 28-5A" And [tbl 3 Month > Running Inj Data].Other_Pattern<>"PAT 56-6A" AND [tbl 3 Month Running > Inj Data].Other_Pattern_as_Well_API Is Null AND > Allocations.Date=#11/1/1948# GROUP BY [qry 3 Months Running Injection > Data Totals].Well_In_CO2PAT, [tbl 3 Month Running Inj > Data].Well_in_CO2PAT_API, [tbl 3 Month Running Inj > Data].ProductionMonth, [tbl 3 Month Running Inj Data].Other_Pattern, > [tbl 3 Month Running Inj Data].Other_Pattern_as_Well, [tbl 3 Month > Running Inj Data].Other_Pattern_as_Well_API, [tbl 3 Month Running Inj > Data].[3mo_rbi], [qry 3 Months Running Injection Data > Totals].SumOf3mo_rbi, > IIf([SumOf3mo_rbi]=0,Allocations.Factor_2,[3mo_rbi]/[SumOf3mo_rbi]); > -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From rockysmolin at bchacc.com Tue Dec 10 10:17:14 2019 From: rockysmolin at bchacc.com (rockysmolin bchacc.com) Date: Tue, 10 Dec 2019 16:17:14 +0000 Subject: [AccessD] Query not returning desired results In-Reply-To: <8a7b1bfc291a4f559120e5ee09949e6a@kindermorgan.com> References: <3089055ba6274f73bc2c3bf8b7cca8ae@kindermorgan.com> <5DEEB470.15211.137804A7@stuart.lexacorp.com.pg> <8a7b1bfc291a4f559120e5ee09949e6a@kindermorgan.com> Message-ID: Can you post again the query without the parentheses - may be easier for one of us to see the problem. Rocky Smolin Beach Access Software 760-683-5777 www.bchacc.com www.e-z-mrp.com Skype: rocky.smolin -----Original Message----- From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Kaup, Chester Sent: Tuesday, December 10, 2019 6:21 AM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Query not returning desired results Got rid of all the unneeded parentheses but still got the same incorrect result. Thanks for the help. -----Original Message----- From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Stuart McLachlan Sent: Monday, December 09, 2019 2:54 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Query not returning desired results [This email message was received from the Internet and came from outside of Kinder Morgan] hey are all AND conditions, so for a start, just get rid of all parentheses. On 9 Dec 2019 at 17:15, Kaup, Chester wrote: > I have a query in which I want to exclude records when one field > equals a certain value and another field in the same record is null. > So far it have been unsuccessful after several attempts of moving > around parenthesis. Here is my statement. I defer to and appreciate > the assistance of other members > > WHERE ((([tbl 3 Month Running Inj Data].Other_Pattern)<>"PAT 28-5A" > And ([tbl 3 Month Running Inj Data].Other_Pattern)<>"PAT 56-6A") AND > (([tbl 3 Month Running Inj Data].Other_Pattern_as_Well_API) Is Null) > AND ((Allocations.Date)=#11/1/1948#)) > > Also tried this > > WHERE (([tbl 3 Month Running Inj Data].Other_Pattern<>"PAT 28-5A" AND > [tbl 3 Month Running Inj Data].Other_Pattern<>"PAT 56-6A" AND [tbl 3 > Month Running Inj Data].Other_Pattern_as_Well_API Is Null) AND > Allocations.Date=#11/1/1948#) > > -- > 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 rockysmolin at bchacc.com Tue Dec 10 10:18:38 2019 From: rockysmolin at bchacc.com (rockysmolin bchacc.com) Date: Tue, 10 Dec 2019 16:18:38 +0000 Subject: [AccessD] Query not returning desired results In-Reply-To: References: <3089055ba6274f73bc2c3bf8b7cca8ae@kindermorgan.com> <5DEEB470.15211.137804A7@stuart.lexacorp.com.pg> <8a7b1bfc291a4f559120e5ee09949e6a@kindermorgan.com> Message-ID: Chester, Sometimes when I'm stuck in the SQL I display it in design view in the QBE and find the problem. r -----Original Message----- From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Kaup, Chester Sent: Tuesday, December 10, 2019 6:52 AM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Query not returning desired results Here is the whole query. Thanks for looking at this SELECT [qry 3 Months Running Injection Data Totals].Well_In_CO2PAT, [tbl 3 Month Running Inj Data].Well_in_CO2PAT_API, [tbl 3 Month Running Inj Data].ProductionMonth, [tbl 3 Month Running Inj Data].Other_Pattern, [tbl 3 Month Running Inj Data].Other_Pattern_as_Well, [tbl 3 Month Running Inj Data].Other_Pattern_as_Well_API, [tbl 3 Month Running Inj Data].[3mo_rbi], [qry 3 Months Running Injection Data Totals].SumOf3mo_rbi, IIf([SumOf3mo_rbi]=0,Allocations.Factor_2,[3mo_rbi]/[SumOf3mo_rbi]) AS Factor_2 INTO [tbl 3 Month Factor 2] FROM ([qry 3 Months Running Injection Data Totals] INNER JOIN [tbl 3 Month Running Inj Data] ON ([qry 3 Months Running Injection Data Totals].Well_in_CO2PAT_API = [tbl 3 Month Running Inj Data].Well_in_CO2PAT_API) AND ([qry 3 Months Running Injection Data Totals].ProductionMonth = [tbl 3 Month Running Inj Data].ProductionMonth)) INNER JOIN Allocations ON ([tbl 3 Month Running Inj Data].Well_in_CO2PAT_API = Allocations.ChildPID) AND ([tbl 3 Month Running Inj Data].Other_Pattern = Allocations.PID) WHERE [tbl 3 Month Running Inj Data].Other_Pattern<>"PAT 28-5A" And [tbl 3 Month Running Inj Data].Other_Pattern<>"PAT 56-6A" AND [tbl 3 Month Running Inj Data].Other_Pattern_as_Well_API Is Null AND Allocations.Date=#11/1/1948# GROUP BY [qry 3 Months Running Injection Data Totals].Well_In_CO2PAT, [tbl 3 Month Running Inj Data].Well_in_CO2PAT_API, [tbl 3 Month Running Inj Data].ProductionMonth, [tbl 3 Month Running Inj Data].Other_Pattern, [tbl 3 Month Running Inj Data].Other_Pattern_as_Well, [tbl 3 Month Running Inj Data].Other_Pattern_as_Well_API, [tbl 3 Month Running Inj Data].[3mo_rbi], [qry 3 Months Running Injection Data Totals].SumOf3mo_rbi, IIf([SumOf3mo_rbi]=0,Allocations.Factor_2,[3mo_rbi]/[SumOf3mo_rbi]); -----Original Message----- From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Paul Hartland via AccessD Sent: Tuesday, December 10, 2019 8:45 AM To: Access Developers discussion and problem solving Cc: Paul Hartland Subject: Re: [AccessD] Query not returning desired results [This email message was received from the Internet and came from outside of Kinder Morgan] What is the full query, maybe there is something slightly wrong in the from sql as your referencing two tables in the where, may make a little more sense to see the full query. Paul On Tue, 10 Dec 2019, 14:21 Kaup, Chester, wrote: > Got rid of all the unneeded parentheses but still got the same incorrect > result. Thanks for the help. > > -----Original Message----- > From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of > Stuart McLachlan > Sent: Monday, December 09, 2019 2:54 PM > To: Access Developers discussion and problem solving > Subject: Re: [AccessD] Query not returning desired results > > [This email message was received from the Internet and came from outside > of Kinder Morgan] > > > hey are all AND conditions, so for a start, just get rid of all > parentheses. > > > On 9 Dec 2019 at 17:15, Kaup, Chester wrote: > > > I have a query in which I want to exclude records when one field > > equals a certain value and another field in the same record is null. > > So far it have been unsuccessful after several attempts of moving > > around parenthesis. Here is my statement. I defer to and appreciate > > the assistance of other members > > > > WHERE ((([tbl 3 Month Running Inj Data].Other_Pattern)<>"PAT 28-5A" > > And ([tbl 3 Month Running Inj Data].Other_Pattern)<>"PAT 56-6A") AND > > (([tbl 3 Month Running Inj Data].Other_Pattern_as_Well_API) Is Null) > > AND ((Allocations.Date)=#11/1/1948#)) > > > > Also tried this > > > > WHERE (([tbl 3 Month Running Inj Data].Other_Pattern<>"PAT 28-5A" AND > > [tbl 3 Month Running Inj Data].Other_Pattern<>"PAT 56-6A" AND [tbl 3 > > Month Running Inj Data].Other_Pattern_as_Well_API Is Null) AND > > Allocations.Date=#11/1/1948#) > > > > -- > > 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 Chester_Kaup at kindermorgan.com Tue Dec 10 10:56:18 2019 From: Chester_Kaup at kindermorgan.com (Kaup, Chester) Date: Tue, 10 Dec 2019 16:56:18 +0000 Subject: [AccessD] Query not returning desired results In-Reply-To: References: <3089055ba6274f73bc2c3bf8b7cca8ae@kindermorgan.com> <5DEEB470.15211.137804A7@stuart.lexacorp.com.pg> <8a7b1bfc291a4f559120e5ee09949e6a@kindermorgan.com> Message-ID: <5e905c2163294ffaa24e40805d00ae9e@kindermorgan.com> Here is the whole query without all the parenthesis in the where clause SELECT [qry 3 Months Running Injection Data Totals].Well_In_CO2PAT, [tbl 3 Month Running Inj Data].Well_in_CO2PAT_API, [tbl 3 Month Running Inj Data].ProductionMonth, [tbl 3 Month Running Inj Data].Other_Pattern, [tbl 3 Month Running Inj Data].Other_Pattern_as_Well, [tbl 3 Month Running Inj Data].Other_Pattern_as_Well_API, [tbl 3 Month Running Inj Data].[3mo_rbi], [ qry 3 Months Running Injection Data Totals].SumOf3mo_rbi, IIf([SumOf3mo_rbi]=0,Allocations.Factor_2,[3mo_rbi]/[SumOf3mo_rbi]) AS Factor_2 INTO [tbl 3 Month Factor 2] FROM ([qry 3 Months Running Injection Data Totals] INNER JOIN [tbl 3 Month Running Inj Data] ON ([qry 3 Months Running Injection Data Totals].ProductionMonth = [tbl 3 Month Running Inj Data].ProductionMonth) AND ([qry 3 Months Running Injection Data Totals].Well_in_CO2PAT_API = [tbl 3 Month Running Inj Data].Well_in_CO2PAT_API)) INNER JOIN Allocations ON ([tbl 3 Month Running Inj Data].Other_Pattern = Allocations.PID) AND ([tbl 3 Month Running Inj Data].Well_in_CO2PAT_API = Allocations.ChildPID) WHERE [tbl 3 Month Running Inj Data].Other_Pattern<>"PAT 28-5A" And [tbl 3 Month Running Inj Data].Other_Pattern<>"PAT 56-6A" AND [tbl 3 Month Running Inj Data].Other_Pattern_as_Well_API Is Null AND Allocations.Date=#11/1/1948# GROUP BY [qry 3 Months Running Injection Data Totals].Well_In_CO2PAT, [tbl 3 Month Running Inj Data].Well_in_CO2PAT_API, [tbl 3 Month Running Inj Data].ProductionMonth, [tbl 3 Month Running Inj Data].Other_Pattern, [tbl 3 Month Running Inj Data].Other_Pattern_as_Well, [tbl 3 Month Running Inj Data].Other_Pattern_as_Well_API, [tbl 3 Month Running Inj Data].[3mo_rbi], [qry 3 Months Running Injection Data Totals].SumOf3mo_rbi, IIf([SumOf3mo_rbi]=0,Allocations.Factor_2,[3mo_rbi]/[SumOf3mo_rbi]); -----Original Message----- From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of rockysmolin bchacc.com Sent: Tuesday, December 10, 2019 10:17 AM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Query not returning desired results [This email message was received from the Internet and came from outside of Kinder Morgan] Can you post again the query without the parentheses - may be easier for one of us to see the problem. Rocky Smolin Beach Access Software 760-683-5777 www.bchacc.com www.e-z-mrp.com Skype: rocky.smolin -----Original Message----- From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Kaup, Chester Sent: Tuesday, December 10, 2019 6:21 AM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Query not returning desired results Got rid of all the unneeded parentheses but still got the same incorrect result. Thanks for the help. -----Original Message----- From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Stuart McLachlan Sent: Monday, December 09, 2019 2:54 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Query not returning desired results [This email message was received from the Internet and came from outside of Kinder Morgan] hey are all AND conditions, so for a start, just get rid of all parentheses. On 9 Dec 2019 at 17:15, Kaup, Chester wrote: > I have a query in which I want to exclude records when one field > equals a certain value and another field in the same record is null. > So far it have been unsuccessful after several attempts of moving > around parenthesis. Here is my statement. I defer to and appreciate > the assistance of other members > > WHERE ((([tbl 3 Month Running Inj Data].Other_Pattern)<>"PAT 28-5A" > And ([tbl 3 Month Running Inj Data].Other_Pattern)<>"PAT 56-6A") AND > (([tbl 3 Month Running Inj Data].Other_Pattern_as_Well_API) Is Null) > AND ((Allocations.Date)=#11/1/1948#)) > > Also tried this > > WHERE (([tbl 3 Month Running Inj Data].Other_Pattern<>"PAT 28-5A" AND > [tbl 3 Month Running Inj Data].Other_Pattern<>"PAT 56-6A" AND [tbl 3 > Month Running Inj Data].Other_Pattern_as_Well_API Is Null) AND > Allocations.Date=#11/1/1948#) > > -- > 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 BWalsh at comagine.org Tue Dec 10 11:01:37 2019 From: BWalsh at comagine.org (Bob Walsh) Date: Tue, 10 Dec 2019 17:01:37 +0000 Subject: [AccessD] Query not returning desired results In-Reply-To: <5e905c2163294ffaa24e40805d00ae9e@kindermorgan.com> References: <3089055ba6274f73bc2c3bf8b7cca8ae@kindermorgan.com> <5DEEB470.15211.137804A7@stuart.lexacorp.com.pg> <8a7b1bfc291a4f559120e5ee09949e6a@kindermorgan.com> <5e905c2163294ffaa24e40805d00ae9e@kindermorgan.com> Message-ID: Did you try this? From: AccessD On Behalf Of Kaup, Chester Sent: Tuesday, December 10, 2019 8:56 AM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Query not returning desired results [Attn: This is an external email.] Here is the whole query without all the parenthesis in the where clause SELECT [qry 3 Months Running Injection Data Totals].Well_In_CO2PAT, [tbl 3 Month Running Inj Data].Well_in_CO2PAT_API, [tbl 3 Month Running Inj Data].ProductionMonth, [tbl 3 Month Running Inj Data].Other_Pattern, [tbl 3 Month Running Inj Data].Other_Pattern_as_Well, [tbl 3 Month Running Inj Data].Other_Pattern_as_Well_API, [tbl 3 Month Running Inj Data].[3mo_rbi], [ qry 3 Months Running Injection Data Totals].SumOf3mo_rbi, IIf([SumOf3mo_rbi]=0,Allocations.Factor_2,[3mo_rbi]/[SumOf3mo_rbi]) AS Factor_2 INTO [tbl 3 Month Factor 2] FROM ([qry 3 Months Running Injection Data Totals] INNER JOIN [tbl 3 Month Running Inj Data] ON ([qry 3 Months Running Injection Data Totals].ProductionMonth = [tbl 3 Month Running Inj Data].ProductionMonth) AND ([qry 3 Months Running Injection Data Totals].Well_in_CO2PAT_API = [tbl 3 Month Running Inj Data].Well_in_CO2PAT_API)) INNER JOIN Allocations ON ([tbl 3 Month Running Inj Data].Other_Pattern = Allocations.PID) AND ([tbl 3 Month Running Inj Data].Well_in_CO2PAT_API = Allocations.ChildPID) WHERE ([tbl 3 Month Running Inj Data].Other_Pattern<>"PAT 28-5A" AND [tbl 3 Month Running Inj Data].Other_Pattern_as_Well_API Is Null) And ([tbl 3 Month Running Inj Data].Other_Pattern<>"PAT 56-6A" AND [tbl 3 Month Running Inj Data].Other_Pattern_as_Well_API Is Null ) AND Allocations.Date=#11/1/1948# GROUP BY [qry 3 Months Running Injection Data Totals].Well_In_CO2PAT, [tbl 3 Month Running Inj Data].Well_in_CO2PAT_API, [tbl 3 Month Running Inj Data].ProductionMonth, [tbl 3 Month Running Inj Data].Other_Pattern, [tbl 3 Month Running Inj Data].Other_Pattern_as_Well, [tbl 3 Month Running Inj Data].Other_Pattern_as_Well_API, [tbl 3 Month Running Inj Data].[3mo_rbi], [qry 3 Months Running Injection Data Totals].SumOf3mo_rbi, IIf([SumOf3mo_rbi]=0,Allocations.Factor_2,[3mo_rbi]/[SumOf3mo_rbi]); -----Original Message----- From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of rockysmolin bchacc.com Sent: Tuesday, December 10, 2019 10:17 AM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Query not returning desired results [This email message was received from the Internet and came from outside of Kinder Morgan] Can you post again the query without the parentheses - may be easier for one of us to see the problem. Rocky Smolin Beach Access Software 760-683-5777 www.bchacc.com www.e-z-mrp.com Skype: rocky.smolin -----Original Message----- From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Kaup, Chester Sent: Tuesday, December 10, 2019 6:21 AM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Query not returning desired results Got rid of all the unneeded parentheses but still got the same incorrect result. Thanks for the help. -----Original Message----- From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Stuart McLachlan Sent: Monday, December 09, 2019 2:54 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Query not returning desired results [This email message was received from the Internet and came from outside of Kinder Morgan] hey are all AND conditions, so for a start, just get rid of all parentheses. On 9 Dec 2019 at 17:15, Kaup, Chester wrote: > I have a query in which I want to exclude records when one field > equals a certain value and another field in the same record is null. > So far it have been unsuccessful after several attempts of moving > around parenthesis. Here is my statement. I defer to and appreciate > the assistance of other members > > WHERE ((([tbl 3 Month Running Inj Data].Other_Pattern)<>"PAT 28-5A" > And ([tbl 3 Month Running Inj Data].Other_Pattern)<>"PAT 56-6A") AND > (([tbl 3 Month Running Inj Data].Other_Pattern_as_Well_API) Is Null) > AND ((Allocations.Date)=#11/1/1948#)) > > Also tried this > > WHERE (([tbl 3 Month Running Inj Data].Other_Pattern<>"PAT 28-5A" AND > [tbl 3 Month Running Inj Data].Other_Pattern<>"PAT 56-6A" AND [tbl 3 > Month Running Inj Data].Other_Pattern_as_Well_API Is Null) AND > Allocations.Date=#11/1/1948#) > > -- > 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 ________________________________ This message and any attachments are intended for the use of the individual to whom it is addressed and may contain information that is privileged, business sensitive, confidential and/or exempt from disclosure under applicable laws and regulations. If you are not the intended recipient, be aware that any disclosure, copying, distribution, or use of the contents of this transmission is prohibited. If you have received this message in error, please inform the sender and delete all copies. Thank you. From df.waters at outlook.com Tue Dec 10 11:16:55 2019 From: df.waters at outlook.com (Daniel Waters) Date: Tue, 10 Dec 2019 17:16:55 +0000 Subject: [AccessD] Query not returning desired results In-Reply-To: <5e905c2163294ffaa24e40805d00ae9e@kindermorgan.com> References: <3089055ba6274f73bc2c3bf8b7cca8ae@kindermorgan.com> <5DEEB470.15211.137804A7@stuart.lexacorp.com.pg> <8a7b1bfc291a4f559120e5ee09949e6a@kindermorgan.com> <5e905c2163294ffaa24e40805d00ae9e@kindermorgan.com> Message-ID: I'd like to suggest 3 things: 1) Avoid spaces or in table names and query names. You'll be chasing errors associated with those forever. 2) Avoid underlines in field names. Again - a forever problem. 3) When you have a complex query like this use the query designer and build it a piece at a time, running the query each time you've added something. The error messages are cryptic but still helpful. Once the query is working you can view the query in SQL view and copy it to a code window if needed. Good Luck! -----Original Message----- From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Kaup, Chester Sent: December 10, 2019 10:56 To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Query not returning desired results Here is the whole query without all the parenthesis in the where clause SELECT [qry 3 Months Running Injection Data Totals].Well_In_CO2PAT, [tbl 3 Month Running Inj Data].Well_in_CO2PAT_API, [tbl 3 Month Running Inj Data].ProductionMonth, [tbl 3 Month Running Inj Data].Other_Pattern, [tbl 3 Month Running Inj Data].Other_Pattern_as_Well, [tbl 3 Month Running Inj Data].Other_Pattern_as_Well_API, [tbl 3 Month Running Inj Data].[3mo_rbi], [ qry 3 Months Running Injection Data Totals].SumOf3mo_rbi, IIf([SumOf3mo_rbi]=0,Allocations.Factor_2,[3mo_rbi]/[SumOf3mo_rbi]) AS Factor_2 INTO [tbl 3 Month Factor 2] FROM ([qry 3 Months Running Injection Data Totals] INNER JOIN [tbl 3 Month Running Inj Data] ON ([qry 3 Months Running Injection Data Totals].ProductionMonth = [tbl 3 Month Running Inj Data].ProductionMonth) AND ([qry 3 Months Running Injection Data Totals].Well_in_CO2PAT_API = [tbl 3 Month Running Inj Data].Well_in_CO2PAT_API)) INNER JOIN Allocations ON ([tbl 3 Month Running Inj Data].Other_Pattern = Allocations.PID) AND ([tbl 3 Month Running Inj Data].Well_in_CO2PAT_API = Allocations.ChildPID) WHERE [tbl 3 Month Running Inj Data].Other_Pattern<>"PAT 28-5A" And [tbl 3 Month Running Inj Data].Other_Pattern<>"PAT 56-6A" AND [tbl 3 Month Running Inj Data].Other_Pattern_as_Well_API Is Null AND Allocations.Date=#11/1/1948# GROUP BY [qry 3 Months Running Injection Data Totals].Well_In_CO2PAT, [tbl 3 Month Running Inj Data].Well_in_CO2PAT_API, [tbl 3 Month Running Inj Data].ProductionMonth, [tbl 3 Month Running Inj Data].Other_Pattern, [tbl 3 Month Running Inj Data].Other_Pattern_as_Well, [tbl 3 Month Running Inj Data].Other_Pattern_as_Well_API, [tbl 3 Month Running Inj Data].[3mo_rbi], [qry 3 Months Running Injection Data Totals].SumOf3mo_rbi, IIf([SumOf3mo_rbi]=0,Allocations.Factor_2,[3mo_rbi]/[SumOf3mo_rbi]); -----Original Message----- From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of rockysmolin bchacc.com Sent: Tuesday, December 10, 2019 10:17 AM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Query not returning desired results [This email message was received from the Internet and came from outside of Kinder Morgan] Can you post again the query without the parentheses - may be easier for one of us to see the problem. Rocky Smolin Beach Access Software 760-683-5777 www.bchacc.com www.e-z-mrp.com Skype: rocky.smolin -----Original Message----- From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Kaup, Chester Sent: Tuesday, December 10, 2019 6:21 AM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Query not returning desired results Got rid of all the unneeded parentheses but still got the same incorrect result. Thanks for the help. -----Original Message----- From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Stuart McLachlan Sent: Monday, December 09, 2019 2:54 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Query not returning desired results [This email message was received from the Internet and came from outside of Kinder Morgan] hey are all AND conditions, so for a start, just get rid of all parentheses. On 9 Dec 2019 at 17:15, Kaup, Chester wrote: > I have a query in which I want to exclude records when one field > equals a certain value and another field in the same record is null. > So far it have been unsuccessful after several attempts of moving > around parenthesis. Here is my statement. I defer to and appreciate > the assistance of other members > > WHERE ((([tbl 3 Month Running Inj Data].Other_Pattern)<>"PAT 28-5A" > And ([tbl 3 Month Running Inj Data].Other_Pattern)<>"PAT 56-6A") AND > (([tbl 3 Month Running Inj Data].Other_Pattern_as_Well_API) Is Null) > AND ((Allocations.Date)=#11/1/1948#)) > > Also tried this > > WHERE (([tbl 3 Month Running Inj Data].Other_Pattern<>"PAT 28-5A" AND > [tbl 3 Month Running Inj Data].Other_Pattern<>"PAT 56-6A" AND [tbl 3 > Month Running Inj Data].Other_Pattern_as_Well_API Is Null) AND > Allocations.Date=#11/1/1948#) > > -- > 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 Chester_Kaup at kindermorgan.com Tue Dec 10 11:32:07 2019 From: Chester_Kaup at kindermorgan.com (Kaup, Chester) Date: Tue, 10 Dec 2019 17:32:07 +0000 Subject: [AccessD] Query not returning desired results In-Reply-To: References: <3089055ba6274f73bc2c3bf8b7cca8ae@kindermorgan.com> <5DEEB470.15211.137804A7@stuart.lexacorp.com.pg> <8a7b1bfc291a4f559120e5ee09949e6a@kindermorgan.com> <5e905c2163294ffaa24e40805d00ae9e@kindermorgan.com> Message-ID: <1f15bc0956a347c299e3930709292f80@kindermorgan.com> Unfortunately that did not fix the issue. -----Original Message----- From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Bob Walsh Sent: Tuesday, December 10, 2019 11:02 AM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Query not returning desired results [This email message was received from the Internet and came from outside of Kinder Morgan] Did you try this? From: AccessD On Behalf Of Kaup, Chester Sent: Tuesday, December 10, 2019 8:56 AM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Query not returning desired results [Attn: This is an external email.] Here is the whole query without all the parenthesis in the where clause SELECT [qry 3 Months Running Injection Data Totals].Well_In_CO2PAT, [tbl 3 Month Running Inj Data].Well_in_CO2PAT_API, [tbl 3 Month Running Inj Data].ProductionMonth, [tbl 3 Month Running Inj Data].Other_Pattern, [tbl 3 Month Running Inj Data].Other_Pattern_as_Well, [tbl 3 Month Running Inj Data].Other_Pattern_as_Well_API, [tbl 3 Month Running Inj Data].[3mo_rbi], [ qry 3 Months Running Injection Data Totals].SumOf3mo_rbi, IIf([SumOf3mo_rbi]=0,Allocations.Factor_2,[3mo_rbi]/[SumOf3mo_rbi]) AS Factor_2 INTO [tbl 3 Month Factor 2] FROM ([qry 3 Months Running Injection Data Totals] INNER JOIN [tbl 3 Month Running Inj Data] ON ([qry 3 Months Running Injection Data Totals].ProductionMonth = [tbl 3 Month Running Inj Data].ProductionMonth) AND ([qry 3 Months Running Injection Data Totals].Well_in_CO2PAT_API = [tbl 3 Month Running Inj Data].Well_in_CO2PAT_API)) INNER JOIN Allocations ON ([tbl 3 Month Running Inj Data].Other_Pattern = Allocations.PID) AND ([tbl 3 Month Running Inj Data].Well_in_CO2PAT_API = Allocations.ChildPID) WHERE ([tbl 3 Month Running Inj Data].Other_Pattern<>"PAT 28-5A" AND [tbl 3 Month Running Inj Data].Other_Pattern_as_Well_API Is Null) And ([tbl 3 Month Running Inj Data].Other_Pattern<>"PAT 56-6A" AND [tbl 3 Month Running Inj Data].Other_Pattern_as_Well_API Is Null ) AND Allocations.Date=#11/1/1948# GROUP BY [qry 3 Months Running Injection Data Totals].Well_In_CO2PAT, [tbl 3 Month Running Inj Data].Well_in_CO2PAT_API, [tbl 3 Month Running Inj Data].ProductionMonth, [tbl 3 Month Running Inj Data].Other_Pattern, [tbl 3 Month Running Inj Data].Other_Pattern_as_Well, [tbl 3 Month Running Inj Data].Other_Pattern_as_Well_API, [tbl 3 Month Running Inj Data].[3mo_rbi], [qry 3 Months Running Injection Data Totals].SumOf3mo_rbi, IIf([SumOf3mo_rbi]=0,Allocations.Factor_2,[3mo_rbi]/[SumOf3mo_rbi]); -----Original Message----- From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of rockysmolin bchacc.com Sent: Tuesday, December 10, 2019 10:17 AM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Query not returning desired results [This email message was received from the Internet and came from outside of Kinder Morgan] Can you post again the query without the parentheses - may be easier for one of us to see the problem. Rocky Smolin Beach Access Software 760-683-5777 www.bchacc.com www.e-z-mrp.com Skype: rocky.smolin -----Original Message----- From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Kaup, Chester Sent: Tuesday, December 10, 2019 6:21 AM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Query not returning desired results Got rid of all the unneeded parentheses but still got the same incorrect result. Thanks for the help. -----Original Message----- From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Stuart McLachlan Sent: Monday, December 09, 2019 2:54 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Query not returning desired results [This email message was received from the Internet and came from outside of Kinder Morgan] hey are all AND conditions, so for a start, just get rid of all parentheses. On 9 Dec 2019 at 17:15, Kaup, Chester wrote: > I have a query in which I want to exclude records when one field > equals a certain value and another field in the same record is null. > So far it have been unsuccessful after several attempts of moving > around parenthesis. Here is my statement. I defer to and appreciate > the assistance of other members > > WHERE ((([tbl 3 Month Running Inj Data].Other_Pattern)<>"PAT 28-5A" > And ([tbl 3 Month Running Inj Data].Other_Pattern)<>"PAT 56-6A") AND > (([tbl 3 Month Running Inj Data].Other_Pattern_as_Well_API) Is Null) > AND ((Allocations.Date)=#11/1/1948#)) > > Also tried this > > WHERE (([tbl 3 Month Running Inj Data].Other_Pattern<>"PAT 28-5A" AND > [tbl 3 Month Running Inj Data].Other_Pattern<>"PAT 56-6A" AND [tbl 3 > Month Running Inj Data].Other_Pattern_as_Well_API Is Null) AND > Allocations.Date=#11/1/1948#) > > -- > 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 ________________________________ This message and any attachments are intended for the use of the individual to whom it is addressed and may contain information that is privileged, business sensitive, confidential and/or exempt from disclosure under applicable laws and regulations. If you are not the intended recipient, be aware that any disclosure, copying, distribution, or use of the contents of this transmission is prohibited. If you have received this message in error, please inform the sender and delete all copies. Thank you. -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From accessd at shaw.ca Tue Dec 10 12:29:00 2019 From: accessd at shaw.ca (Jim Lawrence) Date: Tue, 10 Dec 2019 11:29:00 -0700 (MST) Subject: [AccessD] Query not returning desired results In-Reply-To: <1f15bc0956a347c299e3930709292f80@kindermorgan.com> References: <3089055ba6274f73bc2c3bf8b7cca8ae@kindermorgan.com> <5DEEB470.15211.137804A7@stuart.lexacorp.com.pg> <8a7b1bfc291a4f559120e5ee09949e6a@kindermorgan.com> <5e905c2163294ffaa24e40805d00ae9e@kindermorgan.com> <1f15bc0956a347c299e3930709292f80@kindermorgan.com> Message-ID: <1418837773.767479789.1576002540440.JavaMail.zimbra@shaw.ca> Hi Chester: I am late to this whole adventure but in the past when I was doing very large and complex queries, in many cases the system would either return invalid results or actually crash the MSAccess application. I found out, that if the query could not be run at the DB end using Oracle/MS SQL/etc and result subsequently streamed, it could be managed if the query process was done in slices or in a number of passes. First slice, using a simple query would map-reduce the data into a temporary file or recordset which could be used to map-reduce the data down, yet again and again as necessary. I found that using the same technique that flatbased files systems used worked well. The difference was of course that you are not fighting against huge data but rather very complex queries. The downside is that the query process takes a number of steps that requires more programming but on the upside, the validation of the query results is easy as each temporary datafile can be checked, query errors can be easily found and isolated, the size of the data that can processed is far larger and when this method is being used with and against very complex queries and huge data chunks, the process time is faster. If you have any questions or interest in using the above described method just ask. HTH Jim ----- Original Message ----- From: "Kaup, Chester" To: "Access Developers discussion and problem solving" Sent: Tuesday, December 10, 2019 9:32:07 AM Subject: Re: [AccessD] Query not returning desired results Unfortunately that did not fix the issue. -----Original Message----- From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Bob Walsh Sent: Tuesday, December 10, 2019 11:02 AM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Query not returning desired results [This email message was received from the Internet and came from outside of Kinder Morgan] Did you try this? From: AccessD On Behalf Of Kaup, Chester Sent: Tuesday, December 10, 2019 8:56 AM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Query not returning desired results [Attn: This is an external email.] Here is the whole query without all the parenthesis in the where clause SELECT [qry 3 Months Running Injection Data Totals].Well_In_CO2PAT, [tbl 3 Month Running Inj Data].Well_in_CO2PAT_API, [tbl 3 Month Running Inj Data].ProductionMonth, [tbl 3 Month Running Inj Data].Other_Pattern, [tbl 3 Month Running Inj Data].Other_Pattern_as_Well, [tbl 3 Month Running Inj Data].Other_Pattern_as_Well_API, [tbl 3 Month Running Inj Data].[3mo_rbi], [ qry 3 Months Running Injection Data Totals].SumOf3mo_rbi, IIf([SumOf3mo_rbi]=0,Allocations.Factor_2,[3mo_rbi]/[SumOf3mo_rbi]) AS Factor_2 INTO [tbl 3 Month Factor 2] FROM ([qry 3 Months Running Injection Data Totals] INNER JOIN [tbl 3 Month Running Inj Data] ON ([qry 3 Months Running Injection Data Totals].ProductionMonth = [tbl 3 Month Running Inj Data].ProductionMonth) AND ([qry 3 Months Running Injection Data Totals].Well_in_CO2PAT_API = [tbl 3 Month Running Inj Data].Well_in_CO2PAT_API)) INNER JOIN Allocations ON ([tbl 3 Month Running Inj Data].Other_Pattern = Allocations.PID) AND ([tbl 3 Month Running Inj Data].Well_in_CO2PAT_API = Allocations.ChildPID) WHERE ([tbl 3 Month Running Inj Data].Other_Pattern<>"PAT 28-5A" AND [tbl 3 Month Running Inj Data].Other_Pattern_as_Well_API Is Null) And ([tbl 3 Month Running Inj Data].Other_Pattern<>"PAT 56-6A" AND [tbl 3 Month Running Inj Data].Other_Pattern_as_Well_API Is Null ) AND Allocations.Date=#11/1/1948# GROUP BY [qry 3 Months Running Injection Data Totals].Well_In_CO2PAT, [tbl 3 Month Running Inj Data].Well_in_CO2PAT_API, [tbl 3 Month Running Inj Data].ProductionMonth, [tbl 3 Month Running Inj Data].Other_Pattern, [tbl 3 Month Running Inj Data].Other_Pattern_as_Well, [tbl 3 Month Running Inj Data].Other_Pattern_as_Well_API, [tbl 3 Month Running Inj Data].[3mo_rbi], [qry 3 Months Running Injection Data Totals].SumOf3mo_rbi, IIf([SumOf3mo_rbi]=0,Allocations.Factor_2,[3mo_rbi]/[SumOf3mo_rbi]); -----Original Message----- From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of rockysmolin bchacc.com Sent: Tuesday, December 10, 2019 10:17 AM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Query not returning desired results [This email message was received from the Internet and came from outside of Kinder Morgan] Can you post again the query without the parentheses - may be easier for one of us to see the problem. Rocky Smolin Beach Access Software 760-683-5777 www.bchacc.com www.e-z-mrp.com Skype: rocky.smolin -----Original Message----- From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Kaup, Chester Sent: Tuesday, December 10, 2019 6:21 AM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Query not returning desired results Got rid of all the unneeded parentheses but still got the same incorrect result. Thanks for the help. -----Original Message----- From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Stuart McLachlan Sent: Monday, December 09, 2019 2:54 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Query not returning desired results [This email message was received from the Internet and came from outside of Kinder Morgan] hey are all AND conditions, so for a start, just get rid of all parentheses. On 9 Dec 2019 at 17:15, Kaup, Chester wrote: > I have a query in which I want to exclude records when one field > equals a certain value and another field in the same record is null. > So far it have been unsuccessful after several attempts of moving > around parenthesis. Here is my statement. I defer to and appreciate > the assistance of other members > > WHERE ((([tbl 3 Month Running Inj Data].Other_Pattern)<>"PAT 28-5A" > And ([tbl 3 Month Running Inj Data].Other_Pattern)<>"PAT 56-6A") AND > (([tbl 3 Month Running Inj Data].Other_Pattern_as_Well_API) Is Null) > AND ((Allocations.Date)=#11/1/1948#)) > > Also tried this > > WHERE (([tbl 3 Month Running Inj Data].Other_Pattern<>"PAT 28-5A" AND > [tbl 3 Month Running Inj Data].Other_Pattern<>"PAT 56-6A" AND [tbl 3 > Month Running Inj Data].Other_Pattern_as_Well_API Is Null) AND > Allocations.Date=#11/1/1948#) > > -- > 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 ________________________________ This message and any attachments are intended for the use of the individual to whom it is addressed and may contain information that is privileged, business sensitive, confidential and/or exempt from disclosure under applicable laws and regulations. If you are not the intended recipient, be aware that any disclosure, copying, distribution, or use of the contents of this transmission is prohibited. If you have received this message in error, please inform the sender and delete all copies. Thank you. -- 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 Chester_Kaup at kindermorgan.com Tue Dec 10 14:37:45 2019 From: Chester_Kaup at kindermorgan.com (Kaup, Chester) Date: Tue, 10 Dec 2019 20:37:45 +0000 Subject: [AccessD] Query not returning desired results In-Reply-To: <1418837773.767479789.1576002540440.JavaMail.zimbra@shaw.ca> References: <3089055ba6274f73bc2c3bf8b7cca8ae@kindermorgan.com> <5DEEB470.15211.137804A7@stuart.lexacorp.com.pg> <8a7b1bfc291a4f559120e5ee09949e6a@kindermorgan.com> <5e905c2163294ffaa24e40805d00ae9e@kindermorgan.com> <1f15bc0956a347c299e3930709292f80@kindermorgan.com> <1418837773.767479789.1576002540440.JavaMail.zimbra@shaw.ca> Message-ID: Thanks everyone for your efforts and ideas. I have opted to delete the offending records from the source table of the query since the table is just a table in the middle of the application that gets created each time the app is run. -----Original Message----- From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Jim Lawrence Sent: Tuesday, December 10, 2019 12:29 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Query not returning desired results [This email message was received from the Internet and came from outside of Kinder Morgan] Hi Chester: I am late to this whole adventure but in the past when I was doing very large and complex queries, in many cases the system would either return invalid results or actually crash the MSAccess application. I found out, that if the query could not be run at the DB end using Oracle/MS SQL/etc and result subsequently streamed, it could be managed if the query process was done in slices or in a number of passes. First slice, using a simple query would map-reduce the data into a temporary file or recordset which could be used to map-reduce the data down, yet again and again as necessary. I found that using the same technique that flatbased files systems used worked well. The difference was of course that you are not fighting against huge data but rather very complex queries. The downside is that the query process takes a number of steps that requires more programming but on the upside, the validation of the query results is easy as each temporary datafile can be checked, query errors can be easily found and isolated, the size of the data that can processed is far larger and when this method is being used with and against very complex queries and huge data chunks, the process time is faster. If you have any questions or interest in using the above described method just ask. HTH Jim ----- Original Message ----- From: "Kaup, Chester" To: "Access Developers discussion and problem solving" Sent: Tuesday, December 10, 2019 9:32:07 AM Subject: Re: [AccessD] Query not returning desired results Unfortunately that did not fix the issue. -----Original Message----- From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Bob Walsh Sent: Tuesday, December 10, 2019 11:02 AM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Query not returning desired results [This email message was received from the Internet and came from outside of Kinder Morgan] Did you try this? From: AccessD On Behalf Of Kaup, Chester Sent: Tuesday, December 10, 2019 8:56 AM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Query not returning desired results [Attn: This is an external email.] Here is the whole query without all the parenthesis in the where clause SELECT [qry 3 Months Running Injection Data Totals].Well_In_CO2PAT, [tbl 3 Month Running Inj Data].Well_in_CO2PAT_API, [tbl 3 Month Running Inj Data].ProductionMonth, [tbl 3 Month Running Inj Data].Other_Pattern, [tbl 3 Month Running Inj Data].Other_Pattern_as_Well, [tbl 3 Month Running Inj Data].Other_Pattern_as_Well_API, [tbl 3 Month Running Inj Data].[3mo_rbi], [ qry 3 Months Running Injection Data Totals].SumOf3mo_rbi, IIf([SumOf3mo_rbi]=0,Allocations.Factor_2,[3mo_rbi]/[SumOf3mo_rbi]) AS Factor_2 INTO [tbl 3 Month Factor 2] FROM ([qry 3 Months Running Injection Data Totals] INNER JOIN [tbl 3 Month Running Inj Data] ON ([qry 3 Months Running Injection Data Totals].ProductionMonth = [tbl 3 Month Running Inj Data].ProductionMonth) AND ([qry 3 Months Running Injection Data Totals].Well_in_CO2PAT_API = [tbl 3 Month Running Inj Data].Well_in_CO2PAT_API)) INNER JOIN Allocations ON ([tbl 3 Month Running Inj Data].Other_Pattern = Allocations.PID) AND ([tbl 3 Month Running Inj Data].Well_in_CO2PAT_API = Allocations.ChildPID) WHERE ([tbl 3 Month Running Inj Data].Other_Pattern<>"PAT 28-5A" AND [tbl 3 Month Running Inj Data].Other_Pattern_as_Well_API Is Null) And ([tbl 3 Month Running Inj Data].Other_Pattern<>"PAT 56-6A" AND [tbl 3 Month Running Inj Data].Other_Pattern_as_Well_API Is Null ) AND Allocations.Date=#11/1/1948# GROUP BY [qry 3 Months Running Injection Data Totals].Well_In_CO2PAT, [tbl 3 Month Running Inj Data].Well_in_CO2PAT_API, [tbl 3 Month Running Inj Data].ProductionMonth, [tbl 3 Month Running Inj Data].Other_Pattern, [tbl 3 Month Running Inj Data].Other_Pattern_as_Well, [tbl 3 Month Running Inj Data].Other_Pattern_as_Well_API, [tbl 3 Month Running Inj Data].[3mo_rbi], [qry 3 Months Running Injection Data Totals].SumOf3mo_rbi, IIf([SumOf3mo_rbi]=0,Allocations.Factor_2,[3mo_rbi]/[SumOf3mo_rbi]); -----Original Message----- From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of rockysmolin bchacc.com Sent: Tuesday, December 10, 2019 10:17 AM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Query not returning desired results [This email message was received from the Internet and came from outside of Kinder Morgan] Can you post again the query without the parentheses - may be easier for one of us to see the problem. Rocky Smolin Beach Access Software 760-683-5777 www.bchacc.com www.e-z-mrp.com Skype: rocky.smolin -----Original Message----- From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Kaup, Chester Sent: Tuesday, December 10, 2019 6:21 AM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Query not returning desired results Got rid of all the unneeded parentheses but still got the same incorrect result. Thanks for the help. -----Original Message----- From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Stuart McLachlan Sent: Monday, December 09, 2019 2:54 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Query not returning desired results [This email message was received from the Internet and came from outside of Kinder Morgan] hey are all AND conditions, so for a start, just get rid of all parentheses. On 9 Dec 2019 at 17:15, Kaup, Chester wrote: > I have a query in which I want to exclude records when one field > equals a certain value and another field in the same record is null. > So far it have been unsuccessful after several attempts of moving > around parenthesis. Here is my statement. I defer to and appreciate > the assistance of other members > > WHERE ((([tbl 3 Month Running Inj Data].Other_Pattern)<>"PAT 28-5A" > And ([tbl 3 Month Running Inj Data].Other_Pattern)<>"PAT 56-6A") AND > (([tbl 3 Month Running Inj Data].Other_Pattern_as_Well_API) Is Null) > AND ((Allocations.Date)=#11/1/1948#)) > > Also tried this > > WHERE (([tbl 3 Month Running Inj Data].Other_Pattern<>"PAT 28-5A" AND > [tbl 3 Month Running Inj Data].Other_Pattern<>"PAT 56-6A" AND [tbl 3 > Month Running Inj Data].Other_Pattern_as_Well_API Is Null) AND > Allocations.Date=#11/1/1948#) > > -- > 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 ________________________________ This message and any attachments are intended for the use of the individual to whom it is addressed and may contain information that is privileged, business sensitive, confidential and/or exempt from disclosure under applicable laws and regulations. If you are not the intended recipient, be aware that any disclosure, copying, distribution, or use of the contents of this transmission is prohibited. If you have received this message in error, please inform the sender and delete all copies. Thank you. -- 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 accessd at shaw.ca Tue Dec 10 17:49:35 2019 From: accessd at shaw.ca (Jim Lawrence) Date: Tue, 10 Dec 2019 16:49:35 -0700 (MST) Subject: [AccessD] Query not returning desired results In-Reply-To: References: <3089055ba6274f73bc2c3bf8b7cca8ae@kindermorgan.com> <8a7b1bfc291a4f559120e5ee09949e6a@kindermorgan.com> <5e905c2163294ffaa24e40805d00ae9e@kindermorgan.com> <1f15bc0956a347c299e3930709292f80@kindermorgan.com> <1418837773.767479789.1576002540440.JavaMail.zimbra@shaw.ca> Message-ID: <1398103627.769031456.1576021775815.JavaMail.zimbra@shaw.ca> Perfect. :-) Jim ----- Original Message ----- From: "Kaup, Chester" To: "Access Developers discussion and problem solving" Sent: Tuesday, December 10, 2019 12:37:45 PM Subject: Re: [AccessD] Query not returning desired results Thanks everyone for your efforts and ideas. I have opted to delete the offending records from the source table of the query since the table is just a table in the middle of the application that gets created each time the app is run. -----Original Message----- From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Jim Lawrence Sent: Tuesday, December 10, 2019 12:29 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Query not returning desired results [This email message was received from the Internet and came from outside of Kinder Morgan] Hi Chester: I am late to this whole adventure but in the past when I was doing very large and complex queries, in many cases the system would either return invalid results or actually crash the MSAccess application. I found out, that if the query could not be run at the DB end using Oracle/MS SQL/etc and result subsequently streamed, it could be managed if the query process was done in slices or in a number of passes. First slice, using a simple query would map-reduce the data into a temporary file or recordset which could be used to map-reduce the data down, yet again and again as necessary. I found that using the same technique that flatbased files systems used worked well. The difference was of course that you are not fighting against huge data but rather very complex queries. The downside is that the query process takes a number of steps that requires more programming but on the upside, the validation of the query results is easy as each temporary datafile can be checked, query errors can be easily found and isolated, the size of the data that can processed is far larger and when this method is being used with and against very complex queries and huge data chunks, the process time is faster. If you have any questions or interest in using the above described method just ask. HTH Jim ----- Original Message ----- From: "Kaup, Chester" To: "Access Developers discussion and problem solving" Sent: Tuesday, December 10, 2019 9:32:07 AM Subject: Re: [AccessD] Query not returning desired results Unfortunately that did not fix the issue. -----Original Message----- From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Bob Walsh Sent: Tuesday, December 10, 2019 11:02 AM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Query not returning desired results [This email message was received from the Internet and came from outside of Kinder Morgan] Did you try this? From: AccessD On Behalf Of Kaup, Chester Sent: Tuesday, December 10, 2019 8:56 AM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Query not returning desired results [Attn: This is an external email.] Here is the whole query without all the parenthesis in the where clause SELECT [qry 3 Months Running Injection Data Totals].Well_In_CO2PAT, [tbl 3 Month Running Inj Data].Well_in_CO2PAT_API, [tbl 3 Month Running Inj Data].ProductionMonth, [tbl 3 Month Running Inj Data].Other_Pattern, [tbl 3 Month Running Inj Data].Other_Pattern_as_Well, [tbl 3 Month Running Inj Data].Other_Pattern_as_Well_API, [tbl 3 Month Running Inj Data].[3mo_rbi], [ qry 3 Months Running Injection Data Totals].SumOf3mo_rbi, IIf([SumOf3mo_rbi]=0,Allocations.Factor_2,[3mo_rbi]/[SumOf3mo_rbi]) AS Factor_2 INTO [tbl 3 Month Factor 2] FROM ([qry 3 Months Running Injection Data Totals] INNER JOIN [tbl 3 Month Running Inj Data] ON ([qry 3 Months Running Injection Data Totals].ProductionMonth = [tbl 3 Month Running Inj Data].ProductionMonth) AND ([qry 3 Months Running Injection Data Totals].Well_in_CO2PAT_API = [tbl 3 Month Running Inj Data].Well_in_CO2PAT_API)) INNER JOIN Allocations ON ([tbl 3 Month Running Inj Data].Other_Pattern = Allocations.PID) AND ([tbl 3 Month Running Inj Data].Well_in_CO2PAT_API = Allocations.ChildPID) WHERE ([tbl 3 Month Running Inj Data].Other_Pattern<>"PAT 28-5A" AND [tbl 3 Month Running Inj Data].Other_Pattern_as_Well_API Is Null) And ([tbl 3 Month Running Inj Data].Other_Pattern<>"PAT 56-6A" AND [tbl 3 Month Running Inj Data].Other_Pattern_as_Well_API Is Null ) AND Allocations.Date=#11/1/1948# GROUP BY [qry 3 Months Running Injection Data Totals].Well_In_CO2PAT, [tbl 3 Month Running Inj Data].Well_in_CO2PAT_API, [tbl 3 Month Running Inj Data].ProductionMonth, [tbl 3 Month Running Inj Data].Other_Pattern, [tbl 3 Month Running Inj Data].Other_Pattern_as_Well, [tbl 3 Month Running Inj Data].Other_Pattern_as_Well_API, [tbl 3 Month Running Inj Data].[3mo_rbi], [qry 3 Months Running Injection Data Totals].SumOf3mo_rbi, IIf([SumOf3mo_rbi]=0,Allocations.Factor_2,[3mo_rbi]/[SumOf3mo_rbi]); -----Original Message----- From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of rockysmolin bchacc.com Sent: Tuesday, December 10, 2019 10:17 AM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Query not returning desired results [This email message was received from the Internet and came from outside of Kinder Morgan] Can you post again the query without the parentheses - may be easier for one of us to see the problem. Rocky Smolin Beach Access Software 760-683-5777 www.bchacc.com www.e-z-mrp.com Skype: rocky.smolin -----Original Message----- From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Kaup, Chester Sent: Tuesday, December 10, 2019 6:21 AM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Query not returning desired results Got rid of all the unneeded parentheses but still got the same incorrect result. Thanks for the help. -----Original Message----- From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Stuart McLachlan Sent: Monday, December 09, 2019 2:54 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Query not returning desired results [This email message was received from the Internet and came from outside of Kinder Morgan] hey are all AND conditions, so for a start, just get rid of all parentheses. On 9 Dec 2019 at 17:15, Kaup, Chester wrote: > I have a query in which I want to exclude records when one field > equals a certain value and another field in the same record is null. > So far it have been unsuccessful after several attempts of moving > around parenthesis. Here is my statement. I defer to and appreciate > the assistance of other members > > WHERE ((([tbl 3 Month Running Inj Data].Other_Pattern)<>"PAT 28-5A" > And ([tbl 3 Month Running Inj Data].Other_Pattern)<>"PAT 56-6A") AND > (([tbl 3 Month Running Inj Data].Other_Pattern_as_Well_API) Is Null) > AND ((Allocations.Date)=#11/1/1948#)) > > Also tried this > > WHERE (([tbl 3 Month Running Inj Data].Other_Pattern<>"PAT 28-5A" AND > [tbl 3 Month Running Inj Data].Other_Pattern<>"PAT 56-6A" AND [tbl 3 > Month Running Inj Data].Other_Pattern_as_Well_API Is Null) AND > Allocations.Date=#11/1/1948#) > > -- > 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 ________________________________ This message and any attachments are intended for the use of the individual to whom it is addressed and may contain information that is privileged, business sensitive, confidential and/or exempt from disclosure under applicable laws and regulations. If you are not the intended recipient, be aware that any disclosure, copying, distribution, or use of the contents of this transmission is prohibited. If you have received this message in error, please inform the sender and delete all copies. Thank you. -- 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 newsgrps at dalyn.co.nz Tue Dec 17 12:29:40 2019 From: newsgrps at dalyn.co.nz (David Emerson) Date: Wed, 18 Dec 2019 07:29:40 +1300 Subject: [AccessD] [dba-SQLServer] DSN Tables - Could not find installable ISAM In-Reply-To: <004201d5b453$073d49c0$15b7dd40$@dalyn.co.nz> References: <004201d5b453$073d49c0$15b7dd40$@dalyn.co.nz> Message-ID: <000401d5b507$f25c9550$d715bff0$@dalyn.co.nz> Does anyone have experience with linking tables to Azure? -----Original Message----- From: dba-SQLServer [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of David Emerson Sent: Tuesday, 17 December 2019 9:55 a.m. To: AccessDSQL Subject: [dba-SQLServer] DSN Tables - Could not find installable ISAM Hi Team, I have an Access 2016 accdb with code to link SQL tables. The code works for SQL Server and we are trying to migrate the database to Azure. When I run the code it gives me error 3170 - Could not find installable ISAM. The connection string works when I use it to connect to the Azure database (I have changed the password for this email). It is just the table linking that doesn't work. Can anyone give me a pointer as to where I can look for a solution? Public Function AttachDSNLessTable(stLocalTableName As String, stRemoteTableName As String, stServer As String, stDatabase As String, Optional stUsername As String, Optional stPassword As String, Optional stKeyfield As String) '//Name : AttachDSNLessTable '//Purpose : Create a linked table to SQL Server without using a DSN '//Parameters '// stLocalTableName: Name of the table that you are creating in the current database '// stRemoteTableName: Name of the table that you are linking to on the SQL Server database '// stServer: Name of the SQL Server that you are linking to '// stDatabase: Name of the SQL Server database that you are linking to '// stUsername: Name of the SQL Server user who can connect to SQL Server, leave blank to use a Trusted Connection '// stPassword: SQL Server user password '// stKeyfield: Name of field if stRemoteTableName is a view. This is used to set up an index so data can be edited On Error GoTo Err_AttachDSNLessTable Dim td As TableDef Dim stConnect As String For Each td In CurrentDb.TableDefs If td.Name = stLocalTableName Then CurrentDb.TableDefs.Delete stLocalTableName End If Next If Len(stUsername) = 0 Then '//Use trusted authentication if stUsername is not supplied. stConnect = "ODBC;DRIVER=SQL Server;SERVER=" & stServer & ";DATABASE=" & stDatabase & ";Trusted_Connection=Yes" Else '//WARNING: This will save the username and the password with the linked table information. stConnect = "Driver={ODBC Driver 13 for SQL Server};Server=tcp:prism-uat.database.windows.net,1433;Database=Prism-UAT;Ui d=SUPPORT-Dalyn at xxxxxx.co.nz;Pwd=MYSECUREPWD;Encrypt=yes;TrustServerCertific ate=no;Connection Timeout=30;Authentication=ActiveDirectoryPassword" End If Set td = CurrentDb.CreateTableDef(stLocalTableName, dbAttachSavePWD, stRemoteTableName, stConnect) CurrentDb.TableDefs.Append td If Len(stKeyfield) > 0 Then CurrentDb.Execute "CREATE UNIQUE INDEX 'PrimaryKey' ON " & stLocalTableName & " (" & stKeyfield & ") WITH PRIMARY" End If AttachDSNLessTable = True Exit Function Exit_AttachDSNLessTable: Exit Function Err_AttachDSNLessTable: AttachDSNLessTable = False Select Case Err Case 0 MsgBox "0 error", vbCritical, "Error heading" Case 2001 ' Event canceled Case 2046 ' Not able to save Resume Next Case Else Call basErrorMsg("AttachDSNLessTable") End Select Resume Exit_AttachDSNLessTable End Function Regards David Emerson Dalyn Software Ltd Wellington, New Zealand From gustav at cactus.dk Wed Dec 18 01:01:49 2019 From: gustav at cactus.dk (Gustav Brock) Date: Wed, 18 Dec 2019 07:01:49 +0000 Subject: [AccessD] [dba-SQLServer] DSN Tables - Could not find installable ISAM Message-ID: Hi David Yes. Use the latest ODBC driver and a connection string like: DRIVER=SQL Server Native Client 17.0;Description=Your application name;APP=Microsoft? Access;SERVER=tcp:YourInstanceName.database.windows.net,1433;DATABASE=YourDbName;Trusted_Connection=No;UID=Username at YourInstanceName;PWD=YourPassword; We have these two functions to control that and relink the tables and PT queries: ' Create ODBC connection string from its variable elements. ' ' 2018-10-02. Cactus Data ApS, CPH. ' Public Function ConnectionString( _ ByVal Hostname As String, _ ByVal Database As String, _ ByVal Username As String, _ ByVal Password As String) _ As String Const AzureDomain As String = ".windows.net" Const OdbcConnect As String = _ "ODBC;" & _ "DRIVER=SQL Server Native Client 11.0;" & _ "Description=Cactus TimeSag og Finans;" & _ "APP=Microsoft? Access;" & _ "SERVER={0};" & _ "DATABASE={1};" & _ "UID={2};" & _ "PWD={3};" & _ "Trusted_Connection={4};" ' Examples (Note, optional encryption): ' "ODBC;Driver=SQL Server;Server=tcp:b8uros8p4x.database.windows.net;Database=cactus;UID=cactus@ b8uros8p4x;Pwd=Password;Encrypt=yes" ' ' "ODBC;Driver=SQL Server Native Client 17.0;Server=(localdb)\MSSQLLocalDB;Database=Test;Trusted_Connection=Yes" Dim FullConnect As String If Right(Hostname, Len(AzureDomain)) = AzureDomain Then ' Azure SQL connection. ' Append servername to username. Username = Username & "@" & Split(Hostname)(0) End If FullConnect = OdbcConnect FullConnect = Replace(FullConnect, "{0}", Hostname) FullConnect = Replace(FullConnect, "{1}", Database) FullConnect = Replace(FullConnect, "{2}", Username) FullConnect = Replace(FullConnect, "{3}", Password) FullConnect = Replace(FullConnect, "{4}", IIf(Username & Password = "", "Yes", "No")) ConnectionString = FullConnect End Function ' Attach all tables linked via ODBC to SQL Server or Azure SQL. ' ' 2016-04-24. Cactus Data ApS, CPH. ' Public Function AttachSqlServer( _ ByVal Hostname As String, _ ByVal Database As String, _ ByVal Username As String, _ ByVal Password As String) _ As Boolean Const cstrDbType As String = "ODBC" Const cstrAcPrefix As String = "dbo_" Dim dbs As DAO.Database Dim tdf As DAO.TableDef Dim qdf As DAO.QueryDef Dim strConnect As String Dim strName As String On Error GoTo Err_AttachSqlServer Set dbs = CurrentDb strConnect = ConnectionString(Hostname, Database, Username, Password) For Each tdf In dbs.TableDefs strName = tdf.Name If Asc(strName) <> Asc("~") Then If InStr(tdf.Connect, cstrDbType) = 1 Then If Left(strName, Len(cstrAcPrefix)) = cstrAcPrefix Then tdf.Name = Mid(strName, Len(cstrAcPrefix) + 1) End If tdf.Connect = strConnect tdf.RefreshLink Debug.Print Timer, tdf.Name, tdf.SourceTableName, tdf.Connect DoEvents End If End If Next For Each qdf In dbs.QueryDefs If qdf.Connect <> "" Then Debug.Print Timer, qdf.Name, qdf.Type, qdf.Connect qdf.Connect = strConnect End If Next Debug.Print "Done!" AttachSqlServer = True Exit_AttachSqlServer: Set tdf = Nothing Set dbs = Nothing Exit Function Err_AttachSqlServer: Call ErrorMox Resume Exit_AttachSqlServer End Function /gustav -----Oprindelig meddelelse----- Fra: AccessD P? vegne af David Emerson Sendt: 17. december 2019 19:30 Til: 'Access Developers discussion and problem solving' Emne: Re: [AccessD] [dba-SQLServer] DSN Tables - Could not find installable ISAM Does anyone have experience with linking tables to Azure? From newsgrps at dalyn.co.nz Wed Dec 18 02:07:55 2019 From: newsgrps at dalyn.co.nz (David Emerson) Date: Wed, 18 Dec 2019 21:07:55 +1300 Subject: [AccessD] [dba-SQLServer] DSN Tables - Could not find installable ISAM In-Reply-To: References: Message-ID: <000d01d5b57a$415d0370$c4170a50$@dalyn.co.nz> Thanks Gustav, much appreciated. -----Original Message----- From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Gustav Brock via AccessD Sent: Wednesday, 18 December 2019 8:02 p.m. To: Access Developers discussion and problem solving Cc: Gustav Brock Subject: Re: [AccessD] [dba-SQLServer] DSN Tables - Could not find installable ISAM Hi David Yes. Use the latest ODBC driver and a connection string like: DRIVER=SQL Server Native Client 17.0;Description=Your application name;APP=Microsoft? Access;SERVER=tcp:YourInstanceName.database.windows.net,1433;DATABASE=YourDb Name;Trusted_Connection=No;UID=Username at YourInstanceName;PWD=YourPassword; We have these two functions to control that and relink the tables and PT queries: ' Create ODBC connection string from its variable elements. ' ' 2018-10-02. Cactus Data ApS, CPH. ' Public Function ConnectionString( _ ByVal Hostname As String, _ ByVal Database As String, _ ByVal Username As String, _ ByVal Password As String) _ As String Const AzureDomain As String = ".windows.net" Const OdbcConnect As String = _ "ODBC;" & _ "DRIVER=SQL Server Native Client 11.0;" & _ "Description=Cactus TimeSag og Finans;" & _ "APP=Microsoft? Access;" & _ "SERVER={0};" & _ "DATABASE={1};" & _ "UID={2};" & _ "PWD={3};" & _ "Trusted_Connection={4};" ' Examples (Note, optional encryption): ' "ODBC;Driver=SQL Server;Server=tcp:b8uros8p4x.database.windows.net;Database=cactus;UID=cactus @ b8uros8p4x;Pwd=Password;Encrypt=yes" ' ' "ODBC;Driver=SQL Server Native Client 17.0;Server=(localdb)\MSSQLLocalDB;Database=Test;Trusted_Connection=Yes" Dim FullConnect As String If Right(Hostname, Len(AzureDomain)) = AzureDomain Then ' Azure SQL connection. ' Append servername to username. Username = Username & "@" & Split(Hostname)(0) End If FullConnect = OdbcConnect FullConnect = Replace(FullConnect, "{0}", Hostname) FullConnect = Replace(FullConnect, "{1}", Database) FullConnect = Replace(FullConnect, "{2}", Username) FullConnect = Replace(FullConnect, "{3}", Password) FullConnect = Replace(FullConnect, "{4}", IIf(Username & Password = "", "Yes", "No")) ConnectionString = FullConnect End Function ' Attach all tables linked via ODBC to SQL Server or Azure SQL. ' ' 2016-04-24. Cactus Data ApS, CPH. ' Public Function AttachSqlServer( _ ByVal Hostname As String, _ ByVal Database As String, _ ByVal Username As String, _ ByVal Password As String) _ As Boolean Const cstrDbType As String = "ODBC" Const cstrAcPrefix As String = "dbo_" Dim dbs As DAO.Database Dim tdf As DAO.TableDef Dim qdf As DAO.QueryDef Dim strConnect As String Dim strName As String On Error GoTo Err_AttachSqlServer Set dbs = CurrentDb strConnect = ConnectionString(Hostname, Database, Username, Password) For Each tdf In dbs.TableDefs strName = tdf.Name If Asc(strName) <> Asc("~") Then If InStr(tdf.Connect, cstrDbType) = 1 Then If Left(strName, Len(cstrAcPrefix)) = cstrAcPrefix Then tdf.Name = Mid(strName, Len(cstrAcPrefix) + 1) End If tdf.Connect = strConnect tdf.RefreshLink Debug.Print Timer, tdf.Name, tdf.SourceTableName, tdf.Connect DoEvents End If End If Next For Each qdf In dbs.QueryDefs If qdf.Connect <> "" Then Debug.Print Timer, qdf.Name, qdf.Type, qdf.Connect qdf.Connect = strConnect End If Next Debug.Print "Done!" AttachSqlServer = True Exit_AttachSqlServer: Set tdf = Nothing Set dbs = Nothing Exit Function Err_AttachSqlServer: Call ErrorMox Resume Exit_AttachSqlServer End Function /gustav -----Oprindelig meddelelse----- Fra: AccessD P? vegne af David Emerson Sendt: 17. december 2019 19:30 Til: 'Access Developers discussion and problem solving' Emne: Re: [AccessD] [dba-SQLServer] DSN Tables - Could not find installable ISAM Does anyone have experience with linking tables to Azure? -- 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 Dec 18 15:48:37 2019 From: newsgrps at dalyn.co.nz (David Emerson) Date: Thu, 19 Dec 2019 10:48:37 +1300 Subject: [AccessD] [dba-SQLServer] DSN Tables - Could not find installable ISAM In-Reply-To: References: Message-ID: <004701d5b5ec$e7fec340$b7fc49c0$@dalyn.co.nz> Hi Gustav, I have had the Tech guy install SQL Server Native Client 17.0. When I use a connection testing program this connection string connects to the server: Driver={ODBC Driver 17 for SQL Server};Server=tcp:prism-uat.database.windows.net,1433;Database=Prism-UAT;Ui d=SUPPORT-Dalyn at Healthcarenz.co.nz;Pwd=MYPASSWORD;Encrypt=yes;TrustServerCer tificate=no;Connection Timeout=30;Authentication=ActiveDirectoryPassword But I am still getting the "Could not find installable ISAM" error when I use this in my table linking code. When I use this one from your example in the connection test program it doesn't connect: DRIVER=SQL Server Native Client 17.0;Description=PRISM;APP=Microsoft? Access;SERVER=tcp:prism-uat.database.windows.net,1433;DATABASE=Prism-UAT;Tru sted_Connection=No;UID=SUPPORT-Dalyn at Healthcarenz.co.nz;PWD=MYPASSWORD The error message is "[ODBC Driver manager] data source name not found and no default driver specified" I am using system.data.odbc as the provider. What am I doing wrong? Regards David -----Original Message----- From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Gustav Brock via AccessD Sent: Wednesday, 18 December 2019 8:02 p.m. To: Access Developers discussion and problem solving Cc: Gustav Brock Subject: Re: [AccessD] [dba-SQLServer] DSN Tables - Could not find installable ISAM Hi David Yes. Use the latest ODBC driver and a connection string like: DRIVER=SQL Server Native Client 17.0;Description=Your application name;APP=Microsoft? Access;SERVER=tcp:YourInstanceName.database.windows.net,1433;DATABASE=YourDb Name;Trusted_Connection=No;UID=Username at YourInstanceName;PWD=YourPassword; We have these two functions to control that and relink the tables and PT queries: ' Create ODBC connection string from its variable elements. ' ' 2018-10-02. Cactus Data ApS, CPH. ' Public Function ConnectionString( _ ByVal Hostname As String, _ ByVal Database As String, _ ByVal Username As String, _ ByVal Password As String) _ As String Const AzureDomain As String = ".windows.net" Const OdbcConnect As String = _ "ODBC;" & _ "DRIVER=SQL Server Native Client 11.0;" & _ "Description=Cactus TimeSag og Finans;" & _ "APP=Microsoft? Access;" & _ "SERVER={0};" & _ "DATABASE={1};" & _ "UID={2};" & _ "PWD={3};" & _ "Trusted_Connection={4};" ' Examples (Note, optional encryption): ' "ODBC;Driver=SQL Server;Server=tcp:b8uros8p4x.database.windows.net;Database=cactus;UID=cactus @ b8uros8p4x;Pwd=Password;Encrypt=yes" ' ' "ODBC;Driver=SQL Server Native Client 17.0;Server=(localdb)\MSSQLLocalDB;Database=Test;Trusted_Connection=Yes" Dim FullConnect As String If Right(Hostname, Len(AzureDomain)) = AzureDomain Then ' Azure SQL connection. ' Append servername to username. Username = Username & "@" & Split(Hostname)(0) End If FullConnect = OdbcConnect FullConnect = Replace(FullConnect, "{0}", Hostname) FullConnect = Replace(FullConnect, "{1}", Database) FullConnect = Replace(FullConnect, "{2}", Username) FullConnect = Replace(FullConnect, "{3}", Password) FullConnect = Replace(FullConnect, "{4}", IIf(Username & Password = "", "Yes", "No")) ConnectionString = FullConnect End Function ' Attach all tables linked via ODBC to SQL Server or Azure SQL. ' ' 2016-04-24. Cactus Data ApS, CPH. ' Public Function AttachSqlServer( _ ByVal Hostname As String, _ ByVal Database As String, _ ByVal Username As String, _ ByVal Password As String) _ As Boolean Const cstrDbType As String = "ODBC" Const cstrAcPrefix As String = "dbo_" Dim dbs As DAO.Database Dim tdf As DAO.TableDef Dim qdf As DAO.QueryDef Dim strConnect As String Dim strName As String On Error GoTo Err_AttachSqlServer Set dbs = CurrentDb strConnect = ConnectionString(Hostname, Database, Username, Password) For Each tdf In dbs.TableDefs strName = tdf.Name If Asc(strName) <> Asc("~") Then If InStr(tdf.Connect, cstrDbType) = 1 Then If Left(strName, Len(cstrAcPrefix)) = cstrAcPrefix Then tdf.Name = Mid(strName, Len(cstrAcPrefix) + 1) End If tdf.Connect = strConnect tdf.RefreshLink Debug.Print Timer, tdf.Name, tdf.SourceTableName, tdf.Connect DoEvents End If End If Next For Each qdf In dbs.QueryDefs If qdf.Connect <> "" Then Debug.Print Timer, qdf.Name, qdf.Type, qdf.Connect qdf.Connect = strConnect End If Next Debug.Print "Done!" AttachSqlServer = True Exit_AttachSqlServer: Set tdf = Nothing Set dbs = Nothing Exit Function Err_AttachSqlServer: Call ErrorMox Resume Exit_AttachSqlServer End Function /gustav -----Oprindelig meddelelse----- Fra: AccessD P? vegne af David Emerson Sendt: 17. december 2019 19:30 Til: 'Access Developers discussion and problem solving' Emne: Re: [AccessD] [dba-SQLServer] DSN Tables - Could not find installable ISAM Does anyone have experience with linking tables to Azure? -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From gustav at cactus.dk Thu Dec 19 01:16:06 2019 From: gustav at cactus.dk (Gustav Brock) Date: Thu, 19 Dec 2019 07:16:06 +0000 Subject: [AccessD] [dba-SQLServer] DSN Tables - Could not find installable ISAM Message-ID: Hi David > "[ODBC Driver manager] data source name not found and no default driver specified" That error means that the Data Source Name (DSN) you are specifying in your connection configuration is not being found in the windows registry. But my connection method is DSN-less, so you are mixing the two methods. Also, your UID seems to be an email address; Azure SQL knows nothing about that. So, at least as a starting point, stick with the exact syntax from my example. As for the driver install, and as I recall it, it installs by default both 32-bit and 64-bit if Windows is 64-bit. But you can install the 32-bit only, thus - if you run a 64-bit application - that will fail. /gustav -----Oprindelig meddelelse----- Fra: David Emerson Sendt: 18. december 2019 22:49 Til: 'Access Developers discussion and problem solving' Cc: Gustav Brock Emne: RE: [AccessD] [dba-SQLServer] DSN Tables - Could not find installable ISAM Hi Gustav, I have had the Tech guy install SQL Server Native Client 17.0. When I use a connection testing program this connection string connects to the server: Driver={ODBC Driver 17 for SQL Server};Server=tcp:prism-uat.database.windows.net,1433;Database=Prism-UAT;Ui d=SUPPORT-Dalyn at Healthcarenz.co.nz;Pwd=MYPASSWORD;Encrypt=yes;TrustServerCer tificate=no;Connection Timeout=30;Authentication=ActiveDirectoryPassword But I am still getting the "Could not find installable ISAM" error when I use this in my table linking code. When I use this one from your example in the connection test program it doesn't connect: DRIVER=SQL Server Native Client 17.0;Description=PRISM;APP=Microsoft? Access;SERVER=tcp:prism-uat.database.windows.net,1433;DATABASE=Prism-UAT;Tru sted_Connection=No;UID=SUPPORT-Dalyn at Healthcarenz.co.nz;PWD=MYPASSWORD The error message is "[ODBC Driver manager] data source name not found and no default driver specified" I am using system.data.odbc as the provider. What am I doing wrong? Regards David -----Original Message----- From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Gustav Brock via AccessD Sent: Wednesday, 18 December 2019 8:02 p.m. To: Access Developers discussion and problem solving Cc: Gustav Brock Subject: Re: [AccessD] [dba-SQLServer] DSN Tables - Could not find installable ISAM Hi David Yes. Use the latest ODBC driver and a connection string like: DRIVER=SQL Server Native Client 17.0;Description=Your application name;APP=Microsoft? Access;SERVER=tcp:YourInstanceName.database.windows.net,1433;DATABASE=YourDb Name;Trusted_Connection=No;UID=Username at YourInstanceName;PWD=YourPassword; We have these two functions to control that and relink the tables and PT queries: ' Create ODBC connection string from its variable elements. ' ' 2018-10-02. Cactus Data ApS, CPH. ' Public Function ConnectionString( _ ByVal Hostname As String, _ ByVal Database As String, _ ByVal Username As String, _ ByVal Password As String) _ As String Const AzureDomain As String = ".windows.net" Const OdbcConnect As String = _ "ODBC;" & _ "DRIVER=SQL Server Native Client 11.0;" & _ "Description=Cactus TimeSag og Finans;" & _ "APP=Microsoft? Access;" & _ "SERVER={0};" & _ "DATABASE={1};" & _ "UID={2};" & _ "PWD={3};" & _ "Trusted_Connection={4};" ' Examples (Note, optional encryption): ' "ODBC;Driver=SQL Server;Server=tcp:b8uros8p4x.database.windows.net;Database=cactus;UID=cactus @ b8uros8p4x;Pwd=Password;Encrypt=yes" ' ' "ODBC;Driver=SQL Server Native Client 17.0;Server=(localdb)\MSSQLLocalDB;Database=Test;Trusted_Connection=Yes" Dim FullConnect As String If Right(Hostname, Len(AzureDomain)) = AzureDomain Then ' Azure SQL connection. ' Append servername to username. Username = Username & "@" & Split(Hostname)(0) End If FullConnect = OdbcConnect FullConnect = Replace(FullConnect, "{0}", Hostname) FullConnect = Replace(FullConnect, "{1}", Database) FullConnect = Replace(FullConnect, "{2}", Username) FullConnect = Replace(FullConnect, "{3}", Password) FullConnect = Replace(FullConnect, "{4}", IIf(Username & Password = "", "Yes", "No")) ConnectionString = FullConnect End Function ' Attach all tables linked via ODBC to SQL Server or Azure SQL. ' ' 2016-04-24. Cactus Data ApS, CPH. ' Public Function AttachSqlServer( _ ByVal Hostname As String, _ ByVal Database As String, _ ByVal Username As String, _ ByVal Password As String) _ As Boolean Const cstrDbType As String = "ODBC" Const cstrAcPrefix As String = "dbo_" Dim dbs As DAO.Database Dim tdf As DAO.TableDef Dim qdf As DAO.QueryDef Dim strConnect As String Dim strName As String On Error GoTo Err_AttachSqlServer Set dbs = CurrentDb strConnect = ConnectionString(Hostname, Database, Username, Password) For Each tdf In dbs.TableDefs strName = tdf.Name If Asc(strName) <> Asc("~") Then If InStr(tdf.Connect, cstrDbType) = 1 Then If Left(strName, Len(cstrAcPrefix)) = cstrAcPrefix Then tdf.Name = Mid(strName, Len(cstrAcPrefix) + 1) End If tdf.Connect = strConnect tdf.RefreshLink Debug.Print Timer, tdf.Name, tdf.SourceTableName, tdf.Connect DoEvents End If End If Next For Each qdf In dbs.QueryDefs If qdf.Connect <> "" Then Debug.Print Timer, qdf.Name, qdf.Type, qdf.Connect qdf.Connect = strConnect End If Next Debug.Print "Done!" AttachSqlServer = True Exit_AttachSqlServer: Set tdf = Nothing Set dbs = Nothing Exit Function Err_AttachSqlServer: Call ErrorMox Resume Exit_AttachSqlServer End Function /gustav -----Oprindelig meddelelse----- Fra: AccessD P? vegne af David Emerson Sendt: 17. december 2019 19:30 Til: 'Access Developers discussion and problem solving' Emne: Re: [AccessD] [dba-SQLServer] DSN Tables - Could not find installable ISAM Does anyone have experience with linking tables to Azure? From davidmcafee at gmail.com Thu Dec 19 12:24:40 2019 From: davidmcafee at gmail.com (David McAfee) Date: Thu, 19 Dec 2019 10:24:40 -0800 Subject: [AccessD] [dba-SQLServer] DSN Tables - Could not find installable ISAM In-Reply-To: References: Message-ID: Probably not related, but Microsoft put out another bad update this week that broke existing apps on our end (2nd bad update in 3 weeks!) All of the sudden we were experiencing ODBC call failed and/or invalid cursor state errors. I reverted our O365 boxes with version 1912 (build 12325-20172) to 1911 (build 12228.20364) and the odbc errors went away. Once again, might not be your issue, but I'd hate to be troubleshooting an odbc issue, going nuts, only to find out it was due to a bad ms update! Grrrr!!! On Wed, Dec 18, 2019, 11:16 PM Gustav Brock via AccessD < accessd at databaseadvisors.com> wrote: > Hi David > > > "[ODBC Driver manager] data source name not found and no default driver > specified" > > That error means that the Data Source Name (DSN) you are specifying in > your connection configuration is not being found in the windows registry. > > But my connection method is DSN-less, so you are mixing the two methods. > > Also, your UID seems to be an email address; Azure SQL knows nothing about > that. > So, at least as a starting point, stick with the exact syntax from my > example. > > As for the driver install, and as I recall it, it installs by default both > 32-bit and 64-bit if Windows is 64-bit. But you can install the 32-bit > only, thus - if you run a 64-bit application - that will fail. > > /gustav > > -----Oprindelig meddelelse----- > Fra: David Emerson > Sendt: 18. december 2019 22:49 > Til: 'Access Developers discussion and problem solving' < > accessd at databaseadvisors.com> > Cc: Gustav Brock > Emne: RE: [AccessD] [dba-SQLServer] DSN Tables - Could not find > installable ISAM > > Hi Gustav, > > I have had the Tech guy install SQL Server Native Client 17.0. > > When I use a connection testing program this connection string connects to > the server: > > Driver={ODBC Driver 17 for SQL > Server};Server=tcp:prism-uat.database.windows.net > ,1433;Database=Prism-UAT;Ui > d=SUPPORT-Dalyn at Healthcarenz.co.nz > ;Pwd=MYPASSWORD;Encrypt=yes;TrustServerCer > tificate=no;Connection Timeout=30;Authentication=ActiveDirectoryPassword > > But I am still getting the "Could not find installable ISAM" error when I > use this in my table linking code. > > When I use this one from your example in the connection test program it > doesn't connect: > > DRIVER=SQL Server Native Client 17.0;Description=PRISM;APP=Microsoft? > Access;SERVER=tcp:prism-uat.database.windows.net > ,1433;DATABASE=Prism-UAT;Tru > sted_Connection=No;UID=SUPPORT-Dalyn at Healthcarenz.co.nz;PWD=MYPASSWORD > > The error message is "[ODBC Driver manager] data source name not found and > no default driver specified" > > I am using system.data.odbc as the provider. > > What am I doing wrong? > > Regards > > David > > -----Original Message----- > From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of > Gustav Brock via AccessD > Sent: Wednesday, 18 December 2019 8:02 p.m. > To: Access Developers discussion and problem solving > Cc: Gustav Brock > Subject: Re: [AccessD] [dba-SQLServer] DSN Tables - Could not find > installable ISAM > > Hi David > > Yes. Use the latest ODBC driver and a connection string like: > > DRIVER=SQL Server Native Client 17.0;Description=Your application > name;APP=Microsoft? Access;SERVER=tcp: > YourInstanceName.database.windows.net,1433;DATABASE=YourDb > Name;Trusted_Connection=No;UID=Username at YourInstanceName;PWD=YourPassword; > > We have these two functions to control that and relink the tables and PT > queries: > > > ' Create ODBC connection string from its variable elements. > ' > ' 2018-10-02. Cactus Data ApS, CPH. > ' > Public Function ConnectionString( _ > ByVal Hostname As String, _ > ByVal Database As String, _ > ByVal Username As String, _ > ByVal Password As String) _ > As String > > Const AzureDomain As String = ".windows.net" > Const OdbcConnect As String = _ > "ODBC;" & _ > "DRIVER=SQL Server Native Client 11.0;" & _ > "Description=Cactus TimeSag og Finans;" & _ > "APP=Microsoft? Access;" & _ > "SERVER={0};" & _ > "DATABASE={1};" & _ > "UID={2};" & _ > "PWD={3};" & _ > "Trusted_Connection={4};" > > ' Examples (Note, optional encryption): > ' "ODBC;Driver=SQL > Server;Server=tcp:b8uros8p4x.database.windows.net > ;Database=cactus;UID=cactus > @ b8uros8p4x;Pwd=Password;Encrypt=yes" > ' > ' "ODBC;Driver=SQL Server Native Client > 17.0;Server=(localdb)\MSSQLLocalDB;Database=Test;Trusted_Connection=Yes" > > Dim FullConnect As String > > If Right(Hostname, Len(AzureDomain)) = AzureDomain Then > ' Azure SQL connection. > ' Append servername to username. > Username = Username & "@" & Split(Hostname)(0) > End If > FullConnect = OdbcConnect > FullConnect = Replace(FullConnect, "{0}", Hostname) > FullConnect = Replace(FullConnect, "{1}", Database) > FullConnect = Replace(FullConnect, "{2}", Username) > FullConnect = Replace(FullConnect, "{3}", Password) > FullConnect = Replace(FullConnect, "{4}", IIf(Username & Password = > "", "Yes", "No")) > > ConnectionString = FullConnect > > End Function > > > ' Attach all tables linked via ODBC to SQL Server or Azure SQL. > ' > ' 2016-04-24. Cactus Data ApS, CPH. > ' > Public Function AttachSqlServer( _ > ByVal Hostname As String, _ > ByVal Database As String, _ > ByVal Username As String, _ > ByVal Password As String) _ > As Boolean > > Const cstrDbType As String = "ODBC" > Const cstrAcPrefix As String = "dbo_" > > Dim dbs As DAO.Database > Dim tdf As DAO.TableDef > Dim qdf As DAO.QueryDef > > Dim strConnect As String > Dim strName As String > > On Error GoTo Err_AttachSqlServer > > Set dbs = CurrentDb > strConnect = ConnectionString(Hostname, Database, Username, Password) > > For Each tdf In dbs.TableDefs > strName = tdf.Name > If Asc(strName) <> Asc("~") Then > If InStr(tdf.Connect, cstrDbType) = 1 Then > If Left(strName, Len(cstrAcPrefix)) = cstrAcPrefix Then > tdf.Name = Mid(strName, Len(cstrAcPrefix) + 1) > End If > tdf.Connect = strConnect > tdf.RefreshLink > Debug.Print Timer, tdf.Name, tdf.SourceTableName, > tdf.Connect > DoEvents > End If > End If > Next > > For Each qdf In dbs.QueryDefs > If qdf.Connect <> "" Then > Debug.Print Timer, qdf.Name, qdf.Type, qdf.Connect > qdf.Connect = strConnect > End If > Next > Debug.Print "Done!" > > AttachSqlServer = True > > Exit_AttachSqlServer: > Set tdf = Nothing > Set dbs = Nothing > Exit Function > > Err_AttachSqlServer: > Call ErrorMox > Resume Exit_AttachSqlServer > > End Function > > > /gustav > > -----Oprindelig meddelelse----- > Fra: AccessD P? vegne af David > Emerson > Sendt: 17. december 2019 19:30 > Til: 'Access Developers discussion and problem solving' > > Emne: Re: [AccessD] [dba-SQLServer] DSN Tables - Could not find > installable ISAM > > Does anyone have experience with linking tables to Azure? > > > -- > 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 Dec 19 14:35:56 2019 From: newsgrps at dalyn.co.nz (David Emerson) Date: Fri, 20 Dec 2019 09:35:56 +1300 Subject: [AccessD] [dba-SQLServer] DSN Less Tables - Could not find installable ISAM Message-ID: <001d01d5b6ab$eb2522c0$c16f6840$@dalyn.co.nz> Hi Gustav, I have confirmed that my user ID is SUPPORT-Dalyn at Healthcarenz.co.nz. This is the reply from the IT guy: " Can you please confirm that my UID for Azure is SUPPORT-Dalyn at Healthcarenz.co.nz. It has been questioned that this looks like an email address." " Yes it is, I have changed the uon to reflect the. Co.nz vs local." He also confirmed that he installed the 64 bit version of the driver. I cut and pasted your code into my application. I used this call: Call AttachSqlServer("prism-uat.database.windows.net", "PRISM-UAT", "SUPPORT-Dalyn at Healthcarenz.co.nz", "MYPASSWORD") This gave a connection string of: ODBC;DRIVER=SQL Server Native Client 17.0;Description=Prism_UAT;APP=Microsoft? Access;SERVER= prism-uat.database.windows.net;DATABASE= PRISM-UAT;UID=SUPPORT-Dalyn at Healthcarenz.co.nz@prism-uat.database.windows.ne t;PWD=MYPASSWORD;Trusted_Connection=No; This gave error 3151 - ODCB--connection to 'SQL Server Native Client 17.0prism-uat.database.windows.net' failed. I also tried this call and got the same error message 3151: Call AttachSqlServer("prism-uat.database.windows.net", "PRISM-UAT", "SUPPORT-Dalyn", "MYPASSWORD") Changing the connection string to this had the same result: ODBC;DRIVER=SQL Server Native Client 17.0;Description=Prism_UAT;APP=Microsoft? Access;SERVER= prism-uat.database.windows.net;DATABASE= PRISM-UAT;UID=SUPPORT-Dalyn at Healthcarenz.co.nz;PWD=MYPASSWORD;Trusted_Connec tion=No; I know I can connect to the data base because the following connection string works: gADODBConnection.ConnectionString = "Driver={ODBC Driver 17 for SQL Server};Server=tcp:prism-uat.database.windows.net,1433;Database=Prism-UAT;Ui d=SUPPORT-Dalyn at Healthcarenz.co.nz;Pwd=MYPASSWORD;Encrypt=yes;TrustServerCer tificate=no;Connection Timeout=30;Authentication=ActiveDirectoryPassword" Any more thoughts? Regards David -----Original Message----- From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Gustav Brock via AccessD Sent: Thursday, 19 December 2019 8:16 p.m. To: 'Access Developers discussion and problem solving' Cc: Gustav Brock Subject: Re: [AccessD] [dba-SQLServer] DSN Tables - Could not find installable ISAM Hi David > "[ODBC Driver manager] data source name not found and no default driver specified" That error means that the Data Source Name (DSN) you are specifying in your connection configuration is not being found in the windows registry. But my connection method is DSN-less, so you are mixing the two methods. Also, your UID seems to be an email address; Azure SQL knows nothing about that. So, at least as a starting point, stick with the exact syntax from my example. As for the driver install, and as I recall it, it installs by default both 32-bit and 64-bit if Windows is 64-bit. But you can install the 32-bit only, thus - if you run a 64-bit application - that will fail. /gustav -----Oprindelig meddelelse----- Fra: David Emerson Sendt: 18. december 2019 22:49 Til: 'Access Developers discussion and problem solving' Cc: Gustav Brock Emne: RE: [AccessD] [dba-SQLServer] DSN Tables - Could not find installable ISAM Hi Gustav, I have had the Tech guy install SQL Server Native Client 17.0. When I use a connection testing program this connection string connects to the server: Driver={ODBC Driver 17 for SQL Server};Server=tcp:prism-uat.database.windows.net,1433;Database=Prism-UAT;Ui d=SUPPORT-Dalyn at Healthcarenz.co.nz;Pwd=MYPASSWORD;Encrypt=yes;TrustServerCer tificate=no;Connection Timeout=30;Authentication=ActiveDirectoryPassword But I am still getting the "Could not find installable ISAM" error when I use this in my table linking code. When I use this one from your example in the connection test program it doesn't connect: DRIVER=SQL Server Native Client 17.0;Description=PRISM;APP=Microsoft? Access;SERVER=tcp:prism-uat.database.windows.net,1433;DATABASE=Prism-UAT;Tru sted_Connection=No;UID=SUPPORT-Dalyn at Healthcarenz.co.nz;PWD=MYPASSWORD The error message is "[ODBC Driver manager] data source name not found and no default driver specified" I am using system.data.odbc as the provider. What am I doing wrong? Regards David -----Original Message----- From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Gustav Brock via AccessD Sent: Wednesday, 18 December 2019 8:02 p.m. To: Access Developers discussion and problem solving Cc: Gustav Brock Subject: Re: [AccessD] [dba-SQLServer] DSN Tables - Could not find installable ISAM Hi David Yes. Use the latest ODBC driver and a connection string like: DRIVER=SQL Server Native Client 17.0;Description=Your application name;APP=Microsoft? Access;SERVER=tcp:YourInstanceName.database.windows.net,1433;DATABASE=YourDb Name;Trusted_Connection=No;UID=Username at YourInstanceName;PWD=YourPassword; We have these two functions to control that and relink the tables and PT queries: ' Create ODBC connection string from its variable elements. ' ' 2018-10-02. Cactus Data ApS, CPH. ' Public Function ConnectionString( _ ByVal Hostname As String, _ ByVal Database As String, _ ByVal Username As String, _ ByVal Password As String) _ As String Const AzureDomain As String = ".windows.net" Const OdbcConnect As String = _ "ODBC;" & _ "DRIVER=SQL Server Native Client 11.0;" & _ "Description=Cactus TimeSag og Finans;" & _ "APP=Microsoft? Access;" & _ "SERVER={0};" & _ "DATABASE={1};" & _ "UID={2};" & _ "PWD={3};" & _ "Trusted_Connection={4};" ' Examples (Note, optional encryption): ' "ODBC;Driver=SQL Server;Server=tcp:b8uros8p4x.database.windows.net;Database=cactus;UID=cactus @ b8uros8p4x;Pwd=Password;Encrypt=yes" ' ' "ODBC;Driver=SQL Server Native Client 17.0;Server=(localdb)\MSSQLLocalDB;Database=Test;Trusted_Connection=Yes" Dim FullConnect As String If Right(Hostname, Len(AzureDomain)) = AzureDomain Then ' Azure SQL connection. ' Append servername to username. Username = Username & "@" & Split(Hostname)(0) End If FullConnect = OdbcConnect FullConnect = Replace(FullConnect, "{0}", Hostname) FullConnect = Replace(FullConnect, "{1}", Database) FullConnect = Replace(FullConnect, "{2}", Username) FullConnect = Replace(FullConnect, "{3}", Password) FullConnect = Replace(FullConnect, "{4}", IIf(Username & Password = "", "Yes", "No")) ConnectionString = FullConnect End Function ' Attach all tables linked via ODBC to SQL Server or Azure SQL. ' ' 2016-04-24. Cactus Data ApS, CPH. ' Public Function AttachSqlServer( _ ByVal Hostname As String, _ ByVal Database As String, _ ByVal Username As String, _ ByVal Password As String) _ As Boolean Const cstrDbType As String = "ODBC" Const cstrAcPrefix As String = "dbo_" Dim dbs As DAO.Database Dim tdf As DAO.TableDef Dim qdf As DAO.QueryDef Dim strConnect As String Dim strName As String On Error GoTo Err_AttachSqlServer Set dbs = CurrentDb strConnect = ConnectionString(Hostname, Database, Username, Password) For Each tdf In dbs.TableDefs strName = tdf.Name If Asc(strName) <> Asc("~") Then If InStr(tdf.Connect, cstrDbType) = 1 Then If Left(strName, Len(cstrAcPrefix)) = cstrAcPrefix Then tdf.Name = Mid(strName, Len(cstrAcPrefix) + 1) End If tdf.Connect = strConnect tdf.RefreshLink Debug.Print Timer, tdf.Name, tdf.SourceTableName, tdf.Connect DoEvents End If End If Next For Each qdf In dbs.QueryDefs If qdf.Connect <> "" Then Debug.Print Timer, qdf.Name, qdf.Type, qdf.Connect qdf.Connect = strConnect End If Next Debug.Print "Done!" AttachSqlServer = True Exit_AttachSqlServer: Set tdf = Nothing Set dbs = Nothing Exit Function Err_AttachSqlServer: Call ErrorMox Resume Exit_AttachSqlServer End Function /gustav -----Oprindelig meddelelse----- Fra: AccessD P? vegne af David Emerson Sendt: 17. december 2019 19:30 Til: 'Access Developers discussion and problem solving' Emne: Re: [AccessD] [dba-SQLServer] DSN Tables - Could not find installable ISAM Does anyone have experience with linking tables to Azure? -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From gustav at cactus.dk Fri Dec 20 00:49:04 2019 From: gustav at cactus.dk (Gustav Brock) Date: Fri, 20 Dec 2019 06:49:04 +0000 Subject: [AccessD] [dba-SQLServer] DSN Less Tables - Could not find installable ISAM Message-ID: Hi David As the syntax is: UID=Username at YourInstanceName I believe you should use: UID=SUPPORT-Dalyn at Healthcarenz.co.nz@prism-uat If that will work - with the doubled ampersands - I don't know. /gustav -----Oprindelig meddelelse----- Fra: David Emerson Sendt: 19. december 2019 21:36 Til: 'Access Developers discussion and problem solving' Cc: Gustav Brock Emne: RE: [AccessD] [dba-SQLServer] DSN Less Tables - Could not find installable ISAM Hi Gustav, I have confirmed that my user ID is SUPPORT-Dalyn at Healthcarenz.co.nz. This is the reply from the IT guy: " Can you please confirm that my UID for Azure is SUPPORT-Dalyn at Healthcarenz.co.nz. It has been questioned that this looks like an email address." " Yes it is, I have changed the uon to reflect the. Co.nz vs local." He also confirmed that he installed the 64 bit version of the driver. I cut and pasted your code into my application. I used this call: Call AttachSqlServer("prism-uat.database.windows.net", "PRISM-UAT", "SUPPORT-Dalyn at Healthcarenz.co.nz", "MYPASSWORD") This gave a connection string of: ODBC;DRIVER=SQL Server Native Client 17.0;Description=Prism_UAT;APP=Microsoft? Access;SERVER= prism-uat.database.windows.net;DATABASE= PRISM-UAT;UID=SUPPORT-Dalyn at Healthcarenz.co.nz@prism-uat.database.windows.ne t;PWD=MYPASSWORD;Trusted_Connection=No; This gave error 3151 - ODCB--connection to 'SQL Server Native Client 17.0prism-uat.database.windows.net' failed. I also tried this call and got the same error message 3151: Call AttachSqlServer("prism-uat.database.windows.net", "PRISM-UAT", "SUPPORT-Dalyn", "MYPASSWORD") Changing the connection string to this had the same result: ODBC;DRIVER=SQL Server Native Client 17.0;Description=Prism_UAT;APP=Microsoft? Access;SERVER= prism-uat.database.windows.net;DATABASE= PRISM-UAT;UID=SUPPORT-Dalyn at Healthcarenz.co.nz;PWD=MYPASSWORD;Trusted_Connec tion=No; I know I can connect to the data base because the following connection string works: gADODBConnection.ConnectionString = "Driver={ODBC Driver 17 for SQL Server};Server=tcp:prism-uat.database.windows.net,1433;Database=Prism-UAT;Ui d=SUPPORT-Dalyn at Healthcarenz.co.nz;Pwd=MYPASSWORD;Encrypt=yes;TrustServerCer tificate=no;Connection Timeout=30;Authentication=ActiveDirectoryPassword" Any more thoughts? Regards David -----Original Message----- From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Gustav Brock via AccessD Sent: Thursday, 19 December 2019 8:16 p.m. To: 'Access Developers discussion and problem solving' Cc: Gustav Brock Subject: Re: [AccessD] [dba-SQLServer] DSN Tables - Could not find installable ISAM Hi David > "[ODBC Driver manager] data source name not found and no default > driver specified" That error means that the Data Source Name (DSN) you are specifying in your connection configuration is not being found in the windows registry. But my connection method is DSN-less, so you are mixing the two methods. Also, your UID seems to be an email address; Azure SQL knows nothing about that. So, at least as a starting point, stick with the exact syntax from my example. As for the driver install, and as I recall it, it installs by default both 32-bit and 64-bit if Windows is 64-bit. But you can install the 32-bit only, thus - if you run a 64-bit application - that will fail. /gustav -----Oprindelig meddelelse----- Fra: David Emerson Sendt: 18. december 2019 22:49 Til: 'Access Developers discussion and problem solving' Cc: Gustav Brock Emne: RE: [AccessD] [dba-SQLServer] DSN Tables - Could not find installable ISAM Hi Gustav, I have had the Tech guy install SQL Server Native Client 17.0. When I use a connection testing program this connection string connects to the server: Driver={ODBC Driver 17 for SQL Server};Server=tcp:prism-uat.database.windows.net,1433;Database=Prism-UAT;Ui d=SUPPORT-Dalyn at Healthcarenz.co.nz;Pwd=MYPASSWORD;Encrypt=yes;TrustServerCer tificate=no;Connection Timeout=30;Authentication=ActiveDirectoryPassword But I am still getting the "Could not find installable ISAM" error when I use this in my table linking code. When I use this one from your example in the connection test program it doesn't connect: DRIVER=SQL Server Native Client 17.0;Description=PRISM;APP=Microsoft? Access;SERVER=tcp:prism-uat.database.windows.net,1433;DATABASE=Prism-UAT;Tru sted_Connection=No;UID=SUPPORT-Dalyn at Healthcarenz.co.nz;PWD=MYPASSWORD The error message is "[ODBC Driver manager] data source name not found and no default driver specified" I am using system.data.odbc as the provider. What am I doing wrong? Regards David -----Original Message----- From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Gustav Brock via AccessD Sent: Wednesday, 18 December 2019 8:02 p.m. To: Access Developers discussion and problem solving Cc: Gustav Brock Subject: Re: [AccessD] [dba-SQLServer] DSN Tables - Could not find installable ISAM Hi David Yes. Use the latest ODBC driver and a connection string like: DRIVER=SQL Server Native Client 17.0;Description=Your application name;APP=Microsoft? Access;SERVER=tcp:YourInstanceName.database.windows.net,1433;DATABASE=YourDb Name;Trusted_Connection=No;UID=Username at YourInstanceName;PWD=YourPassword; We have these two functions to control that and relink the tables and PT queries: ' Create ODBC connection string from its variable elements. ' ' 2018-10-02. Cactus Data ApS, CPH. ' Public Function ConnectionString( _ ByVal Hostname As String, _ ByVal Database As String, _ ByVal Username As String, _ ByVal Password As String) _ As String Const AzureDomain As String = ".windows.net" Const OdbcConnect As String = _ "ODBC;" & _ "DRIVER=SQL Server Native Client 11.0;" & _ "Description=Cactus TimeSag og Finans;" & _ "APP=Microsoft? Access;" & _ "SERVER={0};" & _ "DATABASE={1};" & _ "UID={2};" & _ "PWD={3};" & _ "Trusted_Connection={4};" ' Examples (Note, optional encryption): ' "ODBC;Driver=SQL Server;Server=tcp:b8uros8p4x.database.windows.net;Database=cactus;UID=cactus @ b8uros8p4x;Pwd=Password;Encrypt=yes" ' ' "ODBC;Driver=SQL Server Native Client 17.0;Server=(localdb)\MSSQLLocalDB;Database=Test;Trusted_Connection=Yes" Dim FullConnect As String If Right(Hostname, Len(AzureDomain)) = AzureDomain Then ' Azure SQL connection. ' Append servername to username. Username = Username & "@" & Split(Hostname)(0) End If FullConnect = OdbcConnect FullConnect = Replace(FullConnect, "{0}", Hostname) FullConnect = Replace(FullConnect, "{1}", Database) FullConnect = Replace(FullConnect, "{2}", Username) FullConnect = Replace(FullConnect, "{3}", Password) FullConnect = Replace(FullConnect, "{4}", IIf(Username & Password = "", "Yes", "No")) ConnectionString = FullConnect End Function ' Attach all tables linked via ODBC to SQL Server or Azure SQL. ' ' 2016-04-24. Cactus Data ApS, CPH. ' Public Function AttachSqlServer( _ ByVal Hostname As String, _ ByVal Database As String, _ ByVal Username As String, _ ByVal Password As String) _ As Boolean Const cstrDbType As String = "ODBC" Const cstrAcPrefix As String = "dbo_" Dim dbs As DAO.Database Dim tdf As DAO.TableDef Dim qdf As DAO.QueryDef Dim strConnect As String Dim strName As String On Error GoTo Err_AttachSqlServer Set dbs = CurrentDb strConnect = ConnectionString(Hostname, Database, Username, Password) For Each tdf In dbs.TableDefs strName = tdf.Name If Asc(strName) <> Asc("~") Then If InStr(tdf.Connect, cstrDbType) = 1 Then If Left(strName, Len(cstrAcPrefix)) = cstrAcPrefix Then tdf.Name = Mid(strName, Len(cstrAcPrefix) + 1) End If tdf.Connect = strConnect tdf.RefreshLink Debug.Print Timer, tdf.Name, tdf.SourceTableName, tdf.Connect DoEvents End If End If Next For Each qdf In dbs.QueryDefs If qdf.Connect <> "" Then Debug.Print Timer, qdf.Name, qdf.Type, qdf.Connect qdf.Connect = strConnect End If Next Debug.Print "Done!" AttachSqlServer = True Exit_AttachSqlServer: Set tdf = Nothing Set dbs = Nothing Exit Function Err_AttachSqlServer: Call ErrorMox Resume Exit_AttachSqlServer End Function /gustav -----Oprindelig meddelelse----- Fra: AccessD P? vegne af David Emerson Sendt: 17. december 2019 19:30 Til: 'Access Developers discussion and problem solving' Emne: Re: [AccessD] [dba-SQLServer] DSN Tables - Could not find installable ISAM Does anyone have experience with linking tables to Azure? From gustav at cactus.dk Fri Dec 20 02:22:08 2019 From: gustav at cactus.dk (Gustav Brock) Date: Fri, 20 Dec 2019 08:22:08 +0000 Subject: [AccessD] [dba-SQLServer] DSN Tables - Could not find installable ISAM Message-ID: Hi David Version 1912 is the Insiders Release (sometimes called Monthly-Targeted), so only people getting pre-release builds would see this. Version 1911 is still the Monthly Channel build. It doesn?t have this issue. The issue has been fixed, and an update is available (now), just do the File/UpdateOptions/UpdateNow, and you should get build 16.0.12325.20214 which has the fix. Over the next week or so, it will automatically update if you don?t force it, but it is available to everyone now. If you don't want such happenings and surprises, don't run the Insiders Release. As the name implies, it is intended for developers and first-movers who are prepared for this and that. Don't run it at normal users. /gustav -----Oprindelig meddelelse----- Fra: AccessD P? vegne af David McAfee Sendt: 19. december 2019 19:25 Til: Access Developers discussion and problem solving Emne: Re: [AccessD] [dba-SQLServer] DSN Tables - Could not find installable ISAM Probably not related, but Microsoft put out another bad update this week that broke existing apps on our end (2nd bad update in 3 weeks!) All of the sudden we were experiencing ODBC call failed and/or invalid cursor state errors. I reverted our O365 boxes with version 1912 (build 12325-20172) to 1911 (build 12228.20364) and the odbc errors went away. Once again, might not be your issue, but I'd hate to be troubleshooting an odbc issue, going nuts, only to find out it was due to a bad ms update! Grrrr!!! From mar.ko at verizon.net Fri Dec 20 10:37:13 2019 From: mar.ko at verizon.net (Mark Simms) Date: Fri, 20 Dec 2019 16:37:13 +0000 (UTC) Subject: [AccessD] [dba-SQLServer] DSN Tables - Could not find installable ISAM In-Reply-To: References: Message-ID: <1920156.2223543.1576859833561@mail.yahoo.com> Based on recent experience with updates, for critical applications that are based on Office 365 (Excel, Access, etc) I have recommended that Automatic Updates be turned off. There are other opinions who say this strategy will keep critical security updates from getting installed. Mark Simms marksimms at verizon.net -----Original Message----- From: Gustav Brock via AccessD To: Access Developers discussion and problem solving Cc: Gustav Brock Sent: Fri, Dec 20, 2019 3:23 am Subject: Re: [AccessD] [dba-SQLServer] DSN Tables - Could not find installable ISAM Hi David Version 1912 is the Insiders Release (sometimes called Monthly-Targeted), so only people getting pre-release builds would see this. Version 1911 is still the Monthly Channel build. It doesn?t have this issue. The issue has been fixed, and an update is available (now), just do the File/UpdateOptions/UpdateNow, and you should get build 16.0.12325.20214 which has the fix. Over the next week or so, it will automatically update if you don?t force it, but it is available to everyone now. If you don't want such happenings and surprises, don't run the Insiders Release. As the name implies, it is intended for developers and first-movers who are prepared for this and that. Don't run it at normal users. /gustav -----Oprindelig meddelelse----- Fra: AccessD P? vegne af David McAfee Sendt: 19. december 2019 19:25 Til: Access Developers discussion and problem solving Emne: Re: [AccessD] [dba-SQLServer] DSN Tables - Could not find installable ISAM Probably not related, but Microsoft put out another bad update this week that broke existing apps on our end (2nd bad update in 3 weeks!) All of the sudden we were experiencing ODBC call failed and/or invalid cursor state errors. I reverted our O365? boxes with version 1912 (build 12325-20172) to 1911 (build 12228.20364) and the odbc errors went away. Once again, might not be your issue, but I'd hate to be troubleshooting an odbc issue, going nuts, only to find out it was due to a bad ms update! Grrrr!!! -- 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 Dec 20 18:58:21 2019 From: newsgrps at dalyn.co.nz (David Emerson) Date: Sat, 21 Dec 2019 13:58:21 +1300 Subject: [AccessD] [dba-SQLServer] DSN Less Tables - Could not find installable ISAM In-Reply-To: References: Message-ID: <000601d5b799$be0d4e40$3a27eac0$@dalyn.co.nz> Hi Gustav, That didn't work either. The company say they can use Microsoft Premium Support so I will give that a go and let everyone know how we get on. Thanks for your time. David -----Original Message----- From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Gustav Brock via AccessD Sent: Friday, 20 December 2019 7:49 p.m. To: 'Access Developers discussion and problem solving' Cc: Gustav Brock Subject: Re: [AccessD] [dba-SQLServer] DSN Less Tables - Could not find installable ISAM Hi David As the syntax is: UID=Username at YourInstanceName I believe you should use: UID=SUPPORT-Dalyn at Healthcarenz.co.nz@prism-uat If that will work - with the doubled ampersands - I don't know. /gustav -----Oprindelig meddelelse----- Fra: David Emerson Sendt: 19. december 2019 21:36 Til: 'Access Developers discussion and problem solving' Cc: Gustav Brock Emne: RE: [AccessD] [dba-SQLServer] DSN Less Tables - Could not find installable ISAM Hi Gustav, I have confirmed that my user ID is SUPPORT-Dalyn at Healthcarenz.co.nz. This is the reply from the IT guy: " Can you please confirm that my UID for Azure is SUPPORT-Dalyn at Healthcarenz.co.nz. It has been questioned that this looks like an email address." " Yes it is, I have changed the uon to reflect the. Co.nz vs local." He also confirmed that he installed the 64 bit version of the driver. I cut and pasted your code into my application. I used this call: Call AttachSqlServer("prism-uat.database.windows.net", "PRISM-UAT", "SUPPORT-Dalyn at Healthcarenz.co.nz", "MYPASSWORD") This gave a connection string of: ODBC;DRIVER=SQL Server Native Client 17.0;Description=Prism_UAT;APP=Microsoft? Access;SERVER= prism-uat.database.windows.net;DATABASE= PRISM-UAT;UID=SUPPORT-Dalyn at Healthcarenz.co.nz@prism-uat.database.windows.ne t;PWD=MYPASSWORD;Trusted_Connection=No; This gave error 3151 - ODCB--connection to 'SQL Server Native Client 17.0prism-uat.database.windows.net' failed. I also tried this call and got the same error message 3151: Call AttachSqlServer("prism-uat.database.windows.net", "PRISM-UAT", "SUPPORT-Dalyn", "MYPASSWORD") Changing the connection string to this had the same result: ODBC;DRIVER=SQL Server Native Client 17.0;Description=Prism_UAT;APP=Microsoft? Access;SERVER= prism-uat.database.windows.net;DATABASE= PRISM-UAT;UID=SUPPORT-Dalyn at Healthcarenz.co.nz;PWD=MYPASSWORD;Trusted_Connec tion=No; I know I can connect to the data base because the following connection string works: gADODBConnection.ConnectionString = "Driver={ODBC Driver 17 for SQL Server};Server=tcp:prism-uat.database.windows.net,1433;Database=Prism-UAT;Ui d=SUPPORT-Dalyn at Healthcarenz.co.nz;Pwd=MYPASSWORD;Encrypt=yes;TrustServerCer tificate=no;Connection Timeout=30;Authentication=ActiveDirectoryPassword" Any more thoughts? Regards David -----Original Message----- From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Gustav Brock via AccessD Sent: Thursday, 19 December 2019 8:16 p.m. To: 'Access Developers discussion and problem solving' Cc: Gustav Brock Subject: Re: [AccessD] [dba-SQLServer] DSN Tables - Could not find installable ISAM Hi David > "[ODBC Driver manager] data source name not found and no default > driver specified" That error means that the Data Source Name (DSN) you are specifying in your connection configuration is not being found in the windows registry. But my connection method is DSN-less, so you are mixing the two methods. Also, your UID seems to be an email address; Azure SQL knows nothing about that. So, at least as a starting point, stick with the exact syntax from my example. As for the driver install, and as I recall it, it installs by default both 32-bit and 64-bit if Windows is 64-bit. But you can install the 32-bit only, thus - if you run a 64-bit application - that will fail. /gustav -----Oprindelig meddelelse----- Fra: David Emerson Sendt: 18. december 2019 22:49 Til: 'Access Developers discussion and problem solving' Cc: Gustav Brock Emne: RE: [AccessD] [dba-SQLServer] DSN Tables - Could not find installable ISAM Hi Gustav, I have had the Tech guy install SQL Server Native Client 17.0. When I use a connection testing program this connection string connects to the server: Driver={ODBC Driver 17 for SQL Server};Server=tcp:prism-uat.database.windows.net,1433;Database=Prism-UAT;Ui d=SUPPORT-Dalyn at Healthcarenz.co.nz;Pwd=MYPASSWORD;Encrypt=yes;TrustServerCer tificate=no;Connection Timeout=30;Authentication=ActiveDirectoryPassword But I am still getting the "Could not find installable ISAM" error when I use this in my table linking code. When I use this one from your example in the connection test program it doesn't connect: DRIVER=SQL Server Native Client 17.0;Description=PRISM;APP=Microsoft? Access;SERVER=tcp:prism-uat.database.windows.net,1433;DATABASE=Prism-UAT;Tru sted_Connection=No;UID=SUPPORT-Dalyn at Healthcarenz.co.nz;PWD=MYPASSWORD The error message is "[ODBC Driver manager] data source name not found and no default driver specified" I am using system.data.odbc as the provider. What am I doing wrong? Regards David -----Original Message----- From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Gustav Brock via AccessD Sent: Wednesday, 18 December 2019 8:02 p.m. To: Access Developers discussion and problem solving Cc: Gustav Brock Subject: Re: [AccessD] [dba-SQLServer] DSN Tables - Could not find installable ISAM Hi David Yes. Use the latest ODBC driver and a connection string like: DRIVER=SQL Server Native Client 17.0;Description=Your application name;APP=Microsoft? Access;SERVER=tcp:YourInstanceName.database.windows.net,1433;DATABASE=YourDb Name;Trusted_Connection=No;UID=Username at YourInstanceName;PWD=YourPassword; We have these two functions to control that and relink the tables and PT queries: ' Create ODBC connection string from its variable elements. ' ' 2018-10-02. Cactus Data ApS, CPH. ' Public Function ConnectionString( _ ByVal Hostname As String, _ ByVal Database As String, _ ByVal Username As String, _ ByVal Password As String) _ As String Const AzureDomain As String = ".windows.net" Const OdbcConnect As String = _ "ODBC;" & _ "DRIVER=SQL Server Native Client 11.0;" & _ "Description=Cactus TimeSag og Finans;" & _ "APP=Microsoft? Access;" & _ "SERVER={0};" & _ "DATABASE={1};" & _ "UID={2};" & _ "PWD={3};" & _ "Trusted_Connection={4};" ' Examples (Note, optional encryption): ' "ODBC;Driver=SQL Server;Server=tcp:b8uros8p4x.database.windows.net;Database=cactus;UID=cactus @ b8uros8p4x;Pwd=Password;Encrypt=yes" ' ' "ODBC;Driver=SQL Server Native Client 17.0;Server=(localdb)\MSSQLLocalDB;Database=Test;Trusted_Connection=Yes" Dim FullConnect As String If Right(Hostname, Len(AzureDomain)) = AzureDomain Then ' Azure SQL connection. ' Append servername to username. Username = Username & "@" & Split(Hostname)(0) End If FullConnect = OdbcConnect FullConnect = Replace(FullConnect, "{0}", Hostname) FullConnect = Replace(FullConnect, "{1}", Database) FullConnect = Replace(FullConnect, "{2}", Username) FullConnect = Replace(FullConnect, "{3}", Password) FullConnect = Replace(FullConnect, "{4}", IIf(Username & Password = "", "Yes", "No")) ConnectionString = FullConnect End Function ' Attach all tables linked via ODBC to SQL Server or Azure SQL. ' ' 2016-04-24. Cactus Data ApS, CPH. ' Public Function AttachSqlServer( _ ByVal Hostname As String, _ ByVal Database As String, _ ByVal Username As String, _ ByVal Password As String) _ As Boolean Const cstrDbType As String = "ODBC" Const cstrAcPrefix As String = "dbo_" Dim dbs As DAO.Database Dim tdf As DAO.TableDef Dim qdf As DAO.QueryDef Dim strConnect As String Dim strName As String On Error GoTo Err_AttachSqlServer Set dbs = CurrentDb strConnect = ConnectionString(Hostname, Database, Username, Password) For Each tdf In dbs.TableDefs strName = tdf.Name If Asc(strName) <> Asc("~") Then If InStr(tdf.Connect, cstrDbType) = 1 Then If Left(strName, Len(cstrAcPrefix)) = cstrAcPrefix Then tdf.Name = Mid(strName, Len(cstrAcPrefix) + 1) End If tdf.Connect = strConnect tdf.RefreshLink Debug.Print Timer, tdf.Name, tdf.SourceTableName, tdf.Connect DoEvents End If End If Next For Each qdf In dbs.QueryDefs If qdf.Connect <> "" Then Debug.Print Timer, qdf.Name, qdf.Type, qdf.Connect qdf.Connect = strConnect End If Next Debug.Print "Done!" AttachSqlServer = True Exit_AttachSqlServer: Set tdf = Nothing Set dbs = Nothing Exit Function Err_AttachSqlServer: Call ErrorMox Resume Exit_AttachSqlServer End Function /gustav -----Oprindelig meddelelse----- Fra: AccessD P? vegne af David Emerson Sendt: 17. december 2019 19:30 Til: 'Access Developers discussion and problem solving' Emne: Re: [AccessD] [dba-SQLServer] DSN Tables - Could not find installable ISAM Does anyone have experience with linking tables to Azure? -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From gustav at cactus.dk Sat Dec 21 01:29:43 2019 From: gustav at cactus.dk (Gustav Brock) Date: Sat, 21 Dec 2019 07:29:43 +0000 Subject: [AccessD] [dba-SQLServer] DSN Less Tables - Could not find installable ISAM In-Reply-To: References: , <000601d5b799$be0d4e40$3a27eac0$@dalyn.co.nz>, Message-ID: Hi David OK. You could give it a last attempt with: UID=SUPPORT-Dalyn at prism-uat Also, the Server key must include the tcp: SERVER=tcp:prism-uat.database.windows.net,1433 /gustav ________________________________ Fra: David Emerson Sendt: 21. december 2019 01:58 Til: 'Access Developers discussion and problem solving' Cc: Gustav Brock Emne: RE: [AccessD] [dba-SQLServer] DSN Less Tables - Could not find installable ISAM Hi Gustav, That didn't work either. The company say they can use Microsoft Premium Support so I will give that a go and let everyone know how we get on. Thanks for your time. David -----Original Message----- From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Gustav Brock via AccessD Sent: Friday, 20 December 2019 7:49 p.m. To: 'Access Developers discussion and problem solving' Cc: Gustav Brock Subject: Re: [AccessD] [dba-SQLServer] DSN Less Tables - Could not find installable ISAM Hi David As the syntax is: UID=Username at YourInstanceName I believe you should use: UID=SUPPORT-Dalyn at Healthcarenz.co.nz@prism-uat If that will work - with the doubled ampersands - I don't know. /gustav -----Oprindelig meddelelse----- Fra: David Emerson Sendt: 19. december 2019 21:36 Til: 'Access Developers discussion and problem solving' Cc: Gustav Brock Emne: RE: [AccessD] [dba-SQLServer] DSN Less Tables - Could not find installable ISAM Hi Gustav, I have confirmed that my user ID is SUPPORT-Dalyn at Healthcarenz.co.nz. This is the reply from the IT guy: " Can you please confirm that my UID for Azure is SUPPORT-Dalyn at Healthcarenz.co.nz. It has been questioned that this looks like an email address." " Yes it is, I have changed the uon to reflect the. Co.nz vs local." He also confirmed that he installed the 64 bit version of the driver. I cut and pasted your code into my application. I used this call: Call AttachSqlServer("prism-uat.database.windows.net", "PRISM-UAT", "SUPPORT-Dalyn at Healthcarenz.co.nz", "MYPASSWORD") This gave a connection string of: ODBC;DRIVER=SQL Server Native Client 17.0;Description=Prism_UAT;APP=Microsoft? Access;SERVER= prism-uat.database.windows.net;DATABASE= PRISM-UAT;UID=SUPPORT-Dalyn at Healthcarenz.co.nz@prism-uat.database.windows.ne t;PWD=MYPASSWORD;Trusted_Connection=No; This gave error 3151 - ODCB--connection to 'SQL Server Native Client 17.0prism-uat.database.windows.net' failed. I also tried this call and got the same error message 3151: Call AttachSqlServer("prism-uat.database.windows.net", "PRISM-UAT", "SUPPORT-Dalyn", "MYPASSWORD") Changing the connection string to this had the same result: ODBC;DRIVER=SQL Server Native Client 17.0;Description=Prism_UAT;APP=Microsoft? Access;SERVER= prism-uat.database.windows.net;DATABASE= PRISM-UAT;UID=SUPPORT-Dalyn at Healthcarenz.co.nz;PWD=MYPASSWORD;Trusted_Connec tion=No; I know I can connect to the data base because the following connection string works: gADODBConnection.ConnectionString = "Driver={ODBC Driver 17 for SQL Server};Server=tcp:prism-uat.database.windows.net,1433;Database=Prism-UAT;Ui d=SUPPORT-Dalyn at Healthcarenz.co.nz;Pwd=MYPASSWORD;Encrypt=yes;TrustServerCer tificate=no;Connection Timeout=30;Authentication=ActiveDirectoryPassword" Any more thoughts? Regards David -----Original Message----- From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Gustav Brock via AccessD Sent: Thursday, 19 December 2019 8:16 p.m. To: 'Access Developers discussion and problem solving' Cc: Gustav Brock Subject: Re: [AccessD] [dba-SQLServer] DSN Tables - Could not find installable ISAM Hi David > "[ODBC Driver manager] data source name not found and no default > driver specified" That error means that the Data Source Name (DSN) you are specifying in your connection configuration is not being found in the windows registry. But my connection method is DSN-less, so you are mixing the two methods. Also, your UID seems to be an email address; Azure SQL knows nothing about that. So, at least as a starting point, stick with the exact syntax from my example. As for the driver install, and as I recall it, it installs by default both 32-bit and 64-bit if Windows is 64-bit. But you can install the 32-bit only, thus - if you run a 64-bit application - that will fail. /gustav -----Oprindelig meddelelse----- Fra: David Emerson Sendt: 18. december 2019 22:49 Til: 'Access Developers discussion and problem solving' Cc: Gustav Brock Emne: RE: [AccessD] [dba-SQLServer] DSN Tables - Could not find installable ISAM Hi Gustav, I have had the Tech guy install SQL Server Native Client 17.0. When I use a connection testing program this connection string connects to the server: Driver={ODBC Driver 17 for SQL Server};Server=tcp:prism-uat.database.windows.net,1433;Database=Prism-UAT;Ui d=SUPPORT-Dalyn at Healthcarenz.co.nz;Pwd=MYPASSWORD;Encrypt=yes;TrustServerCer tificate=no;Connection Timeout=30;Authentication=ActiveDirectoryPassword But I am still getting the "Could not find installable ISAM" error when I use this in my table linking code. When I use this one from your example in the connection test program it doesn't connect: DRIVER=SQL Server Native Client 17.0;Description=PRISM;APP=Microsoft? Access;SERVER=tcp:prism-uat.database.windows.net,1433;DATABASE=Prism-UAT;Tru sted_Connection=No;UID=SUPPORT-Dalyn at Healthcarenz.co.nz;PWD=MYPASSWORD The error message is "[ODBC Driver manager] data source name not found and no default driver specified" I am using system.data.odbc as the provider. What am I doing wrong? Regards David -----Original Message----- From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Gustav Brock via AccessD Sent: Wednesday, 18 December 2019 8:02 p.m. To: Access Developers discussion and problem solving Cc: Gustav Brock Subject: Re: [AccessD] [dba-SQLServer] DSN Tables - Could not find installable ISAM Hi David Yes. Use the latest ODBC driver and a connection string like: DRIVER=SQL Server Native Client 17.0;Description=Your application name;APP=Microsoft? Access;SERVER=tcp:YourInstanceName.database.windows.net,1433;DATABASE=YourDb Name;Trusted_Connection=No;UID=Username at YourInstanceName;PWD=YourPassword; From newsgrps at dalyn.co.nz Sat Dec 21 23:06:21 2019 From: newsgrps at dalyn.co.nz (David Emerson) Date: Sun, 22 Dec 2019 18:06:21 +1300 Subject: [AccessD] [dba-SQLServer] DSN Less Tables - Could not find installable ISAM In-Reply-To: References: , <000601d5b799$be0d4e40$3a27eac0$@dalyn.co.nz>, Message-ID: <002b01d5b885$8d36d600$a7a48200$@dalyn.co.nz> Tried both still with no luck. Hopefully the Company support can have better luck solving it on the actual machine. -----Original Message----- From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Gustav Brock via AccessD Sent: Saturday, 21 December 2019 8:30 p.m. To: Access Developers discussion and problem solving Cc: Gustav Brock Subject: Re: [AccessD] [dba-SQLServer] DSN Less Tables - Could not find installable ISAM Hi David OK. You could give it a last attempt with: UID=SUPPORT-Dalyn at prism-uat Also, the Server key must include the tcp: SERVER=tcp:prism-uat.database.windows.net,1433 /gustav ________________________________ Fra: David Emerson Sendt: 21. december 2019 01:58 Til: 'Access Developers discussion and problem solving' Cc: Gustav Brock Emne: RE: [AccessD] [dba-SQLServer] DSN Less Tables - Could not find installable ISAM Hi Gustav, That didn't work either. The company say they can use Microsoft Premium Support so I will give that a go and let everyone know how we get on. Thanks for your time. David -----Original Message----- From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Gustav Brock via AccessD Sent: Friday, 20 December 2019 7:49 p.m. To: 'Access Developers discussion and problem solving' Cc: Gustav Brock Subject: Re: [AccessD] [dba-SQLServer] DSN Less Tables - Could not find installable ISAM Hi David As the syntax is: UID=Username at YourInstanceName I believe you should use: UID=SUPPORT-Dalyn at Healthcarenz.co.nz@prism-uat If that will work - with the doubled ampersands - I don't know. /gustav -----Oprindelig meddelelse----- Fra: David Emerson Sendt: 19. december 2019 21:36 Til: 'Access Developers discussion and problem solving' Cc: Gustav Brock Emne: RE: [AccessD] [dba-SQLServer] DSN Less Tables - Could not find installable ISAM Hi Gustav, I have confirmed that my user ID is SUPPORT-Dalyn at Healthcarenz.co.nz. This is the reply from the IT guy: " Can you please confirm that my UID for Azure is SUPPORT-Dalyn at Healthcarenz.co.nz. It has been questioned that this looks like an email address." " Yes it is, I have changed the uon to reflect the. Co.nz vs local." He also confirmed that he installed the 64 bit version of the driver. I cut and pasted your code into my application. I used this call: Call AttachSqlServer("prism-uat.database.windows.net", "PRISM-UAT", "SUPPORT-Dalyn at Healthcarenz.co.nz", "MYPASSWORD") This gave a connection string of: ODBC;DRIVER=SQL Server Native Client 17.0;Description=Prism_UAT;APP=MicrosoftR Access;SERVER= prism-uat.database.windows.net;DATABASE= PRISM-UAT;UID=SUPPORT-Dalyn at Healthcarenz.co.nz@prism-uat.database.windows.ne t;PWD=MYPASSWORD;Trusted_Connection=No; This gave error 3151 - ODCB--connection to 'SQL Server Native Client 17.0prism-uat.database.windows.net' failed. I also tried this call and got the same error message 3151: Call AttachSqlServer("prism-uat.database.windows.net", "PRISM-UAT", "SUPPORT-Dalyn", "MYPASSWORD") Changing the connection string to this had the same result: ODBC;DRIVER=SQL Server Native Client 17.0;Description=Prism_UAT;APP=MicrosoftR Access;SERVER= prism-uat.database.windows.net;DATABASE= PRISM-UAT;UID=SUPPORT-Dalyn at Healthcarenz.co.nz;PWD=MYPASSWORD;Trusted_Connec tion=No; I know I can connect to the data base because the following connection string works: gADODBConnection.ConnectionString = "Driver={ODBC Driver 17 for SQL Server};Server=tcp:prism-uat.database.windows.net,1433;Database=Prism-UAT;Ui d=SUPPORT-Dalyn at Healthcarenz.co.nz;Pwd=MYPASSWORD;Encrypt=yes;TrustServerCer tificate=no;Connection Timeout=30;Authentication=ActiveDirectoryPassword" Any more thoughts? Regards David -----Original Message----- From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Gustav Brock via AccessD Sent: Thursday, 19 December 2019 8:16 p.m. To: 'Access Developers discussion and problem solving' Cc: Gustav Brock Subject: Re: [AccessD] [dba-SQLServer] DSN Tables - Could not find installable ISAM Hi David > "[ODBC Driver manager] data source name not found and no default > driver specified" That error means that the Data Source Name (DSN) you are specifying in your connection configuration is not being found in the windows registry. But my connection method is DSN-less, so you are mixing the two methods. Also, your UID seems to be an email address; Azure SQL knows nothing about that. So, at least as a starting point, stick with the exact syntax from my example. As for the driver install, and as I recall it, it installs by default both 32-bit and 64-bit if Windows is 64-bit. But you can install the 32-bit only, thus - if you run a 64-bit application - that will fail. /gustav -----Oprindelig meddelelse----- Fra: David Emerson Sendt: 18. december 2019 22:49 Til: 'Access Developers discussion and problem solving' Cc: Gustav Brock Emne: RE: [AccessD] [dba-SQLServer] DSN Tables - Could not find installable ISAM Hi Gustav, I have had the Tech guy install SQL Server Native Client 17.0. When I use a connection testing program this connection string connects to the server: Driver={ODBC Driver 17 for SQL Server};Server=tcp:prism-uat.database.windows.net,1433;Database=Prism-UAT;Ui d=SUPPORT-Dalyn at Healthcarenz.co.nz;Pwd=MYPASSWORD;Encrypt=yes;TrustServerCer tificate=no;Connection Timeout=30;Authentication=ActiveDirectoryPassword But I am still getting the "Could not find installable ISAM" error when I use this in my table linking code. When I use this one from your example in the connection test program it doesn't connect: DRIVER=SQL Server Native Client 17.0;Description=PRISM;APP=MicrosoftR Access;SERVER=tcp:prism-uat.database.windows.net,1433;DATABASE=Prism-UAT;Tru sted_Connection=No;UID=SUPPORT-Dalyn at Healthcarenz.co.nz;PWD=MYPASSWORD The error message is "[ODBC Driver manager] data source name not found and no default driver specified" I am using system.data.odbc as the provider. What am I doing wrong? Regards David -----Original Message----- From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Gustav Brock via AccessD Sent: Wednesday, 18 December 2019 8:02 p.m. To: Access Developers discussion and problem solving Cc: Gustav Brock Subject: Re: [AccessD] [dba-SQLServer] DSN Tables - Could not find installable ISAM Hi David Yes. Use the latest ODBC driver and a connection string like: DRIVER=SQL Server Native Client 17.0;Description=Your application name;APP=MicrosoftR Access;SERVER=tcp:YourInstanceName.database.windows.net,1433;DATABASE=YourDb Name;Trusted_Connection=No;UID=Username at YourInstanceName;PWD=YourPassword; -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From gustav at cactus.dk Mon Dec 23 06:29:52 2019 From: gustav at cactus.dk (Gustav Brock) Date: Mon, 23 Dec 2019 12:29:52 +0000 Subject: [AccessD] Rnd as Double (was: Create a random date/time) Message-ID: Hi all I have updated this to behave exactly like the native Rnd. It is done by using a static to hold the last generated value.. ' Returns a pseudo-random number as a Double, like Rnd returns a Single. ' The value will be less than 1 but greater than or equal to zero. ' ' Usage: Excactly like Rnd: ' ' PseudoRandomValue = RndDbl[(Number)] ' ' Number < 0 -> The same number every time, using Number as the seed. ' Number > 0 -> The next number in the pseudo-random sequence. ' Number = 0 -> The most recently generated number. ' No Number -> The next number in the pseudo-random sequence. ' ' 2019-12-21. Gustav Brock, Cactus Data ApS, CPH. ' Public Function RndDbl( _ Optional ByVal Number As Single = 1) _ As Double ' Exponent to shift the significant digits of a single to ' the least significant digits of a double. Const Exponent As Long = 7 Static Value As Double Select Case Number Case Is <> 0 Or (Number = 0 And Value = 0) ' Return the next number in the pseudo-random sequence. ' Generate two values like: ' 0.1851513 ' 0.000000072890967130661 ' and add these. Value = CDbl(Rnd(Number)) + CDbl(Rnd(Number) * 10 ^ -Exponent) Case Is = 0 ' Return the most recently generated number. End Select ' Return a value like: ' 0.185151372890967 RndDbl = Value End Function Merry Christmas! Gustav -----Oprindelig meddelelse----- Fra: AccessD P? vegne af Gustav Brock Sendt: 5. september 2018 15:01 Til: Access Developers discussion and problem solving Emne: [AccessD] Rnd as Double (was: Create a random date/time) Hi all I wondered how to generate a pseudo random value as a double - like Rnd does for a single. This, I believe, can be done by calling Rnd twice, shifting one of the values "below the range of a single", and add the two values, thus obtaining more significant digits. It is simpler than it may sound: Public Function RndDbl(Optional ByRef Number As Single) As Double ' Exponent to shift the significant digits of a single to ' the least significant digits of a double. Const Exponent As Long = 7 Dim Value As Double ' Generate two values like: ' 0.1851513 ' 0.000000072890967130661 ' and add these. Value = CDbl(Rnd(Number)) + CDbl(Rnd(Number) * 10 ^ -Exponent) ' Return value like: ' 0.185151372890967 RndDbl = Value End Function Then call it with a dynamic seed using Timer: PseudoRandomDouble = RndDbl(-Timer) What do you think? /gustav From John.Clark at niagaracounty.com Mon Dec 23 12:38:29 2019 From: John.Clark at niagaracounty.com (John W. Clark) Date: Mon, 23 Dec 2019 18:38:29 +0000 Subject: [AccessD] Help on entering data -- when to do it? In-Reply-To: References: Message-ID: Hey All! There are probably many people here who many not remember me. It has been a very long time since asking any questions here. This is because, (A) because of the list I became quite proficient, and (B) I haven't worked with Access in a very long time -- I've done some little stuff here and there, but no programming in a while. I now inherited one of my favorite tasks (I'm being very sarcastic here) and I am fixing the code of someone who is a non-programmer and wrote code that a department now wants to use. Maybe it is because I have become rusty, but I now find myself needing some help. I've got it mostly working, but I have one little issue at the moment -- I added a field to find the user ID of the person logged in, and I want to be able to put that in the record, so we can track who made the entry. I initially did this for the onOpen event of the form, but now I am unable to turn off filtering and scroll through all the records. I can hit ESC and then do this, but I don't want the user to have to do this. So I'm thinking I need to assign that field elsewhere -- perhaps OnDirty? That is what I am asking -- at what point should I be putting this in? I never used the even OnDirty in all the years I programmed -- don't know why; just never needed to -- so I'm a bit shaky on what it means exactly. Or perhaps there is a better way to do this? Notice: This electronic transmission is intended for the sole use of the individual or entity to which it is addressed and may contain confidential, privileged or otherwise legally protected information. If you are not the intended recipient, or if you believe you are not the intended recipient, you are hereby notified that any use, disclosure, copying, distribution, or the taking of any action in reliance on the contents of this information, is strictly prohibited. Niagara County is not responsible for the content of any external hyperlink referenced in this email or any email. IF YOU HAVE RECEIVED THIS TRANSMISSION IN ERROR, PLEASE NOTIFY THE SENDER IMMEDIATELY BY EMAIL AND DELETE THE ORIGINAL MESSAGE ALONG WITH ANY PAPER OR ELECTRONIC COPIES. Thank you for your cooperation. From rockysmolin at bchacc.com Mon Dec 23 12:44:47 2019 From: rockysmolin at bchacc.com (rockysmolin bchacc.com) Date: Mon, 23 Dec 2019 18:44:47 +0000 Subject: [AccessD] Help on entering data -- when to do it? In-Reply-To: References: Message-ID: I assume you have or can retrieve the ID (I always save the user name, ID, access level, etc. in a global variables when they logged in?). I would use the On Add event which is triggered when a new record is created. On Dirty is more appropriate I think for editing when you want to test a record to see if the user has made any changes to the record. But I think either should work. HTH Rocky Smolin Beach Access Software 760-683-5777 www.bchacc.com www.e-z-mrp.com Skype: rocky.smolin -----Original Message----- From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of John W. Clark Sent: Monday, December 23, 2019 10:38 AM To: Access Developers discussion and problem solving Subject: [AccessD] Help on entering data -- when to do it? Hey All! There are probably many people here who many not remember me. It has been a very long time since asking any questions here. This is because, (A) because of the list I became quite proficient, and (B) I haven't worked with Access in a very long time -- I've done some little stuff here and there, but no programming in a while. I now inherited one of my favorite tasks (I'm being very sarcastic here) and I am fixing the code of someone who is a non-programmer and wrote code that a department now wants to use. Maybe it is because I have become rusty, but I now find myself needing some help. I've got it mostly working, but I have one little issue at the moment -- I added a field to find the user ID of the person logged in, and I want to be able to put that in the record, so we can track who made the entry. I initially did this for the onOpen event of the form, but now I am unable to turn off filtering and scroll through all the records. I can hit ESC and then do this, but I don't want the user to have to do this. So I'm thinking I need to assign that field elsewhere -- perhaps OnDirty? That is what I am asking -- at what point should I be putting this in? I never used the even OnDirty in all the years I programmed -- don't know why; just never needed to -- so I'm a bit shaky on what it means exactly. Or perhaps there is a better way to do this? Notice: This electronic transmission is intended for the sole use of the individual or entity to which it is addressed and may contain confidential, privileged or otherwise legally protected information. If you are not the intended recipient, or if you believe you are not the intended recipient, you are hereby notified that any use, disclosure, copying, distribution, or the taking of any action in reliance on the contents of this information, is strictly prohibited. Niagara County is not responsible for the content of any external hyperlink referenced in this email or any email. IF YOU HAVE RECEIVED THIS TRANSMISSION IN ERROR, PLEASE NOTIFY THE SENDER IMMEDIATELY BY EMAIL AND DELETE THE ORIGINAL MESSAGE ALONG WITH ANY PAPER OR ELECTRONIC COPIES. Thank you for your cooperation. -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From John.Clark at niagaracounty.com Mon Dec 23 13:06:22 2019 From: John.Clark at niagaracounty.com (John W. Clark) Date: Mon, 23 Dec 2019 19:06:22 +0000 Subject: [AccessD] Help on entering data -- when to do it? In-Reply-To: References: , Message-ID: OK, I have a really dumb question Rocky...I don't see an OnAdd (or Add) event. Would this be an "AfterUpdate" maybe? ________________________________ From: AccessD on behalf of rockysmolin bchacc.com Sent: Monday, December 23, 2019 1:44 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Help on entering data -- when to do it? [EXTERNAL MESSAGE] This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe. - Niagara County IT I assume you have or can retrieve the ID (I always save the user name, ID, access level, etc. in a global variables when they logged in?). I would use the On Add event which is triggered when a new record is created. On Dirty is more appropriate I think for editing when you want to test a record to see if the user has made any changes to the record. But I think either should work. HTH Rocky Smolin Beach Access Software 760-683-5777 www.bchacc.com www.e-z-mrp.com Skype: rocky.smolin -----Original Message----- From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of John W. Clark Sent: Monday, December 23, 2019 10:38 AM To: Access Developers discussion and problem solving Subject: [AccessD] Help on entering data -- when to do it? Hey All! There are probably many people here who many not remember me. It has been a very long time since asking any questions here. This is because, (A) because of the list I became quite proficient, and (B) I haven't worked with Access in a very long time -- I've done some little stuff here and there, but no programming in a while. I now inherited one of my favorite tasks (I'm being very sarcastic here) and I am fixing the code of someone who is a non-programmer and wrote code that a department now wants to use. Maybe it is because I have become rusty, but I now find myself needing some help. I've got it mostly working, but I have one little issue at the moment -- I added a field to find the user ID of the person logged in, and I want to be able to put that in the record, so we can track who made the entry. I initially did this for the onOpen event of the form, but now I am unable to turn off filtering and scroll through all the records. I can hit ESC and then do this, but I don't want the user to have to do this. So I'm thinking I need to assign that field elsewhere -- perhaps OnDirty? That is what I am asking -- at what point should I be putting this in? I never used the even OnDirty in all the years I programmed -- don't know why; just never needed to -- so I'm a bit shaky on what it means exactly. Or perhaps there is a better way to do this? Notice: This electronic transmission is intended for the sole use of the individual or entity to which it is addressed and may contain confidential, privileged or otherwise legally protected information. If you are not the intended recipient, or if you believe you are not the intended recipient, you are hereby notified that any use, disclosure, copying, distribution, or the taking of any action in reliance on the contents of this information, is strictly prohibited. Niagara County is not responsible for the content of any external hyperlink referenced in this email or any email. IF YOU HAVE RECEIVED THIS TRANSMISSION IN ERROR, PLEASE NOTIFY THE SENDER IMMEDIATELY BY EMAIL AND DELETE THE ORIGINAL MESSAGE ALONG WITH ANY PAPER OR ELECTRONIC COPIES. Thank you for your cooperation. -- 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 Notice: This electronic transmission is intended for the sole use of the individual or entity to which it is addressed and may contain confidential, privileged or otherwise legally protected information. If you are not the intended recipient, or if you believe you are not the intended recipient, you are hereby notified that any use, disclosure, copying, distribution, or the taking of any action in reliance on the contents of this information, is strictly prohibited. Niagara County is not responsible for the content of any external hyperlink referenced in this email or any email. IF YOU HAVE RECEIVED THIS TRANSMISSION IN ERROR, PLEASE NOTIFY THE SENDER IMMEDIATELY BY EMAIL AND DELETE THE ORIGINAL MESSAGE ALONG WITH ANY PAPER OR ELECTRONIC COPIES. Thank you for your cooperation. From John.Clark at niagaracounty.com Mon Dec 23 13:08:43 2019 From: John.Clark at niagaracounty.com (John W. Clark) Date: Mon, 23 Dec 2019 19:08:43 +0000 Subject: [AccessD] Help on entering data -- when to do it? In-Reply-To: References: , Message-ID: Oh...almost forgot...yes, I can retrieve the ID. But right now it isn't being assigned to a record for some reason -- I probably didn't link it yet. I just need their ID. ________________________________ From: AccessD on behalf of rockysmolin bchacc.com Sent: Monday, December 23, 2019 1:44 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Help on entering data -- when to do it? [EXTERNAL MESSAGE] This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe. - Niagara County IT I assume you have or can retrieve the ID (I always save the user name, ID, access level, etc. in a global variables when they logged in?). I would use the On Add event which is triggered when a new record is created. On Dirty is more appropriate I think for editing when you want to test a record to see if the user has made any changes to the record. But I think either should work. HTH Rocky Smolin Beach Access Software 760-683-5777 www.bchacc.com www.e-z-mrp.com Skype: rocky.smolin -----Original Message----- From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of John W. Clark Sent: Monday, December 23, 2019 10:38 AM To: Access Developers discussion and problem solving Subject: [AccessD] Help on entering data -- when to do it? Hey All! There are probably many people here who many not remember me. It has been a very long time since asking any questions here. This is because, (A) because of the list I became quite proficient, and (B) I haven't worked with Access in a very long time -- I've done some little stuff here and there, but no programming in a while. I now inherited one of my favorite tasks (I'm being very sarcastic here) and I am fixing the code of someone who is a non-programmer and wrote code that a department now wants to use. Maybe it is because I have become rusty, but I now find myself needing some help. I've got it mostly working, but I have one little issue at the moment -- I added a field to find the user ID of the person logged in, and I want to be able to put that in the record, so we can track who made the entry. I initially did this for the onOpen event of the form, but now I am unable to turn off filtering and scroll through all the records. I can hit ESC and then do this, but I don't want the user to have to do this. So I'm thinking I need to assign that field elsewhere -- perhaps OnDirty? That is what I am asking -- at what point should I be putting this in? I never used the even OnDirty in all the years I programmed -- don't know why; just never needed to -- so I'm a bit shaky on what it means exactly. Or perhaps there is a better way to do this? Notice: This electronic transmission is intended for the sole use of the individual or entity to which it is addressed and may contain confidential, privileged or otherwise legally protected information. If you are not the intended recipient, or if you believe you are not the intended recipient, you are hereby notified that any use, disclosure, copying, distribution, or the taking of any action in reliance on the contents of this information, is strictly prohibited. Niagara County is not responsible for the content of any external hyperlink referenced in this email or any email. IF YOU HAVE RECEIVED THIS TRANSMISSION IN ERROR, PLEASE NOTIFY THE SENDER IMMEDIATELY BY EMAIL AND DELETE THE ORIGINAL MESSAGE ALONG WITH ANY PAPER OR ELECTRONIC COPIES. Thank you for your cooperation. -- 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 Notice: This electronic transmission is intended for the sole use of the individual or entity to which it is addressed and may contain confidential, privileged or otherwise legally protected information. If you are not the intended recipient, or if you believe you are not the intended recipient, you are hereby notified that any use, disclosure, copying, distribution, or the taking of any action in reliance on the contents of this information, is strictly prohibited. Niagara County is not responsible for the content of any external hyperlink referenced in this email or any email. IF YOU HAVE RECEIVED THIS TRANSMISSION IN ERROR, PLEASE NOTIFY THE SENDER IMMEDIATELY BY EMAIL AND DELETE THE ORIGINAL MESSAGE ALONG WITH ANY PAPER OR ELECTRONIC COPIES. Thank you for your cooperation. From jackandpat.d at gmail.com Mon Dec 23 13:26:15 2019 From: jackandpat.d at gmail.com (jack drawbridge) Date: Mon, 23 Dec 2019 14:26:15 -0500 Subject: [AccessD] Help on entering data -- when to do it? In-Reply-To: References: Message-ID: Hi John, I do remember you on AccessD--- Merry Christmas! You can get the username using this code [code] Private Declare Function apiGetUserName Lib "advapi32.dll" Alias _ "GetUserNameA" (ByVal lpBuffer As String, nSize As Long) As Long Function fOSUserName() As String ' Returns the network login name Dim lngLen As Long, lngX As Long Dim strUserName As String strUserName = String$(254, 0) lngLen = 255 lngX = apiGetUserName(strUserName, lngLen) If lngX <> 0 Then fOSUserName = Left$(strUserName, lngLen - 1) Else fOSUserName = "" End If End Function [code] which is located at http://www.databasedev.co.uk/get_username_or_computername.html On Mon, Dec 23, 2019 at 2:09 PM John W. Clark wrote: > Oh...almost forgot...yes, I can retrieve the ID. But right now it isn't > being assigned to a record for some reason -- I probably didn't link it > yet. I just need their ID. > > ________________________________ > From: AccessD on behalf of > rockysmolin bchacc.com > Sent: Monday, December 23, 2019 1:44 PM > To: Access Developers discussion and problem solving < > accessd at databaseadvisors.com> > Subject: Re: [AccessD] Help on entering data -- when to do it? > > [EXTERNAL MESSAGE] > > This email originated from outside of the organization. Do not click links > or open attachments unless you recognize the sender and know the content is > safe. > - Niagara County IT > > I assume you have or can retrieve the ID (I always save the user name, ID, > access level, etc. in a global variables when they logged in?). > > I would use the On Add event which is triggered when a new record is > created. On Dirty is more appropriate I think for editing when you want to > test a record to see if the user has made any changes to the record. But I > think either should work. > > HTH > > > Rocky Smolin > Beach Access Software > 760-683-5777 > www.bchacc.com > www.e-z-mrp.com > Skype: rocky.smolin > > > > -----Original Message----- > From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of > John W. Clark > Sent: Monday, December 23, 2019 10:38 AM > To: Access Developers discussion and problem solving > Subject: [AccessD] Help on entering data -- when to do it? > > Hey All! There are probably many people here who many not remember me. It > has been a very long time since asking any questions here. This is because, > (A) because of the list I became quite proficient, and (B) I haven't worked > with Access in a very long time -- I've done some little stuff here and > there, but no programming in a while. I now inherited one of my favorite > tasks (I'm being very sarcastic here) and I am fixing the code of someone > who is a non-programmer and wrote code that a department now wants to use. > > Maybe it is because I have become rusty, but I now find myself needing > some help. I've got it mostly working, but I have one little issue at the > moment -- I added a field to find the user ID of the person logged in, and > I want to be able to put that in the record, so we can track who made the > entry. I initially did this for the onOpen event of the form, but now I am > unable to turn off filtering and scroll through all the records. I can hit > ESC and then do this, but I don't want the user to have to do this. So I'm > thinking I need to assign that field elsewhere -- perhaps OnDirty? That is > what I am asking -- at what point should I be putting this in? I never used > the even OnDirty in all the years I programmed -- don't know why; just > never needed to -- so I'm a bit shaky on what it means exactly. Or perhaps > there is a better way to do this? > > > Notice: This electronic transmission is intended for the sole use of the > individual or entity to which it is addressed and may contain confidential, > privileged or otherwise legally protected information. If you are not the > intended recipient, or if you believe you are not the intended recipient, > you are hereby notified that any use, disclosure, copying, distribution, or > the taking of any action in reliance on the contents of this information, > is strictly prohibited. Niagara County is not responsible for the content > of any external hyperlink referenced in this email or any email. IF YOU > HAVE RECEIVED THIS TRANSMISSION IN ERROR, PLEASE NOTIFY THE SENDER > IMMEDIATELY BY EMAIL AND DELETE THE ORIGINAL MESSAGE ALONG WITH ANY PAPER > OR ELECTRONIC COPIES. Thank you for your cooperation. > -- > 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 > > > Notice: This electronic transmission is intended for the sole use of the > individual or entity to which it is addressed and may contain confidential, > privileged or otherwise legally protected information. If you are not the > intended recipient, or if you believe you are not the intended recipient, > you are hereby notified that any use, disclosure, copying, distribution, or > the taking of any action in reliance on the contents of this information, > is strictly prohibited. Niagara County is not responsible for the content > of any external hyperlink referenced in this email or any email. IF YOU > HAVE RECEIVED THIS TRANSMISSION IN ERROR, PLEASE NOTIFY THE SENDER > IMMEDIATELY BY EMAIL AND DELETE THE ORIGINAL MESSAGE ALONG WITH ANY PAPER > OR ELECTRONIC COPIES. Thank you for your cooperation. > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > From rockysmolin at bchacc.com Mon Dec 23 13:33:30 2019 From: rockysmolin at bchacc.com (rockysmolin bchacc.com) Date: Mon, 23 Dec 2019 19:33:30 +0000 Subject: [AccessD] Help on entering data -- when to do it? In-Reply-To: References: , Message-ID: No good question for a dumb response - I've been away from access for a while myself. It's the before insert and after insert events that you want to try. r -----Original Message----- From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of John W. Clark Sent: Monday, December 23, 2019 11:06 AM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Help on entering data -- when to do it? OK, I have a really dumb question Rocky...I don't see an OnAdd (or Add) event. Would this be an "AfterUpdate" maybe? ________________________________ From: AccessD on behalf of rockysmolin bchacc.com Sent: Monday, December 23, 2019 1:44 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Help on entering data -- when to do it? [EXTERNAL MESSAGE] This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe. - Niagara County IT I assume you have or can retrieve the ID (I always save the user name, ID, access level, etc. in a global variables when they logged in?). I would use the On Add event which is triggered when a new record is created. On Dirty is more appropriate I think for editing when you want to test a record to see if the user has made any changes to the record. But I think either should work. HTH Rocky Smolin Beach Access Software 760-683-5777 www.bchacc.com www.e-z-mrp.com Skype: rocky.smolin -----Original Message----- From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of John W. Clark Sent: Monday, December 23, 2019 10:38 AM To: Access Developers discussion and problem solving Subject: [AccessD] Help on entering data -- when to do it? Hey All! There are probably many people here who many not remember me. It has been a very long time since asking any questions here. This is because, (A) because of the list I became quite proficient, and (B) I haven't worked with Access in a very long time -- I've done some little stuff here and there, but no programming in a while. I now inherited one of my favorite tasks (I'm being very sarcastic here) and I am fixing the code of someone who is a non-programmer and wrote code that a department now wants to use. Maybe it is because I have become rusty, but I now find myself needing some help. I've got it mostly working, but I have one little issue at the moment -- I added a field to find the user ID of the person logged in, and I want to be able to put that in the record, so we can track who made the entry. I initially did this for the onOpen event of the form, but now I am unable to turn off filtering and scroll through all the records. I can hit ESC and then do this, but I don't want the user to have to do this. So I'm thinking I need to assign that field elsewhere -- perhaps OnDirty? That is what I am asking -- at what point should I be putting this in? I never used the even OnDirty in all the years I programmed -- don't know why; just never needed to -- so I'm a bit shaky on what it means exactly. Or perhaps there is a better way to do this? Notice: This electronic transmission is intended for the sole use of the individual or entity to which it is addressed and may contain confidential, privileged or otherwise legally protected information. If you are not the intended recipient, or if you believe you are not the intended recipient, you are hereby notified that any use, disclosure, copying, distribution, or the taking of any action in reliance on the contents of this information, is strictly prohibited. Niagara County is not responsible for the content of any external hyperlink referenced in this email or any email. IF YOU HAVE RECEIVED THIS TRANSMISSION IN ERROR, PLEASE NOTIFY THE SENDER IMMEDIATELY BY EMAIL AND DELETE THE ORIGINAL MESSAGE ALONG WITH ANY PAPER OR ELECTRONIC COPIES. Thank you for your cooperation. -- 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 Notice: This electronic transmission is intended for the sole use of the individual or entity to which it is addressed and may contain confidential, privileged or otherwise legally protected information. If you are not the intended recipient, or if you believe you are not the intended recipient, you are hereby notified that any use, disclosure, copying, distribution, or the taking of any action in reliance on the contents of this information, is strictly prohibited. Niagara County is not responsible for the content of any external hyperlink referenced in this email or any email. IF YOU HAVE RECEIVED THIS TRANSMISSION IN ERROR, PLEASE NOTIFY THE SENDER IMMEDIATELY BY EMAIL AND DELETE THE ORIGINAL MESSAGE ALONG WITH ANY PAPER OR ELECTRONIC COPIES. Thank you for your cooperation. -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From rockysmolin at bchacc.com Mon Dec 23 13:34:42 2019 From: rockysmolin at bchacc.com (rockysmolin bchacc.com) Date: Mon, 23 Dec 2019 19:34:42 +0000 Subject: [AccessD] Help on entering data -- when to do it? In-Reply-To: References: , Message-ID: Then try the Before Insert and After Insert events for putting the ID into the record. I can't remember now but I think one of them doesn't work. But it's a quick test. r -----Original Message----- From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of John W. Clark Sent: Monday, December 23, 2019 11:09 AM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Help on entering data -- when to do it? Oh...almost forgot...yes, I can retrieve the ID. But right now it isn't being assigned to a record for some reason -- I probably didn't link it yet. I just need their ID. ________________________________ From: AccessD on behalf of rockysmolin bchacc.com Sent: Monday, December 23, 2019 1:44 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Help on entering data -- when to do it? [EXTERNAL MESSAGE] This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe. - Niagara County IT I assume you have or can retrieve the ID (I always save the user name, ID, access level, etc. in a global variables when they logged in?). I would use the On Add event which is triggered when a new record is created. On Dirty is more appropriate I think for editing when you want to test a record to see if the user has made any changes to the record. But I think either should work. HTH Rocky Smolin Beach Access Software 760-683-5777 www.bchacc.com www.e-z-mrp.com Skype: rocky.smolin -----Original Message----- From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of John W. Clark Sent: Monday, December 23, 2019 10:38 AM To: Access Developers discussion and problem solving Subject: [AccessD] Help on entering data -- when to do it? Hey All! There are probably many people here who many not remember me. It has been a very long time since asking any questions here. This is because, (A) because of the list I became quite proficient, and (B) I haven't worked with Access in a very long time -- I've done some little stuff here and there, but no programming in a while. I now inherited one of my favorite tasks (I'm being very sarcastic here) and I am fixing the code of someone who is a non-programmer and wrote code that a department now wants to use. Maybe it is because I have become rusty, but I now find myself needing some help. I've got it mostly working, but I have one little issue at the moment -- I added a field to find the user ID of the person logged in, and I want to be able to put that in the record, so we can track who made the entry. I initially did this for the onOpen event of the form, but now I am unable to turn off filtering and scroll through all the records. I can hit ESC and then do this, but I don't want the user to have to do this. So I'm thinking I need to assign that field elsewhere -- perhaps OnDirty? That is what I am asking -- at what point should I be putting this in? I never used the even OnDirty in all the years I programmed -- don't know why; just never needed to -- so I'm a bit shaky on what it means exactly. Or perhaps there is a better way to do this? Notice: This electronic transmission is intended for the sole use of the individual or entity to which it is addressed and may contain confidential, privileged or otherwise legally protected information. If you are not the intended recipient, or if you believe you are not the intended recipient, you are hereby notified that any use, disclosure, copying, distribution, or the taking of any action in reliance on the contents of this information, is strictly prohibited. Niagara County is not responsible for the content of any external hyperlink referenced in this email or any email. IF YOU HAVE RECEIVED THIS TRANSMISSION IN ERROR, PLEASE NOTIFY THE SENDER IMMEDIATELY BY EMAIL AND DELETE THE ORIGINAL MESSAGE ALONG WITH ANY PAPER OR ELECTRONIC COPIES. Thank you for your cooperation. -- 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 Notice: This electronic transmission is intended for the sole use of the individual or entity to which it is addressed and may contain confidential, privileged or otherwise legally protected information. If you are not the intended recipient, or if you believe you are not the intended recipient, you are hereby notified that any use, disclosure, copying, distribution, or the taking of any action in reliance on the contents of this information, is strictly prohibited. Niagara County is not responsible for the content of any external hyperlink referenced in this email or any email. IF YOU HAVE RECEIVED THIS TRANSMISSION IN ERROR, PLEASE NOTIFY THE SENDER IMMEDIATELY BY EMAIL AND DELETE THE ORIGINAL MESSAGE ALONG WITH ANY PAPER OR ELECTRONIC COPIES. Thank you for your cooperation. -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From BWalsh at comagine.org Mon Dec 23 16:04:39 2019 From: BWalsh at comagine.org (Bob Walsh) Date: Mon, 23 Dec 2019 22:04:39 +0000 Subject: [AccessD] Help on entering data -- when to do it? In-Reply-To: References: Message-ID: John, If you get the userid when you start the application and store it in a Tempvars, it will be available for you to use everywhere in the application. Bob From: AccessD On Behalf Of John W. Clark Sent: Monday, December 23, 2019 10:38 AM To: Access Developers discussion and problem solving Subject: [AccessD] Help on entering data -- when to do it? [Attn: This is an external email.] Hey All! There are probably many people here who many not remember me. It has been a very long time since asking any questions here. This is because, (A) because of the list I became quite proficient, and (B) I haven't worked with Access in a very long time -- I've done some little stuff here and there, but no programming in a while. I now inherited one of my favorite tasks (I'm being very sarcastic here) and I am fixing the code of someone who is a non-programmer and wrote code that a department now wants to use. Maybe it is because I have become rusty, but I now find myself needing some help. I've got it mostly working, but I have one little issue at the moment -- I added a field to find the user ID of the person logged in, and I want to be able to put that in the record, so we can track who made the entry. I initially did this for the onOpen event of the form, but now I am unable to turn off filtering and scroll through all the records. I can hit ESC and then do this, but I don't want the user to have to do this. So I'm thinking I need to assign that field elsewhere -- perhaps OnDirty? That is what I am asking -- at what point should I be putting this in? I never used the even OnDirty in all the years I programmed -- don't know why; just never needed to -- so I'm a bit shaky on what it means exactly. Or perhaps there is a better way to do this? Notice: This electronic transmission is intended for the sole use of the individual or entity to which it is addressed and may contain confidential, privileged or otherwise legally protected information. If you are not the intended recipient, or if you believe you are not the intended recipient, you are hereby notified that any use, disclosure, copying, distribution, or the taking of any action in reliance on the contents of this information, is strictly prohibited. Niagara County is not responsible for the content of any external hyperlink referenced in this email or any email. IF YOU HAVE RECEIVED THIS TRANSMISSION IN ERROR, PLEASE NOTIFY THE SENDER IMMEDIATELY BY EMAIL AND DELETE THE ORIGINAL MESSAGE ALONG WITH ANY PAPER OR ELECTRONIC COPIES. Thank you for your cooperation. -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com ________________________________ This message and any attachments are intended for the use of the individual to whom it is addressed and may contain information that is privileged, business sensitive, confidential and/or exempt from disclosure under applicable laws and regulations. If you are not the intended recipient, be aware that any disclosure, copying, distribution, or use of the contents of this transmission is prohibited. If you have received this message in error, please inform the sender and delete all copies. Thank you. From stuart at lexacorp.com.pg Mon Dec 23 18:23:11 2019 From: stuart at lexacorp.com.pg (Stuart McLachlan) Date: Tue, 24 Dec 2019 10:23:11 +1000 Subject: [AccessD] Help on entering data -- when to do it? In-Reply-To: Message-ID: <5E015A6F.11243.A00CDCD@stuart.lexacorp.com.pg> I use.a form of Jake's GetUserName API call to get the usernae. There are a couple of ways to use it. You can set it is the Before_Insert or Before_Update form event (depending on whether you want to know who originally created the record who last modifed the record. Alternatively, you can have a text box on your form bound to the ID and set it's default value to "=GetUserName()". You can use any combination of Enabled/Locked/Visible for the textbox accordiing to your requireents. Personally, I tend to use the latter ethod. On 23 Dec 2019 at 22:04, Bob Walsh wrote: > John, > > If you get the userid when you start the application and store it in a > Tempvars, it will be available for you to use everywhere in the > application. > > Bob > > From: AccessD On Behalf Of John > W. Clark Sent: Monday, December 23, 2019 10:38 AM To: Access > Developers discussion and problem solving > Subject: [AccessD] Help on entering > data -- when to do it? > > [Attn: This is an external email.] > > Hey All! There are probably many people here who many not remember me. > It has been a very long time since asking any questions here. This is > because, (A) because of the list I became quite proficient, and (B) I > haven't worked with Access in a very long time -- I've done some > little stuff here and there, but no programming in a while. I now > inherited one of my favorite tasks (I'm being very sarcastic here) and > I am fixing the code of someone who is a non-programmer and wrote code > that a department now wants to use. > > Maybe it is because I have become rusty, but I now find myself needing > some help. I've got it mostly working, but I have one little issue at > the moment -- I added a field to find the user ID of the person logged > in, and I want to be able to put that in the record, so we can track > who made the entry. I initially did this for the onOpen event of the > form, but now I am unable to turn off filtering and scroll through all > the records. I can hit ESC and then do this, but I don't want the user > to have to do this. So I'm thinking I need to assign that field > elsewhere -- perhaps OnDirty? That is what I am asking -- at what > point should I be putting this in? I never used the even OnDirty in > all the years I programmed -- don't know why; just never needed to -- > so I'm a bit shaky on what it means exactly. Or perhaps there is a > better way to do this? > > > Notice: This electronic transmission is intended for the sole use of > the individual or entity to which it is addressed and may contain > confidential, privileged or otherwise legally protected information. > If you are not the intended recipient, or if you believe you are not > the intended recipient, you are hereby notified that any use, > disclosure, copying, distribution, or the taking of any action in > reliance on the contents of this information, is strictly prohibited. > Niagara County is not responsible for the content of any external > hyperlink referenced in this email or any email. IF YOU HAVE RECEIVED > THIS TRANSMISSION IN ERROR, PLEASE NOTIFY THE SENDER IMMEDIATELY BY > EMAIL AND DELETE THE ORIGINAL MESSAGE ALONG WITH ANY PAPER OR > ELECTRONIC COPIES. Thank you for your cooperation. -- AccessD mailing > list AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd visors.com/mailman/listinfo/accessd> Website: > http://www.databaseadvisors.com > > ________________________________ > This message and any attachments are intended for the use of the > individual to whom it is addressed and may contain information that is > privileged, business sensitive, confidential and/or exempt from > disclosure under applicable laws and regulations. If you are not the > intended recipient, be aware that any disclosure, copying, > distribution, or use of the contents of this transmission is > prohibited. If you have received this message in error, please inform > the sender and delete all copies. Thank you. -- AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd Website: > http://www.databaseadvisors.com > From gustav at cactus.dk Tue Dec 24 07:56:29 2019 From: gustav at cactus.dk (Gustav Brock) Date: Tue, 24 Dec 2019 13:56:29 +0000 Subject: [AccessD] OT: Enjoy Message-ID: Merry Christmas to all - the handful still hanging and our faithful lurkers. /gustav From garykjos at gmail.com Tue Dec 24 08:18:38 2019 From: garykjos at gmail.com (Gary Kjos) Date: Tue, 24 Dec 2019 08:18:38 -0600 Subject: [AccessD] OT: Enjoy In-Reply-To: References: Message-ID: Thank you Gustav! Merry Christmas to you too! On Tue, Dec 24, 2019 at 7:57 AM Gustav Brock via AccessD wrote: > > Merry Christmas to all - the handful still hanging and our faithful lurkers. > > /gustav > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com -- Gary Kjos garykjos at gmail.com From fahooper at gmail.com Tue Dec 24 08:22:30 2019 From: fahooper at gmail.com (Fred Hooper) Date: Tue, 24 Dec 2019 09:22:30 -0500 Subject: [AccessD] OT: Enjoy In-Reply-To: References: Message-ID: <47722ac8-cd89-4a1e-f727-b65502e657aa@gmail.com> As a faithful (mostly) lurker, Merry Christmas and thanks to all. Fred Gustav Brock via AccessD wrote on 12/24/2019 8:56 AM: > Merry Christmas to all - the handful still hanging and our faithful lurkers. > > /gustav From John.Clark at niagaracounty.com Tue Dec 24 08:27:52 2019 From: John.Clark at niagaracounty.com (John W. Clark) Date: Tue, 24 Dec 2019 14:27:52 +0000 Subject: [AccessD] Help on entering data -- when to do it? In-Reply-To: <5E015A6F.11243.A00CDCD@stuart.lexacorp.com.pg> References: , <5E015A6F.11243.A00CDCD@stuart.lexacorp.com.pg> Message-ID: I have the userID. I use a module called modGetNetID and in that module I have the following: Public Function GetUserName() As String ' GetUserName = Environ("USERNAME") ' Better method, see comment by HansUp GetUserName = CreateObject("WScript.Network").UserName End Function (I left the commenting in obviously) I then call it in the Form_Current and Form_Load events. This seems to work in both (in regards to presenting it) and I'm not sure which to go with yet. I use the following code behind the events: txtNetID.Value = Environ("Username") I have that field (txtNetID) with the Control Source of txtInputUser and it is populating the table with the correct information. My problem is that I am using the same form for input and viewing/editing the current data -- like I said, this program was actually written by another, and this isn't something I wanted to spend too much time on because, while I still love programming, I just have too many other responsibilities these days. So I just prettied up their entry form and it opens to a blank record (and the UserID is in there for this). To get to the rest I'm OK having the user just click on the "filter" button at the bottom. But this isn't working while there is a UserID in that field -- if you hit escape, it clears that box and one can then click on "filter." But, while I am getting to the point where I may just have them do this, I really don't want to. So, I was wondering if there was a better event to use. Also, I notice that when I click on the filter button again, and it comes back to a blank record, that field is not populated now. I've setup an "OnClick" event to do this, but again, that is just a bit past the hokie mark and I really don't want to do that. Perhaps I am becoming like my users and asking for too much here, eh? ;o) ________________________________ From: AccessD on behalf of Stuart McLachlan Sent: Monday, December 23, 2019 7:23 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Help on entering data -- when to do it? [EXTERNAL MESSAGE] This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe. - Niagara County IT I use.a form of Jake's GetUserName API call to get the usernae. There are a couple of ways to use it. You can set it is the Before_Insert or Before_Update form event (depending on whether you want to know who originally created the record who last modifed the record. Alternatively, you can have a text box on your form bound to the ID and set it's default value to "=GetUserName()". You can use any combination of Enabled/Locked/Visible for the textbox accordiing to your requireents. Personally, I tend to use the latter ethod. On 23 Dec 2019 at 22:04, Bob Walsh wrote: > John, > > If you get the userid when you start the application and store it in a > Tempvars, it will be available for you to use everywhere in the > application. > > Bob > > From: AccessD On Behalf Of John > W. Clark Sent: Monday, December 23, 2019 10:38 AM To: Access > Developers discussion and problem solving > Subject: [AccessD] Help on entering > data -- when to do it? > > [Attn: This is an external email.] > > Hey All! There are probably many people here who many not remember me. > It has been a very long time since asking any questions here. This is > because, (A) because of the list I became quite proficient, and (B) I > haven't worked with Access in a very long time -- I've done some > little stuff here and there, but no programming in a while. I now > inherited one of my favorite tasks (I'm being very sarcastic here) and > I am fixing the code of someone who is a non-programmer and wrote code > that a department now wants to use. > > Maybe it is because I have become rusty, but I now find myself needing > some help. I've got it mostly working, but I have one little issue at > the moment -- I added a field to find the user ID of the person logged > in, and I want to be able to put that in the record, so we can track > who made the entry. I initially did this for the onOpen event of the > form, but now I am unable to turn off filtering and scroll through all > the records. I can hit ESC and then do this, but I don't want the user > to have to do this. So I'm thinking I need to assign that field > elsewhere -- perhaps OnDirty? That is what I am asking -- at what > point should I be putting this in? I never used the even OnDirty in > all the years I programmed -- don't know why; just never needed to -- > so I'm a bit shaky on what it means exactly. Or perhaps there is a > better way to do this? > > > Notice: This electronic transmission is intended for the sole use of > the individual or entity to which it is addressed and may contain > confidential, privileged or otherwise legally protected information. > If you are not the intended recipient, or if you believe you are not > the intended recipient, you are hereby notified that any use, > disclosure, copying, distribution, or the taking of any action in > reliance on the contents of this information, is strictly prohibited. > Niagara County is not responsible for the content of any external > hyperlink referenced in this email or any email. IF YOU HAVE RECEIVED > THIS TRANSMISSION IN ERROR, PLEASE NOTIFY THE SENDER IMMEDIATELY BY > EMAIL AND DELETE THE ORIGINAL MESSAGE ALONG WITH ANY PAPER OR > ELECTRONIC COPIES. Thank you for your cooperation. -- AccessD mailing > list AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd visors.com/mailman/listinfo/accessd> Website: > http://www.databaseadvisors.com > > ________________________________ > This message and any attachments are intended for the use of the > individual to whom it is addressed and may contain information that is > privileged, business sensitive, confidential and/or exempt from > disclosure under applicable laws and regulations. If you are not the > intended recipient, be aware that any disclosure, copying, > distribution, or use of the contents of this transmission is > prohibited. If you have received this message in error, please inform > the sender and delete all copies. Thank you. -- 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 Notice: This electronic transmission is intended for the sole use of the individual or entity to which it is addressed and may contain confidential, privileged or otherwise legally protected information. If you are not the intended recipient, or if you believe you are not the intended recipient, you are hereby notified that any use, disclosure, copying, distribution, or the taking of any action in reliance on the contents of this information, is strictly prohibited. Niagara County is not responsible for the content of any external hyperlink referenced in this email or any email. IF YOU HAVE RECEIVED THIS TRANSMISSION IN ERROR, PLEASE NOTIFY THE SENDER IMMEDIATELY BY EMAIL AND DELETE THE ORIGINAL MESSAGE ALONG WITH ANY PAPER OR ELECTRONIC COPIES. Thank you for your cooperation. From mwp.reid at qub.ac.uk Tue Dec 24 08:39:20 2019 From: mwp.reid at qub.ac.uk (Martin Reid) Date: Tue, 24 Dec 2019 14:39:20 +0000 Subject: [AccessD] OT: Enjoy In-Reply-To: <47722ac8-cd89-4a1e-f727-b65502e657aa@gmail.com> References: , <47722ac8-cd89-4a1e-f727-b65502e657aa@gmail.com> Message-ID: Merry Christmas Martin Get Outlook for Android ________________________________ From: AccessD on behalf of Fred Hooper Sent: Tuesday, December 24, 2019 2:22:30 PM To: Gustav Brock via AccessD Subject: Re: [AccessD] OT: Enjoy This message is from an external sender. Please take care when responding, clicking links or opening attachments. As a faithful (mostly) lurker, Merry Christmas and thanks to all. Fred Gustav Brock via AccessD wrote on 12/24/2019 8:56 AM: > Merry Christmas to all - the handful still hanging and our faithful lurkers. > > /gustav -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From kost36 at gmail.com Tue Dec 24 08:50:55 2019 From: kost36 at gmail.com (Kostas Konstantinidis) Date: Tue, 24 Dec 2019 16:50:55 +0200 Subject: [AccessD] OT: Enjoy In-Reply-To: References: , <47722ac8-cd89-4a1e-f727-b65502e657aa@gmail.com> Message-ID: <037d01d5ba69$8cb12650$a61372f0$@gmail.com> Merry Christmas to all from Greece / Crete / Chania -----Original Message----- From: AccessD On Behalf Of Martin Reid Sent: Tuesday, December 24, 2019 4:39 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] OT: Enjoy Merry Christmas Martin Get Outlook for Android ________________________________ From: AccessD on behalf of Fred Hooper Sent: Tuesday, December 24, 2019 2:22:30 PM To: Gustav Brock via AccessD Subject: Re: [AccessD] OT: Enjoy This message is from an external sender. Please take care when responding, clicking links or opening attachments. As a faithful (mostly) lurker, Merry Christmas and thanks to all. Fred Gustav Brock via AccessD wrote on 12/24/2019 8:56 AM: > Merry Christmas to all - the handful still hanging and our faithful lurkers. > > /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 df.waters at outlook.com Tue Dec 24 08:55:21 2019 From: df.waters at outlook.com (Daniel Waters) Date: Tue, 24 Dec 2019 14:55:21 +0000 Subject: [AccessD] OT: Enjoy In-Reply-To: <037d01d5ba69$8cb12650$a61372f0$@gmail.com> References: , <47722ac8-cd89-4a1e-f727-b65502e657aa@gmail.com> <037d01d5ba69$8cb12650$a61372f0$@gmail.com> Message-ID: And Merry Christmas from Minneapolis / St. Paul in Minnesota! >From a regular lurker (and also an occasional learner)! Dan Waters -----Original Message----- From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Kostas Konstantinidis Sent: December 24, 2019 8:51 To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] OT: Enjoy Merry Christmas to all from Greece / Crete / Chania -----Original Message----- From: AccessD On Behalf Of Martin Reid Sent: Tuesday, December 24, 2019 4:39 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] OT: Enjoy Merry Christmas Martin Get Outlook for Android ________________________________ From: AccessD on behalf of Fred Hooper Sent: Tuesday, December 24, 2019 2:22:30 PM To: Gustav Brock via AccessD Subject: Re: [AccessD] OT: Enjoy This message is from an external sender. Please take care when responding, clicking links or opening attachments. As a faithful (mostly) lurker, Merry Christmas and thanks to all. Fred Gustav Brock via AccessD wrote on 12/24/2019 8:56 AM: > Merry Christmas to all - the handful still hanging and our faithful lurkers. > > /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 jackandpat.d at gmail.com Tue Dec 24 09:02:49 2019 From: jackandpat.d at gmail.com (jack drawbridge) Date: Tue, 24 Dec 2019 10:02:49 -0500 Subject: [AccessD] OT: Enjoy In-Reply-To: References: <47722ac8-cd89-4a1e-f727-b65502e657aa@gmail.com> <037d01d5ba69$8cb12650$a61372f0$@gmail.com> Message-ID: Merry Christmas to all from Ontario, Canada. On Tue, Dec 24, 2019 at 9:55 AM Daniel Waters wrote: > And Merry Christmas from Minneapolis / St. Paul in Minnesota! > > From a regular lurker (and also an occasional learner)! > > Dan Waters > > -----Original Message----- > From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of > Kostas Konstantinidis > Sent: December 24, 2019 8:51 > To: 'Access Developers discussion and problem solving' > Subject: Re: [AccessD] OT: Enjoy > > Merry Christmas to all from Greece / Crete / Chania > > > -----Original Message----- > From: AccessD On Behalf Of Martin > Reid > Sent: Tuesday, December 24, 2019 4:39 PM > To: Access Developers discussion and problem solving > > Subject: Re: [AccessD] OT: Enjoy > > Merry Christmas > > Martin > > Get Outlook for Android > > ________________________________ > From: AccessD on behalf of Fred > Hooper > Sent: Tuesday, December 24, 2019 2:22:30 PM > To: Gustav Brock via AccessD > Subject: Re: [AccessD] OT: Enjoy > > This message is from an external sender. Please take care when responding, > clicking links or opening attachments. > > As a faithful (mostly) lurker, Merry Christmas and thanks to all. > > Fred > > Gustav Brock via AccessD wrote on 12/24/2019 8:56 AM: > > Merry Christmas to all - the handful still hanging and our faithful > lurkers. > > > > /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 tinanfields at torchlake.com Tue Dec 24 10:56:19 2019 From: tinanfields at torchlake.com (Tina N Fields) Date: Tue, 24 Dec 2019 11:56:19 -0500 Subject: [AccessD] OT: Enjoy In-Reply-To: References: Message-ID: <964201b6-14b2-8695-347a-defa20063b87@torchlake.com> And a Merry Christmas back to you and all our listers. T Tina Norris Fields 231-322-2787 tinanfields-at-torchlake-dot-com On 12/24/2019 8:56 AM, Gustav Brock via AccessD wrote: > Merry Christmas to all - the handful still hanging and our faithful lurkers. > > /gustav From rockysmolin at bchacc.com Tue Dec 24 11:13:40 2019 From: rockysmolin at bchacc.com (rockysmolin bchacc.com) Date: Tue, 24 Dec 2019 17:13:40 +0000 Subject: [AccessD] Help on entering data -- when to do it? In-Reply-To: References: , <5E015A6F.11243.A00CDCD@stuart.lexacorp.com.pg> Message-ID: Do don't want to update the user ID each time the record is accessed and changed? Then use the On Dirty event. Do you want to insert the user ID on the first time the record is created and then not change it again? Use the Before Insert event. r -----Original Message----- From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of John W. Clark Sent: Tuesday, December 24, 2019 6:28 AM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Help on entering data -- when to do it? I have the userID. I use a module called modGetNetID and in that module I have the following: Public Function GetUserName() As String ' GetUserName = Environ("USERNAME") ' Better method, see comment by HansUp GetUserName = CreateObject("WScript.Network").UserName End Function (I left the commenting in obviously) I then call it in the Form_Current and Form_Load events. This seems to work in both (in regards to presenting it) and I'm not sure which to go with yet. I use the following code behind the events: txtNetID.Value = Environ("Username") I have that field (txtNetID) with the Control Source of txtInputUser and it is populating the table with the correct information. My problem is that I am using the same form for input and viewing/editing the current data -- like I said, this program was actually written by another, and this isn't something I wanted to spend too much time on because, while I still love programming, I just have too many other responsibilities these days. So I just prettied up their entry form and it opens to a blank record (and the UserID is in there for this). To get to the rest I'm OK having the user just click on the "filter" button at the bottom. But this isn't working while there is a UserID in that field -- if you hit escape, it clears that box and one can then click on "filter." But, while I am getting to the point where I may just have them do this, I really don't want to. So, I was wondering if there was a better event to use. Also, I notice that when I click on the filter button again, and it comes back to a blank record, that field is not populated now. I've setup an "OnClick" event to do this, but again, that is just a bit past the hokie mark and I really don't want to do that. Perhaps I am becoming like my users and asking for too much here, eh? ;o) ________________________________ From: AccessD on behalf of Stuart McLachlan Sent: Monday, December 23, 2019 7:23 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Help on entering data -- when to do it? [EXTERNAL MESSAGE] This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe. - Niagara County IT I use.a form of Jake's GetUserName API call to get the usernae. There are a couple of ways to use it. You can set it is the Before_Insert or Before_Update form event (depending on whether you want to know who originally created the record who last modifed the record. Alternatively, you can have a text box on your form bound to the ID and set it's default value to "=GetUserName()". You can use any combination of Enabled/Locked/Visible for the textbox accordiing to your requireents. Personally, I tend to use the latter ethod. On 23 Dec 2019 at 22:04, Bob Walsh wrote: > John, > > If you get the userid when you start the application and store it in a > Tempvars, it will be available for you to use everywhere in the > application. > > Bob > > From: AccessD On Behalf Of John > W. Clark Sent: Monday, December 23, 2019 10:38 AM To: Access > Developers discussion and problem solving > Subject: [AccessD] Help on entering > data -- when to do it? > > [Attn: This is an external email.] > > Hey All! There are probably many people here who many not remember me. > It has been a very long time since asking any questions here. This is > because, (A) because of the list I became quite proficient, and (B) I > haven't worked with Access in a very long time -- I've done some > little stuff here and there, but no programming in a while. I now > inherited one of my favorite tasks (I'm being very sarcastic here) and > I am fixing the code of someone who is a non-programmer and wrote code > that a department now wants to use. > > Maybe it is because I have become rusty, but I now find myself needing > some help. I've got it mostly working, but I have one little issue at > the moment -- I added a field to find the user ID of the person logged > in, and I want to be able to put that in the record, so we can track > who made the entry. I initially did this for the onOpen event of the > form, but now I am unable to turn off filtering and scroll through all > the records. I can hit ESC and then do this, but I don't want the user > to have to do this. So I'm thinking I need to assign that field > elsewhere -- perhaps OnDirty? That is what I am asking -- at what > point should I be putting this in? I never used the even OnDirty in > all the years I programmed -- don't know why; just never needed to -- > so I'm a bit shaky on what it means exactly. Or perhaps there is a > better way to do this? > > > Notice: This electronic transmission is intended for the sole use of > the individual or entity to which it is addressed and may contain > confidential, privileged or otherwise legally protected information. > If you are not the intended recipient, or if you believe you are not > the intended recipient, you are hereby notified that any use, > disclosure, copying, distribution, or the taking of any action in > reliance on the contents of this information, is strictly prohibited. > Niagara County is not responsible for the content of any external > hyperlink referenced in this email or any email. IF YOU HAVE RECEIVED > THIS TRANSMISSION IN ERROR, PLEASE NOTIFY THE SENDER IMMEDIATELY BY > EMAIL AND DELETE THE ORIGINAL MESSAGE ALONG WITH ANY PAPER OR > ELECTRONIC COPIES. Thank you for your cooperation. -- AccessD mailing > list AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd visors.com/mailman/listinfo/accessd> Website: > http://www.databaseadvisors.com > > ________________________________ > This message and any attachments are intended for the use of the > individual to whom it is addressed and may contain information that is > privileged, business sensitive, confidential and/or exempt from > disclosure under applicable laws and regulations. If you are not the > intended recipient, be aware that any disclosure, copying, > distribution, or use of the contents of this transmission is > prohibited. If you have received this message in error, please inform > the sender and delete all copies. Thank you. -- 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 Notice: This electronic transmission is intended for the sole use of the individual or entity to which it is addressed and may contain confidential, privileged or otherwise legally protected information. If you are not the intended recipient, or if you believe you are not the intended recipient, you are hereby notified that any use, disclosure, copying, distribution, or the taking of any action in reliance on the contents of this information, is strictly prohibited. Niagara County is not responsible for the content of any external hyperlink referenced in this email or any email. IF YOU HAVE RECEIVED THIS TRANSMISSION IN ERROR, PLEASE NOTIFY THE SENDER IMMEDIATELY BY EMAIL AND DELETE THE ORIGINAL MESSAGE ALONG WITH ANY PAPER OR ELECTRONIC COPIES. Thank you for your cooperation. -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From rockysmolin at bchacc.com Tue Dec 24 11:20:32 2019 From: rockysmolin at bchacc.com (rockysmolin bchacc.com) Date: Tue, 24 Dec 2019 17:20:32 +0000 Subject: [AccessD] OT: Enjoy In-Reply-To: <964201b6-14b2-8695-347a-defa20063b87@torchlake.com> References: <964201b6-14b2-8695-347a-defa20063b87@torchlake.com> Message-ID: All the best from sunny Southern California. Rocky One of a dwindling number of original AccessD shareholders :-) On 12/24/2019 8:56 AM, Gustav Brock via AccessD wrote: > Merry Christmas to all - the handful still hanging and our faithful lurkers. > > /gustav -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From paul at wordwright.org Tue Dec 24 13:47:16 2019 From: paul at wordwright.org (paul) Date: Tue, 24 Dec 2019 19:47:16 +0000 Subject: [AccessD] OT: Enjoy In-Reply-To: References: <964201b6-14b2-8695-347a-defa20063b87@torchlake.com> Message-ID: Sending a very good Christmas to you all from a really keen user for many grateful years back in the early 2000s from a dark and wintry London, . And a brilliant new year to all! Salut paul Paul Rodgers On Tue, 24 Dec 2019 at 17:21, rockysmolin bchacc.com wrote: > All the best from sunny Southern California. > > Rocky > One of a dwindling number of original AccessD shareholders :-) > > On 12/24/2019 8:56 AM, Gustav Brock via AccessD wrote: > > Merry Christmas to all - the handful still hanging and our faithful > lurkers. > > > > /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 > -- My Tuesday and Thursday blog articles are here >> sailingtopurgatory.com Web development is a pleasure, producing personable websites | Google Local Guide Bene agere et laetari. (To do good cheerfully.) From stuart at lexacorp.com.pg Tue Dec 24 15:57:30 2019 From: stuart at lexacorp.com.pg (Stuart McLachlan) Date: Wed, 25 Dec 2019 07:57:30 +1000 Subject: [AccessD] Help on entering data -- when to do it? In-Reply-To: References: , <5E015A6F.11243.A00CDCD@stuart.lexacorp.com.pg>, Message-ID: <5E0289CA.29362.EA1C934@stuart.lexacorp.com.pg> Don't do that! You are changing the "creator id" of the the record every time you view it. Either set the ID as the Default value for a new record (my preferred solution) or set it in the Before_Insert event. Once it is stored when a new record is created, you shouldn't be touching it. On 24 Dec 2019 at 14:27, John W. Clark wrote: > I then call it in the Form_Current and Form_Load events. This seems to > work in both (in regards to presenting it) and I'm not sure which to > go with yet. I use the following code behind the events: > txtNetID.Value = Environ("Username") > From stuart at lexacorp.com.pg Tue Dec 24 16:08:13 2019 From: stuart at lexacorp.com.pg (Stuart McLachlan) Date: Wed, 25 Dec 2019 08:08:13 +1000 Subject: [AccessD] OT: Enjoy In-Reply-To: References: Message-ID: <5E028C4D.17920.EAB971D@stuart.lexacorp.com.pg> "Hepi Krismas long olgeta" from sunny Port Moresby. I'm on Search & Rescue standby today and there will probably be quite few boats out, so will probably spend a fair bit of time wirh one ear on the radio sitting on a boat parked beside the white coral sand of a small island with a lunch of assorted cold cuts etc. Life's tough in the tropics. Only draw back will be no adult drinks until this evening. :) -- Stuart On 24 Dec 2019 at 13:56, Gustav Brock via AccessD wrote: > Merry Christmas to all - the handful still hanging and our faithful > lurkers. > > /gustav > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > From mwp.reid at qub.ac.uk Tue Dec 24 16:35:31 2019 From: mwp.reid at qub.ac.uk (Martin Reid) Date: Tue, 24 Dec 2019 22:35:31 +0000 Subject: [AccessD] OT: Enjoy In-Reply-To: <5E028C4D.17920.EAB971D@stuart.lexacorp.com.pg> References: , <5E028C4D.17920.EAB971D@stuart.lexacorp.com.pg> Message-ID: Lovely. Hopefully will be peaceful and you can simply enjoy Martin Get Outlook for Android ________________________________ From: AccessD on behalf of Stuart McLachlan Sent: Tuesday, December 24, 2019 10:08:13 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] OT: Enjoy This message is from an external sender. Please take care when responding, clicking links or opening attachments. "Hepi Krismas long olgeta" from sunny Port Moresby. I'm on Search & Rescue standby today and there will probably be quite few boats out, so will probably spend a fair bit of time wirh one ear on the radio sitting on a boat parked beside the white coral sand of a small island with a lunch of assorted cold cuts etc. Life's tough in the tropics. Only draw back will be no adult drinks until this evening. :) -- Stuart On 24 Dec 2019 at 13:56, Gustav Brock via AccessD wrote: > Merry Christmas to all - the handful still hanging and our faithful > lurkers. > > /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 df.waters at outlook.com Tue Dec 24 16:38:16 2019 From: df.waters at outlook.com (Daniel Waters) Date: Tue, 24 Dec 2019 22:38:16 +0000 Subject: [AccessD] OT: Enjoy In-Reply-To: <5E028C4D.17920.EAB971D@stuart.lexacorp.com.pg> References: <5E028C4D.17920.EAB971D@stuart.lexacorp.com.pg> Message-ID: Well - straight Egg Nog still tastes like Christmas! -----Original Message----- From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Stuart McLachlan Sent: December 24, 2019 16:08 To: Access Developers discussion and problem solving Subject: Re: [AccessD] OT: Enjoy "Hepi Krismas long olgeta" from sunny Port Moresby. I'm on Search & Rescue standby today and there will probably be quite few boats out, so will probably spend a fair bit of time wirh one ear on the radio sitting on a boat parked beside the white coral sand of a small island with a lunch of assorted cold cuts etc. Life's tough in the tropics. Only draw back will be no adult drinks until this evening. :) -- Stuart On 24 Dec 2019 at 13:56, Gustav Brock via AccessD wrote: > Merry Christmas to all - the handful still hanging and our faithful > lurkers. > > /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 steve at datamanagementsolutions.biz Tue Dec 24 20:20:04 2019 From: steve at datamanagementsolutions.biz (Steve Schapel) Date: Wed, 25 Dec 2019 02:20:04 +0000 Subject: [AccessD] OT: Enjoy In-Reply-To: References: Message-ID: Best wishes to all, and thanks, from New Zealand. Regards Steve (another lurker) ------ Original Message ------ From: "Gustav Brock via AccessD" To: "Access Developers discussion and problem solving" Cc: "Gustav Brock" Sent: 25/12/2019 2:56:29 AM Subject: [AccessD] OT: Enjoy >Merry Christmas to all - the handful still hanging and our faithful lurkers. > >/gustav >-- >AccessD mailing list >AccessD at databaseadvisors.com >http://databaseadvisors.com/mailman/listinfo/accessd >Website: http://www.databaseadvisors.com From RRANTHON at sentara.com Wed Dec 25 05:01:31 2019 From: RRANTHON at sentara.com (RANDALL R ANTHONY) Date: Wed, 25 Dec 2019 11:01:31 +0000 Subject: [AccessD] OT: Enjoy In-Reply-To: References: Message-ID: Merry Christmas from VA Beach! -----Original Message----- From: AccessD On Behalf Of Steve Schapel Sent: Tuesday, December 24, 2019 9:20 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] OT: Enjoy Notice: This email originated outside the Sentara Healthcare network. Beware of links and attachments. Forward suspicious emails to spam_team at sentara.com. Best wishes to all, and thanks, from New Zealand. Regards Steve (another lurker) ------ Original Message ------ From: "Gustav Brock via AccessD" To: "Access Developers discussion and problem solving" Cc: "Gustav Brock" Sent: 25/12/2019 2:56:29 AM Subject: [AccessD] OT: Enjoy >Merry Christmas to all - the handful still hanging and our faithful lurkers. > >/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 davidmcafee at gmail.com Thu Dec 26 00:53:37 2019 From: davidmcafee at gmail.com (David McAfee) Date: Wed, 25 Dec 2019 22:53:37 -0800 Subject: [AccessD] OT: Enjoy In-Reply-To: References: Message-ID: Merry Christmas! On Wed, Dec 25, 2019, 3:10 AM RANDALL R ANTHONY via AccessD < accessd at databaseadvisors.com> wrote: > Merry Christmas from VA Beach! > > -----Original Message----- > From: AccessD On Behalf Of Steve > Schapel > Sent: Tuesday, December 24, 2019 9:20 PM > To: Access Developers discussion and problem solving < > accessd at databaseadvisors.com> > Subject: Re: [AccessD] OT: Enjoy > > Notice: This email originated outside the Sentara Healthcare network. > Beware of links and attachments. Forward suspicious emails to > spam_team at sentara.com. > > > Best wishes to all, and thanks, from New Zealand. > > Regards > Steve (another lurker) > > > ------ Original Message ------ > From: "Gustav Brock via AccessD" > To: "Access Developers discussion and problem solving" > > Cc: "Gustav Brock" > Sent: 25/12/2019 2:56:29 AM > Subject: [AccessD] OT: Enjoy > > >Merry Christmas to all - the handful still hanging and our faithful > lurkers. > > > >/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 pcs.accessd at gmail.com Mon Dec 30 20:39:35 2019 From: pcs.accessd at gmail.com (Borge Hansen) Date: Tue, 31 Dec 2019 10:39:35 +0800 Subject: [AccessD] OT: Enjoy In-Reply-To: References: Message-ID: ... and from a sunny but very cold Shanghai on this last day of 2019 a happy new year to you all and best wishes for a better 2020. /borge Faithful lurker and avid miner of the many gold nuggets found here over the years. On Thu, 26 Dec 2019 at 2:54 pm, David McAfee wrote: > Merry Christmas! > > On Wed, Dec 25, 2019, 3:10 AM RANDALL R ANTHONY via AccessD < > accessd at databaseadvisors.com> wrote: > > > Merry Christmas from VA Beach! > > > > -----Original Message----- > > From: AccessD On Behalf Of Steve > > Schapel > > Sent: Tuesday, December 24, 2019 9:20 PM > > To: Access Developers discussion and problem solving < > > accessd at databaseadvisors.com> > > Subject: Re: [AccessD] OT: Enjoy > > > > Notice: This email originated outside the Sentara Healthcare network. > > Beware of links and attachments. Forward suspicious emails to > > spam_team at sentara.com. > > > > > > Best wishes to all, and thanks, from New Zealand. > > > > Regards > > Steve (another lurker) > > > > > > ------ Original Message ------ > > From: "Gustav Brock via AccessD" > > To: "Access Developers discussion and problem solving" > > > > Cc: "Gustav Brock" > > Sent: 25/12/2019 2:56:29 AM > > Subject: [AccessD] OT: Enjoy > > > > >Merry Christmas to all - the handful still hanging and our faithful > > lurkers. > > > > > >/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 >