From dbdoug at gmail.com Fri Jul 1 00:47:36 2011 From: dbdoug at gmail.com (Doug Steele) Date: Thu, 30 Jun 2011 22:47:36 -0700 Subject: [AccessD] OT - FW: New computer In-Reply-To: References: <4DFAA63E.50506@colbyconsulting.com> <23775347AAAD47329496777628D6A927@HAL9005> <4DFAD4F0.9090504@colbyconsulting.com> <4DFB4DB9.9050804@colbyconsulting.com> <661A04F55F074D77BC065B3718B90850@HAL9005> <4DFB6633.3020703@colbyconsulting.com> Message-ID: I think so, but I haven't done any real work with the usb setup. I'll report back when I've had a chance to do a couple of days of testing. I have to totally reorganize my workspace to do this, so it may be a while.... Doug On Thu, Jun 30, 2011 at 8:34 PM, Jim Lawrence wrote: > Ha ha, one is just not good enough anymore. ;-) > ...but do you find the USB video cards basically a good deal? > > Jim > > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Doug Steele > Sent: Thursday, June 30, 2011 10:28 AM > To: Access Developers discussion and problem solving > Subject: Re: [AccessD] OT - FW: New computer > > I just received a StarTech USB2VGAE2 usb/video adapter. ?I got a > 'refurbished' one for CAD$69 (plus a rip-off $26 in shipping!). ?It > works pretty well; I'm using it to connect 2 large monitors to my > laptop. ?The USB adapter is connected to a 19" widescreen monitor and > runs at 1680x1050. ?The video is definitely slower on the USB > connected monitor - when you move a window, for example, the edges get > 'jaggies'. ?But the speed is quite acceptable for the kind of work I > do - I'm not going to be playing games on it. > > The only problem I've had is that the driver gets a bit confused > sometimes when you change the graphics setup - like the monitor > positions, or which monitor is the master. ?I discovered that I have > to disable the USB monitor, set the laptop and connected monitor, then > re-enable the USB monitor and set it up. ?Not a big deal. > > It's kind of fun to have three screens running at once - makes me feel > ever so productive. ?An illusion, of course. > > Doug > > On Sun, Jun 19, 2011 at 8:00 AM, Jim Lawrence wrote: >> Hi Doug: >> >> I was just the installer but the screens worked fast enough for doing POS >> work. I doubt whether this configuration will ever replace a DVI > connection >> directly to a high-performance video card but they are quite sufficient > for >> basic office work and the ease of installation is their plus. >> >> Jim >> >> >> >> -----Original Message----- >> From: accessd-bounces at databaseadvisors.com >> [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Doug Steele >> Sent: Friday, June 17, 2011 11:59 AM >> To: Access Developers discussion and problem solving >> Subject: Re: [AccessD] OT - FW: New computer >> >> Do you have any experience or information on these? ?I'd like to run 2 >> big screens off a laptop, but I saw commentary on the Internet that >> they can be so slow as to be useless. >> >> Thanks, >> Doug >> >> On Fri, Jun 17, 2011 at 10:29 AM, Jim Lawrence wrote: >>> Just a note; There are now a little video-chipset block that can just be >>> inserted into any USB slot and can connect another monitor to a computer. >>> >>> See here: http://www.startech.com/product-list/usb-vga-video-adapters >>> >>> The price runs from 60 to 150 per monitor. You can even use them with POE >> to >>> run remote video and camera feeds. >> -- >> 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 BradM at blackforestltd.com Fri Jul 1 13:26:32 2011 From: BradM at blackforestltd.com (Brad Marks) Date: Fri, 1 Jul 2011 13:26:32 -0500 Subject: [AccessD] Pulling Data from Excel into Access with "Automation" References: <201107010022.p610MKvQ022864@databaseadvisors.com> Message-ID: Steve, William, Darryl, Thanks for the help with my questions. The advice that you provided has helped me move forward. Below is a stripped down snippet of the Access 2007 VBA code that I put together based on the advice you provided. I am going to post it here in case some other "newbie" is looking for the very "basic basics" and I am posting it here to see if anyone sees a problem with the direction that I am heading. Thanks again, Brad PS. I also ordered a book on this subject. '~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Sub Pull_Data_From_Excel_Into_Access() Dim XLApp As Excel.Application Dim XLWorkbook As Excel.Workbook Dim XLSheet As Excel.Worksheet Dim Str_Value_in_Cell As Variant Set XLApp = CreateObject("Excel.Application") XLApp.Workbooks.Open ("C:\Book1.xlsx") XLApp.Visible = True ''' to see Spreadsheet Set XLWorkbook = XLApp.Workbooks(1) Set XLSheet = XLWorkbook.Sheets(1) Str_Value_in_Cell = XLSheet.Cells(1, 1).Value MsgBox Str_Value_in_Cell End Sub '~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ From vbacreations at gmail.com Fri Jul 1 15:46:19 2011 From: vbacreations at gmail.com (William Benson (VBACreations.Com)) Date: Fri, 1 Jul 2011 16:46:19 -0400 Subject: [AccessD] Pulling Data from Excel into Access with "Automation" In-Reply-To: References: <201107010022.p610MKvQ022864@databaseadvisors.com> Message-ID: <001a01cc382f$eeb501c0$cc1f0540$@gmail.com> Nice going Brad, I suggest Set XLWorkbook = XLApp.Activeworkbook, rather than Workbooks(1) in case there is a Personal.xls/m workbook opening with every instance of the user's Excel. But better still is Test the opening of the workbook, in case the path is wrong or the network won't give it up Set XLWorkbook = XLApp.Workbooks.Open ("C:\Book1.xlsx") If Not XLWorkbook is Nothing 'Go on End if And now you get the fun of dealing with Value and Value2 as properties as well as Text property. More fun for dates than anything else. Consider too the GetObject (,"Excel.Application") ... which is written respectably into a function like Set XL = GetObject(, "Excel.Application") If XL Is Nothing Then Set XL = CreateObject("Excel.Application") End If Last, you might need App.Activate from time to time to bring the application you want into focus... AppActivate "Microsoft Access" Or AppActivate "Microsoft Excel" I am not sure if it really helps or not, but there is often an annoying flicker when I automate, and I don't recall if XL>VISIBLE = TRUE forces excel into the foreground of your windows, or just makes it appear should it happen to have focus. -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Brad Marks Sent: Friday, July 01, 2011 2:27 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Pulling Data from Excel into Access with "Automation" Steve, William, Darryl, Thanks for the help with my questions. The advice that you provided has helped me move forward. Below is a stripped down snippet of the Access 2007 VBA code that I put together based on the advice you provided. I am going to post it here in case some other "newbie" is looking for the very "basic basics" and I am posting it here to see if anyone sees a problem with the direction that I am heading. Thanks again, Brad PS. I also ordered a book on this subject. '~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Sub Pull_Data_From_Excel_Into_Access() Dim XLApp As Excel.Application Dim XLWorkbook As Excel.Workbook Dim XLSheet As Excel.Worksheet Dim Str_Value_in_Cell As Variant Set XLApp = CreateObject("Excel.Application") Set XLSheet = XLWorkbook.Sheets(1) Str_Value_in_Cell = XLSheet.Cells(1, 1).Value MsgBox Str_Value_in_Cell End Sub '~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From BradM at blackforestltd.com Fri Jul 1 15:49:41 2011 From: BradM at blackforestltd.com (Brad Marks) Date: Fri, 1 Jul 2011 15:49:41 -0500 Subject: [AccessD] Pulling Data from Excel into Access with "Automation" References: <201107010022.p610MKvQ022864@databaseadvisors.com> <001a01cc382f$eeb501c0$cc1f0540$@gmail.com> Message-ID: William, Thanks for the additional advice, I appreciate it. I am starting to have some fun with all of this. I can see many opportunities as the small firm that I work for uses a ton of Excel spreadsheets. Brad -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of William Benson (VBACreations.Com) Sent: Friday, July 01, 2011 3:46 PM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Pulling Data from Excel into Access with "Automation" Nice going Brad, I suggest Set XLWorkbook = XLApp.Activeworkbook, rather than Workbooks(1) in case there is a Personal.xls/m workbook opening with every instance of the user's Excel. But better still is Test the opening of the workbook, in case the path is wrong or the network won't give it up Set XLWorkbook = XLApp.Workbooks.Open ("C:\Book1.xlsx") If Not XLWorkbook is Nothing 'Go on End if And now you get the fun of dealing with Value and Value2 as properties as well as Text property. More fun for dates than anything else. Consider too the GetObject (,"Excel.Application") ... which is written respectably into a function like Set XL = GetObject(, "Excel.Application") If XL Is Nothing Then Set XL = CreateObject("Excel.Application") End If Last, you might need App.Activate from time to time to bring the application you want into focus... AppActivate "Microsoft Access" Or AppActivate "Microsoft Excel" I am not sure if it really helps or not, but there is often an annoying flicker when I automate, and I don't recall if XL>VISIBLE = TRUE forces excel into the foreground of your windows, or just makes it appear should it happen to have focus. -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Brad Marks Sent: Friday, July 01, 2011 2:27 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Pulling Data from Excel into Access with "Automation" Steve, William, Darryl, Thanks for the help with my questions. The advice that you provided has helped me move forward. Below is a stripped down snippet of the Access 2007 VBA code that I put together based on the advice you provided. I am going to post it here in case some other "newbie" is looking for the very "basic basics" and I am posting it here to see if anyone sees a problem with the direction that I am heading. Thanks again, Brad PS. I also ordered a book on this subject. '~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Sub Pull_Data_From_Excel_Into_Access() Dim XLApp As Excel.Application Dim XLWorkbook As Excel.Workbook Dim XLSheet As Excel.Worksheet Dim Str_Value_in_Cell As Variant Set XLApp = CreateObject("Excel.Application") Set XLSheet = XLWorkbook.Sheets(1) Str_Value_in_Cell = XLSheet.Cells(1, 1).Value MsgBox Str_Value_in_Cell End Sub '~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -- 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 has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. From stuart at lexacorp.com.pg Fri Jul 1 16:57:41 2011 From: stuart at lexacorp.com.pg (Stuart McLachlan) Date: Sat, 02 Jul 2011 07:57:41 +1000 Subject: [AccessD] Pulling Data from Excel into Access with "Automation" In-Reply-To: References: <201107010022.p610MKvQ022864@databaseadvisors.com>, Message-ID: <4E0E42D5.32026.D4817AA@stuart.lexacorp.com.pg> ONly change I'd make is: Dim Str_Value_in_Cell As Variant I'd make that Var_Value_in_Cell :-) -- Stuart On 1 Jul 2011 at 13:26, Brad Marks wrote: > Steve, William, Darryl, > > Thanks for the help with my questions. > > The advice that you provided has helped me move forward. > > Below is a stripped down snippet of the Access 2007 VBA code that I > put together based on the advice you provided. > > I am going to post it here in case some other "newbie" is looking for > the very "basic basics" and I am posting it here to see if anyone sees > a problem with the direction that I am heading. > > Thanks again, > Brad > > PS. I also ordered a book on this subject. > > '~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > Sub Pull_Data_From_Excel_Into_Access() > > Dim XLApp As Excel.Application > > Dim XLWorkbook As Excel.Workbook > > Dim XLSheet As Excel.Worksheet > > Dim Str_Value_in_Cell As Variant > > Set XLApp = CreateObject("Excel.Application") > > XLApp.Workbooks.Open ("C:\Book1.xlsx") > > XLApp.Visible = True ''' to see Spreadsheet > > Set XLWorkbook = XLApp.Workbooks(1) > > Set XLSheet = XLWorkbook.Sheets(1) > > Str_Value_in_Cell = XLSheet.Cells(1, 1).Value > > MsgBox Str_Value_in_Cell > > End Sub > > '~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > From BradM at blackforestltd.com Fri Jul 1 19:29:08 2011 From: BradM at blackforestltd.com (Brad Marks) Date: Fri, 1 Jul 2011 19:29:08 -0500 Subject: [AccessD] Pulling Data from Excel into Access with "Automation" References: <201107010022.p610MKvQ022864@databaseadvisors.com>, <4E0E42D5.32026.D4817AA@stuart.lexacorp.com.pg> Message-ID: Stuart, Yes, you are right. After three decades of COBOL, I am still adjusting to "working storage" prefixes. :-) Brad -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Stuart McLachlan Sent: Friday, July 01, 2011 4:58 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Pulling Data from Excel into Access with "Automation" ONly change I'd make is: Dim Str_Value_in_Cell As Variant I'd make that Var_Value_in_Cell :-) -- Stuart On 1 Jul 2011 at 13:26, Brad Marks wrote: > Steve, William, Darryl, > > Thanks for the help with my questions. > > The advice that you provided has helped me move forward. > > Below is a stripped down snippet of the Access 2007 VBA code that I > put together based on the advice you provided. > > I am going to post it here in case some other "newbie" is looking for > the very "basic basics" and I am posting it here to see if anyone sees > a problem with the direction that I am heading. > > Thanks again, > Brad > > PS. I also ordered a book on this subject. > > '~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > Sub Pull_Data_From_Excel_Into_Access() > > Dim XLApp As Excel.Application > > Dim XLWorkbook As Excel.Workbook > > Dim XLSheet As Excel.Worksheet > > Dim Str_Value_in_Cell As Variant > > Set XLApp = CreateObject("Excel.Application") > > XLApp.Workbooks.Open ("C:\Book1.xlsx") > > XLApp.Visible = True ''' to see Spreadsheet > > Set XLWorkbook = XLApp.Workbooks(1) > > Set XLSheet = XLWorkbook.Sheets(1) > > Str_Value_in_Cell = XLSheet.Cells(1, 1).Value > > MsgBox Str_Value_in_Cell > > End Sub > > '~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > > -- > 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 has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. From vbacreations at gmail.com Fri Jul 1 20:58:06 2011 From: vbacreations at gmail.com (William Benson (VBACreations.Com)) Date: Fri, 1 Jul 2011 21:58:06 -0400 Subject: [AccessD] Pulling Data from Excel into Access with "Automation" In-Reply-To: References: <201107010022.p610MKvQ022864@databaseadvisors.com>, <4E0E42D5.32026.D4817AA@stuart.lexacorp.com.pg> Message-ID: <001f01cc385b$7d651e20$782f5a60$@gmail.com> OK, I am leaving the subject line the same, because this was (and mostly is) an awesome automation exercise, which in fact I will send to Brad after I perfect it. I have built a tool for examining all fields and the occurrence rate of distinct values those fields have, within Excel data. Chiefly, from within all worksheets among open workbooks. There is an option to store this info for easy reference later, or to clear it out and/or refresh it later. One thing I like to use it for is examining data when there are way too many excel rows to look at cleanly and the number of distinct items exceeds what Excel will show in the autofilter drop down. I also plan to use this to build Access tables on the fly from the data in a worksheet, and then save specific sheets to CSV, perhaps building import specs on the fly using Duane Hookom's identification of the required tables for maintaining import specs. But I have an annoying glitch which I have solved through a UDF workaround but I feel I should not have to do that. Maybe someone can read through this for the likely issue. Or at least reassure me I have no alternative but the UDF. Which is fast enough, I suppose - but I would think that the UDF will be calculated with every row in the result, whereas the parameters I wanted to use would have been calculated by Access only once then used for every row). Basic structure is: 4 controls: Lst0 shows open workbooks Lst1 shows worksheets which have data in row 1, from the workbook chosen in Lst0 LstFields shows all the column headers on worksheet = Lst1 LstValues shows all distinct values in lstField ... and the number of occurrences. I store the info in a local table and refresh when desired (workbooks have to be open in order To populate the listboxes. My Problem: When creating SQL for the rowsource for lstValues, I tried to reference listbox columns - but was told by Access that was a syntax error. QUESTION! (I don't know if something like this is supposed to work or not: ws = forms!frmCreateTableFromExcel!lst1.column(0, lst1.listindex) - but it don't. I think maybe because listindex can be -1 and there's no value and that is a problem. Here is the complete rowsource SQL SELECT WB, WS, Fld, [Values], Items FROM Tbl_Field_Values WHERE WB = forms!frmCreateTableFromExcel!lst0 and ws = forms!frmCreateTableFromExcel!lst1 and fld = forms!frmCreateTableFromExcel!lstfields So I switched to ws = forms!frmCreateTableFromExcel!lst1.column(0, lst1.listindex). That brought good results except that for some reason I don't quite understand, the value property of the lstFields listbox was not adjusting when a statement like lstFields.Selected(i) = was used to select a different value in the listbox. Sure enough the _AfterUpdate event would fire, but a test of lstFields.Value would show the same value every time, regardless. That seems evil and wrong to me! ==snippet - lstFields.Value didn't change when each row was made the selection. For i = 0 To lstFields.ListCount - 1 lstFields.Selected(i) = True 'no impact on .Value apparently. debug.print lstFields Next K, how I solved this, now tell me if I am craze... I used a UDF in the rowsource, which called the values out of those columns -- which the query wouldn't let me refer to by themselves: my new RowSource is: SELECT WB, WS, Fld, [Values], Items FROM Tbl_Field_Values WHERE WB = ValuefromList("WB") and ws = ValuefromList("WS") and fld = ValuefromList("Fields") 'Here's the function Function ValuefromList(str As String) As String Dim frm As Form Dim strval As String On Error Resume Next Set frm = Screen.ActiveForm If Not frm Is Nothing Then Dim c As Control Set c = frm.Controls("Lst" & str) If Not c Is Nothing Then If c.ListIndex >= 0 Then strval = c.Column(0, c.ListIndex) End If End If End If ValuefromList = strval End Function From vbacreations at gmail.com Fri Jul 1 21:04:23 2011 From: vbacreations at gmail.com (William Benson (VBACreations.Com)) Date: Fri, 1 Jul 2011 22:04:23 -0400 Subject: [AccessD] Pulling Data from Excel into Access with "Automation" References: <201107010022.p610MKvQ022864@databaseadvisors.com>, <4E0E42D5.32026.D4817AA@stuart.lexacorp.com.pg> Message-ID: <002001cc385c$5de1fd60$19a5f820$@gmail.com> There was a typo in the below. Where I said So I switched to ws = forms!frmCreateTableFromExcel!lst1.column(0, lst1.listindex) I meant to say So I switched FROM ws = forms!frmCreateTableFromExcel!lst1.column(0, lst1.listindex) Sorry about that. -----Original Message----- From: William Benson (VBACreations.Com) [mailto:vbacreations at gmail.com] Sent: Friday, July 01, 2011 9:58 PM To: Access Developers discussion and problem solving Subject: RE: [AccessD] Pulling Data from Excel into Access with "Automation" OK, I am leaving the subject line the same, because this was (and mostly is) an awesome automation exercise, which in fact I will send to Brad after I perfect it. I have built a tool for examining all fields and the occurrence rate of distinct values those fields have, within Excel data. Chiefly, from within all worksheets among open workbooks. There is an option to store this info for easy reference later, or to clear it out and/or refresh it later. One thing I like to use it for is examining data when there are way too many excel rows to look at cleanly and the number of distinct items exceeds what Excel will show in the autofilter drop down. I also plan to use this to build Access tables on the fly from the data in a worksheet, and then save specific sheets to CSV, perhaps building import specs on the fly using Duane Hookom's identification of the required tables for maintaining import specs. But I have an annoying glitch which I have solved through a UDF workaround but I feel I should not have to do that. Maybe someone can read through this for the likely issue. Or at least reassure me I have no alternative but the UDF. Which is fast enough, I suppose - but I would think that the UDF will be calculated with every row in the result, whereas the parameters I wanted to use would have been calculated by Access only once then used for every row). Basic structure is: 4 controls: Lst0 shows open workbooks Lst1 shows worksheets which have data in row 1, from the workbook chosen in Lst0 LstFields shows all the column headers on worksheet = Lst1 LstValues shows all distinct values in lstField ... and the number of occurrences. I store the info in a local table and refresh when desired (workbooks have to be open in order To populate the listboxes. My Problem: When creating SQL for the rowsource for lstValues, I tried to reference listbox columns - but was told by Access that was a syntax error. QUESTION! (I don't know if something like this is supposed to work or not: ws = forms!frmCreateTableFromExcel!lst1.column(0, lst1.listindex) - but it don't. I think maybe because listindex can be -1 and there's no value and that is a problem. Here is the complete rowsource SQL SELECT WB, WS, Fld, [Values], Items FROM Tbl_Field_Values WHERE WB = forms!frmCreateTableFromExcel!lst0 and ws = forms!frmCreateTableFromExcel!lst1 and fld = forms!frmCreateTableFromExcel!lstfields So I switched to ws = forms!frmCreateTableFromExcel!lst1.column(0, lst1.listindex). That brought good results except that for some reason I don't quite understand, the value property of the lstFields listbox was not adjusting when a statement like lstFields.Selected(i) = was used to select a different value in the listbox. Sure enough the _AfterUpdate event would fire, but a test of lstFields.Value would show the same value every time, regardless. That seems evil and wrong to me! ==snippet - lstFields.Value didn't change when each row was made the selection. For i = 0 To lstFields.ListCount - 1 lstFields.Selected(i) = True 'no impact on .Value apparently. debug.print lstFields Next K, how I solved this, now tell me if I am craze... I used a UDF in the rowsource, which called the values out of those columns -- which the query wouldn't let me refer to by themselves: my new RowSource is: SELECT WB, WS, Fld, [Values], Items FROM Tbl_Field_Values WHERE WB = ValuefromList("WB") and ws = ValuefromList("WS") and fld = ValuefromList("Fields") 'Here's the function Function ValuefromList(str As String) As String Dim frm As Form Dim strval As String On Error Resume Next Set frm = Screen.ActiveForm If Not frm Is Nothing Then Dim c As Control Set c = frm.Controls("Lst" & str) If Not c Is Nothing Then If c.ListIndex >= 0 Then strval = c.Column(0, c.ListIndex) End If End If End If ValuefromList = strval End Function From rockysmolin at bchacc.com Sat Jul 2 09:43:14 2011 From: rockysmolin at bchacc.com (Rocky Smolin) Date: Sat, 2 Jul 2011 07:43:14 -0700 Subject: [AccessD] Need a new printer? Cheap? Message-ID: <4AC76807705E4A688411F71D46A6C3FE@HAL9007> http://www.walmart.com/ip/Canon-PIXMA-MP250-Photo-All-In-One-Inkjet-Printer- Copier-Scanner-Value-Bundle/12534987?sourceid=06345287580503509743 &wmlspartner=tWsI2R5jHvk but god knows what the cartridges will cost. Rocky From marksimms at verizon.net Sat Jul 2 09:51:33 2011 From: marksimms at verizon.net (Mark Simms) Date: Sat, 02 Jul 2011 10:51:33 -0400 Subject: [AccessD] Pulling Data from Excel into Access with "Automation" In-Reply-To: <002001cc385c$5de1fd60$19a5f820$@gmail.com> References: <201107010022.p610MKvQ022864@databaseadvisors.com>, <4E0E42D5.32026.D4817AA@stuart.lexacorp.com.pg> <002001cc385c$5de1fd60$19a5f820$@gmail.com> Message-ID: <003b01cc38c7$89934840$9cb9d8c0$@net> Just reverse the Column property arguments: lst1.ListIndex should be first. > -----Original Message----- > From: accessd-bounces at databaseadvisors.com [mailto:accessd- > bounces at databaseadvisors.com] On Behalf Of William Benson > (VBACreations.Com) > Sent: Friday, July 01, 2011 10:04 PM > To: 'Access Developers discussion and problem solving' > Subject: Re: [AccessD] Pulling Data from Excel into Access with > "Automation" > > There was a typo in the below. Where I said > > So I switched to ws = > forms!frmCreateTableFromExcel!lst1.column(0, lst1.listindex) > > I meant to say > > So I switched FROM ws = forms!frmCreateTableFromExcel!lst1.column(0, > lst1.listindex) > > Sorry about that. > > > -----Original Message----- > From: William Benson (VBACreations.Com) [mailto:vbacreations at gmail.com] > Sent: Friday, July 01, 2011 9:58 PM > To: Access Developers discussion and problem solving > Subject: RE: [AccessD] Pulling Data from Excel into Access with > "Automation" > > OK, I am leaving the subject line the same, because this was (and > mostly is) > an awesome automation exercise, which in fact I will send to Brad after > I > perfect it. I have built a tool for examining all fields and the > occurrence > rate of distinct values those fields have, within Excel data. Chiefly, > from > within all worksheets among open workbooks. There is an option to store > this > info for easy reference later, or to clear it out and/or refresh it > later. > > One thing I like to use it for is examining data when there are way too > many > excel rows to look at cleanly and the number of distinct items exceeds > what > Excel will show in the autofilter drop down. I also plan to use this to > build Access tables on the fly from the data in a worksheet, and then > save > specific sheets to CSV, perhaps building import specs on the fly using > Duane > Hookom's identification of the required tables for maintaining import > specs. > But I have an annoying glitch which I have solved through a UDF > workaround > but I feel I should not have to do that. Maybe someone can read through > this > for the likely issue. Or at least reassure me I have no alternative but > the > UDF. Which is fast enough, I suppose - but I would think that the UDF > will > be calculated with every row in the result, whereas the parameters I > wanted > to use would have been calculated by Access only once then used for > every > row). > > Basic structure is: > > 4 controls: > Lst0 shows open workbooks > Lst1 shows worksheets which have data in row 1, from the workbook > chosen > in Lst0 > LstFields shows all the column headers on worksheet = Lst1 > LstValues shows all distinct values in lstField ... and the number > of > occurrences. > I store the info in a local table and refresh when desired > (workbooks > have to be open in order > To populate the listboxes. > > My Problem: > When creating SQL for the rowsource for lstValues, I tried to reference > listbox columns - but was told by Access that was a syntax error. > > QUESTION! > (I don't know if something like this is supposed to work or not: > ws = forms!frmCreateTableFromExcel!lst1.column(0, > lst1.listindex) - > but it don't. I think maybe because listindex can be -1 and there's no > value > and that is a problem. > > Here is the complete rowsource SQL > SELECT WB, WS, Fld, [Values], Items FROM Tbl_Field_Values > WHERE WB = forms!frmCreateTableFromExcel!lst0 > and ws = forms!frmCreateTableFromExcel!lst1 > and fld = forms!frmCreateTableFromExcel!lstfields > > > So I switched to ws = forms!frmCreateTableFromExcel!lst1.column(0, > lst1.listindex). That brought good results except that for some reason > I > don't quite understand, the value property of the lstFields listbox was > not > adjusting when a statement like lstFields.Selected(i) = was used to > select a > different value in the listbox. Sure enough the _AfterUpdate event > would > fire, but a test of lstFields.Value would show the same value every > time, > regardless. That seems evil and wrong to me! > ==snippet - lstFields.Value didn't change when each row was made > the > selection. > For i = 0 To lstFields.ListCount - 1 > lstFields.Selected(i) = True 'no impact on .Value > apparently. > debug.print lstFields > Next > > K, how I solved this, now tell me if I am craze... I used a UDF in the > rowsource, which called the values out of those columns -- which the > query > wouldn't let me refer to by themselves: my new RowSource is: > > SELECT WB, WS, Fld, [Values], Items FROM Tbl_Field_Values > WHERE WB = ValuefromList("WB") > and ws = ValuefromList("WS") and > fld = ValuefromList("Fields") > > 'Here's the function > Function ValuefromList(str As String) As String Dim frm As Form Dim > strval > As String On Error Resume Next Set frm = Screen.ActiveForm If Not frm > Is > Nothing Then > Dim c As Control > Set c = frm.Controls("Lst" & str) > If Not c Is Nothing Then > If c.ListIndex >= 0 Then > strval = c.Column(0, c.ListIndex) > End If > End If > End If > ValuefromList = strval > > End Function > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com From fuller.artful at gmail.com Sat Jul 2 12:06:08 2011 From: fuller.artful at gmail.com (Arthur Fuller) Date: Sat, 2 Jul 2011 13:06:08 -0400 Subject: [AccessD] Walk the DB Using ADO Message-ID: I know that I've written this code before, but due to a plethora of backup CDs and my habit of pruning what is not currently necessary from the current situation(s), I can't find the relevant code. And besides, I'm currently semi-retired, and working in hobbyist most not billable mode. Here's what I need, in ADO format if possible: For each t in CurrentDB( Tables ) For each f in t.fields For each a in f.Attributes ' could be Properties not Attributes Debug.Print a.Name, a.Value Next Next Next TIA, Arthur P.S. For years and years and years, I have used Rick Fisher's FindAndReplace, but now it's failing on me due to (I think) the fact that I'm running a 64-bit Windows, which doesn't like what he offers to install. In my retirement mode, I cannot afford to purchase more software. Maybe I could run a Windows 32-bit version of everything, then run F&R, then do what I need to do, then import the results back into 64-bit. Yuck. From jwcolby at colbyconsulting.com Sat Jul 2 12:29:27 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Sat, 02 Jul 2011 13:29:27 -0400 Subject: [AccessD] SQL Server - SSD / Rotating media - Side by side test results Message-ID: <4E0F5577.9060206@colbyconsulting.com> This morning I set out to do a little bit of real world testing to see what my SSD investment buys me. The following are some results. BTW if a SQL Server guru wants to actually gain remote access and run tests on my system I would welcome that. I am obviously not very talented as a SQL Server DBA and so a real DBA who has an interest is welcomed to tune and test. Anyway, I have a pair of databases that I will be testing with. One is my infamous "database from hell" called HSID, containing 51 million records with about 600 fields. The other is my HSIDAllAdults containing about 65 million Name and address fields. HSIDAllAdults is child to HSID, IOW it has a foreign key which contains the PK of HSID. Both databases have a clustered index on their autonumber PK. So... I have both of these databases on a four SSD RAID 0. I backed them up last night and restored them to the same name + _Rotatingmedia on my RAID6 volumes. So I have identical databases on a 4 SSD Raid 0 and a 6 disk RAID 6. I am now doing some comparative A/B runs of rather standard queries - similar to things I do routinely. I backed up the two databases last night just before upgrading the server. I restored both tha HSID and HSIDAllAdults this AM to the same rotating media location I normally hold the databases. I did not defrag the rotating media before doing the restore. I include the counts so that we can be assured that the actual data is identical between the SSD and rotating media DBs. HSIDAllAdults - has a pair of cover indexes each of which includes Address valid DBCC DROPCLEANBUFFERS SELECT AddrValid, COUNT(PK) AS Cnt FROM dbo.tblAllAdultNameAddr GROUP BY AddrValid SSD: 12 seconds ANK 635917 E 2918652 INV 936058 MOV 112093 PO 3780131 V 59074768 Rotating: 52 seconds ANK 635917 E 2918652 INV 936058 MOV 112093 PO 3780131 V 59074768 DBCC DROPCLEANBUFFERS SELECT COUNT(_DataHSID.dbo.tblHSID.PKID) AS Cnt, dbo.tblAllAdultNameAddr.AddrValid FROM dbo.tblAllAdultNameAddr INNER JOIN _DataHSID.dbo.tblHSID ON dbo.tblAllAdultNameAddr.PKHSID = _DataHSID.dbo.tblHSID.PKID GROUP BY dbo.tblAllAdultNameAddr.AddrValid SSD: 35 seconds 635917 ANK 2918652 E 936058 INV 112093 MOV 3780131 PO 59074768 V DBCC DROPCLEANBUFFERS SELECT COUNT(_DataHSID_RotatingMedia.dbo.tblHSID.PKID) AS Cnt, dbo.tblAllAdultNameAddr.AddrValid FROM _DataHSID_RotatingMedia.dbo.tblHSID INNER JOIN dbo.tblAllAdultNameAddr ON _DataHSID_RotatingMedia.dbo.tblHSID.PKID = dbo.tblAllAdultNameAddr.PKHSID GROUP BY dbo.tblAllAdultNameAddr.AddrValid Rotating: 1:00 635917 ANK 2918652 E 936058 INV 112093 MOV 3780131 PO 59074768 V The following appears to be a table scan which would be a "worst case". I just picked a field from HSID which we use occasionally. DBCC DROPCLEANBUFFERS SELECT COUNT(PKID) AS Cnt, Household_Occupation_code FROM dbo.tblHSID GROUP BY Household_Occupation_code Rotating: 7:06 35481479 NULL 7143021 10 11480 11 9780 12 37452 13 115093 20 2266292 21 501715 22 23724 23 1039660 30 1325728 40 1183311 50 8271 51 70318 52 2566 60 33157 61 28595 62 15305 70 511464 80 739340 90 609317 91 Rotating media: 1:05 35481479 NULL 7143021 10 11480 11 9780 12 37452 13 115093 20 2266292 21 501715 22 23724 23 1039660 30 1325728 40 1183311 50 8271 51 70318 52 2566 60 33157 61 28595 62 15305 70 511464 80 739340 90 609317 91 DBCC DROPCLEANBUFFERS SELECT COUNT(PKID) AS Cnt, Narrow_Income_Band FROM dbo.tblHSID GROUP BY Narrow_Income_Band SSD: 8 seconds 13824508 NULL 3762511 1 1675853 2 1015899 3 2307736 4 1031640 5 2595759 6 1069374 7 2662509 8 1100049 9 1055216 A 1026910 B 4285629 C 941494 D 862906 E 831573 F 2443917 G 738328 H 676959 I 478582 J 423856 K 1168819 L 371413 M 333796 N 249064 O 204771 P 708189 Q 193265 R 189413 S 2927130 T Rotating media: 10 seconds 13824508 NULL 3762511 1 1675853 2 1015899 3 2307736 4 1031640 5 2595759 6 1069374 7 2662509 8 1100049 9 1055216 A 1026910 B 4285629 C 941494 D 862906 E 831573 F 2443917 G 738328 H 676959 I 478582 J 423856 K 1168819 L 371413 M 333796 N 249064 O 204771 P 708189 Q 193265 R 189413 S 2927130 T I am going to stop for now. I have the rotating media copies and will leave them in place for awhile. If any real DBA wants to do some testing let me know. Obviously I have to know you. :) -- John W. Colby www.ColbyConsulting.com From jwcolby at colbyconsulting.com Sat Jul 2 13:36:42 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Sat, 02 Jul 2011 14:36:42 -0400 Subject: [AccessD] [dba-SQLServer] SQL Server - SSD / Rotating media - Side by side test results In-Reply-To: References: <4E0F5577.9060206@colbyconsulting.com> Message-ID: <4E0F653A.7070503@colbyconsulting.com> Arthur, There are definite cases where the gains are minimal, others where they are significant. The other thing is that I am intentionally clearing the cache before each test. The cache further minimizes the differences as it turns out. That is to be expected of course. This just goes to show the old axiom that throwing memory at SQL Server does a world of good. Without a shadow of a doubt, one thing that SSDs (and faster / better hardware in general) do is minimize the impact of ignorance and sloth. ;) I am not an accomplished DBA, and I simply do not have the time to become one. As a result I am unable to correctly tune my system. By throwing cores, memory and SSDs at the problem I manage to achieve respectable results in spite of myself. Hardware is cheap. My entire server cost somewhere in the neighborhood of $5K. Additionally I have dragged disk and RAID controllers forward through many upgrades. Back around 2005 I spent the then enormous sum of $1600 for three Areca raid controllers which I am still using today. I bought 10 1 TB drives back when they were $150, but I am still using them today. What I upgrade are the motherboards and more frequently the processors. In 2004 I started with single core AMD 3800 processors using Windows2003 X32 and 4 gigs of RAM. I built two systems for $4000! Moving up to dual and then quad cores, and Windows / SQL Server X64 and 8 GB RAM, then 16 gigs of ram. My latest motherboard / processor cost me (my client of course) about $700 (8 cores, with 24 cores possible) and 32 gigs of ram was about $1000. I was looking last night and another 32 GB of RAM (same modules) is now only $600! And... I am using my entire old server (quad core / 16 gigs ram) for a VM server. The point really is that while it is not a trivial amount spent over the years making these upgrades, over that same period I billed a couple of hundred thousand dollars. All these upgrades make me more and more productive, faster and faster getting the results back to the client. The client *loves me* precisely because he gets results back in hours instead of a week as his previous provider gave him. I program custom C# solutions (and bill him for the programming) which have enabled me to do orders literally in hours which (back in 2006) took me a full day or even two to get out. Counts which took an hour in 2004 now take my custom program 2 minutes. *AND* I have developed a system which allows him to send emails with zip lists as attachments. A program running on my server strips off the CSV attachment, generate counts, build a count spreadsheet, attach it to an email and send it back to him literally within 5 minutes of him pressing send *without* my doing anything. Again those counts used to take me an hour back when I did everything by hand. Now I log that a count came in and put a small charge in my billing database! The lesson for me is that my time is worth much more than the cost of the electronics and my response time is what makes me valuable to the client. I fully understand than everyone cannot solve all their problems by throwing hardware / custom software at it, but for a sole proprietor it just might be the only way! I don't have the time to be good at all the hats I wear! And so I do things like spend a thousand on SSDs on an educated guess that they will make a significant difference for an uneducated sloth. :) And finally, because the client loves me, he is sending me a *ton* more work! MORE CORES! MORE MEMORY! More SSDs! :):):) John W. Colby www.ColbyConsulting.com On 7/2/2011 1:48 PM, Arthur Fuller wrote: > I would be happy to assist. Judging by your IMO rather narrow result-gap (measured in a few > seconds), my initial guess would be that the SSHDs are not gaining you much over your investment in > CPU and RAM. However, that remains to be determined. Could be that table-scans or some other factor > are causing this lag. Should be that SSHD retrieves ought to be an order of magnitude quicker, but > according to your posted measurements they lag significantly behind that thumbnail benchmark. > > And besides all that, how are you? What's new with you and your family? > > A. From vbacreations at gmail.com Sat Jul 2 13:47:40 2011 From: vbacreations at gmail.com (William Benson (VBACreations.Com)) Date: Sat, 2 Jul 2011 14:47:40 -0400 Subject: [AccessD] Pulling Data from Excel into Access with "Automation" In-Reply-To: <003b01cc38c7$89934840$9cb9d8c0$@net> References: <201107010022.p610MKvQ022864@databaseadvisors.com>, <4E0E42D5.32026.D4817AA@stuart.lexacorp.com.pg> <002001cc385c$5de1fd60$19a5f820$@gmail.com> <003b01cc38c7$89934840$9cb9d8c0$@net> Message-ID: <003701cc38e8$85c57460$91505d20$@gmail.com> Hi Mark, I am having some doubts I will be able to refer to .ListIndex at all directly in the sql. As to your suggestion of reversing the arguments, I don't think that is correct. The way to refer to the nth item in the 1st column of a listbox is: lst1.column(0,n). Thus to get the value in the 1st column on the row identified with the listindex is lst1.column(0, lst1.listindex) I guess at heart, my only open question is why LstFields.VALUE does not change when I change the index of the Selected property from, say, 0 to 1. For i = 0 To lstFields.ListCount - 1 lstFields.Selected(i) = True debug.print lstFields 'seems to remain the same throughout loop. Next -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Mark Simms Sent: Saturday, July 02, 2011 10:52 AM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Pulling Data from Excel into Access with "Automation" Just reverse the Column property arguments: lst1.ListIndex should be first. From vbacreations at gmail.com Sat Jul 2 14:53:26 2011 From: vbacreations at gmail.com (William Benson (VBACreations.Com)) Date: Sat, 2 Jul 2011 15:53:26 -0400 Subject: [AccessD] How to tell a button's "air space" is no longer being hovered over Message-ID: <003b01cc38f1$b62edca0$228c95e0$@gmail.com> I have some code which changes the caption of a button when the user has the ctrl key pressed, set during the mousemove event for the button. I want however, that when the user leaves the "air space" for the button, then the caption reverts - regardless whether they still have shift held. I know I can use use the mousemove event associated with all surrounding controls to reset it, but I would like something more related to the control itself. Is there a method of testing that the user has moved the mouse outside the button's air space? I have a feeling I am going to be out of luck... From jwcolby at colbyconsulting.com Sat Jul 2 19:16:52 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Sat, 02 Jul 2011 20:16:52 -0400 Subject: [AccessD] Need a new printer? Cheap? In-Reply-To: <4AC76807705E4A688411F71D46A6C3FE@HAL9007> References: <4AC76807705E4A688411F71D46A6C3FE@HAL9007> Message-ID: <4E0FB4F4.1000003@colbyconsulting.com> http://www.4inkjets.com/Canon-PIXMA-MP250-printer-ink-cartridges-toner John W. Colby www.ColbyConsulting.com On 7/2/2011 10:43 AM, Rocky Smolin wrote: > http://www.walmart.com/ip/Canon-PIXMA-MP250-Photo-All-In-One-Inkjet-Printer- > Copier-Scanner-Value-Bundle/12534987?sourceid=06345287580503509743 From fuller.artful at gmail.com Sun Jul 3 03:29:14 2011 From: fuller.artful at gmail.com (Arthur Fuller) Date: Sun, 3 Jul 2011 04:29:14 -0400 Subject: [AccessD] Pulling Data from Excel into Access with "Automation" In-Reply-To: <003701cc38e8$85c57460$91505d20$@gmail.com> References: <201107010022.p610MKvQ022864@databaseadvisors.com> <4E0E42D5.32026.D4817AA@stuart.lexacorp.com.pg> <002001cc385c$5de1fd60$19a5f820$@gmail.com> <003b01cc38c7$89934840$9cb9d8c0$@net> <003701cc38e8$85c57460$91505d20$@gmail.com> Message-ID: That I think is because the value remains the content of column(o) despite what is selected. And that IMO is how it should respond, i.e. what is selected should not change the value. A. On Sat, Jul 2, 2011 at 2:47 PM, William Benson (VBACreations.Com) < vbacreations at gmail.com> wrote: > Hi Mark, > > I am having some doubts I will be able to refer to .ListIndex at all > directly in the sql. > > As to your suggestion of reversing the arguments, I don't think that is > correct. The way to refer to the nth item in the 1st column of a listbox > is: > lst1.column(0,n). Thus to get the value in the 1st column on the row > identified with the listindex is lst1.column(0, lst1.listindex) > > I guess at heart, my only open question is why LstFields.VALUE does not > change when I change the index of the Selected property from, say, 0 to 1. > > For i = 0 To lstFields.ListCount - 1 > lstFields.Selected(i) = True > debug.print lstFields 'seems to remain the same throughout loop. > Next > > From marksimms at verizon.net Sun Jul 3 10:03:53 2011 From: marksimms at verizon.net (Mark Simms) Date: Sun, 03 Jul 2011 11:03:53 -0400 Subject: [AccessD] Pulling Data from Excel into Access with "Automation" In-Reply-To: <003701cc38e8$85c57460$91505d20$@gmail.com> References: <201107010022.p610MKvQ022864@databaseadvisors.com>, <4E0E42D5.32026.D4817AA@stuart.lexacorp.com.pg> <002001cc385c$5de1fd60$19a5f820$@gmail.com> <003b01cc38c7$89934840$9cb9d8c0$@net> <003701cc38e8$85c57460$91505d20$@gmail.com> Message-ID: <003901cc3992$6d494ab0$47dbe010$@net> My bad....but below is referencing the array, not a specific item. debug.print lstFields 'seems to remain the same throughout try debug.print lstFields(0,i) if there are multiple columns(0=col#1) otherwise debug.print lstFields(i) should do the trick From marksimms at verizon.net Sun Jul 3 10:07:27 2011 From: marksimms at verizon.net (Mark Simms) Date: Sun, 03 Jul 2011 11:07:27 -0400 Subject: [AccessD] How to tell a button's "air space" is no longer being hovered over In-Reply-To: <003b01cc38f1$b62edca0$228c95e0$@gmail.com> References: <003b01cc38f1$b62edca0$228c95e0$@gmail.com> Message-ID: <003a01cc3992$ecac3920$c604ab60$@net> John Walk provided some code in his Excel book for doing this. http://spreadsheetpage.com/ It was very clever as I recall. From vbacreations at gmail.com Sun Jul 3 11:17:52 2011 From: vbacreations at gmail.com (William Benson (VBACreations.Com)) Date: Sun, 3 Jul 2011 12:17:52 -0400 Subject: [AccessD] How to tell a button's "air space" is no longer being hovered over In-Reply-To: <003a01cc3992$ecac3920$c604ab60$@net> References: <003b01cc38f1$b62edca0$228c95e0$@gmail.com> <003a01cc3992$ecac3920$c604ab60$@net> Message-ID: <000301cc399c$c32decb0$4989c610$@gmail.com> Hi Mark, I could not find it :-( Thanks. -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Mark Simms Sent: Sunday, July 03, 2011 11:07 AM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] How to tell a button's "air space" is no longer being hovered over John Walk provided some code in his Excel book for doing this. http://spreadsheetpage.com/ It was very clever as I recall. -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From jwcolby at colbyconsulting.com Sun Jul 3 11:56:54 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Sun, 03 Jul 2011 12:56:54 -0400 Subject: [AccessD] SSD, The Game Changer - SQL Man of Mystery - SQLServerCentral.com Message-ID: <4E109F56.809@colbyconsulting.com> -- John W. Colby www.ColbyConsulting.com http://www.sqlservercentral.com/blogs/sqlmanofmystery/archive/2009/04/14/ssd-the-game-changer.aspx From accessd at shaw.ca Sun Jul 3 14:13:03 2011 From: accessd at shaw.ca (Jim Lawrence) Date: Sun, 3 Jul 2011 12:13:03 -0700 Subject: [AccessD] SSD, The Game Changer - SQL Man of Mystery - SQLServerCentral.com In-Reply-To: <4E109F56.809@colbyconsulting.com> References: <4E109F56.809@colbyconsulting.com> Message-ID: <50EC560B45284179B622DA83C34395C8@creativesystemdesigns.com> Hi John: As your databases do not need do manage transaction queues or locks here is an example of just one of the NoSQL database MongoDB vs. SQL Server 2008 performance showdown comparison. http://tinyurl.com/38cofzg In the article it shows speeds over 100 times as fast when managing a fairly large amount of data but the performance just goes up exponentially when presented with even larger data sets. (1000x and more...) The Cassandra (NoSQL) database (http://cassandra.apache.org/) might be one of the best choices in this genre as it has the support of the big players like FaceBook, IBM, Apache etc... There is also an ever expanding group of experts and help forums (http://cassandra-user-incubator-apache-org.3065146.n2.nabble.com/) on this subject. To add to the functionality there is the new super scaling and searching tools called HPCC (http://gigaom.com/cloud/lexisnexis-open-sources-its-hadoop-killer/) which uses a combination of SQL and NoSQL when searching distributive data and clusters of data servers. In your future plans it might well be worth considering such an option especially as your data requirements and expected results continues to grow. Jim -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Sunday, July 03, 2011 9:57 AM To: Access Developers discussion and problem solving; VBA; Sqlserver-Dba Subject: [AccessD] SSD, The Game Changer - SQL Man of Mystery - SQLServerCentral.com -- John W. Colby www.ColbyConsulting.com http://www.sqlservercentral.com/blogs/sqlmanofmystery/archive/2009/04/14/ssd -the-game-changer.aspx -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From vbacreations at gmail.com Sun Jul 3 16:23:33 2011 From: vbacreations at gmail.com (William Benson (VBACreations.Com)) Date: Sun, 3 Jul 2011 17:23:33 -0400 Subject: [AccessD] Delete query... fast ... deleting from datasheet view ... slow Message-ID: <000901cc39c7$77461ae0$65d250a0$@gmail.com> Why is a query that deletes all records from a table so fast in comparison with a manual delete operation on a table that is opened in datasheet view? From jwcolby at colbyconsulting.com Sun Jul 3 16:41:18 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Sun, 03 Jul 2011 17:41:18 -0400 Subject: [AccessD] SSD, The Game Changer - SQL Man of Mystery - SQLServerCentral.com In-Reply-To: <50EC560B45284179B622DA83C34395C8@creativesystemdesigns.com> References: <4E109F56.809@colbyconsulting.com> <50EC560B45284179B622DA83C34395C8@creativesystemdesigns.com> Message-ID: <4E10E1FE.2010805@colbyconsulting.com> Jim, I read the first article and I don't see how it fits at all. 1) My data is very much a normal table, with rows and columns. In one case (the people table) there is a small number of columns, and most of the columns are fully populated. In the second table, there are pushing 700 fields and the columns are rarely fully populated. 2) The data is relational, though just barely. One of my people tables is directly related to the data table. All of my people tables may have people in the other tables. Eventually I will be pulling all of my people into a single table with pointers back to the non people data in the original table. 3) I rarely update the data. The people table is updated once per month as I validate the addresses looking for moves. I get about 1.5% / month moves. The data table is never updated, at least the data in the existing columns. Very occasionally I add new columns. 4) I only have a single user (myself) and I never expect to have more. In comparison, the NoSQL databases claim to store documents and make them searchable. Blog posts, web pages etc. They claim to be good as the numbers of people simultaneously *writing* to them climbs into the hundreds or thousands. So while the technology is fascinating, it hardly seems like a fit for my application. John W. Colby www.ColbyConsulting.com On 7/3/2011 3:13 PM, Jim Lawrence wrote: > Hi John: > > As your databases do not need do manage transaction queues or locks here is > an example of just one of the NoSQL database MongoDB vs. SQL Server 2008 > performance showdown comparison. > > http://tinyurl.com/38cofzg > > In the article it shows speeds over 100 times as fast when managing a fairly > large amount of data but the performance just goes up exponentially when > presented with even larger data sets. (1000x and more...) > > The Cassandra (NoSQL) database (http://cassandra.apache.org/) might be one > of the best choices in this genre as it has the support of the big players > like FaceBook, IBM, Apache etc... > > There is also an ever expanding group of experts and help forums > (http://cassandra-user-incubator-apache-org.3065146.n2.nabble.com/) on this > subject. > > To add to the functionality there is the new super scaling and searching > tools called HPCC > (http://gigaom.com/cloud/lexisnexis-open-sources-its-hadoop-killer/) which > uses a combination of SQL and NoSQL when searching distributive data and > clusters of data servers. > > In your future plans it might well be worth considering such an option > especially as your data requirements and expected results continues to grow. > > > Jim > > > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby > Sent: Sunday, July 03, 2011 9:57 AM > To: Access Developers discussion and problem solving; VBA; Sqlserver-Dba > Subject: [AccessD] SSD, The Game Changer - SQL Man of Mystery - > SQLServerCentral.com > > From stuart at lexacorp.com.pg Sun Jul 3 16:56:19 2011 From: stuart at lexacorp.com.pg (Stuart McLachlan) Date: Mon, 04 Jul 2011 07:56:19 +1000 Subject: [AccessD] Delete query... fast ... deleting from datasheet view ... slow In-Reply-To: <000901cc39c7$77461ae0$65d250a0$@gmail.com> References: <000901cc39c7$77461ae0$65d250a0$@gmail.com> Message-ID: <4E10E583.18446.179396DD@stuart.lexacorp.com.pg> A SWAG: Because Access can't tell that all the records are selected. It has to step through the rows and checking the "selected" attribute. That means that it can't implement a simple "Delete * >From tblA" but has to specify each of the records separately for deletion. -- Stuart On 3 Jul 2011 at 17:23, William Benson (VBACreations. wrote: > Why is a query that deletes all records from a table so fast in > comparison with a manual delete operation on a table that is opened in > datasheet view? > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > From accessd at shaw.ca Sun Jul 3 22:10:49 2011 From: accessd at shaw.ca (Jim Lawrence) Date: Sun, 3 Jul 2011 20:10:49 -0700 Subject: [AccessD] SSD, The Game Changer - SQL Man of Mystery - SQLServerCentral.com In-Reply-To: <4E10E1FE.2010805@colbyconsulting.com> References: <4E109F56.809@colbyconsulting.com> <50EC560B45284179B622DA83C34395C8@creativesystemdesigns.com> <4E10E1FE.2010805@colbyconsulting.com> Message-ID: Inline: -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Sunday, July 03, 2011 2:41 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] SSD, The Game Changer - SQL Man of Mystery - SQLServerCentral.com Jim, I read the first article and I don't see how it fits at all. * It fits very well. First in overview this database does not require a single PC to run the database. It is distributive in nature so you can just add nodes to a bunch of old new and old PCs. The main problem with the database as you have it now is that it is dependant on the hardware of a single box. Just like in 2006 the single CPU reached it maximum and multi-core processors were then created. Cassandra runs like a multi-core PC. When the database is running on numerous PCs it is like running a full RAID. 1) My data is very much a normal table, with rows and columns. In one case (the people table) there are a small number of columns, and most of the columns are fully populated. In the second table, there are pushing 700 fields and the columns are rarely fully populated. * Cassandra, for example, has a sparse data structure. This means columns can be over 2 billion (rows as well) wide (high), if required and the 'fields' do not have to be populated. At any time you can just insert another 'field' and there is no rebuild required or performance loss (It can all be done in real time). You can have your cake and eat it too. 2) The data is relational, though just barely. One of my people tables is directly related to the data table. All of my people tables may have people in the other tables. Eventually I will be pulling all of my people into a single table with pointers back to the non people data in the original able. * When you say barely relational that is what Cassandra is designed for. What you are describing in item 2 is exactly what type of database Cassandra is. It may not use SQL as we traditionally know it but it uses a system called 'map-reduce' which can quickly (very quickly) obtain the same results...it is data-mining tool on steroids. 3) I rarely update the data. The people table is updated once per month as I validate the addresses looking for moves. I get about 1.5% / month moves. The data table is never updated, at least the data in the existing columns. Very occasionally I add new columns. * Again, your requirements and description is matching Cassandra's design nature to a tee. 4) I only have a single user (myself) and I never expect to have more. * That does not matter if you are the only user. What does matter is that you can pull any data out of a huge mass of mix data fast and easy. You have noticed how Google can pull 365,000,000 hits in somewhere around 0.03 seconds. It is not because they have huge vertical super-powerful computers...their computer are but beaters in comparison but their database is spans hundreds of computers...just like Cassandra is capable of. In comparison, the NoSQL databases claim to store documents and make them searchable. Blog posts, web pages etc. They claim to be good as the numbers of people simultaneously *writing* to them climbs into the hundreds or thousands. So while the technology is fascinating, it hardly seems like a fit for my application. * You are right in all the above but with the exception that the Cassandra is a near perfect fit. To that end I will be starting my own Cassandra database system and just to see how it plays out. Here is a little video to watch that will do a lot to explain what and how Cassandra does things: http://video.disruptivecode.com/video/840645/what-makes-cassandra-trick. I think you will be pleasantly surprised. The product runs on any OS as all that it is needs is a copy of Java and Apache, which is free, downloads. http://www.quora.com/How-can-i-install-Apache-Cassandra-on-Windows-Operating -System John W. Colby www.ColbyConsulting.com On 7/3/2011 3:13 PM, Jim Lawrence wrote: > Hi John: > > As your databases do not need do manage transaction queues or locks here is > an example of just one of the NoSQL database MongoDB vs. SQL Server 2008 > performance showdown comparison. > > http://tinyurl.com/38cofzg > > In the article it shows speeds over 100 times as fast when managing a fairly > large amount of data but the performance just goes up exponentially when > presented with even larger data sets. (1000x and more...) > > The Cassandra (NoSQL) database (http://cassandra.apache.org/) might be one > of the best choices in this genre as it has the support of the big players > like FaceBook, IBM, Apache etc... > > There is also an ever expanding group of experts and help forums > (http://cassandra-user-incubator-apache-org.3065146.n2.nabble.com/) on this > subject. > > To add to the functionality there is the new super scaling and searching > tools called HPCC > (http://gigaom.com/cloud/lexisnexis-open-sources-its-hadoop-killer/) which > uses a combination of SQL and NoSQL when searching distributive data and > clusters of data servers. > > In your future plans it might well be worth considering such an option > especially as your data requirements and expected results continues to grow. > > > Jim From accessd at shaw.ca Sun Jul 3 22:47:18 2011 From: accessd at shaw.ca (Jim Lawrence) Date: Sun, 3 Jul 2011 20:47:18 -0700 Subject: [AccessD] SSD, The Game Changer - SQL Man of Mystery - SQLServerCentral.com In-Reply-To: References: <4E109F56.809@colbyconsulting.com> <50EC560B45284179B622DA83C34395C8@creativesystemdesigns.com> <4E10E1FE.2010805@colbyconsulting.com> Message-ID: <649B92906805469C8BEA4A9C9D96521A@creativesystemdesigns.com> PS: Another site showing how to install Cassandra on a Windows PC, in 10 minutes is: http://www.javageneration.com/?p=19 Jim -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Jim Lawrence Sent: Sunday, July 03, 2011 8:11 PM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] SSD, The Game Changer - SQL Man of Mystery - SQLServerCentral.com Inline: -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Sunday, July 03, 2011 2:41 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] SSD, The Game Changer - SQL Man of Mystery - SQLServerCentral.com Jim, I read the first article and I don't see how it fits at all. * It fits very well. First in overview this database does not require a single PC to run the database. It is distributive in nature so you can just add nodes to a bunch of old new and old PCs. The main problem with the database as you have it now is that it is dependant on the hardware of a single box. Just like in 2006 the single CPU reached it maximum and multi-core processors were then created. Cassandra runs like a multi-core PC. When the database is running on numerous PCs it is like running a full RAID. 1) My data is very much a normal table, with rows and columns. In one case (the people table) there are a small number of columns, and most of the columns are fully populated. In the second table, there are pushing 700 fields and the columns are rarely fully populated. * Cassandra, for example, has a sparse data structure. This means columns can be over 2 billion (rows as well) wide (high), if required and the 'fields' do not have to be populated. At any time you can just insert another 'field' and there is no rebuild required or performance loss (It can all be done in real time). You can have your cake and eat it too. 2) The data is relational, though just barely. One of my people tables is directly related to the data table. All of my people tables may have people in the other tables. Eventually I will be pulling all of my people into a single table with pointers back to the non people data in the original able. * When you say barely relational that is what Cassandra is designed for. What you are describing in item 2 is exactly what type of database Cassandra is. It may not use SQL as we traditionally know it but it uses a system called 'map-reduce' which can quickly (very quickly) obtain the same results...it is data-mining tool on steroids. 3) I rarely update the data. The people table is updated once per month as I validate the addresses looking for moves. I get about 1.5% / month moves. The data table is never updated, at least the data in the existing columns. Very occasionally I add new columns. * Again, your requirements and description is matching Cassandra's design nature to a tee. 4) I only have a single user (myself) and I never expect to have more. * That does not matter if you are the only user. What does matter is that you can pull any data out of a huge mass of mix data fast and easy. You have noticed how Google can pull 365,000,000 hits in somewhere around 0.03 seconds. It is not because they have huge vertical super-powerful computers...their computer are but beaters in comparison but their database is spans hundreds of computers...just like Cassandra is capable of. In comparison, the NoSQL databases claim to store documents and make them searchable. Blog posts, web pages etc. They claim to be good as the numbers of people simultaneously *writing* to them climbs into the hundreds or thousands. So while the technology is fascinating, it hardly seems like a fit for my application. * You are right in all the above but with the exception that the Cassandra is a near perfect fit. To that end I will be starting my own Cassandra database system and just to see how it plays out. Here is a little video to watch that will do a lot to explain what and how Cassandra does things: http://video.disruptivecode.com/video/840645/what-makes-cassandra-trick. I think you will be pleasantly surprised. The product runs on any OS as all that it is needs is a copy of Java and Apache, which is free, downloads. http://www.quora.com/How-can-i-install-Apache-Cassandra-on-Windows-Operating -System John W. Colby www.ColbyConsulting.com On 7/3/2011 3:13 PM, Jim Lawrence wrote: > Hi John: > > As your databases do not need do manage transaction queues or locks here is > an example of just one of the NoSQL database MongoDB vs. SQL Server 2008 > performance showdown comparison. > > http://tinyurl.com/38cofzg > > In the article it shows speeds over 100 times as fast when managing a fairly > large amount of data but the performance just goes up exponentially when > presented with even larger data sets. (1000x and more...) > > The Cassandra (NoSQL) database (http://cassandra.apache.org/) might be one > of the best choices in this genre as it has the support of the big players > like FaceBook, IBM, Apache etc... > > There is also an ever expanding group of experts and help forums > (http://cassandra-user-incubator-apache-org.3065146.n2.nabble.com/) on this > subject. > > To add to the functionality there is the new super scaling and searching > tools called HPCC > (http://gigaom.com/cloud/lexisnexis-open-sources-its-hadoop-killer/) which > uses a combination of SQL and NoSQL when searching distributive data and > clusters of data servers. > > In your future plans it might well be worth considering such an option > especially as your data requirements and expected results continues to grow. > > > Jim -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From charlotte.foust at gmail.com Sun Jul 3 23:59:39 2011 From: charlotte.foust at gmail.com (Charlotte Foust) Date: Sun, 3 Jul 2011 21:59:39 -0700 Subject: [AccessD] How to tell a button's "air space" is no longer being hovered over In-Reply-To: <003b01cc38f1$b62edca0$228c95e0$@gmail.com> References: <003b01cc38f1$b62edca0$228c95e0$@gmail.com> Message-ID: Darn, I've done this but I don't recall how, since it was back in Access 2.0 or maybe 97. One way to do it would be to put a shape or even a textbox under the button and just slightly larger than the button. Then you use the mousemove of the underlying control to switch the caption back. Charlotte Foust On Sat, Jul 2, 2011 at 12:53 PM, William Benson (VBACreations.Com) < vbacreations at gmail.com> wrote: > I have some code which changes the caption of a button when the user has > the > ctrl key pressed, set during the mousemove event for the button. > > I want however, that when the user leaves the "air space" for the button, > then the caption reverts - regardless whether they still have shift held. > > I know I can use use the mousemove event associated with all surrounding > controls to reset it, but I would like something more related to the > control > itself. > > Is there a method of testing that the user has moved the mouse outside the > button's air space? > > I have a feeling I am going to be out of luck... > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > > > Website: http://www.databaseadvisors.com > > > From vbacreations at gmail.com Mon Jul 4 01:15:40 2011 From: vbacreations at gmail.com (William Benson (VBACreations.Com)) Date: Mon, 4 Jul 2011 02:15:40 -0400 Subject: [AccessD] How to tell a button's "air space" is no longer being hovered over In-Reply-To: References: <003b01cc38f1$b62edca0$228c95e0$@gmail.com> Message-ID: <002101cc3a11$cd51ffe0$67f5ffa0$@gmail.com> That is not a bad idea at all Charlotte, I think I will do that! -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Charlotte Foust Sent: Monday, July 04, 2011 1:00 AM To: Access Developers discussion and problem solving Subject: Re: [AccessD] How to tell a button's "air space" is no longer being hovered over Darn, I've done this but I don't recall how, since it was back in Access 2.0 or maybe 97. One way to do it would be to put a shape or even a textbox under the button and just slightly larger than the button. Then you use the mousemove of the underlying control to switch the caption back. Charlotte Foust On Sat, Jul 2, 2011 at 12:53 PM, William Benson (VBACreations.Com) < vbacreations at gmail.com> wrote: > I have some code which changes the caption of a button when the user > has the ctrl key pressed, set during the mousemove event for the > button. > > I want however, that when the user leaves the "air space" for the > button, then the caption reverts - regardless whether they still have shift held. > > I know I can use use the mousemove event associated with all > surrounding controls to reset it, but I would like something more > related to the control itself. > > Is there a method of testing that the user has moved the mouse outside > the button's air space? > > I have a feeling I am going to be out of luck... > > > -- > 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 Mon Jul 4 03:11:35 2011 From: Gustav at cactus.dk (Gustav Brock) Date: Mon, 04 Jul 2011 10:11:35 +0200 Subject: [AccessD] Delete query... fast ... deleting from datasheet view ... slow Message-ID: Hi William and Stuart I don't think that's the reason, but it is similar: Access walks through the recordset (which may be filtered) and copies all records to a temp table to hold them in case you - when asked later via the GUI - choose to undo the operation. Only if you choose to confirm the deleting of the records, this actually takes place. /gustav >>> stuart at lexacorp.com.pg 03-07-2011 23:56 >>> A SWAG: Because Access can't tell that all the records are selected. It has to step through the rows and checking the "selected" attribute. That means that it can't implement a simple "Delete * >From tblA" but has to specify each of the records separately for deletion. -- Stuart On 3 Jul 2011 at 17:23, William Benson (VBACreations. wrote: > Why is a query that deletes all records from a table so fast in > comparison with a manual delete operation on a table that is opened in > datasheet view? From stuart at lexacorp.com.pg Mon Jul 4 04:19:36 2011 From: stuart at lexacorp.com.pg (Stuart McLachlan) Date: Mon, 04 Jul 2011 19:19:36 +1000 Subject: [AccessD] Delete query... fast ... deleting from datasheet view ... slow In-Reply-To: References: Message-ID: <4E1185A8.15835.1A05291B@stuart.lexacorp.com.pg> Good point, I didn't think of the confirmation of multiple deletes requiring a temp table. On 4 Jul 2011 at 10:11, Gustav Brock wrote: > Hi William and Stuart > > I don't think that's the reason, but it is similar: Access walks > through the recordset (which may be filtered) and copies all records > to a temp table to hold them in case you - when asked later via the > GUI - choose to undo the operation. Only if you choose to confirm the > deleting of the records, this actually takes place. > > /gustav > > > >>> stuart at lexacorp.com.pg 03-07-2011 23:56 >>> > A SWAG: > Because Access can't tell that all the records are selected. It has to > step through the rows and checking the "selected" attribute. That > means that it can't implement a simple "Delete * From tblA" but has > to specify each of the records separately for deletion. > > -- > Stuart > > On 3 Jul 2011 at 17:23, William Benson (VBACreations. wrote: > > > Why is a query that deletes all records from a table so fast in > > comparison with a manual delete operation on a table that is opened > > in datasheet view? > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > From Gustav at cactus.dk Mon Jul 4 04:50:15 2011 From: Gustav at cactus.dk (Gustav Brock) Date: Mon, 04 Jul 2011 11:50:15 +0200 Subject: [AccessD] SSD, The Game Changer - SQL Man of Mystery - SQLServerCentral.com Message-ID: Hi Jim But Casandra doesn't seem to be much .Net/C# friendly. Clients exist only for the old version 0.7, and both of these seem to provide nothing that come close to DataTableAdapters or the like (not to mention LINQ), only simple command-type access: http://aquiles.codeplex.com/ On the other hand, MongoDB seems to have proceeded further with NoRM: http://iridescence.no/post/NoSQL-Getting-started-with-MongoDB-and-NoRM.aspx /gustav >>> accessd at shaw.ca 04-07-2011 05:10 >>> Inline: -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Sunday, July 03, 2011 2:41 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] SSD, The Game Changer - SQL Man of Mystery - SQLServerCentral.com Jim, I read the first article and I don't see how it fits at all. * It fits very well. First in overview this database does not require a single PC to run the database. It is distributive in nature so you can just add nodes to a bunch of old new and old PCs. The main problem with the database as you have it now is that it is dependant on the hardware of a single box. Just like in 2006 the single CPU reached it maximum and multi-core processors were then created. Cassandra runs like a multi-core PC. When the database is running on numerous PCs it is like running a full RAID. 1) My data is very much a normal table, with rows and columns. In one case (the people table) there are a small number of columns, and most of the columns are fully populated. In the second table, there are pushing 700 fields and the columns are rarely fully populated. * Cassandra, for example, has a sparse data structure. This means columns can be over 2 billion (rows as well) wide (high), if required and the 'fields' do not have to be populated. At any time you can just insert another 'field' and there is no rebuild required or performance loss (It can all be done in real time). You can have your cake and eat it too. 2) The data is relational, though just barely. One of my people tables is directly related to the data table. All of my people tables may have people in the other tables. Eventually I will be pulling all of my people into a single table with pointers back to the non people data in the original able. * When you say barely relational that is what Cassandra is designed for. What you are describing in item 2 is exactly what type of database Cassandra is. It may not use SQL as we traditionally know it but it uses a system called 'map-reduce' which can quickly (very quickly) obtain the same results...it is data-mining tool on steroids. 3) I rarely update the data. The people table is updated once per month as I validate the addresses looking for moves. I get about 1.5% / month moves. The data table is never updated, at least the data in the existing columns. Very occasionally I add new columns. * Again, your requirements and description is matching Cassandra's design nature to a tee. 4) I only have a single user (myself) and I never expect to have more. * That does not matter if you are the only user. What does matter is that you can pull any data out of a huge mass of mix data fast and easy. You have noticed how Google can pull 365,000,000 hits in somewhere around 0.03 seconds. It is not because they have huge vertical super-powerful computers...their computer are but beaters in comparison but their database is spans hundreds of computers...just like Cassandra is capable of. In comparison, the NoSQL databases claim to store documents and make them searchable. Blog posts, web pages etc. They claim to be good as the numbers of people simultaneously *writing* to them climbs into the hundreds or thousands. So while the technology is fascinating, it hardly seems like a fit for my application. * You are right in all the above but with the exception that the Cassandra is a near perfect fit. To that end I will be starting my own Cassandra database system and just to see how it plays out. Here is a little video to watch that will do a lot to explain what and how Cassandra does things: http://video.disruptivecode.com/video/840645/what-makes-cassandra-trick.html. I think you will be pleasantly surprised. The product runs on any OS as all that it is needs is a copy of Java and Apache, which is free, downloads. http://www.quora.com/How-can-i-install-Apache-Cassandra-on-Windows-Operating-System John W. Colby www.ColbyConsulting.com On 7/3/2011 3:13 PM, Jim Lawrence wrote: > Hi John: > > As your databases do not need do manage transaction queues or locks here is > an example of just one of the NoSQL database MongoDB vs. SQL Server 2008 > performance showdown comparison. > > http://tinyurl.com/38cofzg > > In the article it shows speeds over 100 times as fast when managing a fairly > large amount of data but the performance just goes up exponentially when > presented with even larger data sets. (1000x and more...) > > The Cassandra (NoSQL) database (http://cassandra.apache.org/) might be one > of the best choices in this genre as it has the support of the big players > like FaceBook, IBM, Apache etc... > > There is also an ever expanding group of experts and help forums > (http://cassandra-user-incubator-apache-org.3065146.n2.nabble.com/) on this > subject. > > To add to the functionality there is the new super scaling and searching > tools called HPCC > (http://gigaom.com/cloud/lexisnexis-open-sources-its-hadoop-killer/) which > uses a combination of SQL and NoSQL when searching distributive data and > clusters of data servers. > > In your future plans it might well be worth considering such an option > especially as your data requirements and expected results continues to grow. > > > Jim From vbacreations at gmail.com Mon Jul 4 04:51:30 2011 From: vbacreations at gmail.com (William Benson) Date: Mon, 4 Jul 2011 05:51:30 -0400 Subject: [AccessD] Delete query... fast ... deleting from datasheet view ... slow In-Reply-To: References: Message-ID: I will check again but I think what got me interested in the question was that ia manual delwte takes longer even taking into account just time AFTER the user confirms ok to continue without Undo. Where does Access store the temp table Gustav? In other words if you open a monstrously large table select all records and do several faux deletes one after another which you confirm but cancel at the "Continue without Undo?" Prompt....does the database bloat I wonder! I will check this when I get back to computer!_ Bill Benson Owner VBACreations, LLC On Jul 4, 2011 4:12 AM, "Gustav Brock" wrote: > Hi William and Stuart > > I don't think that's the reason, but it is similar: Access walks through the recordset (which may be filtered) and copies all records to a temp table to hold them in case you - when asked later via the GUI - choose to undo the operation. Only if you choose to confirm the deleting of the records, this actually takes place. > > /gustav > > >>>> stuart at lexacorp.com.pg 03-07-2011 23:56 >>> > A SWAG: > Because Access can't tell that all the records are selected. It has to step through the rows > and checking the "selected" attribute. That means that it can't implement a simple "Delete * > From tblA" but has to specify each of the records separately for deletion. > > -- > Stuart > > On 3 Jul 2011 at 17:23, William Benson (VBACreations. wrote: > >> Why is a query that deletes all records from a table so fast in >> comparison with a manual delete operation on a table that is opened in >> datasheet view? > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com From stuart at lexacorp.com.pg Mon Jul 4 05:45:20 2011 From: stuart at lexacorp.com.pg (Stuart McLachlan) Date: Mon, 04 Jul 2011 20:45:20 +1000 Subject: [AccessD] Delete query... fast ... deleting from datasheet view ... slow In-Reply-To: References: , Message-ID: <4E1199C0.16390.1A53A76F@stuart.lexacorp.com.pg> I suspect it is only stored in memory. On 4 Jul 2011 at 5:51, William Benson wrote: > > Where does Access store the temp table Gustav? In other words if you > open a monstrously large table select all records and do several faux > deletes one after another which you confirm but cancel at the > "Continue without Undo?" Prompt....does the database bloat I wonder! I > will check this when I get back to computer!_ > From Gustav at cactus.dk Mon Jul 4 06:23:55 2011 From: Gustav at cactus.dk (Gustav Brock) Date: Mon, 04 Jul 2011 13:23:55 +0200 Subject: [AccessD] Delete query... fast ... deleting from datasheet view ... slow Message-ID: Hi William and Stuart Yes in memory, if possible. If not, in some temp db in the temp folder of the current user of Windows. /gustav >>> stuart at lexacorp.com.pg 04-07-2011 12:45 >>> I suspect it is only stored in memory. On 4 Jul 2011 at 5:51, William Benson wrote: > > Where does Access store the temp table Gustav? In other words if you > open a monstrously large table select all records and do several faux > deletes one after another which you confirm but cancel at the > "Continue without Undo?" Prompt....does the database bloat I wonder! I > will check this when I get back to computer!_ From jimdettman at verizon.net Mon Jul 4 08:56:51 2011 From: jimdettman at verizon.net (Jim Dettman) Date: Mon, 04 Jul 2011 09:56:51 -0400 Subject: [AccessD] Delete query... fast ... deleting from datasheet view... slow In-Reply-To: References: Message-ID: Yes, the temp DB's are in the directory specified by TEMP and/or TMP and are prefixed with ~JET Not having TEMP or TMP set correctly can yield a "Disk or network I/O error" message. The UseTransactions property also comes into play as to how JET handles the delete as well as whether you have the DB opened exclusive or not. Also of note, if a remote ODBC DB is involved, you need to be careful with the delete queries. If you use anything in the query that is Access/JET specific (ie. a VBA expression) or a join to a local table, then JET ends up issuing one ODBC call for each row that it wants to delete instead of sending one SQL delete statement to the backend. Jim. -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: Monday, July 04, 2011 07:24 AM To: accessd at databaseadvisors.com Subject: Re: [AccessD] Delete query... fast ... deleting from datasheet view... slow Hi William and Stuart Yes in memory, if possible. If not, in some temp db in the temp folder of the current user of Windows. /gustav >>> stuart at lexacorp.com.pg 04-07-2011 12:45 >>> I suspect it is only stored in memory. On 4 Jul 2011 at 5:51, William Benson wrote: > > Where does Access store the temp table Gustav? In other words if you > open a monstrously large table select all records and do several faux > deletes one after another which you confirm but cancel at the > "Continue without Undo?" Prompt....does the database bloat I wonder! I > will check this when I get back to computer!_ -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From adtp at airtelmail.in Mon Jul 4 09:22:34 2011 From: adtp at airtelmail.in (A.D. Tejpal) Date: Mon, 4 Jul 2011 19:52:34 +0530 Subject: [AccessD] How to tell a button's "air space" is no longer beinghovered over References: <003b01cc38f1$b62edca0$228c95e0$@gmail.com> Message-ID: <471F6C8DAB244C66B0AB79536085B3EC@personal4a8ede> William, For detecting whether the mouse pointer has moved away from the control in question, you can use the MouseMove event of form section to which the said control belongs, for example: ' Code in form's module '============================= Private Sub Detail_MouseMove( _ Button As Integer, Shift As Integer, _ X As Single, Y As Single) ' <> End Sub '-------------------------------------------- Private Sub FormFooter_MouseMove( _ Button As Integer, Shift As Integer, _ X As Single, Y As Single) ' <> End Sub '-------------------------------------------- Private Sub FormHeader_MouseMove( _ Button As Integer, Shift As Integer, _ X As Single, Y As Single) ' <> End Sub '============================= Best wishes, A.D. Tejpal ------------ ----- Original Message ----- From: William Benson (VBACreations.Com) To: 'Access Developers discussion and problem solving' Sent: Sunday, July 03, 2011 01:23 Subject: [AccessD] How to tell a button's "air space" is no longer beinghovered over I have some code which changes the caption of a button when the user has the ctrl key pressed, set during the mousemove event for the button. I want however, that when the user leaves the "air space" for the button, then the caption reverts - regardless whether they still have shift held. I know I can use use the mousemove event associated with all surrounding controls to reset it, but I would like something more related to the control itself. Is there a method of testing that the user has moved the mouse outside the button's air space? I have a feeling I am going to be out of luck... From vbacreations at gmail.com Mon Jul 4 09:38:17 2011 From: vbacreations at gmail.com (William Benson (VBACreations.Com)) Date: Mon, 4 Jul 2011 10:38:17 -0400 Subject: [AccessD] Delete query... fast ... deleting from datasheet view ... slow In-Reply-To: References: Message-ID: <000e01cc3a58$040d3810$0c27a830$@gmail.com> Gustav and Stuart, After testing this, I don't think there is a temp table, at least not initially - and I doubt during or afterwards, either. The reason I conclude this is manifold. Primarily, because if you cancel instead of permitting the GUI to continue without UNDO, canceling the delete takes WAY less time than it would take to put the records back in a table. And if you're referring perhaps to some tiny temp table of records which might be deletable WITH THE ABILITY to undo, that is a far smaller chunk of data than the main bulk Access will ultimately delete when you allow it to proceed without undo. Furthermore, I have gone through the exercise I mentioned . Delete, No, Delete, No, . a dozen times or so and the database size never changes on disk. So I am pretty sure Access is storing data in RAM, not on Disk. And certainly it is not creating a temp table at any other time, since allowing it to delete all, or some (pressing Escape) records does not leave the database any bigger than before delete was pressed. I do lean towards the recordset walk however, that makes a lot of sense in terms of what behavior we observe. - Access is very slow to delete from large tables even when allowing it to continue without undo - Records are deleted exactly in the order in which they appear, top to bottom, in the block of selected records - Interrupting a deletion with the Escape key leaves you with whatever records Access didn't get to yet - Deleting Still gotta wonder why Jet would do it that way. With records selected, one would think there is some hidden "selected" flag which Access's delete operation could make use of, to write its own behind the scenes SQL that says "Delete from ThisTable where the UserSelectedMe flag = TRUE". and then delete the records as fast as a query does it! From: William Benson [mailto:vbacreations at gmail.com] Sent: Monday, July 04, 2011 5:52 AM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Delete query... fast ... deleting from datasheet view ... slow I will check again but I think what got me interested in the question was that ia manual delwte takes longer even taking into account just time AFTER the user confirms ok to continue without Undo. Where does Access store the temp table Gustav? In other words if you open a monstrously large table select all records and do several faux deletes one after another which you confirm but cancel at the "Continue without Undo?" Prompt....does the database bloat I wonder! I will check this when I get back to computer!_ Bill Benson Owner VBACreations, LLC On Jul 4, 2011 4:12 AM, "Gustav Brock" wrote: > Hi William and Stuart > > I don't think that's the reason, but it is similar: Access walks through the recordset (which may be filtered) and copies all records to a temp table to hold them in case you - when asked later via the GUI - choose to undo the operation. Only if you choose to confirm the deleting of the records, this actually takes place. > > /gustav > > >>>> stuart at lexacorp.com.pg 03-07-2011 23:56 >>> > A SWAG: > Because Access can't tell that all the records are selected. It has to step through the rows > and checking the "selected" attribute. That means that it can't implement a simple "Delete * > From tblA" but has to specify each of the records separately for deletion. > > -- > Stuart > > On 3 Jul 2011 at 17:23, William Benson (VBACreations. wrote: > >> Why is a query that deletes all records from a table so fast in >> comparison with a manual delete operation on a table that is opened in >> datasheet view? > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com From vbacreations at gmail.com Mon Jul 4 10:23:28 2011 From: vbacreations at gmail.com (William Benson (VBACreations.Com)) Date: Mon, 4 Jul 2011 11:23:28 -0400 Subject: [AccessD] How to tell a button's "air space" is no longer beinghovered over In-Reply-To: <471F6C8DAB244C66B0AB79536085B3EC@personal4a8ede> References: <003b01cc38f1$b62edca0$228c95e0$@gmail.com> <471F6C8DAB244C66B0AB79536085B3EC@personal4a8ede> Message-ID: <002001cc3a5e$5428d240$fc7a76c0$@gmail.com> A.D., Other controls are too near the button's bottom and it's top edge is pretty much as .Top = 0. I have put the code in the other controls already, similar to what you wrote. I was wondering if there was a way like to test the mousemove if the coordinates are exactly on bottom or top or at either side of the button, based on X, Y, or whatever... and if so, the caption is treated as if the mouse were outside it, and if not, use the caption that pertains to the moust being inside. During a normal mousemove operation the user will be headed out or headed into the interior of the button, so -- if on the way out, the last code to execute will be to reset the caption -- if on the way in, the code executing (probably continuously) will be to set the caption appropriate for interior of button But I don't think it is possible to get the event to faithfully fire exactly as the mouse is going over the edge of the button. Thanks a lot, Bill -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of A.D. Tejpal Sent: Monday, July 04, 2011 10:23 AM To: Access Developers discussion and problem solving Subject: Re: [AccessD] How to tell a button's "air space" is no longer beinghovered over William, For detecting whether the mouse pointer has moved away from the control in question, you can use the MouseMove event of form section to which the said control belongs, for example: ' Code in form's module '============================= Private Sub Detail_MouseMove( _ Button As Integer, Shift As Integer, _ X As Single, Y As Single) ' <> End Sub '-------------------------------------------- Private Sub FormFooter_MouseMove( _ Button As Integer, Shift As Integer, _ X As Single, Y As Single) ' <> End Sub '-------------------------------------------- Private Sub FormHeader_MouseMove( _ Button As Integer, Shift As Integer, _ X As Single, Y As Single) ' <> End Sub '============================= Best wishes, A.D. Tejpal ------------ ----- Original Message ----- From: William Benson (VBACreations.Com) To: 'Access Developers discussion and problem solving' Sent: Sunday, July 03, 2011 01:23 Subject: [AccessD] How to tell a button's "air space" is no longer beinghovered over I have some code which changes the caption of a button when the user has the ctrl key pressed, set during the mousemove event for the button. I want however, that when the user leaves the "air space" for the button, then the caption reverts - regardless whether they still have shift held. I know I can use use the mousemove event associated with all surrounding controls to reset it, but I would like something more related to the control itself. Is there a method of testing that the user has moved the mouse outside the button's air space? I have a feeling I am going to be out of luck... -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From accessd at shaw.ca Mon Jul 4 10:56:07 2011 From: accessd at shaw.ca (Jim Lawrence) Date: Mon, 4 Jul 2011 08:56:07 -0700 Subject: [AccessD] SSD, The Game Changer - SQL Man of Mystery -SQLServerCentral.com In-Reply-To: References: Message-ID: Hi Gustav: Good points. Like MongoDB needs the client NoRM so it can connect to .Net, Cassandra needs the client Thrift. There are other clients but Thrift seems to be the most popular probably because it was the first client. An aside: My son-in-law does a lot of work on Cassandra and he uses the client PHPCassa. It can either use Thrift as a plug-in or connect directly through PHP sockets. (As PHPCassa has just been released it is having some growing pains which should be resolved by the fall.) The below sample shows a system connecting through a Virtual drive and then connection to .Net. http://www.ridgway.co.za/archive/2009/11/06/net-developers-guide-to-getting- started-with-cassandra.aspx I have been considering which NoSQL, or more accurately, Map-Reduce instead of SQL, database to become involved with and Cassandra matched some very important points. When I get involved it will be for the long run so: 1. Cassandra has the largest group of fortune 500 companies supporting it. 2. Cassandra, like MongoDB is being supported by Microsoft. After Cassandra's, next major release, coming this summer, I would suspect that there will be a real and full .Net client to follow. In this region, there is a huge presents of Oracle on Linux/Unix/Windows but there appears to be some real limitations with what a vertical Database can do. There is only so powerful an HP Proliant or Dell that can be built and a number of clients have been hitting that wall. In addition, the Oracle licensing, costs are far greater than the servers. Just like single core CPUs hit the wall in 2006 so are large growing databases. In the near future, there will be some real opportunities for NoSQL experts. Jim -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: Monday, July 04, 2011 2:50 AM To: accessd at databaseadvisors.com Subject: Re: [AccessD] SSD, The Game Changer - SQL Man of Mystery -SQLServerCentral.com Hi Jim But Casandra doesn't seem to be much .Net/C# friendly. Clients exist only for the old version 0.7, and both of these seem to provide nothing that come close to DataTableAdapters or the like (not to mention LINQ), only simple command-type access: http://aquiles.codeplex.com/ On the other hand, MongoDB seems to have proceeded further with NoRM: http://iridescence.no/post/NoSQL-Getting-started-with-MongoDB-and-NoRM.aspx /gustav >>> accessd at shaw.ca 04-07-2011 05:10 >>> Inline: -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Sunday, July 03, 2011 2:41 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] SSD, The Game Changer - SQL Man of Mystery - SQLServerCentral.com Jim, I read the first article and I don't see how it fits at all. * It fits very well. First in overview this database does not require a single PC to run the database. It is distributive in nature so you can just add nodes to a bunch of old new and old PCs. The main problem with the database as you have it now is that it is dependant on the hardware of a single box. Just like in 2006 the single CPU reached it maximum and multi-core processors were then created. Cassandra runs like a multi-core PC. When the database is running on numerous PCs it is like running a full RAID. 1) My data is very much a normal table, with rows and columns. In one case (the people table) there are a small number of columns, and most of the columns are fully populated. In the second table, there are pushing 700 fields and the columns are rarely fully populated. * Cassandra, for example, has a sparse data structure. This means columns can be over 2 billion (rows as well) wide (high), if required and the 'fields' do not have to be populated. At any time you can just insert another 'field' and there is no rebuild required or performance loss (It can all be done in real time). You can have your cake and eat it too. 2) The data is relational, though just barely. One of my people tables is directly related to the data table. All of my people tables may have people in the other tables. Eventually I will be pulling all of my people into a single table with pointers back to the non people data in the original able. * When you say barely relational that is what Cassandra is designed for. What you are describing in item 2 is exactly what type of database Cassandra is. It may not use SQL as we traditionally know it but it uses a system called 'map-reduce' which can quickly (very quickly) obtain the same results...it is data-mining tool on steroids. 3) I rarely update the data. The people table is updated once per month as I validate the addresses looking for moves. I get about 1.5% / month moves. The data table is never updated, at least the data in the existing columns. Very occasionally I add new columns. * Again, your requirements and description is matching Cassandra's design nature to a tee. 4) I only have a single user (myself) and I never expect to have more. * That does not matter if you are the only user. What does matter is that you can pull any data out of a huge mass of mix data fast and easy. You have noticed how Google can pull 365,000,000 hits in somewhere around 0.03 seconds. It is not because they have huge vertical super-powerful computers...their computer are but beaters in comparison but their database is spans hundreds of computers...just like Cassandra is capable of. In comparison, the NoSQL databases claim to store documents and make them searchable. Blog posts, web pages etc. They claim to be good as the numbers of people simultaneously *writing* to them climbs into the hundreds or thousands. So while the technology is fascinating, it hardly seems like a fit for my application. * You are right in all the above but with the exception that the Cassandra is a near perfect fit. To that end I will be starting my own Cassandra database system and just to see how it plays out. Here is a little video to watch that will do a lot to explain what and how Cassandra does things: http://video.disruptivecode.com/video/840645/what-makes-cassandra-trick.html . I think you will be pleasantly surprised. The product runs on any OS as all that it is needs is a copy of Java and Apache, which is free, downloads. http://www.quora.com/How-can-i-install-Apache-Cassandra-on-Windows-Operating -System John W. Colby www.ColbyConsulting.com From vbacreations at gmail.com Mon Jul 4 11:02:58 2011 From: vbacreations at gmail.com (William Benson (VBACreations.Com)) Date: Mon, 4 Jul 2011 12:02:58 -0400 Subject: [AccessD] Delete query... fast ... deleting from datasheet view ... slow References: Message-ID: <000301cc3a63$da2bf930$8e83eb90$@gmail.com> Good news, I could get back to VBA by trying to press Ctrl-G as fast as I could while also pressing Enter . apparently there was just enough split-sec pause between "unrecognized database format" prompts - so that after about 50 tries I got into the VBA window and could do a Save before entering Application.Quit, which killed the application as desired. Then even though Access was no longer running, I could not open the database again. Was getting a message that user admin had left it in a state which it could not longer be opened or locked. I was like "huh? So I went to the temp folder and tried to either rename or delete the temp database found in there and couldn't mess with that either! So I rebooted my machine and then I could get into the database again (Thank God). But this is a continual problem for me when deleting large numbers of records .. even if I click No (do not continue without undo) I get a message You tried to commit or rollback a transaction without first beginning a transaction. I say OK to that, then the message is The changes you made can't be saved due to the temporary locking of the records by another user. Eh, come again? What user? Then I say OK to that then I get You tried to commit or rollback a transaction without first beginning a transaction. Again. Then I click OK, and sometimes that's the end of things, and sometimes it's just the beginning of my troubles. Painful. From vbacreations at gmail.com Mon Jul 4 11:04:52 2011 From: vbacreations at gmail.com (William Benson (VBACreations.Com)) Date: Mon, 4 Jul 2011 12:04:52 -0400 Subject: [AccessD] Delete query... fast ... deleting from datasheet view ... slow References: Message-ID: <000801cc3a64$1c8f8490$55ae8db0$@gmail.com> Long and short of it . I use delete queries for large number of rows, exclusively, from now on. :-0(((((((( From: William Benson (VBACreations.Com) [mailto:vbacreations at gmail.com] Sent: Monday, July 04, 2011 12:03 PM To: Access Developers discussion and problem solving Subject: RE: [AccessD] Delete query... fast ... deleting from datasheet view ... slow Good news, I could get back to VBA by trying to press Ctrl-G as fast as I could while also pressing Enter . apparently there was just enough split-sec pause between "unrecognized database format" prompts - so that after about 50 tries I got into the VBA window and could do a Save before entering Application.Quit, which killed the application as desired. Then even though Access was no longer running, I could not open the database again. Was getting a message that user admin had left it in a state which it could not longer be opened or locked. I was like "huh? So I went to the temp folder and tried to either rename or delete the temp database found in there and couldn't mess with that either! So I rebooted my machine and then I could get into the database again (Thank God). But this is a continual problem for me when deleting large numbers of records .. even if I click No (do not continue without undo) I get a message You tried to commit or rollback a transaction without first beginning a transaction. I say OK to that, then the message is The changes you made can't be saved due to the temporary locking of the records by another user. Eh, come again? What user? Then I say OK to that then I get You tried to commit or rollback a transaction without first beginning a transaction. Again. Then I click OK, and sometimes that's the end of things, and sometimes it's just the beginning of my troubles. Painful. From jwcolby at colbyconsulting.com Mon Jul 4 11:13:11 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Mon, 04 Jul 2011 12:13:11 -0400 Subject: [AccessD] SSD, The Game Changer - SQL Man of Mystery - SQLServerCentral.com In-Reply-To: References: Message-ID: <4E11E697.9050301@colbyconsulting.com> Jim / Gustav, In any case it seems like a forced fit if it fits at all. I read the blogs and they are talking about responding to millions of reads / writes of massive quantities of text by massive quantities of users, using tens of thousands of machines to distribute the load. Look at the users and who are they? Search engines and social network sites. From the web site that Gustav posted: MongoDB? ?MongoDB (from "humongous") is a scalable, high-performance, open source, schema-free, document-oriented database.? I don't see how this describes me in any way. http://www.michaelckennedy.net/blog/2010/04/22/TheNoSQLMovementLINQAndMongoDBOhMy.aspx to quote: "This move towards NoSQL is driven by pressure from two angles in the web application world: * Ease-of-use and deployment * Performance - especially when there are many writers as compared to the number of readers (think Twitter or Facebook)." I don't see how this describes me in any way. I am not opposed to using this, however I have to see that it somehow fits and I don't see that. 1) I don't have tens of thousands of machines to distribute the load. And never will! 2) I don't have tens of thousands of users trying to simultaneously read / write to the data store. And never will! 3) I am not storing large quantities of text (think blog text, web page text, pictures etc) per read / write. And never will! 4) I don't have, nor do I wish to maintain a bunch of old / new PCs as a huge network. These guys (Google etc) build entire data centers with highly replicable computers, but they do so for scalability and replicability (redundancy). They also have a megawatt power line coming in to their data center. They also spend a couple of hundred million building the data center. They also have hundreds or thousands of programmers writing their code. How does any of that sound like me? 5) I have spent a year building a pretty sophisticated system for taking data in SQL Server, huge quantities of records, and getting them exported out of the data store into CSVs, through a VM / third party software, and then back in to the server (updating thousands of addresses when people move). I have custom software to build orders and get selected sets of name / address records out to fixed width files. The selection process depends entirely on where clauses - where age in ('1','2','3') and Income in ('a','b','c') and MOB = 'Y' and... This is SQL stuff. It requires an easily manipulatable SQL language. When something doesn't work I need to have an environment that I can cut and paste my sql statements and troubleshoot them. My data has never touched a web page. In fact 99.9999999% of my data has never even been seen by human eyes, other than when it was originally entered by each person typing their name / address into a web site sime time in the last 10 years. *None of that* sounds like these systems (to me). These systems are designed precisely to take pages of data typed in by millions of users and store them in an efficient manner, then pull the entire thing back out millions of times to display on a web browser. Jim, I think these systems are the cat's meow for the purpose they are intended for, but my data and the way I use my data is just not that paradigm. In the meantime I have already built a hardware / software system that does what I want, and I did it on a budget that is remarkably small. Long term I spend around 2% of my income on hardware. Perhaps even 1%. And I did it with myself and a 3 hour / day part time programmer. I really don't get that throwing all that away to start over with a database designed to fit Google's / Facebook's needs is a good thing to do. To be honest, if I were starting from scratch, I don't think it would be the right tool. The fact that it is a million times faster at what it does doesn't matter if what it does isn't what I do. John W. Colby www.ColbyConsulting.com On 7/4/2011 5:50 AM, Gustav Brock wrote: > Hi Jim > > But Casandra doesn't seem to be much .Net/C# friendly. Clients exist only for the old version 0.7, and both of these seem to provide nothing that come close to DataTableAdapters or the like (not to mention LINQ), only simple command-type access: > > http://aquiles.codeplex.com/ > > On the other hand, MongoDB seems to have proceeded further with NoRM: > > http://iridescence.no/post/NoSQL-Getting-started-with-MongoDB-and-NoRM.aspx > > /gustav > > >>>> accessd at shaw.ca 04-07-2011 05:10>>> > Inline: > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby > Sent: Sunday, July 03, 2011 2:41 PM > To: Access Developers discussion and problem solving > Subject: Re: [AccessD] SSD, The Game Changer - SQL Man of Mystery - > SQLServerCentral.com > > Jim, > > I read the first article and I don't see how it fits at all. > > * It fits very well. First in overview this database does not require a > single PC to run the database. It is distributive in nature so you can just > add nodes to a bunch of old new and old PCs. The main problem with the > database as you have it now is that it is dependant on the hardware of a > single box. Just like in 2006 the single CPU reached it maximum and > multi-core processors were then created. Cassandra runs like a multi-core > PC. When the database is running on numerous PCs it is like running a full > RAID. From BradM at blackforestltd.com Mon Jul 4 13:53:23 2011 From: BradM at blackforestltd.com (Brad Marks) Date: Mon, 4 Jul 2011 13:53:23 -0500 Subject: [AccessD] What is the best way to grab fields from a report detail line so that they can be accessed in VBA? References: Message-ID: All, I want to grab the value of fields from report detail lines. Here is the method that I finally got to work. I open the report with a line like this... DoCmd.OpenReport "Report1", acViewPreview, "", "", acNormal I then grab the fields in the "On Print" Event This works, but I would like to know if this is the best method to do this. ~ ~ ~ ~ There rest of the story... Here is what I am trying to accomplish. I have a number of Access 2007 reports that employ "dynamic filters" via the use of "Report View" and the "Where Condition" when the report is opened. In other words, the filters are applied at the report level and not at the underlying query level. (There are buttons on the reports which open up a small form that is used to collect "filter info" and then re-open the report with the appropriate "Where Condition" based on the "filter info") Now there is a need to export the report data to Excel. Because of the complex nature of the reports, they do not Export very nicely to Excel (I have tried several approaches). I know that I could easily export from the underlying queries to Excel, but this type of export would not take into account the filters that are applied at the report level. Therefore, to export the exact data on the reports to Excel, I have started to experiment with grabbing the data from the report as it is being built. This is not ideal, but I can't seem to find a better method. Maybe others have run into this issue and have a better approach. Thanks for your assistance. Brad From marksimms at verizon.net Mon Jul 4 19:56:37 2011 From: marksimms at verizon.net (Mark Simms) Date: Mon, 04 Jul 2011 20:56:37 -0400 Subject: [AccessD] How to tell a button's "air space" is no longer beinghovered over In-Reply-To: <471F6C8DAB244C66B0AB79536085B3EC@personal4a8ede> References: <003b01cc38f1$b62edca0$228c95e0$@gmail.com> <471F6C8DAB244C66B0AB79536085B3EC@personal4a8ede> Message-ID: <003301cc3aae$64e3e840$2eabb8c0$@net> Easier said than done. You must add logic to detect when the mouse is moving INTO the object airspace... And then logic to detect when the mouse is moving OUT OF the airspace. It's called "Mouseover". Another detail that MSFT omitted in Office VBA. Sure would have been nice to have a Mouseover event handler...right ? > -----Original Message----- > From: accessd-bounces at databaseadvisors.com [mailto:accessd- > bounces at databaseadvisors.com] On Behalf Of A.D. Tejpal > Sent: Monday, July 04, 2011 10:23 AM > To: Access Developers discussion and problem solving > Subject: Re: [AccessD] How to tell a button's "air space" is no longer > beinghovered over > > William, > > For detecting whether the mouse pointer has moved away from the > control in question, you can use the MouseMove event of form section to > which the said control belongs, for example: > > ' Code in form's module > '============================= > Private Sub Detail_MouseMove( _ > Button As Integer, Shift As Integer, _ > X As Single, Y As Single) > > ' <> > > End Sub > '-------------------------------------------- > > Private Sub FormFooter_MouseMove( _ > Button As Integer, Shift As Integer, _ > X As Single, Y As Single) > > ' <> > > End Sub > '-------------------------------------------- > > Private Sub FormHeader_MouseMove( _ > Button As Integer, Shift As Integer, _ > X As Single, Y As Single) > > ' <> > > End Sub > '============================= > From dbdoug at gmail.com Mon Jul 4 20:16:43 2011 From: dbdoug at gmail.com (Doug Steele) Date: Mon, 4 Jul 2011 18:16:43 -0700 Subject: [AccessD] What is the best way to grab fields from a report detail line so that they can be accessed in VBA? In-Reply-To: References: Message-ID: Brad, what I do in similar circumstances is build and save the 'Where' string in the filtering form. In code, I take the original SQL for the report recordsource and add the Where string to it. I then save this new SQL into a temporary query and export it to Excel. Doug On Mon, Jul 4, 2011 at 11:53 AM, Brad Marks wrote: > All, > > I want to grab the value of fields from report detail lines. > > Here is the method that I finally got to work. > > I open the report with a line like this... > > DoCmd.OpenReport "Report1", acViewPreview, "", "", acNormal > > I then grab the fields in the "On Print" Event > > This works, but I would like to know if this is the best method to do > this. > > ~ ~ ~ ~ > > There rest of the story... > > Here is what I am trying to accomplish. > > I have a number of Access 2007 reports that employ "dynamic filters" via > the use of "Report View" and the "Where Condition" when the report is > opened. ?In other words, the filters are applied at the report level and > not at the underlying query level. ?(There are buttons on the reports > which open up a small form that is used to collect "filter info" and > then re-open the report with the appropriate "Where Condition" based on > the "filter info") > > Now there is a need to export the report data to Excel. ?Because of the > complex nature of the reports, they do not Export very nicely to Excel > (I have tried several approaches). > > I know that I could easily export from the underlying queries to Excel, > but this type of export would not take into account the filters that are > applied at the report level. > > Therefore, to export the exact data on the reports to Excel, I have > started to experiment with grabbing the data from the report as it is > being built. ?This is not ideal, but I can't seem to find a better > method. > > Maybe others have run into this issue and have a better approach. > > Thanks for your assistance. > > Brad > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > From jwcolby at colbyconsulting.com Tue Jul 5 03:56:04 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Tue, 05 Jul 2011 04:56:04 -0400 Subject: [AccessD] Sourcegear vault free two developer license Message-ID: <4E12D1A4.1010809@colbyconsulting.com> I ran across this today. http://www.sqlservercentral.com/articles/Red+Gate+Software/74579/ http://promotions.sourcegear.com/vouchers/new/ -- John W. Colby www.ColbyConsulting.com From adtp at airtelmail.in Tue Jul 5 04:10:09 2011 From: adtp at airtelmail.in (A.D. Tejpal) Date: Tue, 5 Jul 2011 14:40:09 +0530 Subject: [AccessD] How to tell a button's "air space" is nolonger beinghovered over References: <003b01cc38f1$b62edca0$228c95e0$@gmail.com><471F6C8DAB244C66B0AB79536085B3EC@personal4a8ede> <002001cc3a5e$5428d240$fc7a76c0$@gmail.com> Message-ID: <8DD6228312434CD0940AE4E4807C4FF6@personal4a8ede> Bill, Apparently, in view of special positioning of control in question, you are looking for a solution that is self contained within control's MouseMove event. You could experiment with sample code given below: ' Code in form's module '============================== ' Declarations section Private gX As Single, gY As Single '--------------------------------------------- Private Sub CmdTest_MouseMove( _ Button As Integer, _ Shift As Integer, _ X As Single, Y As Single) With Me.CmdTest Me.CmdTest.Caption = "Test (MM)" If gX <> 0 Then If (X > (0.9 * .Width) And X > gX) _ Or (X < (0.1 * .Width) And _ X < gX) Then Me.CmdTest.Caption = "Test" End If End If If gY <> 0 Then If (Y > (0.9 * .Height) And Y > gY) _ Or (Y < (0.1 * .Height) And _ Y < gY) Then Me.CmdTest.Caption = "Test" End If End If End With gX = X gY = Y End Sub '============================== Normal caption of command button named CmdTest is "Test". When mouse pointer is brought over it, the caption changes to "Test (MM)". As & when the mouse pointer moves away from the control, the caption reverts back to normal, i.e. "Test". Note: (a) MouseMove event fires in rapid-fire style. Values for X and Y returned by this event have a range from 0 upto the width and height (in twips) of the control in question. (b) The multiplying factors of 0.9 and 0.1 used in the sample code could perhaps be fine tuned further (say 0.95 and 0.05) so as to narrow down the twilight zone. However a coarser setting as adopted above, is found conducive to more consistent behavior. This is because a deliberately wild mouse sweep by the user can result in X or Y value getting truncated short of the potential maximum, even though the mouse pointer has moved out. Best wishes, A.D. Tejpal ------------ ----- Original Message ----- From: William Benson (VBACreations.Com) To: 'Access Developers discussion and problem solving' Sent: Monday, July 04, 2011 20:53 Subject: Re: [AccessD] How to tell a button's "air space" is nolonger beinghovered over A.D., Other controls are too near the button's bottom and it's top edge is pretty much as .Top = 0. I have put the code in the other controls already, similar to what you wrote. I was wondering if there was a way like to test the mousemove if the coordinates are exactly on bottom or top or at either side of the button, based on X, Y, or whatever... and if so, the caption is treated as if the mouse were outside it, and if not, use the caption that pertains to the moust being inside. During a normal mousemove operation the user will be headed out or headed into the interior of the button, so -- if on the way out, the last code to execute will be to reset the caption -- if on the way in, the code executing (probably continuously) will be to set the caption appropriate for interior of button But I don't think it is possible to get the event to faithfully fire exactly as the mouse is going over the edge of the button. Thanks a lot, Bill -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of A.D. Tejpal Sent: Monday, July 04, 2011 10:23 AM To: Access Developers discussion and problem solving Subject: Re: [AccessD] How to tell a button's "air space" is no longer beinghovered over William, For detecting whether the mouse pointer has moved away from the control in question, you can use the MouseMove event of form section to which the said control belongs, for example: ' Code in form's module '============================= Private Sub Detail_MouseMove( _ Button As Integer, Shift As Integer, _ X As Single, Y As Single) ' <> End Sub '-------------------------------------------- Private Sub FormFooter_MouseMove( _ Button As Integer, Shift As Integer, _ X As Single, Y As Single) ' <> End Sub '-------------------------------------------- Private Sub FormHeader_MouseMove( _ Button As Integer, Shift As Integer, _ X As Single, Y As Single) ' <> End Sub '============================= Best wishes, A.D. Tejpal ------------ ----- Original Message ----- From: William Benson (VBACreations.Com) To: 'Access Developers discussion and problem solving' Sent: Sunday, July 03, 2011 01:23 Subject: [AccessD] How to tell a button's "air space" is no longer beinghovered over I have some code which changes the caption of a button when the user has the ctrl key pressed, set during the mousemove event for the button. I want however, that when the user leaves the "air space" for the button, then the caption reverts - regardless whether they still have shift held. I know I can use use the mousemove event associated with all surrounding controls to reset it, but I would like something more related to the control itself. Is there a method of testing that the user has moved the mouse outside the button's air space? I have a feeling I am going to be out of luck... From vbacreations at gmail.com Tue Jul 5 07:01:19 2011 From: vbacreations at gmail.com (William Benson (VBACreations.Com)) Date: Tue, 5 Jul 2011 08:01:19 -0400 Subject: [AccessD] How to tell a button's "air space" is nolonger beinghovered over In-Reply-To: <8DD6228312434CD0940AE4E4807C4FF6@personal4a8ede> References: <003b01cc38f1$b62edca0$228c95e0$@gmail.com><471F6C8DAB244C66B0AB79536085B3EC@personal4a8ede> <002001cc3a5e$5428d240$fc7a76c0$@gmail.com> <8DD6228312434CD0940AE4E4807C4FF6@personal4a8ede> Message-ID: <001201cc3b0b$40feef30$c2fccd90$@gmail.com> I tried your code A.D., it works pretty well. It occasionally misses when the button's edge is near the top (but not at the top) of its section and when another control is near the button's edge.. But it's great, thank you. -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of A.D. Tejpal Sent: Tuesday, July 05, 2011 5:10 AM To: Access Developers discussion and problem solving Subject: Re: [AccessD] How to tell a button's "air space" is nolonger beinghovered over Bill, Apparently, in view of special positioning of control in question, you are looking for a solution that is self contained within control's MouseMove event. You could experiment with sample code given below: ' Code in form's module '============================== ' Declarations section Private gX As Single, gY As Single '--------------------------------------------- Private Sub CmdTest_MouseMove( _ Button As Integer, _ Shift As Integer, _ X As Single, Y As Single) With Me.CmdTest Me.CmdTest.Caption = "Test (MM)" If gX <> 0 Then If (X > (0.9 * .Width) And X > gX) _ Or (X < (0.1 * .Width) And _ X < gX) Then Me.CmdTest.Caption = "Test" End If End If If gY <> 0 Then If (Y > (0.9 * .Height) And Y > gY) _ Or (Y < (0.1 * .Height) And _ Y < gY) Then Me.CmdTest.Caption = "Test" End If End If End With gX = X gY = Y End Sub '============================== Normal caption of command button named CmdTest is "Test". When mouse pointer is brought over it, the caption changes to "Test (MM)". As & when the mouse pointer moves away from the control, the caption reverts back to normal, i.e. "Test". Note: (a) MouseMove event fires in rapid-fire style. Values for X and Y returned by this event have a range from 0 upto the width and height (in twips) of the control in question. (b) The multiplying factors of 0.9 and 0.1 used in the sample code could perhaps be fine tuned further (say 0.95 and 0.05) so as to narrow down the twilight zone. However a coarser setting as adopted above, is found conducive to more consistent behavior. This is because a deliberately wild mouse sweep by the user can result in X or Y value getting truncated short of the potential maximum, even though the mouse pointer has moved out. Best wishes, A.D. Tejpal ------------ ----- Original Message ----- From: William Benson (VBACreations.Com) To: 'Access Developers discussion and problem solving' Sent: Monday, July 04, 2011 20:53 Subject: Re: [AccessD] How to tell a button's "air space" is nolonger beinghovered over A.D., Other controls are too near the button's bottom and it's top edge is pretty much as .Top = 0. I have put the code in the other controls already, similar to what you wrote. I was wondering if there was a way like to test the mousemove if the coordinates are exactly on bottom or top or at either side of the button, based on X, Y, or whatever... and if so, the caption is treated as if the mouse were outside it, and if not, use the caption that pertains to the moust being inside. During a normal mousemove operation the user will be headed out or headed into the interior of the button, so -- if on the way out, the last code to execute will be to reset the caption -- if on the way in, the code executing (probably continuously) will be to set the caption appropriate for interior of button But I don't think it is possible to get the event to faithfully fire exactly as the mouse is going over the edge of the button. Thanks a lot, Bill -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of A.D. Tejpal Sent: Monday, July 04, 2011 10:23 AM To: Access Developers discussion and problem solving Subject: Re: [AccessD] How to tell a button's "air space" is no longer beinghovered over William, For detecting whether the mouse pointer has moved away from the control in question, you can use the MouseMove event of form section to which the said control belongs, for example: ' Code in form's module '============================= Private Sub Detail_MouseMove( _ Button As Integer, Shift As Integer, _ X As Single, Y As Single) ' <> End Sub '-------------------------------------------- Private Sub FormFooter_MouseMove( _ Button As Integer, Shift As Integer, _ X As Single, Y As Single) ' <> End Sub '-------------------------------------------- Private Sub FormHeader_MouseMove( _ Button As Integer, Shift As Integer, _ X As Single, Y As Single) ' <> End Sub '============================= Best wishes, A.D. Tejpal ------------ ----- Original Message ----- From: William Benson (VBACreations.Com) To: 'Access Developers discussion and problem solving' Sent: Sunday, July 03, 2011 01:23 Subject: [AccessD] How to tell a button's "air space" is no longer beinghovered over I have some code which changes the caption of a button when the user has the ctrl key pressed, set during the mousemove event for the button. I want however, that when the user leaves the "air space" for the button, then the caption reverts - regardless whether they still have shift held. I know I can use use the mousemove event associated with all surrounding controls to reset it, but I would like something more related to the control itself. Is there a method of testing that the user has moved the mouse outside the button's air space? I have a feeling I am going to be out of luck... -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From BradM at blackforestltd.com Tue Jul 5 07:18:24 2011 From: BradM at blackforestltd.com (Brad Marks) Date: Tue, 5 Jul 2011 07:18:24 -0500 Subject: [AccessD] What is the best way to grab fields from a report detail line so that they can be accessed in VBA? References: Message-ID: Doug, Thanks for the advice. I may need to go down this path. Because of the complexity of the reports and underlying queries, I was hesitant to change the underlying queries. The idea of creating a temporary query is something that I had not considered. Thanks again, Brad -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Doug Steele Sent: Monday, July 04, 2011 8:17 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] What is the best way to grab fields from a report detail line so that they can be accessed in VBA? Brad, what I do in similar circumstances is build and save the 'Where' string in the filtering form. In code, I take the original SQL for the report recordsource and add the Where string to it. I then save this new SQL into a temporary query and export it to Excel. Doug On Mon, Jul 4, 2011 at 11:53 AM, Brad Marks wrote: > All, > > I want to grab the value of fields from report detail lines. > > Here is the method that I finally got to work. > > I open the report with a line like this... > > DoCmd.OpenReport "Report1", acViewPreview, "", "", acNormal > > I then grab the fields in the "On Print" Event > > This works, but I would like to know if this is the best method to do > this. > > ~ ~ ~ ~ > > There rest of the story... > > Here is what I am trying to accomplish. > > I have a number of Access 2007 reports that employ "dynamic filters" via > the use of "Report View" and the "Where Condition" when the report is > opened. ?In other words, the filters are applied at the report level and > not at the underlying query level. ?(There are buttons on the reports > which open up a small form that is used to collect "filter info" and > then re-open the report with the appropriate "Where Condition" based on > the "filter info") > > Now there is a need to export the report data to Excel. ?Because of the > complex nature of the reports, they do not Export very nicely to Excel > (I have tried several approaches). > > I know that I could easily export from the underlying queries to Excel, > but this type of export would not take into account the filters that are > applied at the report level. > > Therefore, to export the exact data on the reports to Excel, I have > started to experiment with grabbing the data from the report as it is > being built. ?This is not ideal, but I can't seem to find a better > method. > > Maybe others have run into this issue and have a better approach. > > Thanks for your assistance. > > Brad > > -- > 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 has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. From df.waters at comcast.net Tue Jul 5 07:45:01 2011 From: df.waters at comcast.net (Dan Waters) Date: Tue, 5 Jul 2011 07:45:01 -0500 Subject: [AccessD] Sourcegear vault free two developer license In-Reply-To: <4E12D1A4.1010809@colbyconsulting.com> References: <4E12D1A4.1010809@colbyconsulting.com> Message-ID: <001d01cc3b11$5c1bf280$1453d780$@comcast.net> Is a version control system useful for a single developer? I noticed that this offer is for 2 developers, assuming that it would help more than one developer. -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Tuesday, July 05, 2011 3:56 AM To: Access Developers discussion and problem solving; VBA; Sqlserver-Dba Subject: [AccessD] Sourcegear vault free two developer license I ran across this today. http://www.sqlservercentral.com/articles/Red+Gate+Software/74579/ http://promotions.sourcegear.com/vouchers/new/ -- John W. Colby www.ColbyConsulting.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From jwcolby at colbyconsulting.com Tue Jul 5 08:46:08 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Tue, 05 Jul 2011 09:46:08 -0400 Subject: [AccessD] Sourcegear vault free two developer license In-Reply-To: <001d01cc3b11$5c1bf280$1453d780$@comcast.net> References: <4E12D1A4.1010809@colbyconsulting.com> <001d01cc3b11$5c1bf280$1453d780$@comcast.net> Message-ID: <4E1315A0.1010005@colbyconsulting.com> http://en.wikipedia.org/wiki/Revision_control John W. Colby www.ColbyConsulting.com On 7/5/2011 8:45 AM, Dan Waters wrote: > Is a version control system useful for a single developer? I noticed that > this offer is for 2 developers, assuming that it would help more than one > developer. > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby > Sent: Tuesday, July 05, 2011 3:56 AM > To: Access Developers discussion and problem solving; VBA; Sqlserver-Dba > Subject: [AccessD] Sourcegear vault free two developer license > > I ran across this today. > > http://www.sqlservercentral.com/articles/Red+Gate+Software/74579/ > http://promotions.sourcegear.com/vouchers/new/ > From charlotte.foust at gmail.com Tue Jul 5 09:54:05 2011 From: charlotte.foust at gmail.com (Charlotte Foust) Date: Tue, 5 Jul 2011 07:54:05 -0700 Subject: [AccessD] Sourcegear vault free two developer license In-Reply-To: <001d01cc3b11$5c1bf280$1453d780$@comcast.net> References: <4E12D1A4.1010809@colbyconsulting.com> <001d01cc3b11$5c1bf280$1453d780$@comcast.net> Message-ID: Yes it is, especially SourceGear Vault. Vault allows you to maintain multiple versions of an application, so you can try something out and then roll back just one part of it if your brilliant idea for something falls on its face. It is very similar in usage to SourceSafe but it has some nifty features that make it well worthwhile. Charlotte Foust On Tue, Jul 5, 2011 at 5:45 AM, Dan Waters wrote: > Is a version control system useful for a single developer? I noticed that > this offer is for 2 developers, assuming that it would help more than one > developer. > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby > Sent: Tuesday, July 05, 2011 3:56 AM > To: Access Developers discussion and problem solving; VBA; Sqlserver-Dba > Subject: [AccessD] Sourcegear vault free two developer license > > I ran across this today. > > http://www.sqlservercentral.com/articles/Red+Gate+Software/74579/ > > > http://promotions.sourcegear.com/vouchers/new/ > > > > -- > John W. Colby > www.ColbyConsulting.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 jwcolby at colbyconsulting.com Tue Jul 5 10:52:37 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Tue, 05 Jul 2011 11:52:37 -0400 Subject: [AccessD] Sourcegear vault free two developer license In-Reply-To: References: <4E12D1A4.1010809@colbyconsulting.com> <001d01cc3b11$5c1bf280$1453d780$@comcast.net> Message-ID: <4E133345.2060102@colbyconsulting.com> Does anyone have it working with Access? John W. Colby www.ColbyConsulting.com On 7/5/2011 10:54 AM, Charlotte Foust wrote: > Yes it is, especially SourceGear Vault. Vault allows you to maintain > multiple versions of an application, so you can try something out and then > roll back just one part of it if your brilliant idea for something falls on > its face. It is very similar in usage to SourceSafe but it has some nifty > features that make it well worthwhile. > > Charlotte Foust > > On Tue, Jul 5, 2011 at 5:45 AM, Dan Waters wrote: > >> Is a version control system useful for a single developer? I noticed that >> this offer is for 2 developers, assuming that it would help more than one >> developer. >> >> -----Original Message----- >> From: accessd-bounces at databaseadvisors.com >> [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby >> Sent: Tuesday, July 05, 2011 3:56 AM >> To: Access Developers discussion and problem solving; VBA; Sqlserver-Dba >> Subject: [AccessD] Sourcegear vault free two developer license >> >> I ran across this today. >> >> http://www.sqlservercentral.com/articles/Red+Gate+Software/74579/ >> >> >> http://promotions.sourcegear.com/vouchers/new/ >> >> >> >> -- >> John W. Colby >> www.ColbyConsulting.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 charlotte.foust at gmail.com Tue Jul 5 10:59:25 2011 From: charlotte.foust at gmail.com (Charlotte Foust) Date: Tue, 5 Jul 2011 08:59:25 -0700 Subject: [AccessD] Sourcegear vault free two developer license In-Reply-To: <4E133345.2060102@colbyconsulting.com> References: <4E12D1A4.1010809@colbyconsulting.com> <001d01cc3b11$5c1bf280$1453d780$@comcast.net> <4E133345.2060102@colbyconsulting.com> Message-ID: I believe there is a widget you need, a bit like the one for SourceSafe, in order to make it work as you might expect with Access, but we only used it with .Net, so I'm not a definitive source for that answer. Charlotte Foust On Tue, Jul 5, 2011 at 8:52 AM, jwcolby wrote: > Does anyone have it working with Access? > > > John W. Colby > www.ColbyConsulting.com > > > > On 7/5/2011 10:54 AM, Charlotte Foust wrote: > >> Yes it is, especially SourceGear Vault. Vault allows you to maintain >> multiple versions of an application, so you can try something out and then >> roll back just one part of it if your brilliant idea for something falls >> on >> its face. It is very similar in usage to SourceSafe but it has some nifty >> features that make it well worthwhile. >> >> Charlotte Foust >> >> On Tue, Jul 5, 2011 at 5:45 AM, Dan Waters wrote: >> >> Is a version control system useful for a single developer? I noticed >>> that >>> this offer is for 2 developers, assuming that it would help more than one >>> developer. >>> >>> -----Original Message----- >>> From: accessd-bounces@**databaseadvisors.com >>> [mailto:accessd-bounces@**databaseadvisors.com] >>> On Behalf Of jwcolby >>> Sent: Tuesday, July 05, 2011 3:56 AM >>> To: Access Developers discussion and problem solving; VBA; Sqlserver-Dba >>> Subject: [AccessD] Sourcegear vault free two developer license >>> >>> I ran across this today. >>> >>> http://www.sqlservercentral.**com/articles/Red+Gate+**Software/74579/ >>> >>> >>> >>> >>> http://promotions.sourcegear.**com/vouchers/new/ >>> >>> >>> >>> >>> >>> -- >>> John W. Colby >>> www.ColbyConsulting.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 EdTesiny at oasas.ny.gov Tue Jul 5 12:09:56 2011 From: EdTesiny at oasas.ny.gov (Tesiny, Ed) Date: Tue, 5 Jul 2011 13:09:56 -0400 Subject: [AccessD] Emailing an .mde Message-ID: Hi All, I'm trying to email a database frontend, of course our system blocks it. Is there an extension that is fairly neutral, I tried .doc with one person last week and that worked but it isn't working with the person I trying to distribute to today. Any suggestions? TIA Ed Edward P. Tesiny Director of Evaluation and Outcomes Management New York State OASAS 1450 Western Avenue Albany, NY 12203 Phone: (518) 485-2322 Fax: (518) 485-5228 EdTesiny at oasas.ny.gov IMPORTANT: This E-mail may contain confidential material for the sole use of the intended recipient. The use, distribution, transmittal or re-transmittal by an unintended recipient of any communication is prohibited without our express approval in writing or by e-mail. Any use, distribution, transmittal or re-transmittal by persons who are not intended recipients of this e-mail may be a violation of law and is strictly prohibited. If you are not the intended recipient please contact the sender and delete all copies. E-mail transmission cannot be guaranteed to be secure or error-free. The sender therefore does not accept liability for any errors or omissions in the contents of this transmission. All e-mails sent to or from NYS OASAS are to be used for our business purposes only. E-mails sent from or to NYS OASAS are subject to review by the Agency. From jimdettman at verizon.net Tue Jul 5 12:23:46 2011 From: jimdettman at verizon.net (Jim Dettman) Date: Tue, 05 Jul 2011 13:23:46 -0400 Subject: [AccessD] Emailing an .mde In-Reply-To: References: Message-ID: <7DEE0381D70E4361A351C1E6B4625F24@XPS> Ed, .ed Jim. -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Tesiny, Ed Sent: Tuesday, July 05, 2011 01:10 PM To: Access Developers discussion and problem solving; Off Topic Subject: [AccessD] Emailing an .mde Hi All, I'm trying to email a database frontend, of course our system blocks it. Is there an extension that is fairly neutral, I tried .doc with one person last week and that worked but it isn't working with the person I trying to distribute to today. Any suggestions? TIA Ed Edward P. Tesiny Director of Evaluation and Outcomes Management New York State OASAS 1450 Western Avenue Albany, NY 12203 Phone: (518) 485-2322 Fax: (518) 485-5228 EdTesiny at oasas.ny.gov IMPORTANT: This E-mail may contain confidential material for the sole use of the intended recipient. The use, distribution, transmittal or re-transmittal by an unintended recipient of any communication is prohibited without our express approval in writing or by e-mail. Any use, distribution, transmittal or re-transmittal by persons who are not intended recipients of this e-mail may be a violation of law and is strictly prohibited. If you are not the intended recipient please contact the sender and delete all copies. E-mail transmission cannot be guaranteed to be secure or error-free. The sender therefore does not accept liability for any errors or omissions in the contents of this transmission. All e-mails sent to or from NYS OASAS are to be used for our business purposes only. E-mails sent from or to NYS OASAS are subject to review by the Agency. -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From fuller.artful at gmail.com Tue Jul 5 13:04:16 2011 From: fuller.artful at gmail.com (Arthur Fuller) Date: Tue, 5 Jul 2011 14:04:16 -0400 Subject: [AccessD] Emailing an .mde In-Reply-To: References: Message-ID: Just rename it to MyFile.mdee and tell the recipient to name it back upon receipt. HTH. Arthur On Tue, Jul 5, 2011 at 1:09 PM, Tesiny, Ed wrote: > Hi All, > > I'm trying to email a database frontend, of course our system blocks it. > Is there an extension that is fairly neutral, I tried .doc with one > person last week and that worked but it isn't working with the person I > trying to distribute to today. Any suggestions? > > TIA > > Ed > > > > Edward P. Tesiny > > Director of Evaluation and Outcomes Management > > New York State OASAS > > 1450 Western Avenue > > Albany, NY 12203 > > Phone: (518) 485-2322 > > Fax: (518) 485-5228 > > EdTesiny at oasas.ny.gov > > > > IMPORTANT: This E-mail may contain confidential material for the sole > use of the intended recipient. The use, distribution, transmittal or > re-transmittal by an unintended recipient of any communication is > prohibited without our express approval in writing or by e-mail. Any > use, distribution, transmittal or re-transmittal by persons who are not > intended recipients of this e-mail may be a violation of law and is > strictly prohibited. If you are not the intended recipient please > contact the sender and delete all copies. E-mail transmission cannot be > guaranteed to be secure or error-free. The sender therefore does not > accept liability for any errors or omissions in the contents of this > transmission. All e-mails sent to or from NYS OASAS are to be used for > our business purposes only. E-mails sent from or to NYS OASAS are > subject to review by the Agency. > > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > From fuller.artful at gmail.com Tue Jul 5 13:06:09 2011 From: fuller.artful at gmail.com (Arthur Fuller) Date: Tue, 5 Jul 2011 14:06:09 -0400 Subject: [AccessD] Sourcegear vault free two developer license In-Reply-To: <001d01cc3b11$5c1bf280$1453d780$@comcast.net> References: <4E12D1A4.1010809@colbyconsulting.com> <001d01cc3b11$5c1bf280$1453d780$@comcast.net> Message-ID: Since I've completely eliminated all my programming errors and second thoughts, I no longer need version control. LOL. I need Developer Control. A. On Tue, Jul 5, 2011 at 8:45 AM, Dan Waters wrote: > Is a version control system useful for a single developer? I noticed that > this offer is for 2 developers, assuming that it would help more than one > developer. > > From adtp at airtelmail.in Tue Jul 5 13:07:22 2011 From: adtp at airtelmail.in (A.D. Tejpal) Date: Tue, 5 Jul 2011 23:37:22 +0530 Subject: [AccessD] How to tell a button's "air space"is nolonger beinghovered over References: <003b01cc38f1$b62edca0$228c95e0$@gmail.com><471F6C8DAB244C66B0AB79536085B3EC@personal4a8ede> <002001cc3a5e$5428d240$fc7a76c0$@gmail.com><8DD6228312434CD0940AE4E4807C4FF6@personal4a8ede> <001201cc3b0b$40feef30$c2fccd90$@gmail.com> Message-ID: You are most welcome Bill! ps: Last month you were seeking a solution for synchronized scrolling of a pair of subforms. Does the problem stand resolved ? Best wishes, A.D. Tejpal ------------ ----- Original Message ----- From: William Benson (VBACreations.Com) To: 'Access Developers discussion and problem solving' Sent: Tuesday, July 05, 2011 17:31 Subject: Re: [AccessD] How to tell a button's "air space"is nolonger beinghovered over I tried your code A.D., it works pretty well. It occasionally misses when the button's edge is near the top (but not at the top) of its section and when another control is near the button's edge.. But it's great, thank you. -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of A.D. Tejpal Sent: Tuesday, July 05, 2011 5:10 AM To: Access Developers discussion and problem solving Subject: Re: [AccessD] How to tell a button's "air space" is nolonger beinghovered over Bill, Apparently, in view of special positioning of control in question, you are looking for a solution that is self contained within control's MouseMove event. You could experiment with sample code given below: ' Code in form's module '============================== ' Declarations section Private gX As Single, gY As Single '--------------------------------------------- Private Sub CmdTest_MouseMove( _ Button As Integer, _ Shift As Integer, _ X As Single, Y As Single) With Me.CmdTest Me.CmdTest.Caption = "Test (MM)" If gX <> 0 Then If (X > (0.9 * .Width) And X > gX) _ Or (X < (0.1 * .Width) And _ X < gX) Then Me.CmdTest.Caption = "Test" End If End If If gY <> 0 Then If (Y > (0.9 * .Height) And Y > gY) _ Or (Y < (0.1 * .Height) And _ Y < gY) Then Me.CmdTest.Caption = "Test" End If End If End With gX = X gY = Y End Sub '============================== Normal caption of command button named CmdTest is "Test". When mouse pointer is brought over it, the caption changes to "Test (MM)". As & when the mouse pointer moves away from the control, the caption reverts back to normal, i.e. "Test". Note: (a) MouseMove event fires in rapid-fire style. Values for X and Y returned by this event have a range from 0 upto the width and height (in twips) of the control in question. (b) The multiplying factors of 0.9 and 0.1 used in the sample code could perhaps be fine tuned further (say 0.95 and 0.05) so as to narrow down the twilight zone. However a coarser setting as adopted above, is found conducive to more consistent behavior. This is because a deliberately wild mouse sweep by the user can result in X or Y value getting truncated short of the potential maximum, even though the mouse pointer has moved out. Best wishes, A.D. Tejpal ------------ From dw-murphy at cox.net Tue Jul 5 13:23:02 2011 From: dw-murphy at cox.net (Doug Murphy) Date: Tue, 5 Jul 2011 11:23:02 -0700 Subject: [AccessD] Emailing an .mde In-Reply-To: References: Message-ID: <004701cc3b40$936642c0$ba32c840$@cox.net> Ed, My approach is to zip the file. Most email systems accept zipped files. The challenge is to make sure the person receiving the file actually unzips it instead of trying to run it from Windows explorer while in the zipped format. Doug -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Tesiny, Ed Sent: Tuesday, July 05, 2011 10:10 AM To: Access Developers discussion and problem solving; Off Topic Subject: [AccessD] Emailing an .mde Hi All, I'm trying to email a database frontend, of course our system blocks it. Is there an extension that is fairly neutral, I tried .doc with one person last week and that worked but it isn't working with the person I trying to distribute to today. Any suggestions? TIA Ed Edward P. Tesiny Director of Evaluation and Outcomes Management New York State OASAS 1450 Western Avenue Albany, NY 12203 Phone: (518) 485-2322 Fax: (518) 485-5228 EdTesiny at oasas.ny.gov IMPORTANT: This E-mail may contain confidential material for the sole use of the intended recipient. The use, distribution, transmittal or re-transmittal by an unintended recipient of any communication is prohibited without our express approval in writing or by e-mail. Any use, distribution, transmittal or re-transmittal by persons who are not intended recipients of this e-mail may be a violation of law and is strictly prohibited. If you are not the intended recipient please contact the sender and delete all copies. E-mail transmission cannot be guaranteed to be secure or error-free. The sender therefore does not accept liability for any errors or omissions in the contents of this transmission. All e-mails sent to or from NYS OASAS are to be used for our business purposes only. E-mails sent from or to NYS OASAS are subject to review by the Agency. -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From dbdoug at gmail.com Tue Jul 5 13:34:36 2011 From: dbdoug at gmail.com (Doug Steele) Date: Tue, 5 Jul 2011 11:34:36 -0700 Subject: [AccessD] Emailing an .mde In-Reply-To: <004701cc3b40$936642c0$ba32c840$@cox.net> References: <004701cc3b40$936642c0$ba32c840$@cox.net> Message-ID: Exchange Server can be configured to look inside a .zip archive and delete any 'dangerous' files. My solution to this problem is to upload the file Box.net and email a link to the file so the user can download it directly. Doug On Tue, Jul 5, 2011 at 11:23 AM, Doug Murphy wrote: > Ed, > > My approach is to zip the file. Most email systems accept zipped files. The > challenge is to make sure the person receiving the file actually unzips it > instead of trying to run it from Windows explorer while in the zipped > format. > > Doug > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Tesiny, Ed > Sent: Tuesday, July 05, 2011 10:10 AM > To: Access Developers discussion and problem solving; Off Topic > Subject: [AccessD] Emailing an .mde > > Hi All, > > I'm trying to email a database frontend, of course our system blocks it. > Is there an extension that is fairly neutral, I tried .doc with one person > last week and that worked but it isn't working with the person I trying to > distribute to today. ?Any suggestions? > > TIA > > Ed > > > > Edward P. Tesiny > > Director of Evaluation and Outcomes Management > > New York State OASAS > > 1450 Western Avenue > > Albany, NY 12203 > > Phone: ?(518) 485-2322 > > Fax: ?(518) 485-5228 > > EdTesiny at oasas.ny.gov > > > > IMPORTANT: ?This E-mail may contain confidential material for the sole use > of the intended recipient. ?The use, distribution, transmittal or > re-transmittal by an unintended recipient of any communication is prohibited > without our express approval in writing or by e-mail. ?Any use, > distribution, transmittal or re-transmittal by persons who are not intended > recipients of this e-mail may be a violation of law and is > strictly prohibited. ? If you are not the intended recipient please > contact the sender and delete all copies. ?E-mail transmission cannot be > guaranteed to be secure or error-free. ? The sender therefore does not > accept liability for any errors or omissions in the contents of this > transmission. ? All e-mails sent to or from NYS OASAS are to be used for > our business purposes only. ?E-mails sent from or to NYS OASAS are subject > to review by the Agency. > > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > From fuller.artful at gmail.com Tue Jul 5 13:36:26 2011 From: fuller.artful at gmail.com (Arthur Fuller) Date: Tue, 5 Jul 2011 14:36:26 -0400 Subject: [AccessD] Emailing an .mde In-Reply-To: <004701cc3b40$936642c0$ba32c840$@cox.net> References: <004701cc3b40$936642c0$ba32c840$@cox.net> Message-ID: Some email systems look inside sent zips to verify that they don't contain executables. That's why I rename the file. Typically I then zip the renamed file and plonk in a readme that tells the recipient to rename it back. A. On Tue, Jul 5, 2011 at 2:23 PM, Doug Murphy wrote: > Ed, > > My approach is to zip the file. Most email systems accept zipped files. The > challenge is to make sure the person receiving the file actually unzips it > instead of trying to run it from Windows explorer while in the zipped > format. > > Doug > From DWUTKA at Marlow.com Tue Jul 5 13:45:11 2011 From: DWUTKA at Marlow.com (Drew Wutka) Date: Tue, 5 Jul 2011 13:45:11 -0500 Subject: [AccessD] Walk the DB Using ADO In-Reply-To: References: Message-ID: Sorry I don't have this code exactly as you have here. But what you need to do is actually all in recordsets. You use a SCHEMA query to get the list of tables (you can get columns this way if you want, too). And then you use properties of the field to get other values (like field name, value, constraints, etc). Drew -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Arthur Fuller Sent: Saturday, July 02, 2011 12:06 PM To: Access Developers discussion and problem solving Subject: [AccessD] Walk the DB Using ADO I know that I've written this code before, but due to a plethora of backup CDs and my habit of pruning what is not currently necessary from the current situation(s), I can't find the relevant code. And besides, I'm currently semi-retired, and working in hobbyist most not billable mode. Here's what I need, in ADO format if possible: For each t in CurrentDB( Tables ) For each f in t.fields For each a in f.Attributes ' could be Properties not Attributes Debug.Print a.Name, a.Value Next Next Next TIA, Arthur P.S. For years and years and years, I have used Rick Fisher's FindAndReplace, but now it's failing on me due to (I think) the fact that I'm running a 64-bit Windows, which doesn't like what he offers to install. In my retirement mode, I cannot afford to purchase more software. Maybe I could run a Windows 32-bit version of everything, then run F&R, then do what I need to do, then import the results back into 64-bit. Yuck. -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com The information contained in this transmission is intended only for the person or entity to which it is addressed and may contain II-VI Proprietary and/or II-VI Business Sensitive material. If you are not the intended recipient, please contact the sender immediately and destroy the material in its entirety, whether electronic or hard copy. You are notified that any review, retransmission, copying, disclosure, dissemination, or other use of, or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. From dw-murphy at cox.net Tue Jul 5 13:57:08 2011 From: dw-murphy at cox.net (Doug Murphy) Date: Tue, 5 Jul 2011 11:57:08 -0700 Subject: [AccessD] Emailing an .mde In-Reply-To: References: <004701cc3b40$936642c0$ba32c840$@cox.net> Message-ID: <005a01cc3b45$5716b570$05442050$@cox.net> The zip file works with most email systems. The only one that seemed to look inside the zip file, in my limited experience, is Gmail. For that system I just reverse the extension piz. Even Gmail seems to accept the Access files now, but maybe they have not entered accdb in their system yet. I zip all files I email just to reduce size. For large files I use USendIt. -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Arthur Fuller Sent: Tuesday, July 05, 2011 11:36 AM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Emailing an .mde Some email systems look inside sent zips to verify that they don't contain executables. That's why I rename the file. Typically I then zip the renamed file and plonk in a readme that tells the recipient to rename it back. A. On Tue, Jul 5, 2011 at 2:23 PM, Doug Murphy wrote: > Ed, > > My approach is to zip the file. Most email systems accept zipped > files. The challenge is to make sure the person receiving the file > actually unzips it instead of trying to run it from Windows explorer > while in the zipped format. > > Doug > -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From jwcolby at colbyconsulting.com Tue Jul 5 13:59:13 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Tue, 05 Jul 2011 14:59:13 -0400 Subject: [AccessD] Sourcegear vault free two developer license In-Reply-To: References: <4E12D1A4.1010809@colbyconsulting.com> <001d01cc3b11$5c1bf280$1453d780$@comcast.net> Message-ID: <4E135F01.4010505@colbyconsulting.com> LOL. Why didn't I think of that? All that time wasted. John W. Colby www.ColbyConsulting.com On 7/5/2011 2:06 PM, Arthur Fuller wrote: > Since I've completely eliminated all my programming errors and second > thoughts, I no longer need version control. LOL. I need Developer Control. > > A. > > On Tue, Jul 5, 2011 at 8:45 AM, Dan Waters wrote: > >> Is a version control system useful for a single developer? I noticed that >> this offer is for 2 developers, assuming that it would help more than one >> developer. >> >> From vbacreations at gmail.com Tue Jul 5 14:02:23 2011 From: vbacreations at gmail.com (William Benson (VBACreations.Com)) Date: Tue, 5 Jul 2011 15:02:23 -0400 Subject: [AccessD] Walk the DB Using ADO In-Reply-To: References: Message-ID: <001901cc3b46$133212e0$399638a0$@gmail.com> >> that I'm running a 64-bit Windows Need that in retirement mode eh? :-) -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Arthur Fuller Sent: Saturday, July 02, 2011 1:06 PM To: Access Developers discussion and problem solving Subject: [AccessD] Walk the DB Using ADO I know that I've written this code before, but due to a plethora of backup CDs and my habit of pruning what is not currently necessary from the current situation(s), I can't find the relevant code. And besides, I'm currently semi-retired, and working in hobbyist most not billable mode. Here's what I need, in ADO format if possible: For each t in CurrentDB( Tables ) For each f in t.fields For each a in f.Attributes ' could be Properties not Attributes Debug.Print a.Name, a.Value Next Next Next TIA, Arthur P.S. For years and years and years, I have used Rick Fisher's FindAndReplace, but now it's failing on me due to (I think) the fact that I'm running a 64-bit Windows, which doesn't like what he offers to install. In my retirement mode, I cannot afford to purchase more software. Maybe I could run a Windows 32-bit version of everything, then run F&R, then do what I need to do, then import the results back into 64-bit. Yuck. -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From EdTesiny at oasas.ny.gov Tue Jul 5 14:48:32 2011 From: EdTesiny at oasas.ny.gov (Tesiny, Ed) Date: Tue, 5 Jul 2011 15:48:32 -0400 Subject: [AccessD] Emailing an .mde In-Reply-To: <005a01cc3b45$5716b570$05442050$@cox.net> References: <004701cc3b40$936642c0$ba32c840$@cox.net> <005a01cc3b45$5716b570$05442050$@cox.net> Message-ID: I got the mde on her desktop but can't map here to the right folder. I think IT needs to fix her permissions...but they have been a little busy as our building was hit by lightening on Sunday morning. :-( Ed Tesiny EdTesiny at oasas.ny.gov -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Doug Murphy Sent: Tuesday, July 05, 2011 2:57 PM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Emailing an .mde The zip file works with most email systems. The only one that seemed to look inside the zip file, in my limited experience, is Gmail. For that system I just reverse the extension piz. Even Gmail seems to accept the Access files now, but maybe they have not entered accdb in their system yet. I zip all files I email just to reduce size. For large files I use USendIt. -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Arthur Fuller Sent: Tuesday, July 05, 2011 11:36 AM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Emailing an .mde Some email systems look inside sent zips to verify that they don't contain executables. That's why I rename the file. Typically I then zip the renamed file and plonk in a readme that tells the recipient to rename it back. A. On Tue, Jul 5, 2011 at 2:23 PM, Doug Murphy wrote: > Ed, > > My approach is to zip the file. Most email systems accept zipped > files. The challenge is to make sure the person receiving the file > actually unzips it instead of trying to run it from Windows explorer > while in the zipped format. > > Doug > -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From fuller.artful at gmail.com Tue Jul 5 14:57:57 2011 From: fuller.artful at gmail.com (Arthur Fuller) Date: Tue, 5 Jul 2011 15:57:57 -0400 Subject: [AccessD] Walk the DB Using ADO In-Reply-To: References: Message-ID: Thanks, Drew. I'll give that a shot. It's been a while since I looked carefully at the ADO model for other than typical recordset operations.. I seem to recall that somewhere I have a diagram of it, and even a DAO->ADO conversion chart. Time to start perusing the documents directories. A. On Tue, Jul 5, 2011 at 2:45 PM, Drew Wutka wrote: > Sorry I don't have this code exactly as you have here. But what you > need to do is actually all in recordsets. > > You use a SCHEMA query to get the list of tables (you can get columns > this way if you want, too). And then you use properties of the field to > get other values (like field name, value, constraints, etc). > > Drew > > From DWUTKA at Marlow.com Tue Jul 5 15:07:59 2011 From: DWUTKA at Marlow.com (Drew Wutka) Date: Tue, 5 Jul 2011 15:07:59 -0500 Subject: [AccessD] Walk the DB Using ADO In-Reply-To: References: Message-ID: Would you like me to send my VB6 Add-on to you off list, which lets me create 'data classes'? It has code to pull the tables and fields from a data source using ADO. Drew -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Arthur Fuller Sent: Tuesday, July 05, 2011 2:58 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Walk the DB Using ADO Thanks, Drew. I'll give that a shot. It's been a while since I looked carefully at the ADO model for other than typical recordset operations.. I seem to recall that somewhere I have a diagram of it, and even a DAO->ADO conversion chart. Time to start perusing the documents directories. A. On Tue, Jul 5, 2011 at 2:45 PM, Drew Wutka wrote: > Sorry I don't have this code exactly as you have here. But what you > need to do is actually all in recordsets. > > You use a SCHEMA query to get the list of tables (you can get columns > this way if you want, too). And then you use properties of the field to > get other values (like field name, value, constraints, etc). > > Drew > > -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com The information contained in this transmission is intended only for the person or entity to which it is addressed and may contain II-VI Proprietary and/or II-VI Business Sensitive material. If you are not the intended recipient, please contact the sender immediately and destroy the material in its entirety, whether electronic or hard copy. You are notified that any review, retransmission, copying, disclosure, dissemination, or other use of, or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. From fuller.artful at gmail.com Tue Jul 5 15:14:47 2011 From: fuller.artful at gmail.com (Arthur Fuller) Date: Tue, 5 Jul 2011 16:14:47 -0400 Subject: [AccessD] Walk the DB Using ADO In-Reply-To: References: Message-ID: Does it require that I have VB6 installed? I suppose I could do that, but at the moment I have only the .NET stuff installed. Sounds like a good add-in, though. A. On Tue, Jul 5, 2011 at 4:07 PM, Drew Wutka wrote: > Would you like me to send my VB6 Add-on to you off list, which lets me > create 'data classes'? It has code to pull the tables and fields from a > data source using ADO. > > Drew > From DWUTKA at Marlow.com Tue Jul 5 15:25:33 2011 From: DWUTKA at Marlow.com (Drew Wutka) Date: Tue, 5 Jul 2011 15:25:33 -0500 Subject: [AccessD] Walk the DB Using ADO In-Reply-To: References: Message-ID: Think I can do this in list. Here are the three relevant functions you should be able to get what you need from them. Private Sub lstTables_Click() Dim cnn As ADODB.Connection Dim rs As ADODB.Recordset Dim i As Long Me.lstFields.Clear If DBConnect(cnn) Then Set rs = New ADODB.Recordset rs.Open Me.lstTables.List(Me.lstTables.ListIndex), cnn, adOpenKeyset, adLockReadOnly, adCmdTableDirect For i = 0 To rs.Fields.Count - 1 Me.lstFields.AddItem rs.Fields(i).Name Next i rs.Close Set rs = Nothing cnn.Close Set cnn = Nothing End If End Sub Function GetDBTables() On Error GoTo ErrorHandler Dim cnn As ADODB.Connection Dim rs As ADODB.Recordset If DBConnect(cnn) Then Set rs = cnn.OpenSchema(adSchemaTables) Me.lstTables.Clear rs.MoveFirst Do Until rs.EOF = True If Me.optTables Then If rs.Fields("TABLE_TYPE") = "TABLE" Then Me.lstTables.AddItem rs.Fields("TABLE_NAME") Else If rs.Fields("TABLE_TYPE") = "VIEW" Then Me.lstTables.AddItem rs.Fields("TABLE_NAME") End If rs.MoveNext Loop rs.Close Set rs = Nothing cnn.Close Set cnn = Nothing End If Exit Function ErrorHandler: Err.Clear End Function Function DBConnect(ByRef cnn As ADODB.Connection) As Boolean On Error GoTo ErrorHandler Set cnn = New ADODB.Connection cnn.Provider = "Microsoft.Jet.OLEDB.4.0" If Dir(Me.txtWorkGroupPath) <> "" Then cnn.Properties("Jet OLEDB:System database").Value = Me.txtWorkGroupPath cnn.Open Me.txtDBPath, Me.txtUserName, Me.txtPassword Else cnn.Open Me.txtDBPath End If DBConnect = True Exit Function ErrorHandler: Err.Clear DBConnect = False End Function -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Arthur Fuller Sent: Tuesday, July 05, 2011 3:15 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Walk the DB Using ADO Does it require that I have VB6 installed? I suppose I could do that, but at the moment I have only the .NET stuff installed. Sounds like a good add-in, though. A. On Tue, Jul 5, 2011 at 4:07 PM, Drew Wutka wrote: > Would you like me to send my VB6 Add-on to you off list, which lets me > create 'data classes'? It has code to pull the tables and fields from a > data source using ADO. > > Drew > -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com The information contained in this transmission is intended only for the person or entity to which it is addressed and may contain II-VI Proprietary and/or II-VI Business Sensitive material. If you are not the intended recipient, please contact the sender immediately and destroy the material in its entirety, whether electronic or hard copy. You are notified that any review, retransmission, copying, disclosure, dissemination, or other use of, or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. From fuller.artful at gmail.com Tue Jul 5 15:28:14 2011 From: fuller.artful at gmail.com (Arthur Fuller) Date: Tue, 5 Jul 2011 16:28:14 -0400 Subject: [AccessD] "Modern" replacement for CommonDlg Message-ID: I may have asked this before; if so, please forgive the redundancy. I've got an old app that I'm sprucing up with A2K7 to run on Windows 7. Some code I lifted from the ADH musketeers no longer works. It seems that the CommonDlg thingie has vanished. I need essentially that functionality, but that works in A2K7 and A2K10: It opens the Windows Open/Save dialog with a bunch of arguments: Public Function adhCommonFileOpenSave( _ Optional ByRef Flags As adhFileOpenConstants = 0, _ Optional ByVal Filter As String = "", _ Optional ByVal FilterIndex As Long = 1, _ Optional ByVal DefaultExt As String = "", _ Optional ByVal FileName As String = "", _ Optional ByVal DialogTitle As String = "", _ Optional ByVal InitDir As String = "", _ Optional ByVal hwndOwner As Long = 0, _ Optional ByVal OpenFile As Boolean = True) As String In a couple of places in the app, I need to ask the user for the directory in which to save this file, or alternatively, the directory to associate with the selected Customer and|or Project. Any suggestions or code to do this? I want to attach it to a button and have the dialog open on the the specified initial directory, then allow creation of a new subdir beneath that, and ultimately return the final directory name. TIA, Arthur From stuart at lexacorp.com.pg Tue Jul 5 15:54:31 2011 From: stuart at lexacorp.com.pg (Stuart McLachlan) Date: Wed, 06 Jul 2011 06:54:31 +1000 Subject: [AccessD] [dba-OT] Emailing an .mde In-Reply-To: References: Message-ID: <4E137A07.1549.21A7C35E@stuart.lexacorp.com.pg> I normally zip and files that i need to email and rename them as .piz On 5 Jul 2011 at 13:09, Tesiny, Ed wrote: > Hi All, > > I'm trying to email a database frontend, of course our system blocks > it. Is there an extension that is fairly neutral, I tried .doc with > one person last week and that worked but it isn't working with the > person I trying to distribute to today. Any suggestions? > > TIA > > Ed > > > > Edward P. Tesiny > > Director of Evaluation and Outcomes Management > > New York State OASAS > > 1450 Western Avenue > > Albany, NY 12203 > > Phone: (518) 485-2322 > > Fax: (518) 485-5228 > > EdTesiny at oasas.ny.gov > > > > IMPORTANT: This E-mail may contain confidential material for the sole > use of the intended recipient. The use, distribution, transmittal or > re-transmittal by an unintended recipient of any communication is > prohibited without our express approval in writing or by e-mail. Any > use, distribution, transmittal or re-transmittal by persons who are > not intended recipients of this e-mail may be a violation of law and > is strictly prohibited. If you are not the intended recipient please > contact the sender and delete all copies. E-mail transmission cannot > be guaranteed to be secure or error-free. The sender therefore does > not accept liability for any errors or omissions in the contents of > this transmission. All e-mails sent to or from NYS OASAS are to be > used for our business purposes only. E-mails sent from or to NYS > OASAS are subject to review by the Agency. > > > > _______________________________________________ > dba-OT mailing list > dba-OT at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-ot > Website: http://www.databaseadvisors.com > From stuart at lexacorp.com.pg Tue Jul 5 16:01:03 2011 From: stuart at lexacorp.com.pg (Stuart McLachlan) Date: Wed, 06 Jul 2011 07:01:03 +1000 Subject: [AccessD] "Modern" replacement for CommonDlg In-Reply-To: References: Message-ID: <4E137B8F.24761.21ADBC5C@stuart.lexacorp.com.pg> Here' ya go, I'm sure I've posted this a few times in the past. Declare Function GetOpenFileName Lib "comdlg32.dll" Alias _ "GetOpenFileNameA" (pOpenfilename As OPENFILENAME) As Long Type OPENFILENAME lStructSize As Long hwndOwner As Long hInstance As Long lpstrFilter As String lpstrCustomFilter As String nMaxCustFilter As Long nFilterIndex As Long lpstrFile As String nMaxFile As Long lpstrFileTitle As String nMaxFileTitle As Long lpstrInitialDir As String lpstrTitle As String flags As Long nFileOffset As Integer nFileExtension As Integer lpstrDefExt As String lCustData As Long lpfnHook As Long lpTemplateName As String End Type Function GetFileName(Directory As String) As String Dim OpenFile As OPENFILENAME Dim lReturn As Long Dim sFilter As String OpenFile.lStructSize = Len(OpenFile) OpenFile.hwndOwner = 0 OpenFile.hInstance = 0 sFilter = "" & Chr(0) OpenFile.lpstrFilter = sFilter OpenFile.nFilterIndex = 0 OpenFile.lpstrFile = String(257, 0) OpenFile.nMaxFile = Len(OpenFile.lpstrFile) - 1 OpenFile.lpstrFileTitle = OpenFile.lpstrFile OpenFile.nMaxFileTitle = OpenFile.nMaxFile OpenFile.lpstrInitialDir = Directory OpenFile.lpstrTitle = "Select File" OpenFile.flags = 0 lReturn = GetOpenFileName(OpenFile) GetFileName = Left$(OpenFile.lpstrFile, InStr(OpenFile.lpstrFile, Chr$(0)) - 1) End Function On 5 Jul 2011 at 16:28, Arthur Fuller wrote: > I may have asked this before; if so, please forgive the redundancy. > I've got an old app that I'm sprucing up with A2K7 to run on Windows > 7. Some code I lifted from the ADH musketeers no longer works. It > seems that the CommonDlg thingie has vanished. > > I need essentially that functionality, but that works in A2K7 and > A2K10: It opens the Windows Open/Save dialog with a bunch of > arguments: > From charlotte.foust at gmail.com Tue Jul 5 16:08:20 2011 From: charlotte.foust at gmail.com (Charlotte Foust) Date: Tue, 5 Jul 2011 14:08:20 -0700 Subject: [AccessD] Sourcegear vault free two developer license In-Reply-To: References: <4E12D1A4.1010809@colbyconsulting.com> <001d01cc3b11$5c1bf280$1453d780$@comcast.net> Message-ID: Arthur, I know a LOT of developers who need that! LOL Charlotte Foust On Tue, Jul 5, 2011 at 11:06 AM, Arthur Fuller wrote: > Since I've completely eliminated all my programming errors and second > thoughts, I no longer need version control. LOL. I need Developer Control. > > A. > > On Tue, Jul 5, 2011 at 8:45 AM, Dan Waters wrote: > > > Is a version control system useful for a single developer? I noticed > that > > this offer is for 2 developers, assuming that it would help more than one > > developer. > > > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > > > Website: http://www.databaseadvisors.com > > > From fuller.artful at gmail.com Tue Jul 5 16:15:18 2011 From: fuller.artful at gmail.com (Arthur Fuller) Date: Tue, 5 Jul 2011 17:15:18 -0400 Subject: [AccessD] Sourcegear vault free two developer license In-Reply-To: References: <4E12D1A4.1010809@colbyconsulting.com> <001d01cc3b11$5c1bf280$1453d780$@comcast.net> Message-ID: wii Do Two. A. You're never alone if you're schizophrenic. What did you say? Noffink! Knot a bloddy nerd. On Tue, Jul 5, 2011 at 5:08 PM, Charlotte Foust wrote: > Arthur, > > I know a LOT of developers who need that! LOL > > Charlotte Foust > > From fahooper at gmail.com Tue Jul 5 16:18:54 2011 From: fahooper at gmail.com (Fred Hooper) Date: Tue, 05 Jul 2011 17:18:54 -0400 Subject: [AccessD] Walk the DB Using ADO In-Reply-To: References: Message-ID: <4E137FBE.2020006@gmail.com> Hi Arthur, As I work with new databases frequently, I've found it useful to create an Access db that uses ADO to get information on the owners, tables and views -- and place it in an Access table. It currently works for Oracle and SQL Server. I'm happy to send a copy if it would be helpful. Fred Hooper On 7/5/2011 3:57 PM, Arthur Fuller wrote: > Thanks, Drew. I'll give that a shot. It's been a while since I looked > carefully at the ADO model for other than typical recordset operations.. I > seem to recall that somewhere I have a diagram of it, and even a DAO->ADO > conversion chart. Time to start perusing the documents directories. > > A. > > On Tue, Jul 5, 2011 at 2:45 PM, Drew Wutka wrote: > >> Sorry I don't have this code exactly as you have here. But what you >> need to do is actually all in recordsets. >> >> You use a SCHEMA query to get the list of tables (you can get columns >> this way if you want, too). And then you use properties of the field to >> get other values (like field name, value, constraints, etc). >> >> Drew >> >> From fahooper at gmail.com Tue Jul 5 16:24:55 2011 From: fahooper at gmail.com (Fred Hooper) Date: Tue, 05 Jul 2011 17:24:55 -0400 Subject: [AccessD] Walk the DB Using ADO In-Reply-To: <4E137FBE.2020006@gmail.com> References: <4E137FBE.2020006@gmail.com> Message-ID: <4E138127.6080001@gmail.com> Whoops, also fields with their type, width and indexes. On 7/5/2011 5:18 PM, Fred Hooper wrote: > Hi Arthur, > > As I work with new databases frequently, I've found it useful to > create an Access db that uses ADO to get information on the owners, > tables and views -- and place it in an Access table. It currently > works for Oracle and SQL Server. > > I'm happy to send a copy if it would be helpful. > > Fred Hooper > > On 7/5/2011 3:57 PM, Arthur Fuller wrote: >> Thanks, Drew. I'll give that a shot. It's been a while since I looked >> carefully at the ADO model for other than typical recordset >> operations.. I >> seem to recall that somewhere I have a diagram of it, and even a >> DAO->ADO >> conversion chart. Time to start perusing the documents directories. >> >> A. >> >> On Tue, Jul 5, 2011 at 2:45 PM, Drew Wutka wrote: >> >>> Sorry I don't have this code exactly as you have here. But what you >>> need to do is actually all in recordsets. >>> >>> You use a SCHEMA query to get the list of tables (you can get columns >>> this way if you want, too). And then you use properties of the >>> field to >>> get other values (like field name, value, constraints, etc). >>> >>> Drew >>> >>> From fuller.artful at gmail.com Tue Jul 5 17:05:23 2011 From: fuller.artful at gmail.com (Arthur Fuller) Date: Tue, 5 Jul 2011 18:05:23 -0400 Subject: [AccessD] Walk the DB Using ADO In-Reply-To: <4E137FBE.2020006@gmail.com> References: <4E137FBE.2020006@gmail.com> Message-ID: I would most appreciate your Send! Thx, A. On Tue, Jul 5, 2011 at 5:18 PM, Fred Hooper wrote: > Hi Arthur, > > As I work with new databases frequently, I've found it useful to create an > Access db that uses ADO to get information on the owners, tables and views > -- and place it in an Access table. It currently works for Oracle and SQL > Server. > > I'm happy to send a copy if it would be helpful. > > Fred Hooper > > > On 7/5/2011 3:57 PM, Arthur Fuller wrote: > >> Thanks, Drew. I'll give that a shot. It's been a while since I looked >> carefully at the ADO model for other than typical recordset operations.. I >> seem to recall that somewhere I have a diagram of it, and even a DAO->ADO >> conversion chart. Time to start perusing the documents directories. >> >> A. >> >> On Tue, Jul 5, 2011 at 2:45 PM, Drew Wutka wrote: >> >> Sorry I don't have this code exactly as you have here. But what you >>> need to do is actually all in recordsets. >>> >>> You use a SCHEMA query to get the list of tables (you can get columns >>> this way if you want, too). And then you use properties of the field to >>> get other values (like field name, value, constraints, etc). >>> >>> Drew >>> >>> >>> -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/**mailman/listinfo/accessd > Website: http://www.databaseadvisors.**com > From steve at datamanagementsolutions.biz Tue Jul 5 18:14:54 2011 From: steve at datamanagementsolutions.biz (Steve Schapel) Date: Wed, 6 Jul 2011 11:14:54 +1200 Subject: [AccessD] Emailing an .mde In-Reply-To: References: Message-ID: Ed I don't remember the last time I sent an email with a file attached. I always upload it to Dropbox, and then email the link for them to grab it from there. Very easy. Regards Steve -----Original Message----- From: Tesiny, Ed Sent: Wednesday, July 06, 2011 5:09 AM To: Access Developers discussion and problem solving ; Off Topic Subject: [AccessD] Emailing an .mde Hi All, I'm trying to email a database frontend, of course our system blocks it. Is there an extension that is fairly neutral, I tried .doc with one person last week and that worked but it isn't working with the person I trying to distribute to today. Any suggestions? TIA Ed From fuller.artful at gmail.com Wed Jul 6 00:37:47 2011 From: fuller.artful at gmail.com (Arthur Fuller) Date: Wed, 6 Jul 2011 01:37:47 -0400 Subject: [AccessD] "Modern" replacement for CommonDlg In-Reply-To: <4E137B8F.24761.21ADBC5C@stuart.lexacorp.com.pg> References: <4E137B8F.24761.21ADBC5C@stuart.lexacorp.com.pg> Message-ID: Thanks! A. On Tue, Jul 5, 2011 at 5:01 PM, Stuart McLachlan wrote: > Here' ya go, I'm sure I've posted this a few times in the past. > > From vbacreations at gmail.com Wed Jul 6 06:28:25 2011 From: vbacreations at gmail.com (William Benson (VBACreations.Com)) Date: Wed, 6 Jul 2011 07:28:25 -0400 Subject: [AccessD] "Modern" replacement for CommonDlg In-Reply-To: <4E137B8F.24761.21ADBC5C@stuart.lexacorp.com.pg> References: <4E137B8F.24761.21ADBC5C@stuart.lexacorp.com.pg> Message-ID: <002e01cc3bcf$d2959830$77c0c890$@gmail.com> If you put in a reference to Office 12.0 or Office 14.0, I think Access will find the opposite one on another user's machine. Then you can use the dialog. Below is code I wrote which will not require API and allows you to pass in strings for the file filter of this nature *.XL*|*.TXT|*.DAT|*.CSV and like items are grouped when it comes to the description. I quit after the most common file types. Also, I could have written a sort routine to put the detail items together in the filter, but I have not (yet). (text files: TXT, DAT, CSV) Function GetSelectedFile(Optional ExtensionStringWithPipeSeparator) As String Dim iFileTypes As Long Dim fDialog As Office.FileDialog Dim varFile As Variant Dim strTypes As String Dim strFilters As String Dim strTemp As String Dim strParseThis As String Dim ItemsSkipped() Dim strSkipped As String Dim i As Long strFilters = "" strTypes = "" ReDim ItemsSkipped(0) If Not IsMissing(ExtensionStringWithPipeSeparator) Then strParseThis = CStr(ExtensionStringWithPipeSeparator) Else strParseThis = "*.*" End If If strParseThis <> "*.*" Then Do Until InStr(strParseThis, "|") = 0 strTemp = Left(strParseThis, InStr(strParseThis, "|") - 1) strParseThis = Mid(strParseThis, Len(strTemp) + 2) strTemp = Replace$(strTemp, "*.", "") UpdateFilterAndType strTypes:=strTypes, strFilters:=strFilters, strTemp:=strTemp, ItemsSkipped:=ItemsSkipped Loop strTemp = Replace$(strParseThis, "*.", "") UpdateFilterAndType strTypes:=strTypes, strFilters:=strFilters, strTemp:=strTemp, ItemsSkipped:=ItemsSkipped Else strTypes = strTypes & ";*.*" strFilters = strFilters & ",All Files" End If If UBound(ItemsSkipped) > 0 Then strSkipped = "" For i = 1 To UBound(ItemsSkipped) strSkipped = strSkipped & Chr(13) & "'" & ItemsSkipped(i) & "'" Next strSkipped = Mid(strSkipped, 2) MsgBox "Known file Type List not comprehensive enough to accommodate extension(s):" & Chr(13) & Chr(13) & strSkipped End If If strTypes <> "" Then Set fDialog = Application.FileDialog(msoFileDialogFilePicker) fDialog.AllowMultiSelect = False fDialog.Title = "Select a file to examine" fDialog.Filters.Clear fDialog.Filters.Add Mid(strFilters, 2), Mid(strTypes, 2) If fDialog.Show <> True Then 'MsgBox "You clicked Cancel in the file dialog box." GoTo Exit_Me Else Set varFile = fDialog.SelectedItems GetSelectedFile = varFile(1) End If Else MsgBox "No Accepted File Types Were Specified!", vbInformation GetSelectedFile = "" End If Exit_Me: End Function Private Function UpdateFilterAndType(ByRef strTypes As String, ByRef strFilters As String, strTemp As String, ByRef ItemsSkipped) If InStr(UCase(strTemp), "DOC") > 0 Then If InStr(UCase(strFilters), "DOC") = 0 Then strFilters = strFilters & "," & "Doc" End If ElseIf InStr(UCase(strTemp), "RTF") > 0 Then If InStr(UCase(strFilters), "DOC") = 0 Then strFilters = strFilters & "," & "Doc" End If ElseIf InStr(UCase(strTemp), "PDF") > 0 Then strFilters = strFilters & "," & "Pdf" ElseIf InStr(UCase(strTemp), "MD") > 0 Then strFilters = strFilters & "," & "Acc" ElseIf InStr(UCase(strTemp), "XL") > 0 Then If InStr(UCase(strFilters), "SSHT") = 0 Then strFilters = strFilters & "," & "Ssht" End If ElseIf InStr(UCase(strTemp), "WK") > 0 Then If InStr(UCase(strFilters), "SSHT") = 0 Then strFilters = strFilters & "," & "Ssht" End If ElseIf InStr(UCase(strTemp), "TXT") > 0 Then If InStr(UCase(strFilters), "TEXT") = 0 Then strFilters = strFilters & "," & "Text" End If ElseIf InStr(UCase(strTemp), "CSV") > 0 Then If InStr(UCase(strFilters), "TEXT") = 0 Then strFilters = strFilters & "," & "Text" End If ElseIf InStr(UCase(strTemp), "LOG") > 0 Then If InStr(UCase(strFilters), "TEXT") = 0 Then strFilters = strFilters & "," & "Text" End If ElseIf InStr(UCase(strTemp), "DAT") > 0 Then If InStr(UCase(strFilters), "TEXT") = 0 Then strFilters = strFilters & "," & "Text" End If Else If UBound(ItemsSkipped) = 0 Then ReDim ItemsSkipped(1) Else ReDim Preserve ItemsSkipped(UBound(ItemsSkipped) + 1) End If ItemsSkipped(UBound(ItemsSkipped)) = strTemp GoTo Exit_Me End If strTypes = strTypes & ";" & "*." & LCase(strTemp) Exit_Me: End Function From jwcolby at colbyconsulting.com Wed Jul 6 06:46:07 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Wed, 06 Jul 2011 07:46:07 -0400 Subject: [AccessD] =?windows-1252?q?HASHBYTES_=96_A_T-SQL_Function_-_SQL_M?= =?windows-1252?q?usings_-_SQLServerCentral=2Ecom?= Message-ID: <4E144AFF.5010306@colbyconsulting.com> We were discussing hashes awhile back. -- John W. Colby www.ColbyConsulting.com http://www.sqlservercentral.com/blogs/steve_jones/archive/2011/6/28/hashbytes-_1320_-a-t_2D00_sql-function.aspx From fuller.artful at gmail.com Wed Jul 6 07:39:34 2011 From: fuller.artful at gmail.com (Arthur Fuller) Date: Wed, 6 Jul 2011 08:39:34 -0400 Subject: [AccessD] "Modern" replacement for CommonDlg In-Reply-To: <002e01cc3bcf$d2959830$77c0c890$@gmail.com> References: <4E137B8F.24761.21ADBC5C@stuart.lexacorp.com.pg> <002e01cc3bcf$d2959830$77c0c890$@gmail.com> Message-ID: Thanks for this. It does appear to work nicely for selecting a file, but I'm not sure how to modify it to return the selected directory rather than a file in it. A. From vbacreations at gmail.com Wed Jul 6 07:50:05 2011 From: vbacreations at gmail.com (William Benson (VBACreations.Com)) Date: Wed, 6 Jul 2011 08:50:05 -0400 Subject: [AccessD] populating a textbox-type field in one table, calc'ed from another table Message-ID: <002f01cc3bdb$3b067fa0$b1137ee0$@gmail.com> Dear Colleagues, The below expression works when the display control for the field is a listbox, and the above expression its row source. But it won't work (as written) when the display control is a textbox and the expression is the Default Value -- getting syntax error. Default Value = SELECT Sum(Tbl_Field_Values.Items) FROM Tbl_Field_Values WHERE Tbl_Field_Values.WB = WB and Tbl_Field_Values.WS = WS and Tbl_Field_Values.FLD = FLD GROUP BY Tbl_Field_Values.WB, Tbl_Field_Values.WS, Tbl_Field_Values.FLD; Table: Tbl_Field_Values_Header Field: SumOfItems Can the syntax be improved to cause the sum of all items where WB, WS, and FLD match between Tbl_Field_Values and Tbl_Field_Values_Header, to display as the default value in the field I am trying to populate (SumOfItems) in my Tbl_Field_Values_Header table? From stuart at lexacorp.com.pg Wed Jul 6 08:02:41 2011 From: stuart at lexacorp.com.pg (Stuart McLachlan) Date: Wed, 06 Jul 2011 23:02:41 +1000 Subject: [AccessD] "Modern" replacement for CommonDlg In-Reply-To: References: , <002e01cc3bcf$d2959830$77c0c890$@gmail.com>, Message-ID: <4E145CF1.1188.D6EFDE@stuart.lexacorp.com.pg> If you want to select a folder, you don't use OpenFilename(), you use ShBrowseForFolder() Private Declare Function SHBrowseForFolder Lib "SHELL32.DLL" _ Alias "SHBrowseForFolderA" (lpbi As BROWSEINFO) As Long Private Declare Function SHGetPathFromIDList _ Lib "shell32" Alias "SHGetPathFromIDListA" _ (ByVal Pidl As Long, ByVal pszPath As String) As Long Type BROWSEINFO hwndOwner As Long pIDLRoot As Long pszDisplayName As String * 256 lpszTitle As String * 256 ulFlags As Long lpfnCallback As Long lParam As Long iImage As Long End Type Const BIF_RETURNONLYFSDIRS = 1 Const BIF_DONTGOBELOWDOMAIN = 2 Const MAX_PATH = 260 Function BrowseForFolder(hwnd As Long, Title As String) As String Dim strPath As String strPath = Space$(MAX_PATH) Dim bi As BROWSEINFO Dim lpIDList As Long strPath = Space$(MAX_PATH) bi.hwndOwner = 0 bi.lpszTitle = Title bi.ulFlags = BIF_RETURNONLYFSDIRS Or BIF_DONTGOBELOWDOMAIN lpIDList = SHBrowseForFolder(bi) If lpIDList Then SHGetPathFromIDList lpIDList, strPath strPath = Left(strPath, InStr(1, strPath, vbNullChar) - 1) If Len(strPath) > 3 Then strPath = strPath & "\" BrowseForFolder = strPath End If End Function -- Stuart On 6 Jul 2011 at 8:39, Arthur Fuller wrote: > Thanks for this. It does appear to work nicely for selecting a file, > but I'm not sure how to modify it to return the selected directory > rather than a file in it. > > A. > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > From Gustav at cactus.dk Wed Jul 6 08:08:26 2011 From: Gustav at cactus.dk (Gustav Brock) Date: Wed, 06 Jul 2011 15:08:26 +0200 Subject: [AccessD] "Modern" replacement for CommonDlg Message-ID: Hi Arthur > It does appear to work nicely for selecting a file .. However, this screams for a class solution: http://www.karstenpries.de/ Pick menu Entwicklertools, FileDialog It's in German, not Chinese, but you know what it is supposed to do. > how to modify it to return the selected directory .. It contains a ShowFolder method as well. /gustav >>> fuller.artful at gmail.com 06-07-2011 14:39 >>> Thanks for this. It does appear to work nicely for selecting a file, but I'm not sure how to modify it to return the selected directory rather than a file in it. A. From stuart at lexacorp.com.pg Wed Jul 6 08:23:20 2011 From: stuart at lexacorp.com.pg (Stuart McLachlan) Date: Wed, 06 Jul 2011 23:23:20 +1000 Subject: [AccessD] "Modern" replacement for CommonDlg In-Reply-To: References: Message-ID: <4E1461C8.16661.E9DA9A@stuart.lexacorp.com.pg> Geez, you're as bad as JC :-) Why bother with writing 600 lines of code to create a class when there are simple API functions to do it in a few lines? -- Stuart On 6 Jul 2011 at 15:08, Gustav Brock wrote: ... > However, this screams for a class solution: > > http://www.karstenpries.de/ > .. From jwcolby at colbyconsulting.com Wed Jul 6 08:25:09 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Wed, 06 Jul 2011 09:25:09 -0400 Subject: [AccessD] "Modern" replacement for CommonDlg In-Reply-To: References: Message-ID: <4E146235.3010109@colbyconsulting.com> Luckily Arthur is studying classes... ;) John W. Colby www.ColbyConsulting.com On 7/6/2011 9:08 AM, Gustav Brock wrote: > Hi Arthur > >> It does appear to work nicely for selecting a file .. > > However, this screams for a class solution: > > http://www.karstenpries.de/ > > Pick menu Entwicklertools, FileDialog > It's in German, not Chinese, but you know what it is supposed to do. > >> how to modify it to return the selected directory .. > > It contains a ShowFolder method as well. > > /gustav > > >>>> fuller.artful at gmail.com 06-07-2011 14:39>>> > Thanks for this. It does appear to work nicely for selecting a file, but I'm > not sure how to modify it to return the selected directory rather than a > file in it. > > A. > > From EdTesiny at oasas.ny.gov Wed Jul 6 08:32:29 2011 From: EdTesiny at oasas.ny.gov (Tesiny, Ed) Date: Wed, 6 Jul 2011 09:32:29 -0400 Subject: [AccessD] Emailing an .mde In-Reply-To: References: Message-ID: Steve, Sounds like an easy solution but even I can't get access to it and I have enhanced internet access. I'm sure the person I'm working with has no ability to download. Ed Tesiny EdTesiny at oasas.ny.gov -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Steve Schapel Sent: Tuesday, July 05, 2011 7:15 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Emailing an .mde Ed I don't remember the last time I sent an email with a file attached. I always upload it to Dropbox, and then email the link for them to grab it from there. Very easy. Regards Steve -----Original Message----- From: Tesiny, Ed Sent: Wednesday, July 06, 2011 5:09 AM To: Access Developers discussion and problem solving ; Off Topic Subject: [AccessD] Emailing an .mde Hi All, I'm trying to email a database frontend, of course our system blocks it. Is there an extension that is fairly neutral, I tried .doc with one person last week and that worked but it isn't working with the person I trying to distribute to today. Any suggestions? TIA Ed -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From jwcolby at colbyconsulting.com Wed Jul 6 08:40:40 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Wed, 06 Jul 2011 09:40:40 -0400 Subject: [AccessD] "Modern" replacement for CommonDlg In-Reply-To: <4E1461C8.16661.E9DA9A@stuart.lexacorp.com.pg> References: <4E1461C8.16661.E9DA9A@stuart.lexacorp.com.pg> Message-ID: <4E1465D8.2070702@colbyconsulting.com> LOL. 600 lines of code? You need to go back to class writing school. John W. Colby www.ColbyConsulting.com On 7/6/2011 9:23 AM, Stuart McLachlan wrote: > Geez, you're as bad as JC :-) > > Why bother with writing 600 lines of code to create a class when there are simple API > functions to do it in a few lines? > From Gustav at cactus.dk Wed Jul 6 08:49:38 2011 From: Gustav at cactus.dk (Gustav Brock) Date: Wed, 06 Jul 2011 15:49:38 +0200 Subject: [AccessD] "Modern" replacement for CommonDlg Message-ID: Hi Stuart Because it is the way to do it. You initialize the object, set some properties, call a method, bingo. If not the right folder/file, adjust some properties, call a method, bingo. When I discovered this logical operation many years ago (I only do very little VBA programming these days) it brought relief and good nights' sleep! Of course, if one prefer traditional methods, no problem, I just wanted to point out that you can do it the OO way even without the OCX. /gustav >>> stuart at lexacorp.com.pg 06-07-2011 15:23 >>> Geez, you're as bad as JC :-) Why bother with writing 600 lines of code to create a class when there are simple API functions to do it in a few lines? -- Stuart On 6 Jul 2011 at 15:08, Gustav Brock wrote: ... > However, this screams for a class solution: > > http://www.karstenpries.de/ > .. From df.waters at comcast.net Wed Jul 6 08:51:30 2011 From: df.waters at comcast.net (Dan Waters) Date: Wed, 6 Jul 2011 08:51:30 -0500 Subject: [AccessD] Emailing an .mde In-Reply-To: References: Message-ID: <002101cc3be3$cfe9e910$6fbdbb30$@comcast.net> I change the extension to .pdf. Always works. If you file is large, you might compress it first, then change .zip to .pdf. Dan -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Tesiny, Ed Sent: Wednesday, July 06, 2011 8:32 AM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Emailing an .mde Steve, Sounds like an easy solution but even I can't get access to it and I have enhanced internet access. I'm sure the person I'm working with has no ability to download. Ed Tesiny EdTesiny at oasas.ny.gov -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Steve Schapel Sent: Tuesday, July 05, 2011 7:15 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Emailing an .mde Ed I don't remember the last time I sent an email with a file attached. I always upload it to Dropbox, and then email the link for them to grab it from there. Very easy. Regards Steve -----Original Message----- From: Tesiny, Ed Sent: Wednesday, July 06, 2011 5:09 AM To: Access Developers discussion and problem solving ; Off Topic Subject: [AccessD] Emailing an .mde Hi All, I'm trying to email a database frontend, of course our system blocks it. Is there an extension that is fairly neutral, I tried .doc with one person last week and that worked but it isn't working with the person I trying to distribute to today. Any suggestions? TIA Ed -- 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 Wed Jul 6 09:27:06 2011 From: rockysmolin at bchacc.com (rockysmolin at bchacc.com) Date: Wed, 06 Jul 2011 07:27:06 -0700 Subject: [AccessD] Emailing an .mde Message-ID: <20110706072706.86c3debdd1c3983866efe200e2feb95f.2abc9b1f88.wbe@email18.secureserver.net> How about YouSendIt.com? I;ve been using that for a year and it's been flawless. I also use a folder on my website /ftpguest where I FTP things and clients can download them from there using a browser. Rocky -------- Original Message -------- Subject: Re: [AccessD] Emailing an .mde From: "Tesiny, Ed" Date: Wed, July 06, 2011 6:32 am To: "Access Developers discussion and problem solving" Steve, Sounds like an easy solution but even I can't get access to it and I have enhanced internet access. I'm sure the person I'm working with has no ability to download. Ed Tesiny EdTesiny at oasas.ny.gov -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Steve Schapel Sent: Tuesday, July 05, 2011 7:15 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Emailing an .mde Ed I don't remember the last time I sent an email with a file attached. I always upload it to Dropbox, and then email the link for them to grab it from there. Very easy. Regards Steve -----Original Message----- From: Tesiny, Ed Sent: Wednesday, July 06, 2011 5:09 AM To: Access Developers discussion and problem solving ; Off Topic Subject: [AccessD] Emailing an .mde Hi All, I'm trying to email a database frontend, of course our system blocks it. Is there an extension that is fairly neutral, I tried .doc with one person last week and that worked but it isn't working with the person I trying to distribute to today. Any suggestions? TIA Ed -- 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 EdTesiny at oasas.ny.gov Wed Jul 6 10:24:50 2011 From: EdTesiny at oasas.ny.gov (Tesiny, Ed) Date: Wed, 6 Jul 2011 11:24:50 -0400 Subject: [AccessD] Emailing an .mde In-Reply-To: <20110706072706.86c3debdd1c3983866efe200e2feb95f.2abc9b1f88.wbe@email18.secureserver.net> References: <20110706072706.86c3debdd1c3983866efe200e2feb95f.2abc9b1f88.wbe@email18.secureserver.net> Message-ID: FTP is totally blocked...the agency is PARANOID! Ed Tesiny EdTesiny at oasas.ny.gov -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of rockysmolin at bchacc.com Sent: Wednesday, July 06, 2011 10:27 AM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Emailing an .mde How about YouSendIt.com? I;ve been using that for a year and it's been flawless. I also use a folder on my website /ftpguest where I FTP things and clients can download them from there using a browser. Rocky -------- Original Message -------- Subject: Re: [AccessD] Emailing an .mde From: "Tesiny, Ed" Date: Wed, July 06, 2011 6:32 am To: "Access Developers discussion and problem solving" Steve, Sounds like an easy solution but even I can't get access to it and I have enhanced internet access. I'm sure the person I'm working with has no ability to download. Ed Tesiny EdTesiny at oasas.ny.gov -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Steve Schapel Sent: Tuesday, July 05, 2011 7:15 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Emailing an .mde Ed I don't remember the last time I sent an email with a file attached. I always upload it to Dropbox, and then email the link for them to grab it from there. Very easy. Regards Steve -----Original Message----- From: Tesiny, Ed Sent: Wednesday, July 06, 2011 5:09 AM To: Access Developers discussion and problem solving ; Off Topic Subject: [AccessD] Emailing an .mde Hi All, I'm trying to email a database frontend, of course our system blocks it. Is there an extension that is fairly neutral, I tried .doc with one person last week and that worked but it isn't working with the person I trying to distribute to today. Any suggestions? TIA Ed -- 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 Wed Jul 6 10:48:05 2011 From: stuart at lexacorp.com.pg (Stuart McLachlan) Date: Thu, 07 Jul 2011 01:48:05 +1000 Subject: [AccessD] "Modern" replacement for CommonDlg In-Reply-To: <4E1465D8.2070702@colbyconsulting.com> References: , <4E1461C8.16661.E9DA9A@stuart.lexacorp.com.pg>, <4E1465D8.2070702@colbyconsulting.com> Message-ID: <4E1483B5.26290.16E6158@stuart.lexacorp.com.pg> Not me. Download the file that Gustav pointed to. The FileDialog class module in the mdb is 615 lines long. -- Stuart On 6 Jul 2011 at 9:40, jwcolby wrote: > LOL. 600 lines of code? You need to go back to class writing school. > > John W. Colby > www.ColbyConsulting.com > > On 7/6/2011 9:23 AM, Stuart McLachlan wrote: > > Geez, you're as bad as JC :-) > > > > Why bother with writing 600 lines of code to create a class when > > there are simple API functions to do it in a few lines? > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > From charlotte.foust at gmail.com Wed Jul 6 11:14:28 2011 From: charlotte.foust at gmail.com (Charlotte Foust) Date: Wed, 6 Jul 2011 09:14:28 -0700 Subject: [AccessD] populating a textbox-type field in one table, calc'ed from another table In-Reply-To: <002f01cc3bdb$3b067fa0$b1137ee0$@gmail.com> References: <002f01cc3bdb$3b067fa0$b1137ee0$@gmail.com> Message-ID: Default values aren't calculated but row sources are. You would need to put some code behind the form to load the value into an unbound textbox in the appropriate event, probably the On Current event. Charlotte Foust On Wed, Jul 6, 2011 at 5:50 AM, William Benson (VBACreations.Com) < vbacreations at gmail.com> wrote: > Dear Colleagues, > > The below expression works when the display control for the field is a > listbox, and the above expression its row source. But it won't work (as > written) when the display control is a textbox and the expression is the > Default Value -- getting syntax error. > > Default Value = SELECT Sum(Tbl_Field_Values.Items) FROM Tbl_Field_Values > WHERE Tbl_Field_Values.WB = WB and Tbl_Field_Values.WS = WS and > Tbl_Field_Values.FLD = FLD GROUP BY Tbl_Field_Values.WB, > Tbl_Field_Values.WS, Tbl_Field_Values.FLD; > > Table: Tbl_Field_Values_Header > Field: SumOfItems > > > Can the syntax be improved to cause the sum of all items where WB, WS, and > FLD match between Tbl_Field_Values and Tbl_Field_Values_Header, to display > as the default value in the field I am trying to populate (SumOfItems) in > my > Tbl_Field_Values_Header table? > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > > > Website: http://www.databaseadvisors.com > > > From vbacreations at gmail.com Wed Jul 6 11:47:02 2011 From: vbacreations at gmail.com (William Benson (VBACreations.Com)) Date: Wed, 6 Jul 2011 12:47:02 -0400 Subject: [AccessD] How to tell a button's "air space" is nolonger beinghovered over References: <003b01cc38f1$b62edca0$228c95e0$@gmail.com><471F6C8DAB244C66B0AB79536085B3EC@personal4a8ede> <002001cc3a5e$5428d240$fc7a76c0$@gmail.com> <8DD6228312434CD0940AE4E4807C4FF6@personal4a8ede> Message-ID: <004001cc3bfc$56097700$021c6500$@gmail.com> OK, I am scratching my head to think why I didn't see this simpler solution the minute A.D. showed me how to test X and Y. This pretty much always resets at the button edge, and if shift is held, shows the alternate caption in the interior. Private Sub cmdClearFieldHistory_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single) Dim W As Single Dim H As Single If Shift = 0 Then cmdClearFieldHistory.Caption = "Clear Field History" Else W = cmdClearFieldHistory.Width H = cmdClearFieldHistory.Height If X = 0 Or X = W Or Y = 0 Or Y = H Then cmdClearFieldHistory.Caption = "Clear Field History" Else cmdClearFieldHistory.Caption = "Clear All Fields" End If End If End Sub From jwcolby at colbyconsulting.com Wed Jul 6 14:12:19 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Wed, 06 Jul 2011 15:12:19 -0400 Subject: [AccessD] "Modern" replacement for CommonDlg In-Reply-To: <4E1483B5.26290.16E6158@stuart.lexacorp.com.pg> References: , <4E1461C8.16661.E9DA9A@stuart.lexacorp.com.pg>, <4E1465D8.2070702@colbyconsulting.com> <4E1483B5.26290.16E6158@stuart.lexacorp.com.pg> Message-ID: <4E14B393.8010500@colbyconsulting.com> Then I have to assume that they are giving you access to properties, i.e. turning it into an object. I wrap things in a class all the time. That is pretty much the entire point of classes is to give you methods and properties. And yea, yea, you don't do classes. John W. Colby www.ColbyConsulting.com On 7/6/2011 11:48 AM, Stuart McLachlan wrote: > Not me. > Download the file that Gustav pointed to. The FileDialog class module in the mdb is 615 > lines long. > From jwcolby at colbyconsulting.com Wed Jul 6 14:14:11 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Wed, 06 Jul 2011 15:14:11 -0400 Subject: [AccessD] "Modern" replacement for CommonDlg In-Reply-To: References: Message-ID: <4E14B403.1010306@colbyconsulting.com> Any chance you could translate it? ;) John W. Colby www.ColbyConsulting.com On 7/6/2011 9:08 AM, Gustav Brock wrote: > Hi Arthur > >> It does appear to work nicely for selecting a file .. > > However, this screams for a class solution: > > http://www.karstenpries.de/ > > Pick menu Entwicklertools, FileDialog > It's in German, not Chinese, but you know what it is supposed to do. > >> how to modify it to return the selected directory .. > > It contains a ShowFolder method as well. > > /gustav > > >>>> fuller.artful at gmail.com 06-07-2011 14:39>>> > Thanks for this. It does appear to work nicely for selecting a file, but I'm > not sure how to modify it to return the selected directory rather than a > file in it. > > A. > > From fuller.artful at gmail.com Wed Jul 6 17:32:19 2011 From: fuller.artful at gmail.com (Arthur Fuller) Date: Wed, 6 Jul 2011 18:32:19 -0400 Subject: [AccessD] "Modern" replacement for CommonDlg In-Reply-To: <4E14B403.1010306@colbyconsulting.com> References: <4E14B403.1010306@colbyconsulting.com> Message-ID: I'm working on it. My German is shaky, but my Cantonese and Mandarin are coming along, and I am already conversant with Spanish and French. This won't take long. Given a gift for languages, I'll be there in a fortnight. LOL. A. On Wed, Jul 6, 2011 at 3:14 PM, jwcolby wrote: > Any chance you could translate it? ;) > > > From jwcolby at colbyconsulting.com Wed Jul 6 18:20:46 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Wed, 06 Jul 2011 19:20:46 -0400 Subject: [AccessD] "Modern" replacement for CommonDlg In-Reply-To: References: <4E14B403.1010306@colbyconsulting.com> Message-ID: <4E14EDCE.8010605@colbyconsulting.com> I keep asking someone to gift me a language. 'Southern' seems to be what is being gifted. ;) John W. Colby www.ColbyConsulting.com On 7/6/2011 6:32 PM, Arthur Fuller wrote: > I'm working on it. My German is shaky, but my Cantonese and Mandarin are > coming along, and I am already conversant with Spanish and French. This > won't take long. Given a gift for languages, I'll be there in a fortnight. > LOL. > > A. > > On Wed, Jul 6, 2011 at 3:14 PM, jwcolby wrote: > >> Any chance you could translate it? ;) >> >> >> From df.waters at comcast.net Wed Jul 6 18:56:04 2011 From: df.waters at comcast.net (Dan Waters) Date: Wed, 6 Jul 2011 18:56:04 -0500 Subject: [AccessD] "Modern" replacement for CommonDlg In-Reply-To: <4E14EDCE.8010605@colbyconsulting.com> References: <4E14B403.1010306@colbyconsulting.com> <4E14EDCE.8010605@colbyconsulting.com> Message-ID: <005e01cc3c38$48280840$d87818c0$@comcast.net> Maybe you can find an on-line translation site? Paste the German into a field and English shows up on another screen. I found one for C# and VB.Net - works great. Dan -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Wednesday, July 06, 2011 6:21 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] "Modern" replacement for CommonDlg I keep asking someone to gift me a language. 'Southern' seems to be what is being gifted. ;) John W. Colby www.ColbyConsulting.com On 7/6/2011 6:32 PM, Arthur Fuller wrote: > I'm working on it. My German is shaky, but my Cantonese and Mandarin > are coming along, and I am already conversant with Spanish and French. > This won't take long. Given a gift for languages, I'll be there in a fortnight. > LOL. > > A. > > On Wed, Jul 6, 2011 at 3:14 PM, jwcolby wrote: > >> Any chance you could translate it? ;) >> >> >> -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From vbacreations at gmail.com Wed Jul 6 23:46:36 2011 From: vbacreations at gmail.com (William Benson (VBACreations.Com)) Date: Thu, 7 Jul 2011 00:46:36 -0400 Subject: [AccessD] "Modern" replacement for CommonDlg In-Reply-To: <005e01cc3c38$48280840$d87818c0$@comcast.net> References: <4E14B403.1010306@colbyconsulting.com> <4E14EDCE.8010605@colbyconsulting.com> <005e01cc3c38$48280840$d87818c0$@comcast.net> Message-ID: <000001cc3c60$db287350$917959f0$@gmail.com> I have this loop which results in my 2nd listbox row being selected every time and it annoys me. I can't figure out what is causing *any* row to be selected. Debug Behavior: Row 0 added, nothing is selected. Row 1 added, it gets selected. Row 2 added, Row 1 stays selected. Row 3 added, Row 1 stays selected. For Each WS In WB.Worksheets lstWS.AddItem WS.Name & ";" & XL.WorksheetFunction.CountA(WS.Rows(1)) Next From charlotte.foust at gmail.com Wed Jul 6 23:55:53 2011 From: charlotte.foust at gmail.com (Charlotte Foust) Date: Wed, 6 Jul 2011 21:55:53 -0700 Subject: [AccessD] "Modern" replacement for CommonDlg In-Reply-To: <000001cc3c60$db287350$917959f0$@gmail.com> References: <4E14B403.1010306@colbyconsulting.com> <4E14EDCE.8010605@colbyconsulting.com> <005e01cc3c38$48280840$d87818c0$@comcast.net> <000001cc3c60$db287350$917959f0$@gmail.com> Message-ID: Does your listbox have a header row? That would affect which row was the default. Charlotte Foust On Wed, Jul 6, 2011 at 9:46 PM, William Benson (VBACreations.Com) < vbacreations at gmail.com> wrote: > I have this loop which results in my 2nd listbox row being selected every > time and it annoys me. I can't figure out what is causing *any* row to be > selected. > > Debug Behavior: > Row 0 added, nothing is selected. > Row 1 added, it gets selected. > Row 2 added, Row 1 stays selected. > Row 3 added, Row 1 stays selected. > > For Each WS In WB.Worksheets > lstWS.AddItem WS.Name & ";" & > XL.WorksheetFunction.CountA(WS.Rows(1)) > Next > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > > > Website: http://www.databaseadvisors.com > > > From Gustav at cactus.dk Thu Jul 7 04:07:29 2011 From: Gustav at cactus.dk (Gustav Brock) Date: Thu, 07 Jul 2011 11:07:29 +0200 Subject: [AccessD] "Modern" replacement for CommonDlg Message-ID: Hi John Sorry, I just picked it from my archive where I have a modified version, looked up the site, and found out that a new link and version was for download. But I don't use it anymore and didn't download it and translating an old version wouldn't make much sense. But again, you know what the class is intended for, so translating may not be needed at all. /gustav >>> jwcolby at colbyconsulting.com 06-07-2011 21:14 >>> Any chance you could translate it? ;) John W. Colby www.ColbyConsulting.com On 7/6/2011 9:08 AM, Gustav Brock wrote: > Hi Arthur > >> It does appear to work nicely for selecting a file .. > > However, this screams for a class solution: > > http://www.karstenpries.de/ > > Pick menu Entwicklertools, FileDialog > It's in German, not Chinese, but you know what it is supposed to do. > >> how to modify it to return the selected directory .. > > It contains a ShowFolder method as well. > > /gustav > > >>>> fuller.artful at gmail.com 06-07-2011 14:39>>> > Thanks for this. It does appear to work nicely for selecting a file, but I'm > not sure how to modify it to return the selected directory rather than a > file in it. > > A. From jwcolby at colbyconsulting.com Thu Jul 7 07:03:20 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Thu, 07 Jul 2011 08:03:20 -0400 Subject: [AccessD] SQL Server - Query non-updateable Message-ID: <4E15A088.9050801@colbyconsulting.com> I have a selection query for a bound form. If I just do a select xyz from tblInmate it works of course. I want to select a subset of inmates that reflect those that I work with (specific camps). I have a tblVolunteerCamps (the camps that a volunteer works with) and I built a stored procedure out in SQL Server that selects the IDs of inmates at those camps. I feed the SP the volunteer ID and back comes the campIDs and the inmateIDs in those camps. I had read (on this list) that if I used IN (SELECT ID from QueryXYZ) in the where clause it would allow the query to be editable but doing so is turning my query into a non-updatable query. SELECT TblInmate.* from tblInmate WHERE (INM_Active <> 0) AND (INM_Location IN (SELECT CMP_LOCCODE FROM qspVolCampIDs)) If I remove the IN clause, the query is updateable. I really need to filter to just the camps the volunteer works with and I am wondering how to accomplish this. In the past I would try to JOIN the main query to the selection filter and that caused non-updateable. I was told to use the IN(SELECT) which has worked in most cases in the past. Any clue why not now and how to go about filtering and keeping it updateable? -- John W. Colby www.ColbyConsulting.com From jwcolby at colbyconsulting.com Thu Jul 7 07:20:46 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Thu, 07 Jul 2011 08:20:46 -0400 Subject: [AccessD] SQL Server - Query non-updateable In-Reply-To: <4E15A088.9050801@colbyconsulting.com> References: <4E15A088.9050801@colbyconsulting.com> Message-ID: <4E15A49E.30002@colbyconsulting.com> Further to this, I have discovered that if I build a temp table inside of the access fe and do the join it is un-updateable. However if I use the temp table in the IN() clause it is now updateable. So it is something about using the stored procedure in the IN() that causes the query to become un-updateable. John W. Colby www.ColbyConsulting.com On 7/7/2011 8:03 AM, jwcolby wrote: > I have a selection query for a bound form. If I just do a select xyz from tblInmate it works of > course. I want to select a subset of inmates that reflect those that I work with (specific camps). > > I have a tblVolunteerCamps (the camps that a volunteer works with) and I built a stored procedure > out in SQL Server that selects the IDs of inmates at those camps. I feed the SP the volunteer ID and > back comes the campIDs and the inmateIDs in those camps. > > I had read (on this list) that if I used IN (SELECT ID from QueryXYZ) in the where clause it would > allow the query to be editable but doing so is turning my query into a non-updatable query. > > SELECT TblInmate.* from tblInmate > WHERE (INM_Active <> 0) AND > (INM_Location IN (SELECT CMP_LOCCODE FROM qspVolCampIDs)) > > If I remove the IN clause, the query is updateable. > > I really need to filter to just the camps the volunteer works with and I am wondering how to > accomplish this. In the past I would try to JOIN the main query to the selection filter and that > caused non-updateable. I was told to use the IN(SELECT) which has worked in most cases in the past. > > Any clue why not now and how to go about filtering and keeping it updateable? > From iggy at nanaimo.ark.com Thu Jul 7 07:59:37 2011 From: iggy at nanaimo.ark.com (Tony Septav) Date: Thu, 7 Jul 2011 05:59:37 -0700 Subject: [AccessD] Cannot Open Anymore Databases Message-ID: Hey All Just curious. I was working on a report, I would view it and when I returned to the design mode I would get the error message "Cannot open anymore databases". The report is based on a union query, which is made up of 6 subqueries. each of these subqueries is based on the results from about 3 or 4 other querys. If I manually run the union query I don't get any error messages, as I mentioned I only get the error message when working with the report. Am I correct in assuming that the results of each of these queries results in 1 instant of the database being opened and I have exceeded the 84 (whatever) limit to the number of databases instances that can be open at one time?? I solved the problem by appending the results of each of the 6 queries to a temp table and using the table for the report. T. Septav Nanaimo, BC Canada From jwcolby at colbyconsulting.com Fri Jul 8 12:24:59 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Fri, 08 Jul 2011 13:24:59 -0400 Subject: [AccessD] xyz* faster than *asd Message-ID: <4E173D6B.4060709@colbyconsulting.com> Does anyone know of a reason that LIKE is faster with the * in back instead of the front of a string to search by in the where clause? -- John W. Colby www.ColbyConsulting.com From fuller.artful at gmail.com Fri Jul 8 12:47:57 2011 From: fuller.artful at gmail.com (Arthur Fuller) Date: Fri, 8 Jul 2011 13:47:57 -0400 Subject: [AccessD] xyz* faster than *asd In-Reply-To: <4E173D6B.4060709@colbyconsulting.com> References: <4E173D6B.4060709@colbyconsulting.com> Message-ID: Well yeah! If prefaced with an asterisk, it means LIKE everything; if suffixed with an asterisk, it means "Everything like JWC*"; hence search for JWC and walk the remaining similarities. A. On Fri, Jul 8, 2011 at 1:24 PM, jwcolby wrote: > Does anyone know of a reason that LIKE is faster with the * in back instead > of the front of a string to search by in the where clause? > > From vbacreations at gmail.com Fri Jul 8 12:54:20 2011 From: vbacreations at gmail.com (William Benson (VBACreations.Com)) Date: Fri, 8 Jul 2011 13:54:20 -0400 Subject: [AccessD] xyz* faster than *asd In-Reply-To: References: <4E173D6B.4060709@colbyconsulting.com> Message-ID: <001401cc3d98$10e777b0$32b66710$@gmail.com> I don't think that is true Arthur. If testing Like XYZ* you are saying ONLY THINGS THAT begin with XYZ, and if testing LIKE *XYZ you are saying only things which end with XYZ -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Arthur Fuller Sent: Friday, July 08, 2011 1:48 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] xyz* faster than *asd Well yeah! If prefaced with an asterisk, it means LIKE everything; if suffixed with an asterisk, it means "Everything like JWC*"; hence search for JWC and walk the remaining similarities. A. On Fri, Jul 8, 2011 at 1:24 PM, jwcolby wrote: > Does anyone know of a reason that LIKE is faster with the * in back > instead of the front of a string to search by in the where clause? > > -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From Lambert.Heenan at chartisinsurance.com Fri Jul 8 12:55:34 2011 From: Lambert.Heenan at chartisinsurance.com (Heenan, Lambert) Date: Fri, 8 Jul 2011 13:55:34 -0400 Subject: [AccessD] xyz* faster than *asd In-Reply-To: <4E173D6B.4060709@colbyconsulting.com> References: <4E173D6B.4060709@colbyconsulting.com> Message-ID: If by 'back' you mean on the right and 'front' meaning on the left, then the answer is surely to do with how the pattern matching takes place. With a search string like "FOOBAR*" the Db engine can simply filter all records where the field starts with 'FOOBAR', and that will be fairly fast as only the first n characters in each record need to be examined. But with LIKE *FOOBAR* the starting location of the search string is indeterminate. Therefore for each record, more characters have to be examined to check if the substring 'FOOBAR' is in the data. For a false match that means every character (minus n - the length of the substring) in the string needs to be checked. Lambert -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Friday, July 08, 2011 1:25 PM To: Access Developers discussion and problem solving Subject: [AccessD] xyz* faster than *asd Does anyone know of a reason that LIKE is faster with the * in back instead of the front of a string to search by in the where clause? -- John W. Colby www.ColbyConsulting.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From jwcolby at colbyconsulting.com Fri Jul 8 12:59:24 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Fri, 08 Jul 2011 13:59:24 -0400 Subject: [AccessD] xyz* faster than *asd In-Reply-To: References: <4E173D6B.4060709@colbyconsulting.com> Message-ID: <4E17457C.9010109@colbyconsulting.com> > Well yeah! If prefaced with an asterisk, it means LIKE everything; AFAIK they mean the same thing (only backward) *asd means everything with 'asd' at the end asd* means everything with 'asd' at the beginning I vaguely remember reading (long ago) that one was faster than the other but the why escapes me. John W. Colby www.ColbyConsulting.com On 7/8/2011 1:47 PM, Arthur Fuller wrote: > Well yeah! If prefaced with an asterisk, it means LIKE everything; if > suffixed with an asterisk, it means "Everything like JWC*"; hence search for > JWC and walk the remaining similarities. > > A. > > On Fri, Jul 8, 2011 at 1:24 PM, jwcolby wrote: > >> Does anyone know of a reason that LIKE is faster with the * in back instead >> of the front of a string to search by in the where clause? >> >> From Lambert.Heenan at chartisinsurance.com Fri Jul 8 12:59:40 2011 From: Lambert.Heenan at chartisinsurance.com (Heenan, Lambert) Date: Fri, 8 Jul 2011 13:59:40 -0400 Subject: [AccessD] xyz* faster than *asd In-Reply-To: References: <4E173D6B.4060709@colbyconsulting.com> Message-ID: And for the case where you have 'LIKE *FOOBAR', that will be slower because the db has to first figure out how long the data is, then look at the last n characters to check for a match, whereas LIKE FOOBAR* still only has to look at the first n characters. Lambert -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Heenan, Lambert Sent: Friday, July 08, 2011 1:56 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] xyz* faster than *asd If by 'back' you mean on the right and 'front' meaning on the left, then the answer is surely to do with how the pattern matching takes place. With a search string like "FOOBAR*" the Db engine can simply filter all records where the field starts with 'FOOBAR', and that will be fairly fast as only the first n characters in each record need to be examined. But with LIKE *FOOBAR* the starting location of the search string is indeterminate. Therefore for each record, more characters have to be examined to check if the substring 'FOOBAR' is in the data. For a false match that means every character (minus n - the length of the substring) in the string needs to be checked. Lambert -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Friday, July 08, 2011 1:25 PM To: Access Developers discussion and problem solving Subject: [AccessD] xyz* faster than *asd Does anyone know of a reason that LIKE is faster with the * in back instead of the front of a string to search by in the where clause? -- John W. Colby www.ColbyConsulting.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 DWUTKA at Marlow.com Fri Jul 8 14:12:37 2011 From: DWUTKA at Marlow.com (Drew Wutka) Date: Fri, 8 Jul 2011 14:12:37 -0500 Subject: [AccessD] xyz* faster than *asd In-Reply-To: <4E173D6B.4060709@colbyconsulting.com> References: <4E173D6B.4060709@colbyconsulting.com> Message-ID: It's based on how indexing, in general, works. If indexing is completely turned off, the search time should be the same either way. I actually built two separate indexing systems. The first was for a PDA version of a system I had, which included a company phone list. The normal application installed on all of our PC's allowed the user to search by first name, last name, or extension number. It was a single textbox search, worked great on the PC version. But when I built it for the palm V... WOW, was slow as dirt. The Palm database didn't have an indexing option. In essence, it was basically a flat file. So what I did, is I created my own index. I had three fields I wanted to search quickly with (First Name, Last Name, extension). I then formatted the system on the Palm to have 6 tables. The main table 3 times, sorted by one key field (so a main table sorted by first name, one sorted by last name, one sorted by extension), then 3 indexing tables, one for each main table. The 'phone list' (at the time) had anywhere from 450 to 900 employees. The data was pretty small though, just text fields, and therefore didn't take up that much space to triplicate it for the palm. (The sorting and table creation were done in process with the Palm synch process). The Index table had 3 fields: The first field was the first letter (which really this was an unnecessary field). So there were 26 records (A thru Z). The Second field was the position in the related main table where that letter started. (for the number index, it obviously had 10 records (with the first field being 0 to 9 (though I only really needed 3 or 4 of those numbers since our extensions were in a specific range))). Then the second field was a text field with a 104 character text field (26x4). Each group of 4 letters (there were 26 of them), represented the hexadecimal value (it may have been decimal, don't remember) of the starting point of the second letter past the first letter's starting point. So, for example, let's say a user searched for Mike, the code would look at the first letter, say 'It's an M, that's the 13th letter (or Asc(UCASE(strFirstLetter))-64), so it would jump to the 13th record in the index table (it was slow to search through each record, but you could jump to a record by it's position very quickly). So the Record in the First Name Index table would look something like this: (oh, if the 4 characters representing the second letter is 0000, then it knows that there are no records for that first/second letter combo... and the numeric representation is 1 off, so 0001 represents the first record of the first letter starting point) M,140,000100000000000000030000000000000010..... So now that I have this record, my code knows that the 9th group for four digits is 0010, and the starting point is 140, it now knows that records starting with MI (for MIKE) start at record 149 (140+10-1(for 1 off offset)). So now the code can jump to the 149th record of the main table (sorted by first name). If the search were to look for Mark (MA for first two letters), it would start at record 140 on the main table (140+1-1). So instead of scanning every record, a slow process taking about 30 seconds on a Palm V, now I am doing a jump to one record, a little math and string reading, and then a jump to a much closer spot to finish the search. So, while my methods/code are probably not identical to indexing in Jet or SQL, it is probably similar, so searching for abc* is able to directly use the index of the record, making very fast jumps through it, where as *xyz, it is going to have to scan every record still. The second indexing system I built was for the old AccessD archives I used to host. I had it hosted with Access as the backend, and posts needed to be able to be searched by word, so a post with a thousand words needed a thousand indexes. SQL allows for full text indexing.... again, my method may not be identical, but the concept is probably similar. What I did for my full text indexing, is as a 'post' came in to be archived, The code would break down each post into individual words. It would then seach a word index (had a table for each starting letter of each word), to see if that word was in the index, if the word exists (say the word is 'AND', it would look in tblAWords), it would take the key of that word, if it didn't exist, it added that word to the index, and then took the newly created key. Then, it would add a record to a tblAWordsToPosts (where 'A' is for search words starting with A, so there were 26 of these tables) with the ID of the search word, and the ID of the post. So if you were to search for 'Unbound Forms', the search would hit tblUWords to get the Key for 'Unbound', then it would hit tblFWords, to get the key for 'Forms', then it would take those two keys, and create a query to return records from tblPosts, where there were joined records with tblUWordsToPosts and tblFWordsToPosts. All in all, with hundreds of thousands of records, the searching of those records were getting done in a second or two, instead of a massively long search going through the memo fields themselves. Drew -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Friday, July 08, 2011 12:25 PM To: Access Developers discussion and problem solving Subject: [AccessD] xyz* faster than *asd Does anyone know of a reason that LIKE is faster with the * in back instead of the front of a string to search by in the where clause? -- John W. Colby www.ColbyConsulting.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com The information contained in this transmission is intended only for the person or entity to which it is addressed and may contain II-VI Proprietary and/or II-VI Business Sensitive material. If you are not the intended recipient, please contact the sender immediately and destroy the material in its entirety, whether electronic or hard copy. You are notified that any review, retransmission, copying, disclosure, dissemination, or other use of, or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. From ab-mi at post3.tele.dk Fri Jul 8 14:57:27 2011 From: ab-mi at post3.tele.dk (Asger Blond) Date: Fri, 8 Jul 2011 21:57:27 +0200 Subject: [AccessD] xyz* faster than *asd References: <4E173D6B.4060709@colbyconsulting.com> Message-ID: Like Drew my answer is: if you have no index on the field there will be no difference to performance because the query engine then has to do a table scan. But if you have an index on the field then the query engine can use the index for LIKE xyz*, but it has to do a table scan for LIKE *xyz. Asger ----- Original meddelelse ----- > Fra: jwcolby > Til: Access Developers discussion and problem solving > > Dato: Fre, 08. jul 2011 19:24 > Emne: [AccessD] xyz* faster than *asd > > Does anyone know of a reason that LIKE is faster with the * in back > instead of the front of a string > to search by in the where clause? > > -- > John W. Colby > www.ColbyConsulting.com > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com From DWUTKA at Marlow.com Fri Jul 8 15:04:34 2011 From: DWUTKA at Marlow.com (Drew Wutka) Date: Fri, 8 Jul 2011 15:04:34 -0500 Subject: [AccessD] xyz* faster than *asd In-Reply-To: References: <4E173D6B.4060709@colbyconsulting.com> Message-ID: Boy, you're answer was WAY shorter then mine! I went into detail though, to explain the process a bit. Drew -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Asger Blond Sent: Friday, July 08, 2011 2:57 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] xyz* faster than *asd Like Drew my answer is: if you have no index on the field there will be no difference to performance because the query engine then has to do a table scan. But if you have an index on the field then the query engine can use the index for LIKE xyz*, but it has to do a table scan for LIKE *xyz. Asger ----- Original meddelelse ----- > Fra: jwcolby > Til: Access Developers discussion and problem solving > > Dato: Fre, 08. jul 2011 19:24 > Emne: [AccessD] xyz* faster than *asd > > Does anyone know of a reason that LIKE is faster with the * in back > instead of the front of a string > to search by in the where clause? > > -- > John W. Colby > www.ColbyConsulting.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 The information contained in this transmission is intended only for the person or entity to which it is addressed and may contain II-VI Proprietary and/or II-VI Business Sensitive material. If you are not the intended recipient, please contact the sender immediately and destroy the material in its entirety, whether electronic or hard copy. You are notified that any review, retransmission, copying, disclosure, dissemination, or other use of, or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. From fuller.artful at gmail.com Fri Jul 8 15:35:40 2011 From: fuller.artful at gmail.com (Arthur Fuller) Date: Fri, 8 Jul 2011 16:35:40 -0400 Subject: [AccessD] xyz* faster than *asd In-Reply-To: <001401cc3d98$10e777b0$32b66710$@gmail.com> References: <4E173D6B.4060709@colbyconsulting.com> <001401cc3d98$10e777b0$32b66710$@gmail.com> Message-ID: I think that is true, and I have just tested and verified my conjecture. A. On Fri, Jul 8, 2011 at 1:54 PM, William Benson (VBACreations.Com) < vbacreations at gmail.com> wrote: > I don't think that is true Arthur. > > If testing Like XYZ* you are saying ONLY THINGS THAT begin with XYZ, and if > testing LIKE *XYZ you are saying only things which end with XYZ > > From john at winhaven.net Fri Jul 8 16:38:35 2011 From: john at winhaven.net (John Bartow) Date: Fri, 8 Jul 2011 16:38:35 -0500 Subject: [AccessD] xyz* faster than *asd In-Reply-To: <4E173D6B.4060709@colbyconsulting.com> References: <4E173D6B.4060709@colbyconsulting.com> Message-ID: <000901cc3db7$642445b0$2c6cd110$@winhaven.net> I remember asking a similar question in an SQL queries class about 20 years ago. I believe the answer was "because". Its Friday ;o) -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Friday, July 08, 2011 12:25 PM To: Access Developers discussion and problem solving Subject: [AccessD] xyz* faster than *asd Does anyone know of a reason that LIKE is faster with the * in back instead of the front of a string to search by in the where clause? -- John W. Colby www.ColbyConsulting.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From ab-mi at post3.tele.dk Fri Jul 8 17:19:30 2011 From: ab-mi at post3.tele.dk (Asger Blond) Date: Sat, 9 Jul 2011 00:19:30 +0200 Subject: [AccessD] xyz* faster than *asd References: <4E173D6B.4060709@colbyconsulting.com> <000901cc3db7$642445b0$2c6cd110$@winhaven.net> Message-ID: Too bad you got this silly answer in your way back SQL class. Because it's quite obvious why a LIKE xyz* will be faster than LIKE *xyz on an indexed field. For a LIKE *xyz the query engine have to investigate each and every record, because it just doesn't know what leading characters to seach - and this traversing all records is what's called a "table scan". For LIKE xyz* the query engine can use the index, because it know that the leading characters are "xyz". So having an index on the search field will allways make a LIKE *xyz query by far faster than a LIKE xyz* query. Asger ----- Original meddelelse ----- > Fra: John Bartow > Til: 'Access Developers discussion and problem solving' > > Dato: Fre, 08. jul 2011 23:38 > Emne: Re: [AccessD] xyz* faster than *asd > > I remember asking a similar question in an SQL queries class about 20 > years > ago. I believe the answer was "because". > > Its Friday ;o) > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby > Sent: Friday, July 08, 2011 12:25 PM > To: Access Developers discussion and problem solving > Subject: [AccessD] xyz* faster than *asd > > Does anyone know of a reason that LIKE is faster with the * in back > instead > of the front of a string to search by in the where clause? > > -- > John W. Colby > www.ColbyConsulting.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 ab-mi at post3.tele.dk Fri Jul 8 17:32:18 2011 From: ab-mi at post3.tele.dk (Asger Blond) Date: Sat, 9 Jul 2011 00:32:18 +0200 Subject: [AccessD] xyz* faster than *asd References: <4E173D6B.4060709@colbyconsulting.com> <000901cc3db7$642445b0$2c6cd110$@winhaven.net> Message-ID: And making a fast answer is not the wise... The last line of my answer should be: So having an index on the search field will allways make a LIKE xyz* query by far faster than a LIKE *xyz query. Asger ----- Original meddelelse ----- > Fra: Asger Blond > Til: Access Developers discussion and problem solving > > Dato: L?r, 09. jul 2011 00:19 > Emne: Re: [AccessD] xyz* faster than *asd > > Too bad you got this silly answer in your way back SQL class. Because > it's quite obvious why a LIKE xyz* will be faster than LIKE *xyz on > an > indexed field. For a LIKE *xyz the query engine have to investigate > each > and every record, because it just doesn't know what leading > characters to > seach - and this traversing all records is what's called a "table > scan". > For LIKE xyz* the query engine can use the index, because it know > that > the leading characters are "xyz". So having an index on the search > field > will allways make a LIKE *xyz query by far faster than a LIKE xyz* > query. > Asger > > ----- Original meddelelse ----- > > > Fra: John Bartow > > Til: 'Access Developers discussion and problem solving' > > > > Dato: Fre, 08. jul 2011 23:38 > > Emne: Re: [AccessD] xyz* faster than *asd > > > > I remember asking a similar question in an SQL queries class about > 20 > > years > > ago. I believe the answer was "because". > > > > Its Friday ;o) > > -----Original Message----- > > From: accessd-bounces at databaseadvisors.com > > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby > > Sent: Friday, July 08, 2011 12:25 PM > > To: Access Developers discussion and problem solving > > Subject: [AccessD] xyz* faster than *asd > > > > Does anyone know of a reason that LIKE is faster with the * in back > > instead > > of the front of a string to search by in the where clause? > > > > -- > > John W. Colby > > www.ColbyConsulting.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 Fri Jul 8 17:37:59 2011 From: stuart at lexacorp.com.pg (Stuart McLachlan) Date: Sat, 09 Jul 2011 08:37:59 +1000 Subject: [AccessD] xyz* faster than *asd In-Reply-To: <4E173D6B.4060709@colbyconsulting.com> References: <4E173D6B.4060709@colbyconsulting.com> Message-ID: <4E1786C7.4212.49B944B@stuart.lexacorp.com.pg> "some*" can use indexes. "*omething" can't On 8 Jul 2011 at 13:24, jwcolby wrote: > Does anyone know of a reason that LIKE is faster with the * in back > instead of the front of a string to search by in the where clause? > > -- > John W. Colby > www.ColbyConsulting.com > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > From jwcolby at colbyconsulting.com Sat Jul 9 09:09:03 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Sat, 09 Jul 2011 10:09:03 -0400 Subject: [AccessD] List box as a status box Message-ID: <4E1860FF.1050407@colbyconsulting.com> I want to put up a control to display a running status, display then last N events that occurred. I have never really liked text boxes for this purpose as the last thing displayed as I always seem to end up with scrolling issues and so forth. I am thinking about using a list control. This has the advantage (for my purposes) of allowing me to have neat columns for the date / time and the status to be displayed. Does anyone do this and want to comment on how they make it work? -- John W. Colby www.ColbyConsulting.com From vbacreations at gmail.com Sat Jul 9 10:34:35 2011 From: vbacreations at gmail.com (William Benson (VBACreations.Com)) Date: Sat, 9 Jul 2011 11:34:35 -0400 Subject: [AccessD] List box as a status box In-Reply-To: <4E1860FF.1050407@colbyconsulting.com> References: <4E1860FF.1050407@colbyconsulting.com> Message-ID: <000001cc3e4d$b5fb7020$21f25060$@gmail.com> John, What kind of events ... and how are they trapped? Bill -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Saturday, July 09, 2011 10:09 AM To: Access Developers discussion and problem solving Subject: [AccessD] List box as a status box I want to put up a control to display a running status, display then last N events that occurred. I have never really liked text boxes for this purpose as the last thing displayed as I always seem to end up with scrolling issues and so forth. I am thinking about using a list control. This has the advantage (for my purposes) of allowing me to have neat columns for the date / time and the status to be displayed. Does anyone do this and want to comment on how they make it work? -- John W. Colby www.ColbyConsulting.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From jwcolby at colbyconsulting.com Sat Jul 9 12:17:13 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Sat, 09 Jul 2011 13:17:13 -0400 Subject: [AccessD] List box as a status box In-Reply-To: <000001cc3e4d$b5fb7020$21f25060$@gmail.com> References: <4E1860FF.1050407@colbyconsulting.com> <000001cc3e4d$b5fb7020$21f25060$@gmail.com> Message-ID: <4E188D19.1060700@colbyconsulting.com> I'm actually talking about "things that happen" events rather than control / form events. I am carving out a piece of my Inmate Checkout program which goes out to the internet and pulls the inmate info for the specific inmates that are already in my database, looking for changes relevant to my ability to check the inmate out. For example they are moved to another camp or their security level goes up (or down) etc. I had a very simple text box on the form which I simply updated with a text string when I discovered a change to the inmate status. However when the next change came along I lost the last. If I did a txt.value = txt.value & vbcrlf & "new status stuff" I ended up with scrolling in the text box which is difficult to control. In this specific case, I was storing these status changes in a table and I ended up just pulling the TOP 50 changes out and displaying them in a list control directly, but doing something like that where I programmatically stuff them into the list columns would also work nicely. John W. Colby www.ColbyConsulting.com On 7/9/2011 11:34 AM, William Benson (VBACreations.Com) wrote: > John, > > What kind of events ... and how are they trapped? > > Bill > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby > Sent: Saturday, July 09, 2011 10:09 AM > To: Access Developers discussion and problem solving > Subject: [AccessD] List box as a status box > > I want to put up a control to display a running status, display then last N > events that occurred. I > have never really liked text boxes for this purpose as the last thing > displayed as I always seem to > end up with scrolling issues and so forth. > > I am thinking about using a list control. This has the advantage (for my > purposes) of allowing me > to have neat columns for the date / time and the status to be displayed. > > Does anyone do this and want to comment on how they make it work? > From vbacreations at gmail.com Sat Jul 9 13:53:06 2011 From: vbacreations at gmail.com (William Benson (VBACreations.Com)) Date: Sat, 9 Jul 2011 14:53:06 -0400 Subject: [AccessD] List box as a status box In-Reply-To: <4E188D19.1060700@colbyconsulting.com> References: <4E1860FF.1050407@colbyconsulting.com> <000001cc3e4d$b5fb7020$21f25060$@gmail.com> <4E188D19.1060700@colbyconsulting.com> Message-ID: <000101cc3e69$715b0360$54110a20$@gmail.com> I am not sure I would use the listbox because they are limited in terms of how much can be displayed. I would probably go with a datasheet subform at a minimum, if you *really* do give up textboxes. But I like textboxes for this use. I use a memo field and only a single record in the textbox. Set enter key behavior to add new line, and scroll to vertical. Note I trim off the entries I don't want to retain... In this implementation I have two textboxes... one holds the accumulated events (last 15 items only) and one holds new event I want to add Option Compare Database Option Explicit 'For module Private Sub cmdAddEvent_Click() If Nz(Me.txtNewEvent, "") <> "" Then RecordLogEntry CurrentDb, Me.txtEvents, Me.txtNewEvent End If End Sub Private Sub Form_Load() Dim R As DAO.Recordset txtEvents = "" Set R = CurrentDb.OpenRecordset("Select First(EventField) as EventToShow >From TblEventLog Group by EventField") If Not R.EOF Then txtEvents = R!EventToshow End If End Sub 'Then this goes in standard module... works pretty well. Function RecordLogEntry(MyDB As DAO.Database, Ctrl As Control, sWhateverEventStringIs As String) Dim bStoreLocked As Boolean Dim strEVENTBREAK As String Const iMaxEntries = 15 Dim RstEventLog As DAO.Recordset Dim sEntry As String Dim sCurrentLog As String Const sLogStart As String = "<============== " Const sLogEnd As String = " ==============>" strEVENTBREAK = sLogStart & Format(Now(), "m/d/yyyy h:mm AM/PM") & sLogEnd & vbCrLf Set RstEventLog = MyDB.OpenRecordset("Select EventField From TblEventLog") sEntry = strEVENTBREAK & sWhateverEventStringIs On Error Resume Next RstEventLog.MoveFirst On Error GoTo Err_Handler If Not RstEventLog.EOF Then sCurrentLog = KeepMostRecent(RstEventLog.Fields(0), iMaxEntries, sLogStart) RstEventLog.Edit RstEventLog.Fields(0) = sEntry & vbCrLf & sCurrentLog 'Newest first RstEventLog.Update Else RstEventLog.AddNew RstEventLog.Fields(0) = sEntry RstEventLog.Update End If If TypeOf Ctrl Is Access.TextBox Then bStoreLocked = Ctrl.Locked Ctrl.Locked = False RstEventLog.Requery Ctrl.Value = RstEventLog.Fields(0) Ctrl.Locked = bStoreLocked End If Exit Function Err_Handler: MsgBox Err.Number & " - " & Err.Description End Function Function KeepMostRecent(ByVal str As String, ByVal iMax As Long, ByVal sLogStart As String) As String Dim iOccurrences As Long iOccurrences = (Len(str) - Len(Replace$(str, sLogStart, ""))) / Len(sLogStart) If iOccurrences >= iMax Then 'Remove last one KeepMostRecent = Left(str, InStrRev(str, sLogStart) - 1) Else KeepMostRecent = str End If End Function From stuart at lexacorp.com.pg Sat Jul 9 16:24:43 2011 From: stuart at lexacorp.com.pg (Stuart McLachlan) Date: Sun, 10 Jul 2011 07:24:43 +1000 Subject: [AccessD] List box as a status box In-Reply-To: <4E1860FF.1050407@colbyconsulting.com> References: <4E1860FF.1050407@colbyconsulting.com> Message-ID: <4E18C71B.3561.97EDB91@stuart.lexacorp.com.pg> I do this quite frequently. It works very well for me. If you just wan to log events that occuring while the application is running, make the listbox source an empty value list and then use something like: Const cLongMaxListItems Function Logitem(ev As String) as long If lstLog.ListCount > clngMaxLogItems Then lstLog.RemoveItem 0 End If lstLog.AddItem Format$(Now(), "d mmm yy h:nn:ss am/pm") & ";" & ev End Function By embedding semicolons in the string "ev", you can use as many columns as you want in your list. If you want the last ten events on record regardless of when they happened, create a query qryEventLog: "Select Top 10 * from tblEvents order by evDate DESC", and make the rowsource a query "Select * from qryLogEvent order by evDate" Then you just need a lstLog.Requery whenever a new record is added. -- Stuart On 9 Jul 2011 at 10:09, jwcolby wrote: > I want to put up a control to display a running status, display then > last N events that occurred. I have never really liked text boxes for > this purpose as the last thing displayed as I always seem to end up > with scrolling issues and so forth. > > I am thinking about using a list control. This has the advantage (for > my purposes) of allowing me to have neat columns for the date / time > and the status to be displayed. > > Does anyone do this and want to comment on how they make it work? > > -- > John W. Colby > www.ColbyConsulting.com > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > From charlotte.foust at gmail.com Sat Jul 9 22:09:35 2011 From: charlotte.foust at gmail.com (Charlotte Foust) Date: Sat, 09 Jul 2011 20:09:35 -0700 Subject: [AccessD] List box as a status box In-Reply-To: <4E188D19.1060700@colbyconsulting.com> References: <4E1860FF.1050407@colbyconsulting.com> <000001cc3e4d$b5fb7020$21f25060$@gmail.com> <4E188D19.1060700@colbyconsulting.com> Message-ID: <4ad3aeb0-2ad1-473e-89e5-e77b736598f2@email.android.com> I've done this but years ago. I added a string for each event to the rowsource for the listbox. -- Sent from my Android phone with K-9 Mail. Please excuse my brevity. jwcolby wrote: I'm actually talking about "things that happen" events rather than control / form events. I am carving out a piece of my Inmate Checkout program which goes out to the internet and pulls the inmate info for the specific inmates that are already in my database, looking for changes relevant to my ability to check the inmate out. For example they are moved to another camp or their security level goes up (or down) etc. I had a very simple text box on the form which I simply updated with a text string when I discovered a change to the inmate status. However when the next change came along I lost the last. If I did a txt.value = txt.value & vbcrlf & "new status stuff" I ended up with scrolling in the text box which is difficult to control. In this specific case, I was storing these status changes in a table and I ended up just pulling the TOP 50 changes out and displaying them in a list control directly, but doing something like that where I programmatically stuff them into the list columns would also work nicely. John W. Colby www.ColbyConsulting.com On 7/9/2011 11:34 AM, William Benson (VBACreations.Com) wrote: > John, > > What kind of events ... and how are they trapped? > > Bill > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby > Sent: Saturday, July 09, 2011 10:09 AM > To: Access Developers discussion and problem solving > Subject: [AccessD] List box as a status box > > I want to put up a control to display a running status, display then last N > events that occurred. I > have never really liked text boxes for this purpose as the last thing > displayed as I always seem to > end up with scrolling issues and so forth. > > I am thinking about using a list control. This has the advantage (for my > purposes) of allowing me > to have neat columns for the date / time and the status to be displayed. > > Does anyone do this and want to comment on how they make it work? > -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From charlotte.foust at gmail.com Sat Jul 9 22:16:17 2011 From: charlotte.foust at gmail.com (Charlotte Foust) Date: Sat, 09 Jul 2011 20:16:17 -0700 Subject: [AccessD] xyz* faster than *asd In-Reply-To: <4E173D6B.4060709@colbyconsulting.com> References: <4E173D6B.4060709@colbyconsulting.com> Message-ID: Because an ampersand at the front means the entire recordset has to be examined. The ampersand at the back means the records that don't match the initial letters don't need to be examined at all. Charlotte Foust -- Sent from my Android phone with K-9 Mail. Please excuse my brevity. jwcolby wrote: Does anyone know of a reason that LIKE is faster with the * in back instead of the front of a string to search by in the where clause? -- John W. Colby www.ColbyConsulting.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From jwcolby at colbyconsulting.com Sun Jul 10 07:13:48 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Sun, 10 Jul 2011 08:13:48 -0400 Subject: [AccessD] Access runtime Message-ID: <4E19977C.2070406@colbyconsulting.com> I am loving Access 2007 runtime! Installs easy and just runs my programs! So far! -- John W. Colby www.ColbyConsulting.com From dhb at flsi.com Mon Jul 11 13:20:09 2011 From: dhb at flsi.com (Darrell Burns) Date: Mon, 11 Jul 2011 11:20:09 -0700 Subject: [AccessD] Cannot Open Anymore Databases In-Reply-To: References: Message-ID: <000001cc3ff7$2b854cd0$828fe670$@com> I had the same problem with a form that had 5 subforms, each with multiple queries. I submitted the question to every forum and discovered that there's no easy cure. The connections limit is 256 but there's no function to tell you how many you've used up. Connections to a back-end database count double. After spending lots of time re-engineering my recordset actions and being very meticulous about closing connections, the final solution was to bind the subforms to temp tables and fill the tables as each tab is clicked. So, your solution is the correct one. - Darrell -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Tony Septav Sent: Thursday, July 07, 2011 6:00 AM To: accessd at databaseadvisors.com Subject: [AccessD] Cannot Open Anymore Databases Hey All Just curious. I was working on a report, I would view it and when I returned to the design mode I would get the error message "Cannot open anymore databases". The report is based on a union query, which is made up of 6 subqueries. each of these subqueries is based on the results from about 3 or 4 other querys. If I manually run the union query I don't get any error messages, as I mentioned I only get the error message when working with the report. Am I correct in assuming that the results of each of these queries results in 1 instant of the database being opened and I have exceeded the 84 (whatever) limit to the number of databases instances that can be open at one time?? I solved the problem by appending the results of each of the 6 queries to a temp table and using the table for the report. T. Septav Nanaimo, BC Canada -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From BradM at blackforestltd.com Mon Jul 11 13:39:37 2011 From: BradM at blackforestltd.com (Brad Marks) Date: Mon, 11 Jul 2011 13:39:37 -0500 Subject: [AccessD] Access and Excel Integration - Resources? References: , <002e01cc3bcf$d2959830$77c0c890$@gmail.com>, <4E145CF1.1188.D6EFDE@stuart.lexacorp.com.pg> Message-ID: I am doing some R&D work involving Access/Excel integration (Windows Automation). I just finished reading a book titled "Excel and Access Integration". It is a well-written book, but it does not get into a great deal of depth with regards to the "Automation" realm. I was wondering if there is a resource (book or website) that covers this area in more depth. In a nutshell, I would like to be able to do anything that a person can do in "native Excel" via commands in Access 2007 which control Excel. Thanks for your help. Brad From rls at WeBeDb.com Mon Jul 11 14:23:09 2011 From: rls at WeBeDb.com (Robert Stewart) Date: Mon, 11 Jul 2011 14:23:09 -0500 Subject: [AccessD] "Modern" replacement for CommonDlg Message-ID: Arthur, This is a different way of doing the same thing using the Office Library. You have to include which ever version of the Office dll that you are using in the references. You will need to comment out the line that contains "udf_WriteErrorToLog" See if the following helps you out: 1 of 2 Public Function udf_SelectFileDialogBox(Optional varDescOfFile As String = "All Files", Optional varExtensions As String = "*.*") As String '**************************************************************************** '* Purpose: : '* (1) Shows the user a dialog box allowing selection of a file. '* Arguments: '* (1) varDescOfFile: The description of the file type to be selected. '* For example: SAP Extract File in TXT format '* (2) varExtensions: The file filter to be used when the user is '* provided a view of the files. For example: *.TXT '* Returns: '* (1) If the user selected the CANCEL button on the dialog box, a '* zero-length string is returned. '* (2) If the user selected a file, the fully-qualified path and file '* name is returned. '* Calls subroutines: None '* Creates Arrays: None '* Uses Arrays: None '* Uses Tools->References: '* (1) Microsoft Office 10.0 Object Library ... or ... '* (2) Microsoft Office 12.0 Object Library ... etc ... '**************************************************************************** 'On Error GoTo Err_udf_SelectFileDialogBox Dim fDialog As FileDialog Dim varFile As Variant Dim strProc As String Dim strCodeLocn As String Dim strMsg As String Dim strRetVal As String '************************************************************************ strCodeLocn = "Initialize values." '************************************************************************ strProc = "udf_SelectFileDialogBox(); " strRetVal = "" '************************************************************************ strCodeLocn = "Set up the File Dialog." '************************************************************************ Set fDialog = Application.FileDialog(msoFileDialogFilePicker) With fDialog .AllowMultiSelect = False 'Disable multiple selections. .Title = varDescOfFile 'Set the title of the dialog box. .Filters.Clear 'Clear out the current filters. .Filters.Add "", varExtensions '.Filters.Add ".TXT file from SAP", "*.TXT" 'assign file filters '.Filters.Add "Access Databases", "*.MDB" '.Filters.Add "All Files", "*.*" '******************************************************************** strCodeLocn = "Show the dialog box." '******************************************************************** 'If the .Show method returns True, the user picked at least one file. 'If the .Show method returns False, the user clicked Cancel. If .Show = True Then strRetVal = .SelectedItems.Item(1) End If End With udf_SelectFileDialogBox = strRetVal Exit_udf_SelectFileDialogBox: Exit Function Err_udf_SelectFileDialogBox: '************************************************************************ '* Write the error message to the log table and display it to the user. '************************************************************************ strMsg = udf_WriteErrorToLog(strModule, strProc, strCodeLocn, Erl, Err.Number, Err.Description) MsgBox (strMsg) GoTo Exit_udf_SelectFileDialogBox End Function At 10:16 PM 7/9/2011, you wrote: > >>>> fuller.artful at gmail.com 06-07-2011 14:39>>> > > Thanks for this. It does appear to work nicely for selecting a > file, but I'm > > not sure how to modify it to return the selected directory rather than a > > file in it. > > > > A. > Robert L. Stewart www.WeBeDb.com www.DBGUIDesign.com www.RLStewartPhotography.com From rls at WeBeDb.com Mon Jul 11 14:23:35 2011 From: rls at WeBeDb.com (Robert Stewart) Date: Mon, 11 Jul 2011 14:23:35 -0500 Subject: [AccessD] "Modern" replacement for CommonDlg Message-ID: <0ADEA7BB-633A-45DC-AE87-102A08B6C00E@holly.arvixe.com> Arthur, This is a different way of doing the same thing using the Office Library. You have to include which ever version of the Office dll that you are using in the references. You will need to comment out the line that contains "udf_WriteErrorToLog" See if the following helps you out: 2 of 2 Public Function udf_SelectFolderDialogBox() As String '**************************************************************************** '* Purpose: : '* (1) Shows the user a dialog box allowing selection of a folder. '* Arguments: None '* Returns: '* (1) If the user selected the CANCEL button on the dialog box, a '* zero-length string is returned. '* (2) If the user selected a file, the fully-qualified path is returned. '* Calls subroutines: None '* Creates Arrays: None '* Uses Arrays: None '* Uses Tools->References: '* (1) Microsoft Office 10.0 Object Library ... or ... '* (2) Microsoft Office 12.0 Object Library ... etc ... '**************************************************************************** 'On Error GoTo Err_udf_SelectFolderDialogBox Dim fDialog As Office.FileDialog Dim varFile As Variant Dim strProc As String Dim strCodeLocn As String Dim strMsg As String Dim strRetVal As String Dim varDescOfFile As Variant '************************************************************************ strCodeLocn = "Initialize values." '************************************************************************ strProc = "udf_SelectFolderDialogBox" strRetVal = "" '************************************************************************ strCodeLocn = "Set up the File Dialog." '************************************************************************ Set fDialog = Application.FileDialog(msoFileDialogFolderPicker) ' Options are: ' msoFileDialogFilePicker 'OK for Access and Excel ' msoFileDialogFolderPicker 'OK for Access and Excel ' msoFileDialogOpen 'Not OK for Access ' msoFileDialogSaveAs 'Not OK for Access ' Note: instead of the option: ' msoFileDialogFilePicker to select a file ' you could also use the option: ' msoFileDialogFolderPicker to select a folder With fDialog .AllowMultiSelect = False 'Disable multiple selections. .Title = varDescOfFile 'Set the title of the dialog box. .Filters.Clear 'Clear out the current filters. '.Filters.Add "", varExtensions '.Filters.Add ".TXT file from SAP", "*.TXT" 'assign file filters '.Filters.Add "Access Databases", "*.MDB" '.Filters.Add "All Files", "*.*" '******************************************************************** strCodeLocn = "Show the dialog box." '******************************************************************** 'If the .Show method returns True, the user picked at least one file. 'If the .Show method returns False, the user clicked Cancel. If .Show = True Then strRetVal = .SelectedItems.Item(1) End If End With Exit_udf_SelectFolderDialogBox: udf_SelectFolderDialogBox = strRetVal Exit Function Err_udf_SelectFolderDialogBox: '************************************************************************ '* Write the error message to the log table and display it to the user. '************************************************************************ strMsg = udf_WriteErrorToLog(strModule, strProc, strCodeLocn, Erl, Err.Number, Err.Description) MsgBox (strMsg) GoTo Exit_udf_SelectFolderDialogBox End Function At 10:16 PM 7/9/2011, you wrote: > >>>> fuller.artful at gmail.com 06-07-2011 14:39>>> > > Thanks for this. It does appear to work nicely for selecting a > file, but I'm > > not sure how to modify it to return the selected directory rather than a > > file in it. > > > > A. > Robert L. Stewart www.WeBeDb.com www.DBGUIDesign.com www.RLStewartPhotography.com From charlotte.foust at gmail.com Mon Jul 11 14:58:23 2011 From: charlotte.foust at gmail.com (Charlotte Foust) Date: Mon, 11 Jul 2011 12:58:23 -0700 Subject: [AccessD] Cannot Open Anymore Databases In-Reply-To: <000001cc3ff7$2b854cd0$828fe670$@com> References: <000001cc3ff7$2b854cd0$828fe670$@com> Message-ID: With reports, it's even worse, because a report when you open it creates "shadow" queries so you are effectively doubling the connections you designed into it. Charlotte Foust On Mon, Jul 11, 2011 at 11:20 AM, Darrell Burns wrote: > I had the same problem with a form that had 5 subforms, each with multiple > queries. I submitted the question to every forum and discovered that > there's > no easy cure. The connections limit is 256 but there's no function to tell > you how many you've used up. Connections to a back-end database count > double. After spending lots of time re-engineering my recordset actions and > being very meticulous about closing connections, the final solution was to > bind the subforms to temp tables and fill the tables as each tab is > clicked. > So, your solution is the correct one. > - Darrell > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Tony Septav > Sent: Thursday, July 07, 2011 6:00 AM > To: accessd at databaseadvisors.com > Subject: [AccessD] Cannot Open Anymore Databases > > Hey All > Just curious. I was working on a report, I would view it and when I > returned > to the design mode I would get the error message "Cannot open anymore > databases". The report is based on a union query, which is made up of 6 > subqueries. each of these subqueries is based on the results from about 3 > or > 4 other querys. If I manually run the union query I don't get any error > messages, as I mentioned I only get the error message when working with the > report. Am I correct in assuming that the results of each of these queries > results in 1 instant of the database being opened and I have exceeded the > 84 > (whatever) limit to the number of databases instances that can be open at > one time?? I solved the problem by appending the results of each of the 6 > queries to a temp table and using the table for the report. > > T. Septav > Nanaimo, BC > Canada > -- > 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 jwcolby at colbyconsulting.com Mon Jul 11 15:14:21 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Mon, 11 Jul 2011 16:14:21 -0400 Subject: [AccessD] Access and Excel Integration - Resources? In-Reply-To: References: , <002e01cc3bcf$d2959830$77c0c890$@gmail.com>, <4E145CF1.1188.D6EFDE@stuart.lexacorp.com.pg> Message-ID: <4E1B599D.1010702@colbyconsulting.com> One of the things we used to do was to use the macro recorder to record keystrokes doing whatever you want to do. Then go look at the macro which is vbE. Now you know the syntax for whatever it was you did you can do that same thing from Access, or alternatively, you can just run the macro from Access. Both methods have their uses. John W. Colby www.ColbyConsulting.com On 7/11/2011 2:39 PM, Brad Marks wrote: > I am doing some R&D work involving Access/Excel integration (Windows > Automation). > > I just finished reading a book titled "Excel and Access Integration". > It is a well-written book, but it does not get into a great deal of > depth with regards to the "Automation" realm. > > I was wondering if there is a resource (book or website) that covers > this area in more depth. > > In a nutshell, I would like to be able to do anything that a person can > do in "native Excel" via commands in Access 2007 which control Excel. > > Thanks for your help. > Brad > From vbacreations at gmail.com Mon Jul 11 15:49:08 2011 From: vbacreations at gmail.com (William Benson (VBACreations.Com)) Date: Mon, 11 Jul 2011 16:49:08 -0400 Subject: [AccessD] Access and Excel Integration - Resources? In-Reply-To: References: , <002e01cc3bcf$d2959830$77c0c890$@gmail.com>, <4E145CF1.1188.D6EFDE@stuart.lexacorp.com.pg> Message-ID: <000001cc400b$fc00a3a0$f401eae0$@gmail.com> Brad, I like john's approach and sometimes use it... but don't like how the macro recorder works in Excel 2007+. My suggestion is to get comfortable with the basics of the Excel object model (easier said...) and in all your access projects, in the beginning at least, add a reference to Excel's object library. Stay away from all late binding in the early period (before you go to production with your application) - so you get the benefit of intellisense. Later you can change declarations to Objects, remove the reference to Excel, and Access will be happy to tell you where you need to substitute numbers for intrinsic constants. You can also join this list http://catalist.lsoft.com/scripts/wl.exe?SL1=EXCEL-L&H=PEACH.EASE.LSOFT.COM. Most seasoned Listers are experienced Access programmers too. Good luck. Bill -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Brad Marks Sent: Monday, July 11, 2011 2:40 PM To: Access Developers discussion and problem solving Subject: [AccessD] Access and Excel Integration - Resources? I am doing some R&D work involving Access/Excel integration (Windows Automation). I just finished reading a book titled "Excel and Access Integration". It is a well-written book, but it does not get into a great deal of depth with regards to the "Automation" realm. I was wondering if there is a resource (book or website) that covers this area in more depth. In a nutshell, I would like to be able to do anything that a person can do in "native Excel" via commands in Access 2007 which control Excel. Thanks for your help. Brad -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From gustav at cactus.dk Mon Jul 11 15:52:58 2011 From: gustav at cactus.dk (Gustav Brock) Date: Mon, 11 Jul 2011 22:52:58 +0200 Subject: [AccessD] Access and Excel Integration - Resources? Message-ID: Hi Brad Here is how (as I learned from Mr. Colby) to run a series of Excel macros from Access: It works very reliably: Function RunExcelMacros( _ ByVal strFileName As String, _ ParamArray avarMacros()) As Boolean Debug.Print "xl ini", Time On Error GoTo Err_RunExcelMacros Static xlApp As Excel.Application Dim xlWkb As Excel.Workbook Dim varMacro As Variant Dim booSuccess As Boolean Dim booTerminate As Boolean If Len(strFileName) = 0 Then ' Excel shall be closed. booTerminate = True End If If xlApp Is Nothing Then If booTerminate = False Then Set xlApp = New Excel.Application End If ElseIf booTerminate = True Then xlApp.Quit Set xlApp = Nothing End If If booTerminate = False Then Set xlWkb = xlApp.Workbooks.Open(FileName:=strFileName, UpdateLinks:=0, ReadOnly:=True) ' Make Excel visible (for troubleshooting only) or not. xlApp.Visible = False 'True For Each varMacro In avarMacros() If Not Len(varMacro) = 0 Then Debug.Print "xl run", Time, varMacro booSuccess = xlApp.Run(varMacro) End If Next varMacro Else booSuccess = True End If RunExcelMacros = booSuccess Exit_RunExcelMacros: On Error Resume Next If booTerminate = False Then xlWkb.Close SaveChanges:=False Set xlWkb = Nothing End If Debug.Print "xl end", Time Exit Function Err_RunExcelMacros: Select Case Err Case 0 'insert Errors you wish to ignore here Resume Next Case Else 'All other errors will trap Beep MsgBox "Error: " & Err & ". " & Err.Description, vbCritical + vbOKOnly, "Error, macro " & varMacro Resume Exit_RunExcelMacros End Select End Function /gustav >>> BradM at blackforestltd.com 11-07-2011 20:39 >>> I am doing some R&D work involving Access/Excel integration (Windows Automation). I just finished reading a book titled "Excel and Access Integration". It is a well-written book, but it does not get into a great deal of depth with regards to the "Automation" realm. I was wondering if there is a resource (book or website) that covers this area in more depth. In a nutshell, I would like to be able to do anything that a person can do in "native Excel" via commands in Access 2007 which control Excel. Thanks for your help. Brad From vbacreations at gmail.com Mon Jul 11 16:10:46 2011 From: vbacreations at gmail.com (William Benson (VBACreations.Com)) Date: Mon, 11 Jul 2011 17:10:46 -0400 Subject: [AccessD] Select Distinct not working on union query - due to MEMO field? Message-ID: <000101cc400f$015a6450$040f2cf0$@gmail.com> I was using Select distinct on records from a subquery which itself was the result of a union query. To my mind, Select distinct should produce the same result in such a situation as a group by query using the same fields. The Group By query condensed the records, however, and the select distinct query did not. I chased down the reason to this: One of the fields was a memo field. I don't know if the takeaway here is (1) Use Group By queries instead of Select Distinct, whenever possible (2) Don't use MEMO fields whenever possible (3) I have not really discerned the real reason for the difference and am fooling myself. ' METHOD 1 - SURPRISE, TOO MANY RECORDS Select Distinct Field1, Field2, ... FieldN From ( Select Field1, Field2, ... FieldN From Tbl1 Union All Select Field1, Field2, ... FieldN From Tbl2 ) 'METHOD 2 - You can trust this result Select Field1, Field2, ... FieldN From ( Select Field1, Field2, ... FieldN From Tbl1 Union All Select Field1, Field2, ... FieldN From Tbl2 ) Group By Field1, Field2, ... FieldN From ssharkins at gmail.com Mon Jul 11 16:43:28 2011 From: ssharkins at gmail.com (Susan Harkins) Date: Mon, 11 Jul 2011 17:43:28 -0400 Subject: [AccessD] Select Distinct not working on union query - due to MEMOfield? References: <000101cc400f$015a6450$040f2cf0$@gmail.com> Message-ID: <11D73F4487694BA2BBE4323F109F64FD@SusanHarkins> DISTINCT considers every field in your query. Susan H. >I was using Select distinct on records from a subquery which itself was the > result of a union query. To my mind, Select distinct should produce the > same > result in such a situation as a group by query using the same fields. The > Group By query condensed the records, however, and the select distinct > query > did not. I chased down the reason to this: One of the fields was a memo > field. > > I don't know if the takeaway here is > > (1) Use Group By queries instead of Select Distinct, whenever possible > (2) Don't use MEMO fields whenever possible > (3) I have not really discerned the real reason for the difference and am > fooling myself. > From vbacreations at gmail.com Mon Jul 11 17:43:30 2011 From: vbacreations at gmail.com (William Benson (VBACreations.Com)) Date: Mon, 11 Jul 2011 18:43:30 -0400 Subject: [AccessD] Select Distinct not working on union query - due to MEMO field? Message-ID: <000201cc401b$f5bd99c0$e138cd40$@gmail.com> Hi Sue, I don't understand what you mean, sorry - please explain deeper if possible. Does it have anything at all to do with the Memo field? - because changing that to TEXT cured the duplication in the DISTINCT query. Also, do you mind commenting (or anyone...) I am trying to write complex SQL queries in VBA, in partial steps so I can evaluate the intermediary SQL for syntax errors. The below expression will not work unless I remove inner parentheses. I would like to understand why that is. Select * from ( (Select * from Tbl1) Union All (Select * from Tbl2) ) Access is happy with Select * from ( Select * from Tbl1 Union All Select * from Tbl2 ) From ssharkins at gmail.com Mon Jul 11 18:02:20 2011 From: ssharkins at gmail.com (Susan Harkins) Date: Mon, 11 Jul 2011 19:02:20 -0400 Subject: [AccessD] Select Distinct not working on union query - dueto MEMO field? References: <000201cc401b$f5bd99c0$e138cd40$@gmail.com> Message-ID: <13934C5C16A249C0AEB922A97A422A1C@SusanHarkins> 1.) You can't group on a MEMO field, but that doesn't seem to be your problem 2.) DISTINCT considers all the fields in your query -- all the fields in the query combined create a unique record. I don't believe DISTINCT is supported by a MEMO field. I know SQL Server doesn't, Fox Pro doesn't -- but Jet and T-SQL have many differences, this could be one of them. Susan H. > > I don't understand what you mean, sorry - please explain deeper if > possible. > Does it have anything at all to do with the Memo field? - because changing > that to TEXT cured the duplication in the DISTINCT query. > > > Also, do you mind commenting (or anyone...) > I am trying to write complex SQL queries in VBA, in partial steps so I can > evaluate the intermediary SQL for syntax errors. The below expression will > not work unless I remove inner parentheses. I would like to understand why > that is. > > Select * from > ( > (Select * from Tbl1) > Union All > (Select * from Tbl2) > ) > > > > Access is happy with > > Select * from > ( > Select * from Tbl1 > Union All > Select * from Tbl2 > ) > > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com From vbacreations at gmail.com Mon Jul 11 19:16:14 2011 From: vbacreations at gmail.com (William Benson (VBACreations.Com)) Date: Mon, 11 Jul 2011 20:16:14 -0400 Subject: [AccessD] Select Distinct not working on union query - dueto MEMO field? In-Reply-To: <13934C5C16A249C0AEB922A97A422A1C@SusanHarkins> References: <000201cc401b$f5bd99c0$e138cd40$@gmail.com> <13934C5C16A249C0AEB922A97A422A1C@SusanHarkins> Message-ID: <000401cc4028$ea6c3010$bf449030$@gmail.com> Sue, I think then (2) reassures me I did the right thing to switch to a Group By query... since Ac2010 appears to be cutting me some slack despite my bucking a convention. Thank you so much for the explanation. -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Susan Harkins Sent: Monday, July 11, 2011 7:02 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Select Distinct not working on union query - dueto MEMO field? 1.) You can't group on a MEMO field, but that doesn't seem to be your problem 2.) DISTINCT considers all the fields in your query -- all the fields in the query combined create a unique record. I don't believe DISTINCT is supported by a MEMO field. I know SQL Server doesn't, Fox Pro doesn't -- but Jet and T-SQL have many differences, this could be one of them. Susan H. > > I don't understand what you mean, sorry - please explain deeper if > possible. > Does it have anything at all to do with the Memo field? - because changing > that to TEXT cured the duplication in the DISTINCT query. > > > Also, do you mind commenting (or anyone...) > I am trying to write complex SQL queries in VBA, in partial steps so I can > evaluate the intermediary SQL for syntax errors. The below expression will > not work unless I remove inner parentheses. I would like to understand why > that is. > > Select * from > ( > (Select * from Tbl1) > Union All > (Select * from Tbl2) > ) > > > > Access is happy with > > Select * from > ( > Select * from Tbl1 > Union All > Select * from Tbl2 > ) > > > > -- > 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 ssharkins at gmail.com Mon Jul 11 19:33:47 2011 From: ssharkins at gmail.com (Susan Harkins) Date: Mon, 11 Jul 2011 20:33:47 -0400 Subject: [AccessD] Select Distinct not working on union query- dueto MEMO field? References: <000201cc401b$f5bd99c0$e138cd40$@gmail.com><13934C5C16A249C0AEB922A97A422A1C@SusanHarkins> <000401cc4028$ea6c3010$bf449030$@gmail.com> Message-ID: I'd be surprised if DISTINCT worked against a MEMO -- although the link only mentions dBase, I'd still be surprised. I'm not sure I understand why a MEMO field would need to be part of a GROUP BY or a DISTINCT, but as long as it works. :) Susan H. > > I think then (2) reassures me I did the right thing to switch to a Group > By > query... since Ac2010 appears to be cutting me some slack despite my > bucking > a convention. Thank you so much for the explanation. > > > 1.) You can't group on a MEMO field, but that doesn't seem to be your > problem > 2.) DISTINCT considers all the fields in your query -- all the fields in > the > > query combined create a unique record. > > I don't believe DISTINCT is supported by a MEMO field. I know SQL Server > doesn't, Fox Pro doesn't -- but Jet and T-SQL have many differences, this > could be one of them. > > > > Susan H. From vbacreations at gmail.com Mon Jul 11 20:59:18 2011 From: vbacreations at gmail.com (William Benson (VBACreations.Com)) Date: Mon, 11 Jul 2011 21:59:18 -0400 Subject: [AccessD] Select Distinct not working on union query- dueto MEMO field? In-Reply-To: References: <000201cc401b$f5bd99c0$e138cd40$@gmail.com><13934C5C16A249C0AEB922A97A422A1C@SusanHarkins> <000401cc4028$ea6c3010$bf449030$@gmail.com> Message-ID: <000b01cc4037$512b1a60$f3814f20$@gmail.com> When I changed the field type from MEMO to TEXT and found Distinct started working again... I was pretty sure the MEMO field was the reason. I know MEMO causes problems with soe other areas of SQL... however, I appreciate you confirming it. What I meant about bucking convention was based on you writing: >> You can't group on a MEMO field I appear to be able to group on a memo field without a problem in my current application. Thanks again, Bill -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Susan Harkins Sent: Monday, July 11, 2011 8:34 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Select Distinct not working on union query- dueto MEMO field? I'd be surprised if DISTINCT worked against a MEMO -- although the link only mentions dBase, I'd still be surprised. I'm not sure I understand why a MEMO field would need to be part of a GROUP BY or a DISTINCT, but as long as it works. :) Susan H. > > I think then (2) reassures me I did the right thing to switch to a Group > By > query... since Ac2010 appears to be cutting me some slack despite my > bucking > a convention. Thank you so much for the explanation. > > > 1.) You can't group on a MEMO field, but that doesn't seem to be your > problem > 2.) DISTINCT considers all the fields in your query -- all the fields in > the > > query combined create a unique record. > > I don't believe DISTINCT is supported by a MEMO field. I know SQL Server > doesn't, Fox Pro doesn't -- but Jet and T-SQL have many differences, this > could be one of them. > > > > Susan H. -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From Gustav at cactus.dk Tue Jul 12 07:01:59 2011 From: Gustav at cactus.dk (Gustav Brock) Date: Tue, 12 Jul 2011 14:01:59 +0200 Subject: [AccessD] Select Distinct not working on union query- due to MEMO field? Message-ID: Hi Bill But you are missing the obvious - the DISTINCT is not needed if you use UNION and not UNION ALL. If you don't need memo fields, certainly don't use them. If you have the need (for holding text beyond 256 chars) you may in your UNION or DISTINCT query use: LEFT(YourMemoField, 256) /gustav From vbacreations at gmail.com Tue Jul 12 07:51:11 2011 From: vbacreations at gmail.com (William Benson (VBACreations.Com)) Date: Tue, 12 Jul 2011 08:51:11 -0400 Subject: [AccessD] Select Distinct not working on union query- due to MEMO field? In-Reply-To: References: Message-ID: <001601cc4092$617ff380$247fda80$@gmail.com> Oh that is good to know! Yes, that will cut out a step or two now and in future. I appreciate the follow up on this! -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: Tuesday, July 12, 2011 8:02 AM To: accessd at databaseadvisors.com Subject: Re: [AccessD] Select Distinct not working on union query- due to MEMO field? Hi Bill But you are missing the obvious - the DISTINCT is not needed if you use UNION and not UNION ALL. If you don't need memo fields, certainly don't use them. If you have the need (for holding text beyond 256 chars) you may in your UNION or DISTINCT query use: LEFT(YourMemoField, 256) /gustav -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From jwcolby at colbyconsulting.com Tue Jul 12 08:43:08 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Tue, 12 Jul 2011 09:43:08 -0400 Subject: [AccessD] Select Distinct not working on union query- due to MEMO field? In-Reply-To: <001601cc4092$617ff380$247fda80$@gmail.com> References: <001601cc4092$617ff380$247fda80$@gmail.com> Message-ID: <4E1C4F6C.30505@colbyconsulting.com> It never occurred to me to use left(MemoField,255) when I needed to do something like that. The obvious is sometimes easy to miss. John W. Colby www.ColbyConsulting.com On 7/12/2011 8:51 AM, William Benson (VBACreations.Com) wrote: > Oh that is good to know! Yes, that will cut out a step or two now and in > future. > > I appreciate the follow up on this! > > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Gustav Brock > Sent: Tuesday, July 12, 2011 8:02 AM > To: accessd at databaseadvisors.com > Subject: Re: [AccessD] Select Distinct not working on union query- due to > MEMO field? > > Hi Bill > > But you are missing the obvious - the DISTINCT is not needed if you use > UNION and not UNION ALL. > > If you don't need memo fields, certainly don't use them. If you have the > need (for holding text beyond 256 chars) you may in your UNION or DISTINCT > query use: > > LEFT(YourMemoField, 256) > > /gustav > > From Gustav at cactus.dk Tue Jul 12 09:09:35 2011 From: Gustav at cactus.dk (Gustav Brock) Date: Tue, 12 Jul 2011 16:09:35 +0200 Subject: [AccessD] Select Distinct not working on union query - due to MEMO field? Message-ID: Hi Bill and JC Right, 255 chars it is. Further, using a second query you may even look up the full memo should you need it. This I posted in 2003 but I haven't used it since so it is still not tested in versions later than A97: Someone (JC?) mentioned this issue recently and I have experienced it too for Access 97 - even if you directly can fill a memo field to 64 K, a query will only retrieve 32 K. Even worse, if you fill a memo field with, say, the Rich Text Box control you can reach megabyte field content sizes while still only the first 32 K are retrieved. To circumvent this you may use DLookup to fetch the full content. Now, when the content is smaller than 32 K it is waste of time to pass DLookup; thus DLookup should only be used when necessary. Here is a method to do that. It is not tested in Access 2000+. /gustav Public Function LookupMemo( _ ByVal strSource As String, _ ByVal strFieldID As String, _ ByVal strFieldMemo As String, _ ByRef lngID As Long, _ ByRef varMemo As Variant) _ As String ' Extracts without truncation to 32768 characters the ' content of a memo field in a query. ' ' Assumes proper wrapping of table/field names containing spaces ' like "[My field name]" and a single field unique numeric key. ' ' Typical usage (SQL): ' ' SELECT ' ID, ' LookupMemo("Table1", "ID", "MemoField", [ID], [MemoField]) AS FullMemo ' FROM ' Table1; ' ' 2003-12-29. Cactus Data ApS, CPH. ' Maximum length of string from memo field when retrieved in a query. Const clngStrLen As Long = &H8000& Dim strExpr As String Dim strDomain As String Dim strCriteria As String Dim strMemo As String Dim lngLen As Long On Error GoTo Exit_LookupMemo If Not IsNull(varMemo) Then lngLen = Len(varMemo) If lngLen < clngStrLen Then ' The memo field is not truncated. strMemo = varMemo ElseIf Len(strSource) > 0 And Len(strFieldID) > 0 And Len(strFieldMemo) > 0 Then ' The memo is probably truncated by the query. ' Lookup the full memo in strSource. strExpr = strFieldMemo strDomain = strSource strCriteria = strFieldID & " = " & lngID & "" strMemo = vbNullString & DLookup(strExpr, strDomain, strCriteria) End If Else ' Return empty string. End If LookupMemo = strMemo Exit_LookupMemo: Exit Function Err_LookupMemo: ' Return empty string. Resume Exit_LookupMemo End Function /gustav >>> jwcolby at colbyconsulting.com 12-07-2011 15:43 >>> It never occurred to me to use left(MemoField,255) when I needed to do something like that. The obvious is sometimes easy to miss. John W. Colby www.ColbyConsulting.com On 7/12/2011 8:51 AM, William Benson (VBACreations.Com) wrote: > Oh that is good to know! Yes, that will cut out a step or two now and in > future. > > I appreciate the follow up on this! > > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Gustav Brock > Sent: Tuesday, July 12, 2011 8:02 AM > To: accessd at databaseadvisors.com > Subject: Re: [AccessD] Select Distinct not working on union query- due to > MEMO field? > > Hi Bill > > But you are missing the obvious - the DISTINCT is not needed if you use > UNION and not UNION ALL. > > If you don't need memo fields, certainly don't use them. If you have the > need (for holding text beyond 256 chars) you may in your UNION or DISTINCT > query use: > > LEFT(YourMemoField, 256) > > /gustav From Gustav at cactus.dk Tue Jul 12 09:16:02 2011 From: Gustav at cactus.dk (Gustav Brock) Date: Tue, 12 Jul 2011 16:16:02 +0200 Subject: [AccessD] The 25000 mark Message-ID: Hi all I noticed that may AccessD folder now holds 25000 postings - and I heavily delete OT and duplicate-type postings (like: Thanks! Much appreciated. -Joe"). No other folder comes near this volume. /gustav From DWUTKA at Marlow.com Tue Jul 12 09:32:06 2011 From: DWUTKA at Marlow.com (Drew Wutka) Date: Tue, 12 Jul 2011 09:32:06 -0500 Subject: [AccessD] The 25000 mark In-Reply-To: References: Message-ID: Should sign up for OT. ;) Drew -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: Tuesday, July 12, 2011 9:16 AM To: accessd at databaseadvisors.com Subject: [AccessD] The 25000 mark Hi all I noticed that may AccessD folder now holds 25000 postings - and I heavily delete OT and duplicate-type postings (like: Thanks! Much appreciated. -Joe"). No other folder comes near this volume. /gustav -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com The information contained in this transmission is intended only for the person or entity to which it is addressed and may contain II-VI Proprietary and/or II-VI Business Sensitive material. If you are not the intended recipient, please contact the sender immediately and destroy the material in its entirety, whether electronic or hard copy. You are notified that any review, retransmission, copying, disclosure, dissemination, or other use of, or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. From df.waters at comcast.net Tue Jul 12 14:34:20 2011 From: df.waters at comcast.net (Dan Waters) Date: Tue, 12 Jul 2011 14:34:20 -0500 Subject: [AccessD] More in Queries and Memo Fields Message-ID: <002501cc40ca$b30a2620$191e7260$@comcast.net> >From Allen Browne?s site: (http://allenbrowne.com/QueryPerfIssue.html) ------------------- This makes a major difference with?Memo?fields. If you GROUP BY a memo (Notes?in the example), Access compares only the first 255 characters, and the rest are?truncated! By choosing?First?instead of?Group By, JET is free to return the entire memo field from the first match. So not only is it more efficient; it actually solves the the problem of memo fields being chopped off. (A downside of using?First?is that the fields are aliased, e.g.?FirstOfNotes.) ------------------- Dan From df.waters at comcast.net Tue Jul 12 14:39:25 2011 From: df.waters at comcast.net (Dan Waters) Date: Tue, 12 Jul 2011 14:39:25 -0500 Subject: [AccessD] More in Queries and Memo Fields In-Reply-To: <002501cc40ca$b30a2620$191e7260$@comcast.net> References: <002501cc40ca$b30a2620$191e7260$@comcast.net> Message-ID: <002601cc40cb$68b89dd0$3a29d970$@comcast.net> This is the complete paragraph: ------------------ FIRST versus GROUP BY SELECT EmployeeID, LastName, Notes FROM Employees GROUP BY EmployeeID, LastName, Notes; SELECT EmployeeID, First(LastName) AS FirstOfLastName, First(Notes) AS FirstOfNotes FROM Employees GROUP BY EmployeeID; When you add a field to a Totals query, Access offers Group By in the Total row. The default behavior, therefore, is that Access must group on all these fields. A primary key is unique. So, if you group by the primary key field, there is no need to group by other fields in that table. You can optimize the query by choosing First instead of Group By in the Total row under the other fields. First allows JET to return the value from the first matching record, without needing to group by the field. This makes a major difference with Memo fields. If you GROUP BY a memo (Notes in the example), Access compares only the first 255 characters, and the rest are truncated! By choosing First instead of Group By, JET is free to return the entire memo field from the first match. So not only is it more efficient; it actually solves the the problem of memo fields being chopped off. (A downside of using First is that the fields are aliased, e.g. FirstOfNotes.) ------------------ From gustav at cactus.dk Tue Jul 12 15:19:53 2011 From: gustav at cactus.dk (Gustav Brock) Date: Tue, 12 Jul 2011 22:19:53 +0200 Subject: [AccessD] More in Queries and Memo Fields Message-ID: Hi Dan But First just returns the value from "one of the first rows", thus it isn't of much use. Actually, I have _never_ found a situation where First was of any use. /gustav >>> df.waters at comcast.net 12-07-2011 21:39 >>> This is the complete paragraph: ------------------ FIRST versus GROUP BY SELECT EmployeeID, LastName, Notes FROM Employees GROUP BY EmployeeID, LastName, Notes; SELECT EmployeeID, First(LastName) AS FirstOfLastName, First(Notes) AS FirstOfNotes FROM Employees GROUP BY EmployeeID; When you add a field to a Totals query, Access offers Group By in the Total row. The default behavior, therefore, is that Access must group on all these fields. A primary key is unique. So, if you group by the primary key field, there is no need to group by other fields in that table. You can optimize the query by choosing First instead of Group By in the Total row under the other fields. First allows JET to return the value from the first matching record, without needing to group by the field. This makes a major difference with Memo fields. If you GROUP BY a memo (Notes in the example), Access compares only the first 255 characters, and the rest are truncated! By choosing First instead of Group By, JET is free to return the entire memo field from the first match. So not only is it more efficient; it actually solves the the problem of memo fields being chopped off. (A downside of using First is that the fields are aliased, e.g. FirstOfNotes.) ------------------ From vbacreations at gmail.com Tue Jul 12 15:28:54 2011 From: vbacreations at gmail.com (William Benson (VBACreations.Com)) Date: Tue, 12 Jul 2011 16:28:54 -0400 Subject: [AccessD] More in Queries and Memo Fields In-Reply-To: <002501cc40ca$b30a2620$191e7260$@comcast.net> References: <002501cc40ca$b30a2620$191e7260$@comcast.net> Message-ID: <003201cc40d2$52999b10$f7ccd130$@gmail.com> At first blush my thought was like Dan's... If the whole point of NOT truncating the field is because you want to two records which have different comments to appear as separate records - then taking First() doesn't seem to get you further ahead. But it is VERY GOOD to be warned that I will never get what I need from a MEMO field, and that I am fooling myself in using it in a Group By. BTW ... the memo field was changed to text a long, long time ago ;-) -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Dan Waters Sent: Tuesday, July 12, 2011 3:34 PM To: 'Access Developers discussion and problem solving' Subject: [AccessD] More in Queries and Memo Fields >From Allen Browne?s site: (http://allenbrowne.com/QueryPerfIssue.html) ------------------- This makes a major difference with?Memo?fields. If you GROUP BY a memo (Notes?in the example), Access compares only the first 255 characters, and the rest are?truncated! By choosing?First?instead of?Group By, JET is free to return the entire memo field from the first match. So not only is it more efficient; it actually solves the the problem of memo fields being chopped off. (A downside of using?First?is that the fields are aliased, e.g.?FirstOfNotes.) ------------------- Dan -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From df.waters at comcast.net Tue Jul 12 16:30:36 2011 From: df.waters at comcast.net (Dan Waters) Date: Tue, 12 Jul 2011 16:30:36 -0500 Subject: [AccessD] More in Queries and Memo Fields In-Reply-To: References: Message-ID: <003801cc40da$f0ca74f0$d25f5ed0$@comcast.net> Well - I haven't tried what Allen was suggesting - just thought it was something to add to the discussion. -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: Tuesday, July 12, 2011 3:20 PM To: accessd at databaseadvisors.com Subject: Re: [AccessD] More in Queries and Memo Fields Hi Dan But First just returns the value from "one of the first rows", thus it isn't of much use. Actually, I have _never_ found a situation where First was of any use. /gustav >>> df.waters at comcast.net 12-07-2011 21:39 >>> This is the complete paragraph: ------------------ FIRST versus GROUP BY SELECT EmployeeID, LastName, Notes FROM Employees GROUP BY EmployeeID, LastName, Notes; SELECT EmployeeID, First(LastName) AS FirstOfLastName, First(Notes) AS FirstOfNotes FROM Employees GROUP BY EmployeeID; When you add a field to a Totals query, Access offers Group By in the Total row. The default behavior, therefore, is that Access must group on all these fields. A primary key is unique. So, if you group by the primary key field, there is no need to group by other fields in that table. You can optimize the query by choosing First instead of Group By in the Total row under the other fields. First allows JET to return the value from the first matching record, without needing to group by the field. This makes a major difference with Memo fields. If you GROUP BY a memo (Notes in the example), Access compares only the first 255 characters, and the rest are truncated! By choosing First instead of Group By, JET is free to return the entire memo field from the first match. So not only is it more efficient; it actually solves the the problem of memo fields being chopped off. (A downside of using First is that the fields are aliased, e.g. FirstOfNotes.) ------------------ -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From vbacreations at gmail.com Tue Jul 12 17:03:08 2011 From: vbacreations at gmail.com (William Benson (VBACreations.Com)) Date: Tue, 12 Jul 2011 18:03:08 -0400 Subject: [AccessD] More in Queries and Memo Fields In-Reply-To: References: Message-ID: <004101cc40df$7c6a2ec0$753e8c40$@gmail.com> Gustav, I think it can be useful. If the fields you are about are being forced to duplicate in the query because of some other field which you don't need to see in all its variations. If you're comfortable taking a representative example of that field, you can use First to show one of its members. FIRST and LAST offer us something that we can do in the Designer rather than resorting to the SQL window. -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: Tuesday, July 12, 2011 4:20 PM To: accessd at databaseadvisors.com Subject: Re: [AccessD] More in Queries and Memo Fields Hi Dan But First just returns the value from "one of the first rows", thus it isn't of much use. Actually, I have _never_ found a situation where First was of any use. /gustav >>> df.waters at comcast.net 12-07-2011 21:39 >>> This is the complete paragraph: ------------------ FIRST versus GROUP BY SELECT EmployeeID, LastName, Notes FROM Employees GROUP BY EmployeeID, LastName, Notes; SELECT EmployeeID, First(LastName) AS FirstOfLastName, First(Notes) AS FirstOfNotes FROM Employees GROUP BY EmployeeID; When you add a field to a Totals query, Access offers Group By in the Total row. The default behavior, therefore, is that Access must group on all these fields. A primary key is unique. So, if you group by the primary key field, there is no need to group by other fields in that table. You can optimize the query by choosing First instead of Group By in the Total row under the other fields. First allows JET to return the value from the first matching record, without needing to group by the field. This makes a major difference with Memo fields. If you GROUP BY a memo (Notes in the example), Access compares only the first 255 characters, and the rest are truncated! By choosing First instead of Group By, JET is free to return the entire memo field from the first match. So not only is it more efficient; it actually solves the the problem of memo fields being chopped off. (A downside of using First is that the fields are aliased, e.g. FirstOfNotes.) ------------------ -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From rls at WeBeDb.com Wed Jul 13 07:49:22 2011 From: rls at WeBeDb.com (Robert Stewart) Date: Wed, 13 Jul 2011 07:49:22 -0500 Subject: [AccessD] Access and Excel Integration - Resources? In-Reply-To: References: Message-ID: Everything is available to MS Access if you include the Excel library. For actual automation, you will have to write functions in MS Access that use the ones in Excel. I have an application (commercial) that allows the user to define the Excel workbook in MS Access via a set of tables and will built the Excel workbook dynamically based on that definition from data in the database. I wrote my own based on the needs of the application. At 03:29 PM 7/12/2011, you wrote: >Date: Mon, 11 Jul 2011 13:39:37 -0500 >From: "Brad Marks" >To: "Access Developers discussion and problem solving" > >Subject: [AccessD] Access and Excel Integration - Resources? >Message-ID: > >Content-Type: text/plain; charset="us-ascii" > >I am doing some R&D work involving Access/Excel integration (Windows >Automation). > >I just finished reading a book titled "Excel and Access Integration". >It is a well-written book, but it does not get into a great deal of >depth with regards to the "Automation" realm. > >I was wondering if there is a resource (book or website) that covers >this area in more depth. > >In a nutshell, I would like to be able to do anything that a person can >do in "native Excel" via commands in Access 2007 which control Excel. > >Thanks for your help. >Brad > Robert L. Stewart www.WeBeDb.com www.DBGUIDesign.com www.RLStewartPhotography.com From jwcolby at colbyconsulting.com Wed Jul 13 08:00:44 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Wed, 13 Jul 2011 09:00:44 -0400 Subject: [AccessD] Good price on 5400 rpm 1.5 tb disks Message-ID: <4E1D96FC.4070801@colbyconsulting.com> http://www.newegg.com/Special/ShellShocker.aspx?Tpk=shellshocker -- John W. Colby www.ColbyConsulting.com From rockysmolin at bchacc.com Wed Jul 13 18:25:24 2011 From: rockysmolin at bchacc.com (Rocky Smolin) Date: Wed, 13 Jul 2011 16:25:24 -0700 Subject: [AccessD] VBA run-time error 3170: Could not find installable ISAM Message-ID: <2B7A375995D24727A5D8506CB9413AF8@HAL9007> A prospect is getting this error: VBA run-time error 3170: Could not find installable ISAM When I do TransferSpreadsheet. Does anyone know offhand what the likeliest cause of this is? MTIA Rocky From BradM at blackforestltd.com Thu Jul 14 07:27:54 2011 From: BradM at blackforestltd.com (Brad Marks) Date: Thu, 14 Jul 2011 07:27:54 -0500 Subject: [AccessD] Generating an Excel Pivot Table from Access - Problem with Second Execution References: Message-ID: All, I am just starting to experiment with Access/Excel Automation Through a process of trial and error I have developed a small test Access application that is able to build a simple Excel Pivot Table. Building and viewing the Pivot Table works nicely the first time I execute the Access VBA code. If I exit Access and get back in again, things work nicely. However, when I try to execute the code more than one time (without getting out of Access), I receive Error 91 - "Object Variable or With block variable Not Set". I have tried many things but I cannot figure out how to prevent this error. I must be missing something. Below is the code that I am using. Thanks for your help with this. Brad ~~~~~~~~~~~~~ Dim XLApp As Excel.Application Dim XLWorkbook As Excel.Workbook Dim XLSheet As Excel.Worksheet Set XLApp = CreateObject("Excel.Application") XLApp.Visible = True Set XLWorkbook = XLApp.Workbooks.Add Set XLSheet = XLWorkbook.Sheets(1) XLSheet.Cells(1, 1).Value = "State" XLSheet.Cells(2, 1).Value = "MN" XLSheet.Cells(3, 1).Value = "WI" XLSheet.Cells(4, 1).Value = "SD" XLSheet.Cells(5, 1).Value = "ND" XLSheet.Cells(1, 2).Value = "Sales_Amt" XLSheet.Cells(2, 2).Value = "200" XLSheet.Cells(3, 2).Value = "300" XLSheet.Cells(4, 2).Value = "400" XLSheet.Cells(5, 2).Value = "500" ActiveWorkbook.PivotCaches.Create(SourceType:=xlDatabase, SourceData:= _ "Sheet1!R1C1:R5C2", Version:=xlPivotTableVersion12).CreatePivotTable _ TableDestination:="Sheet1!R9C1", TableName:="PivotTable3", DefaultVersion _ :=xlPivotTableVersion12 Sheets("Sheet1").Select Cells(9, 1).Select ActiveSheet.PivotTables("PivotTable3").PivotFields("State").Orientation = xlRowField ActiveSheet.PivotTables("PivotTable3").PivotFields("State").Position = 1 ActiveSheet.PivotTables("PivotTable3").AddDataField ActiveSheet.PivotTables( _ "PivotTable3").PivotFields("Sales_Amt"), "Sum of Sales_Amt", xlSum Set XLApp = Nothing Set XLWorkbook = Nothing Set XLSheet = Nothing ~~~~~~~~~~~~~ End of Code ~ ~~~~~~~~~ The Error 91 is issued on this statement on the "Second Execution" ActiveWorkbook.PivotCaches.Create(SourceType:=xlDatabase, SourceData:= _ "Sheet1!R1C1:R5C2", Version:=xlPivotTableVersion12).CreatePivotTable _ TableDestination:="Sheet1!R9C1", TableName:="PivotTable3", DefaultVersion _ :=xlPivotTableVersion12 ~~~~~~~~~~~~ From Gustav at cactus.dk Thu Jul 14 07:51:20 2011 From: Gustav at cactus.dk (Gustav Brock) Date: Thu, 14 Jul 2011 14:51:20 +0200 Subject: [AccessD] Generating an Excel Pivot Table from Access - Problem with Second Execution Message-ID: Hi Brad Without going deeper into your code, in Excel always be extremely careful and strict with properties, methods, and objects. Here you mix Sheet for Worksheet which is a no-no, and you use Select where you could use the much faster Activate. Also, objects should be closed if possible before setting them to Nothing. /gustav >>> BradM at blackforestltd.com 14-07-2011 14:27 >>> All, I am just starting to experiment with Access/Excel Automation Through a process of trial and error I have developed a small test Access application that is able to build a simple Excel Pivot Table. Building and viewing the Pivot Table works nicely the first time I execute the Access VBA code. If I exit Access and get back in again, things work nicely. However, when I try to execute the code more than one time (without getting out of Access), I receive Error 91 - "Object Variable or With block variable Not Set". I have tried many things but I cannot figure out how to prevent this error. I must be missing something. Below is the code that I am using. Thanks for your help with this. Brad ~~~~~~~~~~~~~ Dim XLApp As Excel.Application Dim XLWorkbook As Excel.Workbook Dim XLSheet As Excel.Worksheet Set XLApp = CreateObject("Excel.Application") XLApp.Visible = True Set XLWorkbook = XLApp.Workbooks.Add Set XLSheet = XLWorkbook.Sheets(1) XLSheet.Cells(1, 1).Value = "State" XLSheet.Cells(2, 1).Value = "MN" XLSheet.Cells(3, 1).Value = "WI" XLSheet.Cells(4, 1).Value = "SD" XLSheet.Cells(5, 1).Value = "ND" XLSheet.Cells(1, 2).Value = "Sales_Amt" XLSheet.Cells(2, 2).Value = "200" XLSheet.Cells(3, 2).Value = "300" XLSheet.Cells(4, 2).Value = "400" XLSheet.Cells(5, 2).Value = "500" ActiveWorkbook.PivotCaches.Create(SourceType:=xlDatabase, SourceData:= _ "Sheet1!R1C1:R5C2", Version:=xlPivotTableVersion12).CreatePivotTable _ TableDestination:="Sheet1!R9C1", TableName:="PivotTable3", DefaultVersion _ :=xlPivotTableVersion12 Sheets("Sheet1").Select Cells(9, 1).Select ActiveSheet.PivotTables("PivotTable3").PivotFields("State").Orientation = xlRowField ActiveSheet.PivotTables("PivotTable3").PivotFields("State").Position = 1 ActiveSheet.PivotTables("PivotTable3").AddDataField ActiveSheet.PivotTables( _ "PivotTable3").PivotFields("Sales_Amt"), "Sum of Sales_Amt", xlSum Set XLApp = Nothing Set XLWorkbook = Nothing Set XLSheet = Nothing ~~~~~~~~~~~~~ End of Code ~ ~~~~~~~~~ The Error 91 is issued on this statement on the "Second Execution" ActiveWorkbook.PivotCaches.Create(SourceType:=xlDatabase, SourceData:= _ "Sheet1!R1C1:R5C2", Version:=xlPivotTableVersion12).CreatePivotTable _ TableDestination:="Sheet1!R9C1", TableName:="PivotTable3", DefaultVersion _ :=xlPivotTableVersion12 ~~~~~~~~~~~~ From fuller.artful at gmail.com Thu Jul 14 08:36:36 2011 From: fuller.artful at gmail.com (Arthur Fuller) Date: Thu, 14 Jul 2011 09:36:36 -0400 Subject: [AccessD] Generating an Excel Pivot Table from Access - Problem with Second Execution In-Reply-To: References: Message-ID: I copied your code to a test MDB and interestingly, received an error on a different line than you, and with a different error message. I've played around a bit (e.g. changed "Sheets" to "WorkSheets", etc.) but the error persists. The offending line is: ActiveSheet.PivotTables("PivotTable3").AddDataField And the error message is: RunTime error 450: Wrong number of arguments or invalid property assignment. I'm running Office 2007. Very puzzling. Arthur From jwcolby at colbyconsulting.com Thu Jul 14 09:58:34 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Thu, 14 Jul 2011 10:58:34 -0400 Subject: [AccessD] Cannot Open Anymore Databases In-Reply-To: <000001cc3ff7$2b854cd0$828fe670$@com> References: <000001cc3ff7$2b854cd0$828fe670$@com> Message-ID: <4E1F041A.9030302@colbyconsulting.com> One of the things that helps is to use JIT subforms as well. JIT subforms only load subforms when the tab is clicked on. Since every combo and subform uses a recordset, loading subforms JIT really cuts down the number of recordsets used. It also speeds up loading the main form, sometimes drastically. John W. Colby www.ColbyConsulting.com On 7/11/2011 2:20 PM, Darrell Burns wrote: > I had the same problem with a form that had 5 subforms, each with multiple > queries. I submitted the question to every forum and discovered that there's > no easy cure. The connections limit is 256 but there's no function to tell > you how many you've used up. Connections to a back-end database count > double. After spending lots of time re-engineering my recordset actions and > being very meticulous about closing connections, the final solution was to > bind the subforms to temp tables and fill the tables as each tab is clicked. > So, your solution is the correct one. > - Darrell > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Tony Septav > Sent: Thursday, July 07, 2011 6:00 AM > To: accessd at databaseadvisors.com > Subject: [AccessD] Cannot Open Anymore Databases > > Hey All > Just curious. I was working on a report, I would view it and when I returned > to the design mode I would get the error message "Cannot open anymore > databases". The report is based on a union query, which is made up of 6 > subqueries. each of these subqueries is based on the results from about 3 or > 4 other querys. If I manually run the union query I don't get any error > messages, as I mentioned I only get the error message when working with the > report. Am I correct in assuming that the results of each of these queries > results in 1 instant of the database being opened and I have exceeded the 84 > (whatever) limit to the number of databases instances that can be open at > one time?? I solved the problem by appending the results of each of the 6 > queries to a temp table and using the table for the report. > > T. Septav > Nanaimo, BC > Canada From BradM at blackforestltd.com Thu Jul 14 11:12:15 2011 From: BradM at blackforestltd.com (Brad Marks) Date: Thu, 14 Jul 2011 11:12:15 -0500 Subject: [AccessD] Generating an Excel Pivot Table from Access - Problemwith Second Execution References: Message-ID: Arthur and Gustav, Thanks for the help, I appreciate it. I made the refinements that Gustav suggested, but I am still receiving the "91" Error. I also tried many other things but have not had success. Perhaps someone has an simple example of how to create an Excel Pivot table using "Automation" via Access VBA code. (and be able to execute the logic more than once without getting the 91 error.) Again, if I get out of Access and then back in again, everything works nicely. Thanks, Brad -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Brad Marks Sent: Thursday, July 14, 2011 7:28 AM To: Access Developers discussion and problem solving Subject: [AccessD] Generating an Excel Pivot Table from Access - Problemwith Second Execution All, I am just starting to experiment with Access/Excel Automation Through a process of trial and error I have developed a small test Access application that is able to build a simple Excel Pivot Table. Building and viewing the Pivot Table works nicely the first time I execute the Access VBA code. If I exit Access and get back in again, things work nicely. However, when I try to execute the code more than one time (without getting out of Access), I receive Error 91 - "Object Variable or With block variable Not Set". I have tried many things but I cannot figure out how to prevent this error. I must be missing something. Below is the code that I am using. Thanks for your help with this. Brad ~~~~~~~~~~~~~ Dim XLApp As Excel.Application Dim XLWorkbook As Excel.Workbook Dim XLSheet As Excel.Worksheet Set XLApp = CreateObject("Excel.Application") XLApp.Visible = True Set XLWorkbook = XLApp.Workbooks.Add Set XLSheet = XLWorkbook.Sheets(1) XLSheet.Cells(1, 1).Value = "State" XLSheet.Cells(2, 1).Value = "MN" XLSheet.Cells(3, 1).Value = "WI" XLSheet.Cells(4, 1).Value = "SD" XLSheet.Cells(5, 1).Value = "ND" XLSheet.Cells(1, 2).Value = "Sales_Amt" XLSheet.Cells(2, 2).Value = "200" XLSheet.Cells(3, 2).Value = "300" XLSheet.Cells(4, 2).Value = "400" XLSheet.Cells(5, 2).Value = "500" ActiveWorkbook.PivotCaches.Create(SourceType:=xlDatabase, SourceData:= _ "Sheet1!R1C1:R5C2", Version:=xlPivotTableVersion12).CreatePivotTable _ TableDestination:="Sheet1!R9C1", TableName:="PivotTable3", DefaultVersion _ :=xlPivotTableVersion12 Sheets("Sheet1").Select Cells(9, 1).Select ActiveSheet.PivotTables("PivotTable3").PivotFields("State").Orientation = xlRowField ActiveSheet.PivotTables("PivotTable3").PivotFields("State").Position = 1 ActiveSheet.PivotTables("PivotTable3").AddDataField ActiveSheet.PivotTables( _ "PivotTable3").PivotFields("Sales_Amt"), "Sum of Sales_Amt", xlSum Set XLApp = Nothing Set XLWorkbook = Nothing Set XLSheet = Nothing ~~~~~~~~~~~~~ End of Code ~ ~~~~~~~~~ The Error 91 is issued on this statement on the "Second Execution" ActiveWorkbook.PivotCaches.Create(SourceType:=xlDatabase, SourceData:= _ "Sheet1!R1C1:R5C2", Version:=xlPivotTableVersion12).CreatePivotTable _ TableDestination:="Sheet1!R9C1", TableName:="PivotTable3", DefaultVersion _ :=xlPivotTableVersion12 ~~~~~~~~~~~~ -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. From charlotte.foust at gmail.com Thu Jul 14 11:42:31 2011 From: charlotte.foust at gmail.com (Charlotte Foust) Date: Thu, 14 Jul 2011 09:42:31 -0700 Subject: [AccessD] Cannot Open Anymore Databases In-Reply-To: <4E1F041A.9030302@colbyconsulting.com> References: <000001cc3ff7$2b854cd0$828fe670$@com> <4E1F041A.9030302@colbyconsulting.com> Message-ID: And couple JIT with a tab control and you eliminate a lot of your issues immediately. Charlotte Foust On Thu, Jul 14, 2011 at 7:58 AM, jwcolby wrote: > One of the things that helps is to use JIT subforms as well. JIT subforms > only load subforms when the tab is clicked on. Since every combo and > subform uses a recordset, loading subforms JIT really cuts down the number > of recordsets used. It also speeds up loading the main form, sometimes > drastically. > > John W. Colby > www.ColbyConsulting.com > > > > On 7/11/2011 2:20 PM, Darrell Burns wrote: > >> I had the same problem with a form that had 5 subforms, each with multiple >> queries. I submitted the question to every forum and discovered that >> there's >> no easy cure. The connections limit is 256 but there's no function to tell >> you how many you've used up. Connections to a back-end database count >> double. After spending lots of time re-engineering my recordset actions >> and >> being very meticulous about closing connections, the final solution was to >> bind the subforms to temp tables and fill the tables as each tab is >> clicked. >> So, your solution is the correct one. >> - Darrell >> >> -----Original Message----- >> From: accessd-bounces@**databaseadvisors.com >> [mailto:accessd-bounces@**databaseadvisors.com] >> On Behalf Of Tony Septav >> Sent: Thursday, July 07, 2011 6:00 AM >> To: accessd at databaseadvisors.com >> Subject: [AccessD] Cannot Open Anymore Databases >> >> Hey All >> Just curious. I was working on a report, I would view it and when I >> returned >> to the design mode I would get the error message "Cannot open anymore >> databases". The report is based on a union query, which is made up of 6 >> subqueries. each of these subqueries is based on the results from about 3 >> or >> 4 other querys. If I manually run the union query I don't get any error >> messages, as I mentioned I only get the error message when working with >> the >> report. Am I correct in assuming that the results of each of these queries >> results in 1 instant of the database being opened and I have exceeded the >> 84 >> (whatever) limit to the number of databases instances that can be open at >> one time?? I solved the problem by appending the results of each of the 6 >> queries to a temp table and using the table for the report. >> >> T. Septav >> Nanaimo, BC >> Canada >> > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/**mailman/listinfo/accessd > > > Website: http://www.databaseadvisors.**com > > > From stuart at lexacorp.com.pg Thu Jul 14 15:16:58 2011 From: stuart at lexacorp.com.pg (Stuart McLachlan) Date: Fri, 15 Jul 2011 06:16:58 +1000 Subject: [AccessD] Generating an Excel Pivot Table from Access - Problemwith Second Execution In-Reply-To: References: , Message-ID: <4E1F4EBA.29684.83DCD28@stuart.lexacorp.com.pg> Search the archives for "unquailfied reference" I must have posted the same answer about half a dozen times. The old "unqualified reference" strikes again. See http://support.microsoft.com/kb/319832 When you write code to use an Excel object, method, or property, you should always precede the call with the appropriate object variable. If you do not, Visual Basic establishes its own reference to Excel... These lines for a start are unqualfied: Sheets("Sheet1").Select Cells(9, 1).Select -- Stuart > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Brad Marks > Sent: Thursday, July 14, 2011 7:28 AM To: Access Developers discussion > and problem solving Subject: [AccessD] Generating an Excel Pivot Table > from Access - Problemwith Second Execution > > All, > > I am just starting to experiment with Access/Excel Automation > > Through a process of trial and error I have developed a small test > Access application that is able to build a simple Excel Pivot Table. > Building and viewing the Pivot Table works nicely the first time I > execute the Access VBA code. If I exit Access and get back in again, > things work nicely. > > However, when I try to execute the code more than one time (without > getting out of Access), I receive Error 91 - "Object Variable or With > block variable Not Set". > > I have tried many things but I cannot figure out how to prevent this > error. I must be missing something. > > Below is the code that I am using. Thanks for your help with this. > > Brad > > ~~~~~~~~~~~~~ > Dim XLApp As Excel.Application > Dim XLWorkbook As Excel.Workbook > Dim XLSheet As Excel.Worksheet > > Set XLApp = CreateObject("Excel.Application") > > XLApp.Visible = True > > Set XLWorkbook = XLApp.Workbooks.Add > > Set XLSheet = XLWorkbook.Sheets(1) > > XLSheet.Cells(1, 1).Value = "State" > XLSheet.Cells(2, 1).Value = "MN" > XLSheet.Cells(3, 1).Value = "WI" > XLSheet.Cells(4, 1).Value = "SD" > XLSheet.Cells(5, 1).Value = "ND" > > XLSheet.Cells(1, 2).Value = "Sales_Amt" > XLSheet.Cells(2, 2).Value = "200" > XLSheet.Cells(3, 2).Value = "300" > XLSheet.Cells(4, 2).Value = "400" > XLSheet.Cells(5, 2).Value = "500" > > ActiveWorkbook.PivotCaches.Create(SourceType:=xlDatabase, SourceData:= > _ > "Sheet1!R1C1:R5C2", > Version:=xlPivotTableVersion12).CreatePivotTable _ > TableDestination:="Sheet1!R9C1", TableName:="PivotTable3", > DefaultVersion _ > :=xlPivotTableVersion12 > > Sheets("Sheet1").Select > > Cells(9, 1).Select > From BradM at blackforestltd.com Thu Jul 14 16:01:42 2011 From: BradM at blackforestltd.com (Brad Marks) Date: Thu, 14 Jul 2011 16:01:42 -0500 Subject: [AccessD] Generating an Excel Pivot Table from Access -Problemwith Second Execution References: , <4E1F4EBA.29684.83DCD28@stuart.lexacorp.com.pg> Message-ID: Stuart, Thank You! Thank You! Thank You! I owe you a beer! The Unqualified References were the problem. I am just starting to dabble with Access/Excel Automation. I am learning by trial and error (mostly error). I really appreciate the help. I have spent most of the day wrestling with this problem. Sincerely, Brad Marks ---Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Stuart McLachlan Sent: Thursday, July 14, 2011 3:17 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Generating an Excel Pivot Table from Access -Problemwith Second Execution Search the archives for "unquailfied reference" I must have posted the same answer about half a dozen times. The old "unqualified reference" strikes again. See http://support.microsoft.com/kb/319832 When you write code to use an Excel object, method, or property, you should always precede the call with the appropriate object variable. If you do not, Visual Basic establishes its own reference to Excel... These lines for a start are unqualfied: Sheets("Sheet1").Select Cells(9, 1).Select -- Stuart > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Brad Marks > Sent: Thursday, July 14, 2011 7:28 AM To: Access Developers discussion > and problem solving Subject: [AccessD] Generating an Excel Pivot Table > from Access - Problemwith Second Execution > > All, > > I am just starting to experiment with Access/Excel Automation > > Through a process of trial and error I have developed a small test > Access application that is able to build a simple Excel Pivot Table. > Building and viewing the Pivot Table works nicely the first time I > execute the Access VBA code. If I exit Access and get back in again, > things work nicely. > > However, when I try to execute the code more than one time (without > getting out of Access), I receive Error 91 - "Object Variable or With > block variable Not Set". > > I have tried many things but I cannot figure out how to prevent this > error. I must be missing something. > > Below is the code that I am using. Thanks for your help with this. > > Brad > > ~~~~~~~~~~~~~ > Dim XLApp As Excel.Application > Dim XLWorkbook As Excel.Workbook > Dim XLSheet As Excel.Worksheet > > Set XLApp = CreateObject("Excel.Application") > > XLApp.Visible = True > > Set XLWorkbook = XLApp.Workbooks.Add > > Set XLSheet = XLWorkbook.Sheets(1) > > XLSheet.Cells(1, 1).Value = "State" > XLSheet.Cells(2, 1).Value = "MN" > XLSheet.Cells(3, 1).Value = "WI" > XLSheet.Cells(4, 1).Value = "SD" > XLSheet.Cells(5, 1).Value = "ND" > > XLSheet.Cells(1, 2).Value = "Sales_Amt" > XLSheet.Cells(2, 2).Value = "200" > XLSheet.Cells(3, 2).Value = "300" > XLSheet.Cells(4, 2).Value = "400" > XLSheet.Cells(5, 2).Value = "500" > > ActiveWorkbook.PivotCaches.Create(SourceType:=xlDatabase, SourceData:= > _ > "Sheet1!R1C1:R5C2", > Version:=xlPivotTableVersion12).CreatePivotTable _ > TableDestination:="Sheet1!R9C1", TableName:="PivotTable3", > DefaultVersion _ > :=xlPivotTableVersion12 > > Sheets("Sheet1").Select > > Cells(9, 1).Select > -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. From vbacreations at gmail.com Fri Jul 15 00:34:04 2011 From: vbacreations at gmail.com (William Benson (VBACreations.Com)) Date: Fri, 15 Jul 2011 01:34:04 -0400 Subject: [AccessD] ScreenUpdating coming back on when controlling Excel via automation Message-ID: <000001cc42b0$d0591c80$710b5580$@gmail.com> Brad, here is more for you to geal with! I have googled this and seen it has affected more than me... but no one has a solution. When I am in Excel, I do not find Workbooks.Open causes screenupdating to toggle back on. However, when using an instance of Excel controlled through automation (from Access) it does turn screenupdating back on (and the visible property of the application instance as well). It is a bit frustrating. So far I cannot do anything about it except use code to turn it off again. It is creating visuals that I do not want my client to endure. Anyone have a solution to keep Excel really in the silent and invisible background when using automation? From vbacreations at gmail.com Fri Jul 15 00:34:42 2011 From: vbacreations at gmail.com (William Benson (VBACreations.Com)) Date: Fri, 15 Jul 2011 01:34:42 -0400 Subject: [AccessD] ScreenUpdating coming back on when controlling Excel via automation Message-ID: <000101cc42b0$e6c047a0$b440d6e0$@gmail.com> Deal... -----Original Message----- From: William Benson (VBACreations.Com) [mailto:vbacreations at gmail.com] Sent: Friday, July 15, 2011 1:34 AM To: Access Developers discussion and problem solving Subject: ScreenUpdating coming back on when controlling Excel via automation Brad, here is more for you to geal with! I have googled this and seen it has affected more than me... but no one has a solution. When I am in Excel, I do not find Workbooks.Open causes screenupdating to toggle back on. However, when using an instance of Excel controlled through automation (from Access) it does turn screenupdating back on (and the visible property of the application instance as well). It is a bit frustrating. So far I cannot do anything about it except use code to turn it off again. It is creating visuals that I do not want my client to endure. Anyone have a solution to keep Excel really in the silent and invisible background when using automation? From accessd at shaw.ca Fri Jul 15 16:31:23 2011 From: accessd at shaw.ca (Jim Lawrence) Date: Fri, 15 Jul 2011 14:31:23 -0700 Subject: [AccessD] Migrating Microsoft Access Databases to SQL Server 2008 In-Reply-To: <4E1F4EBA.29684.83DCD28@stuart.lexacorp.com.pg> References: <4E1F4EBA.29684.83DCD28@stuart.lexacorp.com.pg> Message-ID: <21F07958DF334582B074EA55D510209B@creativesystemdesigns.com> For all you who have not done a migration before or are a little rusty here is a link to a very nice article on migrating from a Microsoft Access Databases to SQL Server 2008 Database. http://www.databasejournal.com/features/msaccess/migrating-access-databases- to-sql-server.html Jim From vbacreations at gmail.com Fri Jul 15 20:44:05 2011 From: vbacreations at gmail.com (William Benson) Date: Fri, 15 Jul 2011 21:44:05 -0400 Subject: [AccessD] VBA run-time error 3170: Could not find installable ISAM In-Reply-To: <2B7A375995D24727A5D8506CB9413AF8@HAL9007> References: <2B7A375995D24727A5D8506CB9413AF8@HAL9007> Message-ID: Could it be they have excel set to ignore requests from other applications? (DDE). On Jul 13, 2011 7:27 PM, "Rocky Smolin" wrote: > A prospect is getting this error: > > VBA run-time error 3170: Could not find installable ISAM > > When I do TransferSpreadsheet. > > Does anyone know offhand what the likeliest cause of this is? > > MTIA > > Rocky > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com From gustav at cactus.dk Sat Jul 16 02:53:45 2011 From: gustav at cactus.dk (Gustav Brock) Date: Sat, 16 Jul 2011 09:53:45 +0200 Subject: [AccessD] VBA run-time error 3170: Could not find installable ISAM Message-ID: Hi Rocky Or, when installing Access, you forgot to mark the driver for Excel? /gustav >>> vbacreations at gmail.com 16-07-2011 03:44 >>> Could it be they have excel set to ignore requests from other applications? (DDE). On Jul 13, 2011 7:27 PM, "Rocky Smolin" wrote: > A prospect is getting this error: > > VBA run-time error 3170: Could not find installable ISAM > > When I do TransferSpreadsheet. > > Does anyone know offhand what the likeliest cause of this is? > > MTIA > > Rocky From jwcolby at colbyconsulting.com Sat Jul 16 08:35:28 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Sat, 16 Jul 2011 09:35:28 -0400 Subject: [AccessD] Elapsed time class - Stuart please ignore... Message-ID: <4E2193A0.1000509@colbyconsulting.com> I'm building a little database to time / log my son's computer time. I have a form which he uses to select a game which opens the game for him, creates a record in the table and starts the timer, leaving this form up in the background behind the game. As he closes the game the form becomes visible and he clicks a button to update the stop time in the table and stops the elapsed time timer. Not yet done, I will be causing the form to beep at him as he goes over the allotted time to play the game. Nothing special here, just wrapping the code / date I needed to measure elapsed time into a class. Obviously the point of putting it in a class is that it can be used in one or a hundred forms to perform elapsed time calcs, and it carves out all of that data / logic into a single place. To use it in any form just dimension a variable and set it to a new instance of the variable: Dim mcElapsedTime As clsElapsedTime Private Sub Form_Open(Cancel As Integer) Set mcElapsedTime = New clsElapsedTime Me.TimerInterval = 1000 - set up the timer for one second timer ticks End Sub Private Sub Form_Timer() mcElapsedTime.UpdateElapsedTime txtElapsedTime = mcElapsedTime.pElapsedTime End Sub The elapsed time class: Option Compare Database Option Explicit Private mlngSeconds As Long Private mlngMinutes As Long Private mlngHours As Long Private mstrElapsedTime Property Get pElapsedTime() As String pElapsedTime = mstrElapsedTime End Property Property Get pSeconds() As Long pSeconds = mlngSeconds End Property Property Get pMinutes() As Long pMinutes = mlngMinutes End Property Property Get pHours() As Long pHours = mlngHours End Property Private Function CalcElapsedTime() mstrElapsedTime = mlngHours & ":" & mlngMinutes & ":" & mlngSeconds End Function Function mResetElapsedTime() mlngSeconds = 0 mlngMinutes = 0 mlngHours = 0 End Function Function UpdateElapsedTime() mlngSeconds = mlngSeconds + 1 If mlngSeconds >= 60 Then mlngSeconds = 0 mlngMinutes = mlngMinutes + 1 End If If mlngMinutes >= 60 Then mlngMinutes = 0 mlngHours = mlngHours + 1 End If CalcElapsedTime End Function -- John W. Colby www.ColbyConsulting.com From rockysmolin at bchacc.com Sat Jul 16 09:02:09 2011 From: rockysmolin at bchacc.com (Rocky Smolin) Date: Sat, 16 Jul 2011 07:02:09 -0700 Subject: [AccessD] VBA run-time error 3170: Could not find installableISAM In-Reply-To: References: Message-ID: <2A696EF71D4743F79FE709F132029C5A@HAL9007> Possible. I'll forward to the client. Thanks Rocky -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: Saturday, July 16, 2011 12:54 AM To: accessd at databaseadvisors.com Subject: Re: [AccessD] VBA run-time error 3170: Could not find installableISAM Hi Rocky Or, when installing Access, you forgot to mark the driver for Excel? /gustav >>> vbacreations at gmail.com 16-07-2011 03:44 >>> Could it be they have excel set to ignore requests from other applications? (DDE). On Jul 13, 2011 7:27 PM, "Rocky Smolin" wrote: > A prospect is getting this error: > > VBA run-time error 3170: Could not find installable ISAM > > When I do TransferSpreadsheet. > > Does anyone know offhand what the likeliest cause of this is? > > MTIA > > Rocky -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From rockysmolin at bchacc.com Sat Jul 16 09:10:25 2011 From: rockysmolin at bchacc.com (Rocky Smolin) Date: Sat, 16 Jul 2011 07:10:25 -0700 Subject: [AccessD] Elapsed time class - Stuart please ignore... In-Reply-To: <4E2193A0.1000509@colbyconsulting.com> References: <4E2193A0.1000509@colbyconsulting.com> Message-ID: Ooh, I could that. Can I get a copy when it's ready? Sign me, Living With a StarCraft Addict (Rocky) -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Saturday, July 16, 2011 6:35 AM To: Access Developers discussion and problem solving Subject: [AccessD] Elapsed time class - Stuart please ignore... I'm building a little database to time / log my son's computer time. I have a form which he uses to select a game which opens the game for him, creates a record in the table and starts the timer, leaving this form up in the background behind the game. As he closes the game the form becomes visible and he clicks a button to update the stop time in the table and stops the elapsed time timer. Not yet done, I will be causing the form to beep at him as he goes over the allotted time to play the game. Nothing special here, just wrapping the code / date I needed to measure elapsed time into a class. Obviously the point of putting it in a class is that it can be used in one or a hundred forms to perform elapsed time calcs, and it carves out all of that data / logic into a single place. To use it in any form just dimension a variable and set it to a new instance of the variable: Dim mcElapsedTime As clsElapsedTime Private Sub Form_Open(Cancel As Integer) Set mcElapsedTime = New clsElapsedTime Me.TimerInterval = 1000 - set up the timer for one second timer ticks End Sub Private Sub Form_Timer() mcElapsedTime.UpdateElapsedTime txtElapsedTime = mcElapsedTime.pElapsedTime End Sub The elapsed time class: Option Compare Database Option Explicit Private mlngSeconds As Long Private mlngMinutes As Long Private mlngHours As Long Private mstrElapsedTime Property Get pElapsedTime() As String pElapsedTime = mstrElapsedTime End Property Property Get pSeconds() As Long pSeconds = mlngSeconds End Property Property Get pMinutes() As Long pMinutes = mlngMinutes End Property Property Get pHours() As Long pHours = mlngHours End Property Private Function CalcElapsedTime() mstrElapsedTime = mlngHours & ":" & mlngMinutes & ":" & mlngSeconds End Function Function mResetElapsedTime() mlngSeconds = 0 mlngMinutes = 0 mlngHours = 0 End Function Function UpdateElapsedTime() mlngSeconds = mlngSeconds + 1 If mlngSeconds >= 60 Then mlngSeconds = 0 mlngMinutes = mlngMinutes + 1 End If If mlngMinutes >= 60 Then mlngMinutes = 0 mlngHours = mlngHours + 1 End If CalcElapsedTime End Function -- John W. Colby www.ColbyConsulting.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From jimdettman at verizon.net Sat Jul 16 09:33:56 2011 From: jimdettman at verizon.net (Jim Dettman) Date: Sat, 16 Jul 2011 10:33:56 -0400 Subject: [AccessD] VBA run-time error 3170: Could not find installable ISAM In-Reply-To: <2B7A375995D24727A5D8506CB9413AF8@HAL9007> References: <2B7A375995D24727A5D8506CB9413AF8@HAL9007> Message-ID: <242976E451CD4C82AB1CB0124621F85D@XPS> Rocky, Depends on version, but in the past, corrupt registry entries was usually the cause (assuming this was working already). See: When you import files, export files, or link files in Access 2002 or in Access 2003, some file types are missing, or you may receive a "Could not find installable ISAM" error message http://support.microsoft.com/kb/283881 This type of problem was the same all the way back through A97 (different registry keys though). Jim. -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Rocky Smolin Sent: Wednesday, July 13, 2011 07:25 PM To: accessd at databaseadvisors.com Subject: [AccessD] VBA run-time error 3170: Could not find installable ISAM A prospect is getting this error: VBA run-time error 3170: Could not find installable ISAM When I do TransferSpreadsheet. Does anyone know offhand what the likeliest cause of this is? MTIA Rocky -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From fuller.artful at gmail.com Sat Jul 16 09:48:36 2011 From: fuller.artful at gmail.com (Arthur Fuller) Date: Sat, 16 Jul 2011 10:48:36 -0400 Subject: [AccessD] Elapsed time class - Stuart please ignore... In-Reply-To: <4E2193A0.1000509@colbyconsulting.com> References: <4E2193A0.1000509@colbyconsulting.com> Message-ID: Nice and clean. How do you stop the timer? A. From jwcolby at colbyconsulting.com Sat Jul 16 10:01:25 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Sat, 16 Jul 2011 11:01:25 -0400 Subject: [AccessD] Elapsed time class - Stuart please ignore... In-Reply-To: References: <4E2193A0.1000509@colbyconsulting.com> Message-ID: <4E21A7C5.1000200@colbyconsulting.com> Set the form's TimerInterval to 0. The class with a pad function for the display and changing longs to int. Option Compare Database Option Explicit Private mintSeconds As Integer Private mintMinutes As Integer Private mintHours As Integer Private mstrElapsedTime Property Get pElapsedTime() As String pElapsedTime = mstrElapsedTime End Property Property Get pSeconds() As Integer pSeconds = mintSeconds End Property Property Get pMinutes() As Integer pMinutes = mintMinutes End Property Property Get pHours() As Integer pHours = mintHours End Property Function mPad(intToPad As Integer) As String Dim strToPad strToPad = intToPad If Len(strToPad < 2) Then strToPad = "0" & strToPad End If mPad = strToPad End Function Private Function CalcElapsedTime() Dim strPad As String mstrElapsedTime = mPad(mintHours) & ":" & mPad(mintMinutes) & ":" & mPad(mintSeconds) End Function Function mResetElapsedTime() mintSeconds = 0 mintMinutes = 0 mintHours = 0 End Function Function UpdateElapsedTime() mintSeconds = mintSeconds + 1 If mintSeconds >= 60 Then mintSeconds = 0 mintMinutes = mintMinutes + 1 End If If mintMinutes >= 60 Then mintMinutes = 0 mintHours = mintHours + 1 End If CalcElapsedTime End Function John W. Colby www.ColbyConsulting.com On 7/16/2011 10:48 AM, Arthur Fuller wrote: > Nice and clean. How do you stop the timer? > > A. From rockysmolin at bchacc.com Sat Jul 16 10:11:26 2011 From: rockysmolin at bchacc.com (Rocky Smolin) Date: Sat, 16 Jul 2011 08:11:26 -0700 Subject: [AccessD] VBA run-time error 3170: Could not find installableISAM In-Reply-To: <242976E451CD4C82AB1CB0124621F85D@XPS> References: <2B7A375995D24727A5D8506CB9413AF8@HAL9007> <242976E451CD4C82AB1CB0124621F85D@XPS> Message-ID: Thanks - will forward. BTW, I worked around the problem by using transfertext to a CSV file which opens just fine in Excel. :) Rocky -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Jim Dettman Sent: Saturday, July 16, 2011 7:34 AM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] VBA run-time error 3170: Could not find installableISAM Rocky, Depends on version, but in the past, corrupt registry entries was usually the cause (assuming this was working already). See: When you import files, export files, or link files in Access 2002 or in Access 2003, some file types are missing, or you may receive a "Could not find installable ISAM" error message http://support.microsoft.com/kb/283881 This type of problem was the same all the way back through A97 (different registry keys though). Jim. -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Rocky Smolin Sent: Wednesday, July 13, 2011 07:25 PM To: accessd at databaseadvisors.com Subject: [AccessD] VBA run-time error 3170: Could not find installable ISAM A prospect is getting this error: VBA run-time error 3170: Could not find installable ISAM When I do TransferSpreadsheet. Does anyone know offhand what the likeliest cause of this is? MTIA Rocky -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From rockysmolin at bchacc.com Sat Jul 16 10:18:09 2011 From: rockysmolin at bchacc.com (Rocky Smolin) Date: Sat, 16 Jul 2011 08:18:09 -0700 Subject: [AccessD] VBA run-time error 3170: Could not find installableISAM In-Reply-To: References: <2B7A375995D24727A5D8506CB9413AF8@HAL9007> Message-ID: William: Where do you set that DDE parameter? Thanks, Rocky -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of William Benson Sent: Friday, July 15, 2011 6:44 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] VBA run-time error 3170: Could not find installableISAM Could it be they have excel set to ignore requests from other applications? (DDE). On Jul 13, 2011 7:27 PM, "Rocky Smolin" wrote: > A prospect is getting this error: > > VBA run-time error 3170: Could not find installable ISAM > > When I do TransferSpreadsheet. > > Does anyone know offhand what the likeliest cause of this is? > > MTIA > > Rocky > > > -- > 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 jwcolby at colbyconsulting.com Sat Jul 16 13:46:59 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Sat, 16 Jul 2011 14:46:59 -0400 Subject: [AccessD] BE builder Message-ID: <4E21DCA3.6010105@colbyconsulting.com> I need an ultra simple BE builder. I have built my little game play logger for my son. It logs the time he starts and stops and plays a wave file - more and more often - to remind and encourage him to get off when his time is up. It only has a couple of simple tables, but it would be nice to split FE/BE so that if I fix a problem or add a feature I can update the FE. Ya know! It would be nice to have the program open and check if the BE exists, creating it if not. Placing the BE in the same dir as the FE would be fine. I can of course write that but if anyone has such a thing already that would be better. I did it long ago but it is lost in the deep shadows of the last century. Anyone? -- John W. Colby www.ColbyConsulting.com From stuart at lexacorp.com.pg Sat Jul 16 15:20:20 2011 From: stuart at lexacorp.com.pg (Stuart McLachlan) Date: Sun, 17 Jul 2011 06:20:20 +1000 Subject: [AccessD] BE builder In-Reply-To: <4E21DCA3.6010105@colbyconsulting.com> References: <4E21DCA3.6010105@colbyconsulting.com> Message-ID: <4E21F284.17638.9E6E218@stuart.lexacorp.com.pg> Quick one of the top of my head: Obviously you need would probably want to add indexes and do some error checking as well. Option Compare Database Option Explicit Const BEName As String = "GameTimer.mdb" Function CheckBE() If Dir$(CurrentProject.Path & "\" & BEName) = "" Then CreateBE End Function Function CreateBE() As Long Dim wrkDefault As Workspace Dim dbsNew As Database Dim tdfNew As TableDef Set wrkDefault = DBEngine.Workspaces(0) Set dbsNew = wrkDefault.CreateDatabase(CurrentProject.Path & "\" & BEName, dbLangGeneral) Set tdfNew = dbsNew.CreateTableDef("tblGameTimes") With tdfNew .Fields.Append .CreateField("StartDateTime", dbDate) .Fields.Append .CreateField("ElapsedTime", dbLong) .Fields.Append .CreateField("Game", dbText) End With dbsNew.TableDefs.Append tdfNew dbsNew.Close End Function On 16 Jul 2011 at 14:46, jwcolby wrote: > I need an ultra simple BE builder. I have built my little game play > logger for my son. It logs the time he starts and stops and plays a > wave file - more and more often - to remind and encourage him to get > off when his time is up. > > It only has a couple of simple tables, but it would be nice to split > FE/BE so that if I fix a problem or add a feature I can update the FE. > Ya know! > > It would be nice to have the program open and check if the BE exists, > creating it if not. Placing the BE in the same dir as the FE would be > fine. > > I can of course write that but if anyone has such a thing already that > would be better. I did it long ago but it is lost in the deep shadows > of the last century. > > Anyone? > -- > John W. Colby > www.ColbyConsulting.com > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > From jwcolby at colbyconsulting.com Sat Jul 16 15:38:49 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Sat, 16 Jul 2011 16:38:49 -0400 Subject: [AccessD] BE builder In-Reply-To: <4E21F284.17638.9E6E218@stuart.lexacorp.com.pg> References: <4E21DCA3.6010105@colbyconsulting.com> <4E21F284.17638.9E6E218@stuart.lexacorp.com.pg> Message-ID: <4E21F6D9.1000406@colbyconsulting.com> Thanks Stuart! John W. Colby www.ColbyConsulting.com On 7/16/2011 4:20 PM, Stuart McLachlan wrote: > Quick one of the top of my head: Obviously you need would probably want to add indexes > and do some error checking as well. > > Option Compare Database > Option Explicit > > Const BEName As String = "GameTimer.mdb" > > Function CheckBE() > If Dir$(CurrentProject.Path& "\"& BEName) = "" Then CreateBE > End Function > > Function CreateBE() As Long > Dim wrkDefault As Workspace > Dim dbsNew As Database > Dim tdfNew As TableDef > > Set wrkDefault = DBEngine.Workspaces(0) > Set dbsNew = wrkDefault.CreateDatabase(CurrentProject.Path& "\"& BEName, > dbLangGeneral) > Set tdfNew = dbsNew.CreateTableDef("tblGameTimes") > With tdfNew > .Fields.Append .CreateField("StartDateTime", dbDate) > .Fields.Append .CreateField("ElapsedTime", dbLong) > .Fields.Append .CreateField("Game", dbText) > End With > dbsNew.TableDefs.Append tdfNew > dbsNew.Close > End Function > > > On 16 Jul 2011 at 14:46, jwcolby wrote: > >> I need an ultra simple BE builder. I have built my little game play >> logger for my son. It logs the time he starts and stops and plays a >> wave file - more and more often - to remind and encourage him to get >> off when his time is up. >> >> It only has a couple of simple tables, but it would be nice to split >> FE/BE so that if I fix a problem or add a feature I can update the FE. >> Ya know! >> >> It would be nice to have the program open and check if the BE exists, >> creating it if not. Placing the BE in the same dir as the FE would be >> fine. >> >> I can of course write that but if anyone has such a thing already that >> would be better. I did it long ago but it is lost in the deep shadows >> of the last century. >> >> Anyone? >> -- >> John W. Colby >> www.ColbyConsulting.com >> -- >> AccessD mailing list >> AccessD at databaseadvisors.com >> http://databaseadvisors.com/mailman/listinfo/accessd >> Website: http://www.databaseadvisors.com >> > > > From jwcolby at colbyconsulting.com Sat Jul 16 16:09:35 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Sat, 16 Jul 2011 17:09:35 -0400 Subject: [AccessD] where is OpenOffice data store Message-ID: <4E21FE0F.3090606@colbyconsulting.com> I installed OpenOffice on a computer I am giving away. I just happened to create a table in their database app and the data store looks rather robust, perhaps mysql? I have not managed to Google what data store open office uses. Does anyone know? -- John W. Colby www.ColbyConsulting.com From stuart at lexacorp.com.pg Sat Jul 16 16:49:52 2011 From: stuart at lexacorp.com.pg (Stuart McLachlan) Date: Sun, 17 Jul 2011 07:49:52 +1000 Subject: [AccessD] where is OpenOffice data store In-Reply-To: <4E21FE0F.3090606@colbyconsulting.com> References: <4E21FE0F.3090606@colbyconsulting.com> Message-ID: <4E220780.30775.A38D934@stuart.lexacorp.com.pg> HyperSQL http://hsqldb.org/ -- Stuart On 16 Jul 2011 at 17:09, jwcolby wrote: > I installed OpenOffice on a computer I am giving away. I just > happened to create a table in their database app and the data store > looks rather robust, perhaps mysql? I have not managed to Google what > data store open office uses. > > Does anyone know? > > -- > John W. Colby > www.ColbyConsulting.com > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > From jwcolby at colbyconsulting.com Sun Jul 17 13:22:34 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Sun, 17 Jul 2011 14:22:34 -0400 Subject: [AccessD] Child computer Game timer Message-ID: <4E23286A.8030301@colbyconsulting.com> I have designed a game timer for my son which I am making available to list members if they want it. This timer is designed for children who are old enough to play "unsupervised" and I want them to have a set time that they can play per session. I want to record when they start and stop and have a display of how long they have been playing. I used to have Robbie "write it down" and set a timer on the stove. Both of which he "forgot" more often than not. This is not a "dishonest teenager" control mechanism, I am not getting into trying to outsmart a teenager here. It is merely meant to allow me to see how much time my son is playing. I removed all of the shortcuts from the desktop etc so that the way he opens his games is through this database. I actually copied one of the shortcuts into the startup directory for one game that required a shortcut. I then informed him that there are consequences if he is playing without going through the timer. The timer is an Access form which has a game combo and a child id combo. In my case only my son uses it at the moment, though I will probably have my daughter use it as well. It is FE/BE. The form consists of: 1) A game combo 2) A child combo 3) A start time 4) A stop time 5) The minutes they are allowed to play, fixed ATM though it could be included in the child record. Status controls are: 1) Last Play elapsed time 2) Last play time stopped At the very bottom of the form is an elapsed time. So the child selects the game they will play. The game has the stuff required to actually open the game, usually the filespec for the game (path and file name) but it can also use a shortcut file if the game requires starting directory etc. Selecting the game starts a timer which shows up on the "Elapsed time" at the bottom, and records the start time. There is a button which enters the stopped time and moves to a new record. Once a record is "stopped" it can no longer be edited. No records can be deleted (through the form). When the time is up, my son often does the "I need to do this one small thing before I quit" routine. In order to allow that but still encourage him to get off, i built in an annoyance timer. The database does not (yet) shut down the game automatically (though I might go there) but it does beep a series of beeps when time is up, and then starts beeping at him every N seconds. N decreases over time until it is beeping every second. This is truly annoying (to anyone in the room) and encourages him to finish up and get off. It also alerts any adult near by that "time is up". In fact it is so annoying that he was turning down the speaker when it beeped. I had to inform him that there would be consequences for that. ;) The system is working fine so far. I am finally getting his times logged regularly and getting him off when his time is up. We shall have to see how it works long term. Adolescents can be sneaky. Total loss of gaming privileges for breaking the rules is the consequence of being sneaky. Possible enhancements: 1) Times of day allowed to play 2) Total time allowed to play 3) Play time allowed per child etc. -- John W. Colby www.ColbyConsulting.com From mwp.reid at qub.ac.uk Sun Jul 17 13:38:07 2011 From: mwp.reid at qub.ac.uk (Martin Reid) Date: Sun, 17 Jul 2011 19:38:07 +0100 Subject: [AccessD] Child computer Game timer Message-ID: <631CF83223105545BF43EFB52CB08295492AF7C9ED@EX2K7-VIRT-2.ads.qub.ac.uk> I use the low tech approach walk over and turn it of. Martin Sent from my Windows Phone -----Original Message----- From: jwcolby Sent: 17 July 2011 19:26 To: Access Developers discussion and problem solving Subject: [AccessD] Child computer Game timer I have designed a game timer for my son which I am making available to list members if they want it. This timer is designed for children who are old enough to play "unsupervised" and I want them to have a set time that they can play per session. I want to record when they start and stop and have a display of how long they have been playing. I used to have Robbie "write it down" and set a timer on the stove. Both of which he "forgot" more often than not. This is not a "dishonest teenager" control mechanism, I am not getting into trying to outsmart a teenager here. It is merely meant to allow me to see how much time my son is playing. I removed all of the shortcuts from the desktop etc so that the way he opens his games is through this database. I actually copied one of the shortcuts into the startup directory for one game that required a shortcut. I then informed him that there are consequences if he is playing without going through the timer. The timer is an Access form which has a game combo and a child id combo. In my case only my son uses it at the moment, though I will probably have my daughter use it as well. It is FE/BE. The form consists of: 1) A game combo 2) A child combo 3) A start time 4) A stop time 5) The minutes they are allowed to play, fixed ATM though it could be included in the child record. Status controls are: 1) Last Play elapsed time 2) Last play time stopped At the very bottom of the form is an elapsed time. So the child selects the game they will play. The game has the stuff required to actually open the game, usually the filespec for the game (path and file name) but it can also use a shortcut file if the game requires starting directory etc. Selecting the game starts a timer which shows up on the "Elapsed time" at the bottom, and records the start time. There is a button which enters the stopped time and moves to a new record. Once a record is "stopped" it can no longer be edited. No records can be deleted (through the form). When the time is up, my son often does the "I need to do this one small thing before I quit" routine. In order to allow that but still encourage him to get off, i built in an annoyance timer. The database does not (yet) shut down the game automatically (though I might go there) but it does beep a series of beeps when time is up, and then starts beeping at him every N seconds. N decreases over time until it is beeping every second. This is truly annoying (to anyone in the room) and encourages him to finish up and get off. It also alerts any adult near by that "time is up". In fact it is so annoying that he was turning down the speaker when it beeped. I had to inform him that there would be consequences for that. ;) The system is working fine so far. I am finally getting his times logged regularly and getting him off when his time is up. We shall have to see how it works long term. Adolescents can be sneaky. Total loss of gaming privileges for breaking the rules is the consequence of being sneaky. Possible enhancements: 1) Times of day allowed to play 2) Total time allowed to play 3) Play time allowed per child etc. -- John W. Colby www.ColbyConsulting.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 Jul 17 14:19:38 2011 From: accessd at shaw.ca (Jim Lawrence) Date: Sun, 17 Jul 2011 12:19:38 -0700 Subject: [AccessD] where is OpenOffice data store In-Reply-To: <4E220780.30775.A38D934@stuart.lexacorp.com.pg> References: <4E21FE0F.3090606@colbyconsulting.com> <4E220780.30775.A38D934@stuart.lexacorp.com.pg> Message-ID: <4467AEDCF3B74D77926B9BDB54F72737@creativesystemdesigns.com> Hi John, Stuart... Alternatively, MySQL/PHPAdmin, is so standard and there is thousands of web sites dedicated that DB and Admin FE. For a give away it is the best as you do not really want the client coming back having to ask all sorts of questions...;-) Jim -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Stuart McLachlan Sent: Saturday, July 16, 2011 2:50 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] where is OpenOffice data store HyperSQL http://hsqldb.org/ -- Stuart On 16 Jul 2011 at 17:09, jwcolby wrote: > I installed OpenOffice on a computer I am giving away. I just > happened to create a table in their database app and the data store > looks rather robust, perhaps mysql? I have not managed to Google what > data store open office uses. > > Does anyone know? > > -- > John W. Colby > www.ColbyConsulting.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 Jul 17 14:24:09 2011 From: accessd at shaw.ca (Jim Lawrence) Date: Sun, 17 Jul 2011 12:24:09 -0700 Subject: [AccessD] Child computer Game timer In-Reply-To: <4E23286A.8030301@colbyconsulting.com> References: <4E23286A.8030301@colbyconsulting.com> Message-ID: Hi John: You could just get something like the KidLogger. http://kidlogger.net/download.html Jim -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Sunday, July 17, 2011 11:23 AM To: Access Developers discussion and problem solving Subject: [AccessD] Child computer Game timer I have designed a game timer for my son which I am making available to list members if they want it. This timer is designed for children who are old enough to play "unsupervised" and I want them to have a set time that they can play per session. I want to record when they start and stop and have a display of how long they have been playing. I used to have Robbie "write it down" and set a timer on the stove. Both of which he "forgot" more often than not. This is not a "dishonest teenager" control mechanism, I am not getting into trying to outsmart a teenager here. It is merely meant to allow me to see how much time my son is playing. I removed all of the shortcuts from the desktop etc so that the way he opens his games is through this database. I actually copied one of the shortcuts into the startup directory for one game that required a shortcut. I then informed him that there are consequences if he is playing without going through the timer. The timer is an Access form which has a game combo and a child id combo. In my case only my son uses it at the moment, though I will probably have my daughter use it as well. It is FE/BE. The form consists of: 1) A game combo 2) A child combo 3) A start time 4) A stop time 5) The minutes they are allowed to play, fixed ATM though it could be included in the child record. Status controls are: 1) Last Play elapsed time 2) Last play time stopped At the very bottom of the form is an elapsed time. So the child selects the game they will play. The game has the stuff required to actually open the game, usually the filespec for the game (path and file name) but it can also use a shortcut file if the game requires starting directory etc. Selecting the game starts a timer which shows up on the "Elapsed time" at the bottom, and records the start time. There is a button which enters the stopped time and moves to a new record. Once a record is "stopped" it can no longer be edited. No records can be deleted (through the form). When the time is up, my son often does the "I need to do this one small thing before I quit" routine. In order to allow that but still encourage him to get off, i built in an annoyance timer. The database does not (yet) shut down the game automatically (though I might go there) but it does beep a series of beeps when time is up, and then starts beeping at him every N seconds. N decreases over time until it is beeping every second. This is truly annoying (to anyone in the room) and encourages him to finish up and get off. It also alerts any adult near by that "time is up". In fact it is so annoying that he was turning down the speaker when it beeped. I had to inform him that there would be consequences for that. ;) The system is working fine so far. I am finally getting his times logged regularly and getting him off when his time is up. We shall have to see how it works long term. Adolescents can be sneaky. Total loss of gaming privileges for breaking the rules is the consequence of being sneaky. Possible enhancements: 1) Times of day allowed to play 2) Total time allowed to play 3) Play time allowed per child etc. -- John W. Colby www.ColbyConsulting.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 Sun Jul 17 16:36:45 2011 From: stuart at lexacorp.com.pg (Stuart McLachlan) Date: Mon, 18 Jul 2011 07:36:45 +1000 Subject: [AccessD] where is OpenOffice data store In-Reply-To: <4467AEDCF3B74D77926B9BDB54F72737@creativesystemdesigns.com> References: <4E21FE0F.3090606@colbyconsulting.com>, <4E220780.30775.A38D934@stuart.lexacorp.com.pg>, <4467AEDCF3B74D77926B9BDB54F72737@creativesystemdesigns.com> Message-ID: <4E2355ED.23197.F5337D2@stuart.lexacorp.com.pg> Jim, John wasn't asking for suggestions, he was asking for a fact - what engine does Open Office use, -- Stuart On 17 Jul 2011 at 12:19, Jim Lawrence wrote: > Hi John, Stuart... > > Alternatively, MySQL/PHPAdmin, is so standard and there is thousands > of web sites dedicated that DB and Admin FE. For a give away it is the > best as you do not really want the client coming back having to ask > all sorts of questions...;-) > > Jim > > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Stuart > McLachlan Sent: Saturday, July 16, 2011 2:50 PM To: Access Developers > discussion and problem solving Subject: Re: [AccessD] where is > OpenOffice data store > > HyperSQL http://hsqldb.org/ > > -- > Stuart > > On 16 Jul 2011 at 17:09, jwcolby wrote: > > > I installed OpenOffice on a computer I am giving away. I just > > happened to create a table in their database app and the data store > > looks rather robust, perhaps mysql? I have not managed to Google > > what data store open office uses. > > > > Does anyone know? > > > > -- > > John W. Colby > > www.ColbyConsulting.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 Jul 17 19:00:34 2011 From: accessd at shaw.ca (Jim Lawrence) Date: Sun, 17 Jul 2011 17:00:34 -0700 Subject: [AccessD] where is OpenOffice data store In-Reply-To: <4E2355ED.23197.F5337D2@stuart.lexacorp.com.pg> References: <4E21FE0F.3090606@colbyconsulting.com> <4E220780.30775.A38D934@stuart.lexacorp.com.pg> <4467AEDCF3B74D77926B9BDB54F72737@creativesystemdesigns.com> <4E2355ED.23197.F5337D2@stuart.lexacorp.com.pg> Message-ID: <876882B1D75F40B68C0F13C95949AAAE@creativesystemdesigns.com> Right you are, Stuart... Jim -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Stuart McLachlan Sent: Sunday, July 17, 2011 2:37 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] where is OpenOffice data store Jim, John wasn't asking for suggestions, he was asking for a fact - what engine does Open Office use, -- Stuart On 17 Jul 2011 at 12:19, Jim Lawrence wrote: > Hi John, Stuart... > > Alternatively, MySQL/PHPAdmin, is so standard and there is thousands > of web sites dedicated that DB and Admin FE. For a give away it is the > best as you do not really want the client coming back having to ask > all sorts of questions...;-) > > Jim > > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Stuart > McLachlan Sent: Saturday, July 16, 2011 2:50 PM To: Access Developers > discussion and problem solving Subject: Re: [AccessD] where is > OpenOffice data store > > HyperSQL http://hsqldb.org/ > > -- > Stuart > > On 16 Jul 2011 at 17:09, jwcolby wrote: > > > I installed OpenOffice on a computer I am giving away. I just > > happened to create a table in their database app and the data store > > looks rather robust, perhaps mysql? I have not managed to Google > > what data store open office uses. > > > > Does anyone know? > > > > -- > > John W. Colby > > www.ColbyConsulting.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 jimdettman at verizon.net Sun Jul 17 20:09:10 2011 From: jimdettman at verizon.net (Jim Dettman) Date: Sun, 17 Jul 2011 21:09:10 -0400 Subject: [AccessD] Child computer Game timer In-Reply-To: References: <4E23286A.8030301@colbyconsulting.com> Message-ID: Check your router too...a lot of routers know have bandwidth monitoring, parental controls, and the ability to filter (by Mac address) based on a schedule. I've got mine set to cut out all internet access from 2:00 - 6:00 am. Jim. -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Jim Lawrence Sent: Sunday, July 17, 2011 03:24 PM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Child computer Game timer Hi John: You could just get something like the KidLogger. http://kidlogger.net/download.html Jim -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Sunday, July 17, 2011 11:23 AM To: Access Developers discussion and problem solving Subject: [AccessD] Child computer Game timer I have designed a game timer for my son which I am making available to list members if they want it. This timer is designed for children who are old enough to play "unsupervised" and I want them to have a set time that they can play per session. I want to record when they start and stop and have a display of how long they have been playing. I used to have Robbie "write it down" and set a timer on the stove. Both of which he "forgot" more often than not. This is not a "dishonest teenager" control mechanism, I am not getting into trying to outsmart a teenager here. It is merely meant to allow me to see how much time my son is playing. I removed all of the shortcuts from the desktop etc so that the way he opens his games is through this database. I actually copied one of the shortcuts into the startup directory for one game that required a shortcut. I then informed him that there are consequences if he is playing without going through the timer. The timer is an Access form which has a game combo and a child id combo. In my case only my son uses it at the moment, though I will probably have my daughter use it as well. It is FE/BE. The form consists of: 1) A game combo 2) A child combo 3) A start time 4) A stop time 5) The minutes they are allowed to play, fixed ATM though it could be included in the child record. Status controls are: 1) Last Play elapsed time 2) Last play time stopped At the very bottom of the form is an elapsed time. So the child selects the game they will play. The game has the stuff required to actually open the game, usually the filespec for the game (path and file name) but it can also use a shortcut file if the game requires starting directory etc. Selecting the game starts a timer which shows up on the "Elapsed time" at the bottom, and records the start time. There is a button which enters the stopped time and moves to a new record. Once a record is "stopped" it can no longer be edited. No records can be deleted (through the form). When the time is up, my son often does the "I need to do this one small thing before I quit" routine. In order to allow that but still encourage him to get off, i built in an annoyance timer. The database does not (yet) shut down the game automatically (though I might go there) but it does beep a series of beeps when time is up, and then starts beeping at him every N seconds. N decreases over time until it is beeping every second. This is truly annoying (to anyone in the room) and encourages him to finish up and get off. It also alerts any adult near by that "time is up". In fact it is so annoying that he was turning down the speaker when it beeped. I had to inform him that there would be consequences for that. ;) The system is working fine so far. I am finally getting his times logged regularly and getting him off when his time is up. We shall have to see how it works long term. Adolescents can be sneaky. Total loss of gaming privileges for breaking the rules is the consequence of being sneaky. Possible enhancements: 1) Times of day allowed to play 2) Total time allowed to play 3) Play time allowed per child etc. -- John W. Colby www.ColbyConsulting.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 dbdoug at gmail.com Sun Jul 17 21:31:16 2011 From: dbdoug at gmail.com (Doug Steele) Date: Sun, 17 Jul 2011 19:31:16 -0700 Subject: [AccessD] Child computer Game timer In-Reply-To: References: <4E23286A.8030301@colbyconsulting.com> Message-ID: John's doing it right, in my opinion. If Robbie wants more time, he's going to be forced to learn to hack John's program. Then, before he knows it, no more computer games, just huge SQL databases to maintain while John enjoys his retirement... Doug On Sun, Jul 17, 2011 at 6:09 PM, Jim Dettman wrote: > > ?Check your router too...a lot of routers know have bandwidth monitoring, > parental controls, and the ability to filter (by Mac address) based on a > schedule. > > ?I've got mine set to cut out all internet access from 2:00 - 6:00 am. > > Jim. > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Jim Lawrence > Sent: Sunday, July 17, 2011 03:24 PM > To: 'Access Developers discussion and problem solving' > Subject: Re: [AccessD] Child computer Game timer > > Hi John: > > You could just get something like the KidLogger. > > http://kidlogger.net/download.html > > Jim > > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby > Sent: Sunday, July 17, 2011 11:23 AM > To: Access Developers discussion and problem solving > Subject: [AccessD] Child computer Game timer > > I have designed a game timer for my son which I am making available to list > members if they want it. > > This timer is designed for children who are old enough to play > "unsupervised" and I want them to > have a set time that they can play per session. ?I want to record when they > start and stop and have > a display of how long they have been playing. ?I used to have Robbie "write > it down" and set a timer > on the stove. ?Both of which he "forgot" more often than not. > > This is not a "dishonest teenager" control mechanism, I am not getting into > trying to outsmart a > teenager here. ?It is merely meant to allow me to see how much time my son > is playing. ?I removed > all of the shortcuts from the desktop etc so that the way he opens his games > is through this > database. ?I actually copied one of the shortcuts into the startup directory > for one game that > required a shortcut. > > I then informed him that there are consequences if he is playing without > going through the timer. > > The timer is an Access form which has a game combo and a child id combo. ?In > my case only my son > uses it at the moment, though I will probably have my daughter use it as > well. ?It is FE/BE. > > The form consists of: > > 1) A game combo > 2) A child combo > 3) A start time > 4) A stop time > 5) The minutes they are allowed to play, fixed ATM though it could be > included in the child record. > > Status controls are: > > 1) Last Play elapsed time > 2) Last play time stopped > > At the very bottom of the form is an elapsed time. > > So the child selects the game they will play. ?The game has the stuff > required to actually open the > game, usually the filespec for the game (path and file name) but it can also > use a shortcut file if > the game requires starting directory etc. > > Selecting the game starts a timer which shows up on the "Elapsed time" at > the bottom, and records > the start time. ?There is a button which enters the stopped time and moves > to a new record. ?Once a > record is "stopped" it can no longer be edited. ?No records can be deleted > (through the form). > > When the time is up, my son often does the "I need to do this one small > thing before I quit" > routine. ?In order to allow that but still encourage him to get off, i built > in an annoyance timer. > ?The database does not (yet) shut down the game automatically (though I > might go there) but it does > beep a series of beeps when time is up, and then starts beeping at him every > N seconds. ?N decreases > over time until it is beeping every second. ?This is truly annoying (to > anyone in the room) and > encourages him to finish up and get off. ?It also alerts any adult near by > that "time is up". ?In > fact it is so annoying that he was turning down the speaker when it beeped. > I had to inform him > that there would be consequences for that. ?;) > > The system is working fine so far. ?I am finally getting his times logged > regularly and getting him > off when his time is up. ?We shall have to see how it works long term. > Adolescents can be sneaky. > Total loss of gaming privileges for breaking the rules is the consequence of > being sneaky. > > Possible enhancements: > > 1) Times of day allowed to play > 2) Total time allowed to play > 3) Play time allowed per child > etc. > > -- > John W. Colby > www.ColbyConsulting.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 vbacreations at gmail.com Sun Jul 17 21:46:16 2011 From: vbacreations at gmail.com (William Benson (VBACreations.Com)) Date: Sun, 17 Jul 2011 22:46:16 -0400 Subject: [AccessD] where is OpenOffice data store In-Reply-To: <4E21FE0F.3090606@colbyconsulting.com> References: <4E21FE0F.3090606@colbyconsulting.com> Message-ID: <000101cc44f4$ddf6f4c0$99e4de40$@gmail.com> Since you didn't get to Google at the time, I did some searching. Here were some references I found, but no succinct answer: http://en.wikipedia.org/wiki/OpenOffice.org A database management program similar to Microsoft Access. Base allows the creation and manipulation of databases, and the building of forms and reports to provide easy access to data for end-users. As with MS Access, Base can function as a front-end to a number of different database systems, including Access databases (JET), ODBC data sources and MySQL/PostgreSQL. Base became part of the suite starting with version 2.0. Native to the OpenOffice.org suite is an adaptation of HSQL. While Base can be a front-end for any of the databases listed, there is no need to install any of them. Raw SQL code can be entered by those who prefer it, or graphical user interfaces can be used. Here are two really good links in terms of understanding and usability of ooBase http://sheepdogguides.com/fdb/fdb1main.htm http://www.pitonyak.org/database/AndrewBase.odt Can we get back to MS Access now? ;-) -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Saturday, July 16, 2011 5:10 PM To: Access Developers discussion and problem solving Subject: [AccessD] where is OpenOffice data store I installed OpenOffice on a computer I am giving away. I just happened to create a table in their database app and the data store looks rather robust, perhaps mysql? I have not managed to Google what data store open office uses. Does anyone know? -- John W. Colby www.ColbyConsulting.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From vbacreations at gmail.com Sun Jul 17 22:18:09 2011 From: vbacreations at gmail.com (William Benson (VBACreations.Com)) Date: Sun, 17 Jul 2011 23:18:09 -0400 Subject: [AccessD] Child computer Game timer In-Reply-To: References: <4E23286A.8030301@colbyconsulting.com> Message-ID: <000201cc44f9$527fbb70$f77f3250$@gmail.com> OMG that is soooo funny..... I needed a laugh Doug. -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Doug Steele Sent: Sunday, July 17, 2011 10:31 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Child computer Game timer John's doing it right, in my opinion. If Robbie wants more time, he's going to be forced to learn to hack John's program. Then, before he knows it, no more computer games, just huge SQL databases to maintain while John enjoys his retirement... Doug On Sun, Jul 17, 2011 at 6:09 PM, Jim Dettman wrote: > > ?Check your router too...a lot of routers know have bandwidth monitoring, > parental controls, and the ability to filter (by Mac address) based on a > schedule. > > ?I've got mine set to cut out all internet access from 2:00 - 6:00 am. > > Jim. > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Jim Lawrence > Sent: Sunday, July 17, 2011 03:24 PM > To: 'Access Developers discussion and problem solving' > Subject: Re: [AccessD] Child computer Game timer > > Hi John: > > You could just get something like the KidLogger. > > http://kidlogger.net/download.html > > Jim > > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby > Sent: Sunday, July 17, 2011 11:23 AM > To: Access Developers discussion and problem solving > Subject: [AccessD] Child computer Game timer > > I have designed a game timer for my son which I am making available to list > members if they want it. > > This timer is designed for children who are old enough to play > "unsupervised" and I want them to > have a set time that they can play per session. ?I want to record when they > start and stop and have > a display of how long they have been playing. ?I used to have Robbie "write > it down" and set a timer > on the stove. ?Both of which he "forgot" more often than not. > > This is not a "dishonest teenager" control mechanism, I am not getting into > trying to outsmart a > teenager here. ?It is merely meant to allow me to see how much time my son > is playing. ?I removed > all of the shortcuts from the desktop etc so that the way he opens his games > is through this > database. ?I actually copied one of the shortcuts into the startup directory > for one game that > required a shortcut. > > I then informed him that there are consequences if he is playing without > going through the timer. > > The timer is an Access form which has a game combo and a child id combo. ?In > my case only my son > uses it at the moment, though I will probably have my daughter use it as > well. ?It is FE/BE. > > The form consists of: > > 1) A game combo > 2) A child combo > 3) A start time > 4) A stop time > 5) The minutes they are allowed to play, fixed ATM though it could be > included in the child record. > > Status controls are: > > 1) Last Play elapsed time > 2) Last play time stopped > > At the very bottom of the form is an elapsed time. > > So the child selects the game they will play. ?The game has the stuff > required to actually open the > game, usually the filespec for the game (path and file name) but it can also > use a shortcut file if > the game requires starting directory etc. > > Selecting the game starts a timer which shows up on the "Elapsed time" at > the bottom, and records > the start time. ?There is a button which enters the stopped time and moves > to a new record. ?Once a > record is "stopped" it can no longer be edited. ?No records can be deleted > (through the form). > > When the time is up, my son often does the "I need to do this one small > thing before I quit" > routine. ?In order to allow that but still encourage him to get off, i built > in an annoyance timer. > ?The database does not (yet) shut down the game automatically (though I > might go there) but it does > beep a series of beeps when time is up, and then starts beeping at him every > N seconds. ?N decreases > over time until it is beeping every second. ?This is truly annoying (to > anyone in the room) and > encourages him to finish up and get off. ?It also alerts any adult near by > that "time is up". ?In > fact it is so annoying that he was turning down the speaker when it beeped. > I had to inform him > that there would be consequences for that. ?;) > > The system is working fine so far. ?I am finally getting his times logged > regularly and getting him > off when his time is up. ?We shall have to see how it works long term. > Adolescents can be sneaky. > Total loss of gaming privileges for breaking the rules is the consequence of > being sneaky. > > Possible enhancements: > > 1) Times of day allowed to play > 2) Total time allowed to play > 3) Play time allowed per child > etc. > > -- > John W. Colby > www.ColbyConsulting.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 jwcolby at colbyconsulting.com Mon Jul 18 05:52:37 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Mon, 18 Jul 2011 06:52:37 -0400 Subject: [AccessD] Child computer Game timer In-Reply-To: References: <4E23286A.8030301@colbyconsulting.com> Message-ID: <4E241075.3040204@colbyconsulting.com> I already have him learning Access! He loves learning what dad does. John W. Colby www.ColbyConsulting.com On 7/17/2011 10:31 PM, Doug Steele wrote: > John's doing it right, in my opinion. If Robbie wants more time, he's > going to be forced to learn to hack John's program. Then, before he > knows it, no more computer games, just huge SQL databases to maintain > while John enjoys his retirement... > > Doug > > On Sun, Jul 17, 2011 at 6:09 PM, Jim Dettman wrote: >> >> Check your router too...a lot of routers know have bandwidth monitoring, >> parental controls, and the ability to filter (by Mac address) based on a >> schedule. >> >> I've got mine set to cut out all internet access from 2:00 - 6:00 am. >> >> Jim. >> >> -----Original Message----- >> From: accessd-bounces at databaseadvisors.com >> [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Jim Lawrence >> Sent: Sunday, July 17, 2011 03:24 PM >> To: 'Access Developers discussion and problem solving' >> Subject: Re: [AccessD] Child computer Game timer >> >> Hi John: >> >> You could just get something like the KidLogger. >> >> http://kidlogger.net/download.html >> >> Jim >> >> >> -----Original Message----- >> From: accessd-bounces at databaseadvisors.com >> [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby >> Sent: Sunday, July 17, 2011 11:23 AM >> To: Access Developers discussion and problem solving >> Subject: [AccessD] Child computer Game timer >> >> I have designed a game timer for my son which I am making available to list >> members if they want it. >> >> This timer is designed for children who are old enough to play >> "unsupervised" and I want them to >> have a set time that they can play per session. I want to record when they >> start and stop and have >> a display of how long they have been playing. I used to have Robbie "write >> it down" and set a timer >> on the stove. Both of which he "forgot" more often than not. >> >> This is not a "dishonest teenager" control mechanism, I am not getting into >> trying to outsmart a >> teenager here. It is merely meant to allow me to see how much time my son >> is playing. I removed >> all of the shortcuts from the desktop etc so that the way he opens his games >> is through this >> database. I actually copied one of the shortcuts into the startup directory >> for one game that >> required a shortcut. >> >> I then informed him that there are consequences if he is playing without >> going through the timer. >> >> The timer is an Access form which has a game combo and a child id combo. In >> my case only my son >> uses it at the moment, though I will probably have my daughter use it as >> well. It is FE/BE. >> >> The form consists of: >> >> 1) A game combo >> 2) A child combo >> 3) A start time >> 4) A stop time >> 5) The minutes they are allowed to play, fixed ATM though it could be >> included in the child record. >> >> Status controls are: >> >> 1) Last Play elapsed time >> 2) Last play time stopped >> >> At the very bottom of the form is an elapsed time. >> >> So the child selects the game they will play. The game has the stuff >> required to actually open the >> game, usually the filespec for the game (path and file name) but it can also >> use a shortcut file if >> the game requires starting directory etc. >> >> Selecting the game starts a timer which shows up on the "Elapsed time" at >> the bottom, and records >> the start time. There is a button which enters the stopped time and moves >> to a new record. Once a >> record is "stopped" it can no longer be edited. No records can be deleted >> (through the form). >> >> When the time is up, my son often does the "I need to do this one small >> thing before I quit" >> routine. In order to allow that but still encourage him to get off, i built >> in an annoyance timer. >> The database does not (yet) shut down the game automatically (though I >> might go there) but it does >> beep a series of beeps when time is up, and then starts beeping at him every >> N seconds. N decreases >> over time until it is beeping every second. This is truly annoying (to >> anyone in the room) and >> encourages him to finish up and get off. It also alerts any adult near by >> that "time is up". In >> fact it is so annoying that he was turning down the speaker when it beeped. >> I had to inform him >> that there would be consequences for that. ;) >> >> The system is working fine so far. I am finally getting his times logged >> regularly and getting him >> off when his time is up. We shall have to see how it works long term. >> Adolescents can be sneaky. >> Total loss of gaming privileges for breaking the rules is the consequence of >> being sneaky. >> >> Possible enhancements: >> >> 1) Times of day allowed to play >> 2) Total time allowed to play >> 3) Play time allowed per child >> etc. >> >> -- >> John W. Colby >> www.ColbyConsulting.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 DWUTKA at Marlow.com Mon Jul 18 09:12:29 2011 From: DWUTKA at Marlow.com (Drew Wutka) Date: Mon, 18 Jul 2011 09:12:29 -0500 Subject: [AccessD] Child computer Game timer In-Reply-To: <4E23286A.8030301@colbyconsulting.com> References: <4E23286A.8030301@colbyconsulting.com> Message-ID: Why not just detect the game he is playing based upon the window's that are running? Each game should have a window that should be easy to identify. Drew -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Sunday, July 17, 2011 1:23 PM To: Access Developers discussion and problem solving Subject: [AccessD] Child computer Game timer I have designed a game timer for my son which I am making available to list members if they want it. This timer is designed for children who are old enough to play "unsupervised" and I want them to have a set time that they can play per session. I want to record when they start and stop and have a display of how long they have been playing. I used to have Robbie "write it down" and set a timer on the stove. Both of which he "forgot" more often than not. This is not a "dishonest teenager" control mechanism, I am not getting into trying to outsmart a teenager here. It is merely meant to allow me to see how much time my son is playing. I removed all of the shortcuts from the desktop etc so that the way he opens his games is through this database. I actually copied one of the shortcuts into the startup directory for one game that required a shortcut. I then informed him that there are consequences if he is playing without going through the timer. The timer is an Access form which has a game combo and a child id combo. In my case only my son uses it at the moment, though I will probably have my daughter use it as well. It is FE/BE. The form consists of: 1) A game combo 2) A child combo 3) A start time 4) A stop time 5) The minutes they are allowed to play, fixed ATM though it could be included in the child record. Status controls are: 1) Last Play elapsed time 2) Last play time stopped At the very bottom of the form is an elapsed time. So the child selects the game they will play. The game has the stuff required to actually open the game, usually the filespec for the game (path and file name) but it can also use a shortcut file if the game requires starting directory etc. Selecting the game starts a timer which shows up on the "Elapsed time" at the bottom, and records the start time. There is a button which enters the stopped time and moves to a new record. Once a record is "stopped" it can no longer be edited. No records can be deleted (through the form). When the time is up, my son often does the "I need to do this one small thing before I quit" routine. In order to allow that but still encourage him to get off, i built in an annoyance timer. The database does not (yet) shut down the game automatically (though I might go there) but it does beep a series of beeps when time is up, and then starts beeping at him every N seconds. N decreases over time until it is beeping every second. This is truly annoying (to anyone in the room) and encourages him to finish up and get off. It also alerts any adult near by that "time is up". In fact it is so annoying that he was turning down the speaker when it beeped. I had to inform him that there would be consequences for that. ;) The system is working fine so far. I am finally getting his times logged regularly and getting him off when his time is up. We shall have to see how it works long term. Adolescents can be sneaky. Total loss of gaming privileges for breaking the rules is the consequence of being sneaky. Possible enhancements: 1) Times of day allowed to play 2) Total time allowed to play 3) Play time allowed per child etc. -- John W. Colby www.ColbyConsulting.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com The information contained in this transmission is intended only for the person or entity to which it is addressed and may contain II-VI Proprietary and/or II-VI Business Sensitive material. If you are not the intended recipient, please contact the sender immediately and destroy the material in its entirety, whether electronic or hard copy. You are notified that any review, retransmission, copying, disclosure, dissemination, or other use of, or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. From rockysmolin at bchacc.com Mon Jul 18 10:57:23 2011 From: rockysmolin at bchacc.com (Rocky Smolin) Date: Mon, 18 Jul 2011 08:57:23 -0700 Subject: [AccessD] Referring to a function in a subform Message-ID: <49EBA6DA69794EF88740050C7D84F12A@HAL9007> Dear List: Gets me every time. I want to call a private function in a subform on my main form. Subform name is subfrmAccount, main form is frmEditAccounts, function name is MakeShippingLabelEditAccounts. I've tried a lot of variations like: Me.fldShippingLabel = Forms!frmEditAccounts.subfrmAccount.Form.MakeShippingLabelEditAccounts with ! and . in various places and nothing works. The function works fine when I use it in the subform. Help! MTIA Rocky Smolin Beach Access Software 858-259-4334 www.bchacc.com www.e-z-mrp.com From bill_patten at embarqmail.com Mon Jul 18 11:03:48 2011 From: bill_patten at embarqmail.com (Bill Patten) Date: Mon, 18 Jul 2011 09:03:48 -0700 Subject: [AccessD] Referring to a function in a subform In-Reply-To: <49EBA6DA69794EF88740050C7D84F12A@HAL9007> References: <49EBA6DA69794EF88740050C7D84F12A@HAL9007> Message-ID: Hi Rocky, I think I'd just make it public. Bill -------------------------------------------------- From: "Rocky Smolin" Sent: Monday, July 18, 2011 8:57 AM To: Subject: [AccessD] Referring to a function in a subform Dear List: Gets me every time. I want to call a private function in a subform on my main form. Subform name is subfrmAccount, main form is frmEditAccounts, function name is MakeShippingLabelEditAccounts. I've tried a lot of variations like: Me.fldShippingLabel = Forms!frmEditAccounts.subfrmAccount.Form.MakeShippingLabelEditAccounts with ! and . in various places and nothing works. The function works fine when I use it in the subform. Help! MTIA Rocky Smolin Beach Access Software 858-259-4334 www.bchacc.com www.e-z-mrp.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From charlotte.foust at gmail.com Mon Jul 18 11:13:28 2011 From: charlotte.foust at gmail.com (Charlotte Foust) Date: Mon, 18 Jul 2011 09:13:28 -0700 Subject: [AccessD] Referring to a function in a subform In-Reply-To: <49EBA6DA69794EF88740050C7D84F12A@HAL9007> References: <49EBA6DA69794EF88740050C7D84F12A@HAL9007> Message-ID: Bill has it right. If the scope of the routine isn't public, it is visible as a method only within the subform itself. Charlotte Foust On Mon, Jul 18, 2011 at 8:57 AM, Rocky Smolin wrote: > Dear List: > > Gets me every time. > > I want to call a private function in a subform on my main form. Subform > name is subfrmAccount, main form is frmEditAccounts, function name is > MakeShippingLabelEditAccounts. > > I've tried a lot of variations like: > > Me.fldShippingLabel = > Forms!frmEditAccounts.subfrmAccount.Form.MakeShippingLabelEditAccounts > > with ! and . in various places and nothing works. > > The function works fine when I use it in the subform. > > Help! > > MTIA > > Rocky Smolin > Beach Access Software > 858-259-4334 > www.bchacc.com > > > > > www.e-z-mrp.com > > > > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > > > Website: http://www.databaseadvisors.com > > > From rockysmolin at bchacc.com Mon Jul 18 11:16:07 2011 From: rockysmolin at bchacc.com (Rocky Smolin) Date: Mon, 18 Jul 2011 09:16:07 -0700 Subject: [AccessD] Referring to a function in a subform In-Reply-To: References: <49EBA6DA69794EF88740050C7D84F12A@HAL9007> Message-ID: <7D937294F929402698129D0C7BE01E58@HAL9007> Tried public but no soap. Moving it to a module now. R -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Charlotte Foust Sent: Monday, July 18, 2011 9:13 AM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Referring to a function in a subform Bill has it right. If the scope of the routine isn't public, it is visible as a method only within the subform itself. Charlotte Foust On Mon, Jul 18, 2011 at 8:57 AM, Rocky Smolin wrote: > Dear List: > > Gets me every time. > > I want to call a private function in a subform on my main form. > Subform name is subfrmAccount, main form is frmEditAccounts, function > name is MakeShippingLabelEditAccounts. > > I've tried a lot of variations like: > > Me.fldShippingLabel = > Forms!frmEditAccounts.subfrmAccount.Form.MakeShippingLabelEditAccounts > > with ! and . in various places and nothing works. > > The function works fine when I use it in the subform. > > Help! > > MTIA > > Rocky Smolin > Beach Access Software > 858-259-4334 > www.bchacc.com > > > > > www.e-z-mrp.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 dhb at flsi.com Mon Jul 18 13:06:20 2011 From: dhb at flsi.com (Darrell Burns) Date: Mon, 18 Jul 2011 11:06:20 -0700 Subject: [AccessD] Referring to a function in a subform In-Reply-To: <7D937294F929402698129D0C7BE01E58@HAL9007> References: <49EBA6DA69794EF88740050C7D84F12A@HAL9007> <7D937294F929402698129D0C7BE01E58@HAL9007> Message-ID: <00b101cc4575$6805c300$38114900$@flsi.com> Hey Rocky. Here's how I do it... In MasterForm: Set fSub = Me.Form(SubformName) fSub.Form.GoToID Nz(MoveToID, 0) In SubForm: Public Sub GoToID(Optional optMoveToID) HTH, DB -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Rocky Smolin Sent: Monday, July 18, 2011 9:16 AM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Referring to a function in a subform Tried public but no soap. Moving it to a module now. R -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Charlotte Foust Sent: Monday, July 18, 2011 9:13 AM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Referring to a function in a subform Bill has it right. If the scope of the routine isn't public, it is visible as a method only within the subform itself. Charlotte Foust On Mon, Jul 18, 2011 at 8:57 AM, Rocky Smolin wrote: > Dear List: > > Gets me every time. > > I want to call a private function in a subform on my main form. > Subform name is subfrmAccount, main form is frmEditAccounts, function > name is MakeShippingLabelEditAccounts. > > I've tried a lot of variations like: > > Me.fldShippingLabel = > Forms!frmEditAccounts.subfrmAccount.Form.MakeShippingLabelEditAccounts > > with ! and . in various places and nothing works. > > The function works fine when I use it in the subform. > > Help! > > MTIA > > Rocky Smolin > Beach Access Software > 858-259-4334 > www.bchacc.com > > > > > www.e-z-mrp.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 dhb at flsi.com Mon Jul 18 13:24:48 2011 From: dhb at flsi.com (Darrell Burns) Date: Mon, 18 Jul 2011 11:24:48 -0700 Subject: [AccessD] Access2010 vs Access2007 Message-ID: <00b201cc4577$fa709a10$ef51ce30$@flsi.com> Hi folks. I bought a new dev machine with Win7 and Office2010 32-bit. It installed the Access 14.0 Object Library. The "default file format" in Settings is Access 2007. My app runs on my client's Win2008 R2 Server and all the workstations run Win7. However, their Access references point to the Access 12.0 Object Library. As a result, when I upload my app to their server and open it up I get a warning message that "some of the features may be incompatible", even though I haven't used any of those features. Do I need to scale back to 12.0 on my side or upgrade the client to 14.0? And how would I do that? Thanx, Darrell From vbacreations at gmail.com Mon Jul 18 14:16:26 2011 From: vbacreations at gmail.com (William Benson) Date: Mon, 18 Jul 2011 15:16:26 -0400 Subject: [AccessD] Access2010 vs Access2007 In-Reply-To: <00b201cc4577$fa709a10$ef51ce30$@flsi.com> References: <00b201cc4577$fa709a10$ef51ce30$@flsi.com> Message-ID: I wouldn't worry about it. After all how ya gonna learn the differences if you don't let them bite you? Just kidding, hope you get a less smart-arse answer soon. On Jul 18, 2011 2:26 PM, "Darrell Burns" wrote: > Hi folks. > I bought a new dev machine with Win7 and Office2010 32-bit. It installed the > Access 14.0 Object Library. The "default file format" in Settings is Access > 2007. > My app runs on my client's Win2008 R2 Server and all the workstations run > Win7. However, their Access references point to the Access 12.0 Object > Library. As a result, when I upload my app to their server and open it up I > get a warning message that "some of the features may be incompatible", even > though I haven't used any of those features. > Do I need to scale back to 12.0 on my side or upgrade the client to 14.0? > And how would I do that? > Thanx, > Darrell > > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com From rockysmolin at bchacc.com Mon Jul 18 15:16:14 2011 From: rockysmolin at bchacc.com (Rocky Smolin) Date: Mon, 18 Jul 2011 13:16:14 -0700 Subject: [AccessD] Referring to a function in a subform In-Reply-To: <00b101cc4575$6805c300$38114900$@flsi.com> References: <49EBA6DA69794EF88740050C7D84F12A@HAL9007> <7D937294F929402698129D0C7BE01E58@HAL9007> <00b101cc4575$6805c300$38114900$@flsi.com> Message-ID: <5F0603DB08D74800B92076ADC69B82A1@HAL9007> That's the way it SHOULD work. But it didn't for me. So I moved it to a public function and it works now. Rocky -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Darrell Burns Sent: Monday, July 18, 2011 11:06 AM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Referring to a function in a subform Hey Rocky. Here's how I do it... In MasterForm: Set fSub = Me.Form(SubformName) fSub.Form.GoToID Nz(MoveToID, 0) In SubForm: Public Sub GoToID(Optional optMoveToID) HTH, DB -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Rocky Smolin Sent: Monday, July 18, 2011 9:16 AM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Referring to a function in a subform Tried public but no soap. Moving it to a module now. R -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Charlotte Foust Sent: Monday, July 18, 2011 9:13 AM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Referring to a function in a subform Bill has it right. If the scope of the routine isn't public, it is visible as a method only within the subform itself. Charlotte Foust On Mon, Jul 18, 2011 at 8:57 AM, Rocky Smolin wrote: > Dear List: > > Gets me every time. > > I want to call a private function in a subform on my main form. > Subform name is subfrmAccount, main form is frmEditAccounts, function > name is MakeShippingLabelEditAccounts. > > I've tried a lot of variations like: > > Me.fldShippingLabel = > Forms!frmEditAccounts.subfrmAccount.Form.MakeShippingLabelEditAccounts > > with ! and . in various places and nothing works. > > The function works fine when I use it in the subform. > > Help! > > MTIA > > Rocky Smolin > Beach Access Software > 858-259-4334 > www.bchacc.com > > > > > www.e-z-mrp.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 dhb at flsi.com Mon Jul 18 16:08:23 2011 From: dhb at flsi.com (Darrell Burns) Date: Mon, 18 Jul 2011 14:08:23 -0700 Subject: [AccessD] Access2010 vs Access2007 In-Reply-To: References: <00b201cc4577$fa709a10$ef51ce30$@flsi.com> Message-ID: <00c201cc458e$d5146d20$7f3d4760$@flsi.com> I have to worry about it...I don't want the users seeing warning messages or getting "bitten". -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of William Benson Sent: Monday, July 18, 2011 12:16 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Access2010 vs Access2007 I wouldn't worry about it. After all how ya gonna learn the differences if you don't let them bite you? Just kidding, hope you get a less smart-arse answer soon. On Jul 18, 2011 2:26 PM, "Darrell Burns" wrote: > Hi folks. > I bought a new dev machine with Win7 and Office2010 32-bit. It > installed the > Access 14.0 Object Library. The "default file format" in Settings is Access > 2007. > My app runs on my client's Win2008 R2 Server and all the workstations > run Win7. However, their Access references point to the Access 12.0 > Object Library. As a result, when I upload my app to their server and > open it up I > get a warning message that "some of the features may be incompatible", even > though I haven't used any of those features. > Do I need to scale back to 12.0 on my side or upgrade the client to 14.0? > And how would I do that? > Thanx, > Darrell > > > > -- > 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 ssharkins at gmail.com Mon Jul 18 19:13:16 2011 From: ssharkins at gmail.com (Susan Harkins) Date: Mon, 18 Jul 2011 20:13:16 -0400 Subject: [AccessD] update wouldn't run Message-ID: I ran into a really weird, and a bit humiliating situation this afternoon. I volunteer at our county fair and someone asked me to help them update some entry numbers in an Access table. It was a simple update query -- make all 20's 21. It was a text field. I created the query, ran it... it wouldn't run. It did nothing. The text field was part of a natural key primary key, but she was able to change the values manually. That query should've run and changed all those values in a second -- fortunately, there were only a few dozen, but I was still... deflated. :( Any ideas what might have been the problem? Susan H. From df.waters at comcast.net Mon Jul 18 20:08:28 2011 From: df.waters at comcast.net (Dan Waters) Date: Mon, 18 Jul 2011 20:08:28 -0500 Subject: [AccessD] update wouldn't run In-Reply-To: References: Message-ID: <004c01cc45b0$5fa68150$1ef383f0$@comcast.net> Hi Susan, Your query may have tried to update a text 20 to a numeric 21, which would have been the wrong type and should not have worked. Just a guess ... Dan PS - Don't ever tell anyone you're an expert. As soon as I said it - I wasn't! :-( -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Susan Harkins Sent: Monday, July 18, 2011 7:13 PM To: Access Developers discussion and problem solving Subject: [AccessD] update wouldn't run I ran into a really weird, and a bit humiliating situation this afternoon. I volunteer at our county fair and someone asked me to help them update some entry numbers in an Access table. It was a simple update query -- make all 20's 21. It was a text field. I created the query, ran it... it wouldn't run. It did nothing. The text field was part of a natural key primary key, but she was able to change the values manually. That query should've run and changed all those values in a second -- fortunately, there were only a few dozen, but I was still... deflated. :( Any ideas what might have been the problem? Susan H. -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From jwcolby at colbyconsulting.com Mon Jul 18 20:41:48 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Mon, 18 Jul 2011 21:41:48 -0400 Subject: [AccessD] Child computer Game timer In-Reply-To: References: <4E23286A.8030301@colbyconsulting.com> Message-ID: <4E24E0DC.9080209@colbyconsulting.com> Because I won't know what games your child is playing. John W. Colby www.ColbyConsulting.com On 7/18/2011 10:12 AM, Drew Wutka wrote: > Why not just detect the game he is playing based upon the window's that > are running? Each game should have a window that should be easy to > identify. > > Drew > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby > Sent: Sunday, July 17, 2011 1:23 PM > To: Access Developers discussion and problem solving > Subject: [AccessD] Child computer Game timer > > I have designed a game timer for my son which I am making available to > list members if they want it. > > This timer is designed for children who are old enough to play > "unsupervised" and I want them to > have a set time that they can play per session. I want to record when > they start and stop and have > a display of how long they have been playing. I used to have Robbie > "write it down" and set a timer > on the stove. Both of which he "forgot" more often than not. > > This is not a "dishonest teenager" control mechanism, I am not getting > into trying to outsmart a > teenager here. It is merely meant to allow me to see how much time my > son is playing. I removed > all of the shortcuts from the desktop etc so that the way he opens his > games is through this > database. I actually copied one of the shortcuts into the startup > directory for one game that > required a shortcut. > > I then informed him that there are consequences if he is playing without > going through the timer. > > The timer is an Access form which has a game combo and a child id combo. > In my case only my son > uses it at the moment, though I will probably have my daughter use it as > well. It is FE/BE. > > The form consists of: > > 1) A game combo > 2) A child combo > 3) A start time > 4) A stop time > 5) The minutes they are allowed to play, fixed ATM though it could be > included in the child record. > > Status controls are: > > 1) Last Play elapsed time > 2) Last play time stopped > > At the very bottom of the form is an elapsed time. > > So the child selects the game they will play. The game has the stuff > required to actually open the > game, usually the filespec for the game (path and file name) but it can > also use a shortcut file if > the game requires starting directory etc. > > Selecting the game starts a timer which shows up on the "Elapsed time" > at the bottom, and records > the start time. There is a button which enters the stopped time and > moves to a new record. Once a > record is "stopped" it can no longer be edited. No records can be > deleted (through the form). > > When the time is up, my son often does the "I need to do this one small > thing before I quit" > routine. In order to allow that but still encourage him to get off, i > built in an annoyance timer. > The database does not (yet) shut down the game automatically (though I > might go there) but it does > beep a series of beeps when time is up, and then starts beeping at him > every N seconds. N decreases > over time until it is beeping every second. This is truly annoying (to > anyone in the room) and > encourages him to finish up and get off. It also alerts any adult near > by that "time is up". In > fact it is so annoying that he was turning down the speaker when it > beeped. I had to inform him > that there would be consequences for that. ;) > > The system is working fine so far. I am finally getting his times > logged regularly and getting him > off when his time is up. We shall have to see how it works long term. > Adolescents can be sneaky. > Total loss of gaming privileges for breaking the rules is the > consequence of being sneaky. > > Possible enhancements: > > 1) Times of day allowed to play > 2) Total time allowed to play > 3) Play time allowed per child > etc. > From vbacreations at gmail.com Mon Jul 18 21:30:52 2011 From: vbacreations at gmail.com (William Benson (VBACreations.Com)) Date: Mon, 18 Jul 2011 22:30:52 -0400 Subject: [AccessD] Access2010 vs Access2007 In-Reply-To: <00c201cc458e$d5146d20$7f3d4760$@flsi.com> References: <00b201cc4577$fa709a10$ef51ce30$@flsi.com> <00c201cc458e$d5146d20$7f3d4760$@flsi.com> Message-ID: <004f01cc45bb$e2972960$a7c57c20$@gmail.com> There might not be so many folk who have bothered to move to Ac2007 formatted databases, let alone to Ac2010 platform. While others are still quiet on the topic, I will put forth my half-penny advice. I did it to have strange bugginess stop showing up when my database got too big and I didn't know it -- only to find that I still seemed to have a 2 GB limitation even after it became an accdb file. Goodness knows why, and it is quite frustrating. One thing I would recommend but it is because I am an Excel programmer and may not know the difference in how Access works versus Excel... is to call every function somehow, in debugging mode, at least once - just in case there are things which the compiler only checks at runtime, and only when the code in that particular routine executes. This can be a real chore. Things that lie on the other side of IF conditions which almost never happen are especially burdensome to check, and error handling for very off-chance exceptions. But if you are needing to be that sure about things, you have to force every condition so it gets tested at least once (and even then you will only have feedback on the conditions you thought to check). There are some controls which if you have used them in an Ac2007 database you might not find them there any more, like Calendar control. Data Access pages were minimally supported in 2007 (could not create but could still run) and in 2010 will not function. Anyway, I would just be parroting what I read here, were I to go on. http://technet.microsoft.com/en-us/library/cc179181.aspx -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Darrell Burns Sent: Monday, July 18, 2011 5:08 PM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Access2010 vs Access2007 I have to worry about it...I don't want the users seeing warning messages or getting "bitten". -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of William Benson Sent: Monday, July 18, 2011 12:16 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Access2010 vs Access2007 I wouldn't worry about it. After all how ya gonna learn the differences if you don't let them bite you? Just kidding, hope you get a less smart-arse answer soon. On Jul 18, 2011 2:26 PM, "Darrell Burns" wrote: > Hi folks. > I bought a new dev machine with Win7 and Office2010 32-bit. It > installed the > Access 14.0 Object Library. The "default file format" in Settings is Access > 2007. > My app runs on my client's Win2008 R2 Server and all the workstations > run Win7. However, their Access references point to the Access 12.0 > Object Library. As a result, when I upload my app to their server and > open it up I > get a warning message that "some of the features may be incompatible", even > though I haven't used any of those features. > Do I need to scale back to 12.0 on my side or upgrade the client to 14.0? > And how would I do that? > Thanx, > Darrell > > > > -- > 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 ssharkins at gmail.com Tue Jul 19 05:46:36 2011 From: ssharkins at gmail.com (Susan Harkins) Date: Tue, 19 Jul 2011 06:46:36 -0400 Subject: [AccessD] update wouldn't run References: <004c01cc45b0$5fa68150$1ef383f0$@comcast.net> Message-ID: No, they were both text -- I checked that and Access automatically knew that the field was text and took care of it for me. I never call myself an expert. :) Susan H. > > Your query may have tried to update a text 20 to a numeric 21, which would > have been the wrong type and should not have worked. > > Just a guess ... > > Dan > > PS - Don't ever tell anyone you're an expert. As soon as I said it - I > wasn't! :-( From charlotte.foust at gmail.com Tue Jul 19 10:00:29 2011 From: charlotte.foust at gmail.com (Charlotte Foust) Date: Tue, 19 Jul 2011 08:00:29 -0700 Subject: [AccessD] update wouldn't run In-Reply-To: References: <004c01cc45b0$5fa68150$1ef383f0$@comcast.net> Message-ID: I'll never forget the time a developer who worked for me decided to update all of a certain numeric string to a text number in an address field. The query ran and worked...sort of. He had forgotten to provide for spaces around numeric string. I had to go through thousands of records and find every instance of "two" in a longer number and replace it with "2"! Charlotte Foust On Tue, Jul 19, 2011 at 3:46 AM, Susan Harkins wrote: > No, they were both text -- I checked that and Access automatically knew > that the field was text and took care of it for me. I never call myself an > expert. :) > > Susan H. > >> >> Your query may have tried to update a text 20 to a numeric 21, which would >> have been the wrong type and should not have worked. >> >> Just a guess ... >> >> Dan >> >> PS - Don't ever tell anyone you're an expert. As soon as I said it - I >> wasn't! :-( >> > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/**mailman/listinfo/accessd > > > Website: http://www.databaseadvisors.**com > > > From dnod at aol.com Tue Jul 19 10:13:19 2011 From: dnod at aol.com (Dean Davids) Date: Tue, 19 Jul 2011 11:13:19 -0400 Subject: [AccessD] update wouldn't run In-Reply-To: References: <004c01cc45b0$5fa68150$1ef383f0$@comcast.net> Message-ID: If you do that kind of thing in a QBE window, you can preview the results before committing the results. I do that always. Still, it is a bit scary when you push that action button and then look for unexpected issues. Dean S. Davids www.cmbscorp.com 954-868-4421 On Jul 19, 2011, at 11:00 AM, Charlotte Foust wrote: > I'll never forget the time a developer who worked for me decided to update > all of a certain numeric string to a text number in an address field. The > query ran and worked...sort of. He had forgotten to provide for spaces > around numeric string. I had to go through thousands of records and find > every instance of "two" in a longer number and replace it with "2"! > > Charlotte Foust > > On Tue, Jul 19, 2011 at 3:46 AM, Susan Harkins wrote: > >> No, they were both text -- I checked that and Access automatically knew >> that the field was text and took care of it for me. I never call myself an >> expert. :) >> >> Susan H. >> >>> >>> Your query may have tried to update a text 20 to a numeric 21, which would >>> have been the wrong type and should not have worked. >>> >>> Just a guess ... >>> >>> Dan >>> >>> PS - Don't ever tell anyone you're an expert. As soon as I said it - I >>> wasn't! :-( >>> >> >> -- >> 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 ssharkins at gmail.com Tue Jul 19 10:21:31 2011 From: ssharkins at gmail.com (Susan Harkins) Date: Tue, 19 Jul 2011 11:21:31 -0400 Subject: [AccessD] update wouldn't run References: <004c01cc45b0$5fa68150$1ef383f0$@comcast.net> Message-ID: <1B38E9446F80476EB23735A7899241DF@SusanHarkins> When I used Datasheet view to see the uncommitted results, I saw only the original values. Susan H. > If you do that kind of thing in a QBE window, you can preview the results > before committing the results. I do that always. Still, it is a bit scary > when you push that action button and then look for unexpected issues. > > > >> I'll never forget the time a developer who worked for me decided to >> update >> all of a certain numeric string to a text number in an address field. >> The >> query ran and worked...sort of. He had forgotten to provide for spaces >> around numeric string. I had to go through thousands of records and find >> every instance of "two" in a longer number and replace it with "2"! >> >> Charlotte Foust >> >> On Tue, Jul 19, 2011 at 3:46 AM, Susan Harkins >> wrote: >> >>> No, they were both text -- I checked that and Access automatically knew >>> that the field was text and took care of it for me. I never call myself >>> an >>> expert. :) >>> >>> Susan H. >>> >>>> >>>> Your query may have tried to update a text 20 to a numeric 21, which >>>> would >>>> have been the wrong type and should not have worked. >>>> >>>> Just a guess ... From garykjos at gmail.com Tue Jul 19 10:52:52 2011 From: garykjos at gmail.com (Gary Kjos) Date: Tue, 19 Jul 2011 10:52:52 -0500 Subject: [AccessD] update wouldn't run In-Reply-To: <1B38E9446F80476EB23735A7899241DF@SusanHarkins> References: <004c01cc45b0$5fa68150$1ef383f0$@comcast.net> <1B38E9446F80476EB23735A7899241DF@SusanHarkins> Message-ID: I wonder if you dropped the key and then ran it if it would work. then you could reset the key after. Multi-field keys might have different rules. Doing one record at a time in a table view might have different rules than a mass change in a query. Hope you made a copy of the db or at least the table before you touched anything though. Always want to have a way to return to the before state, especially when you are working with other peoples databases. Stuff happens. ;-) GK On Tue, Jul 19, 2011 at 10:21 AM, Susan Harkins wrote: > When I used Datasheet view to see the uncommitted results, I saw only the > original values. > > Susan H. > > >> If you do that kind of thing in a QBE window, you can preview the results >> before committing the results. I do that always. Still, it is a bit scary >> when you push that action button and then look for unexpected issues. >> >> >> >>> I'll never forget the time a developer who worked for me decided to >>> update >>> all of a certain numeric string to a text number in an address field. The >>> query ran and worked...sort of. ?He had forgotten to provide for spaces >>> around numeric string. I had to go through thousands of records and find >>> every instance of "two" in a longer number and replace it with "2"! >>> >>> Charlotte Foust >>> >>> On Tue, Jul 19, 2011 at 3:46 AM, Susan Harkins >>> wrote: >>> >>>> No, they were both text -- I checked that and Access automatically knew >>>> that the field was text and took care of it for me. I never call myself >>>> an >>>> expert. :) >>>> >>>> Susan H. >>>> >>>>> >>>>> Your query may have tried to update a text 20 to a numeric 21, which >>>>> would >>>>> have been the wrong type and should not have worked. >>>>> >>>>> Just a guess ... > > -- > 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 ssharkins at gmail.com Tue Jul 19 11:07:51 2011 From: ssharkins at gmail.com (Susan Harkins) Date: Tue, 19 Jul 2011 12:07:51 -0400 Subject: [AccessD] update wouldn't run References: <004c01cc45b0$5fa68150$1ef383f0$@comcast.net><1B38E9446F80476EB23735A7899241DF@SusanHarkins> Message-ID: Well... I thought about doing that, but couldn't think of a reason why it should've mattered, but you know, you might be right -- I might experiment later. Susan H. I wonder if you dropped the key and then ran it if it would work. then you could reset the key after. Multi-field keys might have different rules. Doing one record at a time in a table view might have different rules than a mass change in a query. Hope you made a copy of the db or at least the table before you touched anything though. Always want to have a way to return to the before state, especially when you are working with other peoples databases. Stuff happens. ;-) From gustav at cactus.dk Tue Jul 19 16:07:39 2011 From: gustav at cactus.dk (Gustav Brock) Date: Tue, 19 Jul 2011 23:07:39 +0200 Subject: [AccessD] DatePart "WW" (C#: Extension of DateTime) Message-ID: Hi all Now, would you believe this _old_ bug has survived A2010 and .Net 4 / Visual Studio 2010! So - as someone brought up a long-winded solution - I had to post my version of the extension method for DateTime of C# at CodeProject: http://www.codeproject.com/Tips/227801/DateTime-extension-method-to-give-Week-number /gustav >>> Gustav at cactus.dk 24-05-2007 16:44 >>> Hi Mark If you are looking for ISO week numbers, use these constants: bytWeek = DatePart("ww", datDate, vbMonday, vbFirstFourDays) However, DatePart has always - since Access 1.0 - been buggy for week number 53. Thus, for serious business use, use a function like this which I have posted many times: Public Function ISO_WeekNumber( _ ByVal datDate As Date) _ As Byte ' Calculates and returns week number for date datDate according to the ISO 8601:1988 standard. ' 1998-2000, Gustav Brock, Cactus Data ApS, CPH. ' May be freely used and distributed. Const cbytFirstWeekOfAnyYear As Byte = 1 Const cbytLastWeekOfLeapYear As Byte = 53 Dim bytWeek As Byte Dim bytISOThursday As Byte Dim datLastDayOfYear As Date bytWeek = DatePart("ww", datDate, vbMonday, vbFirstFourDays) If bytWeek = cbytLastWeekOfLeapYear Then bytISOThursday = WeekDay(vbThursday, vbMonday) datLastDayOfYear = DateSerial(Year(datDate), 12, 31) If WeekDay(datLastDayOfYear, vbMonday) >= bytISOThursday Then ' OK, week count of 53 is caused by leap year. Else ' Correct for Access97/2000 bug. bytWeek = cbytFirstWeekOfAnyYear End If End If ISO_WeekNumber = bytWeek End Function /gustav >>> markamatte at hotmail.com 24-05-2007 16:14 >>> Hello All, I'm using datepart to get the week. 12/31/2006 I am having an issue...No matter what optional constant I use or change...I get Day1 of week 53... and 1/1/2007 shows as Day2 of week 1. How do I get Day1 of Week1? Thanks, Mark A. Matte From vbacreations at gmail.com Tue Jul 19 19:11:51 2011 From: vbacreations at gmail.com (William Benson) Date: Tue, 19 Jul 2011 20:11:51 -0400 Subject: [AccessD] update wouldn't run In-Reply-To: References: <004c01cc45b0$5fa68150$1ef383f0$@comcast.net> <1B38E9446F80476EB23735A7899241DF@SusanHarkins> Message-ID: The first thing I would try would be to update to some strange 2-car string to rule out the key and numeric aspects. If that world you would have a partial info. On Jul 19, 2011 12:09 PM, "Susan Harkins" wrote: > Well... I thought about doing that, but couldn't think of a reason why it > should've mattered, but you know, you might be right -- I might experiment > later. > > Susan H. > > > I wonder if you dropped the key and then ran it if it would work. then > you could reset the key after. Multi-field keys might have different > rules. Doing one record at a time in a table view might have different > rules than a mass change in a query. > > Hope you made a copy of the db or at least the table before you > touched anything though. Always want to have a way to return to the > before state, especially when you are working with other peoples > databases. > > Stuff happens. ;-) > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com From fuller.artful at gmail.com Tue Jul 19 21:09:00 2011 From: fuller.artful at gmail.com (Arthur Fuller) Date: Tue, 19 Jul 2011 22:09:00 -0400 Subject: [AccessD] update wouldn't run In-Reply-To: References: <004c01cc45b0$5fa68150$1ef383f0$@comcast.net> <1B38E9446F80476EB23735A7899241DF@SusanHarkins> Message-ID: Do n this in two parts. According to my personal nomenclature, the queries would be _ On Tue, Jul 19, 2011 at 12:07 PM, Susan Harkins wrote: > Well... I thought about doing that, but couldn't think of a reason why it > should've mattered, but you know, you might be right -- I might experiment > later. > > Susan H. > > > > I wonder if you dropped the key and then ran it if it would work. then > you could reset the key after. Multi-field keys might have different > rules. Doing one record at a time in a table view might have different > rules than a mass change in a query. > > Hope you made a copy of the db or at least the table before you > touched anything though. Always want to have a way to return to the > before state, especially when you are working with other peoples > databases. > > Stuff happens. ;-) > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/**mailman/listinfo/accessd > Website: http://www.databaseadvisors.**com > From dhb at flsi.com Wed Jul 20 16:04:02 2011 From: dhb at flsi.com (Darrell Burns) Date: Wed, 20 Jul 2011 14:04:02 -0700 Subject: [AccessD] Access 2010 -- The database cannot be opened because the VBA project contained in it cannot be read. Message-ID: <024501cc4720$8d8aef40$a8a0cdc0$@flsi.com> I just lost all of my code! I'm running 32-bit Access 2010 in 64-bit Windows7 (Access 14.0 Object library and Office Access database engine 14.0)..the 32-bit version of Office2010. My application was developed in Access2007. My default file format says Access 2007 (there is no A2010 option). I was trying to import a form from one database into another when I got a "Microsoft Access has stopped working" message, then both databases were hosed. I tried opening a blank database and importing a form but I get "Name conflicts with existing module...." and it won't import. Of course, I have a live demo in 3 hours! Help! Is there any way of salvaging the code I had written behind my forms? How do I prevent this from happening again? From vbacreations at gmail.com Wed Jul 20 16:26:55 2011 From: vbacreations at gmail.com (William Benson (VBACreations.Com)) Date: Wed, 20 Jul 2011 17:26:55 -0400 Subject: [AccessD] Access 2010 -- The database cannot be opened because the VBA project contained in it cannot be read. In-Reply-To: <024501cc4720$8d8aef40$a8a0cdc0$@flsi.com> References: <024501cc4720$8d8aef40$a8a0cdc0$@flsi.com> Message-ID: <004301cc4723$c0c316a0$424943e0$@gmail.com> I don't think so. If you cannot import them into a blank (or any) database and you cannot open the one in which they were originally contained. If you could do either of those things, you could then export the form as text and read the text file. I have posted others' code for how to do all of this in the recent past ... but again, if you cannot get access to a database containing the objects, then I don't think you have any shot. :-( Been there. From rockysmolin at bchacc.com Wed Jul 20 16:48:27 2011 From: rockysmolin at bchacc.com (Rocky Smolin) Date: Wed, 20 Jul 2011 14:48:27 -0700 Subject: [AccessD] Access 2010 -- The database cannot be opened because theVBA project contained in it cannot be read. In-Reply-To: <024501cc4720$8d8aef40$a8a0cdc0$@flsi.com> References: <024501cc4720$8d8aef40$a8a0cdc0$@flsi.com> Message-ID: No backup? Tsk-tsk. I've had the problem before and you might try decompile, but IME, it usually doesn't recover the code. Rocky -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Darrell Burns Sent: Wednesday, July 20, 2011 2:04 PM To: 'Access Developers discussion and problem solving' Subject: [AccessD] Access 2010 -- The database cannot be opened because theVBA project contained in it cannot be read. I just lost all of my code! I'm running 32-bit Access 2010 in 64-bit Windows7 (Access 14.0 Object library and Office Access database engine 14.0)..the 32-bit version of Office2010. My application was developed in Access2007. My default file format says Access 2007 (there is no A2010 option). I was trying to import a form from one database into another when I got a "Microsoft Access has stopped working" message, then both databases were hosed. I tried opening a blank database and importing a form but I get "Name conflicts with existing module...." and it won't import. Of course, I have a live demo in 3 hours! Help! Is there any way of salvaging the code I had written behind my forms? How do I prevent this from happening again? -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From dhb at flsi.com Wed Jul 20 17:45:22 2011 From: dhb at flsi.com (Darrell Burns) Date: Wed, 20 Jul 2011 15:45:22 -0700 Subject: [AccessD] Access 2010 -- The database cannot be opened because theVBA project contained in it cannot be read. In-Reply-To: References: <024501cc4720$8d8aef40$a8a0cdc0$@flsi.com> Message-ID: <026001cc472e$b5ddc720$21995560$@flsi.com> Yes, backed up yesterday. Lost today's work. -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Rocky Smolin Sent: Wednesday, July 20, 2011 2:48 PM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Access 2010 -- The database cannot be opened because theVBA project contained in it cannot be read. No backup? Tsk-tsk. I've had the problem before and you might try decompile, but IME, it usually doesn't recover the code. Rocky -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Darrell Burns Sent: Wednesday, July 20, 2011 2:04 PM To: 'Access Developers discussion and problem solving' Subject: [AccessD] Access 2010 -- The database cannot be opened because theVBA project contained in it cannot be read. I just lost all of my code! I'm running 32-bit Access 2010 in 64-bit Windows7 (Access 14.0 Object library and Office Access database engine 14.0)..the 32-bit version of Office2010. My application was developed in Access2007. My default file format says Access 2007 (there is no A2010 option). I was trying to import a form from one database into another when I got a "Microsoft Access has stopped working" message, then both databases were hosed. I tried opening a blank database and importing a form but I get "Name conflicts with existing module...." and it won't import. Of course, I have a live demo in 3 hours! Help! Is there any way of salvaging the code I had written behind my forms? How do I prevent this from happening again? -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From fuller.artful at gmail.com Wed Jul 20 19:45:12 2011 From: fuller.artful at gmail.com (Arthur Fuller) Date: Wed, 20 Jul 2011 20:45:12 -0400 Subject: [AccessD] Access 2010 -- The database cannot be opened because theVBA project contained in it cannot be read. In-Reply-To: <026001cc472e$b5ddc720$21995560$@flsi.com> References: <024501cc4720$8d8aef40$a8a0cdc0$@flsi.com> <026001cc472e$b5ddc720$21995560$@flsi.com> Message-ID: So you only lost one day's work. Take this as a sign from the gods in Redmond. Back up several times a day. It's not difficult. Click the Orb and then Manage and then Backup. It takes about 3 seconds and your ass is saved. I do it several times per session and don't have to recover more than an hour or so's work. A. On Wed, Jul 20, 2011 at 6:45 PM, Darrell Burns wrote: > Yes, backed up yesterday. Lost today's work. > > From vbacreations at gmail.com Wed Jul 20 21:44:00 2011 From: vbacreations at gmail.com (William Benson (VBACreations.Com)) Date: Wed, 20 Jul 2011 22:44:00 -0400 Subject: [AccessD] Access 2010 -- The database cannot be opened because theVBA project contained in it cannot be read. In-Reply-To: References: <024501cc4720$8d8aef40$a8a0cdc0$@flsi.com> <026001cc472e$b5ddc720$21995560$@flsi.com> Message-ID: <004801cc4750$0c961560$25c24020$@gmail.com> What is the orb? This link seems to have some code for backing up and zipping a database. http://developpers.blogspot.com/2008/03/how-to-backup-access-file-using-vba. html as well as a link to software that might repair a database. -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Arthur Fuller Sent: Wednesday, July 20, 2011 8:45 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Access 2010 -- The database cannot be opened because theVBA project contained in it cannot be read. So you only lost one day's work. Take this as a sign from the gods in Redmond. Back up several times a day. It's not difficult. Click the Orb and then Manage and then Backup. It takes about 3 seconds and your ass is saved. I do it several times per session and don't have to recover more than an hour or so's work. A. On Wed, Jul 20, 2011 at 6:45 PM, Darrell Burns wrote: > Yes, backed up yesterday. Lost today's work. > > -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From stuart at lexacorp.com.pg Wed Jul 20 22:53:17 2011 From: stuart at lexacorp.com.pg (Stuart McLachlan) Date: Thu, 21 Jul 2011 13:53:17 +1000 Subject: [AccessD] Access 2010 -- The database cannot be opened because theVBA project contained in it cannot be read. In-Reply-To: <004801cc4750$0c961560$25c24020$@gmail.com> References: <024501cc4720$8d8aef40$a8a0cdc0$@flsi.com>, , <004801cc4750$0c961560$25c24020$@gmail.com> Message-ID: <4E27A2AD.17124.201F10AB@stuart.lexacorp.com.pg> Access 2007 and 2010. The big "Office Button" ball on the left hand side of the menu bar. On 20 Jul 2011 at 22:44, William Benson (VBACreations. wrote: > What is the orb? > > This link seems to have some code for backing up and zipping a > database. > > http://developpers.blogspot.com/2008/03/how-to-backup-access-file-usin > g-vba. html > > as well as a link to software that might repair a database. > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Arthur > Fuller Sent: Wednesday, July 20, 2011 8:45 PM To: Access Developers > discussion and problem solving Subject: Re: [AccessD] Access 2010 -- > The database cannot be opened because theVBA project contained in it > cannot be read. > > So you only lost one day's work. Take this as a sign from the gods in > Redmond. Back up several times a day. It's not difficult. Click the > Orb and then Manage and then Backup. It takes about 3 seconds and your > ass is saved. I do it several times per session and don't have to > recover more than an hour or so's work. > > A. > > On Wed, Jul 20, 2011 at 6:45 PM, Darrell Burns wrote: > > > Yes, backed up yesterday. Lost today's work. > > > > > -- > 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 vbacreations at gmail.com Wed Jul 20 23:43:29 2011 From: vbacreations at gmail.com (William Benson (VBACreations.Com)) Date: Thu, 21 Jul 2011 00:43:29 -0400 Subject: [AccessD] Access 2010 -- The database cannot be opened because theVBA project contained in it cannot be read. In-Reply-To: <4E27A2AD.17124.201F10AB@stuart.lexacorp.com.pg> References: <024501cc4720$8d8aef40$a8a0cdc0$@flsi.com>, , <004801cc4750$0c961560$25c24020$@gmail.com> <4E27A2AD.17124.201F10AB@stuart.lexacorp.com.pg> Message-ID: <005001cc4760$bd07cfa0$37176ee0$@gmail.com> 2010 (which I am using) does not seem to have this... And I cannot see a Manage function. -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Stuart McLachlan Sent: Wednesday, July 20, 2011 11:53 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Access 2010 -- The database cannot be opened because theVBA project contained in it cannot be read. Access 2007 and 2010. The big "Office Button" ball on the left hand side of the menu bar. On 20 Jul 2011 at 22:44, William Benson (VBACreations. wrote: > What is the orb? > > This link seems to have some code for backing up and zipping a > database. > > http://developpers.blogspot.com/2008/03/how-to-backup-access-file-usin > g-vba. html > > as well as a link to software that might repair a database. > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Arthur > Fuller Sent: Wednesday, July 20, 2011 8:45 PM To: Access Developers > discussion and problem solving Subject: Re: [AccessD] Access 2010 -- > The database cannot be opened because theVBA project contained in it > cannot be read. > > So you only lost one day's work. Take this as a sign from the gods in > Redmond. Back up several times a day. It's not difficult. Click the > Orb and then Manage and then Backup. It takes about 3 seconds and your > ass is saved. I do it several times per session and don't have to > recover more than an hour or so's work. > > A. > > On Wed, Jul 20, 2011 at 6:45 PM, Darrell Burns wrote: > > > Yes, backed up yesterday. Lost today's work. > > > > > -- > 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 Wed Jul 20 23:53:21 2011 From: stuart at lexacorp.com.pg (Stuart McLachlan) Date: Thu, 21 Jul 2011 14:53:21 +1000 Subject: [AccessD] Access 2010 -- The database cannot be opened because theVBA project contained in it cannot be read. In-Reply-To: <005001cc4760$bd07cfa0$37176ee0$@gmail.com> References: <024501cc4720$8d8aef40$a8a0cdc0$@flsi.com>, <4E27A2AD.17124.201F10AB@stuart.lexacorp.com.pg>, <005001cc4760$bd07cfa0$37176ee0$@gmail.com> Message-ID: <4E27B0C1.26772.20560F93@stuart.lexacorp.com.pg> You're right, that is only in 2007. I do wish they couldn't keep changing the interface every few years. :( No idea where it is (if it exists at all ) in 2010. I can't find it. -- Stuart On 21 Jul 2011 at 0:43, William Benson (VBACreations. wrote: > 2010 (which I am using) does not seem to have this... And I cannot see > a Manage function. > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Stuart > McLachlan Sent: Wednesday, July 20, 2011 11:53 PM To: Access > Developers discussion and problem solving Subject: Re: [AccessD] > Access 2010 -- The database cannot be opened because theVBA project > contained in it cannot be read. > > Access 2007 and 2010. The big "Office Button" ball on the left hand > side of the menu bar. > > On 20 Jul 2011 at 22:44, William Benson (VBACreations. wrote: > > > What is the orb? > > > > This link seems to have some code for backing up and zipping a > > database. > > > > http://developpers.blogspot.com/2008/03/how-to-backup-access-file-us > > in g-vba. html > > > > as well as a link to software that might repair a database. > > > > -----Original Message----- > > From: accessd-bounces at databaseadvisors.com > > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Arthur > > Fuller Sent: Wednesday, July 20, 2011 8:45 PM To: Access Developers > > discussion and problem solving Subject: Re: [AccessD] Access 2010 -- > > The database cannot be opened because theVBA project contained in it > > cannot be read. > > > > So you only lost one day's work. Take this as a sign from the gods > > in Redmond. Back up several times a day. It's not difficult. Click > > the Orb and then Manage and then Backup. It takes about 3 seconds > > and your ass is saved. I do it several times per session and don't > > have to recover more than an hour or so's work. > > > > A. > > > > On Wed, Jul 20, 2011 at 6:45 PM, Darrell Burns wrote: > > > > > Yes, backed up yesterday. Lost today's work. > > > > > > > > -- > > 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 charlotte.foust at gmail.com Wed Jul 20 23:57:12 2011 From: charlotte.foust at gmail.com (Charlotte Foust) Date: Wed, 20 Jul 2011 21:57:12 -0700 Subject: [AccessD] Access 2010 -- The database cannot be opened because theVBA project contained in it cannot be read. In-Reply-To: <005001cc4760$bd07cfa0$37176ee0$@gmail.com> References: <024501cc4720$8d8aef40$a8a0cdc0$@flsi.com> <004801cc4750$0c961560$25c24020$@gmail.com> <4E27A2AD.17124.201F10AB@stuart.lexacorp.com.pg> <005001cc4760$bd07cfa0$37176ee0$@gmail.com> Message-ID: They did away with the ugly office button in 2010, The file menu in 2010 gives you a Save Database As option. There's also a Save & Publish selection on the file menu that offers a backup database option. Charlotte Foust On Wed, Jul 20, 2011 at 9:43 PM, William Benson (VBACreations.Com) < vbacreations at gmail.com> wrote: > 2010 (which I am using) does not seem to have this... And I cannot see a > Manage function. > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Stuart > McLachlan > Sent: Wednesday, July 20, 2011 11:53 PM > To: Access Developers discussion and problem solving > Subject: Re: [AccessD] Access 2010 -- The database cannot be opened because > theVBA project contained in it cannot be read. > > Access 2007 and 2010. The big "Office Button" ball on the left hand side > of the menu bar. > From davidmcafee at gmail.com Thu Jul 21 14:17:53 2011 From: davidmcafee at gmail.com (David McAfee) Date: Thu, 21 Jul 2011 12:17:53 -0700 Subject: [AccessD] Access 2010 SP1 issue Message-ID: I have an ADP with a form that gets bound at run-time. This has worked flawlessly for several years until this morning. The user is complaining that the form opens up with all of the fields displaying #NAME? I haven't touched this form, or even the ADP in the longest time so I new it wasn't anything I've done. :) It works as it is supposed to on my computer and all the other employees in his department. We had him go to another user's computer and log in as himself. It worked. So I figured it was tied to his machine. I then realized his is on Win7, using Acess2010SP1. I found out SP1 was just released internally this week. A-HA! I ended up getting it working by doing this quick fix as shown below: I added the "If (SysCmd(acSysCmdAccessVer) = 14) Then" statement. Private Sub Form_Open(Cancel As Integer) On Error GoTo Form_Open_Error Me.RecordSource = "" If Nz(Me.OpenArgs, "") <> "" Then ' Is Not Null Then If IsNumeric(Me.OpenArgs) Then Me.InputParameters = "@IncStatJunctID = " & CInt(Me.OpenArgs) If (SysCmd(acSysCmdAccessVer) = 14) Then Me.RecordSource = "EXEC dbo.stpItemDetHist " & Me.InputParameters Else Me.RecordSourceQualifier = "dbo" Me.RecordSource = "stpItemDetHist" End If 'Do a bunch of stuff here Else Cancel = True End If Else Cancel = True End If This works, but technically isn't correct. I need to check for A2010 SP1, not just A2010 (Ver14) Does anyone know how I can check for SP1? Exit Sub From dc8 at btinternet.com Thu Jul 21 16:20:15 2011 From: dc8 at btinternet.com (Chris Swann) Date: Thu, 21 Jul 2011 22:20:15 +0100 Subject: [AccessD] Transpose from columns to rows Message-ID: <4E28980F.1060401@btinternet.com> Hi all, Once again my skills need a little help. I have a table which contains data in rows. I need to be able to take the values for each record and, where there is more than one value per record, put it into separate columns. Here is what the data looks like (there are other fields but these are the ones I need to move) ID CODE 1 A1 1 B1 1 C1 2 3 A1 4 Z1 4 etc etc what I need is this ID CODE1 CODE2 CODE3 1 A1 B1 C1 2 3 A1 4 Z1 If anyone can point me in the right direction I would be really grateful. Chris Swann From rockysmolin at bchacc.com Thu Jul 21 16:41:44 2011 From: rockysmolin at bchacc.com (Rocky Smolin) Date: Thu, 21 Jul 2011 14:41:44 -0700 Subject: [AccessD] Format During Edit Message-ID: <380200D6F70246DC9332CF6BD6DF470B@HAL9007> Dear List: I have a text box formatted to Currency - 2 decimal places. The text box is editable and since some decimal numbers do not have an exact equivalent in binary, when I click into the box to edit it, I get a long string of decimal numbers. For example, if the box has $3.25, when I click into it to edit it it displays 3.24999992735684. The user would like it not to do this for obvious reasons but I can't seem to force the behavior I want which would be to display 3.25 for editing. Tried the input mask but no cigar. What trick am I missing? MTIA Rocky Smolin Beach Access Software 858-259-4334 www.bchacc.com www.e-z-mrp.com From stuart at lexacorp.com.pg Thu Jul 21 16:47:44 2011 From: stuart at lexacorp.com.pg (Stuart McLachlan) Date: Fri, 22 Jul 2011 07:47:44 +1000 Subject: [AccessD] Format During Edit In-Reply-To: <380200D6F70246DC9332CF6BD6DF470B@HAL9007> References: <380200D6F70246DC9332CF6BD6DF470B@HAL9007> Message-ID: <4E289E80.8450.23F6C31C@stuart.lexacorp.com.pg> Can you change the type of the underlying field to Currency rather than Double? -- Stuart On 21 Jul 2011 at 14:41, Rocky Smolin wrote: > Dear List: > > I have a text box formatted to Currency - 2 decimal places. The text > box is editable and since some decimal numbers do not have an exact > equivalent in binary, when I click into the box to edit it, I get a > long string of decimal numbers. > > For example, if the box has $3.25, when I click into it to edit it it > displays 3.24999992735684. > > The user would like it not to do this for obvious reasons but I can't > seem to force the behavior I want which would be to display 3.25 for > editing. Tried the input mask but no cigar. > > What trick am I missing? > > MTIA > > Rocky Smolin > Beach Access Software > 858-259-4334 > www.bchacc.com > www.e-z-mrp.com > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > From rockysmolin at bchacc.com Thu Jul 21 17:09:23 2011 From: rockysmolin at bchacc.com (Rocky Smolin) Date: Thu, 21 Jul 2011 15:09:23 -0700 Subject: [AccessD] Format During Edit In-Reply-To: <4E289E80.8450.23F6C31C@stuart.lexacorp.com.pg> References: <380200D6F70246DC9332CF6BD6DF470B@HAL9007> <4E289E80.8450.23F6C31C@stuart.lexacorp.com.pg> Message-ID: <88CFAB5D8A8C4D36B3936D4BAFF59E56@HAL9007> That worked. Thanks, Stuart. Rocky -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Stuart McLachlan Sent: Thursday, July 21, 2011 2:48 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Format During Edit Can you change the type of the underlying field to Currency rather than Double? -- Stuart On 21 Jul 2011 at 14:41, Rocky Smolin wrote: > Dear List: > > I have a text box formatted to Currency - 2 decimal places. The text > box is editable and since some decimal numbers do not have an exact > equivalent in binary, when I click into the box to edit it, I get a > long string of decimal numbers. > > For example, if the box has $3.25, when I click into it to edit it it > displays 3.24999992735684. > > The user would like it not to do this for obvious reasons but I can't > seem to force the behavior I want which would be to display 3.25 for > editing. Tried the input mask but no cigar. > > What trick am I missing? > > MTIA > > Rocky Smolin > Beach Access Software > 858-259-4334 > www.bchacc.com www.e-z-mrp.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 Thu Jul 21 17:20:04 2011 From: accessd at shaw.ca (Jim Lawrence) Date: Thu, 21 Jul 2011 15:20:04 -0700 Subject: [AccessD] Format During Edit In-Reply-To: <4E289E80.8450.23F6C31C@stuart.lexacorp.com.pg> References: <380200D6F70246DC9332CF6BD6DF470B@HAL9007> <4E289E80.8450.23F6C31C@stuart.lexacorp.com.pg> Message-ID: <91295BD047274B88A7DC842F5C16F12F@creativesystemdesigns.com> ...Or you could put the display format to ######.##. Jim -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Stuart McLachlan Sent: Thursday, July 21, 2011 2:48 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Format During Edit Can you change the type of the underlying field to Currency rather than Double? -- Stuart On 21 Jul 2011 at 14:41, Rocky Smolin wrote: > Dear List: > > I have a text box formatted to Currency - 2 decimal places. The text > box is editable and since some decimal numbers do not have an exact > equivalent in binary, when I click into the box to edit it, I get a > long string of decimal numbers. > > For example, if the box has $3.25, when I click into it to edit it it > displays 3.24999992735684. > > The user would like it not to do this for obvious reasons but I can't > seem to force the behavior I want which would be to display 3.25 for > editing. Tried the input mask but no cigar. > > What trick am I missing? > > MTIA > > Rocky Smolin > Beach Access Software > 858-259-4334 > www.bchacc.com > www.e-z-mrp.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 Thu Jul 21 17:37:21 2011 From: stuart at lexacorp.com.pg (Stuart McLachlan) Date: Fri, 22 Jul 2011 08:37:21 +1000 Subject: [AccessD] Format During Edit In-Reply-To: <91295BD047274B88A7DC842F5C16F12F@creativesystemdesigns.com> References: <380200D6F70246DC9332CF6BD6DF470B@HAL9007>, <4E289E80.8450.23F6C31C@stuart.lexacorp.com.pg>, <91295BD047274B88A7DC842F5C16F12F@creativesystemdesigns.com> Message-ID: <4E28AA21.2454.24242E00@stuart.lexacorp.com.pg> That doesn't help when you are actually in the textbox. The full value is shown, regardless of the display fromat. On 21 Jul 2011 at 15:20, Jim Lawrence wrote: > ...Or you could put the display format to ######.##. > > Jim > > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Stuart > McLachlan Sent: Thursday, July 21, 2011 2:48 PM To: Access Developers > discussion and problem solving Subject: Re: [AccessD] Format During > Edit > > Can you change the type of the underlying field to Currency rather > than Double? > > -- > Stuart > > On 21 Jul 2011 at 14:41, Rocky Smolin wrote: > > > Dear List: > > > > I have a text box formatted to Currency - 2 decimal places. The > > text box is editable and since some decimal numbers do not have an > > exact equivalent in binary, when I click into the box to edit it, I > > get a long string of decimal numbers. > > > > For example, if the box has $3.25, when I click into it to edit it > > it displays 3.24999992735684. > > > > The user would like it not to do this for obvious reasons but I > > can't seem to force the behavior I want which would be to display > > 3.25 for editing. Tried the input mask but no cigar. > > > > What trick am I missing? > > > > MTIA > > > > Rocky Smolin > > Beach Access Software > > 858-259-4334 > > www.bchacc.com > > www.e-z-mrp.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 adtp at airtelmail.in Fri Jul 22 06:46:23 2011 From: adtp at airtelmail.in (A.D. Tejpal) Date: Fri, 22 Jul 2011 17:16:23 +0530 Subject: [AccessD] Transpose from columns to rows References: <4E28980F.1060401@btinternet.com> Message-ID: <6C18FCC4C4B74F73B88454EAE286B3E1@personal4a8ede> Chris, Sample query Q_Codes as given below, should get you the desired output. Q_Codes (Crosstab Query) ============================= TRANSFORM First(T_Codes.Code) AS FirstOfCode SELECT T_Codes.ID FROM T_Codes GROUP BY T_Codes.ID PIVOT "Code" & Format(DCount("*","T_Codes","ID = " & [ID] & " AND Code <= '" & [Code] & "'"),"00"); ============================= Note: Table T_Codes has fields ID (number type) and Code (text type). Best wishes, A.D. Tejpal ------------ ----- Original Message ----- From: Chris Swann To: Access Developers discussion and problem solving Sent: Friday, July 22, 2011 02:50 Subject: [AccessD] Transpose from columns to rows Hi all, Once again my skills need a little help. I have a table which contains data in rows. I need to be able to take the values for each record and, where there is more than one value per record, put it into separate columns. Here is what the data looks like (there are other fields but these are the ones I need to move) ID CODE 1 A1 1 B1 1 C1 2 3 A1 4 Z1 4 etc etc what I need is this ID CODE1 CODE2 CODE3 1 A1 B1 C1 2 3 A1 4 Z1 If anyone can point me in the right direction I would be really grateful. Chris Swann From jimdettman at verizon.net Fri Jul 22 07:50:50 2011 From: jimdettman at verizon.net (Jim Dettman) Date: Fri, 22 Jul 2011 08:50:50 -0400 Subject: [AccessD] Access 2010 SP1 issue In-Reply-To: References: Message-ID: <9194940DCB064CFFAB1C278BC0F711FB@XPS> David, Use the GetAccessVersion() code here: http://allenbrowne.com/ser-53code.html To determine the build number of the MSACCESS.EXE. These will be different for the 2010 vs 2010 SP1. The standard 2010 build is 14.0.4750.1000. I don't know what the SP1 version is because I have not installed it yet. Note that both MSKB fixes and SP's will increase the build number so your best bet is not to check for a specific level. Jim. -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of David McAfee Sent: Thursday, July 21, 2011 03:18 PM To: Access Developers discussion and problem solving Subject: [AccessD] Access 2010 SP1 issue I have an ADP with a form that gets bound at run-time. This has worked flawlessly for several years until this morning. The user is complaining that the form opens up with all of the fields displaying #NAME? I haven't touched this form, or even the ADP in the longest time so I new it wasn't anything I've done. :) It works as it is supposed to on my computer and all the other employees in his department. We had him go to another user's computer and log in as himself. It worked. So I figured it was tied to his machine. I then realized his is on Win7, using Acess2010SP1. I found out SP1 was just released internally this week. A-HA! I ended up getting it working by doing this quick fix as shown below: I added the "If (SysCmd(acSysCmdAccessVer) = 14) Then" statement. Private Sub Form_Open(Cancel As Integer) On Error GoTo Form_Open_Error Me.RecordSource = "" If Nz(Me.OpenArgs, "") <> "" Then ' Is Not Null Then If IsNumeric(Me.OpenArgs) Then Me.InputParameters = "@IncStatJunctID = " & CInt(Me.OpenArgs) If (SysCmd(acSysCmdAccessVer) = 14) Then Me.RecordSource = "EXEC dbo.stpItemDetHist " & Me.InputParameters Else Me.RecordSourceQualifier = "dbo" Me.RecordSource = "stpItemDetHist" End If 'Do a bunch of stuff here Else Cancel = True End If Else Cancel = True End If This works, but technically isn't correct. I need to check for A2010 SP1, not just A2010 (Ver14) Does anyone know how I can check for SP1? Exit Sub -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From jimdettman at verizon.net Fri Jul 22 07:54:08 2011 From: jimdettman at verizon.net (Jim Dettman) Date: Fri, 22 Jul 2011 08:54:08 -0400 Subject: [AccessD] Access 2010 SP1 issue In-Reply-To: References: Message-ID: <863C452D91EA4261AB37E2440CEF1110@XPS> BTW, I should have added that your not alone; the bug has already been reported to Microsoft. Jim. -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of David McAfee Sent: Thursday, July 21, 2011 03:18 PM To: Access Developers discussion and problem solving Subject: [AccessD] Access 2010 SP1 issue I have an ADP with a form that gets bound at run-time. This has worked flawlessly for several years until this morning. The user is complaining that the form opens up with all of the fields displaying #NAME? I haven't touched this form, or even the ADP in the longest time so I new it wasn't anything I've done. :) It works as it is supposed to on my computer and all the other employees in his department. We had him go to another user's computer and log in as himself. It worked. So I figured it was tied to his machine. I then realized his is on Win7, using Acess2010SP1. I found out SP1 was just released internally this week. A-HA! I ended up getting it working by doing this quick fix as shown below: I added the "If (SysCmd(acSysCmdAccessVer) = 14) Then" statement. Private Sub Form_Open(Cancel As Integer) On Error GoTo Form_Open_Error Me.RecordSource = "" If Nz(Me.OpenArgs, "") <> "" Then ' Is Not Null Then If IsNumeric(Me.OpenArgs) Then Me.InputParameters = "@IncStatJunctID = " & CInt(Me.OpenArgs) If (SysCmd(acSysCmdAccessVer) = 14) Then Me.RecordSource = "EXEC dbo.stpItemDetHist " & Me.InputParameters Else Me.RecordSourceQualifier = "dbo" Me.RecordSource = "stpItemDetHist" End If 'Do a bunch of stuff here Else Cancel = True End If Else Cancel = True End If This works, but technically isn't correct. I need to check for A2010 SP1, not just A2010 (Ver14) Does anyone know how I can check for SP1? Exit Sub -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From dc8 at btinternet.com Fri Jul 22 15:29:34 2011 From: dc8 at btinternet.com (Chris Swann) Date: Fri, 22 Jul 2011 21:29:34 +0100 Subject: [AccessD] Transpose from columns to rows In-Reply-To: <6C18FCC4C4B74F73B88454EAE286B3E1@personal4a8ede> References: <4E28980F.1060401@btinternet.com> <6C18FCC4C4B74F73B88454EAE286B3E1@personal4a8ede> Message-ID: <4E29DDAE.4060902@btinternet.com> Many, many thanks for that code. I've added it to the database and I now have exactly the output I need. All I have to do now is to find out how to get hold of some other data I need but that's a WHOLE different problem !! Chris On 22/07/2011 12:46, A.D. Tejpal wrote: > Chris, > > Sample query Q_Codes as given below, should get you the desired output. > > Q_Codes (Crosstab Query) > ============================= > TRANSFORM First(T_Codes.Code) AS FirstOfCode > SELECT T_Codes.ID > FROM T_Codes > GROUP BY T_Codes.ID > PIVOT "Code"& Format(DCount("*","T_Codes","ID = "& [ID]& " AND Code<= '"& [Code]& "'"),"00"); > ============================= > > Note: Table T_Codes has fields ID (number type) and Code (text type). > > Best wishes, > A.D. Tejpal > ------------ > > ----- Original Message ----- > From: Chris Swann > To: Access Developers discussion and problem solving > Sent: Friday, July 22, 2011 02:50 > Subject: [AccessD] Transpose from columns to rows > > > Hi all, > > Once again my skills need a little help. > > I have a table which contains data in rows. I need to be able to take > the values for each record and, where there is more than one value per > record, put it into separate columns. > > Here is what the data looks like (there are other fields but these are > the ones I need to move) > > ID CODE > 1 A1 > 1 B1 > 1 C1 > 2 > 3 A1 > 4 Z1 > 4 > > etc etc > > what I need is this > > ID CODE1 CODE2 CODE3 > 1 A1 B1 C1 > 2 > 3 A1 > 4 Z1 > > If anyone can point me in the right direction I would be really grateful. > > Chris Swann From newsgrps at dalyn.co.nz Fri Jul 22 16:54:54 2011 From: newsgrps at dalyn.co.nz (newsgrps) Date: Sat, 23 Jul 2011 09:54:54 +1200 Subject: [AccessD] Access 2010 SP1 issue In-Reply-To: <863C452D91EA4261AB37E2440CEF1110@XPS> References: <863C452D91EA4261AB37E2440CEF1110@XPS> Message-ID: <20110722215605.XVUV4056.mta02.xtra.co.nz@David-PC.dalyn.co.nz> Jim, How do we find out when Microsoft have solved the problem? Is there a website for these things? Regards David Emerson Dalyn Software Ltd New Zealand At 23/07/2011, Jim Dettman wrote: > BTW, I should have added that your not alone; the bug has already been >reported to Microsoft. > >Jim. > >-----Original Message----- >From: accessd-bounces at databaseadvisors.com >[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of David McAfee >Sent: Thursday, July 21, 2011 03:18 PM >To: Access Developers discussion and problem solving >Subject: [AccessD] Access 2010 SP1 issue > >I have an ADP with a form that gets bound at run-time. >This has worked flawlessly for several years until this morning. > >The user is complaining that the form opens up with all of the fields >displaying #NAME? > >I haven't touched this form, or even the ADP in the longest time so I new it >wasn't anything I've done. :) > >It works as it is supposed to on my computer and all the other employees in >his department. > >We had him go to another user's computer and log in as himself. It worked. > >So I figured it was tied to his machine. I then realized his is on Win7, >using Acess2010SP1. > >I found out SP1 was just released internally this week. A-HA! > >I ended up getting it working by doing this quick fix as shown below: >I added the "If (SysCmd(acSysCmdAccessVer) = 14) Then" statement. > >Private Sub Form_Open(Cancel As Integer) > On Error GoTo Form_Open_Error >Me.RecordSource = "" >If Nz(Me.OpenArgs, "") <> "" Then ' Is Not Null Then > If IsNumeric(Me.OpenArgs) Then > Me.InputParameters = "@IncStatJunctID = " & CInt(Me.OpenArgs) > If (SysCmd(acSysCmdAccessVer) = 14) Then > Me.RecordSource = "EXEC dbo.stpItemDetHist " & >Me.InputParameters > Else > Me.RecordSourceQualifier = "dbo" > Me.RecordSource = "stpItemDetHist" > End If > > 'Do a bunch of stuff here > > Else > Cancel = True > End If >Else > Cancel = True >End If > > >This works, but technically isn't correct. I need to check for A2010 SP1, >not just A2010 (Ver14) > >Does anyone know how I can check for SP1? >Exit Sub >-- >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 Sat Jul 23 07:03:09 2011 From: jimdettman at verizon.net (Jim Dettman) Date: Sat, 23 Jul 2011 08:03:09 -0400 Subject: [AccessD] Access 2010 SP1 issue In-Reply-To: <20110722215605.XVUV4056.mta02.xtra.co.nz@David-PC.dalyn.co.nz> References: <863C452D91EA4261AB37E2440CEF1110@XPS> <20110722215605.XVUV4056.mta02.xtra.co.nz@David-PC.dalyn.co.nz> Message-ID: David, Depending on the severity of the bug and the scope of it, and based on past experience, a couple of things might happen: 1. They will issue a KB and a hot patch for an immediate fix. 2. They will issue a KB with a work around and include it in the next SP. 3. They will simply include it in the next SP. 4. They will issue a KB with a work around and not bother to fix it. All I can say definitely is that we are still in the very initial stages with this. SP1 became available not too long ago and in many places is just starting to be rolled out. If I hear of anything I can pass along, I will. But in the meantime, it looks like simply adding EXEC takes care of the problem with the input parameters. Jim. -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of newsgrps Sent: Friday, July 22, 2011 05:55 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Access 2010 SP1 issue Jim, How do we find out when Microsoft have solved the problem? Is there a website for these things? Regards David Emerson Dalyn Software Ltd New Zealand At 23/07/2011, Jim Dettman wrote: > BTW, I should have added that your not alone; the bug has already been >reported to Microsoft. > >Jim. > >-----Original Message----- >From: accessd-bounces at databaseadvisors.com >[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of David McAfee >Sent: Thursday, July 21, 2011 03:18 PM >To: Access Developers discussion and problem solving >Subject: [AccessD] Access 2010 SP1 issue > >I have an ADP with a form that gets bound at run-time. >This has worked flawlessly for several years until this morning. > >The user is complaining that the form opens up with all of the fields >displaying #NAME? > >I haven't touched this form, or even the ADP in the longest time so I new it >wasn't anything I've done. :) > >It works as it is supposed to on my computer and all the other employees in >his department. > >We had him go to another user's computer and log in as himself. It worked. > >So I figured it was tied to his machine. I then realized his is on Win7, >using Acess2010SP1. > >I found out SP1 was just released internally this week. A-HA! > >I ended up getting it working by doing this quick fix as shown below: >I added the "If (SysCmd(acSysCmdAccessVer) = 14) Then" statement. > >Private Sub Form_Open(Cancel As Integer) > On Error GoTo Form_Open_Error >Me.RecordSource = "" >If Nz(Me.OpenArgs, "") <> "" Then ' Is Not Null Then > If IsNumeric(Me.OpenArgs) Then > Me.InputParameters = "@IncStatJunctID = " & CInt(Me.OpenArgs) > If (SysCmd(acSysCmdAccessVer) = 14) Then > Me.RecordSource = "EXEC dbo.stpItemDetHist " & >Me.InputParameters > Else > Me.RecordSourceQualifier = "dbo" > Me.RecordSource = "stpItemDetHist" > End If > > 'Do a bunch of stuff here > > Else > Cancel = True > End If >Else > Cancel = True >End If > > >This works, but technically isn't correct. I need to check for A2010 SP1, >not just A2010 (Ver14) > >Does anyone know how I can check for SP1? >Exit Sub >-- >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 fuller.artful at gmail.com Sat Jul 23 07:54:01 2011 From: fuller.artful at gmail.com (Arthur Fuller) Date: Sat, 23 Jul 2011 08:54:01 -0400 Subject: [AccessD] Max of 20 values Message-ID: I have a form into which the user enters up to 20 values (measurements in time). They all default to zero. I'm trying to think of an elegant way to find the max value among the 20. Create an array and bubble sort it? I want to call this code on the AfterUpdate of each of these 20 controls so the control called MaxReading gets a new value if any of the 20 controls goes higher than the current MaxReading value. TIA, Arthur From rockysmolin at bchacc.com Sat Jul 23 08:15:34 2011 From: rockysmolin at bchacc.com (Rocky Smolin) Date: Sat, 23 Jul 2011 06:15:34 -0700 Subject: [AccessD] Max of 20 values In-Reply-To: References: Message-ID: Crude as it sounds, twenty IF statements might be the fastest, easiest, cheapest way. Easy to read, easy to maintain in the future. If the text boxes all have consistent names list txtValuenn where nn is a number from 01 to 20, then you could do it in a loop, creating the name of the text box in a string and checking to see if the value in that box is greater than the currently highest value -- If Me(strtxtBoxName) > dblCurrentHIgh then dblCurrentHigh = Me(strtxtBoxName). That would be clever, harder to maintain 5 years form now, and take....almost 20 lines of code. You coud write the twenty values to a temp table and to a Dmax on the table. That would take about 20 lines of code and would be even longer and more fun to create. Or bind the twenty values to a table and put them in a continuous subform. Then the Dmax would be easy. Or 20 If statements... R -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Arthur Fuller Sent: Saturday, July 23, 2011 5:54 AM To: Access Developers discussion and problem solving Subject: [AccessD] Max of 20 values I have a form into which the user enters up to 20 values (measurements in time). They all default to zero. I'm trying to think of an elegant way to find the max value among the 20. Create an array and bubble sort it? I want to call this code on the AfterUpdate of each of these 20 controls so the control called MaxReading gets a new value if any of the 20 controls goes higher than the current MaxReading value. TIA, Arthur -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From df.waters at comcast.net Sat Jul 23 08:42:00 2011 From: df.waters at comcast.net (Dan Waters) Date: Sat, 23 Jul 2011 08:42:00 -0500 Subject: [AccessD] Max of 20 values In-Reply-To: References: Message-ID: <001701cc493e$4ca62a60$e5f27f20$@comcast.net> Hi Arthur, I found this function in my library file. This uses a parameter array and just loops through looking for the highest one. HTH! Dan '--------------------- Private Sub textMaxOfVars() MsgBox MaxOfVars(20, 30, Null, -7, 8, 87.23, "top") End Sub Public Function MaxOfVars(ParamArray varValues() As Variant) On Error GoTo EH '-- Purpose: Return a max of variants. Note that any string will be larger than any numeric value. Dim lvarVal As Variant Dim lvarMax As Variant lvarMax = varValues(0) For Each lvarVal In varValues If lvarVal > lvarMax Then lvarMax = lvarVal End If Next lvarVal MaxOfVars = lvarMax XH: Exit Function EH: Select Case Err.Number Case 9 '-- Subscript out of range - probably due to no values supplied Application.Echo True MaxOfVars = Null GoTo XH End Select End Function '--------------------- -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Arthur Fuller Sent: Saturday, July 23, 2011 7:54 AM To: Access Developers discussion and problem solving Subject: [AccessD] Max of 20 values I have a form into which the user enters up to 20 values (measurements in time). They all default to zero. I'm trying to think of an elegant way to find the max value among the 20. Create an array and bubble sort it? I want to call this code on the AfterUpdate of each of these 20 controls so the control called MaxReading gets a new value if any of the 20 controls goes higher than the current MaxReading value. TIA, Arthur -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From jwcolby at colbyconsulting.com Sat Jul 23 08:46:49 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Sat, 23 Jul 2011 09:46:49 -0400 Subject: [AccessD] Max of 20 values In-Reply-To: References: Message-ID: <4E2AD0C9.2090307@colbyconsulting.com> Bubble sort? Arthur!!! I think a set of classes... ;) Actually a simple function where you pass the control with the data just entered and the MaxReading control. The function compares the value just entered with max reading and sets maxreading to the new value if the new value is bigger. function SetMaxReading(ctlJustEntered as control, ctlMaxReading as control) if ctlJustEntered.Value > ctlMaxReading.value then ctlMaxReading.value = ctlJustEntered.Value endif end function If you need to set dirty false then pass in the form as well. John W. Colby www.ColbyConsulting.com On 7/23/2011 8:54 AM, Arthur Fuller wrote: > I have a form into which the user enters up to 20 values (measurements in > time). They all default to zero. I'm trying to think of an elegant way to > find the max value among the 20. Create an array and bubble sort it? I want > to call this code on the AfterUpdate of each of these 20 controls so the > control called MaxReading gets a new value if any of the 20 controls goes > higher than the current MaxReading value. > > TIA, > Arthur From fuller.artful at gmail.com Sat Jul 23 09:12:04 2011 From: fuller.artful at gmail.com (Arthur Fuller) Date: Sat, 23 Jul 2011 10:12:04 -0400 Subject: [AccessD] Max of 20 values In-Reply-To: <4E2AD0C9.2090307@colbyconsulting.com> References: <4E2AD0C9.2090307@colbyconsulting.com> Message-ID: 1. Pls forgive me my senior moments, JC. 2. You're such a classy guy, I just knew you'd come up with a set of classes. The problem is perhaps in the UI rather than the logic. So far, there is no prevention upon the user entering M1 then M3 then M20 and leaving all the others out. Granted, this style of data-entry doesn't make sense, but given user-sensibilities (the newly politically correct way to phrase Dumbass MoFo), I need to guard against such ostensibly intelligent responses to my form. I suppose that one possibility is in each AfterUpdate, force the Focus to the next in sequence. All that said, I shall work on implementing your approach. I just imported your code and aside from a couple of vbcrlfs if worked fine. The part I don't like is the specific reference to the active control. I have looked at ActiveControl and maybe that's the path I should follow. I want to compress this into one clean function that receives the currently active control and the currently defined maximum, and then reset the MaxGroupReading to the greater of these two values, so I can copy+paste said "=ComputeMax()" into all 20 of the AfterUpdate events and be done with it. Your last comment (about passing in the form) has immediate potential. In the real case, I have to do this four times, with fields numbered M1..M20, M21..M40, M41...M60 and M61...M80. Each of these lives on a separate tab's subform, but the algorithm remains the same throughout. There may or may not be data on everything beyond M20, as defined by the Parent form. If a WorkStation has only two LightCurtains, then LC1 and LC3 are defined with measures, and the others are not. (Please don't ask me why the sequence goes LC1, LC3, LC2 and LC4 -- I'm just a grunt programmer in the trenches, not a certified P.Eng). I just do what I'm told... which argument didn't work at Nuremberg and perhaps won't pass in Toronto, but that's my argument and I'm sticking to it. A. On Sat, Jul 23, 2011 at 9:46 AM, jwcolby wrote: > Bubble sort? > > Arthur!!! > > I think a set of classes... ;) > > Actually a simple function where you pass the control with the data just > entered and the MaxReading control. The function compares the value just > entered with max reading and sets maxreading to the new value if the new > value is bigger. > > function SetMaxReading(ctlJustEntered as control, ctlMaxReading as control) > > if ctlJustEntered.Value > ctlMaxReading.value then > ctlMaxReading.value = ctlJustEntered.Value > endif > end function > > If you need to set dirty false then pass in the form as well. > > John W. Colby > www.ColbyConsulting.com > > > From jwcolby at colbyconsulting.com Sat Jul 23 09:19:14 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Sat, 23 Jul 2011 10:19:14 -0400 Subject: [AccessD] Max of 20 values In-Reply-To: References: <4E2AD0C9.2090307@colbyconsulting.com> Message-ID: <4E2AD862.9060109@colbyconsulting.com> So you are saying that every single control needs data entered into it? John W. Colby www.ColbyConsulting.com On 7/23/2011 10:12 AM, Arthur Fuller wrote: > 1. Pls forgive me my senior moments, JC. > 2. You're such a classy guy, I just knew you'd come up with a set of > classes. > > The problem is perhaps in the UI rather than the logic. So far, there is no > prevention upon the user entering M1 then M3 then M20 and leaving all the > others out. Granted, this style of data-entry doesn't make sense, but given > user-sensibilities (the newly politically correct way to phrase Dumbass > MoFo), I need to guard against such ostensibly intelligent responses to my > form. I suppose that one possibility is in each AfterUpdate, force the Focus > to the next in sequence. > > All that said, I shall work on implementing your approach. I just imported > your code and aside from a couple of vbcrlfs if worked fine. The part I > don't like is the specific reference to the active control. I have looked at > ActiveControl and maybe that's the path I should follow. I want to compress > this into one clean function that receives the currently active control and > the currently defined maximum, and then reset the MaxGroupReading to the > greater of these two values, so I can copy+paste said "=ComputeMax()" into > all 20 of the AfterUpdate events and be done with it. > > Your last comment (about passing in the form) has immediate potential. In > the real case, I have to do this four times, with fields numbered M1..M20, > M21..M40, M41...M60 and M61...M80. Each of these lives on a separate tab's > subform, but the algorithm remains the same throughout. There may or may not > be data on everything beyond M20, as defined by the Parent form. If a > WorkStation has only two LightCurtains, then LC1 and LC3 are defined with > measures, and the others are not. (Please don't ask me why the sequence goes > LC1, LC3, LC2 and LC4 -- I'm just a grunt programmer in the trenches, not a > certified P.Eng). I just do what I'm told... which argument didn't work at > Nuremberg and perhaps won't pass in Toronto, but that's my argument and I'm > sticking to it. > > A. > > On Sat, Jul 23, 2011 at 9:46 AM, jwcolbywrote: > >> Bubble sort? >> >> Arthur!!! >> >> I think a set of classes... ;) >> >> Actually a simple function where you pass the control with the data just >> entered and the MaxReading control. The function compares the value just >> entered with max reading and sets maxreading to the new value if the new >> value is bigger. >> >> function SetMaxReading(ctlJustEntered as control, ctlMaxReading as control) >> >> if ctlJustEntered.Value> ctlMaxReading.value then >> ctlMaxReading.value = ctlJustEntered.Value >> endif >> end function >> >> If you need to set dirty false then pass in the form as well. >> >> John W. Colby >> www.ColbyConsulting.com >> >> >> From jwcolby at colbyconsulting.com Sat Jul 23 09:21:19 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Sat, 23 Jul 2011 10:21:19 -0400 Subject: [AccessD] Max of 20 values In-Reply-To: References: <4E2AD0C9.2090307@colbyconsulting.com> Message-ID: <4E2AD8DF.3020202@colbyconsulting.com> And further, given that you are working with such numbers of controls I would start leaning towards a class solution. Does this need to go into multiple forms? If so leaning further toward a class solution. Are the controls following a naming convention? Leaning further... From you original email I got that the user just entered any controls they wished, not every control. And you said nothing about multiple forms or tabs. John W. Colby www.ColbyConsulting.com On 7/23/2011 10:12 AM, Arthur Fuller wrote: > 1. Pls forgive me my senior moments, JC. > 2. You're such a classy guy, I just knew you'd come up with a set of > classes. > > The problem is perhaps in the UI rather than the logic. So far, there is no > prevention upon the user entering M1 then M3 then M20 and leaving all the > others out. Granted, this style of data-entry doesn't make sense, but given > user-sensibilities (the newly politically correct way to phrase Dumbass > MoFo), I need to guard against such ostensibly intelligent responses to my > form. I suppose that one possibility is in each AfterUpdate, force the Focus > to the next in sequence. > > All that said, I shall work on implementing your approach. I just imported > your code and aside from a couple of vbcrlfs if worked fine. The part I > don't like is the specific reference to the active control. I have looked at > ActiveControl and maybe that's the path I should follow. I want to compress > this into one clean function that receives the currently active control and > the currently defined maximum, and then reset the MaxGroupReading to the > greater of these two values, so I can copy+paste said "=ComputeMax()" into > all 20 of the AfterUpdate events and be done with it. > > Your last comment (about passing in the form) has immediate potential. In > the real case, I have to do this four times, with fields numbered M1..M20, > M21..M40, M41...M60 and M61...M80. Each of these lives on a separate tab's > subform, but the algorithm remains the same throughout. There may or may not > be data on everything beyond M20, as defined by the Parent form. If a > WorkStation has only two LightCurtains, then LC1 and LC3 are defined with > measures, and the others are not. (Please don't ask me why the sequence goes > LC1, LC3, LC2 and LC4 -- I'm just a grunt programmer in the trenches, not a > certified P.Eng). I just do what I'm told... which argument didn't work at > Nuremberg and perhaps won't pass in Toronto, but that's my argument and I'm > sticking to it. > > A. > > On Sat, Jul 23, 2011 at 9:46 AM, jwcolbywrote: > >> Bubble sort? >> >> Arthur!!! >> >> I think a set of classes... ;) >> >> Actually a simple function where you pass the control with the data just >> entered and the MaxReading control. The function compares the value just >> entered with max reading and sets maxreading to the new value if the new >> value is bigger. >> >> function SetMaxReading(ctlJustEntered as control, ctlMaxReading as control) >> >> if ctlJustEntered.Value> ctlMaxReading.value then >> ctlMaxReading.value = ctlJustEntered.Value >> endif >> end function >> >> If you need to set dirty false then pass in the form as well. >> >> John W. Colby >> www.ColbyConsulting.com >> >> >> From fuller.artful at gmail.com Sat Jul 23 09:40:19 2011 From: fuller.artful at gmail.com (Arthur Fuller) Date: Sat, 23 Jul 2011 10:40:19 -0400 Subject: [AccessD] Max of 20 values In-Reply-To: <4E2AD8DF.3020202@colbyconsulting.com> References: <4E2AD0C9.2090307@colbyconsulting.com> <4E2AD8DF.3020202@colbyconsulting.com> Message-ID: Excellent questions, all. Here, as briefly as I can make it, is the scenario. There is an object called a workstation. It may have up to 4 LightCurtains (these devices shoot beams of light from Right to Left and detect the interruption of said beam by any object, typically an operator's hand. Upon detection, the machine must shut down within several milliseconds; a typical measurement would be 220. The Safety Engineer tests this by inserting his hand into the gap between sender and receiver, then measures the Shutdown Time. He does this 20 times. Although one would have to be an idiot to record M1 then M17 then M2 then M20, the current implementation does not prevent this idiocy. The measures are taken on a subform. The MaxReading exists on the parent form. That part I've got already. I'm not even sure what I'm looking for here; perhaps basically a defense against entering M1 then M10 then M11 then M20. Chances are that the user would not do this, but I feel the need to protect against it. Further, there are a maximum of 4 LCs (call them N, S, W, E) and in addition 4 Two-Handed-Controls (THCs, in the lingo), each of which has up to 20 Measurements. So I'm looking for a clean and elegant way to: a) prevent you entering Measure 3 without having entered Measure 2. b) to grab the value of the most recently entered Measurement and compare it against the MaxReading so far recorded. I have b) solved. a) is another matter, and I have no idea how to handle it, except perhaps by forcing the focus to the next M# in the AfterUpdate event. There has got to be something slicker than that, I just know it. A. On Sat, Jul 23, 2011 at 10:21 AM, jwcolby wrote: > And further, given that you are working with such numbers of controls I > would start leaning towards a class solution. Does this need to go into > multiple forms? If so leaning further toward a class solution. Are the > controls following a naming convention? Leaning further... > > From you original email I got that the user just entered any controls they > wished, not every control. And you said nothing about multiple forms or > tabs. > > > John W. Colby > www.ColbyConsulting.com > > On 7/23/2011 10:12 AM, Arthur Fuller wrote: > >> 1. Pls forgive me my senior moments, JC. >> 2. You're such a classy guy, I just knew you'd come up with a set of >> classes. >> >> The problem is perhaps in the UI rather than the logic. So far, there is >> no >> prevention upon the user entering M1 then M3 then M20 and leaving all the >> others out. Granted, this style of data-entry doesn't make sense, but >> given >> user-sensibilities (the newly politically correct way to phrase Dumbass >> MoFo), I need to guard against such ostensibly intelligent responses to my >> form. I suppose that one possibility is in each AfterUpdate, force the >> Focus >> to the next in sequence. >> >> All that said, I shall work on implementing your approach. I just imported >> your code and aside from a couple of vbcrlfs if worked fine. The part I >> don't like is the specific reference to the active control. I have looked >> at >> ActiveControl and maybe that's the path I should follow. I want to >> compress >> this into one clean function that receives the currently active control >> and >> the currently defined maximum, and then reset the MaxGroupReading to the >> greater of these two values, so I can copy+paste said "=ComputeMax()" into >> all 20 of the AfterUpdate events and be done with it. >> >> Your last comment (about passing in the form) has immediate potential. In >> the real case, I have to do this four times, with fields numbered M1..M20, >> M21..M40, M41...M60 and M61...M80. Each of these lives on a separate tab's >> subform, but the algorithm remains the same throughout. There may or may >> not >> be data on everything beyond M20, as defined by the Parent form. If a >> WorkStation has only two LightCurtains, then LC1 and LC3 are defined with >> measures, and the others are not. (Please don't ask me why the sequence >> goes >> LC1, LC3, LC2 and LC4 -- I'm just a grunt programmer in the trenches, not >> a >> certified P.Eng). I just do what I'm told... which argument didn't work at >> Nuremberg and perhaps won't pass in Toronto, but that's my argument and >> I'm >> sticking to it. >> >> A. >> >> On Sat, Jul 23, 2011 at 9:46 AM, jwcolby >> >wrote: >> >> Bubble sort? >>> >>> Arthur!!! >>> >>> I think a set of classes... ;) >>> >>> Actually a simple function where you pass the control with the data just >>> entered and the MaxReading control. The function compares the value just >>> entered with max reading and sets maxreading to the new value if the new >>> value is bigger. >>> >>> function SetMaxReading(ctlJustEntered as control, ctlMaxReading as >>> control) >>> >>> if ctlJustEntered.Value> ctlMaxReading.value then >>> ctlMaxReading.value = ctlJustEntered.Value >>> endif >>> end function >>> >>> If you need to set dirty false then pass in the form as well. >>> >>> John W. Colby >>> www.ColbyConsulting.com >>> >>> >>> >>> -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/**mailman/listinfo/accessd > Website: http://www.databaseadvisors.**com > From jwcolby at colbyconsulting.com Sat Jul 23 10:05:27 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Sat, 23 Jul 2011 11:05:27 -0400 Subject: [AccessD] Max of 20 values In-Reply-To: References: <4E2AD0C9.2090307@colbyconsulting.com> <4E2AD8DF.3020202@colbyconsulting.com> Message-ID: <4E2AE337.3050705@colbyconsulting.com> So IOW the readings the engineer takes when he sticks his hand in the light curtain need to be entered in sequential order in the controls? I am way leaning towards a class solution now. I would probably go with a class to hold the control and sink it's events and a parent class with 20 control class variables to hold instances of the control class (assuming that the number of controls (readings) will never change). Each control class raises an event to tell the parent to "step" the sequence. The parent has the stepping code, the control class has the locking / unlocking code. I might even turn the background a different color to visually cue the user. That would also be in the control class. The class would have a method of setting the control enable property. The parent class would load every one of the controls in the (sub) form into a class instance and as they load set all but the first Enable to false. As the Engineer enters the first reading and AfterUpdate fires, the next sequential control (class instance) is enabled, the focus set to that and the current control disabled. Voila, "stepping" enabled controls. Or perhaps instead of enable / disable, use the Locked property. This would allow the user to do something like a double click in the previous control if they made a data entry error, but only immediately. IOW before entering data into the next control Classes would make this whole thing much simpler because all of the code for the manipulation of the control itself would be kept in the control class instead of the form. Further the whole thing "replicates" in each subform simply by instantiating the parent class. The parent class could even load the control classes into the collection. If the order of entering the readings into the controls does not matter, IOW if it is not critical to have reading one entered into control one, then don't worry about it. Just lock the control and allow the user to click in another. But I think the "stepping" paradigm is the cleanest. And of course, as Stuart will point out, you don't have to use classes at all. You could just stuff all of the code in each subform. And enter the nightmare of fixing code in every subform if you find an issue or add a feature. If you are interested I can code this in under an hour. John W. Colby www.ColbyConsulting.com On 7/23/2011 10:40 AM, Arthur Fuller wrote: > Excellent questions, all. > > Here, as briefly as I can make it, is the scenario. There is an object > called a workstation. It may have up to 4 LightCurtains (these devices shoot > beams of light from Right to Left and detect the interruption of said beam > by any object, typically an operator's hand. Upon detection, the machine > must shut down within several milliseconds; a typical measurement would be > 220. The Safety Engineer tests this by inserting his hand into the gap > between sender and receiver, then measures the Shutdown Time. He does this > 20 times. > > Although one would have to be an idiot to record M1 then M17 then M2 then > M20, the current implementation does not prevent this idiocy. > > The measures are taken on a subform. The MaxReading exists on the parent > form. That part I've got already. > > I'm not even sure what I'm looking for here; perhaps basically a defense > against entering M1 then M10 then M11 then M20. Chances are that the user > would not do this, but I feel the need to protect against it. > > Further, there are a maximum of 4 LCs (call them N, S, W, E) and in addition > 4 Two-Handed-Controls (THCs, in the lingo), each of which has up to 20 > Measurements. > > So I'm looking for a clean and elegant way to: > > a) prevent you entering Measure 3 without having entered Measure 2. > b) to grab the value of the most recently entered Measurement and compare it > against the MaxReading so far recorded. > > I have b) solved. a) is another matter, and I have no idea how to handle it, > except perhaps by forcing the focus to the next M# in the AfterUpdate event. > There has got to be something slicker than that, I just know it. > > A. > > On Sat, Jul 23, 2011 at 10:21 AM, jwcolbywrote: > >> And further, given that you are working with such numbers of controls I >> would start leaning towards a class solution. Does this need to go into >> multiple forms? If so leaning further toward a class solution. Are the >> controls following a naming convention? Leaning further... >> >> From you original email I got that the user just entered any controls they >> wished, not every control. And you said nothing about multiple forms or >> tabs. >> >> >> John W. Colby >> www.ColbyConsulting.com >> >> On 7/23/2011 10:12 AM, Arthur Fuller wrote: >> >>> 1. Pls forgive me my senior moments, JC. >>> 2. You're such a classy guy, I just knew you'd come up with a set of >>> classes. >>> >>> The problem is perhaps in the UI rather than the logic. So far, there is >>> no >>> prevention upon the user entering M1 then M3 then M20 and leaving all the >>> others out. Granted, this style of data-entry doesn't make sense, but >>> given >>> user-sensibilities (the newly politically correct way to phrase Dumbass >>> MoFo), I need to guard against such ostensibly intelligent responses to my >>> form. I suppose that one possibility is in each AfterUpdate, force the >>> Focus >>> to the next in sequence. >>> >>> All that said, I shall work on implementing your approach. I just imported >>> your code and aside from a couple of vbcrlfs if worked fine. The part I >>> don't like is the specific reference to the active control. I have looked >>> at >>> ActiveControl and maybe that's the path I should follow. I want to >>> compress >>> this into one clean function that receives the currently active control >>> and >>> the currently defined maximum, and then reset the MaxGroupReading to the >>> greater of these two values, so I can copy+paste said "=ComputeMax()" into >>> all 20 of the AfterUpdate events and be done with it. >>> >>> Your last comment (about passing in the form) has immediate potential. In >>> the real case, I have to do this four times, with fields numbered M1..M20, >>> M21..M40, M41...M60 and M61...M80. Each of these lives on a separate tab's >>> subform, but the algorithm remains the same throughout. There may or may >>> not >>> be data on everything beyond M20, as defined by the Parent form. If a >>> WorkStation has only two LightCurtains, then LC1 and LC3 are defined with >>> measures, and the others are not. (Please don't ask me why the sequence >>> goes >>> LC1, LC3, LC2 and LC4 -- I'm just a grunt programmer in the trenches, not >>> a >>> certified P.Eng). I just do what I'm told... which argument didn't work at >>> Nuremberg and perhaps won't pass in Toronto, but that's my argument and >>> I'm >>> sticking to it. >>> >>> A. >>> >>> On Sat, Jul 23, 2011 at 9:46 AM, jwcolby >>>> wrote: >>> >>> Bubble sort? >>>> >>>> Arthur!!! >>>> >>>> I think a set of classes... ;) >>>> >>>> Actually a simple function where you pass the control with the data just >>>> entered and the MaxReading control. The function compares the value just >>>> entered with max reading and sets maxreading to the new value if the new >>>> value is bigger. >>>> >>>> function SetMaxReading(ctlJustEntered as control, ctlMaxReading as >>>> control) >>>> >>>> if ctlJustEntered.Value> ctlMaxReading.value then >>>> ctlMaxReading.value = ctlJustEntered.Value >>>> endif >>>> end function >>>> >>>> If you need to set dirty false then pass in the form as well. >>>> >>>> John W. Colby >>>> www.ColbyConsulting.com >>>> >>>> >>>> >>>> -- >> AccessD mailing list >> AccessD at databaseadvisors.com >> http://databaseadvisors.com/**mailman/listinfo/accessd >> Website: http://www.databaseadvisors.**com >> From fuller.artful at gmail.com Sat Jul 23 10:28:52 2011 From: fuller.artful at gmail.com (Arthur Fuller) Date: Sat, 23 Jul 2011 11:28:52 -0400 Subject: [AccessD] Max of 20 values In-Reply-To: <4E2AE337.3050705@colbyconsulting.com> References: <4E2AD0C9.2090307@colbyconsulting.com> <4E2AD8DF.3020202@colbyconsulting.com> <4E2AE337.3050705@colbyconsulting.com> Message-ID: Ok, I won't pay you a penny but go ahead and code it. There are four subforms, call them LC#_fsub, each tied to a parent whose values derive from the subform. I have this working for subform1 and can clone the sub proc for each of them, but this strikes me as seriously inelegant. This topic raises an ancillory question: supposing a number of fields named M1...M20, how can one code a loop that grabs their names and walks the loop and obtains these controls' values? Perhaps Eval? I am seriously unsure upon this turf. A. From jwcolby at colbyconsulting.com Sat Jul 23 10:36:01 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Sat, 23 Jul 2011 11:36:01 -0400 Subject: [AccessD] Max of 20 values In-Reply-To: References: <4E2AD0C9.2090307@colbyconsulting.com> <4E2AD8DF.3020202@colbyconsulting.com> <4E2AE337.3050705@colbyconsulting.com> Message-ID: <4E2AEA61.2060809@colbyconsulting.com> > This topic raises an ancillory question: supposing a number of fields named M1...M20, how can one code a loop that grabs their names and walks the loop and obtains these controls' values? Each form has a controls collection dim ctl as control for each ctl in me.controls 'now look at the control name next ctl Having a nice neat naming convention helps. M01, M02 etc allows you to simply do if left(ctl.name,1) = "m" then debug.print ctl.value endif John W. Colby www.ColbyConsulting.com On 7/23/2011 11:28 AM, Arthur Fuller wrote: > Ok, I won't pay you a penny but go ahead and code it. There are four > subforms, call them LC#_fsub, each tied to a parent whose values derive from > the subform. I have this working for subform1 and can clone the sub proc for > each of them, but this strikes me as seriously inelegant. > > This topic raises an ancillory question: supposing a number of fields named > M1...M20, how can one code a loop that grabs their names and walks the loop > and obtains these controls' values? Perhaps Eval? I am seriously unsure upon > this turf. > > A. From df.waters at comcast.net Sat Jul 23 10:35:08 2011 From: df.waters at comcast.net (Dan Waters) Date: Sat, 23 Jul 2011 10:35:08 -0500 Subject: [AccessD] Re Max of 20 values Message-ID: <001b01cc494e$1af91530$50eb3f90$@comcast.net> Hi Arthur, I found this function in my library file. This uses a parameter array and just loops through looking for the highest one. HTH! Dan '--------------------- Private Sub textMaxOfVars() MsgBox MaxOfVars(20, 30, Null, -7, 8, 87.23, "top") End Sub Public Function MaxOfVars(ParamArray varValues() As Variant) On Error GoTo EH '-- Purpose: Return a max of variants. Note that any string will be larger than any numeric value. Dim lvarVal As Variant Dim lvarMax As Variant lvarMax = varValues(0) For Each lvarVal In varValues If lvarVal > lvarMax Then lvarMax = lvarVal End If Next lvarVal MaxOfVars = lvarMax XH: Exit Function EH: Select Case Err.Number Case 9 '-- Subscript out of range - probably due to no values supplied Application.Echo True MaxOfVars = Null GoTo XH End Select End Function '--------------------- -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Arthur Fuller Sent: Saturday, July 23, 2011 7:54 AM To: Access Developers discussion and problem solving Subject: [AccessD] Max of 20 values I have a form into which the user enters up to 20 values (measurements in time). They all default to zero. I'm trying to think of an elegant way to find the max value among the 20. Create an array and bubble sort it? I want to call this code on the AfterUpdate of each of these 20 controls so the control called MaxReading gets a new value if any of the 20 controls goes higher than the current MaxReading value. TIA, Arthur -- 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 jwcolby at colbyconsulting.com Sat Jul 23 10:39:38 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Sat, 23 Jul 2011 11:39:38 -0400 Subject: [AccessD] Max of 20 values In-Reply-To: References: <4E2AD0C9.2090307@colbyconsulting.com> <4E2AD8DF.3020202@colbyconsulting.com> <4E2AE337.3050705@colbyconsulting.com> Message-ID: <4E2AEB3A.8010008@colbyconsulting.com> How many subforms is irrelevant once you have a parent class. You instantiate the parent in the form and pass in the controls and off you go. John W. Colby www.ColbyConsulting.com On 7/23/2011 11:28 AM, Arthur Fuller wrote: > Ok, I won't pay you a penny but go ahead and code it. There are four > subforms, call them LC#_fsub, each tied to a parent whose values derive from > the subform. I have this working for subform1 and can clone the sub proc for > each of them, but this strikes me as seriously inelegant. > > This topic raises an ancillory question: supposing a number of fields named > M1...M20, how can one code a loop that grabs their names and walks the loop > and obtains these controls' values? Perhaps Eval? I am seriously unsure upon > this turf. > > A. From fuller.artful at gmail.com Sat Jul 23 10:41:29 2011 From: fuller.artful at gmail.com (Arthur Fuller) Date: Sat, 23 Jul 2011 11:41:29 -0400 Subject: [AccessD] Max of 20 values In-Reply-To: <4E2AEA61.2060809@colbyconsulting.com> References: <4E2AD0C9.2090307@colbyconsulting.com> <4E2AD8DF.3020202@colbyconsulting.com> <4E2AE337.3050705@colbyconsulting.com> <4E2AEA61.2060809@colbyconsulting.com> Message-ID: I see what you're getting at but the part I don't like about this approach is its need to visit all the controls, when I'm concerned only about the ones that begin with "M" followed by a number. In this case, isn't it better to create a collection based on this naming scheme? This is just a question; you're the class guy. A. From fuller.artful at gmail.com Sat Jul 23 10:45:08 2011 From: fuller.artful at gmail.com (Arthur Fuller) Date: Sat, 23 Jul 2011 11:45:08 -0400 Subject: [AccessD] Re Max of 20 values In-Reply-To: <001b01cc494e$1af91530$50eb3f90$@comcast.net> References: <001b01cc494e$1af91530$50eb3f90$@comcast.net> Message-ID: If I understand what you are saying, I ought to create an array consisting of M1...M29 and pass it to said function, and let the function walk through the array to determine the max value. Is that right? Thx. Arthur On Sat, Jul 23, 2011 at 11:35 AM, Dan Waters wrote: > Hi Arthur, > > I found this function in my library file. This uses a parameter array and > just loops through looking for the highest one. > > From john at winhaven.net Sat Jul 23 11:09:16 2011 From: john at winhaven.net (John Bartow) Date: Sat, 23 Jul 2011 11:09:16 -0500 Subject: [AccessD] report detail - conditional formatting Message-ID: <068301cc4952$df49e690$9dddb3b0$@winhaven.net> Is it possible to create conditional formatting per detail line in an Access report? I would like to have certain items print in bold. TIA John B From jwcolby at colbyconsulting.com Sat Jul 23 11:11:19 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Sat, 23 Jul 2011 12:11:19 -0400 Subject: [AccessD] Max of 20 values In-Reply-To: References: <4E2AD0C9.2090307@colbyconsulting.com> <4E2AD8DF.3020202@colbyconsulting.com> <4E2AE337.3050705@colbyconsulting.com> <4E2AEA61.2060809@colbyconsulting.com> Message-ID: <4E2AF2A7.70401@colbyconsulting.com> I am just addressing how to find the controls not what you do with them when you find them. You could walk the collection once adding the control into a collection when it matches the name. Once you do that then you walk your collection instead of the form's. John W. Colby www.ColbyConsulting.com On 7/23/2011 11:41 AM, Arthur Fuller wrote: > I see what you're getting at but the part I don't like about this approach > is its need to visit all the controls, when I'm concerned only about the > ones that begin with "M" followed by a number. In this case, isn't it better > to create a collection based on this naming scheme? This is just a question; > you're the class guy. > > A. From gustav at cactus.dk Sat Jul 23 11:31:51 2011 From: gustav at cactus.dk (Gustav Brock) Date: Sat, 23 Jul 2011 18:31:51 +0200 Subject: [AccessD] Max of 20 values Message-ID: Hi John and Arthur You also could loop exactly the controls in question: Set frm = Me.Form 'or a subform. For intControlM = 1 To 20 Set ctl = frm.Controls("M" & CStr(intControlM)) ' Do stuff. Next /gustav >>> jwcolby at colbyconsulting.com 23-07-2011 18:11:19 >>> I am just addressing how to find the controls not what you do with them when you find them. You could walk the collection once adding the control into a collection when it matches the name. Once you do that then you walk your collection instead of the form's. John W. Colby www.ColbyConsulting.com On 7/23/2011 11:41 AM, Arthur Fuller wrote: > I see what you're getting at but the part I don't like about this approach > is its need to visit all the controls, when I'm concerned only about the > ones that begin with "M" followed by a number. In this case, isn't it better > to create a collection based on this naming scheme? This is just a question; > you're the class guy. > > A. From fuller.artful at gmail.com Sat Jul 23 11:50:49 2011 From: fuller.artful at gmail.com (Arthur Fuller) Date: Sat, 23 Jul 2011 12:50:49 -0400 Subject: [AccessD] Max of 20 values In-Reply-To: References: Message-ID: Hmmm. I didn't know you could do that. Kewl I'll just scamper off and write a little looper thing and see if it works! Thx, A. On Sat, Jul 23, 2011 at 12:31 PM, Gustav Brock wrote: > Hi John and Arthur > > You also could loop exactly the controls in question: > > Set frm = Me.Form 'or a subform. > For intControlM = 1 To 20 > Set ctl = frm.Controls("M" & CStr(intControlM)) > ' Do stuff. > Next > > /gustav > > > From fuller.artful at gmail.com Sat Jul 23 11:55:18 2011 From: fuller.artful at gmail.com (Arthur Fuller) Date: Sat, 23 Jul 2011 12:55:18 -0400 Subject: [AccessD] report detail - conditional formatting In-Reply-To: <068301cc4952$df49e690$9dddb3b0$@winhaven.net> References: <068301cc4952$df49e690$9dddb3b0$@winhaven.net> Message-ID: I'm not sure why the conditions would apply per detail line, or even what you mean by the question, but just supposing that you are listing, say Categories, then CategoryID would define the CategoryPrice field and say it's Red if Category = 1 or Green if CategoryID = 2, and so on. I fail to see the problem here; forgive me my stupidity here. Bold should not be more difficult than colours. A, On Sat, Jul 23, 2011 at 12:09 PM, John Bartow wrote: > Is it possible to create conditional formatting per detail line in an > Access > report? > > I would like to have certain items print in bold. > > TIA > John B > > From jwcolby at colbyconsulting.com Sat Jul 23 12:32:52 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Sat, 23 Jul 2011 13:32:52 -0400 Subject: [AccessD] Max of 20 values In-Reply-To: References: Message-ID: <4E2B05C4.50903@colbyconsulting.com> Arthur, I sent you a class solution offline. The assumption was that you wanted to lock all but the currently available control and then walk through the controls allowing just the next control to become enabled. I did a little coloring since it is free. It would be possible to unlock the previous for editing if necessary. That adds additional logic and I didn't want to obscure what I am doing with that code until the specs call for it. ;) John W. Colby www.ColbyConsulting.com From BradM at blackforestltd.com Sat Jul 23 13:58:25 2011 From: BradM at blackforestltd.com (Brad Marks) Date: Sat, 23 Jul 2011 13:58:25 -0500 Subject: [AccessD] Exporting from an Access 2007 Query to Excel - DoCmd.OutputTo Versus DoCmd.TransferSpreadsheet References: <4E2AD0C9.2090307@colbyconsulting.com><4E2AD8DF.3020202@colbyconsulting.com><4E2AE337.3050705@colbyconsulting.com><4E2AEA61.2060809@colbyconsulting.com> Message-ID: All, I am curious if there are significant differences between using "DoCmd.OutputTo" Versus "DoCmd.TransferSpreadsheet" when exporting an Access 2007 Query to Excel. As I understand it, TransferSpreadsheet can handle more rows, but I was wondering if there are any other differences that should be kept in mind when choosing between these two approaches. Thanks, Brad From df.waters at comcast.net Sat Jul 23 16:22:13 2011 From: df.waters at comcast.net (Dan Waters) Date: Sat, 23 Jul 2011 16:22:13 -0500 Subject: [AccessD] Re Max of 20 values In-Reply-To: References: <001b01cc494e$1af91530$50eb3f90$@comcast.net> Message-ID: <002801cc497e$98b29890$ca17c9b0$@comcast.net> Exactly! Since you have a fixed set of controls it's write once and walk away. And you have a MaxOfVars function for future use. Null values are ignored. Good Luck! Dan -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Arthur Fuller Sent: Saturday, July 23, 2011 10:45 AM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Re Max of 20 values If I understand what you are saying, I ought to create an array consisting of M1...M29 and pass it to said function, and let the function walk through the array to determine the max value. Is that right? Thx. Arthur On Sat, Jul 23, 2011 at 11:35 AM, Dan Waters wrote: > Hi Arthur, > > I found this function in my library file. This uses a parameter array > and just loops through looking for the highest one. > > -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From rockysmolin at bchacc.com Sat Jul 23 16:30:52 2011 From: rockysmolin at bchacc.com (Rocky Smolin) Date: Sat, 23 Jul 2011 14:30:52 -0700 Subject: [AccessD] report detail - conditional formatting In-Reply-To: <068301cc4952$df49e690$9dddb3b0$@winhaven.net> References: <068301cc4952$df49e690$9dddb3b0$@winhaven.net> Message-ID: <53C8E31E1BFA4ACC8FD459D6E099DE09@HAL9007> John: I use the Detail Format event to do this. Will that work? R -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of John Bartow Sent: Saturday, July 23, 2011 9:09 AM To: DBA-Access Subject: [AccessD] report detail - conditional formatting Is it possible to create conditional formatting per detail line in an Access report? I would like to have certain items print in bold. TIA John B -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From vbacreations at gmail.com Sat Jul 23 20:27:08 2011 From: vbacreations at gmail.com (William Benson (VBACreations.Com)) Date: Sat, 23 Jul 2011 21:27:08 -0400 Subject: [AccessD] Re Max of 20 values In-Reply-To: References: <001b01cc494e$1af91530$50eb3f90$@comcast.net> Message-ID: <000d01cc49a0$ce8242a0$6b86c7e0$@gmail.com> Going back to the original inquiry. John's right, class modules are the way to go. Assumptions: Tag property on all controls which can contain a time value = "Time Values" I have an additional textbox on my form with controlsource = "= HighestValue()" -- that is a public function -- see below 'IN THE FORM'S CODE MODULE Option Compare Database Option Explicit Dim colTimeValueControls As New Collection Dim MyclsSeriesItem As clsTimeSeriesItem Private Sub Form_Load() Dim Ctrl As Control Glob_Dbl_What_Is_Current_Max = 0 Glob_Str_Which_Control_Has_Max = "" For Each Ctrl In Me.Controls If ControlIsTimeValue(Ctrl, TimeValueTag) Then Set MyclsSeriesItem = New clsTimeSeriesItem Set MyclsSeriesItem.Txt = Ctrl MyclsSeriesItem.Txt.AfterUpdate = "[Event Procedure]" colTimeValueControls.Add MyclsSeriesItem End If Next End Sub 'IN A Class Module named clsTimeSeriesItem Option Compare Database Option Explicit Public WithEvents aTxt As Access.TextBox Private Sub aTxt_AfterUpdate() Dim bTestAllControls As Boolean Dim Ctrl As Control bTestAllControls = False If IsNumeric(aTxt.Value) Then If CDbl(Nz(aTxt.Value, 0)) >= Glob_Dbl_What_Is_Current_Max Then Glob_Dbl_What_Is_Current_Max = CDbl(aTxt.Value) Glob_Str_Which_Control_Has_Max = aTxt.Name ElseIf Glob_Str_Which_Control_Has_Max <> aTxt.Name Then 'DO NOTHING, some other control has the max value anyway Else 'It is numeric, it was the max, and it no longer is as high as the max was bTestAllControls = True End If ElseIf Glob_Str_Which_Control_Has_Max = aTxt.Name Then bTestAllControls = True Else 'We don't care if it went non-numeric, it didn't hold the max value prior to now End If If bTestAllControls Then Glob_Str_Which_Control_Has_Max = "" Glob_Dbl_What_Is_Current_Max = 0 For Each Ctrl In aTxt.Parent.Controls If ControlIsTimeValue(Ctrl, TimeValueTag) Then If IsNumeric(Nz(Ctrl.Value, "")) Then If CDbl(Nz(Ctrl.Value, 0)) > Glob_Dbl_What_Is_Current_Max Then Glob_Dbl_What_Is_Current_Max = CDbl(Nz(Ctrl.Value, 0)) Glob_Str_Which_Control_Has_Max = Ctrl.Name End If End If End If Next End If For Each Ctrl In aTxt.Parent.Controls If TypeOf Ctrl Is Access.TextBox Then If Ctrl.Tag = "Max Time Value" Then Ctrl.Requery Exit For End If End If Next End Sub Public Property Set Txt(ByVal ControlThatChanged As Control) If TypeOf ControlThatChanged Is Access.TextBox Then Set aTxt = ControlThatChanged End If End Property Public Property Get Txt() As Access.TextBox If Not aTxt Is Nothing Then Set Txt = aTxt End If End Property 'IN A STANDARD MODULE Public Glob_Str_Which_Control_Has_Max As String Public Glob_Dbl_What_Is_Current_Max As Double Public Function TimeValueTag() As String TimeValueTag = "Time Values" End Function Public Function ControlIsTimeValue(Ctrl As Control, strTagToLookFor As String) As Boolean If TypeOf Ctrl Is Access.TextBox Then ControlIsTimeValue = (Ctrl.Tag = strTagToLookFor) End If End Function Public Function HighestValue() HighestValue = Glob_Dbl_What_Is_Current_Max End Function From rbgajewski at roadrunner.com Sat Jul 23 22:32:50 2011 From: rbgajewski at roadrunner.com (Bob Gajewski) Date: Sat, 23 Jul 2011 23:32:50 -0400 Subject: [AccessD] report detail - conditional formatting In-Reply-To: <068301cc4952$df49e690$9dddb3b0$@winhaven.net> References: <068301cc4952$df49e690$9dddb3b0$@winhaven.net> Message-ID: Hi John You can do just about anything with formatting in the Detail section ... Here are some examples: The "Detail_Print" code makes every other line grey ... Kind of a green-bar paper effect. The "Detail_Format" section checks the value of a field, and if it matches a set value, then a colored textbox become visible behind the other fields ... Else is remains hidden. You can control font formatting the same way ... Bold, italic, underline, etc. Regards, Bob Gajewski Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer) Const conLtGray = 13816530 If Detail.BackColor = conLtGray Then Detail.BackColor = vbWhite Else Detail.BackColor = conLtGray End If End Sub Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer) If Me.CardexStreetSide = "(intersection)" Then If Me.CardexIntersectingStreetID = 327 Then Me.txtIntersectionHighlight = "" Me.txtIntersectionHighlight.Visible = False Me.txtBridgeOverCreekHighlight = " " Me.txtBridgeOverCreekHighlight.Visible = True Else Me.txtIntersectionHighlight = " " Me.txtIntersectionHighlight.Visible = True Me.txtBridgeOverCreekHighlight = "" Me.txtBridgeOverCreekHighlight.Visible = False End If Me.SectorNumber.Visible = False Me.txtCoordinates.Visible = True Else Me.Occupant = Me.Occupant Me.txtIntersectionHighlight = "" Me.txtIntersectionHighlight.Visible = False Me.txtBridgeOverCreekHighlight = "" Me.txtBridgeOverCreekHighlight.Visible = False Me.SectorNumber.Visible = True Me.txtCoordinates.Visible = False End If End Sub -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of John Bartow Sent: Saturday, July 23, 2011 12:09 PM To: DBA-Access Subject: [AccessD] report detail - conditional formatting Is it possible to create conditional formatting per detail line in an Access report? I would like to have certain items print in bold. TIA John B -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From fuller.artful at gmail.com Sun Jul 24 01:41:21 2011 From: fuller.artful at gmail.com (Arthur Fuller) Date: Sun, 24 Jul 2011 02:41:21 -0400 Subject: [AccessD] Re Max of 20 values In-Reply-To: <000d01cc49a0$ce8242a0$6b86c7e0$@gmail.com> References: <001b01cc494e$1af91530$50eb3f90$@comcast.net> <000d01cc49a0$ce8242a0$6b86c7e0$@gmail.com> Message-ID: Thanks! A. On Sat, Jul 23, 2011 at 9:27 PM, William Benson (VBACreations.Com) < vbacreations at gmail.com> wrote: > Going back to the original inquiry. John's right, class modules are the way > to go. > > From phpons at gmail.com Sun Jul 24 03:29:30 2011 From: phpons at gmail.com (philippe pons) Date: Sun, 24 Jul 2011 10:29:30 +0200 Subject: [AccessD] 97 to 2007 Performance issue Message-ID: Dear all, I need your advice re performance issue. I recently migrated an Access 1997 application to Access 2007. It has not been possible to put the app in production at the moment. My customer put it in production the last days, and he reports a heavy reduction in terms of reactivity. Back end on a server, front end on user desktop. Did you ever run into such problems? What would be the possible causes? I get to the customer tomorrow. Thanks in advance for any help, Philippe Pons From vbacreations at gmail.com Sun Jul 24 07:16:05 2011 From: vbacreations at gmail.com (William Benson) Date: Sun, 24 Jul 2011 08:16:05 -0400 Subject: [AccessD] Re Max of 20 values In-Reply-To: References: <001b01cc494e$1af91530$50eb3f90$@comcast.net> <000d01cc49a0$ce8242a0$6b86c7e0$@gmail.com> Message-ID: Arthur... if you do try it out ... maybe you will see-- as I do-- that the textbox holding the highest value at all times seems to take about 200 or300 milliseconds to update. Though it's the same whether 5 or 100 controls (textboxes.) I feel this is slow. Too slow. I assume the Requery is taking the time... because the value in the result box goes blank for entire 200 mil. So maybe there is a better way than the function I bound it to or a faster alternative to requery. On Jul 24, 2011 2:42 AM, "Arthur Fuller" wrote: > Thanks! > > A. > > On Sat, Jul 23, 2011 at 9:27 PM, William Benson (VBACreations.Com) < > vbacreations at gmail.com> wrote: > >> Going back to the original inquiry. John's right, class modules are the way >> to go. >> >> > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com From rockysmolin at bchacc.com Sun Jul 24 09:59:52 2011 From: rockysmolin at bchacc.com (Rocky Smolin) Date: Sun, 24 Jul 2011 07:59:52 -0700 Subject: [AccessD] 97 to 2007 Performance issue In-Reply-To: References: Message-ID: I find that 2007 runs MUCH slower than 97 or 2003. That's why I still develop in 2003 - the awkward IDE aside. Why this is I don't know. I've got 2010 but haven't benchmarked it yet to see if it's any faster than 2007. Has anyone done this? Rocky -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of philippe pons Sent: Sunday, July 24, 2011 1:30 AM To: Access Developers discussion and problem solving Subject: [AccessD] 97 to 2007 Performance issue Dear all, I need your advice re performance issue. I recently migrated an Access 1997 application to Access 2007. It has not been possible to put the app in production at the moment. My customer put it in production the last days, and he reports a heavy reduction in terms of reactivity. Back end on a server, front end on user desktop. Did you ever run into such problems? What would be the possible causes? I get to the customer tomorrow. Thanks in advance for any help, Philippe Pons -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From john at winhaven.net Sun Jul 24 11:08:34 2011 From: john at winhaven.net (John Bartow) Date: Sun, 24 Jul 2011 11:08:34 -0500 Subject: [AccessD] report detail - conditional formatting In-Reply-To: References: <068301cc4952$df49e690$9dddb3b0$@winhaven.net> Message-ID: <07e201cc4a1b$f0bbbe70$d2333b50$@winhaven.net> Thanks all. I'll follow these suggestions and post back if I have any follow ups. (I've been formatting with PhP lately so I needed a thought refresher on Access Report formatting.) -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Bob Gajewski Sent: Saturday, July 23, 2011 10:33 PM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] report detail - conditional formatting Hi John You can do just about anything with formatting in the Detail section ... Here are some examples: The "Detail_Print" code makes every other line grey ... Kind of a green-bar paper effect. The "Detail_Format" section checks the value of a field, and if it matches a set value, then a colored textbox become visible behind the other fields ... Else is remains hidden. You can control font formatting the same way ... Bold, italic, underline, etc. Regards, Bob Gajewski Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer) Const conLtGray = 13816530 If Detail.BackColor = conLtGray Then Detail.BackColor = vbWhite Else Detail.BackColor = conLtGray End If End Sub Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer) If Me.CardexStreetSide = "(intersection)" Then If Me.CardexIntersectingStreetID = 327 Then Me.txtIntersectionHighlight = "" Me.txtIntersectionHighlight.Visible = False Me.txtBridgeOverCreekHighlight = " " Me.txtBridgeOverCreekHighlight.Visible = True Else Me.txtIntersectionHighlight = " " Me.txtIntersectionHighlight.Visible = True Me.txtBridgeOverCreekHighlight = "" Me.txtBridgeOverCreekHighlight.Visible = False End If Me.SectorNumber.Visible = False Me.txtCoordinates.Visible = True Else Me.Occupant = Me.Occupant Me.txtIntersectionHighlight = "" Me.txtIntersectionHighlight.Visible = False Me.txtBridgeOverCreekHighlight = "" Me.txtBridgeOverCreekHighlight.Visible = False Me.SectorNumber.Visible = True Me.txtCoordinates.Visible = False End If End Sub -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of John Bartow Sent: Saturday, July 23, 2011 12:09 PM To: DBA-Access Subject: [AccessD] report detail - conditional formatting Is it possible to create conditional formatting per detail line in an Access report? I would like to have certain items print in bold. TIA John B -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From BradM at blackforestltd.com Sun Jul 24 15:39:58 2011 From: BradM at blackforestltd.com (Brad Marks) Date: Sun, 24 Jul 2011 15:39:58 -0500 Subject: [AccessD] How to Obtain Access Report Filter information References: <068301cc4952$df49e690$9dddb3b0$@winhaven.net> <07e201cc4a1b$f0bbbe70$d2333b50$@winhaven.net> Message-ID: I am trying to build a VBA routine to obtain report filter info. The following line works nicely to obtain the filter for Report1 and store it in a variable called str_Report_Filter str_Report_Filter = Reports.Report1.Filter What I would like to do is make this "Generic" so that I can plug in a variable instead of the hardcoded "Report1" Something along these lines... Dim str_Report_Name str_Report_Name = "Report2" Is there a way to use a variable in a situation such as this? str_Report_Filter = Reports.str_report_name.Filter (I know that this doesn't work. This is just an example of what I am trying to do) I have tried many variations and tried to find an example on the internet, but have not had any luck. A simple example of how to do this would be most appreciated. Thanks for your help/advice. Brad From rlister at actuarial-files.com Sun Jul 24 15:48:16 2011 From: rlister at actuarial-files.com (Ralf Lister) Date: Sun, 24 Jul 2011 16:48:16 -0400 Subject: [AccessD] OT- Max Row Number in Excel Message-ID: <000301cc4a43$0517eca0$0f47c5e0$@com> Hello all, The max. row number of Excel 2007 is 65000 and something. Does Excel 2010 allow more rows? Saludos Ralf Lister From stuart at lexacorp.com.pg Sun Jul 24 16:10:08 2011 From: stuart at lexacorp.com.pg (Stuart McLachlan) Date: Mon, 25 Jul 2011 07:10:08 +1000 Subject: [AccessD] OT- Max Row Number in Excel In-Reply-To: <000301cc4a43$0517eca0$0f47c5e0$@com> References: <000301cc4a43$0517eca0$0f47c5e0$@com> Message-ID: <4E2C8A30.23940.33476F14@stuart.lexacorp.com.pg> No that was the maximum in 2003. Actually 65 536 ( 2^16). In 2007 they changed that to 1 048 576 (2^20). 2010 is the same. -- Stuart On 24 Jul 2011 at 16:48, Ralf Lister wrote: > Hello all, > > The max. row number of Excel 2007 is 65000 and something. > > Does Excel 2010 allow more rows? > > Saludos > Ralf Lister > > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > From stuart at lexacorp.com.pg Sun Jul 24 16:21:17 2011 From: stuart at lexacorp.com.pg (Stuart McLachlan) Date: Mon, 25 Jul 2011 07:21:17 +1000 Subject: [AccessD] How to Obtain Access Report Filter information In-Reply-To: References: <068301cc4952$df49e690$9dddb3b0$@winhaven.net>, Message-ID: <4E2C8CCD.13750.3351A37C@stuart.lexacorp.com.pg> str_Report_name = "rpt" & "1" str_Report_Filter = Reports(str_report_name).Filter But you will get an Error 2451 if the report is not open at the time. -- Stuart On 24 Jul 2011 at 15:39, Brad Marks wrote: > I am trying to build a VBA routine to obtain report filter info. > > > The following line works nicely to obtain the filter for Report1 and > store it in a variable called str_Report_Filter > > str_Report_Filter = Reports.Report1.Filter > > > > What I would like to do is make this "Generic" so that I can plug in a > variable instead of the hardcoded "Report1" > > > > Something along these lines... > > > > Dim str_Report_Name > > str_Report_Name = "Report2" > > Is there a way to use a variable in a situation such as this? > > str_Report_Filter = Reports.str_report_name.Filter > > (I know that this doesn't work. This is just an example of what I am > trying to do) > > > > I have tried many variations and tried to find an example on the > internet, but have not had any luck. > > A simple example of how to do this would be most appreciated. > > Thanks for your help/advice. > > Brad > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > From rlister at actuarial-files.com Sun Jul 24 16:26:04 2011 From: rlister at actuarial-files.com (Ralf Lister) Date: Sun, 24 Jul 2011 17:26:04 -0400 Subject: [AccessD] OT- Max Row Number in Excel In-Reply-To: <4E2C8A30.23940.33476F14@stuart.lexacorp.com.pg> References: <000301cc4a43$0517eca0$0f47c5e0$@com> <4E2C8A30.23940.33476F14@stuart.lexacorp.com.pg> Message-ID: <000401cc4a48$4cb40a30$e61c1e90$@com> Many thanks, Stuart Saludos Ralf Lister -----Mensaje original----- De: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] En nombre de Stuart McLachlan Enviado el: Domingo, 24 de Julio de 2011 05:10 p.m. Para: Access Developers discussion and problem solving Asunto: Re: [AccessD] OT- Max Row Number in Excel No that was the maximum in 2003. Actually 65 536 ( 2^16). In 2007 they changed that to 1 048 576 (2^20). 2010 is the same. -- Stuart On 24 Jul 2011 at 16:48, Ralf Lister wrote: > Hello all, > > The max. row number of Excel 2007 is 65000 and something. > > Does Excel 2010 allow more rows? > > Saludos > Ralf Lister > > > > -- > 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 ----- No virus found in this message. Checked by AVG - www.avg.com Version: 10.0.1390 / Virus Database: 1518/3785 - Release Date: 07/24/11 From BradM at blackforestltd.com Sun Jul 24 16:52:43 2011 From: BradM at blackforestltd.com (Brad Marks) Date: Sun, 24 Jul 2011 16:52:43 -0500 Subject: [AccessD] How to Obtain Access Report Filter information References: <068301cc4952$df49e690$9dddb3b0$@winhaven.net>, <4E2C8CCD.13750.3351A37C@stuart.lexacorp.com.pg> Message-ID: Stuart, Thank you for the help, I really appreciate it. Your example works nicely for what I am trying to accomplish. Brad -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Stuart McLachlan Sent: Sunday, July 24, 2011 4:21 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] How to Obtain Access Report Filter information str_Report_name = "rpt" & "1" str_Report_Filter = Reports(str_report_name).Filter But you will get an Error 2451 if the report is not open at the time. -- Stuart On 24 Jul 2011 at 15:39, Brad Marks wrote: > I am trying to build a VBA routine to obtain report filter info. > > > The following line works nicely to obtain the filter for Report1 and > store it in a variable called str_Report_Filter > > str_Report_Filter = Reports.Report1.Filter > > > > What I would like to do is make this "Generic" so that I can plug in a > variable instead of the hardcoded "Report1" > > > > Something along these lines... > > > > Dim str_Report_Name > > str_Report_Name = "Report2" > > Is there a way to use a variable in a situation such as this? > > str_Report_Filter = Reports.str_report_name.Filter > > (I know that this doesn't work. This is just an example of what I am > trying to do) > > > > I have tried many variations and tried to find an example on the > internet, but have not had any luck. > > A simple example of how to do this would be most appreciated. > > Thanks for your help/advice. > > Brad > > -- > 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 has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. From darren at activebilling.com.au Sun Jul 24 18:47:09 2011 From: darren at activebilling.com.au (Darren - Active Billing) Date: Mon, 25 Jul 2011 09:47:09 +1000 Subject: [AccessD] Max of 20 values In-Reply-To: References: Message-ID: <016f01cc4a5c$01c92d70$055b8850$@activebilling.com.au> Hi Arthur Coming in late to this so you may have already have implemented a solution. (And to be honest haven't read all the threads so I may have missed something in the posts) :-) Couple of assumptions: 1 Assuming your '20' recorded time measurements all sit in one table 2 Assuming they all have a relevant PK/Surrogate key to group each test batch of 20...eg TestBatchNo etc. Can't you just use a Domain lookup? DMAX? E.g. Have some display field bound to the following after the update of each table DMax("TimeTakenToForceShutOffField","InSomeTable","SomePK/SurrogateKeyForThi sTestBatchof20 = " & intSomeTestBatchIdenfifier & ")" Many thanks Darren -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Arthur Fuller Sent: Saturday, 23 July 2011 10:54 PM To: Access Developers discussion and problem solving Subject: [AccessD] Max of 20 values I have a form into which the user enters up to 20 values (measurements in time). They all default to zero. I'm trying to think of an elegant way to find the max value among the 20. Create an array and bubble sort it? I want to call this code on the AfterUpdate of each of these 20 controls so the control called MaxReading gets a new value if any of the 20 controls goes higher than the current MaxReading value. TIA, Arthur -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From vbacreations at gmail.com Sun Jul 24 19:50:26 2011 From: vbacreations at gmail.com (William Benson (VBACreations.Com)) Date: Sun, 24 Jul 2011 20:50:26 -0400 Subject: [AccessD] OT- Max Row Number in Excel In-Reply-To: <000301cc4a43$0517eca0$0f47c5e0$@com> References: <000301cc4a43$0517eca0$0f47c5e0$@com> Message-ID: <000c01cc4a64$d8b41f90$8a1c5eb0$@gmail.com> Excel 2003 had 65536. Excel 2007 and 2010 both allow 1,048,576. If you have opened a Excel 2007 file and see only 65,536 rows you are probably in compatibility mode, which you can turn off in the File Options (Under Save ... if you have default File Save format as .xls, then you will always be seeing 65,536 rows in a new workbook. Change that to .xlsx). -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Ralf Lister Sent: Sunday, July 24, 2011 4:48 PM To: 'Access Developers discussion and problem solving' Subject: [AccessD] OT- Max Row Number in Excel Hello all, The max. row number of Excel 2007 is 65000 and something. Does Excel 2010 allow more rows? Saludos Ralf Lister -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From vbacreations at gmail.com Sun Jul 24 21:19:46 2011 From: vbacreations at gmail.com (William Benson) Date: Sun, 24 Jul 2011 22:19:46 -0400 Subject: [AccessD] 97 to 2007 Performance issue In-Reply-To: References: Message-ID: I will add my plea for information and a means of understanding. .. I totally agree it is slower and would like to know why. Data sheet form filtering, refreshing forms, requeryng controls in particular. From stuart at lexacorp.com.pg Sun Jul 24 21:27:27 2011 From: stuart at lexacorp.com.pg (Stuart McLachlan) Date: Mon, 25 Jul 2011 12:27:27 +1000 Subject: [AccessD] 97 to 2007 Performance issue In-Reply-To: References: , , Message-ID: <4E2CD48F.17611.3469F318@stuart.lexacorp.com.pg> Short answer. It's a Microsoft product. Every new version of everything they have ever released uses more resources and takes longer to do the same thing (with the possible except of Win 7 over Vista) :-) -- Stuart On 24 Jul 2011 at 22:19, William Benson wrote: > I will add my plea for information and a means of understanding. .. I > totally agree it is slower and would like to know why. > > Data sheet form filtering, refreshing forms, requeryng controls in > particular. -- AccessD mailing list AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd Website: > http://www.databaseadvisors.com > From charlotte.foust at gmail.com Sun Jul 24 22:00:08 2011 From: charlotte.foust at gmail.com (Charlotte Foust) Date: Sun, 24 Jul 2011 20:00:08 -0700 Subject: [AccessD] 97 to 2007 Performance issue In-Reply-To: <4E2CD48F.17611.3469F318@stuart.lexacorp.com.pg> References: <4E2CD48F.17611.3469F318@stuart.lexacorp.com.pg> Message-ID: Because 2007 is fat with "end user" features for all the developer wannabes MS is aiming at. A97 was still mostly restricted on the bells and whistles to the stuff developers would want to use ... and knew how to! VBA alone has increased to a huge size in anything later than 2002. Charlotte Foust On Sun, Jul 24, 2011 at 7:27 PM, Stuart McLachlan wrote: > Short answer. It's a Microsoft product. Every new version of everything > they have ever > released uses more resources and takes longer to do the same thing (with > the possible > except of Win 7 over Vista) :-) > > -- > Stuart > > > On 24 Jul 2011 at 22:19, William Benson wrote: > > > I will add my plea for information and a means of understanding. .. I > > totally agree it is slower and would like to know why. > > > > Data sheet form filtering, refreshing forms, requeryng controls in > > particular. -- 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 phpons at gmail.com Mon Jul 25 00:56:36 2011 From: phpons at gmail.com (philippe pons) Date: Mon, 25 Jul 2011 07:56:36 +0200 Subject: [AccessD] 97 to 2007 Performance issue In-Reply-To: References: <4E2CD48F.17611.3469F318@stuart.lexacorp.com.pg> Message-ID: Charlotte, I'm not sure that new features will slow Access. The perf issue comes when the front end requires data from the back end. And to my knowledge, ODBC is the piece of software that do this data transfer. If a new version of ODBC is used by A2007, and don't see why it would be slower than any previous one. Do you think that there are any tuning options that would affect performance? Philippe Pons 2011/7/25 Charlotte Foust > Because 2007 is fat with "end user" features for all the developer wannabes > MS is aiming at. A97 was still mostly restricted on the bells and whistles > to the stuff developers would want to use ... and knew how to! VBA alone > has increased to a huge size in anything later than 2002. > > Charlotte Foust > > On Sun, Jul 24, 2011 at 7:27 PM, Stuart McLachlan >wrote: > > > Short answer. It's a Microsoft product. Every new version of everything > > they have ever > > released uses more resources and takes longer to do the same thing (with > > the possible > > except of Win 7 over Vista) :-) > > > > -- > > Stuart > > > > > > On 24 Jul 2011 at 22:19, William Benson wrote: > > > > > I will add my plea for information and a means of understanding. .. I > > > totally agree it is slower and would like to know why. > > > > > > Data sheet form filtering, refreshing forms, requeryng controls in > > > particular. -- 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 Mon Jul 25 01:33:31 2011 From: stuart at lexacorp.com.pg (Stuart McLachlan) Date: Mon, 25 Jul 2011 16:33:31 +1000 Subject: [AccessD] 97 to 2007 Performance issue In-Reply-To: References: , , Message-ID: <4E2D0E3B.11824.354B3B52@stuart.lexacorp.com.pg> Access to Access links don't use ODBC, AFAIK, they use DAO for linked tables. -- Stuart On 25 Jul 2011 at 7:56, philippe pons wrote: > Charlotte, > > I'm not sure that new features will slow Access. > The perf issue comes when the front end requires > data from the back end. > And to my knowledge, ODBC is the piece of software that > do this data transfer. > If a new version of ODBC is used by A2007, and don't see why it would > be slower than any previous one. Do you think that there are any > tuning options that would affect performance? > > Philippe Pons > > 2011/7/25 Charlotte Foust > > > Because 2007 is fat with "end user" features for all the developer > > wannabes MS is aiming at. A97 was still mostly restricted on the > > bells and whistles to the stuff developers would want to use ... and > > knew how to! VBA alone has increased to a huge size in anything > > later than 2002. > > > > Charlotte Foust > > > > On Sun, Jul 24, 2011 at 7:27 PM, Stuart McLachlan > > > >wrote: > > > > > Short answer. It's a Microsoft product. Every new version of > > > everything they have ever released uses more resources and takes > > > longer to do the same thing (with the possible except of Win 7 > > > over Vista) :-) > > > > > > -- > > > Stuart > > > > > > > > > On 24 Jul 2011 at 22:19, William Benson wrote: > > > > > > > I will add my plea for information and a means of understanding. > > > > .. I totally agree it is slower and would like to know why. > > > > > > > > Data sheet form filtering, refreshing forms, requeryng controls > > > > in particular. -- 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 phpons at gmail.com Mon Jul 25 02:22:42 2011 From: phpons at gmail.com (philippe pons) Date: Mon, 25 Jul 2011 09:22:42 +0200 Subject: [AccessD] 97 to 2007 Performance issue In-Reply-To: <4E2D0E3B.11824.354B3B52@stuart.lexacorp.com.pg> References: <4E2D0E3B.11824.354B3B52@stuart.lexacorp.com.pg> Message-ID: Stuart, You are probably right, and as DAO is optimized for Access, performance should be better than with ODBC. Philippe 2011/7/25 Stuart McLachlan > Access to Access links don't use ODBC, AFAIK, they use DAO for linked > tables. > > -- > Stuart > > On 25 Jul 2011 at 7:56, philippe pons wrote: > > > Charlotte, > > > > I'm not sure that new features will slow Access. > > The perf issue comes when the front end requires > > data from the back end. > > And to my knowledge, ODBC is the piece of software that > > do this data transfer. > > If a new version of ODBC is used by A2007, and don't see why it would > > be slower than any previous one. Do you think that there are any > > tuning options that would affect performance? > > > > Philippe Pons > > > > 2011/7/25 Charlotte Foust > > > > > Because 2007 is fat with "end user" features for all the developer > > > wannabes MS is aiming at. A97 was still mostly restricted on the > > > bells and whistles to the stuff developers would want to use ... and > > > knew how to! VBA alone has increased to a huge size in anything > > > later than 2002. > > > > > > Charlotte Foust > > > > > > On Sun, Jul 24, 2011 at 7:27 PM, Stuart McLachlan > > > > > >wrote: > > > > > > > Short answer. It's a Microsoft product. Every new version of > > > > everything they have ever released uses more resources and takes > > > > longer to do the same thing (with the possible except of Win 7 > > > > over Vista) :-) > > > > > > > > -- > > > > Stuart > > > > > > > > > > > > On 24 Jul 2011 at 22:19, William Benson wrote: > > > > > > > > > I will add my plea for information and a means of understanding. > > > > > .. I totally agree it is slower and would like to know why. > > > > > > > > > > Data sheet form filtering, refreshing forms, requeryng controls > > > > > in particular. -- 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 phpons at gmail.com Mon Jul 25 02:54:54 2011 From: phpons at gmail.com (philippe pons) Date: Mon, 25 Jul 2011 09:54:54 +0200 Subject: [AccessD] 97 to 2007 Performance issue In-Reply-To: References: <4E2D0E3B.11824.354B3B52@stuart.lexacorp.com.pg> Message-ID: I remember that some guys recommended to keep an open connection to the back end, to reduce acces time. But I guess this does not apply to linked tables, as they will use a different connection, won't they? 2011/7/25 philippe pons > Stuart, > > You are probably right, and as DAO is optimized for Access, performance > should be better than > with ODBC. > > Philippe > > > 2011/7/25 Stuart McLachlan > >> Access to Access links don't use ODBC, AFAIK, they use DAO for linked >> tables. >> >> -- >> Stuart >> >> On 25 Jul 2011 at 7:56, philippe pons wrote: >> >> > Charlotte, >> > >> > I'm not sure that new features will slow Access. >> > The perf issue comes when the front end requires >> > data from the back end. >> > And to my knowledge, ODBC is the piece of software that >> > do this data transfer. >> > If a new version of ODBC is used by A2007, and don't see why it would >> > be slower than any previous one. Do you think that there are any >> > tuning options that would affect performance? >> > >> > Philippe Pons >> > >> > 2011/7/25 Charlotte Foust >> > >> > > Because 2007 is fat with "end user" features for all the developer >> > > wannabes MS is aiming at. A97 was still mostly restricted on the >> > > bells and whistles to the stuff developers would want to use ... and >> > > knew how to! VBA alone has increased to a huge size in anything >> > > later than 2002. >> > > >> > > Charlotte Foust >> > > >> > > On Sun, Jul 24, 2011 at 7:27 PM, Stuart McLachlan >> > > > > > >wrote: >> > > >> > > > Short answer. It's a Microsoft product. Every new version of >> > > > everything they have ever released uses more resources and takes >> > > > longer to do the same thing (with the possible except of Win 7 >> > > > over Vista) :-) >> > > > >> > > > -- >> > > > Stuart >> > > > >> > > > >> > > > On 24 Jul 2011 at 22:19, William Benson wrote: >> > > > >> > > > > I will add my plea for information and a means of understanding. >> > > > > .. I totally agree it is slower and would like to know why. >> > > > > >> > > > > Data sheet form filtering, refreshing forms, requeryng controls >> > > > > in particular. -- 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 vbacreations at gmail.com Mon Jul 25 10:08:37 2011 From: vbacreations at gmail.com (William Benson (VBACreations.Com)) Date: Mon, 25 Jul 2011 11:08:37 -0400 Subject: [AccessD] Re Max of 20 values References: <001b01cc494e$1af91530$50eb3f90$@comcast.net> Message-ID: <001501cc4adc$bc17d200$34477600$@gmail.com> The below works much (MUCH) faster by not binding the max-time display textbox to a function (after looping to find it) and using requery. If you know the control's name, just put the variable's value there directly. So For Each Ctrl In aTxt.Parent.Controls If TypeOf Ctrl Is Access.TextBox Then If Ctrl.Tag = "Max Time Value" Then Ctrl.Requery Exit For End If End If Next Becomes aTxt.Parent.Controls("ShowMaxValueHere") = Glob_Dbl_What_Is_Current_Max -----Original Message----- From: William Benson (VBACreations.Com) [mailto:vbacreations at gmail.com] Sent: Saturday, July 23, 2011 9:27 PM To: Access Developers discussion and problem solving Subject: RE: [AccessD] Re Max of 20 values Going back to the original inquiry. John's right, class modules are the way to go. Assumptions: Tag property on all controls which can contain a time value = "Time Values" I have an additional textbox on my form with controlsource = "= HighestValue()" -- that is a public function -- see below 'IN THE FORM'S CODE MODULE Option Compare Database Option Explicit Dim colTimeValueControls As New Collection Dim MyclsSeriesItem As clsTimeSeriesItem Private Sub Form_Load() Dim Ctrl As Control Glob_Dbl_What_Is_Current_Max = 0 Glob_Str_Which_Control_Has_Max = "" For Each Ctrl In Me.Controls If ControlIsTimeValue(Ctrl, TimeValueTag) Then Set MyclsSeriesItem = New clsTimeSeriesItem Set MyclsSeriesItem.Txt = Ctrl MyclsSeriesItem.Txt.AfterUpdate = "[Event Procedure]" colTimeValueControls.Add MyclsSeriesItem End If Next End Sub 'IN A Class Module named clsTimeSeriesItem Option Compare Database Option Explicit Public WithEvents aTxt As Access.TextBox Private Sub aTxt_AfterUpdate() Dim bTestAllControls As Boolean Dim Ctrl As Control bTestAllControls = False If IsNumeric(aTxt.Value) Then If CDbl(Nz(aTxt.Value, 0)) >= Glob_Dbl_What_Is_Current_Max Then Glob_Dbl_What_Is_Current_Max = CDbl(aTxt.Value) Glob_Str_Which_Control_Has_Max = aTxt.Name ElseIf Glob_Str_Which_Control_Has_Max <> aTxt.Name Then 'DO NOTHING, some other control has the max value anyway Else 'It is numeric, it was the max, and it no longer is as high as the max was bTestAllControls = True End If ElseIf Glob_Str_Which_Control_Has_Max = aTxt.Name Then bTestAllControls = True Else 'We don't care if it went non-numeric, it didn't hold the max value prior to now End If If bTestAllControls Then Glob_Str_Which_Control_Has_Max = "" Glob_Dbl_What_Is_Current_Max = 0 For Each Ctrl In aTxt.Parent.Controls If ControlIsTimeValue(Ctrl, TimeValueTag) Then If IsNumeric(Nz(Ctrl.Value, "")) Then If CDbl(Nz(Ctrl.Value, 0)) > Glob_Dbl_What_Is_Current_Max Then Glob_Dbl_What_Is_Current_Max = CDbl(Nz(Ctrl.Value, 0)) Glob_Str_Which_Control_Has_Max = Ctrl.Name End If End If End If Next End If For Each Ctrl In aTxt.Parent.Controls If TypeOf Ctrl Is Access.TextBox Then If Ctrl.Tag = "Max Time Value" Then Ctrl.Requery Exit For End If End If Next End Sub Public Property Set Txt(ByVal ControlThatChanged As Control) If TypeOf ControlThatChanged Is Access.TextBox Then Set aTxt = ControlThatChanged End If End Property Public Property Get Txt() As Access.TextBox If Not aTxt Is Nothing Then Set Txt = aTxt End If End Property 'IN A STANDARD MODULE Public Glob_Str_Which_Control_Has_Max As String Public Glob_Dbl_What_Is_Current_Max As Double Public Function TimeValueTag() As String TimeValueTag = "Time Values" End Function Public Function ControlIsTimeValue(Ctrl As Control, strTagToLookFor As String) As Boolean If TypeOf Ctrl Is Access.TextBox Then ControlIsTimeValue = (Ctrl.Tag = strTagToLookFor) End If End Function Public Function HighestValue() HighestValue = Glob_Dbl_What_Is_Current_Max End Function From BradM at blackforestltd.com Mon Jul 25 12:53:42 2011 From: BradM at blackforestltd.com (Brad Marks) Date: Mon, 25 Jul 2011 12:53:42 -0500 Subject: [AccessD] Exporting Access to Excel - How to "SUM" a column with a variable number of rows? References: <001b01cc494e$1af91530$50eb3f90$@comcast.net> <001501cc4adc$bc17d200$34477600$@gmail.com> Message-ID: I am starting to do some experiments involving the creation of Excel files from Access. Let's say that I have an Access Recordset that can contain anywhere from 100 to 1,000 records. I have a little Access application that currently pushes this data into Excel. This all works nicely. What is the best way to "Sum" a column in Excel after the last record, when the number of records can vary? Thanks, Brad From Lambert.Heenan at chartisinsurance.com Mon Jul 25 13:31:06 2011 From: Lambert.Heenan at chartisinsurance.com (Heenan, Lambert) Date: Mon, 25 Jul 2011 14:31:06 -0400 Subject: [AccessD] Exporting Access to Excel - How to "SUM" a column with a variable number of rows? In-Reply-To: References: <001b01cc494e$1af91530$50eb3f90$@comcast.net> <001501cc4adc$bc17d200$34477600$@gmail.com> Message-ID: The way I do this is after exporting the results of a query to Excel I then run a Dcount() against the same query to discover how many rows were in the output data.... nRows = DCount("*", "Some_Query_Name") Then I open the Excel file with Access (i.e. I set an Excell.Application and Excel.Worksheet object) so that I can then add the formulas that I need to the row under the last row of exported data. Essentially you build the formula in a text variable like this... strFormula = "=Sum(" & Excel_Column(nCol) & nRowOffest - nRowsToSum & ":" & Excel_Column(nCol) & nRowOffest - 1 & ")" Where nRowOffest is the row number to start summing (or averaging or counting, whatever) and nRowsToSum is the number of row in the output. The function Excel_Column is used to get the right alpha prefix in the cells address... Function Excel_Column(nCol As Long) As String ' given a valid column number return the Alpha name for it ' else return an empty string If nCol > 256 Then ' Pre Excel 2007 Excel_Column = "" Else If nCol <= 26 Then Excel_Column = Chr(Asc("A") + nCol - 1) Else Dim sSecond As String sSecond = Excel_Column(nCol Mod 26) Excel_Column = Excel_Column(nCol \ 26) & sSecond End If End If End Function Then, after building the text string with the formula just plug it into the relevant cell in the workbook. After setting the Excel.Application object you then need a reference to the worksheet that needs to be update... Set Ws = xlApp.Sheets(nSheet) With Ws strCellAddress = Excel_Column(nCol) & nRowOffest strFormula = "=Sum(" & Excel_Column(nCol) & nRowOffest - nRowsToSum & ":" & Excel_Column(nCol) & nRowOffest - 1 & ")" .Cells(nRowOffest, nCol) = strFormula End With HTH Lambert -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Brad Marks Sent: Monday, July 25, 2011 1:54 PM To: Access Developers discussion and problem solving Subject: [AccessD] Exporting Access to Excel - How to "SUM" a column with a variable number of rows? I am starting to do some experiments involving the creation of Excel files from Access. Let's say that I have an Access Recordset that can contain anywhere from 100 to 1,000 records. I have a little Access application that currently pushes this data into Excel. This all works nicely. What is the best way to "Sum" a column in Excel after the last record, when the number of records can vary? Thanks, Brad -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From rlister at actuarial-files.com Mon Jul 25 13:43:00 2011 From: rlister at actuarial-files.com (Ralf Lister) Date: Mon, 25 Jul 2011 14:43:00 -0400 Subject: [AccessD] OT- Max Row Number in Excel In-Reply-To: <000c01cc4a64$d8b41f90$8a1c5eb0$@gmail.com> References: <000301cc4a43$0517eca0$0f47c5e0$@com> <000c01cc4a64$d8b41f90$8a1c5eb0$@gmail.com> Message-ID: <000601cc4afa$affc03b0$0ff40b10$@com> Thanks, William. Saludos Ralf Lister -----Mensaje original----- De: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] En nombre de William Benson (VBACreations.Com) Enviado el: Domingo, 24 de Julio de 2011 08:50 p.m. Para: 'Access Developers discussion and problem solving' Asunto: Re: [AccessD] OT- Max Row Number in Excel Excel 2003 had 65536. Excel 2007 and 2010 both allow 1,048,576. If you have opened a Excel 2007 file and see only 65,536 rows you are probably in compatibility mode, which you can turn off in the File Options (Under Save ... if you have default File Save format as .xls, then you will always be seeing 65,536 rows in a new workbook. Change that to .xlsx). -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Ralf Lister Sent: Sunday, July 24, 2011 4:48 PM To: 'Access Developers discussion and problem solving' Subject: [AccessD] OT- Max Row Number in Excel Hello all, The max. row number of Excel 2007 is 65000 and something. Does Excel 2010 allow more rows? Saludos Ralf Lister -- 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 ----- No virus found in this message. Checked by AVG - www.avg.com Version: 10.0.1390 / Virus Database: 1518/3786 - Release Date: 07/24/11 From vbacreations at gmail.com Mon Jul 25 13:50:36 2011 From: vbacreations at gmail.com (William Benson (VBACreations.Com)) Date: Mon, 25 Jul 2011 14:50:36 -0400 Subject: [AccessD] Exporting Access to Excel - How to "SUM" a column with a variable number of rows? In-Reply-To: References: <001b01cc494e$1af91530$50eb3f90$@comcast.net> <001501cc4adc$bc17d200$34477600$@gmail.com> Message-ID: <002001cc4afb$be7a3af0$3b6eb0d0$@gmail.com> Brad, Excel is VERY powerful, and VERY fast. So whenever possible, use what Excel already has, when automating. To sum all the values in a column in Excel, assuming you have hooks to the xl application object and a worksheet: Function TestFunction () Dim xl As Excel.Application Set xl = GetXL With GetXL MsgBox .Sum(.ActiveWorkbook.ActiveSheet.Columns(1)) End With End TestFunction Function GetXL() As Excel.Application On Error Resume Next Set GetXL = GetObject(, "Excel.Application") If GetXL Is Nothing Then Set GetXL = CreateObject("Excel.Application") GetXL.Visible = True End If exit_me: End Function -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Brad Marks Sent: Monday, July 25, 2011 1:54 PM To: Access Developers discussion and problem solving Subject: [AccessD] Exporting Access to Excel - How to "SUM" a column with a variable number of rows? I am starting to do some experiments involving the creation of Excel files from Access. Let's say that I have an Access Recordset that can contain anywhere from 100 to 1,000 records. I have a little Access application that currently pushes this data into Excel. This all works nicely. What is the best way to "Sum" a column in Excel after the last record, when the number of records can vary? Thanks, Brad -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From vbacreations at gmail.com Mon Jul 25 13:52:04 2011 From: vbacreations at gmail.com (William Benson (VBACreations.Com)) Date: Mon, 25 Jul 2011 14:52:04 -0400 Subject: [AccessD] Exporting Access to Excel - How to "SUM" a column with a variable number of rows? References: <001b01cc494e$1af91530$50eb3f90$@comcast.net> <001501cc4adc$bc17d200$34477600$@gmail.com> Message-ID: <002101cc4afb$f2e7dc70$d8b79550$@gmail.com> Oops, I threw the function GetXL in as a bonus without removing xl variable. Function TestFunction () With GetXL MsgBox .Sum(.ActiveWorkbook.ActiveSheet.Columns(1)) End With End TestFunction Function GetXL() As Excel.Application On Error Resume Next Set GetXL = GetObject(, "Excel.Application") If GetXL Is Nothing Then Set GetXL = CreateObject("Excel.Application") GetXL.Visible = True End If exit_me: End Function From jwcolby at colbyconsulting.com Mon Jul 25 13:57:36 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Mon, 25 Jul 2011 14:57:36 -0400 Subject: [AccessD] Link odbc tables in Access Message-ID: <4E2DBCA0.6050603@colbyconsulting.com> When I link to SQL Server from Access using a DSN file, I end up with my tables displayed but also about a billion (sorry, I didn't count) tables that start with INFORMATION_SCHEMA_.xyz. At this time I have no use for those tables and would like to filter them out so that I cannot see them. Does anyone know how to do that? -- John W. Colby www.ColbyConsulting.com From BradM at blackforestltd.com Mon Jul 25 15:51:59 2011 From: BradM at blackforestltd.com (Brad Marks) Date: Mon, 25 Jul 2011 15:51:59 -0500 Subject: [AccessD] Exporting Access to Excel - How to "SUM" a column with a variable number of rows? References: <001b01cc494e$1af91530$50eb3f90$@comcast.net><001501cc4adc$bc17d200$34477600$@gmail.com> Message-ID: William and Lambert, Thanks for the help, I appreciate it. One of the things that I often struggle with is that there is often more than one way to accomplish a task. Before I start to build something big, I like to understand the options and also understand the "Best" way to get something done. Thanks Again, Brad -----Original Message----- From: accessd-bounces at databaseadvisors.com on behalf of Heenan, Lambert Sent: Mon 7/25/2011 1:31 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Exporting Access to Excel - How to "SUM" a column with a variable number of rows? The way I do this is after exporting the results of a query to Excel I then run a Dcount() against the same query to discover how many rows were in the output data.... nRows = DCount("*", "Some_Query_Name") Then I open the Excel file with Access (i.e. I set an Excell.Application and Excel.Worksheet object) so that I can then add the formulas that I need to the row under the last row of exported data. Essentially you build the formula in a text variable like this... strFormula = "=Sum(" & Excel_Column(nCol) & nRowOffest - nRowsToSum & ":" & Excel_Column(nCol) & nRowOffest - 1 & ")" Where nRowOffest is the row number to start summing (or averaging or counting, whatever) and nRowsToSum is the number of row in the output. The function Excel_Column is used to get the right alpha prefix in the cells address... Function Excel_Column(nCol As Long) As String ' given a valid column number return the Alpha name for it ' else return an empty string If nCol > 256 Then ' Pre Excel 2007 Excel_Column = "" Else If nCol <= 26 Then Excel_Column = Chr(Asc("A") + nCol - 1) Else Dim sSecond As String sSecond = Excel_Column(nCol Mod 26) Excel_Column = Excel_Column(nCol \ 26) & sSecond End If End If End Function Then, after building the text string with the formula just plug it into the relevant cell in the workbook. After setting the Excel.Application object you then need a reference to the worksheet that needs to be update... Set Ws = xlApp.Sheets(nSheet) With Ws strCellAddress = Excel_Column(nCol) & nRowOffest strFormula = "=Sum(" & Excel_Column(nCol) & nRowOffest - nRowsToSum & ":" & Excel_Column(nCol) & nRowOffest - 1 & ")" .Cells(nRowOffest, nCol) = strFormula End With HTH Lambert -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Brad Marks Sent: Monday, July 25, 2011 1:54 PM To: Access Developers discussion and problem solving Subject: [AccessD] Exporting Access to Excel - How to "SUM" a column with a variable number of rows? I am starting to do some experiments involving the creation of Excel files from Access. Let's say that I have an Access Recordset that can contain anywhere from 100 to 1,000 records. I have a little Access application that currently pushes this data into Excel. This all works nicely. What is the best way to "Sum" a column in Excel after the last record, when the number of records can vary? Thanks, Brad -- 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 has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. From marksimms at verizon.net Mon Jul 25 19:02:42 2011 From: marksimms at verizon.net (Mark Simms) Date: Mon, 25 Jul 2011 20:02:42 -0400 Subject: [AccessD] Exporting Access to Excel - How to "SUM" a column with a variable number of rows? In-Reply-To: References: <001b01cc494e$1af91530$50eb3f90$@comcast.net><001501cc4adc$bc17d200$34477600$@gmail.com> Message-ID: <016b01cc4b27$57c8ffe0$075affa0$@net> What you need to decide is: dynamic vs. static. If the data is not going to change, then try this: Sub AddTotals Dim rngCol as Range With Activesheet.UsedRange For Each rngCol in .Columns rngCol.Cells(.rows.Count+1) = Application.Sum(rngCol) Next End With End Sub Of course this assumes the starting row is #1. > -----Original Message----- > From: accessd-bounces at databaseadvisors.com [mailto:accessd- > bounces at databaseadvisors.com] On Behalf Of Brad Marks > Sent: Monday, July 25, 2011 4:52 PM > To: Access Developers discussion and problem solving > Subject: Re: [AccessD] Exporting Access to Excel - How to "SUM" a > column with a variable number of rows? > > William and Lambert, > > Thanks for the help, I appreciate it. > > One of the things that I often struggle with is that there is often > more than one way to accomplish a task. Before I start to build > something big, I like to understand the options and also understand the > "Best" way to get something done. > > Thanks Again, > Brad > > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com on behalf of Heenan, Lambert > Sent: Mon 7/25/2011 1:31 PM > To: Access Developers discussion and problem solving > Subject: Re: [AccessD] Exporting Access to Excel - How to "SUM" a > column with a variable number of rows? > > The way I do this is after exporting the results of a query to Excel I > then run a Dcount() against the same query to discover how many rows > were in the output data.... > > nRows = DCount("*", "Some_Query_Name") > > Then I open the Excel file with Access (i.e. I set an > Excell.Application and Excel.Worksheet object) so that I can then add > the formulas that I need to the row under the last row of exported > data. > > Essentially you build the formula in a text variable like this... > > strFormula = "=Sum(" & Excel_Column(nCol) & nRowOffest - nRowsToSum & > ":" & Excel_Column(nCol) & nRowOffest - 1 & ")" > > Where nRowOffest is the row number to start summing (or averaging or > counting, whatever) and nRowsToSum is the number of row in the output. > The function Excel_Column is used to get the right alpha prefix in the > cells address... > > Function Excel_Column(nCol As Long) As String ' given a valid column > number return the Alpha name for it ' else return an empty string > If nCol > 256 Then ' Pre Excel 2007 > Excel_Column = "" > Else > If nCol <= 26 Then > Excel_Column = Chr(Asc("A") + nCol - 1) > Else > Dim sSecond As String > sSecond = Excel_Column(nCol Mod 26) > Excel_Column = Excel_Column(nCol \ 26) & sSecond > End If > End If > End Function > > Then, after building the text string with the formula just plug it into > the relevant cell in the workbook. > > After setting the Excel.Application object you then need a reference to > the worksheet that needs to be update... > > Set Ws = xlApp.Sheets(nSheet) > With Ws > strCellAddress = Excel_Column(nCol) & nRowOffest > strFormula = "=Sum(" & Excel_Column(nCol) & nRowOffest - > nRowsToSum & ":" & Excel_Column(nCol) & nRowOffest - 1 & ")" > .Cells(nRowOffest, nCol) = strFormula > End With > > > HTH > > Lambert > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com [mailto:accessd- > bounces at databaseadvisors.com] On Behalf Of Brad Marks > Sent: Monday, July 25, 2011 1:54 PM > To: Access Developers discussion and problem solving > Subject: [AccessD] Exporting Access to Excel - How to "SUM" a column > with a variable number of rows? > > I am starting to do some experiments involving the creation of Excel > files from Access. > > Let's say that I have an Access Recordset that can contain anywhere > from 100 to 1,000 records. > > I have a little Access application that currently pushes this data into > Excel. This all works nicely. > > What is the best way to "Sum" a column in Excel after the last record, > when the number of records can vary? > > Thanks, > Brad > > -- > 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 has been scanned for viruses and dangerous content by > MailScanner, and is believed to be clean. > > From jeff.developer at gmail.com Tue Jul 26 10:10:45 2011 From: jeff.developer at gmail.com (Jeff B) Date: Tue, 26 Jul 2011 10:10:45 -0500 Subject: [AccessD] Recall: [cross posted] SharePoint 2010 question(s) Message-ID: Jeff B would like to recall the message, "[cross posted] SharePoint 2010 question(s)". From jeff.developer at gmail.com Tue Jul 26 10:11:13 2011 From: jeff.developer at gmail.com (Jeff B) Date: Tue, 26 Jul 2011 10:11:13 -0500 Subject: [AccessD] [cross posted] SharePoint 2010 question(s) Message-ID: I really need to know what you all suggest as the BEST book(s) for learning SharePoint 2010, Access Services, and publishing Access databases to SharePoint. Jeff Barrows MCP, MCAD, MCSD ? Outbak Technologies, LLC Racine, WI jeff.developer at gmail.com From marksimms at verizon.net Tue Jul 26 10:20:21 2011 From: marksimms at verizon.net (Mark Simms) Date: Tue, 26 Jul 2011 11:20:21 -0400 Subject: [AccessD] Exporting Access to Excel - How to "SUM" a column with a variable number of rows? In-Reply-To: <000001cc4b2f$c64b1fe0$52e15fa0$@gmail.com> References: <001b01cc494e$1af91530$50eb3f90$@comcast.net><001501cc4adc$bc17d200$34477600$@gmail.com> <016b01cc4b27$57c8ffe0$075affa0$@net> <000001cc4b2f$c64b1fe0$52e15fa0$@gmail.com> Message-ID: <026e01cc4ba7$8a000320$9e000960$@net> Bill - look again. I am only looping thru EACH COLUMN...and I AM using Application.SUM. I just came from an investment bank where some workbooks would take 20 to 40 MINUTES to complete. Reason: formula-based SUMS, VLOOKUPS, and SUMIFS. VLOOKUPs themselves were horribly inefficient. Even MATCH replacements did not improve performance. When replaced with VBA "static" counterparts, the calc time would decrease 90% in many cases. > -----Original Message----- > From: William Benson (VBACreations.Com) [mailto:vbacreations at gmail.com] > Sent: Monday, July 25, 2011 9:03 PM > To: 'Mark Simms' > Subject: FW: [AccessD] Exporting Access to Excel - How to "SUM" a > column with a variable number of rows? > > Mark, > > I have programmed in Excel for about 8 years and would not recommend > this > approach, but did not want to say so on the ListServ. Perhaps there is > a > reason you would loop through each cell to build a sum instead of using > Excel's marvelous (and instantaneous!) SUM worksheetfunction -- > available to > the application object? > > If you are looping through cells for the purpose of examining them > prior to > adding them, I don't say that is a bad idea - but for a standard > summation, > you would want to use Application.SUM. > > Warm regards, > > Bill > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Mark Simms > Sent: Monday, July 25, 2011 8:03 PM > To: 'Access Developers discussion and problem solving' > Subject: Re: [AccessD] Exporting Access to Excel - How to "SUM" a > column > with a variable number of rows? > > What you need to decide is: dynamic vs. static. > If the data is not going to change, then try this: > > Sub AddTotals > > Dim rngCol as Range > > With Activesheet.UsedRange > > For Each rngCol in .Columns > rngCol.Cells(.rows.Count+1) = Application.Sum(rngCol) > Next > > End With > > End Sub > > Of course this assumes the starting row is #1. > > > -----Original Message----- > > From: accessd-bounces at databaseadvisors.com [mailto:accessd- > > bounces at databaseadvisors.com] On Behalf Of Brad Marks > > Sent: Monday, July 25, 2011 4:52 PM > > To: Access Developers discussion and problem solving > > Subject: Re: [AccessD] Exporting Access to Excel - How to "SUM" a > > column with a variable number of rows? > > > > William and Lambert, > > > > Thanks for the help, I appreciate it. > > > > One of the things that I often struggle with is that there is often > > more than one way to accomplish a task. Before I start to build > > something big, I like to understand the options and also understand > the > > "Best" way to get something done. > > > > Thanks Again, > > Brad > > > > > > -----Original Message----- > > From: accessd-bounces at databaseadvisors.com on behalf of Heenan, > Lambert > > Sent: Mon 7/25/2011 1:31 PM > > To: Access Developers discussion and problem solving > > Subject: Re: [AccessD] Exporting Access to Excel - How to "SUM" a > > column with a variable number of rows? > > > > The way I do this is after exporting the results of a query to Excel > I > > then run a Dcount() against the same query to discover how many rows > > were in the output data.... > > > > nRows = DCount("*", "Some_Query_Name") > > > > Then I open the Excel file with Access (i.e. I set an > > Excell.Application and Excel.Worksheet object) so that I can then add > > the formulas that I need to the row under the last row of exported > > data. > > > > Essentially you build the formula in a text variable like this... > > > > strFormula = "=Sum(" & Excel_Column(nCol) & nRowOffest - nRowsToSum & > > ":" & Excel_Column(nCol) & nRowOffest - 1 & ")" > > > > Where nRowOffest is the row number to start summing (or averaging or > > counting, whatever) and nRowsToSum is the number of row in the > output. > > The function Excel_Column is used to get the right alpha prefix in > the > > cells address... > > > > Function Excel_Column(nCol As Long) As String ' given a valid column > > number return the Alpha name for it ' else return an empty string > > If nCol > 256 Then ' Pre Excel 2007 > > Excel_Column = "" > > Else > > If nCol <= 26 Then > > Excel_Column = Chr(Asc("A") + nCol - 1) > > Else > > Dim sSecond As String > > sSecond = Excel_Column(nCol Mod 26) > > Excel_Column = Excel_Column(nCol \ 26) & sSecond > > End If > > End If > > End Function > > > > Then, after building the text string with the formula just plug it > into > > the relevant cell in the workbook. > > > > After setting the Excel.Application object you then need a reference > to > > the worksheet that needs to be update... > > > > Set Ws = xlApp.Sheets(nSheet) > > With Ws > > strCellAddress = Excel_Column(nCol) & nRowOffest > > strFormula = "=Sum(" & Excel_Column(nCol) & nRowOffest - > > nRowsToSum & ":" & Excel_Column(nCol) & nRowOffest - 1 & ")" > > .Cells(nRowOffest, nCol) = strFormula > > End With > > > > > > HTH > > > > Lambert > > > > -----Original Message----- > > From: accessd-bounces at databaseadvisors.com [mailto:accessd- > > bounces at databaseadvisors.com] On Behalf Of Brad Marks > > Sent: Monday, July 25, 2011 1:54 PM > > To: Access Developers discussion and problem solving > > Subject: [AccessD] Exporting Access to Excel - How to "SUM" a column > > with a variable number of rows? > > > > I am starting to do some experiments involving the creation of Excel > > files from Access. > > > > Let's say that I have an Access Recordset that can contain anywhere > > from 100 to 1,000 records. > > > > I have a little Access application that currently pushes this data > into > > Excel. This all works nicely. > > > > What is the best way to "Sum" a column in Excel after the last > record, > > when the number of records can vary? > > > > Thanks, > > Brad > > > > -- > > 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 has been scanned for viruses and dangerous content by > > MailScanner, and is believed to be clean. > > > > > > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com From BradM at blackforestltd.com Tue Jul 26 15:39:32 2011 From: BradM at blackforestltd.com (Brad Marks) Date: Tue, 26 Jul 2011 15:39:32 -0500 Subject: [AccessD] Exporting Access to Excel - How to "SUM" a column with a variable number of rows? References: <001b01cc494e$1af91530$50eb3f90$@comcast.net><001501cc4adc$bc17d200$34477600$@gmail.com> <016b01cc4b27$57c8ffe0$075affa0$@net> Message-ID: Mark, Thanks for the help, I appreciate it. The sample code that you posted works nicely. Each column is summed. I do have one question, however. How can I prevent select columns from being summed in case they contain data that should not be summed? Thanks, Brad -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Mark Simms Sent: Monday, July 25, 2011 7:03 PM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Exporting Access to Excel - How to "SUM" acolumn with a variable number of rows? What you need to decide is: dynamic vs. static. If the data is not going to change, then try this: Sub AddTotals Dim rngCol as Range With Activesheet.UsedRange For Each rngCol in .Columns rngCol.Cells(.rows.Count+1) = Application.Sum(rngCol) Next End With End Sub Of course this assumes the starting row is #1. > -----Original Message----- > From: accessd-bounces at databaseadvisors.com [mailto:accessd- > bounces at databaseadvisors.com] On Behalf Of Brad Marks > Sent: Monday, July 25, 2011 4:52 PM > To: Access Developers discussion and problem solving > Subject: Re: [AccessD] Exporting Access to Excel - How to "SUM" a > column with a variable number of rows? > > William and Lambert, > > Thanks for the help, I appreciate it. > > One of the things that I often struggle with is that there is often > more than one way to accomplish a task. Before I start to build > something big, I like to understand the options and also understand the > "Best" way to get something done. > > Thanks Again, > Brad > > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com on behalf of Heenan, Lambert > Sent: Mon 7/25/2011 1:31 PM > To: Access Developers discussion and problem solving > Subject: Re: [AccessD] Exporting Access to Excel - How to "SUM" a > column with a variable number of rows? > > The way I do this is after exporting the results of a query to Excel I > then run a Dcount() against the same query to discover how many rows > were in the output data.... > > nRows = DCount("*", "Some_Query_Name") > > Then I open the Excel file with Access (i.e. I set an > Excell.Application and Excel.Worksheet object) so that I can then add > the formulas that I need to the row under the last row of exported > data. > > Essentially you build the formula in a text variable like this... > > strFormula = "=Sum(" & Excel_Column(nCol) & nRowOffest - nRowsToSum & > ":" & Excel_Column(nCol) & nRowOffest - 1 & ")" > > Where nRowOffest is the row number to start summing (or averaging or > counting, whatever) and nRowsToSum is the number of row in the output. > The function Excel_Column is used to get the right alpha prefix in the > cells address... > > Function Excel_Column(nCol As Long) As String ' given a valid column > number return the Alpha name for it ' else return an empty string > If nCol > 256 Then ' Pre Excel 2007 > Excel_Column = "" > Else > If nCol <= 26 Then > Excel_Column = Chr(Asc("A") + nCol - 1) > Else > Dim sSecond As String > sSecond = Excel_Column(nCol Mod 26) > Excel_Column = Excel_Column(nCol \ 26) & sSecond > End If > End If > End Function > > Then, after building the text string with the formula just plug it into > the relevant cell in the workbook. > > After setting the Excel.Application object you then need a reference to > the worksheet that needs to be update... > > Set Ws = xlApp.Sheets(nSheet) > With Ws > strCellAddress = Excel_Column(nCol) & nRowOffest > strFormula = "=Sum(" & Excel_Column(nCol) & nRowOffest - > nRowsToSum & ":" & Excel_Column(nCol) & nRowOffest - 1 & ")" > .Cells(nRowOffest, nCol) = strFormula > End With > > > HTH > > Lambert > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com [mailto:accessd- > bounces at databaseadvisors.com] On Behalf Of Brad Marks > Sent: Monday, July 25, 2011 1:54 PM > To: Access Developers discussion and problem solving > Subject: [AccessD] Exporting Access to Excel - How to "SUM" a column > with a variable number of rows? > > I am starting to do some experiments involving the creation of Excel > files from Access. > > Let's say that I have an Access Recordset that can contain anywhere > from 100 to 1,000 records. > > I have a little Access application that currently pushes this data into > Excel. This all works nicely. > > What is the best way to "Sum" a column in Excel after the last record, > when the number of records can vary? > > Thanks, > Brad > > -- > 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 has been scanned for viruses and dangerous content by > MailScanner, and is believed to be clean. > > -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. From rockysmolin at bchacc.com Tue Jul 26 16:55:13 2011 From: rockysmolin at bchacc.com (Rocky Smolin) Date: Tue, 26 Jul 2011 14:55:13 -0700 Subject: [AccessD] A2003 stops working Message-ID: <8FDCFF410EE948FCAECD101A7CBAE855@HAL9007> Dear List: Running Access 2003 SP3 on a 64bit W7 OS machine. From time to time it stops with a message "Access has stopped working." I am getting it now consistently on one form on an app when deleting a record (DoCmd.RunCommand acCmdDeleteRecord). I have Office 2010 loaded on this machine as well. Anyone have this happen? Any cure? MTIA Rocky Smolin Beach Access Software 858-259-4334 www.bchacc.com www.e-z-mrp.com From rockysmolin at bchacc.com Tue Jul 26 17:02:27 2011 From: rockysmolin at bchacc.com (Rocky Smolin) Date: Tue, 26 Jul 2011 15:02:27 -0700 Subject: [AccessD] A2003 stops working In-Reply-To: <8FDCFF410EE948FCAECD101A7CBAE855@HAL9007> References: <8FDCFF410EE948FCAECD101A7CBAE855@HAL9007> Message-ID: <814A51A1F63345E980C150E6E55B65EA@HAL9007> I just uninstalled O2010 - no effect - still craps out on the delete. R -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Rocky Smolin Sent: Tuesday, July 26, 2011 2:55 PM To: accessd at databaseadvisors.com Subject: [AccessD] A2003 stops working Dear List: Running Access 2003 SP3 on a 64bit W7 OS machine. From time to time it stops with a message "Access has stopped working." I am getting it now consistently on one form on an app when deleting a record (DoCmd.RunCommand acCmdDeleteRecord). I have Office 2010 loaded on this machine as well. Anyone have this happen? Any cure? MTIA Rocky Smolin Beach Access Software 858-259-4334 www.bchacc.com www.e-z-mrp.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From dbdoug at gmail.com Tue Jul 26 18:21:47 2011 From: dbdoug at gmail.com (Doug Steele) Date: Tue, 26 Jul 2011 16:21:47 -0700 Subject: [AccessD] A2003 stops working In-Reply-To: <814A51A1F63345E980C150E6E55B65EA@HAL9007> References: <8FDCFF410EE948FCAECD101A7CBAE855@HAL9007> <814A51A1F63345E980C150E6E55B65EA@HAL9007> Message-ID: Have you tried swinging a lizard around your head three times? I have had these mystery fails, and my general approach (stopping if/when I have success) is: 1. Force a compile. 2. Decompile/recompile. 3. Build an empty database and import all objects from the old database. 4. Delete the form and rebuild it from scratch. 5. Rework the code. In this case, open a dao recordset, find the record and delete it with Recordset.Delete. 6. Tear my hair out. I'm quite bald now. Doug On Tue, Jul 26, 2011 at 3:02 PM, Rocky Smolin wrote: > I just uninstalled O2010 ?- no effect - still craps out on the delete. > > > R > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Rocky Smolin > Sent: Tuesday, July 26, 2011 2:55 PM > To: accessd at databaseadvisors.com > Subject: [AccessD] A2003 stops working > > Dear List: > > Running Access 2003 SP3 on a 64bit W7 OS machine. ?From time to time it > stops with a message "Access has stopped working." > > I am getting it now consistently on one form on an app when deleting a > record (DoCmd.RunCommand acCmdDeleteRecord). > > I have Office 2010 loaded on this machine as well. > > Anyone have this happen? ?Any cure? > > MTIA > > Rocky Smolin > Beach Access Software > 858-259-4334 > www.bchacc.com www.e-z-mrp.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 bill_patten at embarqmail.com Tue Jul 26 19:03:26 2011 From: bill_patten at embarqmail.com (Bill Patten) Date: Tue, 26 Jul 2011 17:03:26 -0700 Subject: [AccessD] A2003 stops working In-Reply-To: <8FDCFF410EE948FCAECD101A7CBAE855@HAL9007> References: <8FDCFF410EE948FCAECD101A7CBAE855@HAL9007> Message-ID: <85943A5EECAC45039D1BAD282EB2A938@BPCS> Rocky, I had a similar problem back in 2009 when I would try to add a control to a form, it would crash. If it maters I had the problem in 2 applications and they were both ADP's In my case if I exported the form to text and opened it in notepad I found a ton of "UnknownProp(## ending in END" If you export the subject form to text and open it up and see the "UnknownProp items then you are experiencing the same problem I had. I wrote a routine to remove the bad lines and all was well. I had lots of them in the project so used a routine that exported each form to text, opened it removed all the lines and put it back. I always believed the problem was caused by opening it in 2007 then reopening it in 2003. I try not to do that anymore. HTH Bill -------------------------------------------------- From: "Rocky Smolin" Sent: Tuesday, July 26, 2011 2:55 PM To: Subject: [AccessD] A2003 stops working Dear List: Running Access 2003 SP3 on a 64bit W7 OS machine. From time to time it stops with a message "Access has stopped working." I am getting it now consistently on one form on an app when deleting a record (DoCmd.RunCommand acCmdDeleteRecord). I have Office 2010 loaded on this machine as well. Anyone have this happen? Any cure? MTIA Rocky Smolin Beach Access Software 858-259-4334 www.bchacc.com www.e-z-mrp.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From marksimms at verizon.net Tue Jul 26 19:16:35 2011 From: marksimms at verizon.net (Mark Simms) Date: Tue, 26 Jul 2011 20:16:35 -0400 Subject: [AccessD] [cross posted] SharePoint 2010 question(s) In-Reply-To: References: Message-ID: <00ab01cc4bf2$72da9c00$588fd400$@net> Jeff - there is a special website devoted to that topic......and it's not Microsoft's....natch. Access Services remains fairly cloaked in secrecy.... > -----Original Message----- > From: accessd-bounces at databaseadvisors.com [mailto:accessd- > bounces at databaseadvisors.com] On Behalf Of Jeff B > Sent: Tuesday, July 26, 2011 11:11 AM > To: Dba-Tech; dba-OT; AccessD > Subject: [AccessD] [cross posted] SharePoint 2010 question(s) > > I really need to know what you all suggest as the BEST book(s) for > learning > SharePoint 2010, Access Services, and publishing Access databases to > SharePoint. > > > Jeff Barrows > MCP, MCAD, MCSD > > Outbak Technologies, LLC > Racine, WI > jeff.developer at gmail.com > > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com From marksimms at verizon.net Tue Jul 26 19:39:40 2011 From: marksimms at verizon.net (Mark Simms) Date: Tue, 26 Jul 2011 20:39:40 -0400 Subject: [AccessD] Exporting Access to Excel - How to "SUM" a column with a variable number of rows? In-Reply-To: References: <001b01cc494e$1af91530$50eb3f90$@comcast.net><001501cc4adc$bc17d200$34477600$@gmail.com> <016b01cc4b27$57c8ffe0$075affa0$@net> Message-ID: <00ac01cc4bf5$ae236e10$0a6a4a30$@net> Simple. Add a paramarray variant parameter to the procedure and pass it the column numbers or column letters that should be ignored. The only other way is to first test the column using Application.Sum. If the result is non-zero, then it is LIKELY a numeric column. Caveat: all zeros in a column will fail the test ! > -----Original Message----- > From: accessd-bounces at databaseadvisors.com [mailto:accessd- > bounces at databaseadvisors.com] On Behalf Of Brad Marks > Sent: Tuesday, July 26, 2011 4:40 PM > To: Access Developers discussion and problem solving > Subject: Re: [AccessD] Exporting Access to Excel - How to "SUM" a > column with a variable number of rows? > > Mark, > > Thanks for the help, I appreciate it. > > The sample code that you posted works nicely. Each column is summed. > > I do have one question, however. > > How can I prevent select columns from being summed in case they contain > data that should not be summed? > > Thanks, > Brad > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Mark Simms > Sent: Monday, July 25, 2011 7:03 PM > To: 'Access Developers discussion and problem solving' > Subject: Re: [AccessD] Exporting Access to Excel - How to "SUM" acolumn > with a variable number of rows? > > What you need to decide is: dynamic vs. static. > If the data is not going to change, then try this: > > Sub AddTotals > > Dim rngCol as Range > > With Activesheet.UsedRange > > For Each rngCol in .Columns > rngCol.Cells(.rows.Count+1) = Application.Sum(rngCol) > Next > > End With > > End Sub > > Of course this assumes the starting row is #1. > > > -----Original Message----- > > From: accessd-bounces at databaseadvisors.com [mailto:accessd- > > bounces at databaseadvisors.com] On Behalf Of Brad Marks > > Sent: Monday, July 25, 2011 4:52 PM > > To: Access Developers discussion and problem solving > > Subject: Re: [AccessD] Exporting Access to Excel - How to "SUM" a > > column with a variable number of rows? > > > > William and Lambert, > > > > Thanks for the help, I appreciate it. > > > > One of the things that I often struggle with is that there is often > > more than one way to accomplish a task. Before I start to build > > something big, I like to understand the options and also understand > the > > "Best" way to get something done. > > > > Thanks Again, > > Brad > > > > > > -----Original Message----- > > From: accessd-bounces at databaseadvisors.com on behalf of Heenan, > Lambert > > Sent: Mon 7/25/2011 1:31 PM > > To: Access Developers discussion and problem solving > > Subject: Re: [AccessD] Exporting Access to Excel - How to "SUM" a > > column with a variable number of rows? > > > > The way I do this is after exporting the results of a query to Excel > I > > then run a Dcount() against the same query to discover how many rows > > were in the output data.... > > > > nRows = DCount("*", "Some_Query_Name") > > > > Then I open the Excel file with Access (i.e. I set an > > Excell.Application and Excel.Worksheet object) so that I can then add > > the formulas that I need to the row under the last row of exported > > data. > > > > Essentially you build the formula in a text variable like this... > > > > strFormula = "=Sum(" & Excel_Column(nCol) & nRowOffest - nRowsToSum & > > ":" & Excel_Column(nCol) & nRowOffest - 1 & ")" > > > > Where nRowOffest is the row number to start summing (or averaging or > > counting, whatever) and nRowsToSum is the number of row in the > output. > > The function Excel_Column is used to get the right alpha prefix in > the > > cells address... > > > > Function Excel_Column(nCol As Long) As String ' given a valid column > > number return the Alpha name for it ' else return an empty string > > If nCol > 256 Then ' Pre Excel 2007 > > Excel_Column = "" > > Else > > If nCol <= 26 Then > > Excel_Column = Chr(Asc("A") + nCol - 1) > > Else > > Dim sSecond As String > > sSecond = Excel_Column(nCol Mod 26) > > Excel_Column = Excel_Column(nCol \ 26) & sSecond > > End If > > End If > > End Function > > > > Then, after building the text string with the formula just plug it > into > > the relevant cell in the workbook. > > > > After setting the Excel.Application object you then need a reference > to > > the worksheet that needs to be update... > > > > Set Ws = xlApp.Sheets(nSheet) > > With Ws > > strCellAddress = Excel_Column(nCol) & nRowOffest > > strFormula = "=Sum(" & Excel_Column(nCol) & nRowOffest - > > nRowsToSum & ":" & Excel_Column(nCol) & nRowOffest - 1 & ")" > > .Cells(nRowOffest, nCol) = strFormula > > End With > > > > > > HTH > > > > Lambert > > > > -----Original Message----- > > From: accessd-bounces at databaseadvisors.com [mailto:accessd- > > bounces at databaseadvisors.com] On Behalf Of Brad Marks > > Sent: Monday, July 25, 2011 1:54 PM > > To: Access Developers discussion and problem solving > > Subject: [AccessD] Exporting Access to Excel - How to "SUM" a column > > with a variable number of rows? > > > > I am starting to do some experiments involving the creation of Excel > > files from Access. > > > > Let's say that I have an Access Recordset that can contain anywhere > > from 100 to 1,000 records. > > > > I have a little Access application that currently pushes this data > into > > Excel. This all works nicely. > > > > What is the best way to "Sum" a column in Excel after the last > record, > > when the number of records can vary? > > > > Thanks, > > Brad > > > > -- > > 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 has been scanned for viruses and dangerous content by > > MailScanner, and is believed to be clean. > > > > > > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > > -- > This message has been scanned for viruses and > dangerous content by MailScanner, and is > believed to be clean. > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com From vbacreations at gmail.com Tue Jul 26 20:46:51 2011 From: vbacreations at gmail.com (William Benson) Date: Tue, 26 Jul 2011 21:46:51 -0400 Subject: [AccessD] Exporting Access to Excel - How to "SUM" a column with a variable number of rows? In-Reply-To: References: <001b01cc494e$1af91530$50eb3f90$@comcast.net> <001501cc4adc$bc17d200$34477600$@gmail.com> <016b01cc4b27$57c8ffe0$075affa0$@net> Message-ID: Brad, When you mention data that should not be summed are you talking about a mixture of text and numbers? Dates ? What? Do you plan to test on sheet? EXCEL =CountA(range ) = Count(range) is one test for mixture of text and numeric in bulk. Can also be tested with Evaluate ... as in if xl.EVALUATE ("=counta(" & Rng.address & ") = Count (" & rng.address & ")") = True then... On Jul 26, 2011 4:43 PM, "Brad Marks" wrote: From BradM at blackforestltd.com Tue Jul 26 21:33:11 2011 From: BradM at blackforestltd.com (Brad Marks) Date: Tue, 26 Jul 2011 21:33:11 -0500 Subject: [AccessD] Exporting Access to Excel - How to "SUM" a column with a variable number of rows? References: <001b01cc494e$1af91530$50eb3f90$@comcast.net><001501cc4adc$bc17d200$34477600$@gmail.com><016b01cc4b27$57c8ffe0$075affa0$@net> <00ac01cc4bf5$ae236e10$0a6a4a30$@net> Message-ID: Mark, Thanks, Brad -----Original Message----- From: accessd-bounces at databaseadvisors.com on behalf of Mark Simms Sent: Tue 7/26/2011 7:39 PM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Exporting Access to Excel - How to "SUM" a column with a variable number of rows? Simple. Add a paramarray variant parameter to the procedure and pass it the column numbers or column letters that should be ignored. The only other way is to first test the column using Application.Sum. If the result is non-zero, then it is LIKELY a numeric column. Caveat: all zeros in a column will fail the test ! > -----Original Message----- > From: accessd-bounces at databaseadvisors.com [mailto:accessd- > bounces at databaseadvisors.com] On Behalf Of Brad Marks > Sent: Tuesday, July 26, 2011 4:40 PM > To: Access Developers discussion and problem solving > Subject: Re: [AccessD] Exporting Access to Excel - How to "SUM" a > column with a variable number of rows? > > Mark, > > Thanks for the help, I appreciate it. > > The sample code that you posted works nicely. Each column is summed. > > I do have one question, however. > > How can I prevent select columns from being summed in case they contain > data that should not be summed? > > Thanks, > Brad > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Mark Simms > Sent: Monday, July 25, 2011 7:03 PM > To: 'Access Developers discussion and problem solving' > Subject: Re: [AccessD] Exporting Access to Excel - How to "SUM" acolumn > with a variable number of rows? > > What you need to decide is: dynamic vs. static. > If the data is not going to change, then try this: > > Sub AddTotals > > Dim rngCol as Range > > With Activesheet.UsedRange > > For Each rngCol in .Columns > rngCol.Cells(.rows.Count+1) = Application.Sum(rngCol) > Next > > End With > > End Sub > > Of course this assumes the starting row is #1. > > > -----Original Message----- > > From: accessd-bounces at databaseadvisors.com [mailto:accessd- > > bounces at databaseadvisors.com] On Behalf Of Brad Marks > > Sent: Monday, July 25, 2011 4:52 PM > > To: Access Developers discussion and problem solving > > Subject: Re: [AccessD] Exporting Access to Excel - How to "SUM" a > > column with a variable number of rows? > > > > William and Lambert, > > > > Thanks for the help, I appreciate it. > > > > One of the things that I often struggle with is that there is often > > more than one way to accomplish a task. Before I start to build > > something big, I like to understand the options and also understand > the > > "Best" way to get something done. > > > > Thanks Again, > > Brad > > > > > > -----Original Message----- > > From: accessd-bounces at databaseadvisors.com on behalf of Heenan, > Lambert > > Sent: Mon 7/25/2011 1:31 PM > > To: Access Developers discussion and problem solving > > Subject: Re: [AccessD] Exporting Access to Excel - How to "SUM" a > > column with a variable number of rows? > > > > The way I do this is after exporting the results of a query to Excel > I > > then run a Dcount() against the same query to discover how many rows > > were in the output data.... > > > > nRows = DCount("*", "Some_Query_Name") > > > > Then I open the Excel file with Access (i.e. I set an > > Excell.Application and Excel.Worksheet object) so that I can then add > > the formulas that I need to the row under the last row of exported > > data. > > > > Essentially you build the formula in a text variable like this... > > > > strFormula = "=Sum(" & Excel_Column(nCol) & nRowOffest - nRowsToSum & > > ":" & Excel_Column(nCol) & nRowOffest - 1 & ")" > > > > Where nRowOffest is the row number to start summing (or averaging or > > counting, whatever) and nRowsToSum is the number of row in the > output. > > The function Excel_Column is used to get the right alpha prefix in > the > > cells address... > > > > Function Excel_Column(nCol As Long) As String ' given a valid column > > number return the Alpha name for it ' else return an empty string > > If nCol > 256 Then ' Pre Excel 2007 > > Excel_Column = "" > > Else > > If nCol <= 26 Then > > Excel_Column = Chr(Asc("A") + nCol - 1) > > Else > > Dim sSecond As String > > sSecond = Excel_Column(nCol Mod 26) > > Excel_Column = Excel_Column(nCol \ 26) & sSecond > > End If > > End If > > End Function > > > > Then, after building the text string with the formula just plug it > into > > the relevant cell in the workbook. > > > > After setting the Excel.Application object you then need a reference > to > > the worksheet that needs to be update... > > > > Set Ws = xlApp.Sheets(nSheet) > > With Ws > > strCellAddress = Excel_Column(nCol) & nRowOffest > > strFormula = "=Sum(" & Excel_Column(nCol) & nRowOffest - > > nRowsToSum & ":" & Excel_Column(nCol) & nRowOffest - 1 & ")" > > .Cells(nRowOffest, nCol) = strFormula > > End With > > > > > > HTH > > > > Lambert > > > > -----Original Message----- > > From: accessd-bounces at databaseadvisors.com [mailto:accessd- > > bounces at databaseadvisors.com] On Behalf Of Brad Marks > > Sent: Monday, July 25, 2011 1:54 PM > > To: Access Developers discussion and problem solving > > Subject: [AccessD] Exporting Access to Excel - How to "SUM" a column > > with a variable number of rows? > > > > I am starting to do some experiments involving the creation of Excel > > files from Access. > > > > Let's say that I have an Access Recordset that can contain anywhere > > from 100 to 1,000 records. > > > > I have a little Access application that currently pushes this data > into > > Excel. This all works nicely. > > > > What is the best way to "Sum" a column in Excel after the last > record, > > when the number of records can vary? > > > > Thanks, > > Brad > > > > -- > > 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 has been scanned for viruses and dangerous content by > > MailScanner, and is believed to be clean. > > > > > > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > > -- > This message has been scanned for viruses and > dangerous content by MailScanner, and is > believed to be clean. > > > -- > 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 has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. From BradM at blackforestltd.com Tue Jul 26 21:41:56 2011 From: BradM at blackforestltd.com (Brad Marks) Date: Tue, 26 Jul 2011 21:41:56 -0500 Subject: [AccessD] Exporting Access to Excel - How to "SUM" a column with a variable number of rows? References: <001b01cc494e$1af91530$50eb3f90$@comcast.net><001501cc4adc$bc17d200$34477600$@gmail.com><016b01cc4b27$57c8ffe0$075affa0$@net> Message-ID: William, I am just doing some R&D work with "Windows Automation" (Access controlling Excel). I can see several uses for this approach down the road with a couple of projects that I am working on (SQL Server and Access Data - reporting and analysis). Some of the fields are numeric fields that will need to be summed in Excel (total sales, etc.). Other fields will not need to be summed (date fields, etc.) Thanks for your ideas. I have worked with Access for a couple years, but my knowledge of Excel is very limited. I am just starting to experiment with Windows Automation. Brad -----Original Message----- From: accessd-bounces at databaseadvisors.com on behalf of William Benson Sent: Tue 7/26/2011 8:46 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Exporting Access to Excel - How to "SUM" a column with a variable number of rows? Brad, When you mention data that should not be summed are you talking about a mixture of text and numbers? Dates ? What? Do you plan to test on sheet? EXCEL =CountA(range ) = Count(range) is one test for mixture of text and numeric in bulk. Can also be tested with Evaluate ... as in if xl.EVALUATE ("=counta(" & Rng.address & ") = Count (" & rng.address & ")") = True then... On Jul 26, 2011 4:43 PM, "Brad Marks" wrote: -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. From rockysmolin at bchacc.com Wed Jul 27 00:03:48 2011 From: rockysmolin at bchacc.com (Rocky Smolin) Date: Tue, 26 Jul 2011 22:03:48 -0700 Subject: [AccessD] A2003 stops working In-Reply-To: References: <8FDCFF410EE948FCAECD101A7CBAE855@HAL9007><814A51A1F63345E980C150E6E55B65EA@HAL9007> Message-ID: <5A5BEB7491F9430FAEDF2AC529F15E18@HAL9007> 1. Done - no joy. 2. Done - no cigar. 3. Gotta try that - it's quick and easy. 4. Or, given the complexity (several tabs with subforms - lots of code) I could resign from the client. As an alternative to sticking my head in the oven. 5. I think it's not that particular record - it's the delete. However, you're right in that I could permanently switch to DAO to do the delete. Could be the fastest solution. 6. Impractical - as this alternative was used multiple times many years ago. There's a limit. I'm pretty much there. 7. Although you did not suggest this - go away for two days and don't think about it. Which is what I'm doing tomorrow. Thanks for the ideas. I'll post what works, eventually. Rocky -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Doug Steele Sent: Tuesday, July 26, 2011 4:22 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] A2003 stops working Have you tried swinging a lizard around your head three times? I have had these mystery fails, and my general approach (stopping if/when I have success) is: 1. Force a compile. 2. Decompile/recompile. 3. Build an empty database and import all objects from the old database. 4. Delete the form and rebuild it from scratch. 5. Rework the code. In this case, open a dao recordset, find the record and delete it with Recordset.Delete. 6. Tear my hair out. I'm quite bald now. Doug On Tue, Jul 26, 2011 at 3:02 PM, Rocky Smolin wrote: > I just uninstalled O2010 ?- no effect - still craps out on the delete. > > > R > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Rocky > Smolin > Sent: Tuesday, July 26, 2011 2:55 PM > To: accessd at databaseadvisors.com > Subject: [AccessD] A2003 stops working > > Dear List: > > Running Access 2003 SP3 on a 64bit W7 OS machine. ?From time to time > it stops with a message "Access has stopped working." > > I am getting it now consistently on one form on an app when deleting a > record (DoCmd.RunCommand acCmdDeleteRecord). > > I have Office 2010 loaded on this machine as well. > > Anyone have this happen? ?Any cure? > > MTIA > > Rocky Smolin > Beach Access Software > 858-259-4334 > www.bchacc.com www.e-z-mrp.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 fuller.artful at gmail.com Wed Jul 27 01:29:12 2011 From: fuller.artful at gmail.com (Arthur Fuller) Date: Wed, 27 Jul 2011 02:29:12 -0400 Subject: [AccessD] A2003 stops working In-Reply-To: <5A5BEB7491F9430FAEDF2AC529F15E18@HAL9007> References: <8FDCFF410EE948FCAECD101A7CBAE855@HAL9007> <814A51A1F63345E980C150E6E55B65EA@HAL9007> <5A5BEB7491F9430FAEDF2AC529F15E18@HAL9007> Message-ID: Sometimes things foul up due to bad References. Before doing the oven thing, you might want to do Tools|References and see wha 'appnin' there. A. On Wed, Jul 27, 2011 at 1:03 AM, Rocky Smolin wrote: > 1. Done - no joy. > 2. Done - no cigar. > 3. Gotta try that - it's quick and easy. > 4. Or, given the complexity (several tabs with subforms - lots of code) I > could resign from the client. As an alternative to sticking my head in the > oven. > 5. I think it's not that particular record - it's the delete. However, > you're right in that I could permanently switch to DAO to do the delete. > Could be the fastest solution. > 6. Impractical - as this alternative was used multiple times many years > ago. > There's a limit. I'm pretty much there. > > 7. Although you did not suggest this - go away for two days and don't think > about it. Which is what I'm doing tomorrow. > > Thanks for the ideas. > > I'll post what works, eventually. > > Rocky > From vbacreations at gmail.com Wed Jul 27 15:35:50 2011 From: vbacreations at gmail.com (William Benson (VBACreations.Com)) Date: Wed, 27 Jul 2011 16:35:50 -0400 Subject: [AccessD] Trouble creating a memo field Message-ID: <001601cc4c9c$c7aa2ed0$56fe8c70$@gmail.com> I sometimes try to create new tables using SQL but not using CREATETABLE. Example: Select 'Test' as Field1 Into Tbl1 One problem I had recently was, how can one make a MEMO field this way? (I can't find a way, not even with MyDB.Execute ("Select '" & string(257,"a") & "' as Field1 Into Tbl1"),DBFailonError When I do that I get only 255 characters and the field is Text. Another problem is that I often like the table to be created without a first row in it. So I might write something like Select 'Test' as Field1 Into Tbl1 From Tbl2 WHERE 1 = 2 Trouble is, What if there is no table named Tbl2? (Obviously it fails). But I can't seem to get the WHERE clause to be acceptable when I do not specify a valid table in the FROM clause, unlike the first example. Now, I might be able to solve the latter problem by specifying a system table as the FROM table, something I know will always be present... such as: Select 'Test' as Field1 Into Tbl1 From MSysObjects WHERE 1 = 2 But then that code probably would not work in other (non-MSAccess) databases. In fact, I am not sure this process of using Select Into works in non-Access databases anyway (does it?) So... I am now leaning towards using CREATE TABLE always and forever as my choice for the best performing method of creating a table using inline SQL. Does anyone beg to differ with this and/or have a way to resolve the issues I have found? From jackandpat.d at gmail.com Wed Jul 27 16:01:44 2011 From: jackandpat.d at gmail.com (jack drawbridge) Date: Wed, 27 Jul 2011 17:01:44 -0400 Subject: [AccessD] Trouble creating a memo field In-Reply-To: <001601cc4c9c$c7aa2ed0$56fe8c70$@gmail.com> References: <001601cc4c9c$c7aa2ed0$56fe8c70$@gmail.com> Message-ID: William, Allen Browne has samples of various DDL statements here. http://allenbrowne.com/func-DDL.html jack On Wed, Jul 27, 2011 at 4:35 PM, William Benson (VBACreations.Com) < vbacreations at gmail.com> wrote: > I sometimes try to create new tables using SQL but not using CREATETABLE. > Example: Select 'Test' as Field1 Into Tbl1 > > One problem I had recently was, how can one make a MEMO field this way? (I > can't find a way, not even with > MyDB.Execute ("Select '" & string(257,"a") & "' as Field1 Into > Tbl1"),DBFailonError > When I do that I get only 255 characters and the field is Text. > > Another problem is that I often like the table to be created without a > first > row in it. So I might write something like > Select 'Test' as Field1 Into Tbl1 From Tbl2 WHERE 1 = 2 > Trouble is, What if there is no table named Tbl2? (Obviously it fails). But > I can't seem to get the WHERE clause to be acceptable when I do not specify > a valid table in the FROM clause, unlike the first example. > > Now, I might be able to solve the latter problem by specifying a system > table as the FROM table, something I know will always be present... such > as: > Select 'Test' as Field1 Into Tbl1 From MSysObjects WHERE 1 = 2 > > But then that code probably would not work in other (non-MSAccess) > databases. In fact, I am not sure this process of using Select Into works > in > non-Access databases anyway (does it?) > > So... I am now leaning towards using CREATE TABLE always and forever as my > choice for the best performing method of creating a table using inline SQL. > > Does anyone beg to differ with this and/or have a way to resolve the issues > I have found? > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > From stuart at lexacorp.com.pg Wed Jul 27 16:13:50 2011 From: stuart at lexacorp.com.pg (Stuart McLachlan) Date: Thu, 28 Jul 2011 07:13:50 +1000 Subject: [AccessD] Trouble creating a memo field In-Reply-To: <001601cc4c9c$c7aa2ed0$56fe8c70$@gmail.com> References: <001601cc4c9c$c7aa2ed0$56fe8c70$@gmail.com> Message-ID: <4E307F8E.27155.42BDF2F4@stuart.lexacorp.com.pg> Select ...Into doesn't allow you to set PKs, indexes or constraints(if avaiable in the destination) and doesn't let you specify the destination datatype. It is a quick and dirty solution in a limited set of cases. I'd stick with Create table if I were you, -- Stuart On 27 Jul 2011 at 16:35, William Benson (VBACreations. wrote: > I sometimes try to create new tables using SQL but not using > CREATETABLE. Example: Select 'Test' as Field1 Into Tbl1 > > One problem I had recently was, how can one make a MEMO field this > way? (I can't find a way, not even with > MyDB.Execute ("Select '" & string(257,"a") & "' as Field1 Into > Tbl1"),DBFailonError When I do that I get only 255 characters and the > field is Text. > > Another problem is that I often like the table to be created without a > first row in it. So I might write something like > Select 'Test' as Field1 Into Tbl1 From Tbl2 WHERE 1 = 2 > Trouble is, What if there is no table named Tbl2? (Obviously it > fails). But I can't seem to get the WHERE clause to be acceptable when > I do not specify a valid table in the FROM clause, unlike the first > example. > > Now, I might be able to solve the latter problem by specifying a > system table as the FROM table, something I know will always be > present... such as: > Select 'Test' as Field1 Into Tbl1 From MSysObjects WHERE 1 = 2 > > But then that code probably would not work in other (non-MSAccess) > databases. In fact, I am not sure this process of using Select Into > works in non-Access databases anyway (does it?) > > So... I am now leaning towards using CREATE TABLE always and forever > as my choice for the best performing method of creating a table using > inline SQL. > > Does anyone beg to differ with this and/or have a way to resolve the > issues I have found? > From ssharkins at gmail.com Wed Jul 27 16:16:24 2011 From: ssharkins at gmail.com (Susan Harkins) Date: Wed, 27 Jul 2011 17:16:24 -0400 Subject: [AccessD] Trouble creating a memo field References: <001601cc4c9c$c7aa2ed0$56fe8c70$@gmail.com> <4E307F8E.27155.42BDF2F4@stuart.lexacorp.com.pg> Message-ID: <83E2A738E65F4CB1B88AB407020C8059@SusanHarkins> Or create the table and go back alter it by adding a Memo field. Susan H. > Select ...Into doesn't allow you to set PKs, indexes or constraints(if > avaiable in the > destination) and doesn't let you specify the destination datatype. It > is a quick and dirty > solution in a limited set of cases. > > I'd stick with Create table if I were you, > > -- From gustav at cactus.dk Wed Jul 27 17:06:24 2011 From: gustav at cactus.dk (Gustav Brock) Date: Thu, 28 Jul 2011 00:06:24 +0200 Subject: [AccessD] Trouble creating a memo field Message-ID: Hi William Use DAO to create tables and fields (and indexes and relations, even databases) and all your trouble will end. Seriously. That way you will be in control of the finest details including all properties of the objects. Example: Public Function SetTableProperties() As Boolean Dim dbs As DAO.Database Dim tdf As DAO.TableDef Dim fld As DAO.Field Dim prp As DAO.Property Dim strPropertyName As String Set dbs = CurrentDb() Set tdf = dbs.TableDefs("tblTest") Set fld = tdf.Fields(0) ' On Error GoTo Err_Prop strPropertyName = "Description" Set prp = tdf.CreateProperty() prp.Name = strPropertyName prp.Type = dbText prp.Value = "Table Description" tdf.Properties.Append prp strPropertyName = "Caption" Set prp = fld.CreateProperty(strPropertyName, dbText, "Field Caption") fld.Properties.Append prp SetTableProperties = True Exit_Prop: Exit Function Err_Prop: If Err.Number = 3265 Then ' Item not found in this collection. Resume Next Else Debug.Print Err.Number, Err.Description Resume Exit_Prop End If End Function /gustav >>> vbacreations at gmail.com 27-07-2011 22:35:50 >>> I sometimes try to create new tables using SQL but not using CREATETABLE. Example: Select 'Test' as Field1 Into Tbl1 One problem I had recently was, how can one make a MEMO field this way? (I can't find a way, not even with MyDB.Execute ("Select '" & string(257,"a") & "' as Field1 Into Tbl1"),DBFailonError When I do that I get only 255 characters and the field is Text. Another problem is that I often like the table to be created without a first row in it. So I might write something like Select 'Test' as Field1 Into Tbl1 From Tbl2 WHERE 1 = 2 Trouble is, What if there is no table named Tbl2? (Obviously it fails). But I can't seem to get the WHERE clause to be acceptable when I do not specify a valid table in the FROM clause, unlike the first example. Now, I might be able to solve the latter problem by specifying a system table as the FROM table, something I know will always be present... such as: Select 'Test' as Field1 Into Tbl1 From MSysObjects WHERE 1 = 2 But then that code probably would not work in other (non-MSAccess) databases. In fact, I am not sure this process of using Select Into works in non-Access databases anyway (does it?) So... I am now leaning towards using CREATE TABLE always and forever as my choice for the best performing method of creating a table using inline SQL. Does anyone beg to differ with this and/or have a way to resolve the issues I have found? From jimdettman at verizon.net Thu Jul 28 05:22:06 2011 From: jimdettman at verizon.net (Jim Dettman) Date: Thu, 28 Jul 2011 06:22:06 -0400 Subject: [AccessD] Trouble creating a memo field In-Reply-To: References: <001601cc4c9c$c7aa2ed0$56fe8c70$@gmail.com> Message-ID: <94E7A40574FF46DA9A1AB75A711F12CC@XPS> Not sure what Allan has posted, so this might be duplication, but there is a series of three MSKB articles that shows what you can do with JET 4.0 and SQL. This one: http://msdn.microsoft.com/en-us/library/aa140015(v=office.10).aspx#acintsql_ intddl Has a section on DDL statements. Good series of articles (links to the others are at the bottom). Jim. -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jack drawbridge Sent: Wednesday, July 27, 2011 05:02 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Trouble creating a memo field William, Allen Browne has samples of various DDL statements here. http://allenbrowne.com/func-DDL.html jack On Wed, Jul 27, 2011 at 4:35 PM, William Benson (VBACreations.Com) < vbacreations at gmail.com> wrote: > I sometimes try to create new tables using SQL but not using CREATETABLE. > Example: Select 'Test' as Field1 Into Tbl1 > > One problem I had recently was, how can one make a MEMO field this way? (I > can't find a way, not even with > MyDB.Execute ("Select '" & string(257,"a") & "' as Field1 Into > Tbl1"),DBFailonError > When I do that I get only 255 characters and the field is Text. > > Another problem is that I often like the table to be created without a > first > row in it. So I might write something like > Select 'Test' as Field1 Into Tbl1 From Tbl2 WHERE 1 = 2 > Trouble is, What if there is no table named Tbl2? (Obviously it fails). But > I can't seem to get the WHERE clause to be acceptable when I do not specify > a valid table in the FROM clause, unlike the first example. > > Now, I might be able to solve the latter problem by specifying a system > table as the FROM table, something I know will always be present... such > as: > Select 'Test' as Field1 Into Tbl1 From MSysObjects WHERE 1 = 2 > > But then that code probably would not work in other (non-MSAccess) > databases. In fact, I am not sure this process of using Select Into works > in > non-Access databases anyway (does it?) > > So... I am now leaning towards using CREATE TABLE always and forever as my > choice for the best performing method of creating a table using inline SQL. > > Does anyone beg to differ with this and/or have a way to resolve the issues > I have found? > > -- > 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 rls at WeBeDb.com Thu Jul 28 10:29:59 2011 From: rls at WeBeDb.com (Robert Stewart) Date: Thu, 28 Jul 2011 10:29:59 -0500 Subject: [AccessD] SharePoint 2010 question(s) In-Reply-To: References: Message-ID: And what would that magic web site be? At 05:05 PM 7/27/2011, you wrote: >Date: Tue, 26 Jul 2011 20:16:35 -0400 >From: "Mark Simms" >To: "'Access Developers discussion and problem solving'" > >Subject: Re: [AccessD] [cross posted] SharePoint 2010 question(s) >Message-ID: <00ab01cc4bf2$72da9c00$588fd400$@net> > >Jeff - there is a special website devoted to that topic......and it's not >Microsoft's....natch. >Access Services remains fairly cloaked in secrecy.... > > > -----Original Message----- > > From: accessd-bounces at databaseadvisors.com [mailto:accessd- > > bounces at databaseadvisors.com] On Behalf Of Jeff B > > Sent: Tuesday, July 26, 2011 11:11 AM > > To: Dba-Tech; dba-OT; AccessD > > Subject: [AccessD] [cross posted] SharePoint 2010 question(s) > > > > I really need to know what you all suggest as the BEST book(s) for > > learning > > SharePoint 2010, Access Services, and publishing Access databases to > > SharePoint. > > > > > > Jeff Barrows > > MCP, MCAD, MCSD > > Robert L. Stewart www.WeBeDb.com www.DBGUIDesign.com www.RLStewartPhotography.com From ssharkins at gmail.com Thu Jul 28 11:54:58 2011 From: ssharkins at gmail.com (Susan Harkins) Date: Thu, 28 Jul 2011 12:54:58 -0400 Subject: [AccessD] Article on upgrading Message-ID: <65F646A7C57044C1B8659201D3378B55@SusanHarkins> I'll be writing about upgrading to SQL Server and I'd like to include as many of you in it as possible -- you'll get credit and a link -- it's a nice thing to show the boss and clients. The angle is -- questions you should ask when deciding whether to upgrade an Access database to SQL Server (Express is Okay too) -- specific to the decision-making process. Anything you think someone considering the move should evaluate before doing so -- but I'll be writing it from a "questions you should ask" perspective. It'll be interesting reading for the list too I think, so if nobody objects -- I see no reason to ask for these responses off list. Thanks! Susan H. From fuller.artful at gmail.com Thu Jul 28 13:08:53 2011 From: fuller.artful at gmail.com (Arthur Fuller) Date: Thu, 28 Jul 2011 14:08:53 -0400 Subject: [AccessD] Article on upgrading In-Reply-To: <65F646A7C57044C1B8659201D3378B55@SusanHarkins> References: <65F646A7C57044C1B8659201D3378B55@SusanHarkins> Message-ID: I would lend this to your proposed article. 1. Find any occurrences of "Select" plus anything, either in RecordSources or DataSources. Revise said code to refer to a named query. 2. Make sure that all date-fields are not null, giving them instead a default value of Date() at worst, but supplying some value at least. 3. Make sure that all FKs hold true; no orphans whatever, else the whole migration will fail. 4. Strictly a matter of opinion, but MO is that 3NF is insufficient for serious dbs; 4- and 5-NF are mandatory. A. On Thu, Jul 28, 2011 at 12:54 PM, Susan Harkins wrote: > I'll be writing about upgrading to SQL Server and I'd like to include as > many of you in it as possible -- you'll get credit and a link -- it's a nice > thing to show the boss and clients. > > The angle is -- questions you should ask when deciding whether to upgrade > an Access database to SQL Server (Express is Okay too) -- specific to the > decision-making process. Anything you think someone considering the move > should evaluate before doing so -- but I'll be writing it from a "questions > you should ask" perspective. > > It'll be interesting reading for the list too I think, so if nobody objects > -- I see no reason to ask for these responses off list. > > Thanks! > Susan H. > > From ssharkins at gmail.com Thu Jul 28 13:13:43 2011 From: ssharkins at gmail.com (Susan Harkins) Date: Thu, 28 Jul 2011 14:13:43 -0400 Subject: [AccessD] Article on upgrading References: <65F646A7C57044C1B8659201D3378B55@SusanHarkins> Message-ID: <2C78D5CF79B043E5A94FC45422B4A5C3@SusanHarkins> This is good advice for actually performing an upgrade, but I'm looking for questions you might ask when deciding whether you actually should or want to upgrade -- see the difference? What kind of questions do you ask your clients before you actually get there -- what kinds of questions do they ask you when they begin to think about upgrading? Thanks Arthur! Please feel free to play again! ;) Susan H. >I would lend this to your proposed article. > > 1. Find any occurrences of "Select" plus anything, either in RecordSources > or DataSources. Revise said code to refer to a named query. > 2. Make sure that all date-fields are not null, giving them instead a > default value of Date() at worst, but supplying some value at least. > 3. Make sure that all FKs hold true; no orphans whatever, else the whole > migration will fail. > 4. Strictly a matter of opinion, but MO is that 3NF is insufficient for > serious dbs; 4- and 5-NF are mandatory. > From gustav at cactus.dk Thu Jul 28 13:29:26 2011 From: gustav at cactus.dk (Gustav Brock) Date: Thu, 28 Jul 2011 20:29:26 +0200 Subject: [AccessD] Article on upgrading Message-ID: Hi Susan Nice to see back doing tech writing! We've never had a client asking why, they all follow my advice(!) So our reasons to suggest and upgrade: 1. Extreme reliability is requested. I have yet to see an SQL Server break down. 2. Remote access (across a WAN) is needed. 3. Easy, daily, and reliable backup is requested even when clients are on-line. 4. Database size can be expected to outgrow Access' capability. 5. Controlled and secure user access is requested. Note the non-tech level of these parameters. /gustav >>> ssharkins at gmail.com 28-07-2011 18:54:58 >>> I'll be writing about upgrading to SQL Server and I'd like to include as many of you in it as possible -- you'll get credit and a link -- it's a nice thing to show the boss and clients. The angle is -- questions you should ask when deciding whether to upgrade an Access database to SQL Server (Express is Okay too) -- specific to the decision-making process. Anything you think someone considering the move should evaluate before doing so -- but I'll be writing it from a "questions you should ask" perspective. It'll be interesting reading for the list too I think, so if nobody objects -- I see no reason to ask for these responses off list. Thanks! Susan H. From jimdettman at verizon.net Thu Jul 28 13:29:38 2011 From: jimdettman at verizon.net (Jim Dettman) Date: Thu, 28 Jul 2011 14:29:38 -0400 Subject: [AccessD] Article on upgrading In-Reply-To: <65F646A7C57044C1B8659201D3378B55@SusanHarkins> References: <65F646A7C57044C1B8659201D3378B55@SusanHarkins> Message-ID: Susan, 1. Does your database need to be available at all times? If so, then online backups are required and JET is not your answer. 2. How many hours worth of data can you afford to loose? If none or only an hour or two, then look to something other then JET. 3. How much data do you have? If tables with anything more then hundreds of thousands of rows, then be looking to something other then JET. 4. How many users do you have? Generally if more then 15-20, you want to be on something other then JET because if your DB corrupts, that many people not working is costly. For some of the above, they are not hard and fast rules. There are many of apps out there that go further in terms or user or records and work quite well. The above should be considered the starting point of where you should start becoming uncomfortable with using JET. Jim. -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Susan Harkins Sent: Thursday, July 28, 2011 12:55 PM To: Access Developers discussion and problem solving Subject: [AccessD] Article on upgrading I'll be writing about upgrading to SQL Server and I'd like to include as many of you in it as possible -- you'll get credit and a link -- it's a nice thing to show the boss and clients. The angle is -- questions you should ask when deciding whether to upgrade an Access database to SQL Server (Express is Okay too) -- specific to the decision-making process. Anything you think someone considering the move should evaluate before doing so -- but I'll be writing it from a "questions you should ask" perspective. It'll be interesting reading for the list too I think, so if nobody objects -- I see no reason to ask for these responses off list. Thanks! Susan H. -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From ssharkins at gmail.com Thu Jul 28 13:32:32 2011 From: ssharkins at gmail.com (Susan Harkins) Date: Thu, 28 Jul 2011 14:32:32 -0400 Subject: [AccessD] Article on upgrading References: Message-ID: These are reasons why you'd want to upgrade and could possibly be turned into decision-type questions. Thank you! Susan H. > Hi Susan > > Nice to see back doing tech writing! > > We've never had a client asking why, they all follow my advice(!) > So our reasons to suggest and upgrade: > > 1. Extreme reliability is requested. I have yet to see an SQL Server break > down. > 2. Remote access (across a WAN) is needed. > 3. Easy, daily, and reliable backup is requested even when clients are > on-line. > 4. Database size can be expected to outgrow Access' capability. > 5. Controlled and secure user access is requested. > > Note the non-tech level of these parameters. > > /gustav From dw-murphy at cox.net Thu Jul 28 13:33:56 2011 From: dw-murphy at cox.net (Doug Murphy) Date: Thu, 28 Jul 2011 11:33:56 -0700 Subject: [AccessD] Article on upgrading In-Reply-To: <65F646A7C57044C1B8659201D3378B55@SusanHarkins> References: <65F646A7C57044C1B8659201D3378B55@SusanHarkins> Message-ID: <006201cc4d54$e9283620$bb78a260$@cox.net> If you are moving from Access 2007 or 2010 and are using the attachment field type it will not upsize. I had a client who required this type of functionality and had to create similar functionality in SQL Server. As an aside we were having issues with the form with the attachment field being very slow in opening and updating. After getting rid of the attachment field and moving to a SQL server back end there was a significant increase in responsiveness. -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Susan Harkins Sent: Thursday, July 28, 2011 9:55 AM To: Access Developers discussion and problem solving Subject: [AccessD] Article on upgrading I'll be writing about upgrading to SQL Server and I'd like to include as many of you in it as possible -- you'll get credit and a link -- it's a nice thing to show the boss and clients. The angle is -- questions you should ask when deciding whether to upgrade an Access database to SQL Server (Express is Okay too) -- specific to the decision-making process. Anything you think someone considering the move should evaluate before doing so -- but I'll be writing it from a "questions you should ask" perspective. It'll be interesting reading for the list too I think, so if nobody objects -- I see no reason to ask for these responses off list. Thanks! Susan H. -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From ssharkins at gmail.com Thu Jul 28 13:35:44 2011 From: ssharkins at gmail.com (Susan Harkins) Date: Thu, 28 Jul 2011 14:35:44 -0400 Subject: [AccessD] Article on upgrading References: <65F646A7C57044C1B8659201D3378B55@SusanHarkins> Message-ID: <1E8BF7CA21694B89829105EA3573E2AB@SusanHarkins> Thank you Jim -- these are great! Susan H. > Susan, > > 1. Does your database need to be available at all times? If so, then > online > backups are required and JET is not your answer. > > 2. How many hours worth of data can you afford to loose? If none or only > an hour or two, then look to something other then JET. > > 3. How much data do you have? If tables with anything more then hundreds > of > thousands of rows, then be looking to something other then JET. > > 4. How many users do you have? Generally if more then 15-20, you want to > be > on something other then JET because if your DB corrupts, that many people > not working is costly. > > > For some of the above, they are not hard and fast rules. There are many > of apps out there that go further in terms or user or records and work > quite > well. The above should be considered the starting point of where you > should > start becoming uncomfortable with using JET. > > Jim. > > > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Susan Harkins > Sent: Thursday, July 28, 2011 12:55 PM > To: Access Developers discussion and problem solving > Subject: [AccessD] Article on upgrading > > I'll be writing about upgrading to SQL Server and I'd like to include as > many of you in it as possible -- you'll get credit and a link -- it's a > nice > thing to show the boss and clients. > > The angle is -- questions you should ask when deciding whether to upgrade > an > Access database to SQL Server (Express is Okay too) -- specific to the > decision-making process. Anything you think someone considering the move > should evaluate before doing so -- but I'll be writing it from a > "questions > you should ask" perspective. > > It'll be interesting reading for the list too I think, so if nobody > objects > -- I see no reason to ask for these responses off list. > > Thanks! > Susan H. > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com From rusty.hammond at cpiqpc.com Thu Jul 28 13:52:45 2011 From: rusty.hammond at cpiqpc.com (Rusty Hammond) Date: Thu, 28 Jul 2011 13:52:45 -0500 Subject: [AccessD] Article on upgrading In-Reply-To: <65F646A7C57044C1B8659201D3378B55@SusanHarkins> References: <65F646A7C57044C1B8659201D3378B55@SusanHarkins> Message-ID: <49A286ABF515E94A8505CD14DEB721701744A02B@CPIEMAIL-EVS1.CPIQPC.NET> Just off the top of my head: - Do they have network stability issues (ie computers losing connections, slow internet connection speeds, etc...) If so, if they think they need to go to SQL because the database is slow or the backend keeps getting corrupt, it may be they need to invest in the network and moving to SQL won't be required. - What kind of machine is the backend hosted on currently? Maybe an upgrade to that machine, or putting the backend on a more robust machine will take care of any issues. - Are they running a frontend/backend setup currently? Splitting up the database to a frontend and backend and putting copies of the frontend on each user computer may alleviate issues they may currently be having. - Is user level security becoming a requirement? Access security is easy to break and, if I remember correctly, non-existent in Access 2007 and 2010 - Using multiple versions of Access on your network to run your frontend? I've seen issues pop-up when different versions are hitting a backend and causing slowness and corruption in the backend. Moving to a SQL backend took care of the issues. - If they move to SQL, do they have a server? If not, a robust pc on a peer-to-peer network (Express only)? If not, are they willing to invest in one? - Are they hesitant to move to SQL because of cost? SQL Express is free. - Are they anticipating a lot of growth? Might be wise to make the move to SQL now so they aren't having to scramble to upgrade later. Rusty -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Susan Harkins Sent: Thursday, July 28, 2011 11:55 AM To: Access Developers discussion and problem solving Subject: [AccessD] Article on upgrading I'll be writing about upgrading to SQL Server and I'd like to include as many of you in it as possible -- you'll get credit and a link -- it's a nice thing to show the boss and clients. The angle is -- questions you should ask when deciding whether to upgrade an Access database to SQL Server (Express is Okay too) -- specific to the decision-making process. Anything you think someone considering the move should evaluate before doing so -- but I'll be writing it from a "questions you should ask" perspective. It'll be interesting reading for the list too I think, so if nobody objects -- I see no reason to ask for these responses off list. Thanks! Susan H. -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com ********************************************************************** WARNING: All e-mail sent to and from this address will be received, scanned or otherwise recorded by the CPI Qualified Plan Consultants, Inc. corporate e-mail system and is subject to archival, monitoring or review by, and/or disclosure to, someone other than the recipient. ********************************************************************** From jm.hwsn at gmail.com Thu Jul 28 14:06:00 2011 From: jm.hwsn at gmail.com (jm.hwsn) Date: Thu, 28 Jul 2011 14:06:00 -0500 Subject: [AccessD] Article on upgrading In-Reply-To: <49A286ABF515E94A8505CD14DEB721701744A02B@CPIEMAIL-EVS1.CPIQPC.NET> References: <65F646A7C57044C1B8659201D3378B55@SusanHarkins> <49A286ABF515E94A8505CD14DEB721701744A02B@CPIEMAIL-EVS1.CPIQPC.NET> Message-ID: <4e31b319.8188ec0a.391e.4fa3@mx.google.com> All the ideas presented so far are great... some I never considered. I would be concerned about cost. As Rusty stated below, do they have a server is a major consideration. The cost of a server, the cost of the software and possibly the cost of an SQL Server Administrator if they don't have one on staff. - How many users are currently using the system and how many will use it once converted? - What is the time-line for conversion? 2-months, 6 months or longer - Do the PCs currently being used need to be upgraded/replaced once the conversion is completed? If the conversion is six months away, is the current plan to replace the user machines adequate? - If the major consideration is performance, then upgrading to Express is a viable option if all things are static. Express has a 4GB data limit so that might also be a consideration. Jim H. -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Rusty Hammond Sent: Thursday, July 28, 2011 1:53 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Article on upgrading Just off the top of my head: - Do they have network stability issues (ie computers losing connections, slow internet connection speeds, etc...) If so, if they think they need to go to SQL because the database is slow or the backend keeps getting corrupt, it may be they need to invest in the network and moving to SQL won't be required. - What kind of machine is the backend hosted on currently? Maybe an upgrade to that machine, or putting the backend on a more robust machine will take care of any issues. - Are they running a frontend/backend setup currently? Splitting up the database to a frontend and backend and putting copies of the frontend on each user computer may alleviate issues they may currently be having. - Is user level security becoming a requirement? Access security is easy to break and, if I remember correctly, non-existent in Access 2007 and 2010 - Using multiple versions of Access on your network to run your frontend? I've seen issues pop-up when different versions are hitting a backend and causing slowness and corruption in the backend. Moving to a SQL backend took care of the issues. - If they move to SQL, do they have a server? If not, a robust pc on a peer-to-peer network (Express only)? If not, are they willing to invest in one? - Are they hesitant to move to SQL because of cost? SQL Express is free. - Are they anticipating a lot of growth? Might be wise to make the move to SQL now so they aren't having to scramble to upgrade later. Rusty -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Susan Harkins Sent: Thursday, July 28, 2011 11:55 AM To: Access Developers discussion and problem solving Subject: [AccessD] Article on upgrading I'll be writing about upgrading to SQL Server and I'd like to include as many of you in it as possible -- you'll get credit and a link -- it's a nice thing to show the boss and clients. The angle is -- questions you should ask when deciding whether to upgrade an Access database to SQL Server (Express is Okay too) -- specific to the decision-making process. Anything you think someone considering the move should evaluate before doing so -- but I'll be writing it from a "questions you should ask" perspective. It'll be interesting reading for the list too I think, so if nobody objects -- I see no reason to ask for these responses off list. Thanks! Susan H. -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com ********************************************************************** WARNING: All e-mail sent to and from this address will be received, scanned or otherwise recorded by the CPI Qualified Plan Consultants, Inc. corporate e-mail system and is subject to archival, monitoring or review by, and/or disclosure to, someone other than the recipient. ********************************************************************** -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From fuller.artful at gmail.com Thu Jul 28 14:08:49 2011 From: fuller.artful at gmail.com (Arthur Fuller) Date: Thu, 28 Jul 2011 15:08:49 -0400 Subject: [AccessD] Article on upgrading In-Reply-To: <2C78D5CF79B043E5A94FC45422B4A5C3@SusanHarkins> References: <65F646A7C57044C1B8659201D3378B55@SusanHarkins> <2C78D5CF79B043E5A94FC45422B4A5C3@SusanHarkins> Message-ID: First, why bother with the upgrade? Two potential answers: 1, Because the DB size limit is going to be a problem. In many cases this is not an issue, but my philosophy is, Plan For Success, according to which maxim what you originally thought were going to be 1K users turns out to be 1M users. 2, Deploy the initial virgin in MDB or AAcdb format, and hope that it works for the short-term. 3. Be prepared to go to SQL Server if you should be so lucky as to achieve success. (Fuller's fifth law: only successful apps require upgrades; the rest die on the vine). And these numbers remind me of the old joke: How many kinds of programmers are there? Three: those who can count and those who can't. A. On Thu, Jul 28, 2011 at 2:13 PM, Susan Harkins wrote: > This is good advice for actually performing an upgrade, but I'm looking for > questions you might ask when deciding whether you actually should or want to > upgrade -- see the difference? What kind of questions do you ask your > clients before you actually get there -- what kinds of questions do they ask > you when they begin to think about upgrading? > > Thanks Arthur! Please feel free to play again! ;) > Susan H. > > From ssharkins at gmail.com Thu Jul 28 14:17:15 2011 From: ssharkins at gmail.com (Susan Harkins) Date: Thu, 28 Jul 2011 15:17:15 -0400 Subject: [AccessD] Article on upgrading References: <65F646A7C57044C1B8659201D3378B55@SusanHarkins> <006201cc4d54$e9283620$bb78a260$@cox.net> Message-ID: Thanks for mentioning these issue Doug -- I wonder how many other folks are being snagged? Susan H. > If you are moving from Access 2007 or 2010 and are using the attachment > field type it will not upsize. I had a client who required this type of > functionality and had to create similar functionality in SQL Server. As an > aside we were having issues with the form with the attachment field being > very slow in opening and updating. After getting rid of the attachment > field > and moving to a SQL server back end there was a significant increase in > responsiveness. > > > I'll be writing about upgrading to SQL Server and I'd like to include as > many of you in it as possible -- you'll get credit and a link -- it's a > nice > thing to show the boss and clients. > From ssharkins at gmail.com Thu Jul 28 14:18:17 2011 From: ssharkins at gmail.com (Susan Harkins) Date: Thu, 28 Jul 2011 15:18:17 -0400 Subject: [AccessD] Article on upgrading References: <65F646A7C57044C1B8659201D3378B55@SusanHarkins> <49A286ABF515E94A8505CD14DEB721701744A02B@CPIEMAIL-EVS1.CPIQPC.NET> Message-ID: Well Rusty... are you trying to steal my job????????? ;) Thank you! Susan H. > Just off the top of my head: > > - Do they have network stability issues (ie computers losing > connections, slow internet connection speeds, etc...) If so, if they > think they need to go to SQL because the database is slow or the backend > keeps getting corrupt, it may be they need to invest in the network and > moving to SQL won't be required. > > - What kind of machine is the backend hosted on currently? Maybe an > upgrade to that machine, or putting the backend on a more robust machine > will take care of any issues. > > - Are they running a frontend/backend setup currently? Splitting up the > database to a frontend and backend and putting copies of the frontend on > each user computer may alleviate issues they may currently be having. > > - Is user level security becoming a requirement? Access security is > easy to break and, if I remember correctly, non-existent in Access 2007 > and 2010 > > - Using multiple versions of Access on your network to run your > frontend? I've seen issues pop-up when different versions are hitting a > backend and causing slowness and corruption in the backend. Moving to a > SQL backend took care of the issues. > > - If they move to SQL, do they have a server? If not, a robust pc on a > peer-to-peer network (Express only)? If not, are they willing to invest > in one? > > - Are they hesitant to move to SQL because of cost? SQL Express is > free. > > - Are they anticipating a lot of growth? Might be wise to make the move > to SQL now so they aren't having to scramble to upgrade later. > > > Rusty > > > I'll be writing about upgrading to SQL Server and I'd like to include as > many of you in it as possible -- you'll get credit and a link -- it's a > nice thing to show the boss and clients. From ssharkins at gmail.com Thu Jul 28 14:16:38 2011 From: ssharkins at gmail.com (Susan Harkins) Date: Thu, 28 Jul 2011 15:16:38 -0400 Subject: [AccessD] Article on upgrading References: <65F646A7C57044C1B8659201D3378B55@SusanHarkins><2C78D5CF79B043E5A94FC45422B4A5C3@SusanHarkins> Message-ID: <467DB63A6DBA4FBAA3D30C3E4A9E4637@SusanHarkins> Thanks Arthur -- these are good -- :) Love your counting logic. :) Susan H. > First, why bother with the upgrade? Two potential answers: > 1, Because the DB size limit is going to be a problem. In many cases this > is > not an issue, but my philosophy is, Plan For Success, according to which > maxim what you originally thought were going to be 1K users turns out to > be > 1M users. > 2, Deploy the initial virgin in MDB or AAcdb format, and hope that it > works > for the short-term. > 3. Be prepared to go to SQL Server if you should be so lucky as to achieve > success. (Fuller's fifth law: only successful apps require upgrades; the > rest die on the vine). > > And these numbers remind me of the old joke: How many kinds of programmers > are there? Three: those who can count and those who can't. > > A. > > On Thu, Jul 28, 2011 at 2:13 PM, Susan Harkins > wrote: > >> This is good advice for actually performing an upgrade, but I'm looking >> for >> questions you might ask when deciding whether you actually should or want >> to >> upgrade -- see the difference? What kind of questions do you ask your >> clients before you actually get there -- what kinds of questions do they >> ask >> you when they begin to think about upgrading? >> >> Thanks Arthur! Please feel free to play again! ;) >> Susan H. >> >> > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com From ssharkins at gmail.com Thu Jul 28 14:19:06 2011 From: ssharkins at gmail.com (Susan Harkins) Date: Thu, 28 Jul 2011 15:19:06 -0400 Subject: [AccessD] Article on upgrading References: <65F646A7C57044C1B8659201D3378B55@SusanHarkins><49A286ABF515E94A8505CD14DEB721701744A02B@CPIEMAIL-EVS1.CPIQPC.NET> <4e31b319.8188ec0a.391e.4fa3@mx.google.com> Message-ID: <5FC2F1EA8EC84688A0D905A9EDF4C3EF@SusanHarkins> Thanks Jim -- you guys have provided some terrific thinking points! Susan H. > All the ideas presented so far are great... some I never considered. > > I would be concerned about cost. > > As Rusty stated below, do they have a server is a major consideration. > The cost of a server, the cost of the software and possibly the cost of an > SQL Server Administrator if they don't have one on staff. > > - How many users are currently using the system and how many will use it > once converted? > - What is the time-line for conversion? 2-months, 6 months or longer > - Do the PCs currently being used need to be upgraded/replaced once the > conversion is completed? If the conversion is six months away, is the > current plan to replace the user machines adequate? > - If the major consideration is performance, then upgrading to Express is > a > viable option if all things are static. Express has a 4GB data limit so > that might also be a consideration. > > From DWUTKA at Marlow.com Thu Jul 28 16:29:30 2011 From: DWUTKA at Marlow.com (Drew Wutka) Date: Thu, 28 Jul 2011 16:29:30 -0500 Subject: [AccessD] Article on upgrading In-Reply-To: References: Message-ID: I completely agree with Gustav's points, with one addition (that I can think of right now), and that would be database driven business logic. Ie, a record is put into table 1, then a record in table 2 is modified. Triggers. Drew -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: Thursday, July 28, 2011 1:29 PM To: accessd at databaseadvisors.com Subject: Re: [AccessD] Article on upgrading Hi Susan Nice to see back doing tech writing! We've never had a client asking why, they all follow my advice(!) So our reasons to suggest and upgrade: 1. Extreme reliability is requested. I have yet to see an SQL Server break down. 2. Remote access (across a WAN) is needed. 3. Easy, daily, and reliable backup is requested even when clients are on-line. 4. Database size can be expected to outgrow Access' capability. 5. Controlled and secure user access is requested. Note the non-tech level of these parameters. /gustav >>> ssharkins at gmail.com 28-07-2011 18:54:58 >>> I'll be writing about upgrading to SQL Server and I'd like to include as many of you in it as possible -- you'll get credit and a link -- it's a nice thing to show the boss and clients. The angle is -- questions you should ask when deciding whether to upgrade an Access database to SQL Server (Express is Okay too) -- specific to the decision-making process. Anything you think someone considering the move should evaluate before doing so -- but I'll be writing it from a "questions you should ask" perspective. It'll be interesting reading for the list too I think, so if nobody objects -- I see no reason to ask for these responses off list. Thanks! Susan H. -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com The information contained in this transmission is intended only for the person or entity to which it is addressed and may contain II-VI Proprietary and/or II-VI Business Sensitive material. If you are not the intended recipient, please contact the sender immediately and destroy the material in its entirety, whether electronic or hard copy. You are notified that any review, retransmission, copying, disclosure, dissemination, or other use of, or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. From darryl at whittleconsulting.com.au Thu Jul 28 18:38:16 2011 From: darryl at whittleconsulting.com.au (Darryl Collins) Date: Fri, 29 Jul 2011 09:38:16 +1000 Subject: [AccessD] Article on upgrading In-Reply-To: <65F646A7C57044C1B8659201D3378B55@SusanHarkins> References: <65F646A7C57044C1B8659201D3378B55@SusanHarkins> Message-ID: <000301cc4d7f$6cf62dc0$46e28940$@com.au> Hi Susan, For people starting out: I downloaded the brand new Denali CTP3 SQL Server Express yesterday. It is a good place to start for new users as it is fairly light and simple (as express used to be) and was totally painless to install (and that hasn't been the case in the past with SQL server installations. Only been a day so haven't had much time to play, but it has been great so far, at least on a Windows 7 PC. <> Happy. Cheers Darryl. -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Susan Harkins Sent: Friday, 29 July 2011 2:55 AM To: Access Developers discussion and problem solving Subject: [AccessD] Article on upgrading I'll be writing about upgrading to SQL Server and I'd like to include as many of you in it as possible -- you'll get credit and a link -- it's a nice thing to show the boss and clients. The angle is -- questions you should ask when deciding whether to upgrade an Access database to SQL Server (Express is Okay too) -- specific to the decision-making process. Anything you think someone considering the move should evaluate before doing so -- but I'll be writing it from a "questions you should ask" perspective. It'll be interesting reading for the list too I think, so if nobody objects -- I see no reason to ask for these responses off list. Thanks! Susan H. -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From darryl at whittleconsulting.com.au Thu Jul 28 18:40:58 2011 From: darryl at whittleconsulting.com.au (Darryl Collins) Date: Fri, 29 Jul 2011 09:40:58 +1000 Subject: [AccessD] Article on upgrading In-Reply-To: References: Message-ID: <000401cc4d7f$cd6c1660$68444320$@com.au> Triggers, Hell Yeah -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Drew Wutka Sent: Friday, 29 July 2011 7:30 AM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Article on upgrading I completely agree with Gustav's points, with one addition (that I can think of right now), and that would be database driven business logic. Ie, a record is put into table 1, then a record in table 2 is modified. Triggers. Drew -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: Thursday, July 28, 2011 1:29 PM To: accessd at databaseadvisors.com Subject: Re: [AccessD] Article on upgrading Hi Susan Nice to see back doing tech writing! We've never had a client asking why, they all follow my advice(!) So our reasons to suggest and upgrade: 1. Extreme reliability is requested. I have yet to see an SQL Server break down. 2. Remote access (across a WAN) is needed. 3. Easy, daily, and reliable backup is requested even when clients are on-line. 4. Database size can be expected to outgrow Access' capability. 5. Controlled and secure user access is requested. Note the non-tech level of these parameters. /gustav >>> ssharkins at gmail.com 28-07-2011 18:54:58 >>> I'll be writing about upgrading to SQL Server and I'd like to include as many of you in it as possible -- you'll get credit and a link -- it's a nice thing to show the boss and clients. The angle is -- questions you should ask when deciding whether to upgrade an Access database to SQL Server (Express is Okay too) -- specific to the decision-making process. Anything you think someone considering the move should evaluate before doing so -- but I'll be writing it from a "questions you should ask" perspective. It'll be interesting reading for the list too I think, so if nobody objects -- I see no reason to ask for these responses off list. Thanks! Susan H. -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com The information contained in this transmission is intended only for the person or entity to which it is addressed and may contain II-VI Proprietary and/or II-VI Business Sensitive material. If you are not the intended recipient, please contact the sender immediately and destroy the material in its entirety, whether electronic or hard copy. You are notified that any review, retransmission, copying, disclosure, dissemination, or other use of, or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From marksimms at verizon.net Fri Jul 29 09:27:54 2011 From: marksimms at verizon.net (Mark Simms) Date: Fri, 29 Jul 2011 10:27:54 -0400 Subject: [AccessD] SharePoint 2010 question(s) In-Reply-To: References: Message-ID: <000001cc4dfb$b5afa920$210efb60$@net> http://dmoffat.wordpress.com/2009/11/06/access-2010-and-sharepoint-welcome-t o-the-hybrid-access-application/ > > And what would that magic web site be? > From davidmcafee at gmail.com Fri Jul 29 11:30:55 2011 From: davidmcafee at gmail.com (David McAfee) Date: Fri, 29 Jul 2011 09:30:55 -0700 Subject: [AccessD] Article on upgrading In-Reply-To: <000401cc4d7f$cd6c1660$68444320$@com.au> References: <000401cc4d7f$cd6c1660$68444320$@com.au> Message-ID: 1. The ability to write comments in the SQL 2. The ability to do changes to data in the back end, without requiring a FE change. I know most will say that you can do this in Access too, but the FE should be for presentation of the data and a place to enter the data. Need to change a view or sproc? Change it, and as long as input parameters haven't changes, to tweaking is needed in the FE. 3. Speed 4. Ability to use UDF's 5. Stored Procedures! 6. Triggers, even though I try not to use them. I feel if the system is designed correctly, there is no reason for a trigger. Now if a system, such as an ERP, has stored procedures which are not allowed to be modified, then I can see a reason to use a trigger for a table that gets updated. 7. The ability to run scheduled jobs and back ups each night 8. The ability to email from the BE if certain conditions are found (new record found during a job ran at midnight) 9. Case statements in SQL I'm sure I can think of more reasons to use SQL :) On Thu, Jul 28, 2011 at 4:40 PM, Darryl Collins < darryl at whittleconsulting.com.au> wrote: > Triggers, Hell Yeah > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Drew Wutka > Sent: Friday, 29 July 2011 7:30 AM > To: Access Developers discussion and problem solving > Subject: Re: [AccessD] Article on upgrading > > I completely agree with Gustav's points, with one addition (that I can > think of right now), and that would be database driven business logic. > > Ie, a record is put into table 1, then a record in table 2 is modified. > Triggers. > > Drew > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Gustav Brock > Sent: Thursday, July 28, 2011 1:29 PM > To: accessd at databaseadvisors.com > Subject: Re: [AccessD] Article on upgrading > > Hi Susan > > Nice to see back doing tech writing! > > We've never had a client asking why, they all follow my advice(!) > So our reasons to suggest and upgrade: > > 1. Extreme reliability is requested. I have yet to see an SQL Server > break down. > 2. Remote access (across a WAN) is needed. > 3. Easy, daily, and reliable backup is requested even when clients are > on-line. > 4. Database size can be expected to outgrow Access' capability. > 5. Controlled and secure user access is requested. > > Note the non-tech level of these parameters. > > /gustav > > > >>> ssharkins at gmail.com 28-07-2011 18:54:58 >>> > I'll be writing about upgrading to SQL Server and I'd like to include as > many of you in it as possible -- you'll get credit and a link -- it's a > nice thing to show the boss and clients. > > The angle is -- questions you should ask when deciding whether to > upgrade an Access database to SQL Server (Express is Okay too) -- > specific to the decision-making process. Anything you think someone > considering the move should evaluate before doing so -- but I'll be > writing it from a "questions you should ask" perspective. > > It'll be interesting reading for the list too I think, so if nobody > objects -- I see no reason to ask for these responses off list. > > Thanks! > Susan H. > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > The information contained in this transmission is intended only for the > person or entity > to which it is addressed and may contain II-VI Proprietary and/or II-VI > Business > Sensitive material. If you are not the intended recipient, please contact > the sender > immediately and destroy the material in its entirety, whether electronic or > hard copy. > You are notified that any review, retransmission, copying, disclosure, > dissemination, > or other use of, or taking of any action in reliance upon this information > by persons > or entities other than the intended recipient is prohibited. > > > -- > 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 Fri Jul 29 12:40:12 2011 From: stuart at lexacorp.com.pg (Stuart McLachlan) Date: Sat, 30 Jul 2011 03:40:12 +1000 Subject: [AccessD] Article on upgrading In-Reply-To: References: , <000401cc4d7f$cd6c1660$68444320$@com.au>, Message-ID: <4E32F07C.16127.4C46D394@stuart.lexacorp.com.pg> Just to play Devil's Advocate :) - See comments in line -- Stuart On 29 Jul 2011 at 9:30, David McAfee wrote: > 1. The ability to write comments in the SQL > Access queries have a Description property which lets you store comments about the query. > 2. The ability to do changes to data in the back end, without > requiring a FE change. I know most will say that you can do this in > Access too, but the FE should be for presentation of the data and a > place to enter the data. Need to change a view or sproc? Change it, > and as long as input parameters haven't changes, to tweaking is needed > in the FE. Changes in an Access BE table are seen automatically by an Access FE. Changes in an SQL Server table are NOT seen automatically in an Access FE. You need to relink the FE to see the changes. > > 3. Speed > Sometimes. > 4. Ability to use UDF's > You can use Access functions in queries to an Access BE > 5. Stored Procedures! > VBA > 6. Triggers, even though I try not to use them. I feel if the system > is designed correctly, > there is no reason for a trigger. Now if a system, such as an ERP, > has > stored procedures > which are not allowed to be modified, then I can see a reason to > use a > trigger for a table > that gets updated. > Access 2010 has table macros/triggers. > 7. The ability to run scheduled jobs and back ups each night > I've been running scheduled jobs and backups with Access BEs since ver 97. Task Scheduler and command line arguments are your friend. > 8. The ability to email from the BE if certain conditions are found > (new record found during a job ran at midnight) > I've been writing functions to automatically email from Access based on various conditiions since ver 97. > 9. Case statements in SQL > Access queries can use IIF() and Access functions containing SELECT CASE and other more complex/powerful conditionals. > I'm sure I can think of more reasons to use SQL :) > From jwcolby at colbyconsulting.com Fri Jul 29 13:07:11 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Fri, 29 Jul 2011 14:07:11 -0400 Subject: [AccessD] Article on upgrading In-Reply-To: <65F646A7C57044C1B8659201D3378B55@SusanHarkins> References: <65F646A7C57044C1B8659201D3378B55@SusanHarkins> Message-ID: <4E32F6CF.5050207@colbyconsulting.com> What is the server that will host SQL Server. This needs to be asked particularly if you are installing SQL Server onto the server. Windows Server 2000 cannot support SQL Server 2008 or beyond. This has to do with not supporting the .Net frameworks required. So for Windows 2000 and below, SQL Server 2005 is a good as it gets. Know that SQL Server 2008 Express is actually the 2008 R2. This matters IF any other SQL Server 2008 instances are running that are not 2008 R2 because the two versions are *not* compatible. 2008R2 can handle the non-R2 files (and backups) but 2008 cannot handle R2 files and backups. Expect to learn SQL Server security! John W. Colby www.ColbyConsulting.com On 7/28/2011 12:54 PM, Susan Harkins wrote: > I'll be writing about upgrading to SQL Server and I'd like to include as many of you in it as possible -- you'll get credit and a link -- it's a nice thing to show the boss and clients. > > The angle is -- questions you should ask when deciding whether to upgrade an Access database to SQL Server (Express is Okay too) -- specific to the decision-making process. Anything you think someone considering the move should evaluate before doing so -- but I'll be writing it from a "questions you should ask" perspective. > > It'll be interesting reading for the list too I think, so if nobody objects -- I see no reason to ask for these responses off list. > > Thanks! > Susan H. From ssharkins at gmail.com Fri Jul 29 13:33:35 2011 From: ssharkins at gmail.com (Susan Harkins) Date: Fri, 29 Jul 2011 14:33:35 -0400 Subject: [AccessD] Article on upgrading References: <65F646A7C57044C1B8659201D3378B55@SusanHarkins> <4E32F6CF.5050207@colbyconsulting.com> Message-ID: Thanks John! Susan H. > What is the server that will host SQL Server. This needs to be asked > particularly if you are installing SQL Server onto the server. Windows > Server 2000 cannot support SQL Server 2008 or beyond. This has to do with > not supporting the .Net frameworks required. So for Windows 2000 and > below, SQL Server 2005 is a good as it gets. > > Know that SQL Server 2008 Express is actually the 2008 R2. This matters > IF any other SQL Server 2008 instances are running that are not 2008 R2 > because the two versions are *not* compatible. 2008R2 can handle the > non-R2 files (and backups) but 2008 cannot handle R2 files and backups. > > Expect to learn SQL Server security! > From davidmcafee at gmail.com Fri Jul 29 13:37:52 2011 From: davidmcafee at gmail.com (David McAfee) Date: Fri, 29 Jul 2011 11:37:52 -0700 Subject: [AccessD] Article on upgrading In-Reply-To: <4E32F07C.16127.4C46D394@stuart.lexacorp.com.pg> References: <000401cc4d7f$cd6c1660$68444320$@com.au> <4E32F07C.16127.4C46D394@stuart.lexacorp.com.pg> Message-ID: Stuart I agree with you on all topics. I've done things with Access that some people don't even know it's even possible to do, which is why those same people consider it a toy. in regards to #1, I meant inline comments as is done in VBA: INSERT INTO tblSomeTable (field1, field2...) SELECT field1, field2 FROM tblSomeWhereElse WHERE Something =1 AND HireDate > @SomeDate --Added on 1/1/2011 for some stupid reason AND SomeOtherReason = @TheCriteria --Added 7/1/2011 because someone decided this is now needed Another reason I love the inline comments is I've had some accountants have me add criteria, then question it 6 months later so I tend to put stuff in the stored procedure (used for a report) that reminds me so. --AND Status Flag IN ('A','R')-- old criteria prior to 6/9/2009 AND Status Flag IN ('A','R','V')--Added on 6/9/2009 as per chuck's email asking for this I love emailing them their original email asking for it to be changed. #2, I guess I'm used to dealing more with ADPs than MDBs. But this too, was worded badly. A stored procedure needs to be changed because a new table needs to be added or criteria changed in WHERE clause. If this was a non split mdb or if the user was creating the dynamic sql in the FE (not just access but VB/C# FE's too), the FE would have to be changed. SQL using ADPs or C#,VB.NET, Web FE's see the change instantly. #3 When have you seen access return a resultset faster than SQL? #4 Yes, you can use functions in the FE, but once again, if it can be done in the BE and does not slow it down, and allows changes without affecting the FE, I prefer doing it back there. #5 :) #6 They're still triggers. Bleh! :P #7 I do this too, but it is nice to have a built in feature that does this. #8 me too, but like I said above, it's nice to have something built in do this. #9 true, but it gets ugly when you have to do a lot of case statements. SELECT CASE WHEN X=0 THEN 'You are Royally Fd today!' CASE WHEN x=1 and Sky=blue and StarsInTheSky =0 THEN 'Its a perfect world' CASE WHEN x=1 and Sky = gray and StarsInTheSky=0 THEN 'MustBeMonday' CASE WHEN X=1 and Sky = black and StartsInTheSky =1 THEN 'Enjoy the night!' --Many more cases here ELSE 'Just a normal day' END AS TypeOfDay #10, Oh, I remember now, restore back in time!!!! I've never had to use this for reasons of my own but I've had other developers yell out "OH SHIT" when testing something on a live system and not use a transaction/rollback. no prob, restore to a point back in time, like 10 minutes. done. :) On Fri, Jul 29, 2011 at 10:40 AM, Stuart McLachlan wrote: > Just to play Devil's Advocate :) > - See comments in line > > -- > Stuart > > On 29 Jul 2011 at 9:30, David McAfee wrote: > > > 1. The ability to write comments in the SQL > > > > Access queries have a Description property which lets you store comments > about the query. > > > 2. The ability to do changes to data in the back end, without > > requiring a FE change. I know most will say that you can do this in > > Access too, but the FE should be for presentation of the data and a > > place to enter the data. Need to change a view or sproc? Change it, > > and as long as input parameters haven't changes, to tweaking is needed > > in the FE. > > Changes in an Access BE table are seen automatically by an Access FE. > Changes in an > SQL Server table are NOT seen automatically in an Access FE. You need to > relink the FE to > see the changes. > > > > > 3. Speed > > > > Sometimes. > > > 4. Ability to use UDF's > > > > You can use Access functions in queries to an Access BE > > > 5. Stored Procedures! > > > > VBA > > > 6. Triggers, even though I try not to use them. I feel if the system > > is designed correctly, > > there is no reason for a trigger. Now if a system, such as an ERP, > > has > > stored procedures > > which are not allowed to be modified, then I can see a reason to > > use a > > trigger for a table > > that gets updated. > > > > Access 2010 has table macros/triggers. > > > 7. The ability to run scheduled jobs and back ups each night > > > > I've been running scheduled jobs and backups with Access BEs since ver 97. > Task > Scheduler and command line arguments are your friend. > > > 8. The ability to email from the BE if certain conditions are found > > (new record found during a job ran at midnight) > > > > I've been writing functions to automatically email from Access based on > various conditiions > since ver 97. > > > 9. Case statements in SQL > > > > Access queries can use IIF() and Access functions containing SELECT CASE > and other > more complex/powerful conditionals. > > > > I'm sure I can think of more reasons to use SQL :) > > > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > From darryl at whittleconsulting.com.au Sun Jul 31 22:28:26 2011 From: darryl at whittleconsulting.com.au (Darryl Collins) Date: Mon, 1 Aug 2011 13:28:26 +1000 Subject: [AccessD] rsR("order") vs rsR!Order In-Reply-To: References: <000401cc4d7f$cd6c1660$68444320$@com.au> <4E32F07C.16127.4C46D394@stuart.lexacorp.com.pg> Message-ID: <000a01cc4ffb$149ef890$3ddce9b0$@com.au> Hi guys & Gals, Slower day at work today so I was poking around some code they use here in my new role and found this syntax when dealing with recordsets in Access VBA rsR.AddNew rsR("order") = rsM("order") rsR("sheetname") = rsM("sheetname") rsR("sheetnumber") = rsM("sheetnumber") rsR.Update It is very, ummm, MS Excel in style, but it does work ok and update the recordset(s) correctly. However I would have written it like: With rsR .AddNew !order = rsM!order !sheetname = rsM!sheetname !sheetnumber = rsM!sheetnumber !Update End with Not withstanding then with / end with bit. What is the advantage (if any) of one syntax over the other? Is one method faster? Actually, Why does the first syntax even work? I would have though you would have had to use the ! method, but very clearly I am totally wrong on that count. I had not seen code used like that before for MS Access recordsets. Maybe I need to get out more? Your thoughts? Cheers Darryl From dbdoug at gmail.com Fri Jul 1 00:47:36 2011 From: dbdoug at gmail.com (Doug Steele) Date: Thu, 30 Jun 2011 22:47:36 -0700 Subject: [AccessD] OT - FW: New computer In-Reply-To: References: <4DFAA63E.50506@colbyconsulting.com> <23775347AAAD47329496777628D6A927@HAL9005> <4DFAD4F0.9090504@colbyconsulting.com> <4DFB4DB9.9050804@colbyconsulting.com> <661A04F55F074D77BC065B3718B90850@HAL9005> <4DFB6633.3020703@colbyconsulting.com> Message-ID: I think so, but I haven't done any real work with the usb setup. I'll report back when I've had a chance to do a couple of days of testing. I have to totally reorganize my workspace to do this, so it may be a while.... Doug On Thu, Jun 30, 2011 at 8:34 PM, Jim Lawrence wrote: > Ha ha, one is just not good enough anymore. ;-) > ...but do you find the USB video cards basically a good deal? > > Jim > > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Doug Steele > Sent: Thursday, June 30, 2011 10:28 AM > To: Access Developers discussion and problem solving > Subject: Re: [AccessD] OT - FW: New computer > > I just received a StarTech USB2VGAE2 usb/video adapter. ?I got a > 'refurbished' one for CAD$69 (plus a rip-off $26 in shipping!). ?It > works pretty well; I'm using it to connect 2 large monitors to my > laptop. ?The USB adapter is connected to a 19" widescreen monitor and > runs at 1680x1050. ?The video is definitely slower on the USB > connected monitor - when you move a window, for example, the edges get > 'jaggies'. ?But the speed is quite acceptable for the kind of work I > do - I'm not going to be playing games on it. > > The only problem I've had is that the driver gets a bit confused > sometimes when you change the graphics setup - like the monitor > positions, or which monitor is the master. ?I discovered that I have > to disable the USB monitor, set the laptop and connected monitor, then > re-enable the USB monitor and set it up. ?Not a big deal. > > It's kind of fun to have three screens running at once - makes me feel > ever so productive. ?An illusion, of course. > > Doug > > On Sun, Jun 19, 2011 at 8:00 AM, Jim Lawrence wrote: >> Hi Doug: >> >> I was just the installer but the screens worked fast enough for doing POS >> work. I doubt whether this configuration will ever replace a DVI > connection >> directly to a high-performance video card but they are quite sufficient > for >> basic office work and the ease of installation is their plus. >> >> Jim >> >> >> >> -----Original Message----- >> From: accessd-bounces at databaseadvisors.com >> [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Doug Steele >> Sent: Friday, June 17, 2011 11:59 AM >> To: Access Developers discussion and problem solving >> Subject: Re: [AccessD] OT - FW: New computer >> >> Do you have any experience or information on these? ?I'd like to run 2 >> big screens off a laptop, but I saw commentary on the Internet that >> they can be so slow as to be useless. >> >> Thanks, >> Doug >> >> On Fri, Jun 17, 2011 at 10:29 AM, Jim Lawrence wrote: >>> Just a note; There are now a little video-chipset block that can just be >>> inserted into any USB slot and can connect another monitor to a computer. >>> >>> See here: http://www.startech.com/product-list/usb-vga-video-adapters >>> >>> The price runs from 60 to 150 per monitor. You can even use them with POE >> to >>> run remote video and camera feeds. >> -- >> 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 BradM at blackforestltd.com Fri Jul 1 13:26:32 2011 From: BradM at blackforestltd.com (Brad Marks) Date: Fri, 1 Jul 2011 13:26:32 -0500 Subject: [AccessD] Pulling Data from Excel into Access with "Automation" References: <201107010022.p610MKvQ022864@databaseadvisors.com> Message-ID: Steve, William, Darryl, Thanks for the help with my questions. The advice that you provided has helped me move forward. Below is a stripped down snippet of the Access 2007 VBA code that I put together based on the advice you provided. I am going to post it here in case some other "newbie" is looking for the very "basic basics" and I am posting it here to see if anyone sees a problem with the direction that I am heading. Thanks again, Brad PS. I also ordered a book on this subject. '~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Sub Pull_Data_From_Excel_Into_Access() Dim XLApp As Excel.Application Dim XLWorkbook As Excel.Workbook Dim XLSheet As Excel.Worksheet Dim Str_Value_in_Cell As Variant Set XLApp = CreateObject("Excel.Application") XLApp.Workbooks.Open ("C:\Book1.xlsx") XLApp.Visible = True ''' to see Spreadsheet Set XLWorkbook = XLApp.Workbooks(1) Set XLSheet = XLWorkbook.Sheets(1) Str_Value_in_Cell = XLSheet.Cells(1, 1).Value MsgBox Str_Value_in_Cell End Sub '~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ From vbacreations at gmail.com Fri Jul 1 15:46:19 2011 From: vbacreations at gmail.com (William Benson (VBACreations.Com)) Date: Fri, 1 Jul 2011 16:46:19 -0400 Subject: [AccessD] Pulling Data from Excel into Access with "Automation" In-Reply-To: References: <201107010022.p610MKvQ022864@databaseadvisors.com> Message-ID: <001a01cc382f$eeb501c0$cc1f0540$@gmail.com> Nice going Brad, I suggest Set XLWorkbook = XLApp.Activeworkbook, rather than Workbooks(1) in case there is a Personal.xls/m workbook opening with every instance of the user's Excel. But better still is Test the opening of the workbook, in case the path is wrong or the network won't give it up Set XLWorkbook = XLApp.Workbooks.Open ("C:\Book1.xlsx") If Not XLWorkbook is Nothing 'Go on End if And now you get the fun of dealing with Value and Value2 as properties as well as Text property. More fun for dates than anything else. Consider too the GetObject (,"Excel.Application") ... which is written respectably into a function like Set XL = GetObject(, "Excel.Application") If XL Is Nothing Then Set XL = CreateObject("Excel.Application") End If Last, you might need App.Activate from time to time to bring the application you want into focus... AppActivate "Microsoft Access" Or AppActivate "Microsoft Excel" I am not sure if it really helps or not, but there is often an annoying flicker when I automate, and I don't recall if XL>VISIBLE = TRUE forces excel into the foreground of your windows, or just makes it appear should it happen to have focus. -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Brad Marks Sent: Friday, July 01, 2011 2:27 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Pulling Data from Excel into Access with "Automation" Steve, William, Darryl, Thanks for the help with my questions. The advice that you provided has helped me move forward. Below is a stripped down snippet of the Access 2007 VBA code that I put together based on the advice you provided. I am going to post it here in case some other "newbie" is looking for the very "basic basics" and I am posting it here to see if anyone sees a problem with the direction that I am heading. Thanks again, Brad PS. I also ordered a book on this subject. '~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Sub Pull_Data_From_Excel_Into_Access() Dim XLApp As Excel.Application Dim XLWorkbook As Excel.Workbook Dim XLSheet As Excel.Worksheet Dim Str_Value_in_Cell As Variant Set XLApp = CreateObject("Excel.Application") Set XLSheet = XLWorkbook.Sheets(1) Str_Value_in_Cell = XLSheet.Cells(1, 1).Value MsgBox Str_Value_in_Cell End Sub '~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From BradM at blackforestltd.com Fri Jul 1 15:49:41 2011 From: BradM at blackforestltd.com (Brad Marks) Date: Fri, 1 Jul 2011 15:49:41 -0500 Subject: [AccessD] Pulling Data from Excel into Access with "Automation" References: <201107010022.p610MKvQ022864@databaseadvisors.com> <001a01cc382f$eeb501c0$cc1f0540$@gmail.com> Message-ID: William, Thanks for the additional advice, I appreciate it. I am starting to have some fun with all of this. I can see many opportunities as the small firm that I work for uses a ton of Excel spreadsheets. Brad -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of William Benson (VBACreations.Com) Sent: Friday, July 01, 2011 3:46 PM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Pulling Data from Excel into Access with "Automation" Nice going Brad, I suggest Set XLWorkbook = XLApp.Activeworkbook, rather than Workbooks(1) in case there is a Personal.xls/m workbook opening with every instance of the user's Excel. But better still is Test the opening of the workbook, in case the path is wrong or the network won't give it up Set XLWorkbook = XLApp.Workbooks.Open ("C:\Book1.xlsx") If Not XLWorkbook is Nothing 'Go on End if And now you get the fun of dealing with Value and Value2 as properties as well as Text property. More fun for dates than anything else. Consider too the GetObject (,"Excel.Application") ... which is written respectably into a function like Set XL = GetObject(, "Excel.Application") If XL Is Nothing Then Set XL = CreateObject("Excel.Application") End If Last, you might need App.Activate from time to time to bring the application you want into focus... AppActivate "Microsoft Access" Or AppActivate "Microsoft Excel" I am not sure if it really helps or not, but there is often an annoying flicker when I automate, and I don't recall if XL>VISIBLE = TRUE forces excel into the foreground of your windows, or just makes it appear should it happen to have focus. -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Brad Marks Sent: Friday, July 01, 2011 2:27 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Pulling Data from Excel into Access with "Automation" Steve, William, Darryl, Thanks for the help with my questions. The advice that you provided has helped me move forward. Below is a stripped down snippet of the Access 2007 VBA code that I put together based on the advice you provided. I am going to post it here in case some other "newbie" is looking for the very "basic basics" and I am posting it here to see if anyone sees a problem with the direction that I am heading. Thanks again, Brad PS. I also ordered a book on this subject. '~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Sub Pull_Data_From_Excel_Into_Access() Dim XLApp As Excel.Application Dim XLWorkbook As Excel.Workbook Dim XLSheet As Excel.Worksheet Dim Str_Value_in_Cell As Variant Set XLApp = CreateObject("Excel.Application") Set XLSheet = XLWorkbook.Sheets(1) Str_Value_in_Cell = XLSheet.Cells(1, 1).Value MsgBox Str_Value_in_Cell End Sub '~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -- 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 has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. From stuart at lexacorp.com.pg Fri Jul 1 16:57:41 2011 From: stuart at lexacorp.com.pg (Stuart McLachlan) Date: Sat, 02 Jul 2011 07:57:41 +1000 Subject: [AccessD] Pulling Data from Excel into Access with "Automation" In-Reply-To: References: <201107010022.p610MKvQ022864@databaseadvisors.com>, Message-ID: <4E0E42D5.32026.D4817AA@stuart.lexacorp.com.pg> ONly change I'd make is: Dim Str_Value_in_Cell As Variant I'd make that Var_Value_in_Cell :-) -- Stuart On 1 Jul 2011 at 13:26, Brad Marks wrote: > Steve, William, Darryl, > > Thanks for the help with my questions. > > The advice that you provided has helped me move forward. > > Below is a stripped down snippet of the Access 2007 VBA code that I > put together based on the advice you provided. > > I am going to post it here in case some other "newbie" is looking for > the very "basic basics" and I am posting it here to see if anyone sees > a problem with the direction that I am heading. > > Thanks again, > Brad > > PS. I also ordered a book on this subject. > > '~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > Sub Pull_Data_From_Excel_Into_Access() > > Dim XLApp As Excel.Application > > Dim XLWorkbook As Excel.Workbook > > Dim XLSheet As Excel.Worksheet > > Dim Str_Value_in_Cell As Variant > > Set XLApp = CreateObject("Excel.Application") > > XLApp.Workbooks.Open ("C:\Book1.xlsx") > > XLApp.Visible = True ''' to see Spreadsheet > > Set XLWorkbook = XLApp.Workbooks(1) > > Set XLSheet = XLWorkbook.Sheets(1) > > Str_Value_in_Cell = XLSheet.Cells(1, 1).Value > > MsgBox Str_Value_in_Cell > > End Sub > > '~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > From BradM at blackforestltd.com Fri Jul 1 19:29:08 2011 From: BradM at blackforestltd.com (Brad Marks) Date: Fri, 1 Jul 2011 19:29:08 -0500 Subject: [AccessD] Pulling Data from Excel into Access with "Automation" References: <201107010022.p610MKvQ022864@databaseadvisors.com>, <4E0E42D5.32026.D4817AA@stuart.lexacorp.com.pg> Message-ID: Stuart, Yes, you are right. After three decades of COBOL, I am still adjusting to "working storage" prefixes. :-) Brad -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Stuart McLachlan Sent: Friday, July 01, 2011 4:58 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Pulling Data from Excel into Access with "Automation" ONly change I'd make is: Dim Str_Value_in_Cell As Variant I'd make that Var_Value_in_Cell :-) -- Stuart On 1 Jul 2011 at 13:26, Brad Marks wrote: > Steve, William, Darryl, > > Thanks for the help with my questions. > > The advice that you provided has helped me move forward. > > Below is a stripped down snippet of the Access 2007 VBA code that I > put together based on the advice you provided. > > I am going to post it here in case some other "newbie" is looking for > the very "basic basics" and I am posting it here to see if anyone sees > a problem with the direction that I am heading. > > Thanks again, > Brad > > PS. I also ordered a book on this subject. > > '~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > Sub Pull_Data_From_Excel_Into_Access() > > Dim XLApp As Excel.Application > > Dim XLWorkbook As Excel.Workbook > > Dim XLSheet As Excel.Worksheet > > Dim Str_Value_in_Cell As Variant > > Set XLApp = CreateObject("Excel.Application") > > XLApp.Workbooks.Open ("C:\Book1.xlsx") > > XLApp.Visible = True ''' to see Spreadsheet > > Set XLWorkbook = XLApp.Workbooks(1) > > Set XLSheet = XLWorkbook.Sheets(1) > > Str_Value_in_Cell = XLSheet.Cells(1, 1).Value > > MsgBox Str_Value_in_Cell > > End Sub > > '~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > > -- > 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 has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. From vbacreations at gmail.com Fri Jul 1 20:58:06 2011 From: vbacreations at gmail.com (William Benson (VBACreations.Com)) Date: Fri, 1 Jul 2011 21:58:06 -0400 Subject: [AccessD] Pulling Data from Excel into Access with "Automation" In-Reply-To: References: <201107010022.p610MKvQ022864@databaseadvisors.com>, <4E0E42D5.32026.D4817AA@stuart.lexacorp.com.pg> Message-ID: <001f01cc385b$7d651e20$782f5a60$@gmail.com> OK, I am leaving the subject line the same, because this was (and mostly is) an awesome automation exercise, which in fact I will send to Brad after I perfect it. I have built a tool for examining all fields and the occurrence rate of distinct values those fields have, within Excel data. Chiefly, from within all worksheets among open workbooks. There is an option to store this info for easy reference later, or to clear it out and/or refresh it later. One thing I like to use it for is examining data when there are way too many excel rows to look at cleanly and the number of distinct items exceeds what Excel will show in the autofilter drop down. I also plan to use this to build Access tables on the fly from the data in a worksheet, and then save specific sheets to CSV, perhaps building import specs on the fly using Duane Hookom's identification of the required tables for maintaining import specs. But I have an annoying glitch which I have solved through a UDF workaround but I feel I should not have to do that. Maybe someone can read through this for the likely issue. Or at least reassure me I have no alternative but the UDF. Which is fast enough, I suppose - but I would think that the UDF will be calculated with every row in the result, whereas the parameters I wanted to use would have been calculated by Access only once then used for every row). Basic structure is: 4 controls: Lst0 shows open workbooks Lst1 shows worksheets which have data in row 1, from the workbook chosen in Lst0 LstFields shows all the column headers on worksheet = Lst1 LstValues shows all distinct values in lstField ... and the number of occurrences. I store the info in a local table and refresh when desired (workbooks have to be open in order To populate the listboxes. My Problem: When creating SQL for the rowsource for lstValues, I tried to reference listbox columns - but was told by Access that was a syntax error. QUESTION! (I don't know if something like this is supposed to work or not: ws = forms!frmCreateTableFromExcel!lst1.column(0, lst1.listindex) - but it don't. I think maybe because listindex can be -1 and there's no value and that is a problem. Here is the complete rowsource SQL SELECT WB, WS, Fld, [Values], Items FROM Tbl_Field_Values WHERE WB = forms!frmCreateTableFromExcel!lst0 and ws = forms!frmCreateTableFromExcel!lst1 and fld = forms!frmCreateTableFromExcel!lstfields So I switched to ws = forms!frmCreateTableFromExcel!lst1.column(0, lst1.listindex). That brought good results except that for some reason I don't quite understand, the value property of the lstFields listbox was not adjusting when a statement like lstFields.Selected(i) = was used to select a different value in the listbox. Sure enough the _AfterUpdate event would fire, but a test of lstFields.Value would show the same value every time, regardless. That seems evil and wrong to me! ==snippet - lstFields.Value didn't change when each row was made the selection. For i = 0 To lstFields.ListCount - 1 lstFields.Selected(i) = True 'no impact on .Value apparently. debug.print lstFields Next K, how I solved this, now tell me if I am craze... I used a UDF in the rowsource, which called the values out of those columns -- which the query wouldn't let me refer to by themselves: my new RowSource is: SELECT WB, WS, Fld, [Values], Items FROM Tbl_Field_Values WHERE WB = ValuefromList("WB") and ws = ValuefromList("WS") and fld = ValuefromList("Fields") 'Here's the function Function ValuefromList(str As String) As String Dim frm As Form Dim strval As String On Error Resume Next Set frm = Screen.ActiveForm If Not frm Is Nothing Then Dim c As Control Set c = frm.Controls("Lst" & str) If Not c Is Nothing Then If c.ListIndex >= 0 Then strval = c.Column(0, c.ListIndex) End If End If End If ValuefromList = strval End Function From vbacreations at gmail.com Fri Jul 1 21:04:23 2011 From: vbacreations at gmail.com (William Benson (VBACreations.Com)) Date: Fri, 1 Jul 2011 22:04:23 -0400 Subject: [AccessD] Pulling Data from Excel into Access with "Automation" References: <201107010022.p610MKvQ022864@databaseadvisors.com>, <4E0E42D5.32026.D4817AA@stuart.lexacorp.com.pg> Message-ID: <002001cc385c$5de1fd60$19a5f820$@gmail.com> There was a typo in the below. Where I said So I switched to ws = forms!frmCreateTableFromExcel!lst1.column(0, lst1.listindex) I meant to say So I switched FROM ws = forms!frmCreateTableFromExcel!lst1.column(0, lst1.listindex) Sorry about that. -----Original Message----- From: William Benson (VBACreations.Com) [mailto:vbacreations at gmail.com] Sent: Friday, July 01, 2011 9:58 PM To: Access Developers discussion and problem solving Subject: RE: [AccessD] Pulling Data from Excel into Access with "Automation" OK, I am leaving the subject line the same, because this was (and mostly is) an awesome automation exercise, which in fact I will send to Brad after I perfect it. I have built a tool for examining all fields and the occurrence rate of distinct values those fields have, within Excel data. Chiefly, from within all worksheets among open workbooks. There is an option to store this info for easy reference later, or to clear it out and/or refresh it later. One thing I like to use it for is examining data when there are way too many excel rows to look at cleanly and the number of distinct items exceeds what Excel will show in the autofilter drop down. I also plan to use this to build Access tables on the fly from the data in a worksheet, and then save specific sheets to CSV, perhaps building import specs on the fly using Duane Hookom's identification of the required tables for maintaining import specs. But I have an annoying glitch which I have solved through a UDF workaround but I feel I should not have to do that. Maybe someone can read through this for the likely issue. Or at least reassure me I have no alternative but the UDF. Which is fast enough, I suppose - but I would think that the UDF will be calculated with every row in the result, whereas the parameters I wanted to use would have been calculated by Access only once then used for every row). Basic structure is: 4 controls: Lst0 shows open workbooks Lst1 shows worksheets which have data in row 1, from the workbook chosen in Lst0 LstFields shows all the column headers on worksheet = Lst1 LstValues shows all distinct values in lstField ... and the number of occurrences. I store the info in a local table and refresh when desired (workbooks have to be open in order To populate the listboxes. My Problem: When creating SQL for the rowsource for lstValues, I tried to reference listbox columns - but was told by Access that was a syntax error. QUESTION! (I don't know if something like this is supposed to work or not: ws = forms!frmCreateTableFromExcel!lst1.column(0, lst1.listindex) - but it don't. I think maybe because listindex can be -1 and there's no value and that is a problem. Here is the complete rowsource SQL SELECT WB, WS, Fld, [Values], Items FROM Tbl_Field_Values WHERE WB = forms!frmCreateTableFromExcel!lst0 and ws = forms!frmCreateTableFromExcel!lst1 and fld = forms!frmCreateTableFromExcel!lstfields So I switched to ws = forms!frmCreateTableFromExcel!lst1.column(0, lst1.listindex). That brought good results except that for some reason I don't quite understand, the value property of the lstFields listbox was not adjusting when a statement like lstFields.Selected(i) = was used to select a different value in the listbox. Sure enough the _AfterUpdate event would fire, but a test of lstFields.Value would show the same value every time, regardless. That seems evil and wrong to me! ==snippet - lstFields.Value didn't change when each row was made the selection. For i = 0 To lstFields.ListCount - 1 lstFields.Selected(i) = True 'no impact on .Value apparently. debug.print lstFields Next K, how I solved this, now tell me if I am craze... I used a UDF in the rowsource, which called the values out of those columns -- which the query wouldn't let me refer to by themselves: my new RowSource is: SELECT WB, WS, Fld, [Values], Items FROM Tbl_Field_Values WHERE WB = ValuefromList("WB") and ws = ValuefromList("WS") and fld = ValuefromList("Fields") 'Here's the function Function ValuefromList(str As String) As String Dim frm As Form Dim strval As String On Error Resume Next Set frm = Screen.ActiveForm If Not frm Is Nothing Then Dim c As Control Set c = frm.Controls("Lst" & str) If Not c Is Nothing Then If c.ListIndex >= 0 Then strval = c.Column(0, c.ListIndex) End If End If End If ValuefromList = strval End Function From rockysmolin at bchacc.com Sat Jul 2 09:43:14 2011 From: rockysmolin at bchacc.com (Rocky Smolin) Date: Sat, 2 Jul 2011 07:43:14 -0700 Subject: [AccessD] Need a new printer? Cheap? Message-ID: <4AC76807705E4A688411F71D46A6C3FE@HAL9007> http://www.walmart.com/ip/Canon-PIXMA-MP250-Photo-All-In-One-Inkjet-Printer- Copier-Scanner-Value-Bundle/12534987?sourceid=06345287580503509743 &wmlspartner=tWsI2R5jHvk but god knows what the cartridges will cost. Rocky From marksimms at verizon.net Sat Jul 2 09:51:33 2011 From: marksimms at verizon.net (Mark Simms) Date: Sat, 02 Jul 2011 10:51:33 -0400 Subject: [AccessD] Pulling Data from Excel into Access with "Automation" In-Reply-To: <002001cc385c$5de1fd60$19a5f820$@gmail.com> References: <201107010022.p610MKvQ022864@databaseadvisors.com>, <4E0E42D5.32026.D4817AA@stuart.lexacorp.com.pg> <002001cc385c$5de1fd60$19a5f820$@gmail.com> Message-ID: <003b01cc38c7$89934840$9cb9d8c0$@net> Just reverse the Column property arguments: lst1.ListIndex should be first. > -----Original Message----- > From: accessd-bounces at databaseadvisors.com [mailto:accessd- > bounces at databaseadvisors.com] On Behalf Of William Benson > (VBACreations.Com) > Sent: Friday, July 01, 2011 10:04 PM > To: 'Access Developers discussion and problem solving' > Subject: Re: [AccessD] Pulling Data from Excel into Access with > "Automation" > > There was a typo in the below. Where I said > > So I switched to ws = > forms!frmCreateTableFromExcel!lst1.column(0, lst1.listindex) > > I meant to say > > So I switched FROM ws = forms!frmCreateTableFromExcel!lst1.column(0, > lst1.listindex) > > Sorry about that. > > > -----Original Message----- > From: William Benson (VBACreations.Com) [mailto:vbacreations at gmail.com] > Sent: Friday, July 01, 2011 9:58 PM > To: Access Developers discussion and problem solving > Subject: RE: [AccessD] Pulling Data from Excel into Access with > "Automation" > > OK, I am leaving the subject line the same, because this was (and > mostly is) > an awesome automation exercise, which in fact I will send to Brad after > I > perfect it. I have built a tool for examining all fields and the > occurrence > rate of distinct values those fields have, within Excel data. Chiefly, > from > within all worksheets among open workbooks. There is an option to store > this > info for easy reference later, or to clear it out and/or refresh it > later. > > One thing I like to use it for is examining data when there are way too > many > excel rows to look at cleanly and the number of distinct items exceeds > what > Excel will show in the autofilter drop down. I also plan to use this to > build Access tables on the fly from the data in a worksheet, and then > save > specific sheets to CSV, perhaps building import specs on the fly using > Duane > Hookom's identification of the required tables for maintaining import > specs. > But I have an annoying glitch which I have solved through a UDF > workaround > but I feel I should not have to do that. Maybe someone can read through > this > for the likely issue. Or at least reassure me I have no alternative but > the > UDF. Which is fast enough, I suppose - but I would think that the UDF > will > be calculated with every row in the result, whereas the parameters I > wanted > to use would have been calculated by Access only once then used for > every > row). > > Basic structure is: > > 4 controls: > Lst0 shows open workbooks > Lst1 shows worksheets which have data in row 1, from the workbook > chosen > in Lst0 > LstFields shows all the column headers on worksheet = Lst1 > LstValues shows all distinct values in lstField ... and the number > of > occurrences. > I store the info in a local table and refresh when desired > (workbooks > have to be open in order > To populate the listboxes. > > My Problem: > When creating SQL for the rowsource for lstValues, I tried to reference > listbox columns - but was told by Access that was a syntax error. > > QUESTION! > (I don't know if something like this is supposed to work or not: > ws = forms!frmCreateTableFromExcel!lst1.column(0, > lst1.listindex) - > but it don't. I think maybe because listindex can be -1 and there's no > value > and that is a problem. > > Here is the complete rowsource SQL > SELECT WB, WS, Fld, [Values], Items FROM Tbl_Field_Values > WHERE WB = forms!frmCreateTableFromExcel!lst0 > and ws = forms!frmCreateTableFromExcel!lst1 > and fld = forms!frmCreateTableFromExcel!lstfields > > > So I switched to ws = forms!frmCreateTableFromExcel!lst1.column(0, > lst1.listindex). That brought good results except that for some reason > I > don't quite understand, the value property of the lstFields listbox was > not > adjusting when a statement like lstFields.Selected(i) = was used to > select a > different value in the listbox. Sure enough the _AfterUpdate event > would > fire, but a test of lstFields.Value would show the same value every > time, > regardless. That seems evil and wrong to me! > ==snippet - lstFields.Value didn't change when each row was made > the > selection. > For i = 0 To lstFields.ListCount - 1 > lstFields.Selected(i) = True 'no impact on .Value > apparently. > debug.print lstFields > Next > > K, how I solved this, now tell me if I am craze... I used a UDF in the > rowsource, which called the values out of those columns -- which the > query > wouldn't let me refer to by themselves: my new RowSource is: > > SELECT WB, WS, Fld, [Values], Items FROM Tbl_Field_Values > WHERE WB = ValuefromList("WB") > and ws = ValuefromList("WS") and > fld = ValuefromList("Fields") > > 'Here's the function > Function ValuefromList(str As String) As String Dim frm As Form Dim > strval > As String On Error Resume Next Set frm = Screen.ActiveForm If Not frm > Is > Nothing Then > Dim c As Control > Set c = frm.Controls("Lst" & str) > If Not c Is Nothing Then > If c.ListIndex >= 0 Then > strval = c.Column(0, c.ListIndex) > End If > End If > End If > ValuefromList = strval > > End Function > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com From fuller.artful at gmail.com Sat Jul 2 12:06:08 2011 From: fuller.artful at gmail.com (Arthur Fuller) Date: Sat, 2 Jul 2011 13:06:08 -0400 Subject: [AccessD] Walk the DB Using ADO Message-ID: I know that I've written this code before, but due to a plethora of backup CDs and my habit of pruning what is not currently necessary from the current situation(s), I can't find the relevant code. And besides, I'm currently semi-retired, and working in hobbyist most not billable mode. Here's what I need, in ADO format if possible: For each t in CurrentDB( Tables ) For each f in t.fields For each a in f.Attributes ' could be Properties not Attributes Debug.Print a.Name, a.Value Next Next Next TIA, Arthur P.S. For years and years and years, I have used Rick Fisher's FindAndReplace, but now it's failing on me due to (I think) the fact that I'm running a 64-bit Windows, which doesn't like what he offers to install. In my retirement mode, I cannot afford to purchase more software. Maybe I could run a Windows 32-bit version of everything, then run F&R, then do what I need to do, then import the results back into 64-bit. Yuck. From jwcolby at colbyconsulting.com Sat Jul 2 12:29:27 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Sat, 02 Jul 2011 13:29:27 -0400 Subject: [AccessD] SQL Server - SSD / Rotating media - Side by side test results Message-ID: <4E0F5577.9060206@colbyconsulting.com> This morning I set out to do a little bit of real world testing to see what my SSD investment buys me. The following are some results. BTW if a SQL Server guru wants to actually gain remote access and run tests on my system I would welcome that. I am obviously not very talented as a SQL Server DBA and so a real DBA who has an interest is welcomed to tune and test. Anyway, I have a pair of databases that I will be testing with. One is my infamous "database from hell" called HSID, containing 51 million records with about 600 fields. The other is my HSIDAllAdults containing about 65 million Name and address fields. HSIDAllAdults is child to HSID, IOW it has a foreign key which contains the PK of HSID. Both databases have a clustered index on their autonumber PK. So... I have both of these databases on a four SSD RAID 0. I backed them up last night and restored them to the same name + _Rotatingmedia on my RAID6 volumes. So I have identical databases on a 4 SSD Raid 0 and a 6 disk RAID 6. I am now doing some comparative A/B runs of rather standard queries - similar to things I do routinely. I backed up the two databases last night just before upgrading the server. I restored both tha HSID and HSIDAllAdults this AM to the same rotating media location I normally hold the databases. I did not defrag the rotating media before doing the restore. I include the counts so that we can be assured that the actual data is identical between the SSD and rotating media DBs. HSIDAllAdults - has a pair of cover indexes each of which includes Address valid DBCC DROPCLEANBUFFERS SELECT AddrValid, COUNT(PK) AS Cnt FROM dbo.tblAllAdultNameAddr GROUP BY AddrValid SSD: 12 seconds ANK 635917 E 2918652 INV 936058 MOV 112093 PO 3780131 V 59074768 Rotating: 52 seconds ANK 635917 E 2918652 INV 936058 MOV 112093 PO 3780131 V 59074768 DBCC DROPCLEANBUFFERS SELECT COUNT(_DataHSID.dbo.tblHSID.PKID) AS Cnt, dbo.tblAllAdultNameAddr.AddrValid FROM dbo.tblAllAdultNameAddr INNER JOIN _DataHSID.dbo.tblHSID ON dbo.tblAllAdultNameAddr.PKHSID = _DataHSID.dbo.tblHSID.PKID GROUP BY dbo.tblAllAdultNameAddr.AddrValid SSD: 35 seconds 635917 ANK 2918652 E 936058 INV 112093 MOV 3780131 PO 59074768 V DBCC DROPCLEANBUFFERS SELECT COUNT(_DataHSID_RotatingMedia.dbo.tblHSID.PKID) AS Cnt, dbo.tblAllAdultNameAddr.AddrValid FROM _DataHSID_RotatingMedia.dbo.tblHSID INNER JOIN dbo.tblAllAdultNameAddr ON _DataHSID_RotatingMedia.dbo.tblHSID.PKID = dbo.tblAllAdultNameAddr.PKHSID GROUP BY dbo.tblAllAdultNameAddr.AddrValid Rotating: 1:00 635917 ANK 2918652 E 936058 INV 112093 MOV 3780131 PO 59074768 V The following appears to be a table scan which would be a "worst case". I just picked a field from HSID which we use occasionally. DBCC DROPCLEANBUFFERS SELECT COUNT(PKID) AS Cnt, Household_Occupation_code FROM dbo.tblHSID GROUP BY Household_Occupation_code Rotating: 7:06 35481479 NULL 7143021 10 11480 11 9780 12 37452 13 115093 20 2266292 21 501715 22 23724 23 1039660 30 1325728 40 1183311 50 8271 51 70318 52 2566 60 33157 61 28595 62 15305 70 511464 80 739340 90 609317 91 Rotating media: 1:05 35481479 NULL 7143021 10 11480 11 9780 12 37452 13 115093 20 2266292 21 501715 22 23724 23 1039660 30 1325728 40 1183311 50 8271 51 70318 52 2566 60 33157 61 28595 62 15305 70 511464 80 739340 90 609317 91 DBCC DROPCLEANBUFFERS SELECT COUNT(PKID) AS Cnt, Narrow_Income_Band FROM dbo.tblHSID GROUP BY Narrow_Income_Band SSD: 8 seconds 13824508 NULL 3762511 1 1675853 2 1015899 3 2307736 4 1031640 5 2595759 6 1069374 7 2662509 8 1100049 9 1055216 A 1026910 B 4285629 C 941494 D 862906 E 831573 F 2443917 G 738328 H 676959 I 478582 J 423856 K 1168819 L 371413 M 333796 N 249064 O 204771 P 708189 Q 193265 R 189413 S 2927130 T Rotating media: 10 seconds 13824508 NULL 3762511 1 1675853 2 1015899 3 2307736 4 1031640 5 2595759 6 1069374 7 2662509 8 1100049 9 1055216 A 1026910 B 4285629 C 941494 D 862906 E 831573 F 2443917 G 738328 H 676959 I 478582 J 423856 K 1168819 L 371413 M 333796 N 249064 O 204771 P 708189 Q 193265 R 189413 S 2927130 T I am going to stop for now. I have the rotating media copies and will leave them in place for awhile. If any real DBA wants to do some testing let me know. Obviously I have to know you. :) -- John W. Colby www.ColbyConsulting.com From jwcolby at colbyconsulting.com Sat Jul 2 13:36:42 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Sat, 02 Jul 2011 14:36:42 -0400 Subject: [AccessD] [dba-SQLServer] SQL Server - SSD / Rotating media - Side by side test results In-Reply-To: References: <4E0F5577.9060206@colbyconsulting.com> Message-ID: <4E0F653A.7070503@colbyconsulting.com> Arthur, There are definite cases where the gains are minimal, others where they are significant. The other thing is that I am intentionally clearing the cache before each test. The cache further minimizes the differences as it turns out. That is to be expected of course. This just goes to show the old axiom that throwing memory at SQL Server does a world of good. Without a shadow of a doubt, one thing that SSDs (and faster / better hardware in general) do is minimize the impact of ignorance and sloth. ;) I am not an accomplished DBA, and I simply do not have the time to become one. As a result I am unable to correctly tune my system. By throwing cores, memory and SSDs at the problem I manage to achieve respectable results in spite of myself. Hardware is cheap. My entire server cost somewhere in the neighborhood of $5K. Additionally I have dragged disk and RAID controllers forward through many upgrades. Back around 2005 I spent the then enormous sum of $1600 for three Areca raid controllers which I am still using today. I bought 10 1 TB drives back when they were $150, but I am still using them today. What I upgrade are the motherboards and more frequently the processors. In 2004 I started with single core AMD 3800 processors using Windows2003 X32 and 4 gigs of RAM. I built two systems for $4000! Moving up to dual and then quad cores, and Windows / SQL Server X64 and 8 GB RAM, then 16 gigs of ram. My latest motherboard / processor cost me (my client of course) about $700 (8 cores, with 24 cores possible) and 32 gigs of ram was about $1000. I was looking last night and another 32 GB of RAM (same modules) is now only $600! And... I am using my entire old server (quad core / 16 gigs ram) for a VM server. The point really is that while it is not a trivial amount spent over the years making these upgrades, over that same period I billed a couple of hundred thousand dollars. All these upgrades make me more and more productive, faster and faster getting the results back to the client. The client *loves me* precisely because he gets results back in hours instead of a week as his previous provider gave him. I program custom C# solutions (and bill him for the programming) which have enabled me to do orders literally in hours which (back in 2006) took me a full day or even two to get out. Counts which took an hour in 2004 now take my custom program 2 minutes. *AND* I have developed a system which allows him to send emails with zip lists as attachments. A program running on my server strips off the CSV attachment, generate counts, build a count spreadsheet, attach it to an email and send it back to him literally within 5 minutes of him pressing send *without* my doing anything. Again those counts used to take me an hour back when I did everything by hand. Now I log that a count came in and put a small charge in my billing database! The lesson for me is that my time is worth much more than the cost of the electronics and my response time is what makes me valuable to the client. I fully understand than everyone cannot solve all their problems by throwing hardware / custom software at it, but for a sole proprietor it just might be the only way! I don't have the time to be good at all the hats I wear! And so I do things like spend a thousand on SSDs on an educated guess that they will make a significant difference for an uneducated sloth. :) And finally, because the client loves me, he is sending me a *ton* more work! MORE CORES! MORE MEMORY! More SSDs! :):):) John W. Colby www.ColbyConsulting.com On 7/2/2011 1:48 PM, Arthur Fuller wrote: > I would be happy to assist. Judging by your IMO rather narrow result-gap (measured in a few > seconds), my initial guess would be that the SSHDs are not gaining you much over your investment in > CPU and RAM. However, that remains to be determined. Could be that table-scans or some other factor > are causing this lag. Should be that SSHD retrieves ought to be an order of magnitude quicker, but > according to your posted measurements they lag significantly behind that thumbnail benchmark. > > And besides all that, how are you? What's new with you and your family? > > A. From vbacreations at gmail.com Sat Jul 2 13:47:40 2011 From: vbacreations at gmail.com (William Benson (VBACreations.Com)) Date: Sat, 2 Jul 2011 14:47:40 -0400 Subject: [AccessD] Pulling Data from Excel into Access with "Automation" In-Reply-To: <003b01cc38c7$89934840$9cb9d8c0$@net> References: <201107010022.p610MKvQ022864@databaseadvisors.com>, <4E0E42D5.32026.D4817AA@stuart.lexacorp.com.pg> <002001cc385c$5de1fd60$19a5f820$@gmail.com> <003b01cc38c7$89934840$9cb9d8c0$@net> Message-ID: <003701cc38e8$85c57460$91505d20$@gmail.com> Hi Mark, I am having some doubts I will be able to refer to .ListIndex at all directly in the sql. As to your suggestion of reversing the arguments, I don't think that is correct. The way to refer to the nth item in the 1st column of a listbox is: lst1.column(0,n). Thus to get the value in the 1st column on the row identified with the listindex is lst1.column(0, lst1.listindex) I guess at heart, my only open question is why LstFields.VALUE does not change when I change the index of the Selected property from, say, 0 to 1. For i = 0 To lstFields.ListCount - 1 lstFields.Selected(i) = True debug.print lstFields 'seems to remain the same throughout loop. Next -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Mark Simms Sent: Saturday, July 02, 2011 10:52 AM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Pulling Data from Excel into Access with "Automation" Just reverse the Column property arguments: lst1.ListIndex should be first. From vbacreations at gmail.com Sat Jul 2 14:53:26 2011 From: vbacreations at gmail.com (William Benson (VBACreations.Com)) Date: Sat, 2 Jul 2011 15:53:26 -0400 Subject: [AccessD] How to tell a button's "air space" is no longer being hovered over Message-ID: <003b01cc38f1$b62edca0$228c95e0$@gmail.com> I have some code which changes the caption of a button when the user has the ctrl key pressed, set during the mousemove event for the button. I want however, that when the user leaves the "air space" for the button, then the caption reverts - regardless whether they still have shift held. I know I can use use the mousemove event associated with all surrounding controls to reset it, but I would like something more related to the control itself. Is there a method of testing that the user has moved the mouse outside the button's air space? I have a feeling I am going to be out of luck... From jwcolby at colbyconsulting.com Sat Jul 2 19:16:52 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Sat, 02 Jul 2011 20:16:52 -0400 Subject: [AccessD] Need a new printer? Cheap? In-Reply-To: <4AC76807705E4A688411F71D46A6C3FE@HAL9007> References: <4AC76807705E4A688411F71D46A6C3FE@HAL9007> Message-ID: <4E0FB4F4.1000003@colbyconsulting.com> http://www.4inkjets.com/Canon-PIXMA-MP250-printer-ink-cartridges-toner John W. Colby www.ColbyConsulting.com On 7/2/2011 10:43 AM, Rocky Smolin wrote: > http://www.walmart.com/ip/Canon-PIXMA-MP250-Photo-All-In-One-Inkjet-Printer- > Copier-Scanner-Value-Bundle/12534987?sourceid=06345287580503509743 From fuller.artful at gmail.com Sun Jul 3 03:29:14 2011 From: fuller.artful at gmail.com (Arthur Fuller) Date: Sun, 3 Jul 2011 04:29:14 -0400 Subject: [AccessD] Pulling Data from Excel into Access with "Automation" In-Reply-To: <003701cc38e8$85c57460$91505d20$@gmail.com> References: <201107010022.p610MKvQ022864@databaseadvisors.com> <4E0E42D5.32026.D4817AA@stuart.lexacorp.com.pg> <002001cc385c$5de1fd60$19a5f820$@gmail.com> <003b01cc38c7$89934840$9cb9d8c0$@net> <003701cc38e8$85c57460$91505d20$@gmail.com> Message-ID: That I think is because the value remains the content of column(o) despite what is selected. And that IMO is how it should respond, i.e. what is selected should not change the value. A. On Sat, Jul 2, 2011 at 2:47 PM, William Benson (VBACreations.Com) < vbacreations at gmail.com> wrote: > Hi Mark, > > I am having some doubts I will be able to refer to .ListIndex at all > directly in the sql. > > As to your suggestion of reversing the arguments, I don't think that is > correct. The way to refer to the nth item in the 1st column of a listbox > is: > lst1.column(0,n). Thus to get the value in the 1st column on the row > identified with the listindex is lst1.column(0, lst1.listindex) > > I guess at heart, my only open question is why LstFields.VALUE does not > change when I change the index of the Selected property from, say, 0 to 1. > > For i = 0 To lstFields.ListCount - 1 > lstFields.Selected(i) = True > debug.print lstFields 'seems to remain the same throughout loop. > Next > > From marksimms at verizon.net Sun Jul 3 10:03:53 2011 From: marksimms at verizon.net (Mark Simms) Date: Sun, 03 Jul 2011 11:03:53 -0400 Subject: [AccessD] Pulling Data from Excel into Access with "Automation" In-Reply-To: <003701cc38e8$85c57460$91505d20$@gmail.com> References: <201107010022.p610MKvQ022864@databaseadvisors.com>, <4E0E42D5.32026.D4817AA@stuart.lexacorp.com.pg> <002001cc385c$5de1fd60$19a5f820$@gmail.com> <003b01cc38c7$89934840$9cb9d8c0$@net> <003701cc38e8$85c57460$91505d20$@gmail.com> Message-ID: <003901cc3992$6d494ab0$47dbe010$@net> My bad....but below is referencing the array, not a specific item. debug.print lstFields 'seems to remain the same throughout try debug.print lstFields(0,i) if there are multiple columns(0=col#1) otherwise debug.print lstFields(i) should do the trick From marksimms at verizon.net Sun Jul 3 10:07:27 2011 From: marksimms at verizon.net (Mark Simms) Date: Sun, 03 Jul 2011 11:07:27 -0400 Subject: [AccessD] How to tell a button's "air space" is no longer being hovered over In-Reply-To: <003b01cc38f1$b62edca0$228c95e0$@gmail.com> References: <003b01cc38f1$b62edca0$228c95e0$@gmail.com> Message-ID: <003a01cc3992$ecac3920$c604ab60$@net> John Walk provided some code in his Excel book for doing this. http://spreadsheetpage.com/ It was very clever as I recall. From vbacreations at gmail.com Sun Jul 3 11:17:52 2011 From: vbacreations at gmail.com (William Benson (VBACreations.Com)) Date: Sun, 3 Jul 2011 12:17:52 -0400 Subject: [AccessD] How to tell a button's "air space" is no longer being hovered over In-Reply-To: <003a01cc3992$ecac3920$c604ab60$@net> References: <003b01cc38f1$b62edca0$228c95e0$@gmail.com> <003a01cc3992$ecac3920$c604ab60$@net> Message-ID: <000301cc399c$c32decb0$4989c610$@gmail.com> Hi Mark, I could not find it :-( Thanks. -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Mark Simms Sent: Sunday, July 03, 2011 11:07 AM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] How to tell a button's "air space" is no longer being hovered over John Walk provided some code in his Excel book for doing this. http://spreadsheetpage.com/ It was very clever as I recall. -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From jwcolby at colbyconsulting.com Sun Jul 3 11:56:54 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Sun, 03 Jul 2011 12:56:54 -0400 Subject: [AccessD] SSD, The Game Changer - SQL Man of Mystery - SQLServerCentral.com Message-ID: <4E109F56.809@colbyconsulting.com> -- John W. Colby www.ColbyConsulting.com http://www.sqlservercentral.com/blogs/sqlmanofmystery/archive/2009/04/14/ssd-the-game-changer.aspx From accessd at shaw.ca Sun Jul 3 14:13:03 2011 From: accessd at shaw.ca (Jim Lawrence) Date: Sun, 3 Jul 2011 12:13:03 -0700 Subject: [AccessD] SSD, The Game Changer - SQL Man of Mystery - SQLServerCentral.com In-Reply-To: <4E109F56.809@colbyconsulting.com> References: <4E109F56.809@colbyconsulting.com> Message-ID: <50EC560B45284179B622DA83C34395C8@creativesystemdesigns.com> Hi John: As your databases do not need do manage transaction queues or locks here is an example of just one of the NoSQL database MongoDB vs. SQL Server 2008 performance showdown comparison. http://tinyurl.com/38cofzg In the article it shows speeds over 100 times as fast when managing a fairly large amount of data but the performance just goes up exponentially when presented with even larger data sets. (1000x and more...) The Cassandra (NoSQL) database (http://cassandra.apache.org/) might be one of the best choices in this genre as it has the support of the big players like FaceBook, IBM, Apache etc... There is also an ever expanding group of experts and help forums (http://cassandra-user-incubator-apache-org.3065146.n2.nabble.com/) on this subject. To add to the functionality there is the new super scaling and searching tools called HPCC (http://gigaom.com/cloud/lexisnexis-open-sources-its-hadoop-killer/) which uses a combination of SQL and NoSQL when searching distributive data and clusters of data servers. In your future plans it might well be worth considering such an option especially as your data requirements and expected results continues to grow. Jim -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Sunday, July 03, 2011 9:57 AM To: Access Developers discussion and problem solving; VBA; Sqlserver-Dba Subject: [AccessD] SSD, The Game Changer - SQL Man of Mystery - SQLServerCentral.com -- John W. Colby www.ColbyConsulting.com http://www.sqlservercentral.com/blogs/sqlmanofmystery/archive/2009/04/14/ssd -the-game-changer.aspx -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From vbacreations at gmail.com Sun Jul 3 16:23:33 2011 From: vbacreations at gmail.com (William Benson (VBACreations.Com)) Date: Sun, 3 Jul 2011 17:23:33 -0400 Subject: [AccessD] Delete query... fast ... deleting from datasheet view ... slow Message-ID: <000901cc39c7$77461ae0$65d250a0$@gmail.com> Why is a query that deletes all records from a table so fast in comparison with a manual delete operation on a table that is opened in datasheet view? From jwcolby at colbyconsulting.com Sun Jul 3 16:41:18 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Sun, 03 Jul 2011 17:41:18 -0400 Subject: [AccessD] SSD, The Game Changer - SQL Man of Mystery - SQLServerCentral.com In-Reply-To: <50EC560B45284179B622DA83C34395C8@creativesystemdesigns.com> References: <4E109F56.809@colbyconsulting.com> <50EC560B45284179B622DA83C34395C8@creativesystemdesigns.com> Message-ID: <4E10E1FE.2010805@colbyconsulting.com> Jim, I read the first article and I don't see how it fits at all. 1) My data is very much a normal table, with rows and columns. In one case (the people table) there is a small number of columns, and most of the columns are fully populated. In the second table, there are pushing 700 fields and the columns are rarely fully populated. 2) The data is relational, though just barely. One of my people tables is directly related to the data table. All of my people tables may have people in the other tables. Eventually I will be pulling all of my people into a single table with pointers back to the non people data in the original table. 3) I rarely update the data. The people table is updated once per month as I validate the addresses looking for moves. I get about 1.5% / month moves. The data table is never updated, at least the data in the existing columns. Very occasionally I add new columns. 4) I only have a single user (myself) and I never expect to have more. In comparison, the NoSQL databases claim to store documents and make them searchable. Blog posts, web pages etc. They claim to be good as the numbers of people simultaneously *writing* to them climbs into the hundreds or thousands. So while the technology is fascinating, it hardly seems like a fit for my application. John W. Colby www.ColbyConsulting.com On 7/3/2011 3:13 PM, Jim Lawrence wrote: > Hi John: > > As your databases do not need do manage transaction queues or locks here is > an example of just one of the NoSQL database MongoDB vs. SQL Server 2008 > performance showdown comparison. > > http://tinyurl.com/38cofzg > > In the article it shows speeds over 100 times as fast when managing a fairly > large amount of data but the performance just goes up exponentially when > presented with even larger data sets. (1000x and more...) > > The Cassandra (NoSQL) database (http://cassandra.apache.org/) might be one > of the best choices in this genre as it has the support of the big players > like FaceBook, IBM, Apache etc... > > There is also an ever expanding group of experts and help forums > (http://cassandra-user-incubator-apache-org.3065146.n2.nabble.com/) on this > subject. > > To add to the functionality there is the new super scaling and searching > tools called HPCC > (http://gigaom.com/cloud/lexisnexis-open-sources-its-hadoop-killer/) which > uses a combination of SQL and NoSQL when searching distributive data and > clusters of data servers. > > In your future plans it might well be worth considering such an option > especially as your data requirements and expected results continues to grow. > > > Jim > > > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby > Sent: Sunday, July 03, 2011 9:57 AM > To: Access Developers discussion and problem solving; VBA; Sqlserver-Dba > Subject: [AccessD] SSD, The Game Changer - SQL Man of Mystery - > SQLServerCentral.com > > From stuart at lexacorp.com.pg Sun Jul 3 16:56:19 2011 From: stuart at lexacorp.com.pg (Stuart McLachlan) Date: Mon, 04 Jul 2011 07:56:19 +1000 Subject: [AccessD] Delete query... fast ... deleting from datasheet view ... slow In-Reply-To: <000901cc39c7$77461ae0$65d250a0$@gmail.com> References: <000901cc39c7$77461ae0$65d250a0$@gmail.com> Message-ID: <4E10E583.18446.179396DD@stuart.lexacorp.com.pg> A SWAG: Because Access can't tell that all the records are selected. It has to step through the rows and checking the "selected" attribute. That means that it can't implement a simple "Delete * >From tblA" but has to specify each of the records separately for deletion. -- Stuart On 3 Jul 2011 at 17:23, William Benson (VBACreations. wrote: > Why is a query that deletes all records from a table so fast in > comparison with a manual delete operation on a table that is opened in > datasheet view? > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > From accessd at shaw.ca Sun Jul 3 22:10:49 2011 From: accessd at shaw.ca (Jim Lawrence) Date: Sun, 3 Jul 2011 20:10:49 -0700 Subject: [AccessD] SSD, The Game Changer - SQL Man of Mystery - SQLServerCentral.com In-Reply-To: <4E10E1FE.2010805@colbyconsulting.com> References: <4E109F56.809@colbyconsulting.com> <50EC560B45284179B622DA83C34395C8@creativesystemdesigns.com> <4E10E1FE.2010805@colbyconsulting.com> Message-ID: Inline: -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Sunday, July 03, 2011 2:41 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] SSD, The Game Changer - SQL Man of Mystery - SQLServerCentral.com Jim, I read the first article and I don't see how it fits at all. * It fits very well. First in overview this database does not require a single PC to run the database. It is distributive in nature so you can just add nodes to a bunch of old new and old PCs. The main problem with the database as you have it now is that it is dependant on the hardware of a single box. Just like in 2006 the single CPU reached it maximum and multi-core processors were then created. Cassandra runs like a multi-core PC. When the database is running on numerous PCs it is like running a full RAID. 1) My data is very much a normal table, with rows and columns. In one case (the people table) there are a small number of columns, and most of the columns are fully populated. In the second table, there are pushing 700 fields and the columns are rarely fully populated. * Cassandra, for example, has a sparse data structure. This means columns can be over 2 billion (rows as well) wide (high), if required and the 'fields' do not have to be populated. At any time you can just insert another 'field' and there is no rebuild required or performance loss (It can all be done in real time). You can have your cake and eat it too. 2) The data is relational, though just barely. One of my people tables is directly related to the data table. All of my people tables may have people in the other tables. Eventually I will be pulling all of my people into a single table with pointers back to the non people data in the original able. * When you say barely relational that is what Cassandra is designed for. What you are describing in item 2 is exactly what type of database Cassandra is. It may not use SQL as we traditionally know it but it uses a system called 'map-reduce' which can quickly (very quickly) obtain the same results...it is data-mining tool on steroids. 3) I rarely update the data. The people table is updated once per month as I validate the addresses looking for moves. I get about 1.5% / month moves. The data table is never updated, at least the data in the existing columns. Very occasionally I add new columns. * Again, your requirements and description is matching Cassandra's design nature to a tee. 4) I only have a single user (myself) and I never expect to have more. * That does not matter if you are the only user. What does matter is that you can pull any data out of a huge mass of mix data fast and easy. You have noticed how Google can pull 365,000,000 hits in somewhere around 0.03 seconds. It is not because they have huge vertical super-powerful computers...their computer are but beaters in comparison but their database is spans hundreds of computers...just like Cassandra is capable of. In comparison, the NoSQL databases claim to store documents and make them searchable. Blog posts, web pages etc. They claim to be good as the numbers of people simultaneously *writing* to them climbs into the hundreds or thousands. So while the technology is fascinating, it hardly seems like a fit for my application. * You are right in all the above but with the exception that the Cassandra is a near perfect fit. To that end I will be starting my own Cassandra database system and just to see how it plays out. Here is a little video to watch that will do a lot to explain what and how Cassandra does things: http://video.disruptivecode.com/video/840645/what-makes-cassandra-trick. I think you will be pleasantly surprised. The product runs on any OS as all that it is needs is a copy of Java and Apache, which is free, downloads. http://www.quora.com/How-can-i-install-Apache-Cassandra-on-Windows-Operating -System John W. Colby www.ColbyConsulting.com On 7/3/2011 3:13 PM, Jim Lawrence wrote: > Hi John: > > As your databases do not need do manage transaction queues or locks here is > an example of just one of the NoSQL database MongoDB vs. SQL Server 2008 > performance showdown comparison. > > http://tinyurl.com/38cofzg > > In the article it shows speeds over 100 times as fast when managing a fairly > large amount of data but the performance just goes up exponentially when > presented with even larger data sets. (1000x and more...) > > The Cassandra (NoSQL) database (http://cassandra.apache.org/) might be one > of the best choices in this genre as it has the support of the big players > like FaceBook, IBM, Apache etc... > > There is also an ever expanding group of experts and help forums > (http://cassandra-user-incubator-apache-org.3065146.n2.nabble.com/) on this > subject. > > To add to the functionality there is the new super scaling and searching > tools called HPCC > (http://gigaom.com/cloud/lexisnexis-open-sources-its-hadoop-killer/) which > uses a combination of SQL and NoSQL when searching distributive data and > clusters of data servers. > > In your future plans it might well be worth considering such an option > especially as your data requirements and expected results continues to grow. > > > Jim From accessd at shaw.ca Sun Jul 3 22:47:18 2011 From: accessd at shaw.ca (Jim Lawrence) Date: Sun, 3 Jul 2011 20:47:18 -0700 Subject: [AccessD] SSD, The Game Changer - SQL Man of Mystery - SQLServerCentral.com In-Reply-To: References: <4E109F56.809@colbyconsulting.com> <50EC560B45284179B622DA83C34395C8@creativesystemdesigns.com> <4E10E1FE.2010805@colbyconsulting.com> Message-ID: <649B92906805469C8BEA4A9C9D96521A@creativesystemdesigns.com> PS: Another site showing how to install Cassandra on a Windows PC, in 10 minutes is: http://www.javageneration.com/?p=19 Jim -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Jim Lawrence Sent: Sunday, July 03, 2011 8:11 PM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] SSD, The Game Changer - SQL Man of Mystery - SQLServerCentral.com Inline: -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Sunday, July 03, 2011 2:41 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] SSD, The Game Changer - SQL Man of Mystery - SQLServerCentral.com Jim, I read the first article and I don't see how it fits at all. * It fits very well. First in overview this database does not require a single PC to run the database. It is distributive in nature so you can just add nodes to a bunch of old new and old PCs. The main problem with the database as you have it now is that it is dependant on the hardware of a single box. Just like in 2006 the single CPU reached it maximum and multi-core processors were then created. Cassandra runs like a multi-core PC. When the database is running on numerous PCs it is like running a full RAID. 1) My data is very much a normal table, with rows and columns. In one case (the people table) there are a small number of columns, and most of the columns are fully populated. In the second table, there are pushing 700 fields and the columns are rarely fully populated. * Cassandra, for example, has a sparse data structure. This means columns can be over 2 billion (rows as well) wide (high), if required and the 'fields' do not have to be populated. At any time you can just insert another 'field' and there is no rebuild required or performance loss (It can all be done in real time). You can have your cake and eat it too. 2) The data is relational, though just barely. One of my people tables is directly related to the data table. All of my people tables may have people in the other tables. Eventually I will be pulling all of my people into a single table with pointers back to the non people data in the original able. * When you say barely relational that is what Cassandra is designed for. What you are describing in item 2 is exactly what type of database Cassandra is. It may not use SQL as we traditionally know it but it uses a system called 'map-reduce' which can quickly (very quickly) obtain the same results...it is data-mining tool on steroids. 3) I rarely update the data. The people table is updated once per month as I validate the addresses looking for moves. I get about 1.5% / month moves. The data table is never updated, at least the data in the existing columns. Very occasionally I add new columns. * Again, your requirements and description is matching Cassandra's design nature to a tee. 4) I only have a single user (myself) and I never expect to have more. * That does not matter if you are the only user. What does matter is that you can pull any data out of a huge mass of mix data fast and easy. You have noticed how Google can pull 365,000,000 hits in somewhere around 0.03 seconds. It is not because they have huge vertical super-powerful computers...their computer are but beaters in comparison but their database is spans hundreds of computers...just like Cassandra is capable of. In comparison, the NoSQL databases claim to store documents and make them searchable. Blog posts, web pages etc. They claim to be good as the numbers of people simultaneously *writing* to them climbs into the hundreds or thousands. So while the technology is fascinating, it hardly seems like a fit for my application. * You are right in all the above but with the exception that the Cassandra is a near perfect fit. To that end I will be starting my own Cassandra database system and just to see how it plays out. Here is a little video to watch that will do a lot to explain what and how Cassandra does things: http://video.disruptivecode.com/video/840645/what-makes-cassandra-trick. I think you will be pleasantly surprised. The product runs on any OS as all that it is needs is a copy of Java and Apache, which is free, downloads. http://www.quora.com/How-can-i-install-Apache-Cassandra-on-Windows-Operating -System John W. Colby www.ColbyConsulting.com On 7/3/2011 3:13 PM, Jim Lawrence wrote: > Hi John: > > As your databases do not need do manage transaction queues or locks here is > an example of just one of the NoSQL database MongoDB vs. SQL Server 2008 > performance showdown comparison. > > http://tinyurl.com/38cofzg > > In the article it shows speeds over 100 times as fast when managing a fairly > large amount of data but the performance just goes up exponentially when > presented with even larger data sets. (1000x and more...) > > The Cassandra (NoSQL) database (http://cassandra.apache.org/) might be one > of the best choices in this genre as it has the support of the big players > like FaceBook, IBM, Apache etc... > > There is also an ever expanding group of experts and help forums > (http://cassandra-user-incubator-apache-org.3065146.n2.nabble.com/) on this > subject. > > To add to the functionality there is the new super scaling and searching > tools called HPCC > (http://gigaom.com/cloud/lexisnexis-open-sources-its-hadoop-killer/) which > uses a combination of SQL and NoSQL when searching distributive data and > clusters of data servers. > > In your future plans it might well be worth considering such an option > especially as your data requirements and expected results continues to grow. > > > Jim -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From charlotte.foust at gmail.com Sun Jul 3 23:59:39 2011 From: charlotte.foust at gmail.com (Charlotte Foust) Date: Sun, 3 Jul 2011 21:59:39 -0700 Subject: [AccessD] How to tell a button's "air space" is no longer being hovered over In-Reply-To: <003b01cc38f1$b62edca0$228c95e0$@gmail.com> References: <003b01cc38f1$b62edca0$228c95e0$@gmail.com> Message-ID: Darn, I've done this but I don't recall how, since it was back in Access 2.0 or maybe 97. One way to do it would be to put a shape or even a textbox under the button and just slightly larger than the button. Then you use the mousemove of the underlying control to switch the caption back. Charlotte Foust On Sat, Jul 2, 2011 at 12:53 PM, William Benson (VBACreations.Com) < vbacreations at gmail.com> wrote: > I have some code which changes the caption of a button when the user has > the > ctrl key pressed, set during the mousemove event for the button. > > I want however, that when the user leaves the "air space" for the button, > then the caption reverts - regardless whether they still have shift held. > > I know I can use use the mousemove event associated with all surrounding > controls to reset it, but I would like something more related to the > control > itself. > > Is there a method of testing that the user has moved the mouse outside the > button's air space? > > I have a feeling I am going to be out of luck... > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > > > Website: http://www.databaseadvisors.com > > > From vbacreations at gmail.com Mon Jul 4 01:15:40 2011 From: vbacreations at gmail.com (William Benson (VBACreations.Com)) Date: Mon, 4 Jul 2011 02:15:40 -0400 Subject: [AccessD] How to tell a button's "air space" is no longer being hovered over In-Reply-To: References: <003b01cc38f1$b62edca0$228c95e0$@gmail.com> Message-ID: <002101cc3a11$cd51ffe0$67f5ffa0$@gmail.com> That is not a bad idea at all Charlotte, I think I will do that! -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Charlotte Foust Sent: Monday, July 04, 2011 1:00 AM To: Access Developers discussion and problem solving Subject: Re: [AccessD] How to tell a button's "air space" is no longer being hovered over Darn, I've done this but I don't recall how, since it was back in Access 2.0 or maybe 97. One way to do it would be to put a shape or even a textbox under the button and just slightly larger than the button. Then you use the mousemove of the underlying control to switch the caption back. Charlotte Foust On Sat, Jul 2, 2011 at 12:53 PM, William Benson (VBACreations.Com) < vbacreations at gmail.com> wrote: > I have some code which changes the caption of a button when the user > has the ctrl key pressed, set during the mousemove event for the > button. > > I want however, that when the user leaves the "air space" for the > button, then the caption reverts - regardless whether they still have shift held. > > I know I can use use the mousemove event associated with all > surrounding controls to reset it, but I would like something more > related to the control itself. > > Is there a method of testing that the user has moved the mouse outside > the button's air space? > > I have a feeling I am going to be out of luck... > > > -- > 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 Mon Jul 4 03:11:35 2011 From: Gustav at cactus.dk (Gustav Brock) Date: Mon, 04 Jul 2011 10:11:35 +0200 Subject: [AccessD] Delete query... fast ... deleting from datasheet view ... slow Message-ID: Hi William and Stuart I don't think that's the reason, but it is similar: Access walks through the recordset (which may be filtered) and copies all records to a temp table to hold them in case you - when asked later via the GUI - choose to undo the operation. Only if you choose to confirm the deleting of the records, this actually takes place. /gustav >>> stuart at lexacorp.com.pg 03-07-2011 23:56 >>> A SWAG: Because Access can't tell that all the records are selected. It has to step through the rows and checking the "selected" attribute. That means that it can't implement a simple "Delete * >From tblA" but has to specify each of the records separately for deletion. -- Stuart On 3 Jul 2011 at 17:23, William Benson (VBACreations. wrote: > Why is a query that deletes all records from a table so fast in > comparison with a manual delete operation on a table that is opened in > datasheet view? From stuart at lexacorp.com.pg Mon Jul 4 04:19:36 2011 From: stuart at lexacorp.com.pg (Stuart McLachlan) Date: Mon, 04 Jul 2011 19:19:36 +1000 Subject: [AccessD] Delete query... fast ... deleting from datasheet view ... slow In-Reply-To: References: Message-ID: <4E1185A8.15835.1A05291B@stuart.lexacorp.com.pg> Good point, I didn't think of the confirmation of multiple deletes requiring a temp table. On 4 Jul 2011 at 10:11, Gustav Brock wrote: > Hi William and Stuart > > I don't think that's the reason, but it is similar: Access walks > through the recordset (which may be filtered) and copies all records > to a temp table to hold them in case you - when asked later via the > GUI - choose to undo the operation. Only if you choose to confirm the > deleting of the records, this actually takes place. > > /gustav > > > >>> stuart at lexacorp.com.pg 03-07-2011 23:56 >>> > A SWAG: > Because Access can't tell that all the records are selected. It has to > step through the rows and checking the "selected" attribute. That > means that it can't implement a simple "Delete * From tblA" but has > to specify each of the records separately for deletion. > > -- > Stuart > > On 3 Jul 2011 at 17:23, William Benson (VBACreations. wrote: > > > Why is a query that deletes all records from a table so fast in > > comparison with a manual delete operation on a table that is opened > > in datasheet view? > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > From Gustav at cactus.dk Mon Jul 4 04:50:15 2011 From: Gustav at cactus.dk (Gustav Brock) Date: Mon, 04 Jul 2011 11:50:15 +0200 Subject: [AccessD] SSD, The Game Changer - SQL Man of Mystery - SQLServerCentral.com Message-ID: Hi Jim But Casandra doesn't seem to be much .Net/C# friendly. Clients exist only for the old version 0.7, and both of these seem to provide nothing that come close to DataTableAdapters or the like (not to mention LINQ), only simple command-type access: http://aquiles.codeplex.com/ On the other hand, MongoDB seems to have proceeded further with NoRM: http://iridescence.no/post/NoSQL-Getting-started-with-MongoDB-and-NoRM.aspx /gustav >>> accessd at shaw.ca 04-07-2011 05:10 >>> Inline: -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Sunday, July 03, 2011 2:41 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] SSD, The Game Changer - SQL Man of Mystery - SQLServerCentral.com Jim, I read the first article and I don't see how it fits at all. * It fits very well. First in overview this database does not require a single PC to run the database. It is distributive in nature so you can just add nodes to a bunch of old new and old PCs. The main problem with the database as you have it now is that it is dependant on the hardware of a single box. Just like in 2006 the single CPU reached it maximum and multi-core processors were then created. Cassandra runs like a multi-core PC. When the database is running on numerous PCs it is like running a full RAID. 1) My data is very much a normal table, with rows and columns. In one case (the people table) there are a small number of columns, and most of the columns are fully populated. In the second table, there are pushing 700 fields and the columns are rarely fully populated. * Cassandra, for example, has a sparse data structure. This means columns can be over 2 billion (rows as well) wide (high), if required and the 'fields' do not have to be populated. At any time you can just insert another 'field' and there is no rebuild required or performance loss (It can all be done in real time). You can have your cake and eat it too. 2) The data is relational, though just barely. One of my people tables is directly related to the data table. All of my people tables may have people in the other tables. Eventually I will be pulling all of my people into a single table with pointers back to the non people data in the original able. * When you say barely relational that is what Cassandra is designed for. What you are describing in item 2 is exactly what type of database Cassandra is. It may not use SQL as we traditionally know it but it uses a system called 'map-reduce' which can quickly (very quickly) obtain the same results...it is data-mining tool on steroids. 3) I rarely update the data. The people table is updated once per month as I validate the addresses looking for moves. I get about 1.5% / month moves. The data table is never updated, at least the data in the existing columns. Very occasionally I add new columns. * Again, your requirements and description is matching Cassandra's design nature to a tee. 4) I only have a single user (myself) and I never expect to have more. * That does not matter if you are the only user. What does matter is that you can pull any data out of a huge mass of mix data fast and easy. You have noticed how Google can pull 365,000,000 hits in somewhere around 0.03 seconds. It is not because they have huge vertical super-powerful computers...their computer are but beaters in comparison but their database is spans hundreds of computers...just like Cassandra is capable of. In comparison, the NoSQL databases claim to store documents and make them searchable. Blog posts, web pages etc. They claim to be good as the numbers of people simultaneously *writing* to them climbs into the hundreds or thousands. So while the technology is fascinating, it hardly seems like a fit for my application. * You are right in all the above but with the exception that the Cassandra is a near perfect fit. To that end I will be starting my own Cassandra database system and just to see how it plays out. Here is a little video to watch that will do a lot to explain what and how Cassandra does things: http://video.disruptivecode.com/video/840645/what-makes-cassandra-trick.html. I think you will be pleasantly surprised. The product runs on any OS as all that it is needs is a copy of Java and Apache, which is free, downloads. http://www.quora.com/How-can-i-install-Apache-Cassandra-on-Windows-Operating-System John W. Colby www.ColbyConsulting.com On 7/3/2011 3:13 PM, Jim Lawrence wrote: > Hi John: > > As your databases do not need do manage transaction queues or locks here is > an example of just one of the NoSQL database MongoDB vs. SQL Server 2008 > performance showdown comparison. > > http://tinyurl.com/38cofzg > > In the article it shows speeds over 100 times as fast when managing a fairly > large amount of data but the performance just goes up exponentially when > presented with even larger data sets. (1000x and more...) > > The Cassandra (NoSQL) database (http://cassandra.apache.org/) might be one > of the best choices in this genre as it has the support of the big players > like FaceBook, IBM, Apache etc... > > There is also an ever expanding group of experts and help forums > (http://cassandra-user-incubator-apache-org.3065146.n2.nabble.com/) on this > subject. > > To add to the functionality there is the new super scaling and searching > tools called HPCC > (http://gigaom.com/cloud/lexisnexis-open-sources-its-hadoop-killer/) which > uses a combination of SQL and NoSQL when searching distributive data and > clusters of data servers. > > In your future plans it might well be worth considering such an option > especially as your data requirements and expected results continues to grow. > > > Jim From vbacreations at gmail.com Mon Jul 4 04:51:30 2011 From: vbacreations at gmail.com (William Benson) Date: Mon, 4 Jul 2011 05:51:30 -0400 Subject: [AccessD] Delete query... fast ... deleting from datasheet view ... slow In-Reply-To: References: Message-ID: I will check again but I think what got me interested in the question was that ia manual delwte takes longer even taking into account just time AFTER the user confirms ok to continue without Undo. Where does Access store the temp table Gustav? In other words if you open a monstrously large table select all records and do several faux deletes one after another which you confirm but cancel at the "Continue without Undo?" Prompt....does the database bloat I wonder! I will check this when I get back to computer!_ Bill Benson Owner VBACreations, LLC On Jul 4, 2011 4:12 AM, "Gustav Brock" wrote: > Hi William and Stuart > > I don't think that's the reason, but it is similar: Access walks through the recordset (which may be filtered) and copies all records to a temp table to hold them in case you - when asked later via the GUI - choose to undo the operation. Only if you choose to confirm the deleting of the records, this actually takes place. > > /gustav > > >>>> stuart at lexacorp.com.pg 03-07-2011 23:56 >>> > A SWAG: > Because Access can't tell that all the records are selected. It has to step through the rows > and checking the "selected" attribute. That means that it can't implement a simple "Delete * > From tblA" but has to specify each of the records separately for deletion. > > -- > Stuart > > On 3 Jul 2011 at 17:23, William Benson (VBACreations. wrote: > >> Why is a query that deletes all records from a table so fast in >> comparison with a manual delete operation on a table that is opened in >> datasheet view? > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com From stuart at lexacorp.com.pg Mon Jul 4 05:45:20 2011 From: stuart at lexacorp.com.pg (Stuart McLachlan) Date: Mon, 04 Jul 2011 20:45:20 +1000 Subject: [AccessD] Delete query... fast ... deleting from datasheet view ... slow In-Reply-To: References: , Message-ID: <4E1199C0.16390.1A53A76F@stuart.lexacorp.com.pg> I suspect it is only stored in memory. On 4 Jul 2011 at 5:51, William Benson wrote: > > Where does Access store the temp table Gustav? In other words if you > open a monstrously large table select all records and do several faux > deletes one after another which you confirm but cancel at the > "Continue without Undo?" Prompt....does the database bloat I wonder! I > will check this when I get back to computer!_ > From Gustav at cactus.dk Mon Jul 4 06:23:55 2011 From: Gustav at cactus.dk (Gustav Brock) Date: Mon, 04 Jul 2011 13:23:55 +0200 Subject: [AccessD] Delete query... fast ... deleting from datasheet view ... slow Message-ID: Hi William and Stuart Yes in memory, if possible. If not, in some temp db in the temp folder of the current user of Windows. /gustav >>> stuart at lexacorp.com.pg 04-07-2011 12:45 >>> I suspect it is only stored in memory. On 4 Jul 2011 at 5:51, William Benson wrote: > > Where does Access store the temp table Gustav? In other words if you > open a monstrously large table select all records and do several faux > deletes one after another which you confirm but cancel at the > "Continue without Undo?" Prompt....does the database bloat I wonder! I > will check this when I get back to computer!_ From jimdettman at verizon.net Mon Jul 4 08:56:51 2011 From: jimdettman at verizon.net (Jim Dettman) Date: Mon, 04 Jul 2011 09:56:51 -0400 Subject: [AccessD] Delete query... fast ... deleting from datasheet view... slow In-Reply-To: References: Message-ID: Yes, the temp DB's are in the directory specified by TEMP and/or TMP and are prefixed with ~JET Not having TEMP or TMP set correctly can yield a "Disk or network I/O error" message. The UseTransactions property also comes into play as to how JET handles the delete as well as whether you have the DB opened exclusive or not. Also of note, if a remote ODBC DB is involved, you need to be careful with the delete queries. If you use anything in the query that is Access/JET specific (ie. a VBA expression) or a join to a local table, then JET ends up issuing one ODBC call for each row that it wants to delete instead of sending one SQL delete statement to the backend. Jim. -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: Monday, July 04, 2011 07:24 AM To: accessd at databaseadvisors.com Subject: Re: [AccessD] Delete query... fast ... deleting from datasheet view... slow Hi William and Stuart Yes in memory, if possible. If not, in some temp db in the temp folder of the current user of Windows. /gustav >>> stuart at lexacorp.com.pg 04-07-2011 12:45 >>> I suspect it is only stored in memory. On 4 Jul 2011 at 5:51, William Benson wrote: > > Where does Access store the temp table Gustav? In other words if you > open a monstrously large table select all records and do several faux > deletes one after another which you confirm but cancel at the > "Continue without Undo?" Prompt....does the database bloat I wonder! I > will check this when I get back to computer!_ -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From adtp at airtelmail.in Mon Jul 4 09:22:34 2011 From: adtp at airtelmail.in (A.D. Tejpal) Date: Mon, 4 Jul 2011 19:52:34 +0530 Subject: [AccessD] How to tell a button's "air space" is no longer beinghovered over References: <003b01cc38f1$b62edca0$228c95e0$@gmail.com> Message-ID: <471F6C8DAB244C66B0AB79536085B3EC@personal4a8ede> William, For detecting whether the mouse pointer has moved away from the control in question, you can use the MouseMove event of form section to which the said control belongs, for example: ' Code in form's module '============================= Private Sub Detail_MouseMove( _ Button As Integer, Shift As Integer, _ X As Single, Y As Single) ' <> End Sub '-------------------------------------------- Private Sub FormFooter_MouseMove( _ Button As Integer, Shift As Integer, _ X As Single, Y As Single) ' <> End Sub '-------------------------------------------- Private Sub FormHeader_MouseMove( _ Button As Integer, Shift As Integer, _ X As Single, Y As Single) ' <> End Sub '============================= Best wishes, A.D. Tejpal ------------ ----- Original Message ----- From: William Benson (VBACreations.Com) To: 'Access Developers discussion and problem solving' Sent: Sunday, July 03, 2011 01:23 Subject: [AccessD] How to tell a button's "air space" is no longer beinghovered over I have some code which changes the caption of a button when the user has the ctrl key pressed, set during the mousemove event for the button. I want however, that when the user leaves the "air space" for the button, then the caption reverts - regardless whether they still have shift held. I know I can use use the mousemove event associated with all surrounding controls to reset it, but I would like something more related to the control itself. Is there a method of testing that the user has moved the mouse outside the button's air space? I have a feeling I am going to be out of luck... From vbacreations at gmail.com Mon Jul 4 09:38:17 2011 From: vbacreations at gmail.com (William Benson (VBACreations.Com)) Date: Mon, 4 Jul 2011 10:38:17 -0400 Subject: [AccessD] Delete query... fast ... deleting from datasheet view ... slow In-Reply-To: References: Message-ID: <000e01cc3a58$040d3810$0c27a830$@gmail.com> Gustav and Stuart, After testing this, I don't think there is a temp table, at least not initially - and I doubt during or afterwards, either. The reason I conclude this is manifold. Primarily, because if you cancel instead of permitting the GUI to continue without UNDO, canceling the delete takes WAY less time than it would take to put the records back in a table. And if you're referring perhaps to some tiny temp table of records which might be deletable WITH THE ABILITY to undo, that is a far smaller chunk of data than the main bulk Access will ultimately delete when you allow it to proceed without undo. Furthermore, I have gone through the exercise I mentioned . Delete, No, Delete, No, . a dozen times or so and the database size never changes on disk. So I am pretty sure Access is storing data in RAM, not on Disk. And certainly it is not creating a temp table at any other time, since allowing it to delete all, or some (pressing Escape) records does not leave the database any bigger than before delete was pressed. I do lean towards the recordset walk however, that makes a lot of sense in terms of what behavior we observe. - Access is very slow to delete from large tables even when allowing it to continue without undo - Records are deleted exactly in the order in which they appear, top to bottom, in the block of selected records - Interrupting a deletion with the Escape key leaves you with whatever records Access didn't get to yet - Deleting Still gotta wonder why Jet would do it that way. With records selected, one would think there is some hidden "selected" flag which Access's delete operation could make use of, to write its own behind the scenes SQL that says "Delete from ThisTable where the UserSelectedMe flag = TRUE". and then delete the records as fast as a query does it! From: William Benson [mailto:vbacreations at gmail.com] Sent: Monday, July 04, 2011 5:52 AM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Delete query... fast ... deleting from datasheet view ... slow I will check again but I think what got me interested in the question was that ia manual delwte takes longer even taking into account just time AFTER the user confirms ok to continue without Undo. Where does Access store the temp table Gustav? In other words if you open a monstrously large table select all records and do several faux deletes one after another which you confirm but cancel at the "Continue without Undo?" Prompt....does the database bloat I wonder! I will check this when I get back to computer!_ Bill Benson Owner VBACreations, LLC On Jul 4, 2011 4:12 AM, "Gustav Brock" wrote: > Hi William and Stuart > > I don't think that's the reason, but it is similar: Access walks through the recordset (which may be filtered) and copies all records to a temp table to hold them in case you - when asked later via the GUI - choose to undo the operation. Only if you choose to confirm the deleting of the records, this actually takes place. > > /gustav > > >>>> stuart at lexacorp.com.pg 03-07-2011 23:56 >>> > A SWAG: > Because Access can't tell that all the records are selected. It has to step through the rows > and checking the "selected" attribute. That means that it can't implement a simple "Delete * > From tblA" but has to specify each of the records separately for deletion. > > -- > Stuart > > On 3 Jul 2011 at 17:23, William Benson (VBACreations. wrote: > >> Why is a query that deletes all records from a table so fast in >> comparison with a manual delete operation on a table that is opened in >> datasheet view? > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com From vbacreations at gmail.com Mon Jul 4 10:23:28 2011 From: vbacreations at gmail.com (William Benson (VBACreations.Com)) Date: Mon, 4 Jul 2011 11:23:28 -0400 Subject: [AccessD] How to tell a button's "air space" is no longer beinghovered over In-Reply-To: <471F6C8DAB244C66B0AB79536085B3EC@personal4a8ede> References: <003b01cc38f1$b62edca0$228c95e0$@gmail.com> <471F6C8DAB244C66B0AB79536085B3EC@personal4a8ede> Message-ID: <002001cc3a5e$5428d240$fc7a76c0$@gmail.com> A.D., Other controls are too near the button's bottom and it's top edge is pretty much as .Top = 0. I have put the code in the other controls already, similar to what you wrote. I was wondering if there was a way like to test the mousemove if the coordinates are exactly on bottom or top or at either side of the button, based on X, Y, or whatever... and if so, the caption is treated as if the mouse were outside it, and if not, use the caption that pertains to the moust being inside. During a normal mousemove operation the user will be headed out or headed into the interior of the button, so -- if on the way out, the last code to execute will be to reset the caption -- if on the way in, the code executing (probably continuously) will be to set the caption appropriate for interior of button But I don't think it is possible to get the event to faithfully fire exactly as the mouse is going over the edge of the button. Thanks a lot, Bill -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of A.D. Tejpal Sent: Monday, July 04, 2011 10:23 AM To: Access Developers discussion and problem solving Subject: Re: [AccessD] How to tell a button's "air space" is no longer beinghovered over William, For detecting whether the mouse pointer has moved away from the control in question, you can use the MouseMove event of form section to which the said control belongs, for example: ' Code in form's module '============================= Private Sub Detail_MouseMove( _ Button As Integer, Shift As Integer, _ X As Single, Y As Single) ' <> End Sub '-------------------------------------------- Private Sub FormFooter_MouseMove( _ Button As Integer, Shift As Integer, _ X As Single, Y As Single) ' <> End Sub '-------------------------------------------- Private Sub FormHeader_MouseMove( _ Button As Integer, Shift As Integer, _ X As Single, Y As Single) ' <> End Sub '============================= Best wishes, A.D. Tejpal ------------ ----- Original Message ----- From: William Benson (VBACreations.Com) To: 'Access Developers discussion and problem solving' Sent: Sunday, July 03, 2011 01:23 Subject: [AccessD] How to tell a button's "air space" is no longer beinghovered over I have some code which changes the caption of a button when the user has the ctrl key pressed, set during the mousemove event for the button. I want however, that when the user leaves the "air space" for the button, then the caption reverts - regardless whether they still have shift held. I know I can use use the mousemove event associated with all surrounding controls to reset it, but I would like something more related to the control itself. Is there a method of testing that the user has moved the mouse outside the button's air space? I have a feeling I am going to be out of luck... -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From accessd at shaw.ca Mon Jul 4 10:56:07 2011 From: accessd at shaw.ca (Jim Lawrence) Date: Mon, 4 Jul 2011 08:56:07 -0700 Subject: [AccessD] SSD, The Game Changer - SQL Man of Mystery -SQLServerCentral.com In-Reply-To: References: Message-ID: Hi Gustav: Good points. Like MongoDB needs the client NoRM so it can connect to .Net, Cassandra needs the client Thrift. There are other clients but Thrift seems to be the most popular probably because it was the first client. An aside: My son-in-law does a lot of work on Cassandra and he uses the client PHPCassa. It can either use Thrift as a plug-in or connect directly through PHP sockets. (As PHPCassa has just been released it is having some growing pains which should be resolved by the fall.) The below sample shows a system connecting through a Virtual drive and then connection to .Net. http://www.ridgway.co.za/archive/2009/11/06/net-developers-guide-to-getting- started-with-cassandra.aspx I have been considering which NoSQL, or more accurately, Map-Reduce instead of SQL, database to become involved with and Cassandra matched some very important points. When I get involved it will be for the long run so: 1. Cassandra has the largest group of fortune 500 companies supporting it. 2. Cassandra, like MongoDB is being supported by Microsoft. After Cassandra's, next major release, coming this summer, I would suspect that there will be a real and full .Net client to follow. In this region, there is a huge presents of Oracle on Linux/Unix/Windows but there appears to be some real limitations with what a vertical Database can do. There is only so powerful an HP Proliant or Dell that can be built and a number of clients have been hitting that wall. In addition, the Oracle licensing, costs are far greater than the servers. Just like single core CPUs hit the wall in 2006 so are large growing databases. In the near future, there will be some real opportunities for NoSQL experts. Jim -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: Monday, July 04, 2011 2:50 AM To: accessd at databaseadvisors.com Subject: Re: [AccessD] SSD, The Game Changer - SQL Man of Mystery -SQLServerCentral.com Hi Jim But Casandra doesn't seem to be much .Net/C# friendly. Clients exist only for the old version 0.7, and both of these seem to provide nothing that come close to DataTableAdapters or the like (not to mention LINQ), only simple command-type access: http://aquiles.codeplex.com/ On the other hand, MongoDB seems to have proceeded further with NoRM: http://iridescence.no/post/NoSQL-Getting-started-with-MongoDB-and-NoRM.aspx /gustav >>> accessd at shaw.ca 04-07-2011 05:10 >>> Inline: -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Sunday, July 03, 2011 2:41 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] SSD, The Game Changer - SQL Man of Mystery - SQLServerCentral.com Jim, I read the first article and I don't see how it fits at all. * It fits very well. First in overview this database does not require a single PC to run the database. It is distributive in nature so you can just add nodes to a bunch of old new and old PCs. The main problem with the database as you have it now is that it is dependant on the hardware of a single box. Just like in 2006 the single CPU reached it maximum and multi-core processors were then created. Cassandra runs like a multi-core PC. When the database is running on numerous PCs it is like running a full RAID. 1) My data is very much a normal table, with rows and columns. In one case (the people table) there are a small number of columns, and most of the columns are fully populated. In the second table, there are pushing 700 fields and the columns are rarely fully populated. * Cassandra, for example, has a sparse data structure. This means columns can be over 2 billion (rows as well) wide (high), if required and the 'fields' do not have to be populated. At any time you can just insert another 'field' and there is no rebuild required or performance loss (It can all be done in real time). You can have your cake and eat it too. 2) The data is relational, though just barely. One of my people tables is directly related to the data table. All of my people tables may have people in the other tables. Eventually I will be pulling all of my people into a single table with pointers back to the non people data in the original able. * When you say barely relational that is what Cassandra is designed for. What you are describing in item 2 is exactly what type of database Cassandra is. It may not use SQL as we traditionally know it but it uses a system called 'map-reduce' which can quickly (very quickly) obtain the same results...it is data-mining tool on steroids. 3) I rarely update the data. The people table is updated once per month as I validate the addresses looking for moves. I get about 1.5% / month moves. The data table is never updated, at least the data in the existing columns. Very occasionally I add new columns. * Again, your requirements and description is matching Cassandra's design nature to a tee. 4) I only have a single user (myself) and I never expect to have more. * That does not matter if you are the only user. What does matter is that you can pull any data out of a huge mass of mix data fast and easy. You have noticed how Google can pull 365,000,000 hits in somewhere around 0.03 seconds. It is not because they have huge vertical super-powerful computers...their computer are but beaters in comparison but their database is spans hundreds of computers...just like Cassandra is capable of. In comparison, the NoSQL databases claim to store documents and make them searchable. Blog posts, web pages etc. They claim to be good as the numbers of people simultaneously *writing* to them climbs into the hundreds or thousands. So while the technology is fascinating, it hardly seems like a fit for my application. * You are right in all the above but with the exception that the Cassandra is a near perfect fit. To that end I will be starting my own Cassandra database system and just to see how it plays out. Here is a little video to watch that will do a lot to explain what and how Cassandra does things: http://video.disruptivecode.com/video/840645/what-makes-cassandra-trick.html . I think you will be pleasantly surprised. The product runs on any OS as all that it is needs is a copy of Java and Apache, which is free, downloads. http://www.quora.com/How-can-i-install-Apache-Cassandra-on-Windows-Operating -System John W. Colby www.ColbyConsulting.com From vbacreations at gmail.com Mon Jul 4 11:02:58 2011 From: vbacreations at gmail.com (William Benson (VBACreations.Com)) Date: Mon, 4 Jul 2011 12:02:58 -0400 Subject: [AccessD] Delete query... fast ... deleting from datasheet view ... slow References: Message-ID: <000301cc3a63$da2bf930$8e83eb90$@gmail.com> Good news, I could get back to VBA by trying to press Ctrl-G as fast as I could while also pressing Enter . apparently there was just enough split-sec pause between "unrecognized database format" prompts - so that after about 50 tries I got into the VBA window and could do a Save before entering Application.Quit, which killed the application as desired. Then even though Access was no longer running, I could not open the database again. Was getting a message that user admin had left it in a state which it could not longer be opened or locked. I was like "huh? So I went to the temp folder and tried to either rename or delete the temp database found in there and couldn't mess with that either! So I rebooted my machine and then I could get into the database again (Thank God). But this is a continual problem for me when deleting large numbers of records .. even if I click No (do not continue without undo) I get a message You tried to commit or rollback a transaction without first beginning a transaction. I say OK to that, then the message is The changes you made can't be saved due to the temporary locking of the records by another user. Eh, come again? What user? Then I say OK to that then I get You tried to commit or rollback a transaction without first beginning a transaction. Again. Then I click OK, and sometimes that's the end of things, and sometimes it's just the beginning of my troubles. Painful. From vbacreations at gmail.com Mon Jul 4 11:04:52 2011 From: vbacreations at gmail.com (William Benson (VBACreations.Com)) Date: Mon, 4 Jul 2011 12:04:52 -0400 Subject: [AccessD] Delete query... fast ... deleting from datasheet view ... slow References: Message-ID: <000801cc3a64$1c8f8490$55ae8db0$@gmail.com> Long and short of it . I use delete queries for large number of rows, exclusively, from now on. :-0(((((((( From: William Benson (VBACreations.Com) [mailto:vbacreations at gmail.com] Sent: Monday, July 04, 2011 12:03 PM To: Access Developers discussion and problem solving Subject: RE: [AccessD] Delete query... fast ... deleting from datasheet view ... slow Good news, I could get back to VBA by trying to press Ctrl-G as fast as I could while also pressing Enter . apparently there was just enough split-sec pause between "unrecognized database format" prompts - so that after about 50 tries I got into the VBA window and could do a Save before entering Application.Quit, which killed the application as desired. Then even though Access was no longer running, I could not open the database again. Was getting a message that user admin had left it in a state which it could not longer be opened or locked. I was like "huh? So I went to the temp folder and tried to either rename or delete the temp database found in there and couldn't mess with that either! So I rebooted my machine and then I could get into the database again (Thank God). But this is a continual problem for me when deleting large numbers of records .. even if I click No (do not continue without undo) I get a message You tried to commit or rollback a transaction without first beginning a transaction. I say OK to that, then the message is The changes you made can't be saved due to the temporary locking of the records by another user. Eh, come again? What user? Then I say OK to that then I get You tried to commit or rollback a transaction without first beginning a transaction. Again. Then I click OK, and sometimes that's the end of things, and sometimes it's just the beginning of my troubles. Painful. From jwcolby at colbyconsulting.com Mon Jul 4 11:13:11 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Mon, 04 Jul 2011 12:13:11 -0400 Subject: [AccessD] SSD, The Game Changer - SQL Man of Mystery - SQLServerCentral.com In-Reply-To: References: Message-ID: <4E11E697.9050301@colbyconsulting.com> Jim / Gustav, In any case it seems like a forced fit if it fits at all. I read the blogs and they are talking about responding to millions of reads / writes of massive quantities of text by massive quantities of users, using tens of thousands of machines to distribute the load. Look at the users and who are they? Search engines and social network sites. From the web site that Gustav posted: MongoDB? ?MongoDB (from "humongous") is a scalable, high-performance, open source, schema-free, document-oriented database.? I don't see how this describes me in any way. http://www.michaelckennedy.net/blog/2010/04/22/TheNoSQLMovementLINQAndMongoDBOhMy.aspx to quote: "This move towards NoSQL is driven by pressure from two angles in the web application world: * Ease-of-use and deployment * Performance - especially when there are many writers as compared to the number of readers (think Twitter or Facebook)." I don't see how this describes me in any way. I am not opposed to using this, however I have to see that it somehow fits and I don't see that. 1) I don't have tens of thousands of machines to distribute the load. And never will! 2) I don't have tens of thousands of users trying to simultaneously read / write to the data store. And never will! 3) I am not storing large quantities of text (think blog text, web page text, pictures etc) per read / write. And never will! 4) I don't have, nor do I wish to maintain a bunch of old / new PCs as a huge network. These guys (Google etc) build entire data centers with highly replicable computers, but they do so for scalability and replicability (redundancy). They also have a megawatt power line coming in to their data center. They also spend a couple of hundred million building the data center. They also have hundreds or thousands of programmers writing their code. How does any of that sound like me? 5) I have spent a year building a pretty sophisticated system for taking data in SQL Server, huge quantities of records, and getting them exported out of the data store into CSVs, through a VM / third party software, and then back in to the server (updating thousands of addresses when people move). I have custom software to build orders and get selected sets of name / address records out to fixed width files. The selection process depends entirely on where clauses - where age in ('1','2','3') and Income in ('a','b','c') and MOB = 'Y' and... This is SQL stuff. It requires an easily manipulatable SQL language. When something doesn't work I need to have an environment that I can cut and paste my sql statements and troubleshoot them. My data has never touched a web page. In fact 99.9999999% of my data has never even been seen by human eyes, other than when it was originally entered by each person typing their name / address into a web site sime time in the last 10 years. *None of that* sounds like these systems (to me). These systems are designed precisely to take pages of data typed in by millions of users and store them in an efficient manner, then pull the entire thing back out millions of times to display on a web browser. Jim, I think these systems are the cat's meow for the purpose they are intended for, but my data and the way I use my data is just not that paradigm. In the meantime I have already built a hardware / software system that does what I want, and I did it on a budget that is remarkably small. Long term I spend around 2% of my income on hardware. Perhaps even 1%. And I did it with myself and a 3 hour / day part time programmer. I really don't get that throwing all that away to start over with a database designed to fit Google's / Facebook's needs is a good thing to do. To be honest, if I were starting from scratch, I don't think it would be the right tool. The fact that it is a million times faster at what it does doesn't matter if what it does isn't what I do. John W. Colby www.ColbyConsulting.com On 7/4/2011 5:50 AM, Gustav Brock wrote: > Hi Jim > > But Casandra doesn't seem to be much .Net/C# friendly. Clients exist only for the old version 0.7, and both of these seem to provide nothing that come close to DataTableAdapters or the like (not to mention LINQ), only simple command-type access: > > http://aquiles.codeplex.com/ > > On the other hand, MongoDB seems to have proceeded further with NoRM: > > http://iridescence.no/post/NoSQL-Getting-started-with-MongoDB-and-NoRM.aspx > > /gustav > > >>>> accessd at shaw.ca 04-07-2011 05:10>>> > Inline: > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby > Sent: Sunday, July 03, 2011 2:41 PM > To: Access Developers discussion and problem solving > Subject: Re: [AccessD] SSD, The Game Changer - SQL Man of Mystery - > SQLServerCentral.com > > Jim, > > I read the first article and I don't see how it fits at all. > > * It fits very well. First in overview this database does not require a > single PC to run the database. It is distributive in nature so you can just > add nodes to a bunch of old new and old PCs. The main problem with the > database as you have it now is that it is dependant on the hardware of a > single box. Just like in 2006 the single CPU reached it maximum and > multi-core processors were then created. Cassandra runs like a multi-core > PC. When the database is running on numerous PCs it is like running a full > RAID. From BradM at blackforestltd.com Mon Jul 4 13:53:23 2011 From: BradM at blackforestltd.com (Brad Marks) Date: Mon, 4 Jul 2011 13:53:23 -0500 Subject: [AccessD] What is the best way to grab fields from a report detail line so that they can be accessed in VBA? References: Message-ID: All, I want to grab the value of fields from report detail lines. Here is the method that I finally got to work. I open the report with a line like this... DoCmd.OpenReport "Report1", acViewPreview, "", "", acNormal I then grab the fields in the "On Print" Event This works, but I would like to know if this is the best method to do this. ~ ~ ~ ~ There rest of the story... Here is what I am trying to accomplish. I have a number of Access 2007 reports that employ "dynamic filters" via the use of "Report View" and the "Where Condition" when the report is opened. In other words, the filters are applied at the report level and not at the underlying query level. (There are buttons on the reports which open up a small form that is used to collect "filter info" and then re-open the report with the appropriate "Where Condition" based on the "filter info") Now there is a need to export the report data to Excel. Because of the complex nature of the reports, they do not Export very nicely to Excel (I have tried several approaches). I know that I could easily export from the underlying queries to Excel, but this type of export would not take into account the filters that are applied at the report level. Therefore, to export the exact data on the reports to Excel, I have started to experiment with grabbing the data from the report as it is being built. This is not ideal, but I can't seem to find a better method. Maybe others have run into this issue and have a better approach. Thanks for your assistance. Brad From marksimms at verizon.net Mon Jul 4 19:56:37 2011 From: marksimms at verizon.net (Mark Simms) Date: Mon, 04 Jul 2011 20:56:37 -0400 Subject: [AccessD] How to tell a button's "air space" is no longer beinghovered over In-Reply-To: <471F6C8DAB244C66B0AB79536085B3EC@personal4a8ede> References: <003b01cc38f1$b62edca0$228c95e0$@gmail.com> <471F6C8DAB244C66B0AB79536085B3EC@personal4a8ede> Message-ID: <003301cc3aae$64e3e840$2eabb8c0$@net> Easier said than done. You must add logic to detect when the mouse is moving INTO the object airspace... And then logic to detect when the mouse is moving OUT OF the airspace. It's called "Mouseover". Another detail that MSFT omitted in Office VBA. Sure would have been nice to have a Mouseover event handler...right ? > -----Original Message----- > From: accessd-bounces at databaseadvisors.com [mailto:accessd- > bounces at databaseadvisors.com] On Behalf Of A.D. Tejpal > Sent: Monday, July 04, 2011 10:23 AM > To: Access Developers discussion and problem solving > Subject: Re: [AccessD] How to tell a button's "air space" is no longer > beinghovered over > > William, > > For detecting whether the mouse pointer has moved away from the > control in question, you can use the MouseMove event of form section to > which the said control belongs, for example: > > ' Code in form's module > '============================= > Private Sub Detail_MouseMove( _ > Button As Integer, Shift As Integer, _ > X As Single, Y As Single) > > ' <> > > End Sub > '-------------------------------------------- > > Private Sub FormFooter_MouseMove( _ > Button As Integer, Shift As Integer, _ > X As Single, Y As Single) > > ' <> > > End Sub > '-------------------------------------------- > > Private Sub FormHeader_MouseMove( _ > Button As Integer, Shift As Integer, _ > X As Single, Y As Single) > > ' <> > > End Sub > '============================= > From dbdoug at gmail.com Mon Jul 4 20:16:43 2011 From: dbdoug at gmail.com (Doug Steele) Date: Mon, 4 Jul 2011 18:16:43 -0700 Subject: [AccessD] What is the best way to grab fields from a report detail line so that they can be accessed in VBA? In-Reply-To: References: Message-ID: Brad, what I do in similar circumstances is build and save the 'Where' string in the filtering form. In code, I take the original SQL for the report recordsource and add the Where string to it. I then save this new SQL into a temporary query and export it to Excel. Doug On Mon, Jul 4, 2011 at 11:53 AM, Brad Marks wrote: > All, > > I want to grab the value of fields from report detail lines. > > Here is the method that I finally got to work. > > I open the report with a line like this... > > DoCmd.OpenReport "Report1", acViewPreview, "", "", acNormal > > I then grab the fields in the "On Print" Event > > This works, but I would like to know if this is the best method to do > this. > > ~ ~ ~ ~ > > There rest of the story... > > Here is what I am trying to accomplish. > > I have a number of Access 2007 reports that employ "dynamic filters" via > the use of "Report View" and the "Where Condition" when the report is > opened. ?In other words, the filters are applied at the report level and > not at the underlying query level. ?(There are buttons on the reports > which open up a small form that is used to collect "filter info" and > then re-open the report with the appropriate "Where Condition" based on > the "filter info") > > Now there is a need to export the report data to Excel. ?Because of the > complex nature of the reports, they do not Export very nicely to Excel > (I have tried several approaches). > > I know that I could easily export from the underlying queries to Excel, > but this type of export would not take into account the filters that are > applied at the report level. > > Therefore, to export the exact data on the reports to Excel, I have > started to experiment with grabbing the data from the report as it is > being built. ?This is not ideal, but I can't seem to find a better > method. > > Maybe others have run into this issue and have a better approach. > > Thanks for your assistance. > > Brad > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > From jwcolby at colbyconsulting.com Tue Jul 5 03:56:04 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Tue, 05 Jul 2011 04:56:04 -0400 Subject: [AccessD] Sourcegear vault free two developer license Message-ID: <4E12D1A4.1010809@colbyconsulting.com> I ran across this today. http://www.sqlservercentral.com/articles/Red+Gate+Software/74579/ http://promotions.sourcegear.com/vouchers/new/ -- John W. Colby www.ColbyConsulting.com From adtp at airtelmail.in Tue Jul 5 04:10:09 2011 From: adtp at airtelmail.in (A.D. Tejpal) Date: Tue, 5 Jul 2011 14:40:09 +0530 Subject: [AccessD] How to tell a button's "air space" is nolonger beinghovered over References: <003b01cc38f1$b62edca0$228c95e0$@gmail.com><471F6C8DAB244C66B0AB79536085B3EC@personal4a8ede> <002001cc3a5e$5428d240$fc7a76c0$@gmail.com> Message-ID: <8DD6228312434CD0940AE4E4807C4FF6@personal4a8ede> Bill, Apparently, in view of special positioning of control in question, you are looking for a solution that is self contained within control's MouseMove event. You could experiment with sample code given below: ' Code in form's module '============================== ' Declarations section Private gX As Single, gY As Single '--------------------------------------------- Private Sub CmdTest_MouseMove( _ Button As Integer, _ Shift As Integer, _ X As Single, Y As Single) With Me.CmdTest Me.CmdTest.Caption = "Test (MM)" If gX <> 0 Then If (X > (0.9 * .Width) And X > gX) _ Or (X < (0.1 * .Width) And _ X < gX) Then Me.CmdTest.Caption = "Test" End If End If If gY <> 0 Then If (Y > (0.9 * .Height) And Y > gY) _ Or (Y < (0.1 * .Height) And _ Y < gY) Then Me.CmdTest.Caption = "Test" End If End If End With gX = X gY = Y End Sub '============================== Normal caption of command button named CmdTest is "Test". When mouse pointer is brought over it, the caption changes to "Test (MM)". As & when the mouse pointer moves away from the control, the caption reverts back to normal, i.e. "Test". Note: (a) MouseMove event fires in rapid-fire style. Values for X and Y returned by this event have a range from 0 upto the width and height (in twips) of the control in question. (b) The multiplying factors of 0.9 and 0.1 used in the sample code could perhaps be fine tuned further (say 0.95 and 0.05) so as to narrow down the twilight zone. However a coarser setting as adopted above, is found conducive to more consistent behavior. This is because a deliberately wild mouse sweep by the user can result in X or Y value getting truncated short of the potential maximum, even though the mouse pointer has moved out. Best wishes, A.D. Tejpal ------------ ----- Original Message ----- From: William Benson (VBACreations.Com) To: 'Access Developers discussion and problem solving' Sent: Monday, July 04, 2011 20:53 Subject: Re: [AccessD] How to tell a button's "air space" is nolonger beinghovered over A.D., Other controls are too near the button's bottom and it's top edge is pretty much as .Top = 0. I have put the code in the other controls already, similar to what you wrote. I was wondering if there was a way like to test the mousemove if the coordinates are exactly on bottom or top or at either side of the button, based on X, Y, or whatever... and if so, the caption is treated as if the mouse were outside it, and if not, use the caption that pertains to the moust being inside. During a normal mousemove operation the user will be headed out or headed into the interior of the button, so -- if on the way out, the last code to execute will be to reset the caption -- if on the way in, the code executing (probably continuously) will be to set the caption appropriate for interior of button But I don't think it is possible to get the event to faithfully fire exactly as the mouse is going over the edge of the button. Thanks a lot, Bill -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of A.D. Tejpal Sent: Monday, July 04, 2011 10:23 AM To: Access Developers discussion and problem solving Subject: Re: [AccessD] How to tell a button's "air space" is no longer beinghovered over William, For detecting whether the mouse pointer has moved away from the control in question, you can use the MouseMove event of form section to which the said control belongs, for example: ' Code in form's module '============================= Private Sub Detail_MouseMove( _ Button As Integer, Shift As Integer, _ X As Single, Y As Single) ' <> End Sub '-------------------------------------------- Private Sub FormFooter_MouseMove( _ Button As Integer, Shift As Integer, _ X As Single, Y As Single) ' <> End Sub '-------------------------------------------- Private Sub FormHeader_MouseMove( _ Button As Integer, Shift As Integer, _ X As Single, Y As Single) ' <> End Sub '============================= Best wishes, A.D. Tejpal ------------ ----- Original Message ----- From: William Benson (VBACreations.Com) To: 'Access Developers discussion and problem solving' Sent: Sunday, July 03, 2011 01:23 Subject: [AccessD] How to tell a button's "air space" is no longer beinghovered over I have some code which changes the caption of a button when the user has the ctrl key pressed, set during the mousemove event for the button. I want however, that when the user leaves the "air space" for the button, then the caption reverts - regardless whether they still have shift held. I know I can use use the mousemove event associated with all surrounding controls to reset it, but I would like something more related to the control itself. Is there a method of testing that the user has moved the mouse outside the button's air space? I have a feeling I am going to be out of luck... From vbacreations at gmail.com Tue Jul 5 07:01:19 2011 From: vbacreations at gmail.com (William Benson (VBACreations.Com)) Date: Tue, 5 Jul 2011 08:01:19 -0400 Subject: [AccessD] How to tell a button's "air space" is nolonger beinghovered over In-Reply-To: <8DD6228312434CD0940AE4E4807C4FF6@personal4a8ede> References: <003b01cc38f1$b62edca0$228c95e0$@gmail.com><471F6C8DAB244C66B0AB79536085B3EC@personal4a8ede> <002001cc3a5e$5428d240$fc7a76c0$@gmail.com> <8DD6228312434CD0940AE4E4807C4FF6@personal4a8ede> Message-ID: <001201cc3b0b$40feef30$c2fccd90$@gmail.com> I tried your code A.D., it works pretty well. It occasionally misses when the button's edge is near the top (but not at the top) of its section and when another control is near the button's edge.. But it's great, thank you. -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of A.D. Tejpal Sent: Tuesday, July 05, 2011 5:10 AM To: Access Developers discussion and problem solving Subject: Re: [AccessD] How to tell a button's "air space" is nolonger beinghovered over Bill, Apparently, in view of special positioning of control in question, you are looking for a solution that is self contained within control's MouseMove event. You could experiment with sample code given below: ' Code in form's module '============================== ' Declarations section Private gX As Single, gY As Single '--------------------------------------------- Private Sub CmdTest_MouseMove( _ Button As Integer, _ Shift As Integer, _ X As Single, Y As Single) With Me.CmdTest Me.CmdTest.Caption = "Test (MM)" If gX <> 0 Then If (X > (0.9 * .Width) And X > gX) _ Or (X < (0.1 * .Width) And _ X < gX) Then Me.CmdTest.Caption = "Test" End If End If If gY <> 0 Then If (Y > (0.9 * .Height) And Y > gY) _ Or (Y < (0.1 * .Height) And _ Y < gY) Then Me.CmdTest.Caption = "Test" End If End If End With gX = X gY = Y End Sub '============================== Normal caption of command button named CmdTest is "Test". When mouse pointer is brought over it, the caption changes to "Test (MM)". As & when the mouse pointer moves away from the control, the caption reverts back to normal, i.e. "Test". Note: (a) MouseMove event fires in rapid-fire style. Values for X and Y returned by this event have a range from 0 upto the width and height (in twips) of the control in question. (b) The multiplying factors of 0.9 and 0.1 used in the sample code could perhaps be fine tuned further (say 0.95 and 0.05) so as to narrow down the twilight zone. However a coarser setting as adopted above, is found conducive to more consistent behavior. This is because a deliberately wild mouse sweep by the user can result in X or Y value getting truncated short of the potential maximum, even though the mouse pointer has moved out. Best wishes, A.D. Tejpal ------------ ----- Original Message ----- From: William Benson (VBACreations.Com) To: 'Access Developers discussion and problem solving' Sent: Monday, July 04, 2011 20:53 Subject: Re: [AccessD] How to tell a button's "air space" is nolonger beinghovered over A.D., Other controls are too near the button's bottom and it's top edge is pretty much as .Top = 0. I have put the code in the other controls already, similar to what you wrote. I was wondering if there was a way like to test the mousemove if the coordinates are exactly on bottom or top or at either side of the button, based on X, Y, or whatever... and if so, the caption is treated as if the mouse were outside it, and if not, use the caption that pertains to the moust being inside. During a normal mousemove operation the user will be headed out or headed into the interior of the button, so -- if on the way out, the last code to execute will be to reset the caption -- if on the way in, the code executing (probably continuously) will be to set the caption appropriate for interior of button But I don't think it is possible to get the event to faithfully fire exactly as the mouse is going over the edge of the button. Thanks a lot, Bill -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of A.D. Tejpal Sent: Monday, July 04, 2011 10:23 AM To: Access Developers discussion and problem solving Subject: Re: [AccessD] How to tell a button's "air space" is no longer beinghovered over William, For detecting whether the mouse pointer has moved away from the control in question, you can use the MouseMove event of form section to which the said control belongs, for example: ' Code in form's module '============================= Private Sub Detail_MouseMove( _ Button As Integer, Shift As Integer, _ X As Single, Y As Single) ' <> End Sub '-------------------------------------------- Private Sub FormFooter_MouseMove( _ Button As Integer, Shift As Integer, _ X As Single, Y As Single) ' <> End Sub '-------------------------------------------- Private Sub FormHeader_MouseMove( _ Button As Integer, Shift As Integer, _ X As Single, Y As Single) ' <> End Sub '============================= Best wishes, A.D. Tejpal ------------ ----- Original Message ----- From: William Benson (VBACreations.Com) To: 'Access Developers discussion and problem solving' Sent: Sunday, July 03, 2011 01:23 Subject: [AccessD] How to tell a button's "air space" is no longer beinghovered over I have some code which changes the caption of a button when the user has the ctrl key pressed, set during the mousemove event for the button. I want however, that when the user leaves the "air space" for the button, then the caption reverts - regardless whether they still have shift held. I know I can use use the mousemove event associated with all surrounding controls to reset it, but I would like something more related to the control itself. Is there a method of testing that the user has moved the mouse outside the button's air space? I have a feeling I am going to be out of luck... -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From BradM at blackforestltd.com Tue Jul 5 07:18:24 2011 From: BradM at blackforestltd.com (Brad Marks) Date: Tue, 5 Jul 2011 07:18:24 -0500 Subject: [AccessD] What is the best way to grab fields from a report detail line so that they can be accessed in VBA? References: Message-ID: Doug, Thanks for the advice. I may need to go down this path. Because of the complexity of the reports and underlying queries, I was hesitant to change the underlying queries. The idea of creating a temporary query is something that I had not considered. Thanks again, Brad -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Doug Steele Sent: Monday, July 04, 2011 8:17 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] What is the best way to grab fields from a report detail line so that they can be accessed in VBA? Brad, what I do in similar circumstances is build and save the 'Where' string in the filtering form. In code, I take the original SQL for the report recordsource and add the Where string to it. I then save this new SQL into a temporary query and export it to Excel. Doug On Mon, Jul 4, 2011 at 11:53 AM, Brad Marks wrote: > All, > > I want to grab the value of fields from report detail lines. > > Here is the method that I finally got to work. > > I open the report with a line like this... > > DoCmd.OpenReport "Report1", acViewPreview, "", "", acNormal > > I then grab the fields in the "On Print" Event > > This works, but I would like to know if this is the best method to do > this. > > ~ ~ ~ ~ > > There rest of the story... > > Here is what I am trying to accomplish. > > I have a number of Access 2007 reports that employ "dynamic filters" via > the use of "Report View" and the "Where Condition" when the report is > opened. ?In other words, the filters are applied at the report level and > not at the underlying query level. ?(There are buttons on the reports > which open up a small form that is used to collect "filter info" and > then re-open the report with the appropriate "Where Condition" based on > the "filter info") > > Now there is a need to export the report data to Excel. ?Because of the > complex nature of the reports, they do not Export very nicely to Excel > (I have tried several approaches). > > I know that I could easily export from the underlying queries to Excel, > but this type of export would not take into account the filters that are > applied at the report level. > > Therefore, to export the exact data on the reports to Excel, I have > started to experiment with grabbing the data from the report as it is > being built. ?This is not ideal, but I can't seem to find a better > method. > > Maybe others have run into this issue and have a better approach. > > Thanks for your assistance. > > Brad > > -- > 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 has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. From df.waters at comcast.net Tue Jul 5 07:45:01 2011 From: df.waters at comcast.net (Dan Waters) Date: Tue, 5 Jul 2011 07:45:01 -0500 Subject: [AccessD] Sourcegear vault free two developer license In-Reply-To: <4E12D1A4.1010809@colbyconsulting.com> References: <4E12D1A4.1010809@colbyconsulting.com> Message-ID: <001d01cc3b11$5c1bf280$1453d780$@comcast.net> Is a version control system useful for a single developer? I noticed that this offer is for 2 developers, assuming that it would help more than one developer. -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Tuesday, July 05, 2011 3:56 AM To: Access Developers discussion and problem solving; VBA; Sqlserver-Dba Subject: [AccessD] Sourcegear vault free two developer license I ran across this today. http://www.sqlservercentral.com/articles/Red+Gate+Software/74579/ http://promotions.sourcegear.com/vouchers/new/ -- John W. Colby www.ColbyConsulting.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From jwcolby at colbyconsulting.com Tue Jul 5 08:46:08 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Tue, 05 Jul 2011 09:46:08 -0400 Subject: [AccessD] Sourcegear vault free two developer license In-Reply-To: <001d01cc3b11$5c1bf280$1453d780$@comcast.net> References: <4E12D1A4.1010809@colbyconsulting.com> <001d01cc3b11$5c1bf280$1453d780$@comcast.net> Message-ID: <4E1315A0.1010005@colbyconsulting.com> http://en.wikipedia.org/wiki/Revision_control John W. Colby www.ColbyConsulting.com On 7/5/2011 8:45 AM, Dan Waters wrote: > Is a version control system useful for a single developer? I noticed that > this offer is for 2 developers, assuming that it would help more than one > developer. > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby > Sent: Tuesday, July 05, 2011 3:56 AM > To: Access Developers discussion and problem solving; VBA; Sqlserver-Dba > Subject: [AccessD] Sourcegear vault free two developer license > > I ran across this today. > > http://www.sqlservercentral.com/articles/Red+Gate+Software/74579/ > http://promotions.sourcegear.com/vouchers/new/ > From charlotte.foust at gmail.com Tue Jul 5 09:54:05 2011 From: charlotte.foust at gmail.com (Charlotte Foust) Date: Tue, 5 Jul 2011 07:54:05 -0700 Subject: [AccessD] Sourcegear vault free two developer license In-Reply-To: <001d01cc3b11$5c1bf280$1453d780$@comcast.net> References: <4E12D1A4.1010809@colbyconsulting.com> <001d01cc3b11$5c1bf280$1453d780$@comcast.net> Message-ID: Yes it is, especially SourceGear Vault. Vault allows you to maintain multiple versions of an application, so you can try something out and then roll back just one part of it if your brilliant idea for something falls on its face. It is very similar in usage to SourceSafe but it has some nifty features that make it well worthwhile. Charlotte Foust On Tue, Jul 5, 2011 at 5:45 AM, Dan Waters wrote: > Is a version control system useful for a single developer? I noticed that > this offer is for 2 developers, assuming that it would help more than one > developer. > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby > Sent: Tuesday, July 05, 2011 3:56 AM > To: Access Developers discussion and problem solving; VBA; Sqlserver-Dba > Subject: [AccessD] Sourcegear vault free two developer license > > I ran across this today. > > http://www.sqlservercentral.com/articles/Red+Gate+Software/74579/ > > > http://promotions.sourcegear.com/vouchers/new/ > > > > -- > John W. Colby > www.ColbyConsulting.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 jwcolby at colbyconsulting.com Tue Jul 5 10:52:37 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Tue, 05 Jul 2011 11:52:37 -0400 Subject: [AccessD] Sourcegear vault free two developer license In-Reply-To: References: <4E12D1A4.1010809@colbyconsulting.com> <001d01cc3b11$5c1bf280$1453d780$@comcast.net> Message-ID: <4E133345.2060102@colbyconsulting.com> Does anyone have it working with Access? John W. Colby www.ColbyConsulting.com On 7/5/2011 10:54 AM, Charlotte Foust wrote: > Yes it is, especially SourceGear Vault. Vault allows you to maintain > multiple versions of an application, so you can try something out and then > roll back just one part of it if your brilliant idea for something falls on > its face. It is very similar in usage to SourceSafe but it has some nifty > features that make it well worthwhile. > > Charlotte Foust > > On Tue, Jul 5, 2011 at 5:45 AM, Dan Waters wrote: > >> Is a version control system useful for a single developer? I noticed that >> this offer is for 2 developers, assuming that it would help more than one >> developer. >> >> -----Original Message----- >> From: accessd-bounces at databaseadvisors.com >> [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby >> Sent: Tuesday, July 05, 2011 3:56 AM >> To: Access Developers discussion and problem solving; VBA; Sqlserver-Dba >> Subject: [AccessD] Sourcegear vault free two developer license >> >> I ran across this today. >> >> http://www.sqlservercentral.com/articles/Red+Gate+Software/74579/ >> >> >> http://promotions.sourcegear.com/vouchers/new/ >> >> >> >> -- >> John W. Colby >> www.ColbyConsulting.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 charlotte.foust at gmail.com Tue Jul 5 10:59:25 2011 From: charlotte.foust at gmail.com (Charlotte Foust) Date: Tue, 5 Jul 2011 08:59:25 -0700 Subject: [AccessD] Sourcegear vault free two developer license In-Reply-To: <4E133345.2060102@colbyconsulting.com> References: <4E12D1A4.1010809@colbyconsulting.com> <001d01cc3b11$5c1bf280$1453d780$@comcast.net> <4E133345.2060102@colbyconsulting.com> Message-ID: I believe there is a widget you need, a bit like the one for SourceSafe, in order to make it work as you might expect with Access, but we only used it with .Net, so I'm not a definitive source for that answer. Charlotte Foust On Tue, Jul 5, 2011 at 8:52 AM, jwcolby wrote: > Does anyone have it working with Access? > > > John W. Colby > www.ColbyConsulting.com > > > > On 7/5/2011 10:54 AM, Charlotte Foust wrote: > >> Yes it is, especially SourceGear Vault. Vault allows you to maintain >> multiple versions of an application, so you can try something out and then >> roll back just one part of it if your brilliant idea for something falls >> on >> its face. It is very similar in usage to SourceSafe but it has some nifty >> features that make it well worthwhile. >> >> Charlotte Foust >> >> On Tue, Jul 5, 2011 at 5:45 AM, Dan Waters wrote: >> >> Is a version control system useful for a single developer? I noticed >>> that >>> this offer is for 2 developers, assuming that it would help more than one >>> developer. >>> >>> -----Original Message----- >>> From: accessd-bounces@**databaseadvisors.com >>> [mailto:accessd-bounces@**databaseadvisors.com] >>> On Behalf Of jwcolby >>> Sent: Tuesday, July 05, 2011 3:56 AM >>> To: Access Developers discussion and problem solving; VBA; Sqlserver-Dba >>> Subject: [AccessD] Sourcegear vault free two developer license >>> >>> I ran across this today. >>> >>> http://www.sqlservercentral.**com/articles/Red+Gate+**Software/74579/ >>> >>> >>> >>> >>> http://promotions.sourcegear.**com/vouchers/new/ >>> >>> >>> >>> >>> >>> -- >>> John W. Colby >>> www.ColbyConsulting.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 EdTesiny at oasas.ny.gov Tue Jul 5 12:09:56 2011 From: EdTesiny at oasas.ny.gov (Tesiny, Ed) Date: Tue, 5 Jul 2011 13:09:56 -0400 Subject: [AccessD] Emailing an .mde Message-ID: Hi All, I'm trying to email a database frontend, of course our system blocks it. Is there an extension that is fairly neutral, I tried .doc with one person last week and that worked but it isn't working with the person I trying to distribute to today. Any suggestions? TIA Ed Edward P. Tesiny Director of Evaluation and Outcomes Management New York State OASAS 1450 Western Avenue Albany, NY 12203 Phone: (518) 485-2322 Fax: (518) 485-5228 EdTesiny at oasas.ny.gov IMPORTANT: This E-mail may contain confidential material for the sole use of the intended recipient. The use, distribution, transmittal or re-transmittal by an unintended recipient of any communication is prohibited without our express approval in writing or by e-mail. Any use, distribution, transmittal or re-transmittal by persons who are not intended recipients of this e-mail may be a violation of law and is strictly prohibited. If you are not the intended recipient please contact the sender and delete all copies. E-mail transmission cannot be guaranteed to be secure or error-free. The sender therefore does not accept liability for any errors or omissions in the contents of this transmission. All e-mails sent to or from NYS OASAS are to be used for our business purposes only. E-mails sent from or to NYS OASAS are subject to review by the Agency. From jimdettman at verizon.net Tue Jul 5 12:23:46 2011 From: jimdettman at verizon.net (Jim Dettman) Date: Tue, 05 Jul 2011 13:23:46 -0400 Subject: [AccessD] Emailing an .mde In-Reply-To: References: Message-ID: <7DEE0381D70E4361A351C1E6B4625F24@XPS> Ed, .ed Jim. -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Tesiny, Ed Sent: Tuesday, July 05, 2011 01:10 PM To: Access Developers discussion and problem solving; Off Topic Subject: [AccessD] Emailing an .mde Hi All, I'm trying to email a database frontend, of course our system blocks it. Is there an extension that is fairly neutral, I tried .doc with one person last week and that worked but it isn't working with the person I trying to distribute to today. Any suggestions? TIA Ed Edward P. Tesiny Director of Evaluation and Outcomes Management New York State OASAS 1450 Western Avenue Albany, NY 12203 Phone: (518) 485-2322 Fax: (518) 485-5228 EdTesiny at oasas.ny.gov IMPORTANT: This E-mail may contain confidential material for the sole use of the intended recipient. The use, distribution, transmittal or re-transmittal by an unintended recipient of any communication is prohibited without our express approval in writing or by e-mail. Any use, distribution, transmittal or re-transmittal by persons who are not intended recipients of this e-mail may be a violation of law and is strictly prohibited. If you are not the intended recipient please contact the sender and delete all copies. E-mail transmission cannot be guaranteed to be secure or error-free. The sender therefore does not accept liability for any errors or omissions in the contents of this transmission. All e-mails sent to or from NYS OASAS are to be used for our business purposes only. E-mails sent from or to NYS OASAS are subject to review by the Agency. -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From fuller.artful at gmail.com Tue Jul 5 13:04:16 2011 From: fuller.artful at gmail.com (Arthur Fuller) Date: Tue, 5 Jul 2011 14:04:16 -0400 Subject: [AccessD] Emailing an .mde In-Reply-To: References: Message-ID: Just rename it to MyFile.mdee and tell the recipient to name it back upon receipt. HTH. Arthur On Tue, Jul 5, 2011 at 1:09 PM, Tesiny, Ed wrote: > Hi All, > > I'm trying to email a database frontend, of course our system blocks it. > Is there an extension that is fairly neutral, I tried .doc with one > person last week and that worked but it isn't working with the person I > trying to distribute to today. Any suggestions? > > TIA > > Ed > > > > Edward P. Tesiny > > Director of Evaluation and Outcomes Management > > New York State OASAS > > 1450 Western Avenue > > Albany, NY 12203 > > Phone: (518) 485-2322 > > Fax: (518) 485-5228 > > EdTesiny at oasas.ny.gov > > > > IMPORTANT: This E-mail may contain confidential material for the sole > use of the intended recipient. The use, distribution, transmittal or > re-transmittal by an unintended recipient of any communication is > prohibited without our express approval in writing or by e-mail. Any > use, distribution, transmittal or re-transmittal by persons who are not > intended recipients of this e-mail may be a violation of law and is > strictly prohibited. If you are not the intended recipient please > contact the sender and delete all copies. E-mail transmission cannot be > guaranteed to be secure or error-free. The sender therefore does not > accept liability for any errors or omissions in the contents of this > transmission. All e-mails sent to or from NYS OASAS are to be used for > our business purposes only. E-mails sent from or to NYS OASAS are > subject to review by the Agency. > > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > From fuller.artful at gmail.com Tue Jul 5 13:06:09 2011 From: fuller.artful at gmail.com (Arthur Fuller) Date: Tue, 5 Jul 2011 14:06:09 -0400 Subject: [AccessD] Sourcegear vault free two developer license In-Reply-To: <001d01cc3b11$5c1bf280$1453d780$@comcast.net> References: <4E12D1A4.1010809@colbyconsulting.com> <001d01cc3b11$5c1bf280$1453d780$@comcast.net> Message-ID: Since I've completely eliminated all my programming errors and second thoughts, I no longer need version control. LOL. I need Developer Control. A. On Tue, Jul 5, 2011 at 8:45 AM, Dan Waters wrote: > Is a version control system useful for a single developer? I noticed that > this offer is for 2 developers, assuming that it would help more than one > developer. > > From adtp at airtelmail.in Tue Jul 5 13:07:22 2011 From: adtp at airtelmail.in (A.D. Tejpal) Date: Tue, 5 Jul 2011 23:37:22 +0530 Subject: [AccessD] How to tell a button's "air space"is nolonger beinghovered over References: <003b01cc38f1$b62edca0$228c95e0$@gmail.com><471F6C8DAB244C66B0AB79536085B3EC@personal4a8ede> <002001cc3a5e$5428d240$fc7a76c0$@gmail.com><8DD6228312434CD0940AE4E4807C4FF6@personal4a8ede> <001201cc3b0b$40feef30$c2fccd90$@gmail.com> Message-ID: You are most welcome Bill! ps: Last month you were seeking a solution for synchronized scrolling of a pair of subforms. Does the problem stand resolved ? Best wishes, A.D. Tejpal ------------ ----- Original Message ----- From: William Benson (VBACreations.Com) To: 'Access Developers discussion and problem solving' Sent: Tuesday, July 05, 2011 17:31 Subject: Re: [AccessD] How to tell a button's "air space"is nolonger beinghovered over I tried your code A.D., it works pretty well. It occasionally misses when the button's edge is near the top (but not at the top) of its section and when another control is near the button's edge.. But it's great, thank you. -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of A.D. Tejpal Sent: Tuesday, July 05, 2011 5:10 AM To: Access Developers discussion and problem solving Subject: Re: [AccessD] How to tell a button's "air space" is nolonger beinghovered over Bill, Apparently, in view of special positioning of control in question, you are looking for a solution that is self contained within control's MouseMove event. You could experiment with sample code given below: ' Code in form's module '============================== ' Declarations section Private gX As Single, gY As Single '--------------------------------------------- Private Sub CmdTest_MouseMove( _ Button As Integer, _ Shift As Integer, _ X As Single, Y As Single) With Me.CmdTest Me.CmdTest.Caption = "Test (MM)" If gX <> 0 Then If (X > (0.9 * .Width) And X > gX) _ Or (X < (0.1 * .Width) And _ X < gX) Then Me.CmdTest.Caption = "Test" End If End If If gY <> 0 Then If (Y > (0.9 * .Height) And Y > gY) _ Or (Y < (0.1 * .Height) And _ Y < gY) Then Me.CmdTest.Caption = "Test" End If End If End With gX = X gY = Y End Sub '============================== Normal caption of command button named CmdTest is "Test". When mouse pointer is brought over it, the caption changes to "Test (MM)". As & when the mouse pointer moves away from the control, the caption reverts back to normal, i.e. "Test". Note: (a) MouseMove event fires in rapid-fire style. Values for X and Y returned by this event have a range from 0 upto the width and height (in twips) of the control in question. (b) The multiplying factors of 0.9 and 0.1 used in the sample code could perhaps be fine tuned further (say 0.95 and 0.05) so as to narrow down the twilight zone. However a coarser setting as adopted above, is found conducive to more consistent behavior. This is because a deliberately wild mouse sweep by the user can result in X or Y value getting truncated short of the potential maximum, even though the mouse pointer has moved out. Best wishes, A.D. Tejpal ------------ From dw-murphy at cox.net Tue Jul 5 13:23:02 2011 From: dw-murphy at cox.net (Doug Murphy) Date: Tue, 5 Jul 2011 11:23:02 -0700 Subject: [AccessD] Emailing an .mde In-Reply-To: References: Message-ID: <004701cc3b40$936642c0$ba32c840$@cox.net> Ed, My approach is to zip the file. Most email systems accept zipped files. The challenge is to make sure the person receiving the file actually unzips it instead of trying to run it from Windows explorer while in the zipped format. Doug -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Tesiny, Ed Sent: Tuesday, July 05, 2011 10:10 AM To: Access Developers discussion and problem solving; Off Topic Subject: [AccessD] Emailing an .mde Hi All, I'm trying to email a database frontend, of course our system blocks it. Is there an extension that is fairly neutral, I tried .doc with one person last week and that worked but it isn't working with the person I trying to distribute to today. Any suggestions? TIA Ed Edward P. Tesiny Director of Evaluation and Outcomes Management New York State OASAS 1450 Western Avenue Albany, NY 12203 Phone: (518) 485-2322 Fax: (518) 485-5228 EdTesiny at oasas.ny.gov IMPORTANT: This E-mail may contain confidential material for the sole use of the intended recipient. The use, distribution, transmittal or re-transmittal by an unintended recipient of any communication is prohibited without our express approval in writing or by e-mail. Any use, distribution, transmittal or re-transmittal by persons who are not intended recipients of this e-mail may be a violation of law and is strictly prohibited. If you are not the intended recipient please contact the sender and delete all copies. E-mail transmission cannot be guaranteed to be secure or error-free. The sender therefore does not accept liability for any errors or omissions in the contents of this transmission. All e-mails sent to or from NYS OASAS are to be used for our business purposes only. E-mails sent from or to NYS OASAS are subject to review by the Agency. -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From dbdoug at gmail.com Tue Jul 5 13:34:36 2011 From: dbdoug at gmail.com (Doug Steele) Date: Tue, 5 Jul 2011 11:34:36 -0700 Subject: [AccessD] Emailing an .mde In-Reply-To: <004701cc3b40$936642c0$ba32c840$@cox.net> References: <004701cc3b40$936642c0$ba32c840$@cox.net> Message-ID: Exchange Server can be configured to look inside a .zip archive and delete any 'dangerous' files. My solution to this problem is to upload the file Box.net and email a link to the file so the user can download it directly. Doug On Tue, Jul 5, 2011 at 11:23 AM, Doug Murphy wrote: > Ed, > > My approach is to zip the file. Most email systems accept zipped files. The > challenge is to make sure the person receiving the file actually unzips it > instead of trying to run it from Windows explorer while in the zipped > format. > > Doug > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Tesiny, Ed > Sent: Tuesday, July 05, 2011 10:10 AM > To: Access Developers discussion and problem solving; Off Topic > Subject: [AccessD] Emailing an .mde > > Hi All, > > I'm trying to email a database frontend, of course our system blocks it. > Is there an extension that is fairly neutral, I tried .doc with one person > last week and that worked but it isn't working with the person I trying to > distribute to today. ?Any suggestions? > > TIA > > Ed > > > > Edward P. Tesiny > > Director of Evaluation and Outcomes Management > > New York State OASAS > > 1450 Western Avenue > > Albany, NY 12203 > > Phone: ?(518) 485-2322 > > Fax: ?(518) 485-5228 > > EdTesiny at oasas.ny.gov > > > > IMPORTANT: ?This E-mail may contain confidential material for the sole use > of the intended recipient. ?The use, distribution, transmittal or > re-transmittal by an unintended recipient of any communication is prohibited > without our express approval in writing or by e-mail. ?Any use, > distribution, transmittal or re-transmittal by persons who are not intended > recipients of this e-mail may be a violation of law and is > strictly prohibited. ? If you are not the intended recipient please > contact the sender and delete all copies. ?E-mail transmission cannot be > guaranteed to be secure or error-free. ? The sender therefore does not > accept liability for any errors or omissions in the contents of this > transmission. ? All e-mails sent to or from NYS OASAS are to be used for > our business purposes only. ?E-mails sent from or to NYS OASAS are subject > to review by the Agency. > > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > From fuller.artful at gmail.com Tue Jul 5 13:36:26 2011 From: fuller.artful at gmail.com (Arthur Fuller) Date: Tue, 5 Jul 2011 14:36:26 -0400 Subject: [AccessD] Emailing an .mde In-Reply-To: <004701cc3b40$936642c0$ba32c840$@cox.net> References: <004701cc3b40$936642c0$ba32c840$@cox.net> Message-ID: Some email systems look inside sent zips to verify that they don't contain executables. That's why I rename the file. Typically I then zip the renamed file and plonk in a readme that tells the recipient to rename it back. A. On Tue, Jul 5, 2011 at 2:23 PM, Doug Murphy wrote: > Ed, > > My approach is to zip the file. Most email systems accept zipped files. The > challenge is to make sure the person receiving the file actually unzips it > instead of trying to run it from Windows explorer while in the zipped > format. > > Doug > From DWUTKA at Marlow.com Tue Jul 5 13:45:11 2011 From: DWUTKA at Marlow.com (Drew Wutka) Date: Tue, 5 Jul 2011 13:45:11 -0500 Subject: [AccessD] Walk the DB Using ADO In-Reply-To: References: Message-ID: Sorry I don't have this code exactly as you have here. But what you need to do is actually all in recordsets. You use a SCHEMA query to get the list of tables (you can get columns this way if you want, too). And then you use properties of the field to get other values (like field name, value, constraints, etc). Drew -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Arthur Fuller Sent: Saturday, July 02, 2011 12:06 PM To: Access Developers discussion and problem solving Subject: [AccessD] Walk the DB Using ADO I know that I've written this code before, but due to a plethora of backup CDs and my habit of pruning what is not currently necessary from the current situation(s), I can't find the relevant code. And besides, I'm currently semi-retired, and working in hobbyist most not billable mode. Here's what I need, in ADO format if possible: For each t in CurrentDB( Tables ) For each f in t.fields For each a in f.Attributes ' could be Properties not Attributes Debug.Print a.Name, a.Value Next Next Next TIA, Arthur P.S. For years and years and years, I have used Rick Fisher's FindAndReplace, but now it's failing on me due to (I think) the fact that I'm running a 64-bit Windows, which doesn't like what he offers to install. In my retirement mode, I cannot afford to purchase more software. Maybe I could run a Windows 32-bit version of everything, then run F&R, then do what I need to do, then import the results back into 64-bit. Yuck. -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com The information contained in this transmission is intended only for the person or entity to which it is addressed and may contain II-VI Proprietary and/or II-VI Business Sensitive material. If you are not the intended recipient, please contact the sender immediately and destroy the material in its entirety, whether electronic or hard copy. You are notified that any review, retransmission, copying, disclosure, dissemination, or other use of, or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. From dw-murphy at cox.net Tue Jul 5 13:57:08 2011 From: dw-murphy at cox.net (Doug Murphy) Date: Tue, 5 Jul 2011 11:57:08 -0700 Subject: [AccessD] Emailing an .mde In-Reply-To: References: <004701cc3b40$936642c0$ba32c840$@cox.net> Message-ID: <005a01cc3b45$5716b570$05442050$@cox.net> The zip file works with most email systems. The only one that seemed to look inside the zip file, in my limited experience, is Gmail. For that system I just reverse the extension piz. Even Gmail seems to accept the Access files now, but maybe they have not entered accdb in their system yet. I zip all files I email just to reduce size. For large files I use USendIt. -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Arthur Fuller Sent: Tuesday, July 05, 2011 11:36 AM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Emailing an .mde Some email systems look inside sent zips to verify that they don't contain executables. That's why I rename the file. Typically I then zip the renamed file and plonk in a readme that tells the recipient to rename it back. A. On Tue, Jul 5, 2011 at 2:23 PM, Doug Murphy wrote: > Ed, > > My approach is to zip the file. Most email systems accept zipped > files. The challenge is to make sure the person receiving the file > actually unzips it instead of trying to run it from Windows explorer > while in the zipped format. > > Doug > -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From jwcolby at colbyconsulting.com Tue Jul 5 13:59:13 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Tue, 05 Jul 2011 14:59:13 -0400 Subject: [AccessD] Sourcegear vault free two developer license In-Reply-To: References: <4E12D1A4.1010809@colbyconsulting.com> <001d01cc3b11$5c1bf280$1453d780$@comcast.net> Message-ID: <4E135F01.4010505@colbyconsulting.com> LOL. Why didn't I think of that? All that time wasted. John W. Colby www.ColbyConsulting.com On 7/5/2011 2:06 PM, Arthur Fuller wrote: > Since I've completely eliminated all my programming errors and second > thoughts, I no longer need version control. LOL. I need Developer Control. > > A. > > On Tue, Jul 5, 2011 at 8:45 AM, Dan Waters wrote: > >> Is a version control system useful for a single developer? I noticed that >> this offer is for 2 developers, assuming that it would help more than one >> developer. >> >> From vbacreations at gmail.com Tue Jul 5 14:02:23 2011 From: vbacreations at gmail.com (William Benson (VBACreations.Com)) Date: Tue, 5 Jul 2011 15:02:23 -0400 Subject: [AccessD] Walk the DB Using ADO In-Reply-To: References: Message-ID: <001901cc3b46$133212e0$399638a0$@gmail.com> >> that I'm running a 64-bit Windows Need that in retirement mode eh? :-) -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Arthur Fuller Sent: Saturday, July 02, 2011 1:06 PM To: Access Developers discussion and problem solving Subject: [AccessD] Walk the DB Using ADO I know that I've written this code before, but due to a plethora of backup CDs and my habit of pruning what is not currently necessary from the current situation(s), I can't find the relevant code. And besides, I'm currently semi-retired, and working in hobbyist most not billable mode. Here's what I need, in ADO format if possible: For each t in CurrentDB( Tables ) For each f in t.fields For each a in f.Attributes ' could be Properties not Attributes Debug.Print a.Name, a.Value Next Next Next TIA, Arthur P.S. For years and years and years, I have used Rick Fisher's FindAndReplace, but now it's failing on me due to (I think) the fact that I'm running a 64-bit Windows, which doesn't like what he offers to install. In my retirement mode, I cannot afford to purchase more software. Maybe I could run a Windows 32-bit version of everything, then run F&R, then do what I need to do, then import the results back into 64-bit. Yuck. -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From EdTesiny at oasas.ny.gov Tue Jul 5 14:48:32 2011 From: EdTesiny at oasas.ny.gov (Tesiny, Ed) Date: Tue, 5 Jul 2011 15:48:32 -0400 Subject: [AccessD] Emailing an .mde In-Reply-To: <005a01cc3b45$5716b570$05442050$@cox.net> References: <004701cc3b40$936642c0$ba32c840$@cox.net> <005a01cc3b45$5716b570$05442050$@cox.net> Message-ID: I got the mde on her desktop but can't map here to the right folder. I think IT needs to fix her permissions...but they have been a little busy as our building was hit by lightening on Sunday morning. :-( Ed Tesiny EdTesiny at oasas.ny.gov -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Doug Murphy Sent: Tuesday, July 05, 2011 2:57 PM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Emailing an .mde The zip file works with most email systems. The only one that seemed to look inside the zip file, in my limited experience, is Gmail. For that system I just reverse the extension piz. Even Gmail seems to accept the Access files now, but maybe they have not entered accdb in their system yet. I zip all files I email just to reduce size. For large files I use USendIt. -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Arthur Fuller Sent: Tuesday, July 05, 2011 11:36 AM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Emailing an .mde Some email systems look inside sent zips to verify that they don't contain executables. That's why I rename the file. Typically I then zip the renamed file and plonk in a readme that tells the recipient to rename it back. A. On Tue, Jul 5, 2011 at 2:23 PM, Doug Murphy wrote: > Ed, > > My approach is to zip the file. Most email systems accept zipped > files. The challenge is to make sure the person receiving the file > actually unzips it instead of trying to run it from Windows explorer > while in the zipped format. > > Doug > -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From fuller.artful at gmail.com Tue Jul 5 14:57:57 2011 From: fuller.artful at gmail.com (Arthur Fuller) Date: Tue, 5 Jul 2011 15:57:57 -0400 Subject: [AccessD] Walk the DB Using ADO In-Reply-To: References: Message-ID: Thanks, Drew. I'll give that a shot. It's been a while since I looked carefully at the ADO model for other than typical recordset operations.. I seem to recall that somewhere I have a diagram of it, and even a DAO->ADO conversion chart. Time to start perusing the documents directories. A. On Tue, Jul 5, 2011 at 2:45 PM, Drew Wutka wrote: > Sorry I don't have this code exactly as you have here. But what you > need to do is actually all in recordsets. > > You use a SCHEMA query to get the list of tables (you can get columns > this way if you want, too). And then you use properties of the field to > get other values (like field name, value, constraints, etc). > > Drew > > From DWUTKA at Marlow.com Tue Jul 5 15:07:59 2011 From: DWUTKA at Marlow.com (Drew Wutka) Date: Tue, 5 Jul 2011 15:07:59 -0500 Subject: [AccessD] Walk the DB Using ADO In-Reply-To: References: Message-ID: Would you like me to send my VB6 Add-on to you off list, which lets me create 'data classes'? It has code to pull the tables and fields from a data source using ADO. Drew -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Arthur Fuller Sent: Tuesday, July 05, 2011 2:58 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Walk the DB Using ADO Thanks, Drew. I'll give that a shot. It's been a while since I looked carefully at the ADO model for other than typical recordset operations.. I seem to recall that somewhere I have a diagram of it, and even a DAO->ADO conversion chart. Time to start perusing the documents directories. A. On Tue, Jul 5, 2011 at 2:45 PM, Drew Wutka wrote: > Sorry I don't have this code exactly as you have here. But what you > need to do is actually all in recordsets. > > You use a SCHEMA query to get the list of tables (you can get columns > this way if you want, too). And then you use properties of the field to > get other values (like field name, value, constraints, etc). > > Drew > > -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com The information contained in this transmission is intended only for the person or entity to which it is addressed and may contain II-VI Proprietary and/or II-VI Business Sensitive material. If you are not the intended recipient, please contact the sender immediately and destroy the material in its entirety, whether electronic or hard copy. You are notified that any review, retransmission, copying, disclosure, dissemination, or other use of, or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. From fuller.artful at gmail.com Tue Jul 5 15:14:47 2011 From: fuller.artful at gmail.com (Arthur Fuller) Date: Tue, 5 Jul 2011 16:14:47 -0400 Subject: [AccessD] Walk the DB Using ADO In-Reply-To: References: Message-ID: Does it require that I have VB6 installed? I suppose I could do that, but at the moment I have only the .NET stuff installed. Sounds like a good add-in, though. A. On Tue, Jul 5, 2011 at 4:07 PM, Drew Wutka wrote: > Would you like me to send my VB6 Add-on to you off list, which lets me > create 'data classes'? It has code to pull the tables and fields from a > data source using ADO. > > Drew > From DWUTKA at Marlow.com Tue Jul 5 15:25:33 2011 From: DWUTKA at Marlow.com (Drew Wutka) Date: Tue, 5 Jul 2011 15:25:33 -0500 Subject: [AccessD] Walk the DB Using ADO In-Reply-To: References: Message-ID: Think I can do this in list. Here are the three relevant functions you should be able to get what you need from them. Private Sub lstTables_Click() Dim cnn As ADODB.Connection Dim rs As ADODB.Recordset Dim i As Long Me.lstFields.Clear If DBConnect(cnn) Then Set rs = New ADODB.Recordset rs.Open Me.lstTables.List(Me.lstTables.ListIndex), cnn, adOpenKeyset, adLockReadOnly, adCmdTableDirect For i = 0 To rs.Fields.Count - 1 Me.lstFields.AddItem rs.Fields(i).Name Next i rs.Close Set rs = Nothing cnn.Close Set cnn = Nothing End If End Sub Function GetDBTables() On Error GoTo ErrorHandler Dim cnn As ADODB.Connection Dim rs As ADODB.Recordset If DBConnect(cnn) Then Set rs = cnn.OpenSchema(adSchemaTables) Me.lstTables.Clear rs.MoveFirst Do Until rs.EOF = True If Me.optTables Then If rs.Fields("TABLE_TYPE") = "TABLE" Then Me.lstTables.AddItem rs.Fields("TABLE_NAME") Else If rs.Fields("TABLE_TYPE") = "VIEW" Then Me.lstTables.AddItem rs.Fields("TABLE_NAME") End If rs.MoveNext Loop rs.Close Set rs = Nothing cnn.Close Set cnn = Nothing End If Exit Function ErrorHandler: Err.Clear End Function Function DBConnect(ByRef cnn As ADODB.Connection) As Boolean On Error GoTo ErrorHandler Set cnn = New ADODB.Connection cnn.Provider = "Microsoft.Jet.OLEDB.4.0" If Dir(Me.txtWorkGroupPath) <> "" Then cnn.Properties("Jet OLEDB:System database").Value = Me.txtWorkGroupPath cnn.Open Me.txtDBPath, Me.txtUserName, Me.txtPassword Else cnn.Open Me.txtDBPath End If DBConnect = True Exit Function ErrorHandler: Err.Clear DBConnect = False End Function -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Arthur Fuller Sent: Tuesday, July 05, 2011 3:15 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Walk the DB Using ADO Does it require that I have VB6 installed? I suppose I could do that, but at the moment I have only the .NET stuff installed. Sounds like a good add-in, though. A. On Tue, Jul 5, 2011 at 4:07 PM, Drew Wutka wrote: > Would you like me to send my VB6 Add-on to you off list, which lets me > create 'data classes'? It has code to pull the tables and fields from a > data source using ADO. > > Drew > -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com The information contained in this transmission is intended only for the person or entity to which it is addressed and may contain II-VI Proprietary and/or II-VI Business Sensitive material. If you are not the intended recipient, please contact the sender immediately and destroy the material in its entirety, whether electronic or hard copy. You are notified that any review, retransmission, copying, disclosure, dissemination, or other use of, or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. From fuller.artful at gmail.com Tue Jul 5 15:28:14 2011 From: fuller.artful at gmail.com (Arthur Fuller) Date: Tue, 5 Jul 2011 16:28:14 -0400 Subject: [AccessD] "Modern" replacement for CommonDlg Message-ID: I may have asked this before; if so, please forgive the redundancy. I've got an old app that I'm sprucing up with A2K7 to run on Windows 7. Some code I lifted from the ADH musketeers no longer works. It seems that the CommonDlg thingie has vanished. I need essentially that functionality, but that works in A2K7 and A2K10: It opens the Windows Open/Save dialog with a bunch of arguments: Public Function adhCommonFileOpenSave( _ Optional ByRef Flags As adhFileOpenConstants = 0, _ Optional ByVal Filter As String = "", _ Optional ByVal FilterIndex As Long = 1, _ Optional ByVal DefaultExt As String = "", _ Optional ByVal FileName As String = "", _ Optional ByVal DialogTitle As String = "", _ Optional ByVal InitDir As String = "", _ Optional ByVal hwndOwner As Long = 0, _ Optional ByVal OpenFile As Boolean = True) As String In a couple of places in the app, I need to ask the user for the directory in which to save this file, or alternatively, the directory to associate with the selected Customer and|or Project. Any suggestions or code to do this? I want to attach it to a button and have the dialog open on the the specified initial directory, then allow creation of a new subdir beneath that, and ultimately return the final directory name. TIA, Arthur From stuart at lexacorp.com.pg Tue Jul 5 15:54:31 2011 From: stuart at lexacorp.com.pg (Stuart McLachlan) Date: Wed, 06 Jul 2011 06:54:31 +1000 Subject: [AccessD] [dba-OT] Emailing an .mde In-Reply-To: References: Message-ID: <4E137A07.1549.21A7C35E@stuart.lexacorp.com.pg> I normally zip and files that i need to email and rename them as .piz On 5 Jul 2011 at 13:09, Tesiny, Ed wrote: > Hi All, > > I'm trying to email a database frontend, of course our system blocks > it. Is there an extension that is fairly neutral, I tried .doc with > one person last week and that worked but it isn't working with the > person I trying to distribute to today. Any suggestions? > > TIA > > Ed > > > > Edward P. Tesiny > > Director of Evaluation and Outcomes Management > > New York State OASAS > > 1450 Western Avenue > > Albany, NY 12203 > > Phone: (518) 485-2322 > > Fax: (518) 485-5228 > > EdTesiny at oasas.ny.gov > > > > IMPORTANT: This E-mail may contain confidential material for the sole > use of the intended recipient. The use, distribution, transmittal or > re-transmittal by an unintended recipient of any communication is > prohibited without our express approval in writing or by e-mail. Any > use, distribution, transmittal or re-transmittal by persons who are > not intended recipients of this e-mail may be a violation of law and > is strictly prohibited. If you are not the intended recipient please > contact the sender and delete all copies. E-mail transmission cannot > be guaranteed to be secure or error-free. The sender therefore does > not accept liability for any errors or omissions in the contents of > this transmission. All e-mails sent to or from NYS OASAS are to be > used for our business purposes only. E-mails sent from or to NYS > OASAS are subject to review by the Agency. > > > > _______________________________________________ > dba-OT mailing list > dba-OT at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-ot > Website: http://www.databaseadvisors.com > From stuart at lexacorp.com.pg Tue Jul 5 16:01:03 2011 From: stuart at lexacorp.com.pg (Stuart McLachlan) Date: Wed, 06 Jul 2011 07:01:03 +1000 Subject: [AccessD] "Modern" replacement for CommonDlg In-Reply-To: References: Message-ID: <4E137B8F.24761.21ADBC5C@stuart.lexacorp.com.pg> Here' ya go, I'm sure I've posted this a few times in the past. Declare Function GetOpenFileName Lib "comdlg32.dll" Alias _ "GetOpenFileNameA" (pOpenfilename As OPENFILENAME) As Long Type OPENFILENAME lStructSize As Long hwndOwner As Long hInstance As Long lpstrFilter As String lpstrCustomFilter As String nMaxCustFilter As Long nFilterIndex As Long lpstrFile As String nMaxFile As Long lpstrFileTitle As String nMaxFileTitle As Long lpstrInitialDir As String lpstrTitle As String flags As Long nFileOffset As Integer nFileExtension As Integer lpstrDefExt As String lCustData As Long lpfnHook As Long lpTemplateName As String End Type Function GetFileName(Directory As String) As String Dim OpenFile As OPENFILENAME Dim lReturn As Long Dim sFilter As String OpenFile.lStructSize = Len(OpenFile) OpenFile.hwndOwner = 0 OpenFile.hInstance = 0 sFilter = "" & Chr(0) OpenFile.lpstrFilter = sFilter OpenFile.nFilterIndex = 0 OpenFile.lpstrFile = String(257, 0) OpenFile.nMaxFile = Len(OpenFile.lpstrFile) - 1 OpenFile.lpstrFileTitle = OpenFile.lpstrFile OpenFile.nMaxFileTitle = OpenFile.nMaxFile OpenFile.lpstrInitialDir = Directory OpenFile.lpstrTitle = "Select File" OpenFile.flags = 0 lReturn = GetOpenFileName(OpenFile) GetFileName = Left$(OpenFile.lpstrFile, InStr(OpenFile.lpstrFile, Chr$(0)) - 1) End Function On 5 Jul 2011 at 16:28, Arthur Fuller wrote: > I may have asked this before; if so, please forgive the redundancy. > I've got an old app that I'm sprucing up with A2K7 to run on Windows > 7. Some code I lifted from the ADH musketeers no longer works. It > seems that the CommonDlg thingie has vanished. > > I need essentially that functionality, but that works in A2K7 and > A2K10: It opens the Windows Open/Save dialog with a bunch of > arguments: > From charlotte.foust at gmail.com Tue Jul 5 16:08:20 2011 From: charlotte.foust at gmail.com (Charlotte Foust) Date: Tue, 5 Jul 2011 14:08:20 -0700 Subject: [AccessD] Sourcegear vault free two developer license In-Reply-To: References: <4E12D1A4.1010809@colbyconsulting.com> <001d01cc3b11$5c1bf280$1453d780$@comcast.net> Message-ID: Arthur, I know a LOT of developers who need that! LOL Charlotte Foust On Tue, Jul 5, 2011 at 11:06 AM, Arthur Fuller wrote: > Since I've completely eliminated all my programming errors and second > thoughts, I no longer need version control. LOL. I need Developer Control. > > A. > > On Tue, Jul 5, 2011 at 8:45 AM, Dan Waters wrote: > > > Is a version control system useful for a single developer? I noticed > that > > this offer is for 2 developers, assuming that it would help more than one > > developer. > > > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > > > Website: http://www.databaseadvisors.com > > > From fuller.artful at gmail.com Tue Jul 5 16:15:18 2011 From: fuller.artful at gmail.com (Arthur Fuller) Date: Tue, 5 Jul 2011 17:15:18 -0400 Subject: [AccessD] Sourcegear vault free two developer license In-Reply-To: References: <4E12D1A4.1010809@colbyconsulting.com> <001d01cc3b11$5c1bf280$1453d780$@comcast.net> Message-ID: wii Do Two. A. You're never alone if you're schizophrenic. What did you say? Noffink! Knot a bloddy nerd. On Tue, Jul 5, 2011 at 5:08 PM, Charlotte Foust wrote: > Arthur, > > I know a LOT of developers who need that! LOL > > Charlotte Foust > > From fahooper at gmail.com Tue Jul 5 16:18:54 2011 From: fahooper at gmail.com (Fred Hooper) Date: Tue, 05 Jul 2011 17:18:54 -0400 Subject: [AccessD] Walk the DB Using ADO In-Reply-To: References: Message-ID: <4E137FBE.2020006@gmail.com> Hi Arthur, As I work with new databases frequently, I've found it useful to create an Access db that uses ADO to get information on the owners, tables and views -- and place it in an Access table. It currently works for Oracle and SQL Server. I'm happy to send a copy if it would be helpful. Fred Hooper On 7/5/2011 3:57 PM, Arthur Fuller wrote: > Thanks, Drew. I'll give that a shot. It's been a while since I looked > carefully at the ADO model for other than typical recordset operations.. I > seem to recall that somewhere I have a diagram of it, and even a DAO->ADO > conversion chart. Time to start perusing the documents directories. > > A. > > On Tue, Jul 5, 2011 at 2:45 PM, Drew Wutka wrote: > >> Sorry I don't have this code exactly as you have here. But what you >> need to do is actually all in recordsets. >> >> You use a SCHEMA query to get the list of tables (you can get columns >> this way if you want, too). And then you use properties of the field to >> get other values (like field name, value, constraints, etc). >> >> Drew >> >> From fahooper at gmail.com Tue Jul 5 16:24:55 2011 From: fahooper at gmail.com (Fred Hooper) Date: Tue, 05 Jul 2011 17:24:55 -0400 Subject: [AccessD] Walk the DB Using ADO In-Reply-To: <4E137FBE.2020006@gmail.com> References: <4E137FBE.2020006@gmail.com> Message-ID: <4E138127.6080001@gmail.com> Whoops, also fields with their type, width and indexes. On 7/5/2011 5:18 PM, Fred Hooper wrote: > Hi Arthur, > > As I work with new databases frequently, I've found it useful to > create an Access db that uses ADO to get information on the owners, > tables and views -- and place it in an Access table. It currently > works for Oracle and SQL Server. > > I'm happy to send a copy if it would be helpful. > > Fred Hooper > > On 7/5/2011 3:57 PM, Arthur Fuller wrote: >> Thanks, Drew. I'll give that a shot. It's been a while since I looked >> carefully at the ADO model for other than typical recordset >> operations.. I >> seem to recall that somewhere I have a diagram of it, and even a >> DAO->ADO >> conversion chart. Time to start perusing the documents directories. >> >> A. >> >> On Tue, Jul 5, 2011 at 2:45 PM, Drew Wutka wrote: >> >>> Sorry I don't have this code exactly as you have here. But what you >>> need to do is actually all in recordsets. >>> >>> You use a SCHEMA query to get the list of tables (you can get columns >>> this way if you want, too). And then you use properties of the >>> field to >>> get other values (like field name, value, constraints, etc). >>> >>> Drew >>> >>> From fuller.artful at gmail.com Tue Jul 5 17:05:23 2011 From: fuller.artful at gmail.com (Arthur Fuller) Date: Tue, 5 Jul 2011 18:05:23 -0400 Subject: [AccessD] Walk the DB Using ADO In-Reply-To: <4E137FBE.2020006@gmail.com> References: <4E137FBE.2020006@gmail.com> Message-ID: I would most appreciate your Send! Thx, A. On Tue, Jul 5, 2011 at 5:18 PM, Fred Hooper wrote: > Hi Arthur, > > As I work with new databases frequently, I've found it useful to create an > Access db that uses ADO to get information on the owners, tables and views > -- and place it in an Access table. It currently works for Oracle and SQL > Server. > > I'm happy to send a copy if it would be helpful. > > Fred Hooper > > > On 7/5/2011 3:57 PM, Arthur Fuller wrote: > >> Thanks, Drew. I'll give that a shot. It's been a while since I looked >> carefully at the ADO model for other than typical recordset operations.. I >> seem to recall that somewhere I have a diagram of it, and even a DAO->ADO >> conversion chart. Time to start perusing the documents directories. >> >> A. >> >> On Tue, Jul 5, 2011 at 2:45 PM, Drew Wutka wrote: >> >> Sorry I don't have this code exactly as you have here. But what you >>> need to do is actually all in recordsets. >>> >>> You use a SCHEMA query to get the list of tables (you can get columns >>> this way if you want, too). And then you use properties of the field to >>> get other values (like field name, value, constraints, etc). >>> >>> Drew >>> >>> >>> -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/**mailman/listinfo/accessd > Website: http://www.databaseadvisors.**com > From steve at datamanagementsolutions.biz Tue Jul 5 18:14:54 2011 From: steve at datamanagementsolutions.biz (Steve Schapel) Date: Wed, 6 Jul 2011 11:14:54 +1200 Subject: [AccessD] Emailing an .mde In-Reply-To: References: Message-ID: Ed I don't remember the last time I sent an email with a file attached. I always upload it to Dropbox, and then email the link for them to grab it from there. Very easy. Regards Steve -----Original Message----- From: Tesiny, Ed Sent: Wednesday, July 06, 2011 5:09 AM To: Access Developers discussion and problem solving ; Off Topic Subject: [AccessD] Emailing an .mde Hi All, I'm trying to email a database frontend, of course our system blocks it. Is there an extension that is fairly neutral, I tried .doc with one person last week and that worked but it isn't working with the person I trying to distribute to today. Any suggestions? TIA Ed From fuller.artful at gmail.com Wed Jul 6 00:37:47 2011 From: fuller.artful at gmail.com (Arthur Fuller) Date: Wed, 6 Jul 2011 01:37:47 -0400 Subject: [AccessD] "Modern" replacement for CommonDlg In-Reply-To: <4E137B8F.24761.21ADBC5C@stuart.lexacorp.com.pg> References: <4E137B8F.24761.21ADBC5C@stuart.lexacorp.com.pg> Message-ID: Thanks! A. On Tue, Jul 5, 2011 at 5:01 PM, Stuart McLachlan wrote: > Here' ya go, I'm sure I've posted this a few times in the past. > > From vbacreations at gmail.com Wed Jul 6 06:28:25 2011 From: vbacreations at gmail.com (William Benson (VBACreations.Com)) Date: Wed, 6 Jul 2011 07:28:25 -0400 Subject: [AccessD] "Modern" replacement for CommonDlg In-Reply-To: <4E137B8F.24761.21ADBC5C@stuart.lexacorp.com.pg> References: <4E137B8F.24761.21ADBC5C@stuart.lexacorp.com.pg> Message-ID: <002e01cc3bcf$d2959830$77c0c890$@gmail.com> If you put in a reference to Office 12.0 or Office 14.0, I think Access will find the opposite one on another user's machine. Then you can use the dialog. Below is code I wrote which will not require API and allows you to pass in strings for the file filter of this nature *.XL*|*.TXT|*.DAT|*.CSV and like items are grouped when it comes to the description. I quit after the most common file types. Also, I could have written a sort routine to put the detail items together in the filter, but I have not (yet). (text files: TXT, DAT, CSV) Function GetSelectedFile(Optional ExtensionStringWithPipeSeparator) As String Dim iFileTypes As Long Dim fDialog As Office.FileDialog Dim varFile As Variant Dim strTypes As String Dim strFilters As String Dim strTemp As String Dim strParseThis As String Dim ItemsSkipped() Dim strSkipped As String Dim i As Long strFilters = "" strTypes = "" ReDim ItemsSkipped(0) If Not IsMissing(ExtensionStringWithPipeSeparator) Then strParseThis = CStr(ExtensionStringWithPipeSeparator) Else strParseThis = "*.*" End If If strParseThis <> "*.*" Then Do Until InStr(strParseThis, "|") = 0 strTemp = Left(strParseThis, InStr(strParseThis, "|") - 1) strParseThis = Mid(strParseThis, Len(strTemp) + 2) strTemp = Replace$(strTemp, "*.", "") UpdateFilterAndType strTypes:=strTypes, strFilters:=strFilters, strTemp:=strTemp, ItemsSkipped:=ItemsSkipped Loop strTemp = Replace$(strParseThis, "*.", "") UpdateFilterAndType strTypes:=strTypes, strFilters:=strFilters, strTemp:=strTemp, ItemsSkipped:=ItemsSkipped Else strTypes = strTypes & ";*.*" strFilters = strFilters & ",All Files" End If If UBound(ItemsSkipped) > 0 Then strSkipped = "" For i = 1 To UBound(ItemsSkipped) strSkipped = strSkipped & Chr(13) & "'" & ItemsSkipped(i) & "'" Next strSkipped = Mid(strSkipped, 2) MsgBox "Known file Type List not comprehensive enough to accommodate extension(s):" & Chr(13) & Chr(13) & strSkipped End If If strTypes <> "" Then Set fDialog = Application.FileDialog(msoFileDialogFilePicker) fDialog.AllowMultiSelect = False fDialog.Title = "Select a file to examine" fDialog.Filters.Clear fDialog.Filters.Add Mid(strFilters, 2), Mid(strTypes, 2) If fDialog.Show <> True Then 'MsgBox "You clicked Cancel in the file dialog box." GoTo Exit_Me Else Set varFile = fDialog.SelectedItems GetSelectedFile = varFile(1) End If Else MsgBox "No Accepted File Types Were Specified!", vbInformation GetSelectedFile = "" End If Exit_Me: End Function Private Function UpdateFilterAndType(ByRef strTypes As String, ByRef strFilters As String, strTemp As String, ByRef ItemsSkipped) If InStr(UCase(strTemp), "DOC") > 0 Then If InStr(UCase(strFilters), "DOC") = 0 Then strFilters = strFilters & "," & "Doc" End If ElseIf InStr(UCase(strTemp), "RTF") > 0 Then If InStr(UCase(strFilters), "DOC") = 0 Then strFilters = strFilters & "," & "Doc" End If ElseIf InStr(UCase(strTemp), "PDF") > 0 Then strFilters = strFilters & "," & "Pdf" ElseIf InStr(UCase(strTemp), "MD") > 0 Then strFilters = strFilters & "," & "Acc" ElseIf InStr(UCase(strTemp), "XL") > 0 Then If InStr(UCase(strFilters), "SSHT") = 0 Then strFilters = strFilters & "," & "Ssht" End If ElseIf InStr(UCase(strTemp), "WK") > 0 Then If InStr(UCase(strFilters), "SSHT") = 0 Then strFilters = strFilters & "," & "Ssht" End If ElseIf InStr(UCase(strTemp), "TXT") > 0 Then If InStr(UCase(strFilters), "TEXT") = 0 Then strFilters = strFilters & "," & "Text" End If ElseIf InStr(UCase(strTemp), "CSV") > 0 Then If InStr(UCase(strFilters), "TEXT") = 0 Then strFilters = strFilters & "," & "Text" End If ElseIf InStr(UCase(strTemp), "LOG") > 0 Then If InStr(UCase(strFilters), "TEXT") = 0 Then strFilters = strFilters & "," & "Text" End If ElseIf InStr(UCase(strTemp), "DAT") > 0 Then If InStr(UCase(strFilters), "TEXT") = 0 Then strFilters = strFilters & "," & "Text" End If Else If UBound(ItemsSkipped) = 0 Then ReDim ItemsSkipped(1) Else ReDim Preserve ItemsSkipped(UBound(ItemsSkipped) + 1) End If ItemsSkipped(UBound(ItemsSkipped)) = strTemp GoTo Exit_Me End If strTypes = strTypes & ";" & "*." & LCase(strTemp) Exit_Me: End Function From jwcolby at colbyconsulting.com Wed Jul 6 06:46:07 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Wed, 06 Jul 2011 07:46:07 -0400 Subject: [AccessD] =?windows-1252?q?HASHBYTES_=96_A_T-SQL_Function_-_SQL_M?= =?windows-1252?q?usings_-_SQLServerCentral=2Ecom?= Message-ID: <4E144AFF.5010306@colbyconsulting.com> We were discussing hashes awhile back. -- John W. Colby www.ColbyConsulting.com http://www.sqlservercentral.com/blogs/steve_jones/archive/2011/6/28/hashbytes-_1320_-a-t_2D00_sql-function.aspx From fuller.artful at gmail.com Wed Jul 6 07:39:34 2011 From: fuller.artful at gmail.com (Arthur Fuller) Date: Wed, 6 Jul 2011 08:39:34 -0400 Subject: [AccessD] "Modern" replacement for CommonDlg In-Reply-To: <002e01cc3bcf$d2959830$77c0c890$@gmail.com> References: <4E137B8F.24761.21ADBC5C@stuart.lexacorp.com.pg> <002e01cc3bcf$d2959830$77c0c890$@gmail.com> Message-ID: Thanks for this. It does appear to work nicely for selecting a file, but I'm not sure how to modify it to return the selected directory rather than a file in it. A. From vbacreations at gmail.com Wed Jul 6 07:50:05 2011 From: vbacreations at gmail.com (William Benson (VBACreations.Com)) Date: Wed, 6 Jul 2011 08:50:05 -0400 Subject: [AccessD] populating a textbox-type field in one table, calc'ed from another table Message-ID: <002f01cc3bdb$3b067fa0$b1137ee0$@gmail.com> Dear Colleagues, The below expression works when the display control for the field is a listbox, and the above expression its row source. But it won't work (as written) when the display control is a textbox and the expression is the Default Value -- getting syntax error. Default Value = SELECT Sum(Tbl_Field_Values.Items) FROM Tbl_Field_Values WHERE Tbl_Field_Values.WB = WB and Tbl_Field_Values.WS = WS and Tbl_Field_Values.FLD = FLD GROUP BY Tbl_Field_Values.WB, Tbl_Field_Values.WS, Tbl_Field_Values.FLD; Table: Tbl_Field_Values_Header Field: SumOfItems Can the syntax be improved to cause the sum of all items where WB, WS, and FLD match between Tbl_Field_Values and Tbl_Field_Values_Header, to display as the default value in the field I am trying to populate (SumOfItems) in my Tbl_Field_Values_Header table? From stuart at lexacorp.com.pg Wed Jul 6 08:02:41 2011 From: stuart at lexacorp.com.pg (Stuart McLachlan) Date: Wed, 06 Jul 2011 23:02:41 +1000 Subject: [AccessD] "Modern" replacement for CommonDlg In-Reply-To: References: , <002e01cc3bcf$d2959830$77c0c890$@gmail.com>, Message-ID: <4E145CF1.1188.D6EFDE@stuart.lexacorp.com.pg> If you want to select a folder, you don't use OpenFilename(), you use ShBrowseForFolder() Private Declare Function SHBrowseForFolder Lib "SHELL32.DLL" _ Alias "SHBrowseForFolderA" (lpbi As BROWSEINFO) As Long Private Declare Function SHGetPathFromIDList _ Lib "shell32" Alias "SHGetPathFromIDListA" _ (ByVal Pidl As Long, ByVal pszPath As String) As Long Type BROWSEINFO hwndOwner As Long pIDLRoot As Long pszDisplayName As String * 256 lpszTitle As String * 256 ulFlags As Long lpfnCallback As Long lParam As Long iImage As Long End Type Const BIF_RETURNONLYFSDIRS = 1 Const BIF_DONTGOBELOWDOMAIN = 2 Const MAX_PATH = 260 Function BrowseForFolder(hwnd As Long, Title As String) As String Dim strPath As String strPath = Space$(MAX_PATH) Dim bi As BROWSEINFO Dim lpIDList As Long strPath = Space$(MAX_PATH) bi.hwndOwner = 0 bi.lpszTitle = Title bi.ulFlags = BIF_RETURNONLYFSDIRS Or BIF_DONTGOBELOWDOMAIN lpIDList = SHBrowseForFolder(bi) If lpIDList Then SHGetPathFromIDList lpIDList, strPath strPath = Left(strPath, InStr(1, strPath, vbNullChar) - 1) If Len(strPath) > 3 Then strPath = strPath & "\" BrowseForFolder = strPath End If End Function -- Stuart On 6 Jul 2011 at 8:39, Arthur Fuller wrote: > Thanks for this. It does appear to work nicely for selecting a file, > but I'm not sure how to modify it to return the selected directory > rather than a file in it. > > A. > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > From Gustav at cactus.dk Wed Jul 6 08:08:26 2011 From: Gustav at cactus.dk (Gustav Brock) Date: Wed, 06 Jul 2011 15:08:26 +0200 Subject: [AccessD] "Modern" replacement for CommonDlg Message-ID: Hi Arthur > It does appear to work nicely for selecting a file .. However, this screams for a class solution: http://www.karstenpries.de/ Pick menu Entwicklertools, FileDialog It's in German, not Chinese, but you know what it is supposed to do. > how to modify it to return the selected directory .. It contains a ShowFolder method as well. /gustav >>> fuller.artful at gmail.com 06-07-2011 14:39 >>> Thanks for this. It does appear to work nicely for selecting a file, but I'm not sure how to modify it to return the selected directory rather than a file in it. A. From stuart at lexacorp.com.pg Wed Jul 6 08:23:20 2011 From: stuart at lexacorp.com.pg (Stuart McLachlan) Date: Wed, 06 Jul 2011 23:23:20 +1000 Subject: [AccessD] "Modern" replacement for CommonDlg In-Reply-To: References: Message-ID: <4E1461C8.16661.E9DA9A@stuart.lexacorp.com.pg> Geez, you're as bad as JC :-) Why bother with writing 600 lines of code to create a class when there are simple API functions to do it in a few lines? -- Stuart On 6 Jul 2011 at 15:08, Gustav Brock wrote: ... > However, this screams for a class solution: > > http://www.karstenpries.de/ > .. From jwcolby at colbyconsulting.com Wed Jul 6 08:25:09 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Wed, 06 Jul 2011 09:25:09 -0400 Subject: [AccessD] "Modern" replacement for CommonDlg In-Reply-To: References: Message-ID: <4E146235.3010109@colbyconsulting.com> Luckily Arthur is studying classes... ;) John W. Colby www.ColbyConsulting.com On 7/6/2011 9:08 AM, Gustav Brock wrote: > Hi Arthur > >> It does appear to work nicely for selecting a file .. > > However, this screams for a class solution: > > http://www.karstenpries.de/ > > Pick menu Entwicklertools, FileDialog > It's in German, not Chinese, but you know what it is supposed to do. > >> how to modify it to return the selected directory .. > > It contains a ShowFolder method as well. > > /gustav > > >>>> fuller.artful at gmail.com 06-07-2011 14:39>>> > Thanks for this. It does appear to work nicely for selecting a file, but I'm > not sure how to modify it to return the selected directory rather than a > file in it. > > A. > > From EdTesiny at oasas.ny.gov Wed Jul 6 08:32:29 2011 From: EdTesiny at oasas.ny.gov (Tesiny, Ed) Date: Wed, 6 Jul 2011 09:32:29 -0400 Subject: [AccessD] Emailing an .mde In-Reply-To: References: Message-ID: Steve, Sounds like an easy solution but even I can't get access to it and I have enhanced internet access. I'm sure the person I'm working with has no ability to download. Ed Tesiny EdTesiny at oasas.ny.gov -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Steve Schapel Sent: Tuesday, July 05, 2011 7:15 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Emailing an .mde Ed I don't remember the last time I sent an email with a file attached. I always upload it to Dropbox, and then email the link for them to grab it from there. Very easy. Regards Steve -----Original Message----- From: Tesiny, Ed Sent: Wednesday, July 06, 2011 5:09 AM To: Access Developers discussion and problem solving ; Off Topic Subject: [AccessD] Emailing an .mde Hi All, I'm trying to email a database frontend, of course our system blocks it. Is there an extension that is fairly neutral, I tried .doc with one person last week and that worked but it isn't working with the person I trying to distribute to today. Any suggestions? TIA Ed -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From jwcolby at colbyconsulting.com Wed Jul 6 08:40:40 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Wed, 06 Jul 2011 09:40:40 -0400 Subject: [AccessD] "Modern" replacement for CommonDlg In-Reply-To: <4E1461C8.16661.E9DA9A@stuart.lexacorp.com.pg> References: <4E1461C8.16661.E9DA9A@stuart.lexacorp.com.pg> Message-ID: <4E1465D8.2070702@colbyconsulting.com> LOL. 600 lines of code? You need to go back to class writing school. John W. Colby www.ColbyConsulting.com On 7/6/2011 9:23 AM, Stuart McLachlan wrote: > Geez, you're as bad as JC :-) > > Why bother with writing 600 lines of code to create a class when there are simple API > functions to do it in a few lines? > From Gustav at cactus.dk Wed Jul 6 08:49:38 2011 From: Gustav at cactus.dk (Gustav Brock) Date: Wed, 06 Jul 2011 15:49:38 +0200 Subject: [AccessD] "Modern" replacement for CommonDlg Message-ID: Hi Stuart Because it is the way to do it. You initialize the object, set some properties, call a method, bingo. If not the right folder/file, adjust some properties, call a method, bingo. When I discovered this logical operation many years ago (I only do very little VBA programming these days) it brought relief and good nights' sleep! Of course, if one prefer traditional methods, no problem, I just wanted to point out that you can do it the OO way even without the OCX. /gustav >>> stuart at lexacorp.com.pg 06-07-2011 15:23 >>> Geez, you're as bad as JC :-) Why bother with writing 600 lines of code to create a class when there are simple API functions to do it in a few lines? -- Stuart On 6 Jul 2011 at 15:08, Gustav Brock wrote: ... > However, this screams for a class solution: > > http://www.karstenpries.de/ > .. From df.waters at comcast.net Wed Jul 6 08:51:30 2011 From: df.waters at comcast.net (Dan Waters) Date: Wed, 6 Jul 2011 08:51:30 -0500 Subject: [AccessD] Emailing an .mde In-Reply-To: References: Message-ID: <002101cc3be3$cfe9e910$6fbdbb30$@comcast.net> I change the extension to .pdf. Always works. If you file is large, you might compress it first, then change .zip to .pdf. Dan -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Tesiny, Ed Sent: Wednesday, July 06, 2011 8:32 AM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Emailing an .mde Steve, Sounds like an easy solution but even I can't get access to it and I have enhanced internet access. I'm sure the person I'm working with has no ability to download. Ed Tesiny EdTesiny at oasas.ny.gov -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Steve Schapel Sent: Tuesday, July 05, 2011 7:15 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Emailing an .mde Ed I don't remember the last time I sent an email with a file attached. I always upload it to Dropbox, and then email the link for them to grab it from there. Very easy. Regards Steve -----Original Message----- From: Tesiny, Ed Sent: Wednesday, July 06, 2011 5:09 AM To: Access Developers discussion and problem solving ; Off Topic Subject: [AccessD] Emailing an .mde Hi All, I'm trying to email a database frontend, of course our system blocks it. Is there an extension that is fairly neutral, I tried .doc with one person last week and that worked but it isn't working with the person I trying to distribute to today. Any suggestions? TIA Ed -- 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 Wed Jul 6 09:27:06 2011 From: rockysmolin at bchacc.com (rockysmolin at bchacc.com) Date: Wed, 06 Jul 2011 07:27:06 -0700 Subject: [AccessD] Emailing an .mde Message-ID: <20110706072706.86c3debdd1c3983866efe200e2feb95f.2abc9b1f88.wbe@email18.secureserver.net> How about YouSendIt.com? I;ve been using that for a year and it's been flawless. I also use a folder on my website /ftpguest where I FTP things and clients can download them from there using a browser. Rocky -------- Original Message -------- Subject: Re: [AccessD] Emailing an .mde From: "Tesiny, Ed" Date: Wed, July 06, 2011 6:32 am To: "Access Developers discussion and problem solving" Steve, Sounds like an easy solution but even I can't get access to it and I have enhanced internet access. I'm sure the person I'm working with has no ability to download. Ed Tesiny EdTesiny at oasas.ny.gov -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Steve Schapel Sent: Tuesday, July 05, 2011 7:15 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Emailing an .mde Ed I don't remember the last time I sent an email with a file attached. I always upload it to Dropbox, and then email the link for them to grab it from there. Very easy. Regards Steve -----Original Message----- From: Tesiny, Ed Sent: Wednesday, July 06, 2011 5:09 AM To: Access Developers discussion and problem solving ; Off Topic Subject: [AccessD] Emailing an .mde Hi All, I'm trying to email a database frontend, of course our system blocks it. Is there an extension that is fairly neutral, I tried .doc with one person last week and that worked but it isn't working with the person I trying to distribute to today. Any suggestions? TIA Ed -- 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 EdTesiny at oasas.ny.gov Wed Jul 6 10:24:50 2011 From: EdTesiny at oasas.ny.gov (Tesiny, Ed) Date: Wed, 6 Jul 2011 11:24:50 -0400 Subject: [AccessD] Emailing an .mde In-Reply-To: <20110706072706.86c3debdd1c3983866efe200e2feb95f.2abc9b1f88.wbe@email18.secureserver.net> References: <20110706072706.86c3debdd1c3983866efe200e2feb95f.2abc9b1f88.wbe@email18.secureserver.net> Message-ID: FTP is totally blocked...the agency is PARANOID! Ed Tesiny EdTesiny at oasas.ny.gov -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of rockysmolin at bchacc.com Sent: Wednesday, July 06, 2011 10:27 AM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Emailing an .mde How about YouSendIt.com? I;ve been using that for a year and it's been flawless. I also use a folder on my website /ftpguest where I FTP things and clients can download them from there using a browser. Rocky -------- Original Message -------- Subject: Re: [AccessD] Emailing an .mde From: "Tesiny, Ed" Date: Wed, July 06, 2011 6:32 am To: "Access Developers discussion and problem solving" Steve, Sounds like an easy solution but even I can't get access to it and I have enhanced internet access. I'm sure the person I'm working with has no ability to download. Ed Tesiny EdTesiny at oasas.ny.gov -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Steve Schapel Sent: Tuesday, July 05, 2011 7:15 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Emailing an .mde Ed I don't remember the last time I sent an email with a file attached. I always upload it to Dropbox, and then email the link for them to grab it from there. Very easy. Regards Steve -----Original Message----- From: Tesiny, Ed Sent: Wednesday, July 06, 2011 5:09 AM To: Access Developers discussion and problem solving ; Off Topic Subject: [AccessD] Emailing an .mde Hi All, I'm trying to email a database frontend, of course our system blocks it. Is there an extension that is fairly neutral, I tried .doc with one person last week and that worked but it isn't working with the person I trying to distribute to today. Any suggestions? TIA Ed -- 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 Wed Jul 6 10:48:05 2011 From: stuart at lexacorp.com.pg (Stuart McLachlan) Date: Thu, 07 Jul 2011 01:48:05 +1000 Subject: [AccessD] "Modern" replacement for CommonDlg In-Reply-To: <4E1465D8.2070702@colbyconsulting.com> References: , <4E1461C8.16661.E9DA9A@stuart.lexacorp.com.pg>, <4E1465D8.2070702@colbyconsulting.com> Message-ID: <4E1483B5.26290.16E6158@stuart.lexacorp.com.pg> Not me. Download the file that Gustav pointed to. The FileDialog class module in the mdb is 615 lines long. -- Stuart On 6 Jul 2011 at 9:40, jwcolby wrote: > LOL. 600 lines of code? You need to go back to class writing school. > > John W. Colby > www.ColbyConsulting.com > > On 7/6/2011 9:23 AM, Stuart McLachlan wrote: > > Geez, you're as bad as JC :-) > > > > Why bother with writing 600 lines of code to create a class when > > there are simple API functions to do it in a few lines? > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > From charlotte.foust at gmail.com Wed Jul 6 11:14:28 2011 From: charlotte.foust at gmail.com (Charlotte Foust) Date: Wed, 6 Jul 2011 09:14:28 -0700 Subject: [AccessD] populating a textbox-type field in one table, calc'ed from another table In-Reply-To: <002f01cc3bdb$3b067fa0$b1137ee0$@gmail.com> References: <002f01cc3bdb$3b067fa0$b1137ee0$@gmail.com> Message-ID: Default values aren't calculated but row sources are. You would need to put some code behind the form to load the value into an unbound textbox in the appropriate event, probably the On Current event. Charlotte Foust On Wed, Jul 6, 2011 at 5:50 AM, William Benson (VBACreations.Com) < vbacreations at gmail.com> wrote: > Dear Colleagues, > > The below expression works when the display control for the field is a > listbox, and the above expression its row source. But it won't work (as > written) when the display control is a textbox and the expression is the > Default Value -- getting syntax error. > > Default Value = SELECT Sum(Tbl_Field_Values.Items) FROM Tbl_Field_Values > WHERE Tbl_Field_Values.WB = WB and Tbl_Field_Values.WS = WS and > Tbl_Field_Values.FLD = FLD GROUP BY Tbl_Field_Values.WB, > Tbl_Field_Values.WS, Tbl_Field_Values.FLD; > > Table: Tbl_Field_Values_Header > Field: SumOfItems > > > Can the syntax be improved to cause the sum of all items where WB, WS, and > FLD match between Tbl_Field_Values and Tbl_Field_Values_Header, to display > as the default value in the field I am trying to populate (SumOfItems) in > my > Tbl_Field_Values_Header table? > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > > > Website: http://www.databaseadvisors.com > > > From vbacreations at gmail.com Wed Jul 6 11:47:02 2011 From: vbacreations at gmail.com (William Benson (VBACreations.Com)) Date: Wed, 6 Jul 2011 12:47:02 -0400 Subject: [AccessD] How to tell a button's "air space" is nolonger beinghovered over References: <003b01cc38f1$b62edca0$228c95e0$@gmail.com><471F6C8DAB244C66B0AB79536085B3EC@personal4a8ede> <002001cc3a5e$5428d240$fc7a76c0$@gmail.com> <8DD6228312434CD0940AE4E4807C4FF6@personal4a8ede> Message-ID: <004001cc3bfc$56097700$021c6500$@gmail.com> OK, I am scratching my head to think why I didn't see this simpler solution the minute A.D. showed me how to test X and Y. This pretty much always resets at the button edge, and if shift is held, shows the alternate caption in the interior. Private Sub cmdClearFieldHistory_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single) Dim W As Single Dim H As Single If Shift = 0 Then cmdClearFieldHistory.Caption = "Clear Field History" Else W = cmdClearFieldHistory.Width H = cmdClearFieldHistory.Height If X = 0 Or X = W Or Y = 0 Or Y = H Then cmdClearFieldHistory.Caption = "Clear Field History" Else cmdClearFieldHistory.Caption = "Clear All Fields" End If End If End Sub From jwcolby at colbyconsulting.com Wed Jul 6 14:12:19 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Wed, 06 Jul 2011 15:12:19 -0400 Subject: [AccessD] "Modern" replacement for CommonDlg In-Reply-To: <4E1483B5.26290.16E6158@stuart.lexacorp.com.pg> References: , <4E1461C8.16661.E9DA9A@stuart.lexacorp.com.pg>, <4E1465D8.2070702@colbyconsulting.com> <4E1483B5.26290.16E6158@stuart.lexacorp.com.pg> Message-ID: <4E14B393.8010500@colbyconsulting.com> Then I have to assume that they are giving you access to properties, i.e. turning it into an object. I wrap things in a class all the time. That is pretty much the entire point of classes is to give you methods and properties. And yea, yea, you don't do classes. John W. Colby www.ColbyConsulting.com On 7/6/2011 11:48 AM, Stuart McLachlan wrote: > Not me. > Download the file that Gustav pointed to. The FileDialog class module in the mdb is 615 > lines long. > From jwcolby at colbyconsulting.com Wed Jul 6 14:14:11 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Wed, 06 Jul 2011 15:14:11 -0400 Subject: [AccessD] "Modern" replacement for CommonDlg In-Reply-To: References: Message-ID: <4E14B403.1010306@colbyconsulting.com> Any chance you could translate it? ;) John W. Colby www.ColbyConsulting.com On 7/6/2011 9:08 AM, Gustav Brock wrote: > Hi Arthur > >> It does appear to work nicely for selecting a file .. > > However, this screams for a class solution: > > http://www.karstenpries.de/ > > Pick menu Entwicklertools, FileDialog > It's in German, not Chinese, but you know what it is supposed to do. > >> how to modify it to return the selected directory .. > > It contains a ShowFolder method as well. > > /gustav > > >>>> fuller.artful at gmail.com 06-07-2011 14:39>>> > Thanks for this. It does appear to work nicely for selecting a file, but I'm > not sure how to modify it to return the selected directory rather than a > file in it. > > A. > > From fuller.artful at gmail.com Wed Jul 6 17:32:19 2011 From: fuller.artful at gmail.com (Arthur Fuller) Date: Wed, 6 Jul 2011 18:32:19 -0400 Subject: [AccessD] "Modern" replacement for CommonDlg In-Reply-To: <4E14B403.1010306@colbyconsulting.com> References: <4E14B403.1010306@colbyconsulting.com> Message-ID: I'm working on it. My German is shaky, but my Cantonese and Mandarin are coming along, and I am already conversant with Spanish and French. This won't take long. Given a gift for languages, I'll be there in a fortnight. LOL. A. On Wed, Jul 6, 2011 at 3:14 PM, jwcolby wrote: > Any chance you could translate it? ;) > > > From jwcolby at colbyconsulting.com Wed Jul 6 18:20:46 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Wed, 06 Jul 2011 19:20:46 -0400 Subject: [AccessD] "Modern" replacement for CommonDlg In-Reply-To: References: <4E14B403.1010306@colbyconsulting.com> Message-ID: <4E14EDCE.8010605@colbyconsulting.com> I keep asking someone to gift me a language. 'Southern' seems to be what is being gifted. ;) John W. Colby www.ColbyConsulting.com On 7/6/2011 6:32 PM, Arthur Fuller wrote: > I'm working on it. My German is shaky, but my Cantonese and Mandarin are > coming along, and I am already conversant with Spanish and French. This > won't take long. Given a gift for languages, I'll be there in a fortnight. > LOL. > > A. > > On Wed, Jul 6, 2011 at 3:14 PM, jwcolby wrote: > >> Any chance you could translate it? ;) >> >> >> From df.waters at comcast.net Wed Jul 6 18:56:04 2011 From: df.waters at comcast.net (Dan Waters) Date: Wed, 6 Jul 2011 18:56:04 -0500 Subject: [AccessD] "Modern" replacement for CommonDlg In-Reply-To: <4E14EDCE.8010605@colbyconsulting.com> References: <4E14B403.1010306@colbyconsulting.com> <4E14EDCE.8010605@colbyconsulting.com> Message-ID: <005e01cc3c38$48280840$d87818c0$@comcast.net> Maybe you can find an on-line translation site? Paste the German into a field and English shows up on another screen. I found one for C# and VB.Net - works great. Dan -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Wednesday, July 06, 2011 6:21 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] "Modern" replacement for CommonDlg I keep asking someone to gift me a language. 'Southern' seems to be what is being gifted. ;) John W. Colby www.ColbyConsulting.com On 7/6/2011 6:32 PM, Arthur Fuller wrote: > I'm working on it. My German is shaky, but my Cantonese and Mandarin > are coming along, and I am already conversant with Spanish and French. > This won't take long. Given a gift for languages, I'll be there in a fortnight. > LOL. > > A. > > On Wed, Jul 6, 2011 at 3:14 PM, jwcolby wrote: > >> Any chance you could translate it? ;) >> >> >> -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From vbacreations at gmail.com Wed Jul 6 23:46:36 2011 From: vbacreations at gmail.com (William Benson (VBACreations.Com)) Date: Thu, 7 Jul 2011 00:46:36 -0400 Subject: [AccessD] "Modern" replacement for CommonDlg In-Reply-To: <005e01cc3c38$48280840$d87818c0$@comcast.net> References: <4E14B403.1010306@colbyconsulting.com> <4E14EDCE.8010605@colbyconsulting.com> <005e01cc3c38$48280840$d87818c0$@comcast.net> Message-ID: <000001cc3c60$db287350$917959f0$@gmail.com> I have this loop which results in my 2nd listbox row being selected every time and it annoys me. I can't figure out what is causing *any* row to be selected. Debug Behavior: Row 0 added, nothing is selected. Row 1 added, it gets selected. Row 2 added, Row 1 stays selected. Row 3 added, Row 1 stays selected. For Each WS In WB.Worksheets lstWS.AddItem WS.Name & ";" & XL.WorksheetFunction.CountA(WS.Rows(1)) Next From charlotte.foust at gmail.com Wed Jul 6 23:55:53 2011 From: charlotte.foust at gmail.com (Charlotte Foust) Date: Wed, 6 Jul 2011 21:55:53 -0700 Subject: [AccessD] "Modern" replacement for CommonDlg In-Reply-To: <000001cc3c60$db287350$917959f0$@gmail.com> References: <4E14B403.1010306@colbyconsulting.com> <4E14EDCE.8010605@colbyconsulting.com> <005e01cc3c38$48280840$d87818c0$@comcast.net> <000001cc3c60$db287350$917959f0$@gmail.com> Message-ID: Does your listbox have a header row? That would affect which row was the default. Charlotte Foust On Wed, Jul 6, 2011 at 9:46 PM, William Benson (VBACreations.Com) < vbacreations at gmail.com> wrote: > I have this loop which results in my 2nd listbox row being selected every > time and it annoys me. I can't figure out what is causing *any* row to be > selected. > > Debug Behavior: > Row 0 added, nothing is selected. > Row 1 added, it gets selected. > Row 2 added, Row 1 stays selected. > Row 3 added, Row 1 stays selected. > > For Each WS In WB.Worksheets > lstWS.AddItem WS.Name & ";" & > XL.WorksheetFunction.CountA(WS.Rows(1)) > Next > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > > > Website: http://www.databaseadvisors.com > > > From Gustav at cactus.dk Thu Jul 7 04:07:29 2011 From: Gustav at cactus.dk (Gustav Brock) Date: Thu, 07 Jul 2011 11:07:29 +0200 Subject: [AccessD] "Modern" replacement for CommonDlg Message-ID: Hi John Sorry, I just picked it from my archive where I have a modified version, looked up the site, and found out that a new link and version was for download. But I don't use it anymore and didn't download it and translating an old version wouldn't make much sense. But again, you know what the class is intended for, so translating may not be needed at all. /gustav >>> jwcolby at colbyconsulting.com 06-07-2011 21:14 >>> Any chance you could translate it? ;) John W. Colby www.ColbyConsulting.com On 7/6/2011 9:08 AM, Gustav Brock wrote: > Hi Arthur > >> It does appear to work nicely for selecting a file .. > > However, this screams for a class solution: > > http://www.karstenpries.de/ > > Pick menu Entwicklertools, FileDialog > It's in German, not Chinese, but you know what it is supposed to do. > >> how to modify it to return the selected directory .. > > It contains a ShowFolder method as well. > > /gustav > > >>>> fuller.artful at gmail.com 06-07-2011 14:39>>> > Thanks for this. It does appear to work nicely for selecting a file, but I'm > not sure how to modify it to return the selected directory rather than a > file in it. > > A. From jwcolby at colbyconsulting.com Thu Jul 7 07:03:20 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Thu, 07 Jul 2011 08:03:20 -0400 Subject: [AccessD] SQL Server - Query non-updateable Message-ID: <4E15A088.9050801@colbyconsulting.com> I have a selection query for a bound form. If I just do a select xyz from tblInmate it works of course. I want to select a subset of inmates that reflect those that I work with (specific camps). I have a tblVolunteerCamps (the camps that a volunteer works with) and I built a stored procedure out in SQL Server that selects the IDs of inmates at those camps. I feed the SP the volunteer ID and back comes the campIDs and the inmateIDs in those camps. I had read (on this list) that if I used IN (SELECT ID from QueryXYZ) in the where clause it would allow the query to be editable but doing so is turning my query into a non-updatable query. SELECT TblInmate.* from tblInmate WHERE (INM_Active <> 0) AND (INM_Location IN (SELECT CMP_LOCCODE FROM qspVolCampIDs)) If I remove the IN clause, the query is updateable. I really need to filter to just the camps the volunteer works with and I am wondering how to accomplish this. In the past I would try to JOIN the main query to the selection filter and that caused non-updateable. I was told to use the IN(SELECT) which has worked in most cases in the past. Any clue why not now and how to go about filtering and keeping it updateable? -- John W. Colby www.ColbyConsulting.com From jwcolby at colbyconsulting.com Thu Jul 7 07:20:46 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Thu, 07 Jul 2011 08:20:46 -0400 Subject: [AccessD] SQL Server - Query non-updateable In-Reply-To: <4E15A088.9050801@colbyconsulting.com> References: <4E15A088.9050801@colbyconsulting.com> Message-ID: <4E15A49E.30002@colbyconsulting.com> Further to this, I have discovered that if I build a temp table inside of the access fe and do the join it is un-updateable. However if I use the temp table in the IN() clause it is now updateable. So it is something about using the stored procedure in the IN() that causes the query to become un-updateable. John W. Colby www.ColbyConsulting.com On 7/7/2011 8:03 AM, jwcolby wrote: > I have a selection query for a bound form. If I just do a select xyz from tblInmate it works of > course. I want to select a subset of inmates that reflect those that I work with (specific camps). > > I have a tblVolunteerCamps (the camps that a volunteer works with) and I built a stored procedure > out in SQL Server that selects the IDs of inmates at those camps. I feed the SP the volunteer ID and > back comes the campIDs and the inmateIDs in those camps. > > I had read (on this list) that if I used IN (SELECT ID from QueryXYZ) in the where clause it would > allow the query to be editable but doing so is turning my query into a non-updatable query. > > SELECT TblInmate.* from tblInmate > WHERE (INM_Active <> 0) AND > (INM_Location IN (SELECT CMP_LOCCODE FROM qspVolCampIDs)) > > If I remove the IN clause, the query is updateable. > > I really need to filter to just the camps the volunteer works with and I am wondering how to > accomplish this. In the past I would try to JOIN the main query to the selection filter and that > caused non-updateable. I was told to use the IN(SELECT) which has worked in most cases in the past. > > Any clue why not now and how to go about filtering and keeping it updateable? > From iggy at nanaimo.ark.com Thu Jul 7 07:59:37 2011 From: iggy at nanaimo.ark.com (Tony Septav) Date: Thu, 7 Jul 2011 05:59:37 -0700 Subject: [AccessD] Cannot Open Anymore Databases Message-ID: Hey All Just curious. I was working on a report, I would view it and when I returned to the design mode I would get the error message "Cannot open anymore databases". The report is based on a union query, which is made up of 6 subqueries. each of these subqueries is based on the results from about 3 or 4 other querys. If I manually run the union query I don't get any error messages, as I mentioned I only get the error message when working with the report. Am I correct in assuming that the results of each of these queries results in 1 instant of the database being opened and I have exceeded the 84 (whatever) limit to the number of databases instances that can be open at one time?? I solved the problem by appending the results of each of the 6 queries to a temp table and using the table for the report. T. Septav Nanaimo, BC Canada From jwcolby at colbyconsulting.com Fri Jul 8 12:24:59 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Fri, 08 Jul 2011 13:24:59 -0400 Subject: [AccessD] xyz* faster than *asd Message-ID: <4E173D6B.4060709@colbyconsulting.com> Does anyone know of a reason that LIKE is faster with the * in back instead of the front of a string to search by in the where clause? -- John W. Colby www.ColbyConsulting.com From fuller.artful at gmail.com Fri Jul 8 12:47:57 2011 From: fuller.artful at gmail.com (Arthur Fuller) Date: Fri, 8 Jul 2011 13:47:57 -0400 Subject: [AccessD] xyz* faster than *asd In-Reply-To: <4E173D6B.4060709@colbyconsulting.com> References: <4E173D6B.4060709@colbyconsulting.com> Message-ID: Well yeah! If prefaced with an asterisk, it means LIKE everything; if suffixed with an asterisk, it means "Everything like JWC*"; hence search for JWC and walk the remaining similarities. A. On Fri, Jul 8, 2011 at 1:24 PM, jwcolby wrote: > Does anyone know of a reason that LIKE is faster with the * in back instead > of the front of a string to search by in the where clause? > > From vbacreations at gmail.com Fri Jul 8 12:54:20 2011 From: vbacreations at gmail.com (William Benson (VBACreations.Com)) Date: Fri, 8 Jul 2011 13:54:20 -0400 Subject: [AccessD] xyz* faster than *asd In-Reply-To: References: <4E173D6B.4060709@colbyconsulting.com> Message-ID: <001401cc3d98$10e777b0$32b66710$@gmail.com> I don't think that is true Arthur. If testing Like XYZ* you are saying ONLY THINGS THAT begin with XYZ, and if testing LIKE *XYZ you are saying only things which end with XYZ -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Arthur Fuller Sent: Friday, July 08, 2011 1:48 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] xyz* faster than *asd Well yeah! If prefaced with an asterisk, it means LIKE everything; if suffixed with an asterisk, it means "Everything like JWC*"; hence search for JWC and walk the remaining similarities. A. On Fri, Jul 8, 2011 at 1:24 PM, jwcolby wrote: > Does anyone know of a reason that LIKE is faster with the * in back > instead of the front of a string to search by in the where clause? > > -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From Lambert.Heenan at chartisinsurance.com Fri Jul 8 12:55:34 2011 From: Lambert.Heenan at chartisinsurance.com (Heenan, Lambert) Date: Fri, 8 Jul 2011 13:55:34 -0400 Subject: [AccessD] xyz* faster than *asd In-Reply-To: <4E173D6B.4060709@colbyconsulting.com> References: <4E173D6B.4060709@colbyconsulting.com> Message-ID: If by 'back' you mean on the right and 'front' meaning on the left, then the answer is surely to do with how the pattern matching takes place. With a search string like "FOOBAR*" the Db engine can simply filter all records where the field starts with 'FOOBAR', and that will be fairly fast as only the first n characters in each record need to be examined. But with LIKE *FOOBAR* the starting location of the search string is indeterminate. Therefore for each record, more characters have to be examined to check if the substring 'FOOBAR' is in the data. For a false match that means every character (minus n - the length of the substring) in the string needs to be checked. Lambert -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Friday, July 08, 2011 1:25 PM To: Access Developers discussion and problem solving Subject: [AccessD] xyz* faster than *asd Does anyone know of a reason that LIKE is faster with the * in back instead of the front of a string to search by in the where clause? -- John W. Colby www.ColbyConsulting.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From jwcolby at colbyconsulting.com Fri Jul 8 12:59:24 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Fri, 08 Jul 2011 13:59:24 -0400 Subject: [AccessD] xyz* faster than *asd In-Reply-To: References: <4E173D6B.4060709@colbyconsulting.com> Message-ID: <4E17457C.9010109@colbyconsulting.com> > Well yeah! If prefaced with an asterisk, it means LIKE everything; AFAIK they mean the same thing (only backward) *asd means everything with 'asd' at the end asd* means everything with 'asd' at the beginning I vaguely remember reading (long ago) that one was faster than the other but the why escapes me. John W. Colby www.ColbyConsulting.com On 7/8/2011 1:47 PM, Arthur Fuller wrote: > Well yeah! If prefaced with an asterisk, it means LIKE everything; if > suffixed with an asterisk, it means "Everything like JWC*"; hence search for > JWC and walk the remaining similarities. > > A. > > On Fri, Jul 8, 2011 at 1:24 PM, jwcolby wrote: > >> Does anyone know of a reason that LIKE is faster with the * in back instead >> of the front of a string to search by in the where clause? >> >> From Lambert.Heenan at chartisinsurance.com Fri Jul 8 12:59:40 2011 From: Lambert.Heenan at chartisinsurance.com (Heenan, Lambert) Date: Fri, 8 Jul 2011 13:59:40 -0400 Subject: [AccessD] xyz* faster than *asd In-Reply-To: References: <4E173D6B.4060709@colbyconsulting.com> Message-ID: And for the case where you have 'LIKE *FOOBAR', that will be slower because the db has to first figure out how long the data is, then look at the last n characters to check for a match, whereas LIKE FOOBAR* still only has to look at the first n characters. Lambert -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Heenan, Lambert Sent: Friday, July 08, 2011 1:56 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] xyz* faster than *asd If by 'back' you mean on the right and 'front' meaning on the left, then the answer is surely to do with how the pattern matching takes place. With a search string like "FOOBAR*" the Db engine can simply filter all records where the field starts with 'FOOBAR', and that will be fairly fast as only the first n characters in each record need to be examined. But with LIKE *FOOBAR* the starting location of the search string is indeterminate. Therefore for each record, more characters have to be examined to check if the substring 'FOOBAR' is in the data. For a false match that means every character (minus n - the length of the substring) in the string needs to be checked. Lambert -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Friday, July 08, 2011 1:25 PM To: Access Developers discussion and problem solving Subject: [AccessD] xyz* faster than *asd Does anyone know of a reason that LIKE is faster with the * in back instead of the front of a string to search by in the where clause? -- John W. Colby www.ColbyConsulting.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 DWUTKA at Marlow.com Fri Jul 8 14:12:37 2011 From: DWUTKA at Marlow.com (Drew Wutka) Date: Fri, 8 Jul 2011 14:12:37 -0500 Subject: [AccessD] xyz* faster than *asd In-Reply-To: <4E173D6B.4060709@colbyconsulting.com> References: <4E173D6B.4060709@colbyconsulting.com> Message-ID: It's based on how indexing, in general, works. If indexing is completely turned off, the search time should be the same either way. I actually built two separate indexing systems. The first was for a PDA version of a system I had, which included a company phone list. The normal application installed on all of our PC's allowed the user to search by first name, last name, or extension number. It was a single textbox search, worked great on the PC version. But when I built it for the palm V... WOW, was slow as dirt. The Palm database didn't have an indexing option. In essence, it was basically a flat file. So what I did, is I created my own index. I had three fields I wanted to search quickly with (First Name, Last Name, extension). I then formatted the system on the Palm to have 6 tables. The main table 3 times, sorted by one key field (so a main table sorted by first name, one sorted by last name, one sorted by extension), then 3 indexing tables, one for each main table. The 'phone list' (at the time) had anywhere from 450 to 900 employees. The data was pretty small though, just text fields, and therefore didn't take up that much space to triplicate it for the palm. (The sorting and table creation were done in process with the Palm synch process). The Index table had 3 fields: The first field was the first letter (which really this was an unnecessary field). So there were 26 records (A thru Z). The Second field was the position in the related main table where that letter started. (for the number index, it obviously had 10 records (with the first field being 0 to 9 (though I only really needed 3 or 4 of those numbers since our extensions were in a specific range))). Then the second field was a text field with a 104 character text field (26x4). Each group of 4 letters (there were 26 of them), represented the hexadecimal value (it may have been decimal, don't remember) of the starting point of the second letter past the first letter's starting point. So, for example, let's say a user searched for Mike, the code would look at the first letter, say 'It's an M, that's the 13th letter (or Asc(UCASE(strFirstLetter))-64), so it would jump to the 13th record in the index table (it was slow to search through each record, but you could jump to a record by it's position very quickly). So the Record in the First Name Index table would look something like this: (oh, if the 4 characters representing the second letter is 0000, then it knows that there are no records for that first/second letter combo... and the numeric representation is 1 off, so 0001 represents the first record of the first letter starting point) M,140,000100000000000000030000000000000010..... So now that I have this record, my code knows that the 9th group for four digits is 0010, and the starting point is 140, it now knows that records starting with MI (for MIKE) start at record 149 (140+10-1(for 1 off offset)). So now the code can jump to the 149th record of the main table (sorted by first name). If the search were to look for Mark (MA for first two letters), it would start at record 140 on the main table (140+1-1). So instead of scanning every record, a slow process taking about 30 seconds on a Palm V, now I am doing a jump to one record, a little math and string reading, and then a jump to a much closer spot to finish the search. So, while my methods/code are probably not identical to indexing in Jet or SQL, it is probably similar, so searching for abc* is able to directly use the index of the record, making very fast jumps through it, where as *xyz, it is going to have to scan every record still. The second indexing system I built was for the old AccessD archives I used to host. I had it hosted with Access as the backend, and posts needed to be able to be searched by word, so a post with a thousand words needed a thousand indexes. SQL allows for full text indexing.... again, my method may not be identical, but the concept is probably similar. What I did for my full text indexing, is as a 'post' came in to be archived, The code would break down each post into individual words. It would then seach a word index (had a table for each starting letter of each word), to see if that word was in the index, if the word exists (say the word is 'AND', it would look in tblAWords), it would take the key of that word, if it didn't exist, it added that word to the index, and then took the newly created key. Then, it would add a record to a tblAWordsToPosts (where 'A' is for search words starting with A, so there were 26 of these tables) with the ID of the search word, and the ID of the post. So if you were to search for 'Unbound Forms', the search would hit tblUWords to get the Key for 'Unbound', then it would hit tblFWords, to get the key for 'Forms', then it would take those two keys, and create a query to return records from tblPosts, where there were joined records with tblUWordsToPosts and tblFWordsToPosts. All in all, with hundreds of thousands of records, the searching of those records were getting done in a second or two, instead of a massively long search going through the memo fields themselves. Drew -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Friday, July 08, 2011 12:25 PM To: Access Developers discussion and problem solving Subject: [AccessD] xyz* faster than *asd Does anyone know of a reason that LIKE is faster with the * in back instead of the front of a string to search by in the where clause? -- John W. Colby www.ColbyConsulting.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com The information contained in this transmission is intended only for the person or entity to which it is addressed and may contain II-VI Proprietary and/or II-VI Business Sensitive material. If you are not the intended recipient, please contact the sender immediately and destroy the material in its entirety, whether electronic or hard copy. You are notified that any review, retransmission, copying, disclosure, dissemination, or other use of, or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. From ab-mi at post3.tele.dk Fri Jul 8 14:57:27 2011 From: ab-mi at post3.tele.dk (Asger Blond) Date: Fri, 8 Jul 2011 21:57:27 +0200 Subject: [AccessD] xyz* faster than *asd References: <4E173D6B.4060709@colbyconsulting.com> Message-ID: Like Drew my answer is: if you have no index on the field there will be no difference to performance because the query engine then has to do a table scan. But if you have an index on the field then the query engine can use the index for LIKE xyz*, but it has to do a table scan for LIKE *xyz. Asger ----- Original meddelelse ----- > Fra: jwcolby > Til: Access Developers discussion and problem solving > > Dato: Fre, 08. jul 2011 19:24 > Emne: [AccessD] xyz* faster than *asd > > Does anyone know of a reason that LIKE is faster with the * in back > instead of the front of a string > to search by in the where clause? > > -- > John W. Colby > www.ColbyConsulting.com > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com From DWUTKA at Marlow.com Fri Jul 8 15:04:34 2011 From: DWUTKA at Marlow.com (Drew Wutka) Date: Fri, 8 Jul 2011 15:04:34 -0500 Subject: [AccessD] xyz* faster than *asd In-Reply-To: References: <4E173D6B.4060709@colbyconsulting.com> Message-ID: Boy, you're answer was WAY shorter then mine! I went into detail though, to explain the process a bit. Drew -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Asger Blond Sent: Friday, July 08, 2011 2:57 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] xyz* faster than *asd Like Drew my answer is: if you have no index on the field there will be no difference to performance because the query engine then has to do a table scan. But if you have an index on the field then the query engine can use the index for LIKE xyz*, but it has to do a table scan for LIKE *xyz. Asger ----- Original meddelelse ----- > Fra: jwcolby > Til: Access Developers discussion and problem solving > > Dato: Fre, 08. jul 2011 19:24 > Emne: [AccessD] xyz* faster than *asd > > Does anyone know of a reason that LIKE is faster with the * in back > instead of the front of a string > to search by in the where clause? > > -- > John W. Colby > www.ColbyConsulting.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 The information contained in this transmission is intended only for the person or entity to which it is addressed and may contain II-VI Proprietary and/or II-VI Business Sensitive material. If you are not the intended recipient, please contact the sender immediately and destroy the material in its entirety, whether electronic or hard copy. You are notified that any review, retransmission, copying, disclosure, dissemination, or other use of, or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. From fuller.artful at gmail.com Fri Jul 8 15:35:40 2011 From: fuller.artful at gmail.com (Arthur Fuller) Date: Fri, 8 Jul 2011 16:35:40 -0400 Subject: [AccessD] xyz* faster than *asd In-Reply-To: <001401cc3d98$10e777b0$32b66710$@gmail.com> References: <4E173D6B.4060709@colbyconsulting.com> <001401cc3d98$10e777b0$32b66710$@gmail.com> Message-ID: I think that is true, and I have just tested and verified my conjecture. A. On Fri, Jul 8, 2011 at 1:54 PM, William Benson (VBACreations.Com) < vbacreations at gmail.com> wrote: > I don't think that is true Arthur. > > If testing Like XYZ* you are saying ONLY THINGS THAT begin with XYZ, and if > testing LIKE *XYZ you are saying only things which end with XYZ > > From john at winhaven.net Fri Jul 8 16:38:35 2011 From: john at winhaven.net (John Bartow) Date: Fri, 8 Jul 2011 16:38:35 -0500 Subject: [AccessD] xyz* faster than *asd In-Reply-To: <4E173D6B.4060709@colbyconsulting.com> References: <4E173D6B.4060709@colbyconsulting.com> Message-ID: <000901cc3db7$642445b0$2c6cd110$@winhaven.net> I remember asking a similar question in an SQL queries class about 20 years ago. I believe the answer was "because". Its Friday ;o) -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Friday, July 08, 2011 12:25 PM To: Access Developers discussion and problem solving Subject: [AccessD] xyz* faster than *asd Does anyone know of a reason that LIKE is faster with the * in back instead of the front of a string to search by in the where clause? -- John W. Colby www.ColbyConsulting.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From ab-mi at post3.tele.dk Fri Jul 8 17:19:30 2011 From: ab-mi at post3.tele.dk (Asger Blond) Date: Sat, 9 Jul 2011 00:19:30 +0200 Subject: [AccessD] xyz* faster than *asd References: <4E173D6B.4060709@colbyconsulting.com> <000901cc3db7$642445b0$2c6cd110$@winhaven.net> Message-ID: Too bad you got this silly answer in your way back SQL class. Because it's quite obvious why a LIKE xyz* will be faster than LIKE *xyz on an indexed field. For a LIKE *xyz the query engine have to investigate each and every record, because it just doesn't know what leading characters to seach - and this traversing all records is what's called a "table scan". For LIKE xyz* the query engine can use the index, because it know that the leading characters are "xyz". So having an index on the search field will allways make a LIKE *xyz query by far faster than a LIKE xyz* query. Asger ----- Original meddelelse ----- > Fra: John Bartow > Til: 'Access Developers discussion and problem solving' > > Dato: Fre, 08. jul 2011 23:38 > Emne: Re: [AccessD] xyz* faster than *asd > > I remember asking a similar question in an SQL queries class about 20 > years > ago. I believe the answer was "because". > > Its Friday ;o) > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby > Sent: Friday, July 08, 2011 12:25 PM > To: Access Developers discussion and problem solving > Subject: [AccessD] xyz* faster than *asd > > Does anyone know of a reason that LIKE is faster with the * in back > instead > of the front of a string to search by in the where clause? > > -- > John W. Colby > www.ColbyConsulting.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 ab-mi at post3.tele.dk Fri Jul 8 17:32:18 2011 From: ab-mi at post3.tele.dk (Asger Blond) Date: Sat, 9 Jul 2011 00:32:18 +0200 Subject: [AccessD] xyz* faster than *asd References: <4E173D6B.4060709@colbyconsulting.com> <000901cc3db7$642445b0$2c6cd110$@winhaven.net> Message-ID: And making a fast answer is not the wise... The last line of my answer should be: So having an index on the search field will allways make a LIKE xyz* query by far faster than a LIKE *xyz query. Asger ----- Original meddelelse ----- > Fra: Asger Blond > Til: Access Developers discussion and problem solving > > Dato: L?r, 09. jul 2011 00:19 > Emne: Re: [AccessD] xyz* faster than *asd > > Too bad you got this silly answer in your way back SQL class. Because > it's quite obvious why a LIKE xyz* will be faster than LIKE *xyz on > an > indexed field. For a LIKE *xyz the query engine have to investigate > each > and every record, because it just doesn't know what leading > characters to > seach - and this traversing all records is what's called a "table > scan". > For LIKE xyz* the query engine can use the index, because it know > that > the leading characters are "xyz". So having an index on the search > field > will allways make a LIKE *xyz query by far faster than a LIKE xyz* > query. > Asger > > ----- Original meddelelse ----- > > > Fra: John Bartow > > Til: 'Access Developers discussion and problem solving' > > > > Dato: Fre, 08. jul 2011 23:38 > > Emne: Re: [AccessD] xyz* faster than *asd > > > > I remember asking a similar question in an SQL queries class about > 20 > > years > > ago. I believe the answer was "because". > > > > Its Friday ;o) > > -----Original Message----- > > From: accessd-bounces at databaseadvisors.com > > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby > > Sent: Friday, July 08, 2011 12:25 PM > > To: Access Developers discussion and problem solving > > Subject: [AccessD] xyz* faster than *asd > > > > Does anyone know of a reason that LIKE is faster with the * in back > > instead > > of the front of a string to search by in the where clause? > > > > -- > > John W. Colby > > www.ColbyConsulting.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 Fri Jul 8 17:37:59 2011 From: stuart at lexacorp.com.pg (Stuart McLachlan) Date: Sat, 09 Jul 2011 08:37:59 +1000 Subject: [AccessD] xyz* faster than *asd In-Reply-To: <4E173D6B.4060709@colbyconsulting.com> References: <4E173D6B.4060709@colbyconsulting.com> Message-ID: <4E1786C7.4212.49B944B@stuart.lexacorp.com.pg> "some*" can use indexes. "*omething" can't On 8 Jul 2011 at 13:24, jwcolby wrote: > Does anyone know of a reason that LIKE is faster with the * in back > instead of the front of a string to search by in the where clause? > > -- > John W. Colby > www.ColbyConsulting.com > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > From jwcolby at colbyconsulting.com Sat Jul 9 09:09:03 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Sat, 09 Jul 2011 10:09:03 -0400 Subject: [AccessD] List box as a status box Message-ID: <4E1860FF.1050407@colbyconsulting.com> I want to put up a control to display a running status, display then last N events that occurred. I have never really liked text boxes for this purpose as the last thing displayed as I always seem to end up with scrolling issues and so forth. I am thinking about using a list control. This has the advantage (for my purposes) of allowing me to have neat columns for the date / time and the status to be displayed. Does anyone do this and want to comment on how they make it work? -- John W. Colby www.ColbyConsulting.com From vbacreations at gmail.com Sat Jul 9 10:34:35 2011 From: vbacreations at gmail.com (William Benson (VBACreations.Com)) Date: Sat, 9 Jul 2011 11:34:35 -0400 Subject: [AccessD] List box as a status box In-Reply-To: <4E1860FF.1050407@colbyconsulting.com> References: <4E1860FF.1050407@colbyconsulting.com> Message-ID: <000001cc3e4d$b5fb7020$21f25060$@gmail.com> John, What kind of events ... and how are they trapped? Bill -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Saturday, July 09, 2011 10:09 AM To: Access Developers discussion and problem solving Subject: [AccessD] List box as a status box I want to put up a control to display a running status, display then last N events that occurred. I have never really liked text boxes for this purpose as the last thing displayed as I always seem to end up with scrolling issues and so forth. I am thinking about using a list control. This has the advantage (for my purposes) of allowing me to have neat columns for the date / time and the status to be displayed. Does anyone do this and want to comment on how they make it work? -- John W. Colby www.ColbyConsulting.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From jwcolby at colbyconsulting.com Sat Jul 9 12:17:13 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Sat, 09 Jul 2011 13:17:13 -0400 Subject: [AccessD] List box as a status box In-Reply-To: <000001cc3e4d$b5fb7020$21f25060$@gmail.com> References: <4E1860FF.1050407@colbyconsulting.com> <000001cc3e4d$b5fb7020$21f25060$@gmail.com> Message-ID: <4E188D19.1060700@colbyconsulting.com> I'm actually talking about "things that happen" events rather than control / form events. I am carving out a piece of my Inmate Checkout program which goes out to the internet and pulls the inmate info for the specific inmates that are already in my database, looking for changes relevant to my ability to check the inmate out. For example they are moved to another camp or their security level goes up (or down) etc. I had a very simple text box on the form which I simply updated with a text string when I discovered a change to the inmate status. However when the next change came along I lost the last. If I did a txt.value = txt.value & vbcrlf & "new status stuff" I ended up with scrolling in the text box which is difficult to control. In this specific case, I was storing these status changes in a table and I ended up just pulling the TOP 50 changes out and displaying them in a list control directly, but doing something like that where I programmatically stuff them into the list columns would also work nicely. John W. Colby www.ColbyConsulting.com On 7/9/2011 11:34 AM, William Benson (VBACreations.Com) wrote: > John, > > What kind of events ... and how are they trapped? > > Bill > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby > Sent: Saturday, July 09, 2011 10:09 AM > To: Access Developers discussion and problem solving > Subject: [AccessD] List box as a status box > > I want to put up a control to display a running status, display then last N > events that occurred. I > have never really liked text boxes for this purpose as the last thing > displayed as I always seem to > end up with scrolling issues and so forth. > > I am thinking about using a list control. This has the advantage (for my > purposes) of allowing me > to have neat columns for the date / time and the status to be displayed. > > Does anyone do this and want to comment on how they make it work? > From vbacreations at gmail.com Sat Jul 9 13:53:06 2011 From: vbacreations at gmail.com (William Benson (VBACreations.Com)) Date: Sat, 9 Jul 2011 14:53:06 -0400 Subject: [AccessD] List box as a status box In-Reply-To: <4E188D19.1060700@colbyconsulting.com> References: <4E1860FF.1050407@colbyconsulting.com> <000001cc3e4d$b5fb7020$21f25060$@gmail.com> <4E188D19.1060700@colbyconsulting.com> Message-ID: <000101cc3e69$715b0360$54110a20$@gmail.com> I am not sure I would use the listbox because they are limited in terms of how much can be displayed. I would probably go with a datasheet subform at a minimum, if you *really* do give up textboxes. But I like textboxes for this use. I use a memo field and only a single record in the textbox. Set enter key behavior to add new line, and scroll to vertical. Note I trim off the entries I don't want to retain... In this implementation I have two textboxes... one holds the accumulated events (last 15 items only) and one holds new event I want to add Option Compare Database Option Explicit 'For module Private Sub cmdAddEvent_Click() If Nz(Me.txtNewEvent, "") <> "" Then RecordLogEntry CurrentDb, Me.txtEvents, Me.txtNewEvent End If End Sub Private Sub Form_Load() Dim R As DAO.Recordset txtEvents = "" Set R = CurrentDb.OpenRecordset("Select First(EventField) as EventToShow >From TblEventLog Group by EventField") If Not R.EOF Then txtEvents = R!EventToshow End If End Sub 'Then this goes in standard module... works pretty well. Function RecordLogEntry(MyDB As DAO.Database, Ctrl As Control, sWhateverEventStringIs As String) Dim bStoreLocked As Boolean Dim strEVENTBREAK As String Const iMaxEntries = 15 Dim RstEventLog As DAO.Recordset Dim sEntry As String Dim sCurrentLog As String Const sLogStart As String = "<============== " Const sLogEnd As String = " ==============>" strEVENTBREAK = sLogStart & Format(Now(), "m/d/yyyy h:mm AM/PM") & sLogEnd & vbCrLf Set RstEventLog = MyDB.OpenRecordset("Select EventField From TblEventLog") sEntry = strEVENTBREAK & sWhateverEventStringIs On Error Resume Next RstEventLog.MoveFirst On Error GoTo Err_Handler If Not RstEventLog.EOF Then sCurrentLog = KeepMostRecent(RstEventLog.Fields(0), iMaxEntries, sLogStart) RstEventLog.Edit RstEventLog.Fields(0) = sEntry & vbCrLf & sCurrentLog 'Newest first RstEventLog.Update Else RstEventLog.AddNew RstEventLog.Fields(0) = sEntry RstEventLog.Update End If If TypeOf Ctrl Is Access.TextBox Then bStoreLocked = Ctrl.Locked Ctrl.Locked = False RstEventLog.Requery Ctrl.Value = RstEventLog.Fields(0) Ctrl.Locked = bStoreLocked End If Exit Function Err_Handler: MsgBox Err.Number & " - " & Err.Description End Function Function KeepMostRecent(ByVal str As String, ByVal iMax As Long, ByVal sLogStart As String) As String Dim iOccurrences As Long iOccurrences = (Len(str) - Len(Replace$(str, sLogStart, ""))) / Len(sLogStart) If iOccurrences >= iMax Then 'Remove last one KeepMostRecent = Left(str, InStrRev(str, sLogStart) - 1) Else KeepMostRecent = str End If End Function From stuart at lexacorp.com.pg Sat Jul 9 16:24:43 2011 From: stuart at lexacorp.com.pg (Stuart McLachlan) Date: Sun, 10 Jul 2011 07:24:43 +1000 Subject: [AccessD] List box as a status box In-Reply-To: <4E1860FF.1050407@colbyconsulting.com> References: <4E1860FF.1050407@colbyconsulting.com> Message-ID: <4E18C71B.3561.97EDB91@stuart.lexacorp.com.pg> I do this quite frequently. It works very well for me. If you just wan to log events that occuring while the application is running, make the listbox source an empty value list and then use something like: Const cLongMaxListItems Function Logitem(ev As String) as long If lstLog.ListCount > clngMaxLogItems Then lstLog.RemoveItem 0 End If lstLog.AddItem Format$(Now(), "d mmm yy h:nn:ss am/pm") & ";" & ev End Function By embedding semicolons in the string "ev", you can use as many columns as you want in your list. If you want the last ten events on record regardless of when they happened, create a query qryEventLog: "Select Top 10 * from tblEvents order by evDate DESC", and make the rowsource a query "Select * from qryLogEvent order by evDate" Then you just need a lstLog.Requery whenever a new record is added. -- Stuart On 9 Jul 2011 at 10:09, jwcolby wrote: > I want to put up a control to display a running status, display then > last N events that occurred. I have never really liked text boxes for > this purpose as the last thing displayed as I always seem to end up > with scrolling issues and so forth. > > I am thinking about using a list control. This has the advantage (for > my purposes) of allowing me to have neat columns for the date / time > and the status to be displayed. > > Does anyone do this and want to comment on how they make it work? > > -- > John W. Colby > www.ColbyConsulting.com > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > From charlotte.foust at gmail.com Sat Jul 9 22:09:35 2011 From: charlotte.foust at gmail.com (Charlotte Foust) Date: Sat, 09 Jul 2011 20:09:35 -0700 Subject: [AccessD] List box as a status box In-Reply-To: <4E188D19.1060700@colbyconsulting.com> References: <4E1860FF.1050407@colbyconsulting.com> <000001cc3e4d$b5fb7020$21f25060$@gmail.com> <4E188D19.1060700@colbyconsulting.com> Message-ID: <4ad3aeb0-2ad1-473e-89e5-e77b736598f2@email.android.com> I've done this but years ago. I added a string for each event to the rowsource for the listbox. -- Sent from my Android phone with K-9 Mail. Please excuse my brevity. jwcolby wrote: I'm actually talking about "things that happen" events rather than control / form events. I am carving out a piece of my Inmate Checkout program which goes out to the internet and pulls the inmate info for the specific inmates that are already in my database, looking for changes relevant to my ability to check the inmate out. For example they are moved to another camp or their security level goes up (or down) etc. I had a very simple text box on the form which I simply updated with a text string when I discovered a change to the inmate status. However when the next change came along I lost the last. If I did a txt.value = txt.value & vbcrlf & "new status stuff" I ended up with scrolling in the text box which is difficult to control. In this specific case, I was storing these status changes in a table and I ended up just pulling the TOP 50 changes out and displaying them in a list control directly, but doing something like that where I programmatically stuff them into the list columns would also work nicely. John W. Colby www.ColbyConsulting.com On 7/9/2011 11:34 AM, William Benson (VBACreations.Com) wrote: > John, > > What kind of events ... and how are they trapped? > > Bill > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby > Sent: Saturday, July 09, 2011 10:09 AM > To: Access Developers discussion and problem solving > Subject: [AccessD] List box as a status box > > I want to put up a control to display a running status, display then last N > events that occurred. I > have never really liked text boxes for this purpose as the last thing > displayed as I always seem to > end up with scrolling issues and so forth. > > I am thinking about using a list control. This has the advantage (for my > purposes) of allowing me > to have neat columns for the date / time and the status to be displayed. > > Does anyone do this and want to comment on how they make it work? > -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From charlotte.foust at gmail.com Sat Jul 9 22:16:17 2011 From: charlotte.foust at gmail.com (Charlotte Foust) Date: Sat, 09 Jul 2011 20:16:17 -0700 Subject: [AccessD] xyz* faster than *asd In-Reply-To: <4E173D6B.4060709@colbyconsulting.com> References: <4E173D6B.4060709@colbyconsulting.com> Message-ID: Because an ampersand at the front means the entire recordset has to be examined. The ampersand at the back means the records that don't match the initial letters don't need to be examined at all. Charlotte Foust -- Sent from my Android phone with K-9 Mail. Please excuse my brevity. jwcolby wrote: Does anyone know of a reason that LIKE is faster with the * in back instead of the front of a string to search by in the where clause? -- John W. Colby www.ColbyConsulting.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From jwcolby at colbyconsulting.com Sun Jul 10 07:13:48 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Sun, 10 Jul 2011 08:13:48 -0400 Subject: [AccessD] Access runtime Message-ID: <4E19977C.2070406@colbyconsulting.com> I am loving Access 2007 runtime! Installs easy and just runs my programs! So far! -- John W. Colby www.ColbyConsulting.com From dhb at flsi.com Mon Jul 11 13:20:09 2011 From: dhb at flsi.com (Darrell Burns) Date: Mon, 11 Jul 2011 11:20:09 -0700 Subject: [AccessD] Cannot Open Anymore Databases In-Reply-To: References: Message-ID: <000001cc3ff7$2b854cd0$828fe670$@com> I had the same problem with a form that had 5 subforms, each with multiple queries. I submitted the question to every forum and discovered that there's no easy cure. The connections limit is 256 but there's no function to tell you how many you've used up. Connections to a back-end database count double. After spending lots of time re-engineering my recordset actions and being very meticulous about closing connections, the final solution was to bind the subforms to temp tables and fill the tables as each tab is clicked. So, your solution is the correct one. - Darrell -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Tony Septav Sent: Thursday, July 07, 2011 6:00 AM To: accessd at databaseadvisors.com Subject: [AccessD] Cannot Open Anymore Databases Hey All Just curious. I was working on a report, I would view it and when I returned to the design mode I would get the error message "Cannot open anymore databases". The report is based on a union query, which is made up of 6 subqueries. each of these subqueries is based on the results from about 3 or 4 other querys. If I manually run the union query I don't get any error messages, as I mentioned I only get the error message when working with the report. Am I correct in assuming that the results of each of these queries results in 1 instant of the database being opened and I have exceeded the 84 (whatever) limit to the number of databases instances that can be open at one time?? I solved the problem by appending the results of each of the 6 queries to a temp table and using the table for the report. T. Septav Nanaimo, BC Canada -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From BradM at blackforestltd.com Mon Jul 11 13:39:37 2011 From: BradM at blackforestltd.com (Brad Marks) Date: Mon, 11 Jul 2011 13:39:37 -0500 Subject: [AccessD] Access and Excel Integration - Resources? References: , <002e01cc3bcf$d2959830$77c0c890$@gmail.com>, <4E145CF1.1188.D6EFDE@stuart.lexacorp.com.pg> Message-ID: I am doing some R&D work involving Access/Excel integration (Windows Automation). I just finished reading a book titled "Excel and Access Integration". It is a well-written book, but it does not get into a great deal of depth with regards to the "Automation" realm. I was wondering if there is a resource (book or website) that covers this area in more depth. In a nutshell, I would like to be able to do anything that a person can do in "native Excel" via commands in Access 2007 which control Excel. Thanks for your help. Brad From rls at WeBeDb.com Mon Jul 11 14:23:09 2011 From: rls at WeBeDb.com (Robert Stewart) Date: Mon, 11 Jul 2011 14:23:09 -0500 Subject: [AccessD] "Modern" replacement for CommonDlg Message-ID: Arthur, This is a different way of doing the same thing using the Office Library. You have to include which ever version of the Office dll that you are using in the references. You will need to comment out the line that contains "udf_WriteErrorToLog" See if the following helps you out: 1 of 2 Public Function udf_SelectFileDialogBox(Optional varDescOfFile As String = "All Files", Optional varExtensions As String = "*.*") As String '**************************************************************************** '* Purpose: : '* (1) Shows the user a dialog box allowing selection of a file. '* Arguments: '* (1) varDescOfFile: The description of the file type to be selected. '* For example: SAP Extract File in TXT format '* (2) varExtensions: The file filter to be used when the user is '* provided a view of the files. For example: *.TXT '* Returns: '* (1) If the user selected the CANCEL button on the dialog box, a '* zero-length string is returned. '* (2) If the user selected a file, the fully-qualified path and file '* name is returned. '* Calls subroutines: None '* Creates Arrays: None '* Uses Arrays: None '* Uses Tools->References: '* (1) Microsoft Office 10.0 Object Library ... or ... '* (2) Microsoft Office 12.0 Object Library ... etc ... '**************************************************************************** 'On Error GoTo Err_udf_SelectFileDialogBox Dim fDialog As FileDialog Dim varFile As Variant Dim strProc As String Dim strCodeLocn As String Dim strMsg As String Dim strRetVal As String '************************************************************************ strCodeLocn = "Initialize values." '************************************************************************ strProc = "udf_SelectFileDialogBox(); " strRetVal = "" '************************************************************************ strCodeLocn = "Set up the File Dialog." '************************************************************************ Set fDialog = Application.FileDialog(msoFileDialogFilePicker) With fDialog .AllowMultiSelect = False 'Disable multiple selections. .Title = varDescOfFile 'Set the title of the dialog box. .Filters.Clear 'Clear out the current filters. .Filters.Add "", varExtensions '.Filters.Add ".TXT file from SAP", "*.TXT" 'assign file filters '.Filters.Add "Access Databases", "*.MDB" '.Filters.Add "All Files", "*.*" '******************************************************************** strCodeLocn = "Show the dialog box." '******************************************************************** 'If the .Show method returns True, the user picked at least one file. 'If the .Show method returns False, the user clicked Cancel. If .Show = True Then strRetVal = .SelectedItems.Item(1) End If End With udf_SelectFileDialogBox = strRetVal Exit_udf_SelectFileDialogBox: Exit Function Err_udf_SelectFileDialogBox: '************************************************************************ '* Write the error message to the log table and display it to the user. '************************************************************************ strMsg = udf_WriteErrorToLog(strModule, strProc, strCodeLocn, Erl, Err.Number, Err.Description) MsgBox (strMsg) GoTo Exit_udf_SelectFileDialogBox End Function At 10:16 PM 7/9/2011, you wrote: > >>>> fuller.artful at gmail.com 06-07-2011 14:39>>> > > Thanks for this. It does appear to work nicely for selecting a > file, but I'm > > not sure how to modify it to return the selected directory rather than a > > file in it. > > > > A. > Robert L. Stewart www.WeBeDb.com www.DBGUIDesign.com www.RLStewartPhotography.com From rls at WeBeDb.com Mon Jul 11 14:23:35 2011 From: rls at WeBeDb.com (Robert Stewart) Date: Mon, 11 Jul 2011 14:23:35 -0500 Subject: [AccessD] "Modern" replacement for CommonDlg Message-ID: <0ADEA7BB-633A-45DC-AE87-102A08B6C00E@holly.arvixe.com> Arthur, This is a different way of doing the same thing using the Office Library. You have to include which ever version of the Office dll that you are using in the references. You will need to comment out the line that contains "udf_WriteErrorToLog" See if the following helps you out: 2 of 2 Public Function udf_SelectFolderDialogBox() As String '**************************************************************************** '* Purpose: : '* (1) Shows the user a dialog box allowing selection of a folder. '* Arguments: None '* Returns: '* (1) If the user selected the CANCEL button on the dialog box, a '* zero-length string is returned. '* (2) If the user selected a file, the fully-qualified path is returned. '* Calls subroutines: None '* Creates Arrays: None '* Uses Arrays: None '* Uses Tools->References: '* (1) Microsoft Office 10.0 Object Library ... or ... '* (2) Microsoft Office 12.0 Object Library ... etc ... '**************************************************************************** 'On Error GoTo Err_udf_SelectFolderDialogBox Dim fDialog As Office.FileDialog Dim varFile As Variant Dim strProc As String Dim strCodeLocn As String Dim strMsg As String Dim strRetVal As String Dim varDescOfFile As Variant '************************************************************************ strCodeLocn = "Initialize values." '************************************************************************ strProc = "udf_SelectFolderDialogBox" strRetVal = "" '************************************************************************ strCodeLocn = "Set up the File Dialog." '************************************************************************ Set fDialog = Application.FileDialog(msoFileDialogFolderPicker) ' Options are: ' msoFileDialogFilePicker 'OK for Access and Excel ' msoFileDialogFolderPicker 'OK for Access and Excel ' msoFileDialogOpen 'Not OK for Access ' msoFileDialogSaveAs 'Not OK for Access ' Note: instead of the option: ' msoFileDialogFilePicker to select a file ' you could also use the option: ' msoFileDialogFolderPicker to select a folder With fDialog .AllowMultiSelect = False 'Disable multiple selections. .Title = varDescOfFile 'Set the title of the dialog box. .Filters.Clear 'Clear out the current filters. '.Filters.Add "", varExtensions '.Filters.Add ".TXT file from SAP", "*.TXT" 'assign file filters '.Filters.Add "Access Databases", "*.MDB" '.Filters.Add "All Files", "*.*" '******************************************************************** strCodeLocn = "Show the dialog box." '******************************************************************** 'If the .Show method returns True, the user picked at least one file. 'If the .Show method returns False, the user clicked Cancel. If .Show = True Then strRetVal = .SelectedItems.Item(1) End If End With Exit_udf_SelectFolderDialogBox: udf_SelectFolderDialogBox = strRetVal Exit Function Err_udf_SelectFolderDialogBox: '************************************************************************ '* Write the error message to the log table and display it to the user. '************************************************************************ strMsg = udf_WriteErrorToLog(strModule, strProc, strCodeLocn, Erl, Err.Number, Err.Description) MsgBox (strMsg) GoTo Exit_udf_SelectFolderDialogBox End Function At 10:16 PM 7/9/2011, you wrote: > >>>> fuller.artful at gmail.com 06-07-2011 14:39>>> > > Thanks for this. It does appear to work nicely for selecting a > file, but I'm > > not sure how to modify it to return the selected directory rather than a > > file in it. > > > > A. > Robert L. Stewart www.WeBeDb.com www.DBGUIDesign.com www.RLStewartPhotography.com From charlotte.foust at gmail.com Mon Jul 11 14:58:23 2011 From: charlotte.foust at gmail.com (Charlotte Foust) Date: Mon, 11 Jul 2011 12:58:23 -0700 Subject: [AccessD] Cannot Open Anymore Databases In-Reply-To: <000001cc3ff7$2b854cd0$828fe670$@com> References: <000001cc3ff7$2b854cd0$828fe670$@com> Message-ID: With reports, it's even worse, because a report when you open it creates "shadow" queries so you are effectively doubling the connections you designed into it. Charlotte Foust On Mon, Jul 11, 2011 at 11:20 AM, Darrell Burns wrote: > I had the same problem with a form that had 5 subforms, each with multiple > queries. I submitted the question to every forum and discovered that > there's > no easy cure. The connections limit is 256 but there's no function to tell > you how many you've used up. Connections to a back-end database count > double. After spending lots of time re-engineering my recordset actions and > being very meticulous about closing connections, the final solution was to > bind the subforms to temp tables and fill the tables as each tab is > clicked. > So, your solution is the correct one. > - Darrell > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Tony Septav > Sent: Thursday, July 07, 2011 6:00 AM > To: accessd at databaseadvisors.com > Subject: [AccessD] Cannot Open Anymore Databases > > Hey All > Just curious. I was working on a report, I would view it and when I > returned > to the design mode I would get the error message "Cannot open anymore > databases". The report is based on a union query, which is made up of 6 > subqueries. each of these subqueries is based on the results from about 3 > or > 4 other querys. If I manually run the union query I don't get any error > messages, as I mentioned I only get the error message when working with the > report. Am I correct in assuming that the results of each of these queries > results in 1 instant of the database being opened and I have exceeded the > 84 > (whatever) limit to the number of databases instances that can be open at > one time?? I solved the problem by appending the results of each of the 6 > queries to a temp table and using the table for the report. > > T. Septav > Nanaimo, BC > Canada > -- > 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 jwcolby at colbyconsulting.com Mon Jul 11 15:14:21 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Mon, 11 Jul 2011 16:14:21 -0400 Subject: [AccessD] Access and Excel Integration - Resources? In-Reply-To: References: , <002e01cc3bcf$d2959830$77c0c890$@gmail.com>, <4E145CF1.1188.D6EFDE@stuart.lexacorp.com.pg> Message-ID: <4E1B599D.1010702@colbyconsulting.com> One of the things we used to do was to use the macro recorder to record keystrokes doing whatever you want to do. Then go look at the macro which is vbE. Now you know the syntax for whatever it was you did you can do that same thing from Access, or alternatively, you can just run the macro from Access. Both methods have their uses. John W. Colby www.ColbyConsulting.com On 7/11/2011 2:39 PM, Brad Marks wrote: > I am doing some R&D work involving Access/Excel integration (Windows > Automation). > > I just finished reading a book titled "Excel and Access Integration". > It is a well-written book, but it does not get into a great deal of > depth with regards to the "Automation" realm. > > I was wondering if there is a resource (book or website) that covers > this area in more depth. > > In a nutshell, I would like to be able to do anything that a person can > do in "native Excel" via commands in Access 2007 which control Excel. > > Thanks for your help. > Brad > From vbacreations at gmail.com Mon Jul 11 15:49:08 2011 From: vbacreations at gmail.com (William Benson (VBACreations.Com)) Date: Mon, 11 Jul 2011 16:49:08 -0400 Subject: [AccessD] Access and Excel Integration - Resources? In-Reply-To: References: , <002e01cc3bcf$d2959830$77c0c890$@gmail.com>, <4E145CF1.1188.D6EFDE@stuart.lexacorp.com.pg> Message-ID: <000001cc400b$fc00a3a0$f401eae0$@gmail.com> Brad, I like john's approach and sometimes use it... but don't like how the macro recorder works in Excel 2007+. My suggestion is to get comfortable with the basics of the Excel object model (easier said...) and in all your access projects, in the beginning at least, add a reference to Excel's object library. Stay away from all late binding in the early period (before you go to production with your application) - so you get the benefit of intellisense. Later you can change declarations to Objects, remove the reference to Excel, and Access will be happy to tell you where you need to substitute numbers for intrinsic constants. You can also join this list http://catalist.lsoft.com/scripts/wl.exe?SL1=EXCEL-L&H=PEACH.EASE.LSOFT.COM. Most seasoned Listers are experienced Access programmers too. Good luck. Bill -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Brad Marks Sent: Monday, July 11, 2011 2:40 PM To: Access Developers discussion and problem solving Subject: [AccessD] Access and Excel Integration - Resources? I am doing some R&D work involving Access/Excel integration (Windows Automation). I just finished reading a book titled "Excel and Access Integration". It is a well-written book, but it does not get into a great deal of depth with regards to the "Automation" realm. I was wondering if there is a resource (book or website) that covers this area in more depth. In a nutshell, I would like to be able to do anything that a person can do in "native Excel" via commands in Access 2007 which control Excel. Thanks for your help. Brad -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From gustav at cactus.dk Mon Jul 11 15:52:58 2011 From: gustav at cactus.dk (Gustav Brock) Date: Mon, 11 Jul 2011 22:52:58 +0200 Subject: [AccessD] Access and Excel Integration - Resources? Message-ID: Hi Brad Here is how (as I learned from Mr. Colby) to run a series of Excel macros from Access: It works very reliably: Function RunExcelMacros( _ ByVal strFileName As String, _ ParamArray avarMacros()) As Boolean Debug.Print "xl ini", Time On Error GoTo Err_RunExcelMacros Static xlApp As Excel.Application Dim xlWkb As Excel.Workbook Dim varMacro As Variant Dim booSuccess As Boolean Dim booTerminate As Boolean If Len(strFileName) = 0 Then ' Excel shall be closed. booTerminate = True End If If xlApp Is Nothing Then If booTerminate = False Then Set xlApp = New Excel.Application End If ElseIf booTerminate = True Then xlApp.Quit Set xlApp = Nothing End If If booTerminate = False Then Set xlWkb = xlApp.Workbooks.Open(FileName:=strFileName, UpdateLinks:=0, ReadOnly:=True) ' Make Excel visible (for troubleshooting only) or not. xlApp.Visible = False 'True For Each varMacro In avarMacros() If Not Len(varMacro) = 0 Then Debug.Print "xl run", Time, varMacro booSuccess = xlApp.Run(varMacro) End If Next varMacro Else booSuccess = True End If RunExcelMacros = booSuccess Exit_RunExcelMacros: On Error Resume Next If booTerminate = False Then xlWkb.Close SaveChanges:=False Set xlWkb = Nothing End If Debug.Print "xl end", Time Exit Function Err_RunExcelMacros: Select Case Err Case 0 'insert Errors you wish to ignore here Resume Next Case Else 'All other errors will trap Beep MsgBox "Error: " & Err & ". " & Err.Description, vbCritical + vbOKOnly, "Error, macro " & varMacro Resume Exit_RunExcelMacros End Select End Function /gustav >>> BradM at blackforestltd.com 11-07-2011 20:39 >>> I am doing some R&D work involving Access/Excel integration (Windows Automation). I just finished reading a book titled "Excel and Access Integration". It is a well-written book, but it does not get into a great deal of depth with regards to the "Automation" realm. I was wondering if there is a resource (book or website) that covers this area in more depth. In a nutshell, I would like to be able to do anything that a person can do in "native Excel" via commands in Access 2007 which control Excel. Thanks for your help. Brad From vbacreations at gmail.com Mon Jul 11 16:10:46 2011 From: vbacreations at gmail.com (William Benson (VBACreations.Com)) Date: Mon, 11 Jul 2011 17:10:46 -0400 Subject: [AccessD] Select Distinct not working on union query - due to MEMO field? Message-ID: <000101cc400f$015a6450$040f2cf0$@gmail.com> I was using Select distinct on records from a subquery which itself was the result of a union query. To my mind, Select distinct should produce the same result in such a situation as a group by query using the same fields. The Group By query condensed the records, however, and the select distinct query did not. I chased down the reason to this: One of the fields was a memo field. I don't know if the takeaway here is (1) Use Group By queries instead of Select Distinct, whenever possible (2) Don't use MEMO fields whenever possible (3) I have not really discerned the real reason for the difference and am fooling myself. ' METHOD 1 - SURPRISE, TOO MANY RECORDS Select Distinct Field1, Field2, ... FieldN From ( Select Field1, Field2, ... FieldN From Tbl1 Union All Select Field1, Field2, ... FieldN From Tbl2 ) 'METHOD 2 - You can trust this result Select Field1, Field2, ... FieldN From ( Select Field1, Field2, ... FieldN From Tbl1 Union All Select Field1, Field2, ... FieldN From Tbl2 ) Group By Field1, Field2, ... FieldN From ssharkins at gmail.com Mon Jul 11 16:43:28 2011 From: ssharkins at gmail.com (Susan Harkins) Date: Mon, 11 Jul 2011 17:43:28 -0400 Subject: [AccessD] Select Distinct not working on union query - due to MEMOfield? References: <000101cc400f$015a6450$040f2cf0$@gmail.com> Message-ID: <11D73F4487694BA2BBE4323F109F64FD@SusanHarkins> DISTINCT considers every field in your query. Susan H. >I was using Select distinct on records from a subquery which itself was the > result of a union query. To my mind, Select distinct should produce the > same > result in such a situation as a group by query using the same fields. The > Group By query condensed the records, however, and the select distinct > query > did not. I chased down the reason to this: One of the fields was a memo > field. > > I don't know if the takeaway here is > > (1) Use Group By queries instead of Select Distinct, whenever possible > (2) Don't use MEMO fields whenever possible > (3) I have not really discerned the real reason for the difference and am > fooling myself. > From vbacreations at gmail.com Mon Jul 11 17:43:30 2011 From: vbacreations at gmail.com (William Benson (VBACreations.Com)) Date: Mon, 11 Jul 2011 18:43:30 -0400 Subject: [AccessD] Select Distinct not working on union query - due to MEMO field? Message-ID: <000201cc401b$f5bd99c0$e138cd40$@gmail.com> Hi Sue, I don't understand what you mean, sorry - please explain deeper if possible. Does it have anything at all to do with the Memo field? - because changing that to TEXT cured the duplication in the DISTINCT query. Also, do you mind commenting (or anyone...) I am trying to write complex SQL queries in VBA, in partial steps so I can evaluate the intermediary SQL for syntax errors. The below expression will not work unless I remove inner parentheses. I would like to understand why that is. Select * from ( (Select * from Tbl1) Union All (Select * from Tbl2) ) Access is happy with Select * from ( Select * from Tbl1 Union All Select * from Tbl2 ) From ssharkins at gmail.com Mon Jul 11 18:02:20 2011 From: ssharkins at gmail.com (Susan Harkins) Date: Mon, 11 Jul 2011 19:02:20 -0400 Subject: [AccessD] Select Distinct not working on union query - dueto MEMO field? References: <000201cc401b$f5bd99c0$e138cd40$@gmail.com> Message-ID: <13934C5C16A249C0AEB922A97A422A1C@SusanHarkins> 1.) You can't group on a MEMO field, but that doesn't seem to be your problem 2.) DISTINCT considers all the fields in your query -- all the fields in the query combined create a unique record. I don't believe DISTINCT is supported by a MEMO field. I know SQL Server doesn't, Fox Pro doesn't -- but Jet and T-SQL have many differences, this could be one of them. Susan H. > > I don't understand what you mean, sorry - please explain deeper if > possible. > Does it have anything at all to do with the Memo field? - because changing > that to TEXT cured the duplication in the DISTINCT query. > > > Also, do you mind commenting (or anyone...) > I am trying to write complex SQL queries in VBA, in partial steps so I can > evaluate the intermediary SQL for syntax errors. The below expression will > not work unless I remove inner parentheses. I would like to understand why > that is. > > Select * from > ( > (Select * from Tbl1) > Union All > (Select * from Tbl2) > ) > > > > Access is happy with > > Select * from > ( > Select * from Tbl1 > Union All > Select * from Tbl2 > ) > > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com From vbacreations at gmail.com Mon Jul 11 19:16:14 2011 From: vbacreations at gmail.com (William Benson (VBACreations.Com)) Date: Mon, 11 Jul 2011 20:16:14 -0400 Subject: [AccessD] Select Distinct not working on union query - dueto MEMO field? In-Reply-To: <13934C5C16A249C0AEB922A97A422A1C@SusanHarkins> References: <000201cc401b$f5bd99c0$e138cd40$@gmail.com> <13934C5C16A249C0AEB922A97A422A1C@SusanHarkins> Message-ID: <000401cc4028$ea6c3010$bf449030$@gmail.com> Sue, I think then (2) reassures me I did the right thing to switch to a Group By query... since Ac2010 appears to be cutting me some slack despite my bucking a convention. Thank you so much for the explanation. -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Susan Harkins Sent: Monday, July 11, 2011 7:02 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Select Distinct not working on union query - dueto MEMO field? 1.) You can't group on a MEMO field, but that doesn't seem to be your problem 2.) DISTINCT considers all the fields in your query -- all the fields in the query combined create a unique record. I don't believe DISTINCT is supported by a MEMO field. I know SQL Server doesn't, Fox Pro doesn't -- but Jet and T-SQL have many differences, this could be one of them. Susan H. > > I don't understand what you mean, sorry - please explain deeper if > possible. > Does it have anything at all to do with the Memo field? - because changing > that to TEXT cured the duplication in the DISTINCT query. > > > Also, do you mind commenting (or anyone...) > I am trying to write complex SQL queries in VBA, in partial steps so I can > evaluate the intermediary SQL for syntax errors. The below expression will > not work unless I remove inner parentheses. I would like to understand why > that is. > > Select * from > ( > (Select * from Tbl1) > Union All > (Select * from Tbl2) > ) > > > > Access is happy with > > Select * from > ( > Select * from Tbl1 > Union All > Select * from Tbl2 > ) > > > > -- > 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 ssharkins at gmail.com Mon Jul 11 19:33:47 2011 From: ssharkins at gmail.com (Susan Harkins) Date: Mon, 11 Jul 2011 20:33:47 -0400 Subject: [AccessD] Select Distinct not working on union query- dueto MEMO field? References: <000201cc401b$f5bd99c0$e138cd40$@gmail.com><13934C5C16A249C0AEB922A97A422A1C@SusanHarkins> <000401cc4028$ea6c3010$bf449030$@gmail.com> Message-ID: I'd be surprised if DISTINCT worked against a MEMO -- although the link only mentions dBase, I'd still be surprised. I'm not sure I understand why a MEMO field would need to be part of a GROUP BY or a DISTINCT, but as long as it works. :) Susan H. > > I think then (2) reassures me I did the right thing to switch to a Group > By > query... since Ac2010 appears to be cutting me some slack despite my > bucking > a convention. Thank you so much for the explanation. > > > 1.) You can't group on a MEMO field, but that doesn't seem to be your > problem > 2.) DISTINCT considers all the fields in your query -- all the fields in > the > > query combined create a unique record. > > I don't believe DISTINCT is supported by a MEMO field. I know SQL Server > doesn't, Fox Pro doesn't -- but Jet and T-SQL have many differences, this > could be one of them. > > > > Susan H. From vbacreations at gmail.com Mon Jul 11 20:59:18 2011 From: vbacreations at gmail.com (William Benson (VBACreations.Com)) Date: Mon, 11 Jul 2011 21:59:18 -0400 Subject: [AccessD] Select Distinct not working on union query- dueto MEMO field? In-Reply-To: References: <000201cc401b$f5bd99c0$e138cd40$@gmail.com><13934C5C16A249C0AEB922A97A422A1C@SusanHarkins> <000401cc4028$ea6c3010$bf449030$@gmail.com> Message-ID: <000b01cc4037$512b1a60$f3814f20$@gmail.com> When I changed the field type from MEMO to TEXT and found Distinct started working again... I was pretty sure the MEMO field was the reason. I know MEMO causes problems with soe other areas of SQL... however, I appreciate you confirming it. What I meant about bucking convention was based on you writing: >> You can't group on a MEMO field I appear to be able to group on a memo field without a problem in my current application. Thanks again, Bill -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Susan Harkins Sent: Monday, July 11, 2011 8:34 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Select Distinct not working on union query- dueto MEMO field? I'd be surprised if DISTINCT worked against a MEMO -- although the link only mentions dBase, I'd still be surprised. I'm not sure I understand why a MEMO field would need to be part of a GROUP BY or a DISTINCT, but as long as it works. :) Susan H. > > I think then (2) reassures me I did the right thing to switch to a Group > By > query... since Ac2010 appears to be cutting me some slack despite my > bucking > a convention. Thank you so much for the explanation. > > > 1.) You can't group on a MEMO field, but that doesn't seem to be your > problem > 2.) DISTINCT considers all the fields in your query -- all the fields in > the > > query combined create a unique record. > > I don't believe DISTINCT is supported by a MEMO field. I know SQL Server > doesn't, Fox Pro doesn't -- but Jet and T-SQL have many differences, this > could be one of them. > > > > Susan H. -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From Gustav at cactus.dk Tue Jul 12 07:01:59 2011 From: Gustav at cactus.dk (Gustav Brock) Date: Tue, 12 Jul 2011 14:01:59 +0200 Subject: [AccessD] Select Distinct not working on union query- due to MEMO field? Message-ID: Hi Bill But you are missing the obvious - the DISTINCT is not needed if you use UNION and not UNION ALL. If you don't need memo fields, certainly don't use them. If you have the need (for holding text beyond 256 chars) you may in your UNION or DISTINCT query use: LEFT(YourMemoField, 256) /gustav From vbacreations at gmail.com Tue Jul 12 07:51:11 2011 From: vbacreations at gmail.com (William Benson (VBACreations.Com)) Date: Tue, 12 Jul 2011 08:51:11 -0400 Subject: [AccessD] Select Distinct not working on union query- due to MEMO field? In-Reply-To: References: Message-ID: <001601cc4092$617ff380$247fda80$@gmail.com> Oh that is good to know! Yes, that will cut out a step or two now and in future. I appreciate the follow up on this! -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: Tuesday, July 12, 2011 8:02 AM To: accessd at databaseadvisors.com Subject: Re: [AccessD] Select Distinct not working on union query- due to MEMO field? Hi Bill But you are missing the obvious - the DISTINCT is not needed if you use UNION and not UNION ALL. If you don't need memo fields, certainly don't use them. If you have the need (for holding text beyond 256 chars) you may in your UNION or DISTINCT query use: LEFT(YourMemoField, 256) /gustav -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From jwcolby at colbyconsulting.com Tue Jul 12 08:43:08 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Tue, 12 Jul 2011 09:43:08 -0400 Subject: [AccessD] Select Distinct not working on union query- due to MEMO field? In-Reply-To: <001601cc4092$617ff380$247fda80$@gmail.com> References: <001601cc4092$617ff380$247fda80$@gmail.com> Message-ID: <4E1C4F6C.30505@colbyconsulting.com> It never occurred to me to use left(MemoField,255) when I needed to do something like that. The obvious is sometimes easy to miss. John W. Colby www.ColbyConsulting.com On 7/12/2011 8:51 AM, William Benson (VBACreations.Com) wrote: > Oh that is good to know! Yes, that will cut out a step or two now and in > future. > > I appreciate the follow up on this! > > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Gustav Brock > Sent: Tuesday, July 12, 2011 8:02 AM > To: accessd at databaseadvisors.com > Subject: Re: [AccessD] Select Distinct not working on union query- due to > MEMO field? > > Hi Bill > > But you are missing the obvious - the DISTINCT is not needed if you use > UNION and not UNION ALL. > > If you don't need memo fields, certainly don't use them. If you have the > need (for holding text beyond 256 chars) you may in your UNION or DISTINCT > query use: > > LEFT(YourMemoField, 256) > > /gustav > > From Gustav at cactus.dk Tue Jul 12 09:09:35 2011 From: Gustav at cactus.dk (Gustav Brock) Date: Tue, 12 Jul 2011 16:09:35 +0200 Subject: [AccessD] Select Distinct not working on union query - due to MEMO field? Message-ID: Hi Bill and JC Right, 255 chars it is. Further, using a second query you may even look up the full memo should you need it. This I posted in 2003 but I haven't used it since so it is still not tested in versions later than A97: Someone (JC?) mentioned this issue recently and I have experienced it too for Access 97 - even if you directly can fill a memo field to 64 K, a query will only retrieve 32 K. Even worse, if you fill a memo field with, say, the Rich Text Box control you can reach megabyte field content sizes while still only the first 32 K are retrieved. To circumvent this you may use DLookup to fetch the full content. Now, when the content is smaller than 32 K it is waste of time to pass DLookup; thus DLookup should only be used when necessary. Here is a method to do that. It is not tested in Access 2000+. /gustav Public Function LookupMemo( _ ByVal strSource As String, _ ByVal strFieldID As String, _ ByVal strFieldMemo As String, _ ByRef lngID As Long, _ ByRef varMemo As Variant) _ As String ' Extracts without truncation to 32768 characters the ' content of a memo field in a query. ' ' Assumes proper wrapping of table/field names containing spaces ' like "[My field name]" and a single field unique numeric key. ' ' Typical usage (SQL): ' ' SELECT ' ID, ' LookupMemo("Table1", "ID", "MemoField", [ID], [MemoField]) AS FullMemo ' FROM ' Table1; ' ' 2003-12-29. Cactus Data ApS, CPH. ' Maximum length of string from memo field when retrieved in a query. Const clngStrLen As Long = &H8000& Dim strExpr As String Dim strDomain As String Dim strCriteria As String Dim strMemo As String Dim lngLen As Long On Error GoTo Exit_LookupMemo If Not IsNull(varMemo) Then lngLen = Len(varMemo) If lngLen < clngStrLen Then ' The memo field is not truncated. strMemo = varMemo ElseIf Len(strSource) > 0 And Len(strFieldID) > 0 And Len(strFieldMemo) > 0 Then ' The memo is probably truncated by the query. ' Lookup the full memo in strSource. strExpr = strFieldMemo strDomain = strSource strCriteria = strFieldID & " = " & lngID & "" strMemo = vbNullString & DLookup(strExpr, strDomain, strCriteria) End If Else ' Return empty string. End If LookupMemo = strMemo Exit_LookupMemo: Exit Function Err_LookupMemo: ' Return empty string. Resume Exit_LookupMemo End Function /gustav >>> jwcolby at colbyconsulting.com 12-07-2011 15:43 >>> It never occurred to me to use left(MemoField,255) when I needed to do something like that. The obvious is sometimes easy to miss. John W. Colby www.ColbyConsulting.com On 7/12/2011 8:51 AM, William Benson (VBACreations.Com) wrote: > Oh that is good to know! Yes, that will cut out a step or two now and in > future. > > I appreciate the follow up on this! > > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Gustav Brock > Sent: Tuesday, July 12, 2011 8:02 AM > To: accessd at databaseadvisors.com > Subject: Re: [AccessD] Select Distinct not working on union query- due to > MEMO field? > > Hi Bill > > But you are missing the obvious - the DISTINCT is not needed if you use > UNION and not UNION ALL. > > If you don't need memo fields, certainly don't use them. If you have the > need (for holding text beyond 256 chars) you may in your UNION or DISTINCT > query use: > > LEFT(YourMemoField, 256) > > /gustav From Gustav at cactus.dk Tue Jul 12 09:16:02 2011 From: Gustav at cactus.dk (Gustav Brock) Date: Tue, 12 Jul 2011 16:16:02 +0200 Subject: [AccessD] The 25000 mark Message-ID: Hi all I noticed that may AccessD folder now holds 25000 postings - and I heavily delete OT and duplicate-type postings (like: Thanks! Much appreciated. -Joe"). No other folder comes near this volume. /gustav From DWUTKA at Marlow.com Tue Jul 12 09:32:06 2011 From: DWUTKA at Marlow.com (Drew Wutka) Date: Tue, 12 Jul 2011 09:32:06 -0500 Subject: [AccessD] The 25000 mark In-Reply-To: References: Message-ID: Should sign up for OT. ;) Drew -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: Tuesday, July 12, 2011 9:16 AM To: accessd at databaseadvisors.com Subject: [AccessD] The 25000 mark Hi all I noticed that may AccessD folder now holds 25000 postings - and I heavily delete OT and duplicate-type postings (like: Thanks! Much appreciated. -Joe"). No other folder comes near this volume. /gustav -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com The information contained in this transmission is intended only for the person or entity to which it is addressed and may contain II-VI Proprietary and/or II-VI Business Sensitive material. If you are not the intended recipient, please contact the sender immediately and destroy the material in its entirety, whether electronic or hard copy. You are notified that any review, retransmission, copying, disclosure, dissemination, or other use of, or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. From df.waters at comcast.net Tue Jul 12 14:34:20 2011 From: df.waters at comcast.net (Dan Waters) Date: Tue, 12 Jul 2011 14:34:20 -0500 Subject: [AccessD] More in Queries and Memo Fields Message-ID: <002501cc40ca$b30a2620$191e7260$@comcast.net> >From Allen Browne?s site: (http://allenbrowne.com/QueryPerfIssue.html) ------------------- This makes a major difference with?Memo?fields. If you GROUP BY a memo (Notes?in the example), Access compares only the first 255 characters, and the rest are?truncated! By choosing?First?instead of?Group By, JET is free to return the entire memo field from the first match. So not only is it more efficient; it actually solves the the problem of memo fields being chopped off. (A downside of using?First?is that the fields are aliased, e.g.?FirstOfNotes.) ------------------- Dan From df.waters at comcast.net Tue Jul 12 14:39:25 2011 From: df.waters at comcast.net (Dan Waters) Date: Tue, 12 Jul 2011 14:39:25 -0500 Subject: [AccessD] More in Queries and Memo Fields In-Reply-To: <002501cc40ca$b30a2620$191e7260$@comcast.net> References: <002501cc40ca$b30a2620$191e7260$@comcast.net> Message-ID: <002601cc40cb$68b89dd0$3a29d970$@comcast.net> This is the complete paragraph: ------------------ FIRST versus GROUP BY SELECT EmployeeID, LastName, Notes FROM Employees GROUP BY EmployeeID, LastName, Notes; SELECT EmployeeID, First(LastName) AS FirstOfLastName, First(Notes) AS FirstOfNotes FROM Employees GROUP BY EmployeeID; When you add a field to a Totals query, Access offers Group By in the Total row. The default behavior, therefore, is that Access must group on all these fields. A primary key is unique. So, if you group by the primary key field, there is no need to group by other fields in that table. You can optimize the query by choosing First instead of Group By in the Total row under the other fields. First allows JET to return the value from the first matching record, without needing to group by the field. This makes a major difference with Memo fields. If you GROUP BY a memo (Notes in the example), Access compares only the first 255 characters, and the rest are truncated! By choosing First instead of Group By, JET is free to return the entire memo field from the first match. So not only is it more efficient; it actually solves the the problem of memo fields being chopped off. (A downside of using First is that the fields are aliased, e.g. FirstOfNotes.) ------------------ From gustav at cactus.dk Tue Jul 12 15:19:53 2011 From: gustav at cactus.dk (Gustav Brock) Date: Tue, 12 Jul 2011 22:19:53 +0200 Subject: [AccessD] More in Queries and Memo Fields Message-ID: Hi Dan But First just returns the value from "one of the first rows", thus it isn't of much use. Actually, I have _never_ found a situation where First was of any use. /gustav >>> df.waters at comcast.net 12-07-2011 21:39 >>> This is the complete paragraph: ------------------ FIRST versus GROUP BY SELECT EmployeeID, LastName, Notes FROM Employees GROUP BY EmployeeID, LastName, Notes; SELECT EmployeeID, First(LastName) AS FirstOfLastName, First(Notes) AS FirstOfNotes FROM Employees GROUP BY EmployeeID; When you add a field to a Totals query, Access offers Group By in the Total row. The default behavior, therefore, is that Access must group on all these fields. A primary key is unique. So, if you group by the primary key field, there is no need to group by other fields in that table. You can optimize the query by choosing First instead of Group By in the Total row under the other fields. First allows JET to return the value from the first matching record, without needing to group by the field. This makes a major difference with Memo fields. If you GROUP BY a memo (Notes in the example), Access compares only the first 255 characters, and the rest are truncated! By choosing First instead of Group By, JET is free to return the entire memo field from the first match. So not only is it more efficient; it actually solves the the problem of memo fields being chopped off. (A downside of using First is that the fields are aliased, e.g. FirstOfNotes.) ------------------ From vbacreations at gmail.com Tue Jul 12 15:28:54 2011 From: vbacreations at gmail.com (William Benson (VBACreations.Com)) Date: Tue, 12 Jul 2011 16:28:54 -0400 Subject: [AccessD] More in Queries and Memo Fields In-Reply-To: <002501cc40ca$b30a2620$191e7260$@comcast.net> References: <002501cc40ca$b30a2620$191e7260$@comcast.net> Message-ID: <003201cc40d2$52999b10$f7ccd130$@gmail.com> At first blush my thought was like Dan's... If the whole point of NOT truncating the field is because you want to two records which have different comments to appear as separate records - then taking First() doesn't seem to get you further ahead. But it is VERY GOOD to be warned that I will never get what I need from a MEMO field, and that I am fooling myself in using it in a Group By. BTW ... the memo field was changed to text a long, long time ago ;-) -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Dan Waters Sent: Tuesday, July 12, 2011 3:34 PM To: 'Access Developers discussion and problem solving' Subject: [AccessD] More in Queries and Memo Fields >From Allen Browne?s site: (http://allenbrowne.com/QueryPerfIssue.html) ------------------- This makes a major difference with?Memo?fields. If you GROUP BY a memo (Notes?in the example), Access compares only the first 255 characters, and the rest are?truncated! By choosing?First?instead of?Group By, JET is free to return the entire memo field from the first match. So not only is it more efficient; it actually solves the the problem of memo fields being chopped off. (A downside of using?First?is that the fields are aliased, e.g.?FirstOfNotes.) ------------------- Dan -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From df.waters at comcast.net Tue Jul 12 16:30:36 2011 From: df.waters at comcast.net (Dan Waters) Date: Tue, 12 Jul 2011 16:30:36 -0500 Subject: [AccessD] More in Queries and Memo Fields In-Reply-To: References: Message-ID: <003801cc40da$f0ca74f0$d25f5ed0$@comcast.net> Well - I haven't tried what Allen was suggesting - just thought it was something to add to the discussion. -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: Tuesday, July 12, 2011 3:20 PM To: accessd at databaseadvisors.com Subject: Re: [AccessD] More in Queries and Memo Fields Hi Dan But First just returns the value from "one of the first rows", thus it isn't of much use. Actually, I have _never_ found a situation where First was of any use. /gustav >>> df.waters at comcast.net 12-07-2011 21:39 >>> This is the complete paragraph: ------------------ FIRST versus GROUP BY SELECT EmployeeID, LastName, Notes FROM Employees GROUP BY EmployeeID, LastName, Notes; SELECT EmployeeID, First(LastName) AS FirstOfLastName, First(Notes) AS FirstOfNotes FROM Employees GROUP BY EmployeeID; When you add a field to a Totals query, Access offers Group By in the Total row. The default behavior, therefore, is that Access must group on all these fields. A primary key is unique. So, if you group by the primary key field, there is no need to group by other fields in that table. You can optimize the query by choosing First instead of Group By in the Total row under the other fields. First allows JET to return the value from the first matching record, without needing to group by the field. This makes a major difference with Memo fields. If you GROUP BY a memo (Notes in the example), Access compares only the first 255 characters, and the rest are truncated! By choosing First instead of Group By, JET is free to return the entire memo field from the first match. So not only is it more efficient; it actually solves the the problem of memo fields being chopped off. (A downside of using First is that the fields are aliased, e.g. FirstOfNotes.) ------------------ -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From vbacreations at gmail.com Tue Jul 12 17:03:08 2011 From: vbacreations at gmail.com (William Benson (VBACreations.Com)) Date: Tue, 12 Jul 2011 18:03:08 -0400 Subject: [AccessD] More in Queries and Memo Fields In-Reply-To: References: Message-ID: <004101cc40df$7c6a2ec0$753e8c40$@gmail.com> Gustav, I think it can be useful. If the fields you are about are being forced to duplicate in the query because of some other field which you don't need to see in all its variations. If you're comfortable taking a representative example of that field, you can use First to show one of its members. FIRST and LAST offer us something that we can do in the Designer rather than resorting to the SQL window. -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: Tuesday, July 12, 2011 4:20 PM To: accessd at databaseadvisors.com Subject: Re: [AccessD] More in Queries and Memo Fields Hi Dan But First just returns the value from "one of the first rows", thus it isn't of much use. Actually, I have _never_ found a situation where First was of any use. /gustav >>> df.waters at comcast.net 12-07-2011 21:39 >>> This is the complete paragraph: ------------------ FIRST versus GROUP BY SELECT EmployeeID, LastName, Notes FROM Employees GROUP BY EmployeeID, LastName, Notes; SELECT EmployeeID, First(LastName) AS FirstOfLastName, First(Notes) AS FirstOfNotes FROM Employees GROUP BY EmployeeID; When you add a field to a Totals query, Access offers Group By in the Total row. The default behavior, therefore, is that Access must group on all these fields. A primary key is unique. So, if you group by the primary key field, there is no need to group by other fields in that table. You can optimize the query by choosing First instead of Group By in the Total row under the other fields. First allows JET to return the value from the first matching record, without needing to group by the field. This makes a major difference with Memo fields. If you GROUP BY a memo (Notes in the example), Access compares only the first 255 characters, and the rest are truncated! By choosing First instead of Group By, JET is free to return the entire memo field from the first match. So not only is it more efficient; it actually solves the the problem of memo fields being chopped off. (A downside of using First is that the fields are aliased, e.g. FirstOfNotes.) ------------------ -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From rls at WeBeDb.com Wed Jul 13 07:49:22 2011 From: rls at WeBeDb.com (Robert Stewart) Date: Wed, 13 Jul 2011 07:49:22 -0500 Subject: [AccessD] Access and Excel Integration - Resources? In-Reply-To: References: Message-ID: Everything is available to MS Access if you include the Excel library. For actual automation, you will have to write functions in MS Access that use the ones in Excel. I have an application (commercial) that allows the user to define the Excel workbook in MS Access via a set of tables and will built the Excel workbook dynamically based on that definition from data in the database. I wrote my own based on the needs of the application. At 03:29 PM 7/12/2011, you wrote: >Date: Mon, 11 Jul 2011 13:39:37 -0500 >From: "Brad Marks" >To: "Access Developers discussion and problem solving" > >Subject: [AccessD] Access and Excel Integration - Resources? >Message-ID: > >Content-Type: text/plain; charset="us-ascii" > >I am doing some R&D work involving Access/Excel integration (Windows >Automation). > >I just finished reading a book titled "Excel and Access Integration". >It is a well-written book, but it does not get into a great deal of >depth with regards to the "Automation" realm. > >I was wondering if there is a resource (book or website) that covers >this area in more depth. > >In a nutshell, I would like to be able to do anything that a person can >do in "native Excel" via commands in Access 2007 which control Excel. > >Thanks for your help. >Brad > Robert L. Stewart www.WeBeDb.com www.DBGUIDesign.com www.RLStewartPhotography.com From jwcolby at colbyconsulting.com Wed Jul 13 08:00:44 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Wed, 13 Jul 2011 09:00:44 -0400 Subject: [AccessD] Good price on 5400 rpm 1.5 tb disks Message-ID: <4E1D96FC.4070801@colbyconsulting.com> http://www.newegg.com/Special/ShellShocker.aspx?Tpk=shellshocker -- John W. Colby www.ColbyConsulting.com From rockysmolin at bchacc.com Wed Jul 13 18:25:24 2011 From: rockysmolin at bchacc.com (Rocky Smolin) Date: Wed, 13 Jul 2011 16:25:24 -0700 Subject: [AccessD] VBA run-time error 3170: Could not find installable ISAM Message-ID: <2B7A375995D24727A5D8506CB9413AF8@HAL9007> A prospect is getting this error: VBA run-time error 3170: Could not find installable ISAM When I do TransferSpreadsheet. Does anyone know offhand what the likeliest cause of this is? MTIA Rocky From BradM at blackforestltd.com Thu Jul 14 07:27:54 2011 From: BradM at blackforestltd.com (Brad Marks) Date: Thu, 14 Jul 2011 07:27:54 -0500 Subject: [AccessD] Generating an Excel Pivot Table from Access - Problem with Second Execution References: Message-ID: All, I am just starting to experiment with Access/Excel Automation Through a process of trial and error I have developed a small test Access application that is able to build a simple Excel Pivot Table. Building and viewing the Pivot Table works nicely the first time I execute the Access VBA code. If I exit Access and get back in again, things work nicely. However, when I try to execute the code more than one time (without getting out of Access), I receive Error 91 - "Object Variable or With block variable Not Set". I have tried many things but I cannot figure out how to prevent this error. I must be missing something. Below is the code that I am using. Thanks for your help with this. Brad ~~~~~~~~~~~~~ Dim XLApp As Excel.Application Dim XLWorkbook As Excel.Workbook Dim XLSheet As Excel.Worksheet Set XLApp = CreateObject("Excel.Application") XLApp.Visible = True Set XLWorkbook = XLApp.Workbooks.Add Set XLSheet = XLWorkbook.Sheets(1) XLSheet.Cells(1, 1).Value = "State" XLSheet.Cells(2, 1).Value = "MN" XLSheet.Cells(3, 1).Value = "WI" XLSheet.Cells(4, 1).Value = "SD" XLSheet.Cells(5, 1).Value = "ND" XLSheet.Cells(1, 2).Value = "Sales_Amt" XLSheet.Cells(2, 2).Value = "200" XLSheet.Cells(3, 2).Value = "300" XLSheet.Cells(4, 2).Value = "400" XLSheet.Cells(5, 2).Value = "500" ActiveWorkbook.PivotCaches.Create(SourceType:=xlDatabase, SourceData:= _ "Sheet1!R1C1:R5C2", Version:=xlPivotTableVersion12).CreatePivotTable _ TableDestination:="Sheet1!R9C1", TableName:="PivotTable3", DefaultVersion _ :=xlPivotTableVersion12 Sheets("Sheet1").Select Cells(9, 1).Select ActiveSheet.PivotTables("PivotTable3").PivotFields("State").Orientation = xlRowField ActiveSheet.PivotTables("PivotTable3").PivotFields("State").Position = 1 ActiveSheet.PivotTables("PivotTable3").AddDataField ActiveSheet.PivotTables( _ "PivotTable3").PivotFields("Sales_Amt"), "Sum of Sales_Amt", xlSum Set XLApp = Nothing Set XLWorkbook = Nothing Set XLSheet = Nothing ~~~~~~~~~~~~~ End of Code ~ ~~~~~~~~~ The Error 91 is issued on this statement on the "Second Execution" ActiveWorkbook.PivotCaches.Create(SourceType:=xlDatabase, SourceData:= _ "Sheet1!R1C1:R5C2", Version:=xlPivotTableVersion12).CreatePivotTable _ TableDestination:="Sheet1!R9C1", TableName:="PivotTable3", DefaultVersion _ :=xlPivotTableVersion12 ~~~~~~~~~~~~ From Gustav at cactus.dk Thu Jul 14 07:51:20 2011 From: Gustav at cactus.dk (Gustav Brock) Date: Thu, 14 Jul 2011 14:51:20 +0200 Subject: [AccessD] Generating an Excel Pivot Table from Access - Problem with Second Execution Message-ID: Hi Brad Without going deeper into your code, in Excel always be extremely careful and strict with properties, methods, and objects. Here you mix Sheet for Worksheet which is a no-no, and you use Select where you could use the much faster Activate. Also, objects should be closed if possible before setting them to Nothing. /gustav >>> BradM at blackforestltd.com 14-07-2011 14:27 >>> All, I am just starting to experiment with Access/Excel Automation Through a process of trial and error I have developed a small test Access application that is able to build a simple Excel Pivot Table. Building and viewing the Pivot Table works nicely the first time I execute the Access VBA code. If I exit Access and get back in again, things work nicely. However, when I try to execute the code more than one time (without getting out of Access), I receive Error 91 - "Object Variable or With block variable Not Set". I have tried many things but I cannot figure out how to prevent this error. I must be missing something. Below is the code that I am using. Thanks for your help with this. Brad ~~~~~~~~~~~~~ Dim XLApp As Excel.Application Dim XLWorkbook As Excel.Workbook Dim XLSheet As Excel.Worksheet Set XLApp = CreateObject("Excel.Application") XLApp.Visible = True Set XLWorkbook = XLApp.Workbooks.Add Set XLSheet = XLWorkbook.Sheets(1) XLSheet.Cells(1, 1).Value = "State" XLSheet.Cells(2, 1).Value = "MN" XLSheet.Cells(3, 1).Value = "WI" XLSheet.Cells(4, 1).Value = "SD" XLSheet.Cells(5, 1).Value = "ND" XLSheet.Cells(1, 2).Value = "Sales_Amt" XLSheet.Cells(2, 2).Value = "200" XLSheet.Cells(3, 2).Value = "300" XLSheet.Cells(4, 2).Value = "400" XLSheet.Cells(5, 2).Value = "500" ActiveWorkbook.PivotCaches.Create(SourceType:=xlDatabase, SourceData:= _ "Sheet1!R1C1:R5C2", Version:=xlPivotTableVersion12).CreatePivotTable _ TableDestination:="Sheet1!R9C1", TableName:="PivotTable3", DefaultVersion _ :=xlPivotTableVersion12 Sheets("Sheet1").Select Cells(9, 1).Select ActiveSheet.PivotTables("PivotTable3").PivotFields("State").Orientation = xlRowField ActiveSheet.PivotTables("PivotTable3").PivotFields("State").Position = 1 ActiveSheet.PivotTables("PivotTable3").AddDataField ActiveSheet.PivotTables( _ "PivotTable3").PivotFields("Sales_Amt"), "Sum of Sales_Amt", xlSum Set XLApp = Nothing Set XLWorkbook = Nothing Set XLSheet = Nothing ~~~~~~~~~~~~~ End of Code ~ ~~~~~~~~~ The Error 91 is issued on this statement on the "Second Execution" ActiveWorkbook.PivotCaches.Create(SourceType:=xlDatabase, SourceData:= _ "Sheet1!R1C1:R5C2", Version:=xlPivotTableVersion12).CreatePivotTable _ TableDestination:="Sheet1!R9C1", TableName:="PivotTable3", DefaultVersion _ :=xlPivotTableVersion12 ~~~~~~~~~~~~ From fuller.artful at gmail.com Thu Jul 14 08:36:36 2011 From: fuller.artful at gmail.com (Arthur Fuller) Date: Thu, 14 Jul 2011 09:36:36 -0400 Subject: [AccessD] Generating an Excel Pivot Table from Access - Problem with Second Execution In-Reply-To: References: Message-ID: I copied your code to a test MDB and interestingly, received an error on a different line than you, and with a different error message. I've played around a bit (e.g. changed "Sheets" to "WorkSheets", etc.) but the error persists. The offending line is: ActiveSheet.PivotTables("PivotTable3").AddDataField And the error message is: RunTime error 450: Wrong number of arguments or invalid property assignment. I'm running Office 2007. Very puzzling. Arthur From jwcolby at colbyconsulting.com Thu Jul 14 09:58:34 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Thu, 14 Jul 2011 10:58:34 -0400 Subject: [AccessD] Cannot Open Anymore Databases In-Reply-To: <000001cc3ff7$2b854cd0$828fe670$@com> References: <000001cc3ff7$2b854cd0$828fe670$@com> Message-ID: <4E1F041A.9030302@colbyconsulting.com> One of the things that helps is to use JIT subforms as well. JIT subforms only load subforms when the tab is clicked on. Since every combo and subform uses a recordset, loading subforms JIT really cuts down the number of recordsets used. It also speeds up loading the main form, sometimes drastically. John W. Colby www.ColbyConsulting.com On 7/11/2011 2:20 PM, Darrell Burns wrote: > I had the same problem with a form that had 5 subforms, each with multiple > queries. I submitted the question to every forum and discovered that there's > no easy cure. The connections limit is 256 but there's no function to tell > you how many you've used up. Connections to a back-end database count > double. After spending lots of time re-engineering my recordset actions and > being very meticulous about closing connections, the final solution was to > bind the subforms to temp tables and fill the tables as each tab is clicked. > So, your solution is the correct one. > - Darrell > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Tony Septav > Sent: Thursday, July 07, 2011 6:00 AM > To: accessd at databaseadvisors.com > Subject: [AccessD] Cannot Open Anymore Databases > > Hey All > Just curious. I was working on a report, I would view it and when I returned > to the design mode I would get the error message "Cannot open anymore > databases". The report is based on a union query, which is made up of 6 > subqueries. each of these subqueries is based on the results from about 3 or > 4 other querys. If I manually run the union query I don't get any error > messages, as I mentioned I only get the error message when working with the > report. Am I correct in assuming that the results of each of these queries > results in 1 instant of the database being opened and I have exceeded the 84 > (whatever) limit to the number of databases instances that can be open at > one time?? I solved the problem by appending the results of each of the 6 > queries to a temp table and using the table for the report. > > T. Septav > Nanaimo, BC > Canada From BradM at blackforestltd.com Thu Jul 14 11:12:15 2011 From: BradM at blackforestltd.com (Brad Marks) Date: Thu, 14 Jul 2011 11:12:15 -0500 Subject: [AccessD] Generating an Excel Pivot Table from Access - Problemwith Second Execution References: Message-ID: Arthur and Gustav, Thanks for the help, I appreciate it. I made the refinements that Gustav suggested, but I am still receiving the "91" Error. I also tried many other things but have not had success. Perhaps someone has an simple example of how to create an Excel Pivot table using "Automation" via Access VBA code. (and be able to execute the logic more than once without getting the 91 error.) Again, if I get out of Access and then back in again, everything works nicely. Thanks, Brad -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Brad Marks Sent: Thursday, July 14, 2011 7:28 AM To: Access Developers discussion and problem solving Subject: [AccessD] Generating an Excel Pivot Table from Access - Problemwith Second Execution All, I am just starting to experiment with Access/Excel Automation Through a process of trial and error I have developed a small test Access application that is able to build a simple Excel Pivot Table. Building and viewing the Pivot Table works nicely the first time I execute the Access VBA code. If I exit Access and get back in again, things work nicely. However, when I try to execute the code more than one time (without getting out of Access), I receive Error 91 - "Object Variable or With block variable Not Set". I have tried many things but I cannot figure out how to prevent this error. I must be missing something. Below is the code that I am using. Thanks for your help with this. Brad ~~~~~~~~~~~~~ Dim XLApp As Excel.Application Dim XLWorkbook As Excel.Workbook Dim XLSheet As Excel.Worksheet Set XLApp = CreateObject("Excel.Application") XLApp.Visible = True Set XLWorkbook = XLApp.Workbooks.Add Set XLSheet = XLWorkbook.Sheets(1) XLSheet.Cells(1, 1).Value = "State" XLSheet.Cells(2, 1).Value = "MN" XLSheet.Cells(3, 1).Value = "WI" XLSheet.Cells(4, 1).Value = "SD" XLSheet.Cells(5, 1).Value = "ND" XLSheet.Cells(1, 2).Value = "Sales_Amt" XLSheet.Cells(2, 2).Value = "200" XLSheet.Cells(3, 2).Value = "300" XLSheet.Cells(4, 2).Value = "400" XLSheet.Cells(5, 2).Value = "500" ActiveWorkbook.PivotCaches.Create(SourceType:=xlDatabase, SourceData:= _ "Sheet1!R1C1:R5C2", Version:=xlPivotTableVersion12).CreatePivotTable _ TableDestination:="Sheet1!R9C1", TableName:="PivotTable3", DefaultVersion _ :=xlPivotTableVersion12 Sheets("Sheet1").Select Cells(9, 1).Select ActiveSheet.PivotTables("PivotTable3").PivotFields("State").Orientation = xlRowField ActiveSheet.PivotTables("PivotTable3").PivotFields("State").Position = 1 ActiveSheet.PivotTables("PivotTable3").AddDataField ActiveSheet.PivotTables( _ "PivotTable3").PivotFields("Sales_Amt"), "Sum of Sales_Amt", xlSum Set XLApp = Nothing Set XLWorkbook = Nothing Set XLSheet = Nothing ~~~~~~~~~~~~~ End of Code ~ ~~~~~~~~~ The Error 91 is issued on this statement on the "Second Execution" ActiveWorkbook.PivotCaches.Create(SourceType:=xlDatabase, SourceData:= _ "Sheet1!R1C1:R5C2", Version:=xlPivotTableVersion12).CreatePivotTable _ TableDestination:="Sheet1!R9C1", TableName:="PivotTable3", DefaultVersion _ :=xlPivotTableVersion12 ~~~~~~~~~~~~ -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. From charlotte.foust at gmail.com Thu Jul 14 11:42:31 2011 From: charlotte.foust at gmail.com (Charlotte Foust) Date: Thu, 14 Jul 2011 09:42:31 -0700 Subject: [AccessD] Cannot Open Anymore Databases In-Reply-To: <4E1F041A.9030302@colbyconsulting.com> References: <000001cc3ff7$2b854cd0$828fe670$@com> <4E1F041A.9030302@colbyconsulting.com> Message-ID: And couple JIT with a tab control and you eliminate a lot of your issues immediately. Charlotte Foust On Thu, Jul 14, 2011 at 7:58 AM, jwcolby wrote: > One of the things that helps is to use JIT subforms as well. JIT subforms > only load subforms when the tab is clicked on. Since every combo and > subform uses a recordset, loading subforms JIT really cuts down the number > of recordsets used. It also speeds up loading the main form, sometimes > drastically. > > John W. Colby > www.ColbyConsulting.com > > > > On 7/11/2011 2:20 PM, Darrell Burns wrote: > >> I had the same problem with a form that had 5 subforms, each with multiple >> queries. I submitted the question to every forum and discovered that >> there's >> no easy cure. The connections limit is 256 but there's no function to tell >> you how many you've used up. Connections to a back-end database count >> double. After spending lots of time re-engineering my recordset actions >> and >> being very meticulous about closing connections, the final solution was to >> bind the subforms to temp tables and fill the tables as each tab is >> clicked. >> So, your solution is the correct one. >> - Darrell >> >> -----Original Message----- >> From: accessd-bounces@**databaseadvisors.com >> [mailto:accessd-bounces@**databaseadvisors.com] >> On Behalf Of Tony Septav >> Sent: Thursday, July 07, 2011 6:00 AM >> To: accessd at databaseadvisors.com >> Subject: [AccessD] Cannot Open Anymore Databases >> >> Hey All >> Just curious. I was working on a report, I would view it and when I >> returned >> to the design mode I would get the error message "Cannot open anymore >> databases". The report is based on a union query, which is made up of 6 >> subqueries. each of these subqueries is based on the results from about 3 >> or >> 4 other querys. If I manually run the union query I don't get any error >> messages, as I mentioned I only get the error message when working with >> the >> report. Am I correct in assuming that the results of each of these queries >> results in 1 instant of the database being opened and I have exceeded the >> 84 >> (whatever) limit to the number of databases instances that can be open at >> one time?? I solved the problem by appending the results of each of the 6 >> queries to a temp table and using the table for the report. >> >> T. Septav >> Nanaimo, BC >> Canada >> > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/**mailman/listinfo/accessd > > > Website: http://www.databaseadvisors.**com > > > From stuart at lexacorp.com.pg Thu Jul 14 15:16:58 2011 From: stuart at lexacorp.com.pg (Stuart McLachlan) Date: Fri, 15 Jul 2011 06:16:58 +1000 Subject: [AccessD] Generating an Excel Pivot Table from Access - Problemwith Second Execution In-Reply-To: References: , Message-ID: <4E1F4EBA.29684.83DCD28@stuart.lexacorp.com.pg> Search the archives for "unquailfied reference" I must have posted the same answer about half a dozen times. The old "unqualified reference" strikes again. See http://support.microsoft.com/kb/319832 When you write code to use an Excel object, method, or property, you should always precede the call with the appropriate object variable. If you do not, Visual Basic establishes its own reference to Excel... These lines for a start are unqualfied: Sheets("Sheet1").Select Cells(9, 1).Select -- Stuart > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Brad Marks > Sent: Thursday, July 14, 2011 7:28 AM To: Access Developers discussion > and problem solving Subject: [AccessD] Generating an Excel Pivot Table > from Access - Problemwith Second Execution > > All, > > I am just starting to experiment with Access/Excel Automation > > Through a process of trial and error I have developed a small test > Access application that is able to build a simple Excel Pivot Table. > Building and viewing the Pivot Table works nicely the first time I > execute the Access VBA code. If I exit Access and get back in again, > things work nicely. > > However, when I try to execute the code more than one time (without > getting out of Access), I receive Error 91 - "Object Variable or With > block variable Not Set". > > I have tried many things but I cannot figure out how to prevent this > error. I must be missing something. > > Below is the code that I am using. Thanks for your help with this. > > Brad > > ~~~~~~~~~~~~~ > Dim XLApp As Excel.Application > Dim XLWorkbook As Excel.Workbook > Dim XLSheet As Excel.Worksheet > > Set XLApp = CreateObject("Excel.Application") > > XLApp.Visible = True > > Set XLWorkbook = XLApp.Workbooks.Add > > Set XLSheet = XLWorkbook.Sheets(1) > > XLSheet.Cells(1, 1).Value = "State" > XLSheet.Cells(2, 1).Value = "MN" > XLSheet.Cells(3, 1).Value = "WI" > XLSheet.Cells(4, 1).Value = "SD" > XLSheet.Cells(5, 1).Value = "ND" > > XLSheet.Cells(1, 2).Value = "Sales_Amt" > XLSheet.Cells(2, 2).Value = "200" > XLSheet.Cells(3, 2).Value = "300" > XLSheet.Cells(4, 2).Value = "400" > XLSheet.Cells(5, 2).Value = "500" > > ActiveWorkbook.PivotCaches.Create(SourceType:=xlDatabase, SourceData:= > _ > "Sheet1!R1C1:R5C2", > Version:=xlPivotTableVersion12).CreatePivotTable _ > TableDestination:="Sheet1!R9C1", TableName:="PivotTable3", > DefaultVersion _ > :=xlPivotTableVersion12 > > Sheets("Sheet1").Select > > Cells(9, 1).Select > From BradM at blackforestltd.com Thu Jul 14 16:01:42 2011 From: BradM at blackforestltd.com (Brad Marks) Date: Thu, 14 Jul 2011 16:01:42 -0500 Subject: [AccessD] Generating an Excel Pivot Table from Access -Problemwith Second Execution References: , <4E1F4EBA.29684.83DCD28@stuart.lexacorp.com.pg> Message-ID: Stuart, Thank You! Thank You! Thank You! I owe you a beer! The Unqualified References were the problem. I am just starting to dabble with Access/Excel Automation. I am learning by trial and error (mostly error). I really appreciate the help. I have spent most of the day wrestling with this problem. Sincerely, Brad Marks ---Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Stuart McLachlan Sent: Thursday, July 14, 2011 3:17 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Generating an Excel Pivot Table from Access -Problemwith Second Execution Search the archives for "unquailfied reference" I must have posted the same answer about half a dozen times. The old "unqualified reference" strikes again. See http://support.microsoft.com/kb/319832 When you write code to use an Excel object, method, or property, you should always precede the call with the appropriate object variable. If you do not, Visual Basic establishes its own reference to Excel... These lines for a start are unqualfied: Sheets("Sheet1").Select Cells(9, 1).Select -- Stuart > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Brad Marks > Sent: Thursday, July 14, 2011 7:28 AM To: Access Developers discussion > and problem solving Subject: [AccessD] Generating an Excel Pivot Table > from Access - Problemwith Second Execution > > All, > > I am just starting to experiment with Access/Excel Automation > > Through a process of trial and error I have developed a small test > Access application that is able to build a simple Excel Pivot Table. > Building and viewing the Pivot Table works nicely the first time I > execute the Access VBA code. If I exit Access and get back in again, > things work nicely. > > However, when I try to execute the code more than one time (without > getting out of Access), I receive Error 91 - "Object Variable or With > block variable Not Set". > > I have tried many things but I cannot figure out how to prevent this > error. I must be missing something. > > Below is the code that I am using. Thanks for your help with this. > > Brad > > ~~~~~~~~~~~~~ > Dim XLApp As Excel.Application > Dim XLWorkbook As Excel.Workbook > Dim XLSheet As Excel.Worksheet > > Set XLApp = CreateObject("Excel.Application") > > XLApp.Visible = True > > Set XLWorkbook = XLApp.Workbooks.Add > > Set XLSheet = XLWorkbook.Sheets(1) > > XLSheet.Cells(1, 1).Value = "State" > XLSheet.Cells(2, 1).Value = "MN" > XLSheet.Cells(3, 1).Value = "WI" > XLSheet.Cells(4, 1).Value = "SD" > XLSheet.Cells(5, 1).Value = "ND" > > XLSheet.Cells(1, 2).Value = "Sales_Amt" > XLSheet.Cells(2, 2).Value = "200" > XLSheet.Cells(3, 2).Value = "300" > XLSheet.Cells(4, 2).Value = "400" > XLSheet.Cells(5, 2).Value = "500" > > ActiveWorkbook.PivotCaches.Create(SourceType:=xlDatabase, SourceData:= > _ > "Sheet1!R1C1:R5C2", > Version:=xlPivotTableVersion12).CreatePivotTable _ > TableDestination:="Sheet1!R9C1", TableName:="PivotTable3", > DefaultVersion _ > :=xlPivotTableVersion12 > > Sheets("Sheet1").Select > > Cells(9, 1).Select > -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. From vbacreations at gmail.com Fri Jul 15 00:34:04 2011 From: vbacreations at gmail.com (William Benson (VBACreations.Com)) Date: Fri, 15 Jul 2011 01:34:04 -0400 Subject: [AccessD] ScreenUpdating coming back on when controlling Excel via automation Message-ID: <000001cc42b0$d0591c80$710b5580$@gmail.com> Brad, here is more for you to geal with! I have googled this and seen it has affected more than me... but no one has a solution. When I am in Excel, I do not find Workbooks.Open causes screenupdating to toggle back on. However, when using an instance of Excel controlled through automation (from Access) it does turn screenupdating back on (and the visible property of the application instance as well). It is a bit frustrating. So far I cannot do anything about it except use code to turn it off again. It is creating visuals that I do not want my client to endure. Anyone have a solution to keep Excel really in the silent and invisible background when using automation? From vbacreations at gmail.com Fri Jul 15 00:34:42 2011 From: vbacreations at gmail.com (William Benson (VBACreations.Com)) Date: Fri, 15 Jul 2011 01:34:42 -0400 Subject: [AccessD] ScreenUpdating coming back on when controlling Excel via automation Message-ID: <000101cc42b0$e6c047a0$b440d6e0$@gmail.com> Deal... -----Original Message----- From: William Benson (VBACreations.Com) [mailto:vbacreations at gmail.com] Sent: Friday, July 15, 2011 1:34 AM To: Access Developers discussion and problem solving Subject: ScreenUpdating coming back on when controlling Excel via automation Brad, here is more for you to geal with! I have googled this and seen it has affected more than me... but no one has a solution. When I am in Excel, I do not find Workbooks.Open causes screenupdating to toggle back on. However, when using an instance of Excel controlled through automation (from Access) it does turn screenupdating back on (and the visible property of the application instance as well). It is a bit frustrating. So far I cannot do anything about it except use code to turn it off again. It is creating visuals that I do not want my client to endure. Anyone have a solution to keep Excel really in the silent and invisible background when using automation? From accessd at shaw.ca Fri Jul 15 16:31:23 2011 From: accessd at shaw.ca (Jim Lawrence) Date: Fri, 15 Jul 2011 14:31:23 -0700 Subject: [AccessD] Migrating Microsoft Access Databases to SQL Server 2008 In-Reply-To: <4E1F4EBA.29684.83DCD28@stuart.lexacorp.com.pg> References: <4E1F4EBA.29684.83DCD28@stuart.lexacorp.com.pg> Message-ID: <21F07958DF334582B074EA55D510209B@creativesystemdesigns.com> For all you who have not done a migration before or are a little rusty here is a link to a very nice article on migrating from a Microsoft Access Databases to SQL Server 2008 Database. http://www.databasejournal.com/features/msaccess/migrating-access-databases- to-sql-server.html Jim From vbacreations at gmail.com Fri Jul 15 20:44:05 2011 From: vbacreations at gmail.com (William Benson) Date: Fri, 15 Jul 2011 21:44:05 -0400 Subject: [AccessD] VBA run-time error 3170: Could not find installable ISAM In-Reply-To: <2B7A375995D24727A5D8506CB9413AF8@HAL9007> References: <2B7A375995D24727A5D8506CB9413AF8@HAL9007> Message-ID: Could it be they have excel set to ignore requests from other applications? (DDE). On Jul 13, 2011 7:27 PM, "Rocky Smolin" wrote: > A prospect is getting this error: > > VBA run-time error 3170: Could not find installable ISAM > > When I do TransferSpreadsheet. > > Does anyone know offhand what the likeliest cause of this is? > > MTIA > > Rocky > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com From gustav at cactus.dk Sat Jul 16 02:53:45 2011 From: gustav at cactus.dk (Gustav Brock) Date: Sat, 16 Jul 2011 09:53:45 +0200 Subject: [AccessD] VBA run-time error 3170: Could not find installable ISAM Message-ID: Hi Rocky Or, when installing Access, you forgot to mark the driver for Excel? /gustav >>> vbacreations at gmail.com 16-07-2011 03:44 >>> Could it be they have excel set to ignore requests from other applications? (DDE). On Jul 13, 2011 7:27 PM, "Rocky Smolin" wrote: > A prospect is getting this error: > > VBA run-time error 3170: Could not find installable ISAM > > When I do TransferSpreadsheet. > > Does anyone know offhand what the likeliest cause of this is? > > MTIA > > Rocky From jwcolby at colbyconsulting.com Sat Jul 16 08:35:28 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Sat, 16 Jul 2011 09:35:28 -0400 Subject: [AccessD] Elapsed time class - Stuart please ignore... Message-ID: <4E2193A0.1000509@colbyconsulting.com> I'm building a little database to time / log my son's computer time. I have a form which he uses to select a game which opens the game for him, creates a record in the table and starts the timer, leaving this form up in the background behind the game. As he closes the game the form becomes visible and he clicks a button to update the stop time in the table and stops the elapsed time timer. Not yet done, I will be causing the form to beep at him as he goes over the allotted time to play the game. Nothing special here, just wrapping the code / date I needed to measure elapsed time into a class. Obviously the point of putting it in a class is that it can be used in one or a hundred forms to perform elapsed time calcs, and it carves out all of that data / logic into a single place. To use it in any form just dimension a variable and set it to a new instance of the variable: Dim mcElapsedTime As clsElapsedTime Private Sub Form_Open(Cancel As Integer) Set mcElapsedTime = New clsElapsedTime Me.TimerInterval = 1000 - set up the timer for one second timer ticks End Sub Private Sub Form_Timer() mcElapsedTime.UpdateElapsedTime txtElapsedTime = mcElapsedTime.pElapsedTime End Sub The elapsed time class: Option Compare Database Option Explicit Private mlngSeconds As Long Private mlngMinutes As Long Private mlngHours As Long Private mstrElapsedTime Property Get pElapsedTime() As String pElapsedTime = mstrElapsedTime End Property Property Get pSeconds() As Long pSeconds = mlngSeconds End Property Property Get pMinutes() As Long pMinutes = mlngMinutes End Property Property Get pHours() As Long pHours = mlngHours End Property Private Function CalcElapsedTime() mstrElapsedTime = mlngHours & ":" & mlngMinutes & ":" & mlngSeconds End Function Function mResetElapsedTime() mlngSeconds = 0 mlngMinutes = 0 mlngHours = 0 End Function Function UpdateElapsedTime() mlngSeconds = mlngSeconds + 1 If mlngSeconds >= 60 Then mlngSeconds = 0 mlngMinutes = mlngMinutes + 1 End If If mlngMinutes >= 60 Then mlngMinutes = 0 mlngHours = mlngHours + 1 End If CalcElapsedTime End Function -- John W. Colby www.ColbyConsulting.com From rockysmolin at bchacc.com Sat Jul 16 09:02:09 2011 From: rockysmolin at bchacc.com (Rocky Smolin) Date: Sat, 16 Jul 2011 07:02:09 -0700 Subject: [AccessD] VBA run-time error 3170: Could not find installableISAM In-Reply-To: References: Message-ID: <2A696EF71D4743F79FE709F132029C5A@HAL9007> Possible. I'll forward to the client. Thanks Rocky -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: Saturday, July 16, 2011 12:54 AM To: accessd at databaseadvisors.com Subject: Re: [AccessD] VBA run-time error 3170: Could not find installableISAM Hi Rocky Or, when installing Access, you forgot to mark the driver for Excel? /gustav >>> vbacreations at gmail.com 16-07-2011 03:44 >>> Could it be they have excel set to ignore requests from other applications? (DDE). On Jul 13, 2011 7:27 PM, "Rocky Smolin" wrote: > A prospect is getting this error: > > VBA run-time error 3170: Could not find installable ISAM > > When I do TransferSpreadsheet. > > Does anyone know offhand what the likeliest cause of this is? > > MTIA > > Rocky -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From rockysmolin at bchacc.com Sat Jul 16 09:10:25 2011 From: rockysmolin at bchacc.com (Rocky Smolin) Date: Sat, 16 Jul 2011 07:10:25 -0700 Subject: [AccessD] Elapsed time class - Stuart please ignore... In-Reply-To: <4E2193A0.1000509@colbyconsulting.com> References: <4E2193A0.1000509@colbyconsulting.com> Message-ID: Ooh, I could that. Can I get a copy when it's ready? Sign me, Living With a StarCraft Addict (Rocky) -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Saturday, July 16, 2011 6:35 AM To: Access Developers discussion and problem solving Subject: [AccessD] Elapsed time class - Stuart please ignore... I'm building a little database to time / log my son's computer time. I have a form which he uses to select a game which opens the game for him, creates a record in the table and starts the timer, leaving this form up in the background behind the game. As he closes the game the form becomes visible and he clicks a button to update the stop time in the table and stops the elapsed time timer. Not yet done, I will be causing the form to beep at him as he goes over the allotted time to play the game. Nothing special here, just wrapping the code / date I needed to measure elapsed time into a class. Obviously the point of putting it in a class is that it can be used in one or a hundred forms to perform elapsed time calcs, and it carves out all of that data / logic into a single place. To use it in any form just dimension a variable and set it to a new instance of the variable: Dim mcElapsedTime As clsElapsedTime Private Sub Form_Open(Cancel As Integer) Set mcElapsedTime = New clsElapsedTime Me.TimerInterval = 1000 - set up the timer for one second timer ticks End Sub Private Sub Form_Timer() mcElapsedTime.UpdateElapsedTime txtElapsedTime = mcElapsedTime.pElapsedTime End Sub The elapsed time class: Option Compare Database Option Explicit Private mlngSeconds As Long Private mlngMinutes As Long Private mlngHours As Long Private mstrElapsedTime Property Get pElapsedTime() As String pElapsedTime = mstrElapsedTime End Property Property Get pSeconds() As Long pSeconds = mlngSeconds End Property Property Get pMinutes() As Long pMinutes = mlngMinutes End Property Property Get pHours() As Long pHours = mlngHours End Property Private Function CalcElapsedTime() mstrElapsedTime = mlngHours & ":" & mlngMinutes & ":" & mlngSeconds End Function Function mResetElapsedTime() mlngSeconds = 0 mlngMinutes = 0 mlngHours = 0 End Function Function UpdateElapsedTime() mlngSeconds = mlngSeconds + 1 If mlngSeconds >= 60 Then mlngSeconds = 0 mlngMinutes = mlngMinutes + 1 End If If mlngMinutes >= 60 Then mlngMinutes = 0 mlngHours = mlngHours + 1 End If CalcElapsedTime End Function -- John W. Colby www.ColbyConsulting.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From jimdettman at verizon.net Sat Jul 16 09:33:56 2011 From: jimdettman at verizon.net (Jim Dettman) Date: Sat, 16 Jul 2011 10:33:56 -0400 Subject: [AccessD] VBA run-time error 3170: Could not find installable ISAM In-Reply-To: <2B7A375995D24727A5D8506CB9413AF8@HAL9007> References: <2B7A375995D24727A5D8506CB9413AF8@HAL9007> Message-ID: <242976E451CD4C82AB1CB0124621F85D@XPS> Rocky, Depends on version, but in the past, corrupt registry entries was usually the cause (assuming this was working already). See: When you import files, export files, or link files in Access 2002 or in Access 2003, some file types are missing, or you may receive a "Could not find installable ISAM" error message http://support.microsoft.com/kb/283881 This type of problem was the same all the way back through A97 (different registry keys though). Jim. -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Rocky Smolin Sent: Wednesday, July 13, 2011 07:25 PM To: accessd at databaseadvisors.com Subject: [AccessD] VBA run-time error 3170: Could not find installable ISAM A prospect is getting this error: VBA run-time error 3170: Could not find installable ISAM When I do TransferSpreadsheet. Does anyone know offhand what the likeliest cause of this is? MTIA Rocky -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From fuller.artful at gmail.com Sat Jul 16 09:48:36 2011 From: fuller.artful at gmail.com (Arthur Fuller) Date: Sat, 16 Jul 2011 10:48:36 -0400 Subject: [AccessD] Elapsed time class - Stuart please ignore... In-Reply-To: <4E2193A0.1000509@colbyconsulting.com> References: <4E2193A0.1000509@colbyconsulting.com> Message-ID: Nice and clean. How do you stop the timer? A. From jwcolby at colbyconsulting.com Sat Jul 16 10:01:25 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Sat, 16 Jul 2011 11:01:25 -0400 Subject: [AccessD] Elapsed time class - Stuart please ignore... In-Reply-To: References: <4E2193A0.1000509@colbyconsulting.com> Message-ID: <4E21A7C5.1000200@colbyconsulting.com> Set the form's TimerInterval to 0. The class with a pad function for the display and changing longs to int. Option Compare Database Option Explicit Private mintSeconds As Integer Private mintMinutes As Integer Private mintHours As Integer Private mstrElapsedTime Property Get pElapsedTime() As String pElapsedTime = mstrElapsedTime End Property Property Get pSeconds() As Integer pSeconds = mintSeconds End Property Property Get pMinutes() As Integer pMinutes = mintMinutes End Property Property Get pHours() As Integer pHours = mintHours End Property Function mPad(intToPad As Integer) As String Dim strToPad strToPad = intToPad If Len(strToPad < 2) Then strToPad = "0" & strToPad End If mPad = strToPad End Function Private Function CalcElapsedTime() Dim strPad As String mstrElapsedTime = mPad(mintHours) & ":" & mPad(mintMinutes) & ":" & mPad(mintSeconds) End Function Function mResetElapsedTime() mintSeconds = 0 mintMinutes = 0 mintHours = 0 End Function Function UpdateElapsedTime() mintSeconds = mintSeconds + 1 If mintSeconds >= 60 Then mintSeconds = 0 mintMinutes = mintMinutes + 1 End If If mintMinutes >= 60 Then mintMinutes = 0 mintHours = mintHours + 1 End If CalcElapsedTime End Function John W. Colby www.ColbyConsulting.com On 7/16/2011 10:48 AM, Arthur Fuller wrote: > Nice and clean. How do you stop the timer? > > A. From rockysmolin at bchacc.com Sat Jul 16 10:11:26 2011 From: rockysmolin at bchacc.com (Rocky Smolin) Date: Sat, 16 Jul 2011 08:11:26 -0700 Subject: [AccessD] VBA run-time error 3170: Could not find installableISAM In-Reply-To: <242976E451CD4C82AB1CB0124621F85D@XPS> References: <2B7A375995D24727A5D8506CB9413AF8@HAL9007> <242976E451CD4C82AB1CB0124621F85D@XPS> Message-ID: Thanks - will forward. BTW, I worked around the problem by using transfertext to a CSV file which opens just fine in Excel. :) Rocky -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Jim Dettman Sent: Saturday, July 16, 2011 7:34 AM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] VBA run-time error 3170: Could not find installableISAM Rocky, Depends on version, but in the past, corrupt registry entries was usually the cause (assuming this was working already). See: When you import files, export files, or link files in Access 2002 or in Access 2003, some file types are missing, or you may receive a "Could not find installable ISAM" error message http://support.microsoft.com/kb/283881 This type of problem was the same all the way back through A97 (different registry keys though). Jim. -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Rocky Smolin Sent: Wednesday, July 13, 2011 07:25 PM To: accessd at databaseadvisors.com Subject: [AccessD] VBA run-time error 3170: Could not find installable ISAM A prospect is getting this error: VBA run-time error 3170: Could not find installable ISAM When I do TransferSpreadsheet. Does anyone know offhand what the likeliest cause of this is? MTIA Rocky -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From rockysmolin at bchacc.com Sat Jul 16 10:18:09 2011 From: rockysmolin at bchacc.com (Rocky Smolin) Date: Sat, 16 Jul 2011 08:18:09 -0700 Subject: [AccessD] VBA run-time error 3170: Could not find installableISAM In-Reply-To: References: <2B7A375995D24727A5D8506CB9413AF8@HAL9007> Message-ID: William: Where do you set that DDE parameter? Thanks, Rocky -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of William Benson Sent: Friday, July 15, 2011 6:44 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] VBA run-time error 3170: Could not find installableISAM Could it be they have excel set to ignore requests from other applications? (DDE). On Jul 13, 2011 7:27 PM, "Rocky Smolin" wrote: > A prospect is getting this error: > > VBA run-time error 3170: Could not find installable ISAM > > When I do TransferSpreadsheet. > > Does anyone know offhand what the likeliest cause of this is? > > MTIA > > Rocky > > > -- > 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 jwcolby at colbyconsulting.com Sat Jul 16 13:46:59 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Sat, 16 Jul 2011 14:46:59 -0400 Subject: [AccessD] BE builder Message-ID: <4E21DCA3.6010105@colbyconsulting.com> I need an ultra simple BE builder. I have built my little game play logger for my son. It logs the time he starts and stops and plays a wave file - more and more often - to remind and encourage him to get off when his time is up. It only has a couple of simple tables, but it would be nice to split FE/BE so that if I fix a problem or add a feature I can update the FE. Ya know! It would be nice to have the program open and check if the BE exists, creating it if not. Placing the BE in the same dir as the FE would be fine. I can of course write that but if anyone has such a thing already that would be better. I did it long ago but it is lost in the deep shadows of the last century. Anyone? -- John W. Colby www.ColbyConsulting.com From stuart at lexacorp.com.pg Sat Jul 16 15:20:20 2011 From: stuart at lexacorp.com.pg (Stuart McLachlan) Date: Sun, 17 Jul 2011 06:20:20 +1000 Subject: [AccessD] BE builder In-Reply-To: <4E21DCA3.6010105@colbyconsulting.com> References: <4E21DCA3.6010105@colbyconsulting.com> Message-ID: <4E21F284.17638.9E6E218@stuart.lexacorp.com.pg> Quick one of the top of my head: Obviously you need would probably want to add indexes and do some error checking as well. Option Compare Database Option Explicit Const BEName As String = "GameTimer.mdb" Function CheckBE() If Dir$(CurrentProject.Path & "\" & BEName) = "" Then CreateBE End Function Function CreateBE() As Long Dim wrkDefault As Workspace Dim dbsNew As Database Dim tdfNew As TableDef Set wrkDefault = DBEngine.Workspaces(0) Set dbsNew = wrkDefault.CreateDatabase(CurrentProject.Path & "\" & BEName, dbLangGeneral) Set tdfNew = dbsNew.CreateTableDef("tblGameTimes") With tdfNew .Fields.Append .CreateField("StartDateTime", dbDate) .Fields.Append .CreateField("ElapsedTime", dbLong) .Fields.Append .CreateField("Game", dbText) End With dbsNew.TableDefs.Append tdfNew dbsNew.Close End Function On 16 Jul 2011 at 14:46, jwcolby wrote: > I need an ultra simple BE builder. I have built my little game play > logger for my son. It logs the time he starts and stops and plays a > wave file - more and more often - to remind and encourage him to get > off when his time is up. > > It only has a couple of simple tables, but it would be nice to split > FE/BE so that if I fix a problem or add a feature I can update the FE. > Ya know! > > It would be nice to have the program open and check if the BE exists, > creating it if not. Placing the BE in the same dir as the FE would be > fine. > > I can of course write that but if anyone has such a thing already that > would be better. I did it long ago but it is lost in the deep shadows > of the last century. > > Anyone? > -- > John W. Colby > www.ColbyConsulting.com > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > From jwcolby at colbyconsulting.com Sat Jul 16 15:38:49 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Sat, 16 Jul 2011 16:38:49 -0400 Subject: [AccessD] BE builder In-Reply-To: <4E21F284.17638.9E6E218@stuart.lexacorp.com.pg> References: <4E21DCA3.6010105@colbyconsulting.com> <4E21F284.17638.9E6E218@stuart.lexacorp.com.pg> Message-ID: <4E21F6D9.1000406@colbyconsulting.com> Thanks Stuart! John W. Colby www.ColbyConsulting.com On 7/16/2011 4:20 PM, Stuart McLachlan wrote: > Quick one of the top of my head: Obviously you need would probably want to add indexes > and do some error checking as well. > > Option Compare Database > Option Explicit > > Const BEName As String = "GameTimer.mdb" > > Function CheckBE() > If Dir$(CurrentProject.Path& "\"& BEName) = "" Then CreateBE > End Function > > Function CreateBE() As Long > Dim wrkDefault As Workspace > Dim dbsNew As Database > Dim tdfNew As TableDef > > Set wrkDefault = DBEngine.Workspaces(0) > Set dbsNew = wrkDefault.CreateDatabase(CurrentProject.Path& "\"& BEName, > dbLangGeneral) > Set tdfNew = dbsNew.CreateTableDef("tblGameTimes") > With tdfNew > .Fields.Append .CreateField("StartDateTime", dbDate) > .Fields.Append .CreateField("ElapsedTime", dbLong) > .Fields.Append .CreateField("Game", dbText) > End With > dbsNew.TableDefs.Append tdfNew > dbsNew.Close > End Function > > > On 16 Jul 2011 at 14:46, jwcolby wrote: > >> I need an ultra simple BE builder. I have built my little game play >> logger for my son. It logs the time he starts and stops and plays a >> wave file - more and more often - to remind and encourage him to get >> off when his time is up. >> >> It only has a couple of simple tables, but it would be nice to split >> FE/BE so that if I fix a problem or add a feature I can update the FE. >> Ya know! >> >> It would be nice to have the program open and check if the BE exists, >> creating it if not. Placing the BE in the same dir as the FE would be >> fine. >> >> I can of course write that but if anyone has such a thing already that >> would be better. I did it long ago but it is lost in the deep shadows >> of the last century. >> >> Anyone? >> -- >> John W. Colby >> www.ColbyConsulting.com >> -- >> AccessD mailing list >> AccessD at databaseadvisors.com >> http://databaseadvisors.com/mailman/listinfo/accessd >> Website: http://www.databaseadvisors.com >> > > > From jwcolby at colbyconsulting.com Sat Jul 16 16:09:35 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Sat, 16 Jul 2011 17:09:35 -0400 Subject: [AccessD] where is OpenOffice data store Message-ID: <4E21FE0F.3090606@colbyconsulting.com> I installed OpenOffice on a computer I am giving away. I just happened to create a table in their database app and the data store looks rather robust, perhaps mysql? I have not managed to Google what data store open office uses. Does anyone know? -- John W. Colby www.ColbyConsulting.com From stuart at lexacorp.com.pg Sat Jul 16 16:49:52 2011 From: stuart at lexacorp.com.pg (Stuart McLachlan) Date: Sun, 17 Jul 2011 07:49:52 +1000 Subject: [AccessD] where is OpenOffice data store In-Reply-To: <4E21FE0F.3090606@colbyconsulting.com> References: <4E21FE0F.3090606@colbyconsulting.com> Message-ID: <4E220780.30775.A38D934@stuart.lexacorp.com.pg> HyperSQL http://hsqldb.org/ -- Stuart On 16 Jul 2011 at 17:09, jwcolby wrote: > I installed OpenOffice on a computer I am giving away. I just > happened to create a table in their database app and the data store > looks rather robust, perhaps mysql? I have not managed to Google what > data store open office uses. > > Does anyone know? > > -- > John W. Colby > www.ColbyConsulting.com > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > From jwcolby at colbyconsulting.com Sun Jul 17 13:22:34 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Sun, 17 Jul 2011 14:22:34 -0400 Subject: [AccessD] Child computer Game timer Message-ID: <4E23286A.8030301@colbyconsulting.com> I have designed a game timer for my son which I am making available to list members if they want it. This timer is designed for children who are old enough to play "unsupervised" and I want them to have a set time that they can play per session. I want to record when they start and stop and have a display of how long they have been playing. I used to have Robbie "write it down" and set a timer on the stove. Both of which he "forgot" more often than not. This is not a "dishonest teenager" control mechanism, I am not getting into trying to outsmart a teenager here. It is merely meant to allow me to see how much time my son is playing. I removed all of the shortcuts from the desktop etc so that the way he opens his games is through this database. I actually copied one of the shortcuts into the startup directory for one game that required a shortcut. I then informed him that there are consequences if he is playing without going through the timer. The timer is an Access form which has a game combo and a child id combo. In my case only my son uses it at the moment, though I will probably have my daughter use it as well. It is FE/BE. The form consists of: 1) A game combo 2) A child combo 3) A start time 4) A stop time 5) The minutes they are allowed to play, fixed ATM though it could be included in the child record. Status controls are: 1) Last Play elapsed time 2) Last play time stopped At the very bottom of the form is an elapsed time. So the child selects the game they will play. The game has the stuff required to actually open the game, usually the filespec for the game (path and file name) but it can also use a shortcut file if the game requires starting directory etc. Selecting the game starts a timer which shows up on the "Elapsed time" at the bottom, and records the start time. There is a button which enters the stopped time and moves to a new record. Once a record is "stopped" it can no longer be edited. No records can be deleted (through the form). When the time is up, my son often does the "I need to do this one small thing before I quit" routine. In order to allow that but still encourage him to get off, i built in an annoyance timer. The database does not (yet) shut down the game automatically (though I might go there) but it does beep a series of beeps when time is up, and then starts beeping at him every N seconds. N decreases over time until it is beeping every second. This is truly annoying (to anyone in the room) and encourages him to finish up and get off. It also alerts any adult near by that "time is up". In fact it is so annoying that he was turning down the speaker when it beeped. I had to inform him that there would be consequences for that. ;) The system is working fine so far. I am finally getting his times logged regularly and getting him off when his time is up. We shall have to see how it works long term. Adolescents can be sneaky. Total loss of gaming privileges for breaking the rules is the consequence of being sneaky. Possible enhancements: 1) Times of day allowed to play 2) Total time allowed to play 3) Play time allowed per child etc. -- John W. Colby www.ColbyConsulting.com From mwp.reid at qub.ac.uk Sun Jul 17 13:38:07 2011 From: mwp.reid at qub.ac.uk (Martin Reid) Date: Sun, 17 Jul 2011 19:38:07 +0100 Subject: [AccessD] Child computer Game timer Message-ID: <631CF83223105545BF43EFB52CB08295492AF7C9ED@EX2K7-VIRT-2.ads.qub.ac.uk> I use the low tech approach walk over and turn it of. Martin Sent from my Windows Phone -----Original Message----- From: jwcolby Sent: 17 July 2011 19:26 To: Access Developers discussion and problem solving Subject: [AccessD] Child computer Game timer I have designed a game timer for my son which I am making available to list members if they want it. This timer is designed for children who are old enough to play "unsupervised" and I want them to have a set time that they can play per session. I want to record when they start and stop and have a display of how long they have been playing. I used to have Robbie "write it down" and set a timer on the stove. Both of which he "forgot" more often than not. This is not a "dishonest teenager" control mechanism, I am not getting into trying to outsmart a teenager here. It is merely meant to allow me to see how much time my son is playing. I removed all of the shortcuts from the desktop etc so that the way he opens his games is through this database. I actually copied one of the shortcuts into the startup directory for one game that required a shortcut. I then informed him that there are consequences if he is playing without going through the timer. The timer is an Access form which has a game combo and a child id combo. In my case only my son uses it at the moment, though I will probably have my daughter use it as well. It is FE/BE. The form consists of: 1) A game combo 2) A child combo 3) A start time 4) A stop time 5) The minutes they are allowed to play, fixed ATM though it could be included in the child record. Status controls are: 1) Last Play elapsed time 2) Last play time stopped At the very bottom of the form is an elapsed time. So the child selects the game they will play. The game has the stuff required to actually open the game, usually the filespec for the game (path and file name) but it can also use a shortcut file if the game requires starting directory etc. Selecting the game starts a timer which shows up on the "Elapsed time" at the bottom, and records the start time. There is a button which enters the stopped time and moves to a new record. Once a record is "stopped" it can no longer be edited. No records can be deleted (through the form). When the time is up, my son often does the "I need to do this one small thing before I quit" routine. In order to allow that but still encourage him to get off, i built in an annoyance timer. The database does not (yet) shut down the game automatically (though I might go there) but it does beep a series of beeps when time is up, and then starts beeping at him every N seconds. N decreases over time until it is beeping every second. This is truly annoying (to anyone in the room) and encourages him to finish up and get off. It also alerts any adult near by that "time is up". In fact it is so annoying that he was turning down the speaker when it beeped. I had to inform him that there would be consequences for that. ;) The system is working fine so far. I am finally getting his times logged regularly and getting him off when his time is up. We shall have to see how it works long term. Adolescents can be sneaky. Total loss of gaming privileges for breaking the rules is the consequence of being sneaky. Possible enhancements: 1) Times of day allowed to play 2) Total time allowed to play 3) Play time allowed per child etc. -- John W. Colby www.ColbyConsulting.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 Jul 17 14:19:38 2011 From: accessd at shaw.ca (Jim Lawrence) Date: Sun, 17 Jul 2011 12:19:38 -0700 Subject: [AccessD] where is OpenOffice data store In-Reply-To: <4E220780.30775.A38D934@stuart.lexacorp.com.pg> References: <4E21FE0F.3090606@colbyconsulting.com> <4E220780.30775.A38D934@stuart.lexacorp.com.pg> Message-ID: <4467AEDCF3B74D77926B9BDB54F72737@creativesystemdesigns.com> Hi John, Stuart... Alternatively, MySQL/PHPAdmin, is so standard and there is thousands of web sites dedicated that DB and Admin FE. For a give away it is the best as you do not really want the client coming back having to ask all sorts of questions...;-) Jim -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Stuart McLachlan Sent: Saturday, July 16, 2011 2:50 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] where is OpenOffice data store HyperSQL http://hsqldb.org/ -- Stuart On 16 Jul 2011 at 17:09, jwcolby wrote: > I installed OpenOffice on a computer I am giving away. I just > happened to create a table in their database app and the data store > looks rather robust, perhaps mysql? I have not managed to Google what > data store open office uses. > > Does anyone know? > > -- > John W. Colby > www.ColbyConsulting.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 Jul 17 14:24:09 2011 From: accessd at shaw.ca (Jim Lawrence) Date: Sun, 17 Jul 2011 12:24:09 -0700 Subject: [AccessD] Child computer Game timer In-Reply-To: <4E23286A.8030301@colbyconsulting.com> References: <4E23286A.8030301@colbyconsulting.com> Message-ID: Hi John: You could just get something like the KidLogger. http://kidlogger.net/download.html Jim -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Sunday, July 17, 2011 11:23 AM To: Access Developers discussion and problem solving Subject: [AccessD] Child computer Game timer I have designed a game timer for my son which I am making available to list members if they want it. This timer is designed for children who are old enough to play "unsupervised" and I want them to have a set time that they can play per session. I want to record when they start and stop and have a display of how long they have been playing. I used to have Robbie "write it down" and set a timer on the stove. Both of which he "forgot" more often than not. This is not a "dishonest teenager" control mechanism, I am not getting into trying to outsmart a teenager here. It is merely meant to allow me to see how much time my son is playing. I removed all of the shortcuts from the desktop etc so that the way he opens his games is through this database. I actually copied one of the shortcuts into the startup directory for one game that required a shortcut. I then informed him that there are consequences if he is playing without going through the timer. The timer is an Access form which has a game combo and a child id combo. In my case only my son uses it at the moment, though I will probably have my daughter use it as well. It is FE/BE. The form consists of: 1) A game combo 2) A child combo 3) A start time 4) A stop time 5) The minutes they are allowed to play, fixed ATM though it could be included in the child record. Status controls are: 1) Last Play elapsed time 2) Last play time stopped At the very bottom of the form is an elapsed time. So the child selects the game they will play. The game has the stuff required to actually open the game, usually the filespec for the game (path and file name) but it can also use a shortcut file if the game requires starting directory etc. Selecting the game starts a timer which shows up on the "Elapsed time" at the bottom, and records the start time. There is a button which enters the stopped time and moves to a new record. Once a record is "stopped" it can no longer be edited. No records can be deleted (through the form). When the time is up, my son often does the "I need to do this one small thing before I quit" routine. In order to allow that but still encourage him to get off, i built in an annoyance timer. The database does not (yet) shut down the game automatically (though I might go there) but it does beep a series of beeps when time is up, and then starts beeping at him every N seconds. N decreases over time until it is beeping every second. This is truly annoying (to anyone in the room) and encourages him to finish up and get off. It also alerts any adult near by that "time is up". In fact it is so annoying that he was turning down the speaker when it beeped. I had to inform him that there would be consequences for that. ;) The system is working fine so far. I am finally getting his times logged regularly and getting him off when his time is up. We shall have to see how it works long term. Adolescents can be sneaky. Total loss of gaming privileges for breaking the rules is the consequence of being sneaky. Possible enhancements: 1) Times of day allowed to play 2) Total time allowed to play 3) Play time allowed per child etc. -- John W. Colby www.ColbyConsulting.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 Sun Jul 17 16:36:45 2011 From: stuart at lexacorp.com.pg (Stuart McLachlan) Date: Mon, 18 Jul 2011 07:36:45 +1000 Subject: [AccessD] where is OpenOffice data store In-Reply-To: <4467AEDCF3B74D77926B9BDB54F72737@creativesystemdesigns.com> References: <4E21FE0F.3090606@colbyconsulting.com>, <4E220780.30775.A38D934@stuart.lexacorp.com.pg>, <4467AEDCF3B74D77926B9BDB54F72737@creativesystemdesigns.com> Message-ID: <4E2355ED.23197.F5337D2@stuart.lexacorp.com.pg> Jim, John wasn't asking for suggestions, he was asking for a fact - what engine does Open Office use, -- Stuart On 17 Jul 2011 at 12:19, Jim Lawrence wrote: > Hi John, Stuart... > > Alternatively, MySQL/PHPAdmin, is so standard and there is thousands > of web sites dedicated that DB and Admin FE. For a give away it is the > best as you do not really want the client coming back having to ask > all sorts of questions...;-) > > Jim > > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Stuart > McLachlan Sent: Saturday, July 16, 2011 2:50 PM To: Access Developers > discussion and problem solving Subject: Re: [AccessD] where is > OpenOffice data store > > HyperSQL http://hsqldb.org/ > > -- > Stuart > > On 16 Jul 2011 at 17:09, jwcolby wrote: > > > I installed OpenOffice on a computer I am giving away. I just > > happened to create a table in their database app and the data store > > looks rather robust, perhaps mysql? I have not managed to Google > > what data store open office uses. > > > > Does anyone know? > > > > -- > > John W. Colby > > www.ColbyConsulting.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 Jul 17 19:00:34 2011 From: accessd at shaw.ca (Jim Lawrence) Date: Sun, 17 Jul 2011 17:00:34 -0700 Subject: [AccessD] where is OpenOffice data store In-Reply-To: <4E2355ED.23197.F5337D2@stuart.lexacorp.com.pg> References: <4E21FE0F.3090606@colbyconsulting.com> <4E220780.30775.A38D934@stuart.lexacorp.com.pg> <4467AEDCF3B74D77926B9BDB54F72737@creativesystemdesigns.com> <4E2355ED.23197.F5337D2@stuart.lexacorp.com.pg> Message-ID: <876882B1D75F40B68C0F13C95949AAAE@creativesystemdesigns.com> Right you are, Stuart... Jim -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Stuart McLachlan Sent: Sunday, July 17, 2011 2:37 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] where is OpenOffice data store Jim, John wasn't asking for suggestions, he was asking for a fact - what engine does Open Office use, -- Stuart On 17 Jul 2011 at 12:19, Jim Lawrence wrote: > Hi John, Stuart... > > Alternatively, MySQL/PHPAdmin, is so standard and there is thousands > of web sites dedicated that DB and Admin FE. For a give away it is the > best as you do not really want the client coming back having to ask > all sorts of questions...;-) > > Jim > > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Stuart > McLachlan Sent: Saturday, July 16, 2011 2:50 PM To: Access Developers > discussion and problem solving Subject: Re: [AccessD] where is > OpenOffice data store > > HyperSQL http://hsqldb.org/ > > -- > Stuart > > On 16 Jul 2011 at 17:09, jwcolby wrote: > > > I installed OpenOffice on a computer I am giving away. I just > > happened to create a table in their database app and the data store > > looks rather robust, perhaps mysql? I have not managed to Google > > what data store open office uses. > > > > Does anyone know? > > > > -- > > John W. Colby > > www.ColbyConsulting.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 jimdettman at verizon.net Sun Jul 17 20:09:10 2011 From: jimdettman at verizon.net (Jim Dettman) Date: Sun, 17 Jul 2011 21:09:10 -0400 Subject: [AccessD] Child computer Game timer In-Reply-To: References: <4E23286A.8030301@colbyconsulting.com> Message-ID: Check your router too...a lot of routers know have bandwidth monitoring, parental controls, and the ability to filter (by Mac address) based on a schedule. I've got mine set to cut out all internet access from 2:00 - 6:00 am. Jim. -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Jim Lawrence Sent: Sunday, July 17, 2011 03:24 PM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Child computer Game timer Hi John: You could just get something like the KidLogger. http://kidlogger.net/download.html Jim -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Sunday, July 17, 2011 11:23 AM To: Access Developers discussion and problem solving Subject: [AccessD] Child computer Game timer I have designed a game timer for my son which I am making available to list members if they want it. This timer is designed for children who are old enough to play "unsupervised" and I want them to have a set time that they can play per session. I want to record when they start and stop and have a display of how long they have been playing. I used to have Robbie "write it down" and set a timer on the stove. Both of which he "forgot" more often than not. This is not a "dishonest teenager" control mechanism, I am not getting into trying to outsmart a teenager here. It is merely meant to allow me to see how much time my son is playing. I removed all of the shortcuts from the desktop etc so that the way he opens his games is through this database. I actually copied one of the shortcuts into the startup directory for one game that required a shortcut. I then informed him that there are consequences if he is playing without going through the timer. The timer is an Access form which has a game combo and a child id combo. In my case only my son uses it at the moment, though I will probably have my daughter use it as well. It is FE/BE. The form consists of: 1) A game combo 2) A child combo 3) A start time 4) A stop time 5) The minutes they are allowed to play, fixed ATM though it could be included in the child record. Status controls are: 1) Last Play elapsed time 2) Last play time stopped At the very bottom of the form is an elapsed time. So the child selects the game they will play. The game has the stuff required to actually open the game, usually the filespec for the game (path and file name) but it can also use a shortcut file if the game requires starting directory etc. Selecting the game starts a timer which shows up on the "Elapsed time" at the bottom, and records the start time. There is a button which enters the stopped time and moves to a new record. Once a record is "stopped" it can no longer be edited. No records can be deleted (through the form). When the time is up, my son often does the "I need to do this one small thing before I quit" routine. In order to allow that but still encourage him to get off, i built in an annoyance timer. The database does not (yet) shut down the game automatically (though I might go there) but it does beep a series of beeps when time is up, and then starts beeping at him every N seconds. N decreases over time until it is beeping every second. This is truly annoying (to anyone in the room) and encourages him to finish up and get off. It also alerts any adult near by that "time is up". In fact it is so annoying that he was turning down the speaker when it beeped. I had to inform him that there would be consequences for that. ;) The system is working fine so far. I am finally getting his times logged regularly and getting him off when his time is up. We shall have to see how it works long term. Adolescents can be sneaky. Total loss of gaming privileges for breaking the rules is the consequence of being sneaky. Possible enhancements: 1) Times of day allowed to play 2) Total time allowed to play 3) Play time allowed per child etc. -- John W. Colby www.ColbyConsulting.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 dbdoug at gmail.com Sun Jul 17 21:31:16 2011 From: dbdoug at gmail.com (Doug Steele) Date: Sun, 17 Jul 2011 19:31:16 -0700 Subject: [AccessD] Child computer Game timer In-Reply-To: References: <4E23286A.8030301@colbyconsulting.com> Message-ID: John's doing it right, in my opinion. If Robbie wants more time, he's going to be forced to learn to hack John's program. Then, before he knows it, no more computer games, just huge SQL databases to maintain while John enjoys his retirement... Doug On Sun, Jul 17, 2011 at 6:09 PM, Jim Dettman wrote: > > ?Check your router too...a lot of routers know have bandwidth monitoring, > parental controls, and the ability to filter (by Mac address) based on a > schedule. > > ?I've got mine set to cut out all internet access from 2:00 - 6:00 am. > > Jim. > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Jim Lawrence > Sent: Sunday, July 17, 2011 03:24 PM > To: 'Access Developers discussion and problem solving' > Subject: Re: [AccessD] Child computer Game timer > > Hi John: > > You could just get something like the KidLogger. > > http://kidlogger.net/download.html > > Jim > > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby > Sent: Sunday, July 17, 2011 11:23 AM > To: Access Developers discussion and problem solving > Subject: [AccessD] Child computer Game timer > > I have designed a game timer for my son which I am making available to list > members if they want it. > > This timer is designed for children who are old enough to play > "unsupervised" and I want them to > have a set time that they can play per session. ?I want to record when they > start and stop and have > a display of how long they have been playing. ?I used to have Robbie "write > it down" and set a timer > on the stove. ?Both of which he "forgot" more often than not. > > This is not a "dishonest teenager" control mechanism, I am not getting into > trying to outsmart a > teenager here. ?It is merely meant to allow me to see how much time my son > is playing. ?I removed > all of the shortcuts from the desktop etc so that the way he opens his games > is through this > database. ?I actually copied one of the shortcuts into the startup directory > for one game that > required a shortcut. > > I then informed him that there are consequences if he is playing without > going through the timer. > > The timer is an Access form which has a game combo and a child id combo. ?In > my case only my son > uses it at the moment, though I will probably have my daughter use it as > well. ?It is FE/BE. > > The form consists of: > > 1) A game combo > 2) A child combo > 3) A start time > 4) A stop time > 5) The minutes they are allowed to play, fixed ATM though it could be > included in the child record. > > Status controls are: > > 1) Last Play elapsed time > 2) Last play time stopped > > At the very bottom of the form is an elapsed time. > > So the child selects the game they will play. ?The game has the stuff > required to actually open the > game, usually the filespec for the game (path and file name) but it can also > use a shortcut file if > the game requires starting directory etc. > > Selecting the game starts a timer which shows up on the "Elapsed time" at > the bottom, and records > the start time. ?There is a button which enters the stopped time and moves > to a new record. ?Once a > record is "stopped" it can no longer be edited. ?No records can be deleted > (through the form). > > When the time is up, my son often does the "I need to do this one small > thing before I quit" > routine. ?In order to allow that but still encourage him to get off, i built > in an annoyance timer. > ?The database does not (yet) shut down the game automatically (though I > might go there) but it does > beep a series of beeps when time is up, and then starts beeping at him every > N seconds. ?N decreases > over time until it is beeping every second. ?This is truly annoying (to > anyone in the room) and > encourages him to finish up and get off. ?It also alerts any adult near by > that "time is up". ?In > fact it is so annoying that he was turning down the speaker when it beeped. > I had to inform him > that there would be consequences for that. ?;) > > The system is working fine so far. ?I am finally getting his times logged > regularly and getting him > off when his time is up. ?We shall have to see how it works long term. > Adolescents can be sneaky. > Total loss of gaming privileges for breaking the rules is the consequence of > being sneaky. > > Possible enhancements: > > 1) Times of day allowed to play > 2) Total time allowed to play > 3) Play time allowed per child > etc. > > -- > John W. Colby > www.ColbyConsulting.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 vbacreations at gmail.com Sun Jul 17 21:46:16 2011 From: vbacreations at gmail.com (William Benson (VBACreations.Com)) Date: Sun, 17 Jul 2011 22:46:16 -0400 Subject: [AccessD] where is OpenOffice data store In-Reply-To: <4E21FE0F.3090606@colbyconsulting.com> References: <4E21FE0F.3090606@colbyconsulting.com> Message-ID: <000101cc44f4$ddf6f4c0$99e4de40$@gmail.com> Since you didn't get to Google at the time, I did some searching. Here were some references I found, but no succinct answer: http://en.wikipedia.org/wiki/OpenOffice.org A database management program similar to Microsoft Access. Base allows the creation and manipulation of databases, and the building of forms and reports to provide easy access to data for end-users. As with MS Access, Base can function as a front-end to a number of different database systems, including Access databases (JET), ODBC data sources and MySQL/PostgreSQL. Base became part of the suite starting with version 2.0. Native to the OpenOffice.org suite is an adaptation of HSQL. While Base can be a front-end for any of the databases listed, there is no need to install any of them. Raw SQL code can be entered by those who prefer it, or graphical user interfaces can be used. Here are two really good links in terms of understanding and usability of ooBase http://sheepdogguides.com/fdb/fdb1main.htm http://www.pitonyak.org/database/AndrewBase.odt Can we get back to MS Access now? ;-) -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Saturday, July 16, 2011 5:10 PM To: Access Developers discussion and problem solving Subject: [AccessD] where is OpenOffice data store I installed OpenOffice on a computer I am giving away. I just happened to create a table in their database app and the data store looks rather robust, perhaps mysql? I have not managed to Google what data store open office uses. Does anyone know? -- John W. Colby www.ColbyConsulting.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From vbacreations at gmail.com Sun Jul 17 22:18:09 2011 From: vbacreations at gmail.com (William Benson (VBACreations.Com)) Date: Sun, 17 Jul 2011 23:18:09 -0400 Subject: [AccessD] Child computer Game timer In-Reply-To: References: <4E23286A.8030301@colbyconsulting.com> Message-ID: <000201cc44f9$527fbb70$f77f3250$@gmail.com> OMG that is soooo funny..... I needed a laugh Doug. -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Doug Steele Sent: Sunday, July 17, 2011 10:31 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Child computer Game timer John's doing it right, in my opinion. If Robbie wants more time, he's going to be forced to learn to hack John's program. Then, before he knows it, no more computer games, just huge SQL databases to maintain while John enjoys his retirement... Doug On Sun, Jul 17, 2011 at 6:09 PM, Jim Dettman wrote: > > ?Check your router too...a lot of routers know have bandwidth monitoring, > parental controls, and the ability to filter (by Mac address) based on a > schedule. > > ?I've got mine set to cut out all internet access from 2:00 - 6:00 am. > > Jim. > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Jim Lawrence > Sent: Sunday, July 17, 2011 03:24 PM > To: 'Access Developers discussion and problem solving' > Subject: Re: [AccessD] Child computer Game timer > > Hi John: > > You could just get something like the KidLogger. > > http://kidlogger.net/download.html > > Jim > > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby > Sent: Sunday, July 17, 2011 11:23 AM > To: Access Developers discussion and problem solving > Subject: [AccessD] Child computer Game timer > > I have designed a game timer for my son which I am making available to list > members if they want it. > > This timer is designed for children who are old enough to play > "unsupervised" and I want them to > have a set time that they can play per session. ?I want to record when they > start and stop and have > a display of how long they have been playing. ?I used to have Robbie "write > it down" and set a timer > on the stove. ?Both of which he "forgot" more often than not. > > This is not a "dishonest teenager" control mechanism, I am not getting into > trying to outsmart a > teenager here. ?It is merely meant to allow me to see how much time my son > is playing. ?I removed > all of the shortcuts from the desktop etc so that the way he opens his games > is through this > database. ?I actually copied one of the shortcuts into the startup directory > for one game that > required a shortcut. > > I then informed him that there are consequences if he is playing without > going through the timer. > > The timer is an Access form which has a game combo and a child id combo. ?In > my case only my son > uses it at the moment, though I will probably have my daughter use it as > well. ?It is FE/BE. > > The form consists of: > > 1) A game combo > 2) A child combo > 3) A start time > 4) A stop time > 5) The minutes they are allowed to play, fixed ATM though it could be > included in the child record. > > Status controls are: > > 1) Last Play elapsed time > 2) Last play time stopped > > At the very bottom of the form is an elapsed time. > > So the child selects the game they will play. ?The game has the stuff > required to actually open the > game, usually the filespec for the game (path and file name) but it can also > use a shortcut file if > the game requires starting directory etc. > > Selecting the game starts a timer which shows up on the "Elapsed time" at > the bottom, and records > the start time. ?There is a button which enters the stopped time and moves > to a new record. ?Once a > record is "stopped" it can no longer be edited. ?No records can be deleted > (through the form). > > When the time is up, my son often does the "I need to do this one small > thing before I quit" > routine. ?In order to allow that but still encourage him to get off, i built > in an annoyance timer. > ?The database does not (yet) shut down the game automatically (though I > might go there) but it does > beep a series of beeps when time is up, and then starts beeping at him every > N seconds. ?N decreases > over time until it is beeping every second. ?This is truly annoying (to > anyone in the room) and > encourages him to finish up and get off. ?It also alerts any adult near by > that "time is up". ?In > fact it is so annoying that he was turning down the speaker when it beeped. > I had to inform him > that there would be consequences for that. ?;) > > The system is working fine so far. ?I am finally getting his times logged > regularly and getting him > off when his time is up. ?We shall have to see how it works long term. > Adolescents can be sneaky. > Total loss of gaming privileges for breaking the rules is the consequence of > being sneaky. > > Possible enhancements: > > 1) Times of day allowed to play > 2) Total time allowed to play > 3) Play time allowed per child > etc. > > -- > John W. Colby > www.ColbyConsulting.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 jwcolby at colbyconsulting.com Mon Jul 18 05:52:37 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Mon, 18 Jul 2011 06:52:37 -0400 Subject: [AccessD] Child computer Game timer In-Reply-To: References: <4E23286A.8030301@colbyconsulting.com> Message-ID: <4E241075.3040204@colbyconsulting.com> I already have him learning Access! He loves learning what dad does. John W. Colby www.ColbyConsulting.com On 7/17/2011 10:31 PM, Doug Steele wrote: > John's doing it right, in my opinion. If Robbie wants more time, he's > going to be forced to learn to hack John's program. Then, before he > knows it, no more computer games, just huge SQL databases to maintain > while John enjoys his retirement... > > Doug > > On Sun, Jul 17, 2011 at 6:09 PM, Jim Dettman wrote: >> >> Check your router too...a lot of routers know have bandwidth monitoring, >> parental controls, and the ability to filter (by Mac address) based on a >> schedule. >> >> I've got mine set to cut out all internet access from 2:00 - 6:00 am. >> >> Jim. >> >> -----Original Message----- >> From: accessd-bounces at databaseadvisors.com >> [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Jim Lawrence >> Sent: Sunday, July 17, 2011 03:24 PM >> To: 'Access Developers discussion and problem solving' >> Subject: Re: [AccessD] Child computer Game timer >> >> Hi John: >> >> You could just get something like the KidLogger. >> >> http://kidlogger.net/download.html >> >> Jim >> >> >> -----Original Message----- >> From: accessd-bounces at databaseadvisors.com >> [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby >> Sent: Sunday, July 17, 2011 11:23 AM >> To: Access Developers discussion and problem solving >> Subject: [AccessD] Child computer Game timer >> >> I have designed a game timer for my son which I am making available to list >> members if they want it. >> >> This timer is designed for children who are old enough to play >> "unsupervised" and I want them to >> have a set time that they can play per session. I want to record when they >> start and stop and have >> a display of how long they have been playing. I used to have Robbie "write >> it down" and set a timer >> on the stove. Both of which he "forgot" more often than not. >> >> This is not a "dishonest teenager" control mechanism, I am not getting into >> trying to outsmart a >> teenager here. It is merely meant to allow me to see how much time my son >> is playing. I removed >> all of the shortcuts from the desktop etc so that the way he opens his games >> is through this >> database. I actually copied one of the shortcuts into the startup directory >> for one game that >> required a shortcut. >> >> I then informed him that there are consequences if he is playing without >> going through the timer. >> >> The timer is an Access form which has a game combo and a child id combo. In >> my case only my son >> uses it at the moment, though I will probably have my daughter use it as >> well. It is FE/BE. >> >> The form consists of: >> >> 1) A game combo >> 2) A child combo >> 3) A start time >> 4) A stop time >> 5) The minutes they are allowed to play, fixed ATM though it could be >> included in the child record. >> >> Status controls are: >> >> 1) Last Play elapsed time >> 2) Last play time stopped >> >> At the very bottom of the form is an elapsed time. >> >> So the child selects the game they will play. The game has the stuff >> required to actually open the >> game, usually the filespec for the game (path and file name) but it can also >> use a shortcut file if >> the game requires starting directory etc. >> >> Selecting the game starts a timer which shows up on the "Elapsed time" at >> the bottom, and records >> the start time. There is a button which enters the stopped time and moves >> to a new record. Once a >> record is "stopped" it can no longer be edited. No records can be deleted >> (through the form). >> >> When the time is up, my son often does the "I need to do this one small >> thing before I quit" >> routine. In order to allow that but still encourage him to get off, i built >> in an annoyance timer. >> The database does not (yet) shut down the game automatically (though I >> might go there) but it does >> beep a series of beeps when time is up, and then starts beeping at him every >> N seconds. N decreases >> over time until it is beeping every second. This is truly annoying (to >> anyone in the room) and >> encourages him to finish up and get off. It also alerts any adult near by >> that "time is up". In >> fact it is so annoying that he was turning down the speaker when it beeped. >> I had to inform him >> that there would be consequences for that. ;) >> >> The system is working fine so far. I am finally getting his times logged >> regularly and getting him >> off when his time is up. We shall have to see how it works long term. >> Adolescents can be sneaky. >> Total loss of gaming privileges for breaking the rules is the consequence of >> being sneaky. >> >> Possible enhancements: >> >> 1) Times of day allowed to play >> 2) Total time allowed to play >> 3) Play time allowed per child >> etc. >> >> -- >> John W. Colby >> www.ColbyConsulting.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 DWUTKA at Marlow.com Mon Jul 18 09:12:29 2011 From: DWUTKA at Marlow.com (Drew Wutka) Date: Mon, 18 Jul 2011 09:12:29 -0500 Subject: [AccessD] Child computer Game timer In-Reply-To: <4E23286A.8030301@colbyconsulting.com> References: <4E23286A.8030301@colbyconsulting.com> Message-ID: Why not just detect the game he is playing based upon the window's that are running? Each game should have a window that should be easy to identify. Drew -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Sunday, July 17, 2011 1:23 PM To: Access Developers discussion and problem solving Subject: [AccessD] Child computer Game timer I have designed a game timer for my son which I am making available to list members if they want it. This timer is designed for children who are old enough to play "unsupervised" and I want them to have a set time that they can play per session. I want to record when they start and stop and have a display of how long they have been playing. I used to have Robbie "write it down" and set a timer on the stove. Both of which he "forgot" more often than not. This is not a "dishonest teenager" control mechanism, I am not getting into trying to outsmart a teenager here. It is merely meant to allow me to see how much time my son is playing. I removed all of the shortcuts from the desktop etc so that the way he opens his games is through this database. I actually copied one of the shortcuts into the startup directory for one game that required a shortcut. I then informed him that there are consequences if he is playing without going through the timer. The timer is an Access form which has a game combo and a child id combo. In my case only my son uses it at the moment, though I will probably have my daughter use it as well. It is FE/BE. The form consists of: 1) A game combo 2) A child combo 3) A start time 4) A stop time 5) The minutes they are allowed to play, fixed ATM though it could be included in the child record. Status controls are: 1) Last Play elapsed time 2) Last play time stopped At the very bottom of the form is an elapsed time. So the child selects the game they will play. The game has the stuff required to actually open the game, usually the filespec for the game (path and file name) but it can also use a shortcut file if the game requires starting directory etc. Selecting the game starts a timer which shows up on the "Elapsed time" at the bottom, and records the start time. There is a button which enters the stopped time and moves to a new record. Once a record is "stopped" it can no longer be edited. No records can be deleted (through the form). When the time is up, my son often does the "I need to do this one small thing before I quit" routine. In order to allow that but still encourage him to get off, i built in an annoyance timer. The database does not (yet) shut down the game automatically (though I might go there) but it does beep a series of beeps when time is up, and then starts beeping at him every N seconds. N decreases over time until it is beeping every second. This is truly annoying (to anyone in the room) and encourages him to finish up and get off. It also alerts any adult near by that "time is up". In fact it is so annoying that he was turning down the speaker when it beeped. I had to inform him that there would be consequences for that. ;) The system is working fine so far. I am finally getting his times logged regularly and getting him off when his time is up. We shall have to see how it works long term. Adolescents can be sneaky. Total loss of gaming privileges for breaking the rules is the consequence of being sneaky. Possible enhancements: 1) Times of day allowed to play 2) Total time allowed to play 3) Play time allowed per child etc. -- John W. Colby www.ColbyConsulting.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com The information contained in this transmission is intended only for the person or entity to which it is addressed and may contain II-VI Proprietary and/or II-VI Business Sensitive material. If you are not the intended recipient, please contact the sender immediately and destroy the material in its entirety, whether electronic or hard copy. You are notified that any review, retransmission, copying, disclosure, dissemination, or other use of, or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. From rockysmolin at bchacc.com Mon Jul 18 10:57:23 2011 From: rockysmolin at bchacc.com (Rocky Smolin) Date: Mon, 18 Jul 2011 08:57:23 -0700 Subject: [AccessD] Referring to a function in a subform Message-ID: <49EBA6DA69794EF88740050C7D84F12A@HAL9007> Dear List: Gets me every time. I want to call a private function in a subform on my main form. Subform name is subfrmAccount, main form is frmEditAccounts, function name is MakeShippingLabelEditAccounts. I've tried a lot of variations like: Me.fldShippingLabel = Forms!frmEditAccounts.subfrmAccount.Form.MakeShippingLabelEditAccounts with ! and . in various places and nothing works. The function works fine when I use it in the subform. Help! MTIA Rocky Smolin Beach Access Software 858-259-4334 www.bchacc.com www.e-z-mrp.com From bill_patten at embarqmail.com Mon Jul 18 11:03:48 2011 From: bill_patten at embarqmail.com (Bill Patten) Date: Mon, 18 Jul 2011 09:03:48 -0700 Subject: [AccessD] Referring to a function in a subform In-Reply-To: <49EBA6DA69794EF88740050C7D84F12A@HAL9007> References: <49EBA6DA69794EF88740050C7D84F12A@HAL9007> Message-ID: Hi Rocky, I think I'd just make it public. Bill -------------------------------------------------- From: "Rocky Smolin" Sent: Monday, July 18, 2011 8:57 AM To: Subject: [AccessD] Referring to a function in a subform Dear List: Gets me every time. I want to call a private function in a subform on my main form. Subform name is subfrmAccount, main form is frmEditAccounts, function name is MakeShippingLabelEditAccounts. I've tried a lot of variations like: Me.fldShippingLabel = Forms!frmEditAccounts.subfrmAccount.Form.MakeShippingLabelEditAccounts with ! and . in various places and nothing works. The function works fine when I use it in the subform. Help! MTIA Rocky Smolin Beach Access Software 858-259-4334 www.bchacc.com www.e-z-mrp.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From charlotte.foust at gmail.com Mon Jul 18 11:13:28 2011 From: charlotte.foust at gmail.com (Charlotte Foust) Date: Mon, 18 Jul 2011 09:13:28 -0700 Subject: [AccessD] Referring to a function in a subform In-Reply-To: <49EBA6DA69794EF88740050C7D84F12A@HAL9007> References: <49EBA6DA69794EF88740050C7D84F12A@HAL9007> Message-ID: Bill has it right. If the scope of the routine isn't public, it is visible as a method only within the subform itself. Charlotte Foust On Mon, Jul 18, 2011 at 8:57 AM, Rocky Smolin wrote: > Dear List: > > Gets me every time. > > I want to call a private function in a subform on my main form. Subform > name is subfrmAccount, main form is frmEditAccounts, function name is > MakeShippingLabelEditAccounts. > > I've tried a lot of variations like: > > Me.fldShippingLabel = > Forms!frmEditAccounts.subfrmAccount.Form.MakeShippingLabelEditAccounts > > with ! and . in various places and nothing works. > > The function works fine when I use it in the subform. > > Help! > > MTIA > > Rocky Smolin > Beach Access Software > 858-259-4334 > www.bchacc.com > > > > > www.e-z-mrp.com > > > > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > > > Website: http://www.databaseadvisors.com > > > From rockysmolin at bchacc.com Mon Jul 18 11:16:07 2011 From: rockysmolin at bchacc.com (Rocky Smolin) Date: Mon, 18 Jul 2011 09:16:07 -0700 Subject: [AccessD] Referring to a function in a subform In-Reply-To: References: <49EBA6DA69794EF88740050C7D84F12A@HAL9007> Message-ID: <7D937294F929402698129D0C7BE01E58@HAL9007> Tried public but no soap. Moving it to a module now. R -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Charlotte Foust Sent: Monday, July 18, 2011 9:13 AM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Referring to a function in a subform Bill has it right. If the scope of the routine isn't public, it is visible as a method only within the subform itself. Charlotte Foust On Mon, Jul 18, 2011 at 8:57 AM, Rocky Smolin wrote: > Dear List: > > Gets me every time. > > I want to call a private function in a subform on my main form. > Subform name is subfrmAccount, main form is frmEditAccounts, function > name is MakeShippingLabelEditAccounts. > > I've tried a lot of variations like: > > Me.fldShippingLabel = > Forms!frmEditAccounts.subfrmAccount.Form.MakeShippingLabelEditAccounts > > with ! and . in various places and nothing works. > > The function works fine when I use it in the subform. > > Help! > > MTIA > > Rocky Smolin > Beach Access Software > 858-259-4334 > www.bchacc.com > > > > > www.e-z-mrp.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 dhb at flsi.com Mon Jul 18 13:06:20 2011 From: dhb at flsi.com (Darrell Burns) Date: Mon, 18 Jul 2011 11:06:20 -0700 Subject: [AccessD] Referring to a function in a subform In-Reply-To: <7D937294F929402698129D0C7BE01E58@HAL9007> References: <49EBA6DA69794EF88740050C7D84F12A@HAL9007> <7D937294F929402698129D0C7BE01E58@HAL9007> Message-ID: <00b101cc4575$6805c300$38114900$@flsi.com> Hey Rocky. Here's how I do it... In MasterForm: Set fSub = Me.Form(SubformName) fSub.Form.GoToID Nz(MoveToID, 0) In SubForm: Public Sub GoToID(Optional optMoveToID) HTH, DB -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Rocky Smolin Sent: Monday, July 18, 2011 9:16 AM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Referring to a function in a subform Tried public but no soap. Moving it to a module now. R -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Charlotte Foust Sent: Monday, July 18, 2011 9:13 AM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Referring to a function in a subform Bill has it right. If the scope of the routine isn't public, it is visible as a method only within the subform itself. Charlotte Foust On Mon, Jul 18, 2011 at 8:57 AM, Rocky Smolin wrote: > Dear List: > > Gets me every time. > > I want to call a private function in a subform on my main form. > Subform name is subfrmAccount, main form is frmEditAccounts, function > name is MakeShippingLabelEditAccounts. > > I've tried a lot of variations like: > > Me.fldShippingLabel = > Forms!frmEditAccounts.subfrmAccount.Form.MakeShippingLabelEditAccounts > > with ! and . in various places and nothing works. > > The function works fine when I use it in the subform. > > Help! > > MTIA > > Rocky Smolin > Beach Access Software > 858-259-4334 > www.bchacc.com > > > > > www.e-z-mrp.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 dhb at flsi.com Mon Jul 18 13:24:48 2011 From: dhb at flsi.com (Darrell Burns) Date: Mon, 18 Jul 2011 11:24:48 -0700 Subject: [AccessD] Access2010 vs Access2007 Message-ID: <00b201cc4577$fa709a10$ef51ce30$@flsi.com> Hi folks. I bought a new dev machine with Win7 and Office2010 32-bit. It installed the Access 14.0 Object Library. The "default file format" in Settings is Access 2007. My app runs on my client's Win2008 R2 Server and all the workstations run Win7. However, their Access references point to the Access 12.0 Object Library. As a result, when I upload my app to their server and open it up I get a warning message that "some of the features may be incompatible", even though I haven't used any of those features. Do I need to scale back to 12.0 on my side or upgrade the client to 14.0? And how would I do that? Thanx, Darrell From vbacreations at gmail.com Mon Jul 18 14:16:26 2011 From: vbacreations at gmail.com (William Benson) Date: Mon, 18 Jul 2011 15:16:26 -0400 Subject: [AccessD] Access2010 vs Access2007 In-Reply-To: <00b201cc4577$fa709a10$ef51ce30$@flsi.com> References: <00b201cc4577$fa709a10$ef51ce30$@flsi.com> Message-ID: I wouldn't worry about it. After all how ya gonna learn the differences if you don't let them bite you? Just kidding, hope you get a less smart-arse answer soon. On Jul 18, 2011 2:26 PM, "Darrell Burns" wrote: > Hi folks. > I bought a new dev machine with Win7 and Office2010 32-bit. It installed the > Access 14.0 Object Library. The "default file format" in Settings is Access > 2007. > My app runs on my client's Win2008 R2 Server and all the workstations run > Win7. However, their Access references point to the Access 12.0 Object > Library. As a result, when I upload my app to their server and open it up I > get a warning message that "some of the features may be incompatible", even > though I haven't used any of those features. > Do I need to scale back to 12.0 on my side or upgrade the client to 14.0? > And how would I do that? > Thanx, > Darrell > > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com From rockysmolin at bchacc.com Mon Jul 18 15:16:14 2011 From: rockysmolin at bchacc.com (Rocky Smolin) Date: Mon, 18 Jul 2011 13:16:14 -0700 Subject: [AccessD] Referring to a function in a subform In-Reply-To: <00b101cc4575$6805c300$38114900$@flsi.com> References: <49EBA6DA69794EF88740050C7D84F12A@HAL9007> <7D937294F929402698129D0C7BE01E58@HAL9007> <00b101cc4575$6805c300$38114900$@flsi.com> Message-ID: <5F0603DB08D74800B92076ADC69B82A1@HAL9007> That's the way it SHOULD work. But it didn't for me. So I moved it to a public function and it works now. Rocky -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Darrell Burns Sent: Monday, July 18, 2011 11:06 AM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Referring to a function in a subform Hey Rocky. Here's how I do it... In MasterForm: Set fSub = Me.Form(SubformName) fSub.Form.GoToID Nz(MoveToID, 0) In SubForm: Public Sub GoToID(Optional optMoveToID) HTH, DB -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Rocky Smolin Sent: Monday, July 18, 2011 9:16 AM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Referring to a function in a subform Tried public but no soap. Moving it to a module now. R -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Charlotte Foust Sent: Monday, July 18, 2011 9:13 AM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Referring to a function in a subform Bill has it right. If the scope of the routine isn't public, it is visible as a method only within the subform itself. Charlotte Foust On Mon, Jul 18, 2011 at 8:57 AM, Rocky Smolin wrote: > Dear List: > > Gets me every time. > > I want to call a private function in a subform on my main form. > Subform name is subfrmAccount, main form is frmEditAccounts, function > name is MakeShippingLabelEditAccounts. > > I've tried a lot of variations like: > > Me.fldShippingLabel = > Forms!frmEditAccounts.subfrmAccount.Form.MakeShippingLabelEditAccounts > > with ! and . in various places and nothing works. > > The function works fine when I use it in the subform. > > Help! > > MTIA > > Rocky Smolin > Beach Access Software > 858-259-4334 > www.bchacc.com > > > > > www.e-z-mrp.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 dhb at flsi.com Mon Jul 18 16:08:23 2011 From: dhb at flsi.com (Darrell Burns) Date: Mon, 18 Jul 2011 14:08:23 -0700 Subject: [AccessD] Access2010 vs Access2007 In-Reply-To: References: <00b201cc4577$fa709a10$ef51ce30$@flsi.com> Message-ID: <00c201cc458e$d5146d20$7f3d4760$@flsi.com> I have to worry about it...I don't want the users seeing warning messages or getting "bitten". -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of William Benson Sent: Monday, July 18, 2011 12:16 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Access2010 vs Access2007 I wouldn't worry about it. After all how ya gonna learn the differences if you don't let them bite you? Just kidding, hope you get a less smart-arse answer soon. On Jul 18, 2011 2:26 PM, "Darrell Burns" wrote: > Hi folks. > I bought a new dev machine with Win7 and Office2010 32-bit. It > installed the > Access 14.0 Object Library. The "default file format" in Settings is Access > 2007. > My app runs on my client's Win2008 R2 Server and all the workstations > run Win7. However, their Access references point to the Access 12.0 > Object Library. As a result, when I upload my app to their server and > open it up I > get a warning message that "some of the features may be incompatible", even > though I haven't used any of those features. > Do I need to scale back to 12.0 on my side or upgrade the client to 14.0? > And how would I do that? > Thanx, > Darrell > > > > -- > 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 ssharkins at gmail.com Mon Jul 18 19:13:16 2011 From: ssharkins at gmail.com (Susan Harkins) Date: Mon, 18 Jul 2011 20:13:16 -0400 Subject: [AccessD] update wouldn't run Message-ID: I ran into a really weird, and a bit humiliating situation this afternoon. I volunteer at our county fair and someone asked me to help them update some entry numbers in an Access table. It was a simple update query -- make all 20's 21. It was a text field. I created the query, ran it... it wouldn't run. It did nothing. The text field was part of a natural key primary key, but she was able to change the values manually. That query should've run and changed all those values in a second -- fortunately, there were only a few dozen, but I was still... deflated. :( Any ideas what might have been the problem? Susan H. From df.waters at comcast.net Mon Jul 18 20:08:28 2011 From: df.waters at comcast.net (Dan Waters) Date: Mon, 18 Jul 2011 20:08:28 -0500 Subject: [AccessD] update wouldn't run In-Reply-To: References: Message-ID: <004c01cc45b0$5fa68150$1ef383f0$@comcast.net> Hi Susan, Your query may have tried to update a text 20 to a numeric 21, which would have been the wrong type and should not have worked. Just a guess ... Dan PS - Don't ever tell anyone you're an expert. As soon as I said it - I wasn't! :-( -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Susan Harkins Sent: Monday, July 18, 2011 7:13 PM To: Access Developers discussion and problem solving Subject: [AccessD] update wouldn't run I ran into a really weird, and a bit humiliating situation this afternoon. I volunteer at our county fair and someone asked me to help them update some entry numbers in an Access table. It was a simple update query -- make all 20's 21. It was a text field. I created the query, ran it... it wouldn't run. It did nothing. The text field was part of a natural key primary key, but she was able to change the values manually. That query should've run and changed all those values in a second -- fortunately, there were only a few dozen, but I was still... deflated. :( Any ideas what might have been the problem? Susan H. -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From jwcolby at colbyconsulting.com Mon Jul 18 20:41:48 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Mon, 18 Jul 2011 21:41:48 -0400 Subject: [AccessD] Child computer Game timer In-Reply-To: References: <4E23286A.8030301@colbyconsulting.com> Message-ID: <4E24E0DC.9080209@colbyconsulting.com> Because I won't know what games your child is playing. John W. Colby www.ColbyConsulting.com On 7/18/2011 10:12 AM, Drew Wutka wrote: > Why not just detect the game he is playing based upon the window's that > are running? Each game should have a window that should be easy to > identify. > > Drew > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby > Sent: Sunday, July 17, 2011 1:23 PM > To: Access Developers discussion and problem solving > Subject: [AccessD] Child computer Game timer > > I have designed a game timer for my son which I am making available to > list members if they want it. > > This timer is designed for children who are old enough to play > "unsupervised" and I want them to > have a set time that they can play per session. I want to record when > they start and stop and have > a display of how long they have been playing. I used to have Robbie > "write it down" and set a timer > on the stove. Both of which he "forgot" more often than not. > > This is not a "dishonest teenager" control mechanism, I am not getting > into trying to outsmart a > teenager here. It is merely meant to allow me to see how much time my > son is playing. I removed > all of the shortcuts from the desktop etc so that the way he opens his > games is through this > database. I actually copied one of the shortcuts into the startup > directory for one game that > required a shortcut. > > I then informed him that there are consequences if he is playing without > going through the timer. > > The timer is an Access form which has a game combo and a child id combo. > In my case only my son > uses it at the moment, though I will probably have my daughter use it as > well. It is FE/BE. > > The form consists of: > > 1) A game combo > 2) A child combo > 3) A start time > 4) A stop time > 5) The minutes they are allowed to play, fixed ATM though it could be > included in the child record. > > Status controls are: > > 1) Last Play elapsed time > 2) Last play time stopped > > At the very bottom of the form is an elapsed time. > > So the child selects the game they will play. The game has the stuff > required to actually open the > game, usually the filespec for the game (path and file name) but it can > also use a shortcut file if > the game requires starting directory etc. > > Selecting the game starts a timer which shows up on the "Elapsed time" > at the bottom, and records > the start time. There is a button which enters the stopped time and > moves to a new record. Once a > record is "stopped" it can no longer be edited. No records can be > deleted (through the form). > > When the time is up, my son often does the "I need to do this one small > thing before I quit" > routine. In order to allow that but still encourage him to get off, i > built in an annoyance timer. > The database does not (yet) shut down the game automatically (though I > might go there) but it does > beep a series of beeps when time is up, and then starts beeping at him > every N seconds. N decreases > over time until it is beeping every second. This is truly annoying (to > anyone in the room) and > encourages him to finish up and get off. It also alerts any adult near > by that "time is up". In > fact it is so annoying that he was turning down the speaker when it > beeped. I had to inform him > that there would be consequences for that. ;) > > The system is working fine so far. I am finally getting his times > logged regularly and getting him > off when his time is up. We shall have to see how it works long term. > Adolescents can be sneaky. > Total loss of gaming privileges for breaking the rules is the > consequence of being sneaky. > > Possible enhancements: > > 1) Times of day allowed to play > 2) Total time allowed to play > 3) Play time allowed per child > etc. > From vbacreations at gmail.com Mon Jul 18 21:30:52 2011 From: vbacreations at gmail.com (William Benson (VBACreations.Com)) Date: Mon, 18 Jul 2011 22:30:52 -0400 Subject: [AccessD] Access2010 vs Access2007 In-Reply-To: <00c201cc458e$d5146d20$7f3d4760$@flsi.com> References: <00b201cc4577$fa709a10$ef51ce30$@flsi.com> <00c201cc458e$d5146d20$7f3d4760$@flsi.com> Message-ID: <004f01cc45bb$e2972960$a7c57c20$@gmail.com> There might not be so many folk who have bothered to move to Ac2007 formatted databases, let alone to Ac2010 platform. While others are still quiet on the topic, I will put forth my half-penny advice. I did it to have strange bugginess stop showing up when my database got too big and I didn't know it -- only to find that I still seemed to have a 2 GB limitation even after it became an accdb file. Goodness knows why, and it is quite frustrating. One thing I would recommend but it is because I am an Excel programmer and may not know the difference in how Access works versus Excel... is to call every function somehow, in debugging mode, at least once - just in case there are things which the compiler only checks at runtime, and only when the code in that particular routine executes. This can be a real chore. Things that lie on the other side of IF conditions which almost never happen are especially burdensome to check, and error handling for very off-chance exceptions. But if you are needing to be that sure about things, you have to force every condition so it gets tested at least once (and even then you will only have feedback on the conditions you thought to check). There are some controls which if you have used them in an Ac2007 database you might not find them there any more, like Calendar control. Data Access pages were minimally supported in 2007 (could not create but could still run) and in 2010 will not function. Anyway, I would just be parroting what I read here, were I to go on. http://technet.microsoft.com/en-us/library/cc179181.aspx -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Darrell Burns Sent: Monday, July 18, 2011 5:08 PM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Access2010 vs Access2007 I have to worry about it...I don't want the users seeing warning messages or getting "bitten". -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of William Benson Sent: Monday, July 18, 2011 12:16 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Access2010 vs Access2007 I wouldn't worry about it. After all how ya gonna learn the differences if you don't let them bite you? Just kidding, hope you get a less smart-arse answer soon. On Jul 18, 2011 2:26 PM, "Darrell Burns" wrote: > Hi folks. > I bought a new dev machine with Win7 and Office2010 32-bit. It > installed the > Access 14.0 Object Library. The "default file format" in Settings is Access > 2007. > My app runs on my client's Win2008 R2 Server and all the workstations > run Win7. However, their Access references point to the Access 12.0 > Object Library. As a result, when I upload my app to their server and > open it up I > get a warning message that "some of the features may be incompatible", even > though I haven't used any of those features. > Do I need to scale back to 12.0 on my side or upgrade the client to 14.0? > And how would I do that? > Thanx, > Darrell > > > > -- > 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 ssharkins at gmail.com Tue Jul 19 05:46:36 2011 From: ssharkins at gmail.com (Susan Harkins) Date: Tue, 19 Jul 2011 06:46:36 -0400 Subject: [AccessD] update wouldn't run References: <004c01cc45b0$5fa68150$1ef383f0$@comcast.net> Message-ID: No, they were both text -- I checked that and Access automatically knew that the field was text and took care of it for me. I never call myself an expert. :) Susan H. > > Your query may have tried to update a text 20 to a numeric 21, which would > have been the wrong type and should not have worked. > > Just a guess ... > > Dan > > PS - Don't ever tell anyone you're an expert. As soon as I said it - I > wasn't! :-( From charlotte.foust at gmail.com Tue Jul 19 10:00:29 2011 From: charlotte.foust at gmail.com (Charlotte Foust) Date: Tue, 19 Jul 2011 08:00:29 -0700 Subject: [AccessD] update wouldn't run In-Reply-To: References: <004c01cc45b0$5fa68150$1ef383f0$@comcast.net> Message-ID: I'll never forget the time a developer who worked for me decided to update all of a certain numeric string to a text number in an address field. The query ran and worked...sort of. He had forgotten to provide for spaces around numeric string. I had to go through thousands of records and find every instance of "two" in a longer number and replace it with "2"! Charlotte Foust On Tue, Jul 19, 2011 at 3:46 AM, Susan Harkins wrote: > No, they were both text -- I checked that and Access automatically knew > that the field was text and took care of it for me. I never call myself an > expert. :) > > Susan H. > >> >> Your query may have tried to update a text 20 to a numeric 21, which would >> have been the wrong type and should not have worked. >> >> Just a guess ... >> >> Dan >> >> PS - Don't ever tell anyone you're an expert. As soon as I said it - I >> wasn't! :-( >> > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/**mailman/listinfo/accessd > > > Website: http://www.databaseadvisors.**com > > > From dnod at aol.com Tue Jul 19 10:13:19 2011 From: dnod at aol.com (Dean Davids) Date: Tue, 19 Jul 2011 11:13:19 -0400 Subject: [AccessD] update wouldn't run In-Reply-To: References: <004c01cc45b0$5fa68150$1ef383f0$@comcast.net> Message-ID: If you do that kind of thing in a QBE window, you can preview the results before committing the results. I do that always. Still, it is a bit scary when you push that action button and then look for unexpected issues. Dean S. Davids www.cmbscorp.com 954-868-4421 On Jul 19, 2011, at 11:00 AM, Charlotte Foust wrote: > I'll never forget the time a developer who worked for me decided to update > all of a certain numeric string to a text number in an address field. The > query ran and worked...sort of. He had forgotten to provide for spaces > around numeric string. I had to go through thousands of records and find > every instance of "two" in a longer number and replace it with "2"! > > Charlotte Foust > > On Tue, Jul 19, 2011 at 3:46 AM, Susan Harkins wrote: > >> No, they were both text -- I checked that and Access automatically knew >> that the field was text and took care of it for me. I never call myself an >> expert. :) >> >> Susan H. >> >>> >>> Your query may have tried to update a text 20 to a numeric 21, which would >>> have been the wrong type and should not have worked. >>> >>> Just a guess ... >>> >>> Dan >>> >>> PS - Don't ever tell anyone you're an expert. As soon as I said it - I >>> wasn't! :-( >>> >> >> -- >> 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 ssharkins at gmail.com Tue Jul 19 10:21:31 2011 From: ssharkins at gmail.com (Susan Harkins) Date: Tue, 19 Jul 2011 11:21:31 -0400 Subject: [AccessD] update wouldn't run References: <004c01cc45b0$5fa68150$1ef383f0$@comcast.net> Message-ID: <1B38E9446F80476EB23735A7899241DF@SusanHarkins> When I used Datasheet view to see the uncommitted results, I saw only the original values. Susan H. > If you do that kind of thing in a QBE window, you can preview the results > before committing the results. I do that always. Still, it is a bit scary > when you push that action button and then look for unexpected issues. > > > >> I'll never forget the time a developer who worked for me decided to >> update >> all of a certain numeric string to a text number in an address field. >> The >> query ran and worked...sort of. He had forgotten to provide for spaces >> around numeric string. I had to go through thousands of records and find >> every instance of "two" in a longer number and replace it with "2"! >> >> Charlotte Foust >> >> On Tue, Jul 19, 2011 at 3:46 AM, Susan Harkins >> wrote: >> >>> No, they were both text -- I checked that and Access automatically knew >>> that the field was text and took care of it for me. I never call myself >>> an >>> expert. :) >>> >>> Susan H. >>> >>>> >>>> Your query may have tried to update a text 20 to a numeric 21, which >>>> would >>>> have been the wrong type and should not have worked. >>>> >>>> Just a guess ... From garykjos at gmail.com Tue Jul 19 10:52:52 2011 From: garykjos at gmail.com (Gary Kjos) Date: Tue, 19 Jul 2011 10:52:52 -0500 Subject: [AccessD] update wouldn't run In-Reply-To: <1B38E9446F80476EB23735A7899241DF@SusanHarkins> References: <004c01cc45b0$5fa68150$1ef383f0$@comcast.net> <1B38E9446F80476EB23735A7899241DF@SusanHarkins> Message-ID: I wonder if you dropped the key and then ran it if it would work. then you could reset the key after. Multi-field keys might have different rules. Doing one record at a time in a table view might have different rules than a mass change in a query. Hope you made a copy of the db or at least the table before you touched anything though. Always want to have a way to return to the before state, especially when you are working with other peoples databases. Stuff happens. ;-) GK On Tue, Jul 19, 2011 at 10:21 AM, Susan Harkins wrote: > When I used Datasheet view to see the uncommitted results, I saw only the > original values. > > Susan H. > > >> If you do that kind of thing in a QBE window, you can preview the results >> before committing the results. I do that always. Still, it is a bit scary >> when you push that action button and then look for unexpected issues. >> >> >> >>> I'll never forget the time a developer who worked for me decided to >>> update >>> all of a certain numeric string to a text number in an address field. The >>> query ran and worked...sort of. ?He had forgotten to provide for spaces >>> around numeric string. I had to go through thousands of records and find >>> every instance of "two" in a longer number and replace it with "2"! >>> >>> Charlotte Foust >>> >>> On Tue, Jul 19, 2011 at 3:46 AM, Susan Harkins >>> wrote: >>> >>>> No, they were both text -- I checked that and Access automatically knew >>>> that the field was text and took care of it for me. I never call myself >>>> an >>>> expert. :) >>>> >>>> Susan H. >>>> >>>>> >>>>> Your query may have tried to update a text 20 to a numeric 21, which >>>>> would >>>>> have been the wrong type and should not have worked. >>>>> >>>>> Just a guess ... > > -- > 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 ssharkins at gmail.com Tue Jul 19 11:07:51 2011 From: ssharkins at gmail.com (Susan Harkins) Date: Tue, 19 Jul 2011 12:07:51 -0400 Subject: [AccessD] update wouldn't run References: <004c01cc45b0$5fa68150$1ef383f0$@comcast.net><1B38E9446F80476EB23735A7899241DF@SusanHarkins> Message-ID: Well... I thought about doing that, but couldn't think of a reason why it should've mattered, but you know, you might be right -- I might experiment later. Susan H. I wonder if you dropped the key and then ran it if it would work. then you could reset the key after. Multi-field keys might have different rules. Doing one record at a time in a table view might have different rules than a mass change in a query. Hope you made a copy of the db or at least the table before you touched anything though. Always want to have a way to return to the before state, especially when you are working with other peoples databases. Stuff happens. ;-) From gustav at cactus.dk Tue Jul 19 16:07:39 2011 From: gustav at cactus.dk (Gustav Brock) Date: Tue, 19 Jul 2011 23:07:39 +0200 Subject: [AccessD] DatePart "WW" (C#: Extension of DateTime) Message-ID: Hi all Now, would you believe this _old_ bug has survived A2010 and .Net 4 / Visual Studio 2010! So - as someone brought up a long-winded solution - I had to post my version of the extension method for DateTime of C# at CodeProject: http://www.codeproject.com/Tips/227801/DateTime-extension-method-to-give-Week-number /gustav >>> Gustav at cactus.dk 24-05-2007 16:44 >>> Hi Mark If you are looking for ISO week numbers, use these constants: bytWeek = DatePart("ww", datDate, vbMonday, vbFirstFourDays) However, DatePart has always - since Access 1.0 - been buggy for week number 53. Thus, for serious business use, use a function like this which I have posted many times: Public Function ISO_WeekNumber( _ ByVal datDate As Date) _ As Byte ' Calculates and returns week number for date datDate according to the ISO 8601:1988 standard. ' 1998-2000, Gustav Brock, Cactus Data ApS, CPH. ' May be freely used and distributed. Const cbytFirstWeekOfAnyYear As Byte = 1 Const cbytLastWeekOfLeapYear As Byte = 53 Dim bytWeek As Byte Dim bytISOThursday As Byte Dim datLastDayOfYear As Date bytWeek = DatePart("ww", datDate, vbMonday, vbFirstFourDays) If bytWeek = cbytLastWeekOfLeapYear Then bytISOThursday = WeekDay(vbThursday, vbMonday) datLastDayOfYear = DateSerial(Year(datDate), 12, 31) If WeekDay(datLastDayOfYear, vbMonday) >= bytISOThursday Then ' OK, week count of 53 is caused by leap year. Else ' Correct for Access97/2000 bug. bytWeek = cbytFirstWeekOfAnyYear End If End If ISO_WeekNumber = bytWeek End Function /gustav >>> markamatte at hotmail.com 24-05-2007 16:14 >>> Hello All, I'm using datepart to get the week. 12/31/2006 I am having an issue...No matter what optional constant I use or change...I get Day1 of week 53... and 1/1/2007 shows as Day2 of week 1. How do I get Day1 of Week1? Thanks, Mark A. Matte From vbacreations at gmail.com Tue Jul 19 19:11:51 2011 From: vbacreations at gmail.com (William Benson) Date: Tue, 19 Jul 2011 20:11:51 -0400 Subject: [AccessD] update wouldn't run In-Reply-To: References: <004c01cc45b0$5fa68150$1ef383f0$@comcast.net> <1B38E9446F80476EB23735A7899241DF@SusanHarkins> Message-ID: The first thing I would try would be to update to some strange 2-car string to rule out the key and numeric aspects. If that world you would have a partial info. On Jul 19, 2011 12:09 PM, "Susan Harkins" wrote: > Well... I thought about doing that, but couldn't think of a reason why it > should've mattered, but you know, you might be right -- I might experiment > later. > > Susan H. > > > I wonder if you dropped the key and then ran it if it would work. then > you could reset the key after. Multi-field keys might have different > rules. Doing one record at a time in a table view might have different > rules than a mass change in a query. > > Hope you made a copy of the db or at least the table before you > touched anything though. Always want to have a way to return to the > before state, especially when you are working with other peoples > databases. > > Stuff happens. ;-) > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com From fuller.artful at gmail.com Tue Jul 19 21:09:00 2011 From: fuller.artful at gmail.com (Arthur Fuller) Date: Tue, 19 Jul 2011 22:09:00 -0400 Subject: [AccessD] update wouldn't run In-Reply-To: References: <004c01cc45b0$5fa68150$1ef383f0$@comcast.net> <1B38E9446F80476EB23735A7899241DF@SusanHarkins> Message-ID: Do n this in two parts. According to my personal nomenclature, the queries would be _ On Tue, Jul 19, 2011 at 12:07 PM, Susan Harkins wrote: > Well... I thought about doing that, but couldn't think of a reason why it > should've mattered, but you know, you might be right -- I might experiment > later. > > Susan H. > > > > I wonder if you dropped the key and then ran it if it would work. then > you could reset the key after. Multi-field keys might have different > rules. Doing one record at a time in a table view might have different > rules than a mass change in a query. > > Hope you made a copy of the db or at least the table before you > touched anything though. Always want to have a way to return to the > before state, especially when you are working with other peoples > databases. > > Stuff happens. ;-) > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/**mailman/listinfo/accessd > Website: http://www.databaseadvisors.**com > From dhb at flsi.com Wed Jul 20 16:04:02 2011 From: dhb at flsi.com (Darrell Burns) Date: Wed, 20 Jul 2011 14:04:02 -0700 Subject: [AccessD] Access 2010 -- The database cannot be opened because the VBA project contained in it cannot be read. Message-ID: <024501cc4720$8d8aef40$a8a0cdc0$@flsi.com> I just lost all of my code! I'm running 32-bit Access 2010 in 64-bit Windows7 (Access 14.0 Object library and Office Access database engine 14.0)..the 32-bit version of Office2010. My application was developed in Access2007. My default file format says Access 2007 (there is no A2010 option). I was trying to import a form from one database into another when I got a "Microsoft Access has stopped working" message, then both databases were hosed. I tried opening a blank database and importing a form but I get "Name conflicts with existing module...." and it won't import. Of course, I have a live demo in 3 hours! Help! Is there any way of salvaging the code I had written behind my forms? How do I prevent this from happening again? From vbacreations at gmail.com Wed Jul 20 16:26:55 2011 From: vbacreations at gmail.com (William Benson (VBACreations.Com)) Date: Wed, 20 Jul 2011 17:26:55 -0400 Subject: [AccessD] Access 2010 -- The database cannot be opened because the VBA project contained in it cannot be read. In-Reply-To: <024501cc4720$8d8aef40$a8a0cdc0$@flsi.com> References: <024501cc4720$8d8aef40$a8a0cdc0$@flsi.com> Message-ID: <004301cc4723$c0c316a0$424943e0$@gmail.com> I don't think so. If you cannot import them into a blank (or any) database and you cannot open the one in which they were originally contained. If you could do either of those things, you could then export the form as text and read the text file. I have posted others' code for how to do all of this in the recent past ... but again, if you cannot get access to a database containing the objects, then I don't think you have any shot. :-( Been there. From rockysmolin at bchacc.com Wed Jul 20 16:48:27 2011 From: rockysmolin at bchacc.com (Rocky Smolin) Date: Wed, 20 Jul 2011 14:48:27 -0700 Subject: [AccessD] Access 2010 -- The database cannot be opened because theVBA project contained in it cannot be read. In-Reply-To: <024501cc4720$8d8aef40$a8a0cdc0$@flsi.com> References: <024501cc4720$8d8aef40$a8a0cdc0$@flsi.com> Message-ID: No backup? Tsk-tsk. I've had the problem before and you might try decompile, but IME, it usually doesn't recover the code. Rocky -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Darrell Burns Sent: Wednesday, July 20, 2011 2:04 PM To: 'Access Developers discussion and problem solving' Subject: [AccessD] Access 2010 -- The database cannot be opened because theVBA project contained in it cannot be read. I just lost all of my code! I'm running 32-bit Access 2010 in 64-bit Windows7 (Access 14.0 Object library and Office Access database engine 14.0)..the 32-bit version of Office2010. My application was developed in Access2007. My default file format says Access 2007 (there is no A2010 option). I was trying to import a form from one database into another when I got a "Microsoft Access has stopped working" message, then both databases were hosed. I tried opening a blank database and importing a form but I get "Name conflicts with existing module...." and it won't import. Of course, I have a live demo in 3 hours! Help! Is there any way of salvaging the code I had written behind my forms? How do I prevent this from happening again? -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From dhb at flsi.com Wed Jul 20 17:45:22 2011 From: dhb at flsi.com (Darrell Burns) Date: Wed, 20 Jul 2011 15:45:22 -0700 Subject: [AccessD] Access 2010 -- The database cannot be opened because theVBA project contained in it cannot be read. In-Reply-To: References: <024501cc4720$8d8aef40$a8a0cdc0$@flsi.com> Message-ID: <026001cc472e$b5ddc720$21995560$@flsi.com> Yes, backed up yesterday. Lost today's work. -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Rocky Smolin Sent: Wednesday, July 20, 2011 2:48 PM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Access 2010 -- The database cannot be opened because theVBA project contained in it cannot be read. No backup? Tsk-tsk. I've had the problem before and you might try decompile, but IME, it usually doesn't recover the code. Rocky -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Darrell Burns Sent: Wednesday, July 20, 2011 2:04 PM To: 'Access Developers discussion and problem solving' Subject: [AccessD] Access 2010 -- The database cannot be opened because theVBA project contained in it cannot be read. I just lost all of my code! I'm running 32-bit Access 2010 in 64-bit Windows7 (Access 14.0 Object library and Office Access database engine 14.0)..the 32-bit version of Office2010. My application was developed in Access2007. My default file format says Access 2007 (there is no A2010 option). I was trying to import a form from one database into another when I got a "Microsoft Access has stopped working" message, then both databases were hosed. I tried opening a blank database and importing a form but I get "Name conflicts with existing module...." and it won't import. Of course, I have a live demo in 3 hours! Help! Is there any way of salvaging the code I had written behind my forms? How do I prevent this from happening again? -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From fuller.artful at gmail.com Wed Jul 20 19:45:12 2011 From: fuller.artful at gmail.com (Arthur Fuller) Date: Wed, 20 Jul 2011 20:45:12 -0400 Subject: [AccessD] Access 2010 -- The database cannot be opened because theVBA project contained in it cannot be read. In-Reply-To: <026001cc472e$b5ddc720$21995560$@flsi.com> References: <024501cc4720$8d8aef40$a8a0cdc0$@flsi.com> <026001cc472e$b5ddc720$21995560$@flsi.com> Message-ID: So you only lost one day's work. Take this as a sign from the gods in Redmond. Back up several times a day. It's not difficult. Click the Orb and then Manage and then Backup. It takes about 3 seconds and your ass is saved. I do it several times per session and don't have to recover more than an hour or so's work. A. On Wed, Jul 20, 2011 at 6:45 PM, Darrell Burns wrote: > Yes, backed up yesterday. Lost today's work. > > From vbacreations at gmail.com Wed Jul 20 21:44:00 2011 From: vbacreations at gmail.com (William Benson (VBACreations.Com)) Date: Wed, 20 Jul 2011 22:44:00 -0400 Subject: [AccessD] Access 2010 -- The database cannot be opened because theVBA project contained in it cannot be read. In-Reply-To: References: <024501cc4720$8d8aef40$a8a0cdc0$@flsi.com> <026001cc472e$b5ddc720$21995560$@flsi.com> Message-ID: <004801cc4750$0c961560$25c24020$@gmail.com> What is the orb? This link seems to have some code for backing up and zipping a database. http://developpers.blogspot.com/2008/03/how-to-backup-access-file-using-vba. html as well as a link to software that might repair a database. -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Arthur Fuller Sent: Wednesday, July 20, 2011 8:45 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Access 2010 -- The database cannot be opened because theVBA project contained in it cannot be read. So you only lost one day's work. Take this as a sign from the gods in Redmond. Back up several times a day. It's not difficult. Click the Orb and then Manage and then Backup. It takes about 3 seconds and your ass is saved. I do it several times per session and don't have to recover more than an hour or so's work. A. On Wed, Jul 20, 2011 at 6:45 PM, Darrell Burns wrote: > Yes, backed up yesterday. Lost today's work. > > -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From stuart at lexacorp.com.pg Wed Jul 20 22:53:17 2011 From: stuart at lexacorp.com.pg (Stuart McLachlan) Date: Thu, 21 Jul 2011 13:53:17 +1000 Subject: [AccessD] Access 2010 -- The database cannot be opened because theVBA project contained in it cannot be read. In-Reply-To: <004801cc4750$0c961560$25c24020$@gmail.com> References: <024501cc4720$8d8aef40$a8a0cdc0$@flsi.com>, , <004801cc4750$0c961560$25c24020$@gmail.com> Message-ID: <4E27A2AD.17124.201F10AB@stuart.lexacorp.com.pg> Access 2007 and 2010. The big "Office Button" ball on the left hand side of the menu bar. On 20 Jul 2011 at 22:44, William Benson (VBACreations. wrote: > What is the orb? > > This link seems to have some code for backing up and zipping a > database. > > http://developpers.blogspot.com/2008/03/how-to-backup-access-file-usin > g-vba. html > > as well as a link to software that might repair a database. > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Arthur > Fuller Sent: Wednesday, July 20, 2011 8:45 PM To: Access Developers > discussion and problem solving Subject: Re: [AccessD] Access 2010 -- > The database cannot be opened because theVBA project contained in it > cannot be read. > > So you only lost one day's work. Take this as a sign from the gods in > Redmond. Back up several times a day. It's not difficult. Click the > Orb and then Manage and then Backup. It takes about 3 seconds and your > ass is saved. I do it several times per session and don't have to > recover more than an hour or so's work. > > A. > > On Wed, Jul 20, 2011 at 6:45 PM, Darrell Burns wrote: > > > Yes, backed up yesterday. Lost today's work. > > > > > -- > 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 vbacreations at gmail.com Wed Jul 20 23:43:29 2011 From: vbacreations at gmail.com (William Benson (VBACreations.Com)) Date: Thu, 21 Jul 2011 00:43:29 -0400 Subject: [AccessD] Access 2010 -- The database cannot be opened because theVBA project contained in it cannot be read. In-Reply-To: <4E27A2AD.17124.201F10AB@stuart.lexacorp.com.pg> References: <024501cc4720$8d8aef40$a8a0cdc0$@flsi.com>, , <004801cc4750$0c961560$25c24020$@gmail.com> <4E27A2AD.17124.201F10AB@stuart.lexacorp.com.pg> Message-ID: <005001cc4760$bd07cfa0$37176ee0$@gmail.com> 2010 (which I am using) does not seem to have this... And I cannot see a Manage function. -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Stuart McLachlan Sent: Wednesday, July 20, 2011 11:53 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Access 2010 -- The database cannot be opened because theVBA project contained in it cannot be read. Access 2007 and 2010. The big "Office Button" ball on the left hand side of the menu bar. On 20 Jul 2011 at 22:44, William Benson (VBACreations. wrote: > What is the orb? > > This link seems to have some code for backing up and zipping a > database. > > http://developpers.blogspot.com/2008/03/how-to-backup-access-file-usin > g-vba. html > > as well as a link to software that might repair a database. > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Arthur > Fuller Sent: Wednesday, July 20, 2011 8:45 PM To: Access Developers > discussion and problem solving Subject: Re: [AccessD] Access 2010 -- > The database cannot be opened because theVBA project contained in it > cannot be read. > > So you only lost one day's work. Take this as a sign from the gods in > Redmond. Back up several times a day. It's not difficult. Click the > Orb and then Manage and then Backup. It takes about 3 seconds and your > ass is saved. I do it several times per session and don't have to > recover more than an hour or so's work. > > A. > > On Wed, Jul 20, 2011 at 6:45 PM, Darrell Burns wrote: > > > Yes, backed up yesterday. Lost today's work. > > > > > -- > 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 Wed Jul 20 23:53:21 2011 From: stuart at lexacorp.com.pg (Stuart McLachlan) Date: Thu, 21 Jul 2011 14:53:21 +1000 Subject: [AccessD] Access 2010 -- The database cannot be opened because theVBA project contained in it cannot be read. In-Reply-To: <005001cc4760$bd07cfa0$37176ee0$@gmail.com> References: <024501cc4720$8d8aef40$a8a0cdc0$@flsi.com>, <4E27A2AD.17124.201F10AB@stuart.lexacorp.com.pg>, <005001cc4760$bd07cfa0$37176ee0$@gmail.com> Message-ID: <4E27B0C1.26772.20560F93@stuart.lexacorp.com.pg> You're right, that is only in 2007. I do wish they couldn't keep changing the interface every few years. :( No idea where it is (if it exists at all ) in 2010. I can't find it. -- Stuart On 21 Jul 2011 at 0:43, William Benson (VBACreations. wrote: > 2010 (which I am using) does not seem to have this... And I cannot see > a Manage function. > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Stuart > McLachlan Sent: Wednesday, July 20, 2011 11:53 PM To: Access > Developers discussion and problem solving Subject: Re: [AccessD] > Access 2010 -- The database cannot be opened because theVBA project > contained in it cannot be read. > > Access 2007 and 2010. The big "Office Button" ball on the left hand > side of the menu bar. > > On 20 Jul 2011 at 22:44, William Benson (VBACreations. wrote: > > > What is the orb? > > > > This link seems to have some code for backing up and zipping a > > database. > > > > http://developpers.blogspot.com/2008/03/how-to-backup-access-file-us > > in g-vba. html > > > > as well as a link to software that might repair a database. > > > > -----Original Message----- > > From: accessd-bounces at databaseadvisors.com > > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Arthur > > Fuller Sent: Wednesday, July 20, 2011 8:45 PM To: Access Developers > > discussion and problem solving Subject: Re: [AccessD] Access 2010 -- > > The database cannot be opened because theVBA project contained in it > > cannot be read. > > > > So you only lost one day's work. Take this as a sign from the gods > > in Redmond. Back up several times a day. It's not difficult. Click > > the Orb and then Manage and then Backup. It takes about 3 seconds > > and your ass is saved. I do it several times per session and don't > > have to recover more than an hour or so's work. > > > > A. > > > > On Wed, Jul 20, 2011 at 6:45 PM, Darrell Burns wrote: > > > > > Yes, backed up yesterday. Lost today's work. > > > > > > > > -- > > 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 charlotte.foust at gmail.com Wed Jul 20 23:57:12 2011 From: charlotte.foust at gmail.com (Charlotte Foust) Date: Wed, 20 Jul 2011 21:57:12 -0700 Subject: [AccessD] Access 2010 -- The database cannot be opened because theVBA project contained in it cannot be read. In-Reply-To: <005001cc4760$bd07cfa0$37176ee0$@gmail.com> References: <024501cc4720$8d8aef40$a8a0cdc0$@flsi.com> <004801cc4750$0c961560$25c24020$@gmail.com> <4E27A2AD.17124.201F10AB@stuart.lexacorp.com.pg> <005001cc4760$bd07cfa0$37176ee0$@gmail.com> Message-ID: They did away with the ugly office button in 2010, The file menu in 2010 gives you a Save Database As option. There's also a Save & Publish selection on the file menu that offers a backup database option. Charlotte Foust On Wed, Jul 20, 2011 at 9:43 PM, William Benson (VBACreations.Com) < vbacreations at gmail.com> wrote: > 2010 (which I am using) does not seem to have this... And I cannot see a > Manage function. > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Stuart > McLachlan > Sent: Wednesday, July 20, 2011 11:53 PM > To: Access Developers discussion and problem solving > Subject: Re: [AccessD] Access 2010 -- The database cannot be opened because > theVBA project contained in it cannot be read. > > Access 2007 and 2010. The big "Office Button" ball on the left hand side > of the menu bar. > From davidmcafee at gmail.com Thu Jul 21 14:17:53 2011 From: davidmcafee at gmail.com (David McAfee) Date: Thu, 21 Jul 2011 12:17:53 -0700 Subject: [AccessD] Access 2010 SP1 issue Message-ID: I have an ADP with a form that gets bound at run-time. This has worked flawlessly for several years until this morning. The user is complaining that the form opens up with all of the fields displaying #NAME? I haven't touched this form, or even the ADP in the longest time so I new it wasn't anything I've done. :) It works as it is supposed to on my computer and all the other employees in his department. We had him go to another user's computer and log in as himself. It worked. So I figured it was tied to his machine. I then realized his is on Win7, using Acess2010SP1. I found out SP1 was just released internally this week. A-HA! I ended up getting it working by doing this quick fix as shown below: I added the "If (SysCmd(acSysCmdAccessVer) = 14) Then" statement. Private Sub Form_Open(Cancel As Integer) On Error GoTo Form_Open_Error Me.RecordSource = "" If Nz(Me.OpenArgs, "") <> "" Then ' Is Not Null Then If IsNumeric(Me.OpenArgs) Then Me.InputParameters = "@IncStatJunctID = " & CInt(Me.OpenArgs) If (SysCmd(acSysCmdAccessVer) = 14) Then Me.RecordSource = "EXEC dbo.stpItemDetHist " & Me.InputParameters Else Me.RecordSourceQualifier = "dbo" Me.RecordSource = "stpItemDetHist" End If 'Do a bunch of stuff here Else Cancel = True End If Else Cancel = True End If This works, but technically isn't correct. I need to check for A2010 SP1, not just A2010 (Ver14) Does anyone know how I can check for SP1? Exit Sub From dc8 at btinternet.com Thu Jul 21 16:20:15 2011 From: dc8 at btinternet.com (Chris Swann) Date: Thu, 21 Jul 2011 22:20:15 +0100 Subject: [AccessD] Transpose from columns to rows Message-ID: <4E28980F.1060401@btinternet.com> Hi all, Once again my skills need a little help. I have a table which contains data in rows. I need to be able to take the values for each record and, where there is more than one value per record, put it into separate columns. Here is what the data looks like (there are other fields but these are the ones I need to move) ID CODE 1 A1 1 B1 1 C1 2 3 A1 4 Z1 4 etc etc what I need is this ID CODE1 CODE2 CODE3 1 A1 B1 C1 2 3 A1 4 Z1 If anyone can point me in the right direction I would be really grateful. Chris Swann From rockysmolin at bchacc.com Thu Jul 21 16:41:44 2011 From: rockysmolin at bchacc.com (Rocky Smolin) Date: Thu, 21 Jul 2011 14:41:44 -0700 Subject: [AccessD] Format During Edit Message-ID: <380200D6F70246DC9332CF6BD6DF470B@HAL9007> Dear List: I have a text box formatted to Currency - 2 decimal places. The text box is editable and since some decimal numbers do not have an exact equivalent in binary, when I click into the box to edit it, I get a long string of decimal numbers. For example, if the box has $3.25, when I click into it to edit it it displays 3.24999992735684. The user would like it not to do this for obvious reasons but I can't seem to force the behavior I want which would be to display 3.25 for editing. Tried the input mask but no cigar. What trick am I missing? MTIA Rocky Smolin Beach Access Software 858-259-4334 www.bchacc.com www.e-z-mrp.com From stuart at lexacorp.com.pg Thu Jul 21 16:47:44 2011 From: stuart at lexacorp.com.pg (Stuart McLachlan) Date: Fri, 22 Jul 2011 07:47:44 +1000 Subject: [AccessD] Format During Edit In-Reply-To: <380200D6F70246DC9332CF6BD6DF470B@HAL9007> References: <380200D6F70246DC9332CF6BD6DF470B@HAL9007> Message-ID: <4E289E80.8450.23F6C31C@stuart.lexacorp.com.pg> Can you change the type of the underlying field to Currency rather than Double? -- Stuart On 21 Jul 2011 at 14:41, Rocky Smolin wrote: > Dear List: > > I have a text box formatted to Currency - 2 decimal places. The text > box is editable and since some decimal numbers do not have an exact > equivalent in binary, when I click into the box to edit it, I get a > long string of decimal numbers. > > For example, if the box has $3.25, when I click into it to edit it it > displays 3.24999992735684. > > The user would like it not to do this for obvious reasons but I can't > seem to force the behavior I want which would be to display 3.25 for > editing. Tried the input mask but no cigar. > > What trick am I missing? > > MTIA > > Rocky Smolin > Beach Access Software > 858-259-4334 > www.bchacc.com > www.e-z-mrp.com > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > From rockysmolin at bchacc.com Thu Jul 21 17:09:23 2011 From: rockysmolin at bchacc.com (Rocky Smolin) Date: Thu, 21 Jul 2011 15:09:23 -0700 Subject: [AccessD] Format During Edit In-Reply-To: <4E289E80.8450.23F6C31C@stuart.lexacorp.com.pg> References: <380200D6F70246DC9332CF6BD6DF470B@HAL9007> <4E289E80.8450.23F6C31C@stuart.lexacorp.com.pg> Message-ID: <88CFAB5D8A8C4D36B3936D4BAFF59E56@HAL9007> That worked. Thanks, Stuart. Rocky -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Stuart McLachlan Sent: Thursday, July 21, 2011 2:48 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Format During Edit Can you change the type of the underlying field to Currency rather than Double? -- Stuart On 21 Jul 2011 at 14:41, Rocky Smolin wrote: > Dear List: > > I have a text box formatted to Currency - 2 decimal places. The text > box is editable and since some decimal numbers do not have an exact > equivalent in binary, when I click into the box to edit it, I get a > long string of decimal numbers. > > For example, if the box has $3.25, when I click into it to edit it it > displays 3.24999992735684. > > The user would like it not to do this for obvious reasons but I can't > seem to force the behavior I want which would be to display 3.25 for > editing. Tried the input mask but no cigar. > > What trick am I missing? > > MTIA > > Rocky Smolin > Beach Access Software > 858-259-4334 > www.bchacc.com www.e-z-mrp.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 Thu Jul 21 17:20:04 2011 From: accessd at shaw.ca (Jim Lawrence) Date: Thu, 21 Jul 2011 15:20:04 -0700 Subject: [AccessD] Format During Edit In-Reply-To: <4E289E80.8450.23F6C31C@stuart.lexacorp.com.pg> References: <380200D6F70246DC9332CF6BD6DF470B@HAL9007> <4E289E80.8450.23F6C31C@stuart.lexacorp.com.pg> Message-ID: <91295BD047274B88A7DC842F5C16F12F@creativesystemdesigns.com> ...Or you could put the display format to ######.##. Jim -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Stuart McLachlan Sent: Thursday, July 21, 2011 2:48 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Format During Edit Can you change the type of the underlying field to Currency rather than Double? -- Stuart On 21 Jul 2011 at 14:41, Rocky Smolin wrote: > Dear List: > > I have a text box formatted to Currency - 2 decimal places. The text > box is editable and since some decimal numbers do not have an exact > equivalent in binary, when I click into the box to edit it, I get a > long string of decimal numbers. > > For example, if the box has $3.25, when I click into it to edit it it > displays 3.24999992735684. > > The user would like it not to do this for obvious reasons but I can't > seem to force the behavior I want which would be to display 3.25 for > editing. Tried the input mask but no cigar. > > What trick am I missing? > > MTIA > > Rocky Smolin > Beach Access Software > 858-259-4334 > www.bchacc.com > www.e-z-mrp.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 Thu Jul 21 17:37:21 2011 From: stuart at lexacorp.com.pg (Stuart McLachlan) Date: Fri, 22 Jul 2011 08:37:21 +1000 Subject: [AccessD] Format During Edit In-Reply-To: <91295BD047274B88A7DC842F5C16F12F@creativesystemdesigns.com> References: <380200D6F70246DC9332CF6BD6DF470B@HAL9007>, <4E289E80.8450.23F6C31C@stuart.lexacorp.com.pg>, <91295BD047274B88A7DC842F5C16F12F@creativesystemdesigns.com> Message-ID: <4E28AA21.2454.24242E00@stuart.lexacorp.com.pg> That doesn't help when you are actually in the textbox. The full value is shown, regardless of the display fromat. On 21 Jul 2011 at 15:20, Jim Lawrence wrote: > ...Or you could put the display format to ######.##. > > Jim > > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Stuart > McLachlan Sent: Thursday, July 21, 2011 2:48 PM To: Access Developers > discussion and problem solving Subject: Re: [AccessD] Format During > Edit > > Can you change the type of the underlying field to Currency rather > than Double? > > -- > Stuart > > On 21 Jul 2011 at 14:41, Rocky Smolin wrote: > > > Dear List: > > > > I have a text box formatted to Currency - 2 decimal places. The > > text box is editable and since some decimal numbers do not have an > > exact equivalent in binary, when I click into the box to edit it, I > > get a long string of decimal numbers. > > > > For example, if the box has $3.25, when I click into it to edit it > > it displays 3.24999992735684. > > > > The user would like it not to do this for obvious reasons but I > > can't seem to force the behavior I want which would be to display > > 3.25 for editing. Tried the input mask but no cigar. > > > > What trick am I missing? > > > > MTIA > > > > Rocky Smolin > > Beach Access Software > > 858-259-4334 > > www.bchacc.com > > www.e-z-mrp.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 adtp at airtelmail.in Fri Jul 22 06:46:23 2011 From: adtp at airtelmail.in (A.D. Tejpal) Date: Fri, 22 Jul 2011 17:16:23 +0530 Subject: [AccessD] Transpose from columns to rows References: <4E28980F.1060401@btinternet.com> Message-ID: <6C18FCC4C4B74F73B88454EAE286B3E1@personal4a8ede> Chris, Sample query Q_Codes as given below, should get you the desired output. Q_Codes (Crosstab Query) ============================= TRANSFORM First(T_Codes.Code) AS FirstOfCode SELECT T_Codes.ID FROM T_Codes GROUP BY T_Codes.ID PIVOT "Code" & Format(DCount("*","T_Codes","ID = " & [ID] & " AND Code <= '" & [Code] & "'"),"00"); ============================= Note: Table T_Codes has fields ID (number type) and Code (text type). Best wishes, A.D. Tejpal ------------ ----- Original Message ----- From: Chris Swann To: Access Developers discussion and problem solving Sent: Friday, July 22, 2011 02:50 Subject: [AccessD] Transpose from columns to rows Hi all, Once again my skills need a little help. I have a table which contains data in rows. I need to be able to take the values for each record and, where there is more than one value per record, put it into separate columns. Here is what the data looks like (there are other fields but these are the ones I need to move) ID CODE 1 A1 1 B1 1 C1 2 3 A1 4 Z1 4 etc etc what I need is this ID CODE1 CODE2 CODE3 1 A1 B1 C1 2 3 A1 4 Z1 If anyone can point me in the right direction I would be really grateful. Chris Swann From jimdettman at verizon.net Fri Jul 22 07:50:50 2011 From: jimdettman at verizon.net (Jim Dettman) Date: Fri, 22 Jul 2011 08:50:50 -0400 Subject: [AccessD] Access 2010 SP1 issue In-Reply-To: References: Message-ID: <9194940DCB064CFFAB1C278BC0F711FB@XPS> David, Use the GetAccessVersion() code here: http://allenbrowne.com/ser-53code.html To determine the build number of the MSACCESS.EXE. These will be different for the 2010 vs 2010 SP1. The standard 2010 build is 14.0.4750.1000. I don't know what the SP1 version is because I have not installed it yet. Note that both MSKB fixes and SP's will increase the build number so your best bet is not to check for a specific level. Jim. -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of David McAfee Sent: Thursday, July 21, 2011 03:18 PM To: Access Developers discussion and problem solving Subject: [AccessD] Access 2010 SP1 issue I have an ADP with a form that gets bound at run-time. This has worked flawlessly for several years until this morning. The user is complaining that the form opens up with all of the fields displaying #NAME? I haven't touched this form, or even the ADP in the longest time so I new it wasn't anything I've done. :) It works as it is supposed to on my computer and all the other employees in his department. We had him go to another user's computer and log in as himself. It worked. So I figured it was tied to his machine. I then realized his is on Win7, using Acess2010SP1. I found out SP1 was just released internally this week. A-HA! I ended up getting it working by doing this quick fix as shown below: I added the "If (SysCmd(acSysCmdAccessVer) = 14) Then" statement. Private Sub Form_Open(Cancel As Integer) On Error GoTo Form_Open_Error Me.RecordSource = "" If Nz(Me.OpenArgs, "") <> "" Then ' Is Not Null Then If IsNumeric(Me.OpenArgs) Then Me.InputParameters = "@IncStatJunctID = " & CInt(Me.OpenArgs) If (SysCmd(acSysCmdAccessVer) = 14) Then Me.RecordSource = "EXEC dbo.stpItemDetHist " & Me.InputParameters Else Me.RecordSourceQualifier = "dbo" Me.RecordSource = "stpItemDetHist" End If 'Do a bunch of stuff here Else Cancel = True End If Else Cancel = True End If This works, but technically isn't correct. I need to check for A2010 SP1, not just A2010 (Ver14) Does anyone know how I can check for SP1? Exit Sub -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From jimdettman at verizon.net Fri Jul 22 07:54:08 2011 From: jimdettman at verizon.net (Jim Dettman) Date: Fri, 22 Jul 2011 08:54:08 -0400 Subject: [AccessD] Access 2010 SP1 issue In-Reply-To: References: Message-ID: <863C452D91EA4261AB37E2440CEF1110@XPS> BTW, I should have added that your not alone; the bug has already been reported to Microsoft. Jim. -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of David McAfee Sent: Thursday, July 21, 2011 03:18 PM To: Access Developers discussion and problem solving Subject: [AccessD] Access 2010 SP1 issue I have an ADP with a form that gets bound at run-time. This has worked flawlessly for several years until this morning. The user is complaining that the form opens up with all of the fields displaying #NAME? I haven't touched this form, or even the ADP in the longest time so I new it wasn't anything I've done. :) It works as it is supposed to on my computer and all the other employees in his department. We had him go to another user's computer and log in as himself. It worked. So I figured it was tied to his machine. I then realized his is on Win7, using Acess2010SP1. I found out SP1 was just released internally this week. A-HA! I ended up getting it working by doing this quick fix as shown below: I added the "If (SysCmd(acSysCmdAccessVer) = 14) Then" statement. Private Sub Form_Open(Cancel As Integer) On Error GoTo Form_Open_Error Me.RecordSource = "" If Nz(Me.OpenArgs, "") <> "" Then ' Is Not Null Then If IsNumeric(Me.OpenArgs) Then Me.InputParameters = "@IncStatJunctID = " & CInt(Me.OpenArgs) If (SysCmd(acSysCmdAccessVer) = 14) Then Me.RecordSource = "EXEC dbo.stpItemDetHist " & Me.InputParameters Else Me.RecordSourceQualifier = "dbo" Me.RecordSource = "stpItemDetHist" End If 'Do a bunch of stuff here Else Cancel = True End If Else Cancel = True End If This works, but technically isn't correct. I need to check for A2010 SP1, not just A2010 (Ver14) Does anyone know how I can check for SP1? Exit Sub -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From dc8 at btinternet.com Fri Jul 22 15:29:34 2011 From: dc8 at btinternet.com (Chris Swann) Date: Fri, 22 Jul 2011 21:29:34 +0100 Subject: [AccessD] Transpose from columns to rows In-Reply-To: <6C18FCC4C4B74F73B88454EAE286B3E1@personal4a8ede> References: <4E28980F.1060401@btinternet.com> <6C18FCC4C4B74F73B88454EAE286B3E1@personal4a8ede> Message-ID: <4E29DDAE.4060902@btinternet.com> Many, many thanks for that code. I've added it to the database and I now have exactly the output I need. All I have to do now is to find out how to get hold of some other data I need but that's a WHOLE different problem !! Chris On 22/07/2011 12:46, A.D. Tejpal wrote: > Chris, > > Sample query Q_Codes as given below, should get you the desired output. > > Q_Codes (Crosstab Query) > ============================= > TRANSFORM First(T_Codes.Code) AS FirstOfCode > SELECT T_Codes.ID > FROM T_Codes > GROUP BY T_Codes.ID > PIVOT "Code"& Format(DCount("*","T_Codes","ID = "& [ID]& " AND Code<= '"& [Code]& "'"),"00"); > ============================= > > Note: Table T_Codes has fields ID (number type) and Code (text type). > > Best wishes, > A.D. Tejpal > ------------ > > ----- Original Message ----- > From: Chris Swann > To: Access Developers discussion and problem solving > Sent: Friday, July 22, 2011 02:50 > Subject: [AccessD] Transpose from columns to rows > > > Hi all, > > Once again my skills need a little help. > > I have a table which contains data in rows. I need to be able to take > the values for each record and, where there is more than one value per > record, put it into separate columns. > > Here is what the data looks like (there are other fields but these are > the ones I need to move) > > ID CODE > 1 A1 > 1 B1 > 1 C1 > 2 > 3 A1 > 4 Z1 > 4 > > etc etc > > what I need is this > > ID CODE1 CODE2 CODE3 > 1 A1 B1 C1 > 2 > 3 A1 > 4 Z1 > > If anyone can point me in the right direction I would be really grateful. > > Chris Swann From newsgrps at dalyn.co.nz Fri Jul 22 16:54:54 2011 From: newsgrps at dalyn.co.nz (newsgrps) Date: Sat, 23 Jul 2011 09:54:54 +1200 Subject: [AccessD] Access 2010 SP1 issue In-Reply-To: <863C452D91EA4261AB37E2440CEF1110@XPS> References: <863C452D91EA4261AB37E2440CEF1110@XPS> Message-ID: <20110722215605.XVUV4056.mta02.xtra.co.nz@David-PC.dalyn.co.nz> Jim, How do we find out when Microsoft have solved the problem? Is there a website for these things? Regards David Emerson Dalyn Software Ltd New Zealand At 23/07/2011, Jim Dettman wrote: > BTW, I should have added that your not alone; the bug has already been >reported to Microsoft. > >Jim. > >-----Original Message----- >From: accessd-bounces at databaseadvisors.com >[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of David McAfee >Sent: Thursday, July 21, 2011 03:18 PM >To: Access Developers discussion and problem solving >Subject: [AccessD] Access 2010 SP1 issue > >I have an ADP with a form that gets bound at run-time. >This has worked flawlessly for several years until this morning. > >The user is complaining that the form opens up with all of the fields >displaying #NAME? > >I haven't touched this form, or even the ADP in the longest time so I new it >wasn't anything I've done. :) > >It works as it is supposed to on my computer and all the other employees in >his department. > >We had him go to another user's computer and log in as himself. It worked. > >So I figured it was tied to his machine. I then realized his is on Win7, >using Acess2010SP1. > >I found out SP1 was just released internally this week. A-HA! > >I ended up getting it working by doing this quick fix as shown below: >I added the "If (SysCmd(acSysCmdAccessVer) = 14) Then" statement. > >Private Sub Form_Open(Cancel As Integer) > On Error GoTo Form_Open_Error >Me.RecordSource = "" >If Nz(Me.OpenArgs, "") <> "" Then ' Is Not Null Then > If IsNumeric(Me.OpenArgs) Then > Me.InputParameters = "@IncStatJunctID = " & CInt(Me.OpenArgs) > If (SysCmd(acSysCmdAccessVer) = 14) Then > Me.RecordSource = "EXEC dbo.stpItemDetHist " & >Me.InputParameters > Else > Me.RecordSourceQualifier = "dbo" > Me.RecordSource = "stpItemDetHist" > End If > > 'Do a bunch of stuff here > > Else > Cancel = True > End If >Else > Cancel = True >End If > > >This works, but technically isn't correct. I need to check for A2010 SP1, >not just A2010 (Ver14) > >Does anyone know how I can check for SP1? >Exit Sub >-- >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 Sat Jul 23 07:03:09 2011 From: jimdettman at verizon.net (Jim Dettman) Date: Sat, 23 Jul 2011 08:03:09 -0400 Subject: [AccessD] Access 2010 SP1 issue In-Reply-To: <20110722215605.XVUV4056.mta02.xtra.co.nz@David-PC.dalyn.co.nz> References: <863C452D91EA4261AB37E2440CEF1110@XPS> <20110722215605.XVUV4056.mta02.xtra.co.nz@David-PC.dalyn.co.nz> Message-ID: David, Depending on the severity of the bug and the scope of it, and based on past experience, a couple of things might happen: 1. They will issue a KB and a hot patch for an immediate fix. 2. They will issue a KB with a work around and include it in the next SP. 3. They will simply include it in the next SP. 4. They will issue a KB with a work around and not bother to fix it. All I can say definitely is that we are still in the very initial stages with this. SP1 became available not too long ago and in many places is just starting to be rolled out. If I hear of anything I can pass along, I will. But in the meantime, it looks like simply adding EXEC takes care of the problem with the input parameters. Jim. -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of newsgrps Sent: Friday, July 22, 2011 05:55 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Access 2010 SP1 issue Jim, How do we find out when Microsoft have solved the problem? Is there a website for these things? Regards David Emerson Dalyn Software Ltd New Zealand At 23/07/2011, Jim Dettman wrote: > BTW, I should have added that your not alone; the bug has already been >reported to Microsoft. > >Jim. > >-----Original Message----- >From: accessd-bounces at databaseadvisors.com >[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of David McAfee >Sent: Thursday, July 21, 2011 03:18 PM >To: Access Developers discussion and problem solving >Subject: [AccessD] Access 2010 SP1 issue > >I have an ADP with a form that gets bound at run-time. >This has worked flawlessly for several years until this morning. > >The user is complaining that the form opens up with all of the fields >displaying #NAME? > >I haven't touched this form, or even the ADP in the longest time so I new it >wasn't anything I've done. :) > >It works as it is supposed to on my computer and all the other employees in >his department. > >We had him go to another user's computer and log in as himself. It worked. > >So I figured it was tied to his machine. I then realized his is on Win7, >using Acess2010SP1. > >I found out SP1 was just released internally this week. A-HA! > >I ended up getting it working by doing this quick fix as shown below: >I added the "If (SysCmd(acSysCmdAccessVer) = 14) Then" statement. > >Private Sub Form_Open(Cancel As Integer) > On Error GoTo Form_Open_Error >Me.RecordSource = "" >If Nz(Me.OpenArgs, "") <> "" Then ' Is Not Null Then > If IsNumeric(Me.OpenArgs) Then > Me.InputParameters = "@IncStatJunctID = " & CInt(Me.OpenArgs) > If (SysCmd(acSysCmdAccessVer) = 14) Then > Me.RecordSource = "EXEC dbo.stpItemDetHist " & >Me.InputParameters > Else > Me.RecordSourceQualifier = "dbo" > Me.RecordSource = "stpItemDetHist" > End If > > 'Do a bunch of stuff here > > Else > Cancel = True > End If >Else > Cancel = True >End If > > >This works, but technically isn't correct. I need to check for A2010 SP1, >not just A2010 (Ver14) > >Does anyone know how I can check for SP1? >Exit Sub >-- >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 fuller.artful at gmail.com Sat Jul 23 07:54:01 2011 From: fuller.artful at gmail.com (Arthur Fuller) Date: Sat, 23 Jul 2011 08:54:01 -0400 Subject: [AccessD] Max of 20 values Message-ID: I have a form into which the user enters up to 20 values (measurements in time). They all default to zero. I'm trying to think of an elegant way to find the max value among the 20. Create an array and bubble sort it? I want to call this code on the AfterUpdate of each of these 20 controls so the control called MaxReading gets a new value if any of the 20 controls goes higher than the current MaxReading value. TIA, Arthur From rockysmolin at bchacc.com Sat Jul 23 08:15:34 2011 From: rockysmolin at bchacc.com (Rocky Smolin) Date: Sat, 23 Jul 2011 06:15:34 -0700 Subject: [AccessD] Max of 20 values In-Reply-To: References: Message-ID: Crude as it sounds, twenty IF statements might be the fastest, easiest, cheapest way. Easy to read, easy to maintain in the future. If the text boxes all have consistent names list txtValuenn where nn is a number from 01 to 20, then you could do it in a loop, creating the name of the text box in a string and checking to see if the value in that box is greater than the currently highest value -- If Me(strtxtBoxName) > dblCurrentHIgh then dblCurrentHigh = Me(strtxtBoxName). That would be clever, harder to maintain 5 years form now, and take....almost 20 lines of code. You coud write the twenty values to a temp table and to a Dmax on the table. That would take about 20 lines of code and would be even longer and more fun to create. Or bind the twenty values to a table and put them in a continuous subform. Then the Dmax would be easy. Or 20 If statements... R -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Arthur Fuller Sent: Saturday, July 23, 2011 5:54 AM To: Access Developers discussion and problem solving Subject: [AccessD] Max of 20 values I have a form into which the user enters up to 20 values (measurements in time). They all default to zero. I'm trying to think of an elegant way to find the max value among the 20. Create an array and bubble sort it? I want to call this code on the AfterUpdate of each of these 20 controls so the control called MaxReading gets a new value if any of the 20 controls goes higher than the current MaxReading value. TIA, Arthur -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From df.waters at comcast.net Sat Jul 23 08:42:00 2011 From: df.waters at comcast.net (Dan Waters) Date: Sat, 23 Jul 2011 08:42:00 -0500 Subject: [AccessD] Max of 20 values In-Reply-To: References: Message-ID: <001701cc493e$4ca62a60$e5f27f20$@comcast.net> Hi Arthur, I found this function in my library file. This uses a parameter array and just loops through looking for the highest one. HTH! Dan '--------------------- Private Sub textMaxOfVars() MsgBox MaxOfVars(20, 30, Null, -7, 8, 87.23, "top") End Sub Public Function MaxOfVars(ParamArray varValues() As Variant) On Error GoTo EH '-- Purpose: Return a max of variants. Note that any string will be larger than any numeric value. Dim lvarVal As Variant Dim lvarMax As Variant lvarMax = varValues(0) For Each lvarVal In varValues If lvarVal > lvarMax Then lvarMax = lvarVal End If Next lvarVal MaxOfVars = lvarMax XH: Exit Function EH: Select Case Err.Number Case 9 '-- Subscript out of range - probably due to no values supplied Application.Echo True MaxOfVars = Null GoTo XH End Select End Function '--------------------- -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Arthur Fuller Sent: Saturday, July 23, 2011 7:54 AM To: Access Developers discussion and problem solving Subject: [AccessD] Max of 20 values I have a form into which the user enters up to 20 values (measurements in time). They all default to zero. I'm trying to think of an elegant way to find the max value among the 20. Create an array and bubble sort it? I want to call this code on the AfterUpdate of each of these 20 controls so the control called MaxReading gets a new value if any of the 20 controls goes higher than the current MaxReading value. TIA, Arthur -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From jwcolby at colbyconsulting.com Sat Jul 23 08:46:49 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Sat, 23 Jul 2011 09:46:49 -0400 Subject: [AccessD] Max of 20 values In-Reply-To: References: Message-ID: <4E2AD0C9.2090307@colbyconsulting.com> Bubble sort? Arthur!!! I think a set of classes... ;) Actually a simple function where you pass the control with the data just entered and the MaxReading control. The function compares the value just entered with max reading and sets maxreading to the new value if the new value is bigger. function SetMaxReading(ctlJustEntered as control, ctlMaxReading as control) if ctlJustEntered.Value > ctlMaxReading.value then ctlMaxReading.value = ctlJustEntered.Value endif end function If you need to set dirty false then pass in the form as well. John W. Colby www.ColbyConsulting.com On 7/23/2011 8:54 AM, Arthur Fuller wrote: > I have a form into which the user enters up to 20 values (measurements in > time). They all default to zero. I'm trying to think of an elegant way to > find the max value among the 20. Create an array and bubble sort it? I want > to call this code on the AfterUpdate of each of these 20 controls so the > control called MaxReading gets a new value if any of the 20 controls goes > higher than the current MaxReading value. > > TIA, > Arthur From fuller.artful at gmail.com Sat Jul 23 09:12:04 2011 From: fuller.artful at gmail.com (Arthur Fuller) Date: Sat, 23 Jul 2011 10:12:04 -0400 Subject: [AccessD] Max of 20 values In-Reply-To: <4E2AD0C9.2090307@colbyconsulting.com> References: <4E2AD0C9.2090307@colbyconsulting.com> Message-ID: 1. Pls forgive me my senior moments, JC. 2. You're such a classy guy, I just knew you'd come up with a set of classes. The problem is perhaps in the UI rather than the logic. So far, there is no prevention upon the user entering M1 then M3 then M20 and leaving all the others out. Granted, this style of data-entry doesn't make sense, but given user-sensibilities (the newly politically correct way to phrase Dumbass MoFo), I need to guard against such ostensibly intelligent responses to my form. I suppose that one possibility is in each AfterUpdate, force the Focus to the next in sequence. All that said, I shall work on implementing your approach. I just imported your code and aside from a couple of vbcrlfs if worked fine. The part I don't like is the specific reference to the active control. I have looked at ActiveControl and maybe that's the path I should follow. I want to compress this into one clean function that receives the currently active control and the currently defined maximum, and then reset the MaxGroupReading to the greater of these two values, so I can copy+paste said "=ComputeMax()" into all 20 of the AfterUpdate events and be done with it. Your last comment (about passing in the form) has immediate potential. In the real case, I have to do this four times, with fields numbered M1..M20, M21..M40, M41...M60 and M61...M80. Each of these lives on a separate tab's subform, but the algorithm remains the same throughout. There may or may not be data on everything beyond M20, as defined by the Parent form. If a WorkStation has only two LightCurtains, then LC1 and LC3 are defined with measures, and the others are not. (Please don't ask me why the sequence goes LC1, LC3, LC2 and LC4 -- I'm just a grunt programmer in the trenches, not a certified P.Eng). I just do what I'm told... which argument didn't work at Nuremberg and perhaps won't pass in Toronto, but that's my argument and I'm sticking to it. A. On Sat, Jul 23, 2011 at 9:46 AM, jwcolby wrote: > Bubble sort? > > Arthur!!! > > I think a set of classes... ;) > > Actually a simple function where you pass the control with the data just > entered and the MaxReading control. The function compares the value just > entered with max reading and sets maxreading to the new value if the new > value is bigger. > > function SetMaxReading(ctlJustEntered as control, ctlMaxReading as control) > > if ctlJustEntered.Value > ctlMaxReading.value then > ctlMaxReading.value = ctlJustEntered.Value > endif > end function > > If you need to set dirty false then pass in the form as well. > > John W. Colby > www.ColbyConsulting.com > > > From jwcolby at colbyconsulting.com Sat Jul 23 09:19:14 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Sat, 23 Jul 2011 10:19:14 -0400 Subject: [AccessD] Max of 20 values In-Reply-To: References: <4E2AD0C9.2090307@colbyconsulting.com> Message-ID: <4E2AD862.9060109@colbyconsulting.com> So you are saying that every single control needs data entered into it? John W. Colby www.ColbyConsulting.com On 7/23/2011 10:12 AM, Arthur Fuller wrote: > 1. Pls forgive me my senior moments, JC. > 2. You're such a classy guy, I just knew you'd come up with a set of > classes. > > The problem is perhaps in the UI rather than the logic. So far, there is no > prevention upon the user entering M1 then M3 then M20 and leaving all the > others out. Granted, this style of data-entry doesn't make sense, but given > user-sensibilities (the newly politically correct way to phrase Dumbass > MoFo), I need to guard against such ostensibly intelligent responses to my > form. I suppose that one possibility is in each AfterUpdate, force the Focus > to the next in sequence. > > All that said, I shall work on implementing your approach. I just imported > your code and aside from a couple of vbcrlfs if worked fine. The part I > don't like is the specific reference to the active control. I have looked at > ActiveControl and maybe that's the path I should follow. I want to compress > this into one clean function that receives the currently active control and > the currently defined maximum, and then reset the MaxGroupReading to the > greater of these two values, so I can copy+paste said "=ComputeMax()" into > all 20 of the AfterUpdate events and be done with it. > > Your last comment (about passing in the form) has immediate potential. In > the real case, I have to do this four times, with fields numbered M1..M20, > M21..M40, M41...M60 and M61...M80. Each of these lives on a separate tab's > subform, but the algorithm remains the same throughout. There may or may not > be data on everything beyond M20, as defined by the Parent form. If a > WorkStation has only two LightCurtains, then LC1 and LC3 are defined with > measures, and the others are not. (Please don't ask me why the sequence goes > LC1, LC3, LC2 and LC4 -- I'm just a grunt programmer in the trenches, not a > certified P.Eng). I just do what I'm told... which argument didn't work at > Nuremberg and perhaps won't pass in Toronto, but that's my argument and I'm > sticking to it. > > A. > > On Sat, Jul 23, 2011 at 9:46 AM, jwcolbywrote: > >> Bubble sort? >> >> Arthur!!! >> >> I think a set of classes... ;) >> >> Actually a simple function where you pass the control with the data just >> entered and the MaxReading control. The function compares the value just >> entered with max reading and sets maxreading to the new value if the new >> value is bigger. >> >> function SetMaxReading(ctlJustEntered as control, ctlMaxReading as control) >> >> if ctlJustEntered.Value> ctlMaxReading.value then >> ctlMaxReading.value = ctlJustEntered.Value >> endif >> end function >> >> If you need to set dirty false then pass in the form as well. >> >> John W. Colby >> www.ColbyConsulting.com >> >> >> From jwcolby at colbyconsulting.com Sat Jul 23 09:21:19 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Sat, 23 Jul 2011 10:21:19 -0400 Subject: [AccessD] Max of 20 values In-Reply-To: References: <4E2AD0C9.2090307@colbyconsulting.com> Message-ID: <4E2AD8DF.3020202@colbyconsulting.com> And further, given that you are working with such numbers of controls I would start leaning towards a class solution. Does this need to go into multiple forms? If so leaning further toward a class solution. Are the controls following a naming convention? Leaning further... From you original email I got that the user just entered any controls they wished, not every control. And you said nothing about multiple forms or tabs. John W. Colby www.ColbyConsulting.com On 7/23/2011 10:12 AM, Arthur Fuller wrote: > 1. Pls forgive me my senior moments, JC. > 2. You're such a classy guy, I just knew you'd come up with a set of > classes. > > The problem is perhaps in the UI rather than the logic. So far, there is no > prevention upon the user entering M1 then M3 then M20 and leaving all the > others out. Granted, this style of data-entry doesn't make sense, but given > user-sensibilities (the newly politically correct way to phrase Dumbass > MoFo), I need to guard against such ostensibly intelligent responses to my > form. I suppose that one possibility is in each AfterUpdate, force the Focus > to the next in sequence. > > All that said, I shall work on implementing your approach. I just imported > your code and aside from a couple of vbcrlfs if worked fine. The part I > don't like is the specific reference to the active control. I have looked at > ActiveControl and maybe that's the path I should follow. I want to compress > this into one clean function that receives the currently active control and > the currently defined maximum, and then reset the MaxGroupReading to the > greater of these two values, so I can copy+paste said "=ComputeMax()" into > all 20 of the AfterUpdate events and be done with it. > > Your last comment (about passing in the form) has immediate potential. In > the real case, I have to do this four times, with fields numbered M1..M20, > M21..M40, M41...M60 and M61...M80. Each of these lives on a separate tab's > subform, but the algorithm remains the same throughout. There may or may not > be data on everything beyond M20, as defined by the Parent form. If a > WorkStation has only two LightCurtains, then LC1 and LC3 are defined with > measures, and the others are not. (Please don't ask me why the sequence goes > LC1, LC3, LC2 and LC4 -- I'm just a grunt programmer in the trenches, not a > certified P.Eng). I just do what I'm told... which argument didn't work at > Nuremberg and perhaps won't pass in Toronto, but that's my argument and I'm > sticking to it. > > A. > > On Sat, Jul 23, 2011 at 9:46 AM, jwcolbywrote: > >> Bubble sort? >> >> Arthur!!! >> >> I think a set of classes... ;) >> >> Actually a simple function where you pass the control with the data just >> entered and the MaxReading control. The function compares the value just >> entered with max reading and sets maxreading to the new value if the new >> value is bigger. >> >> function SetMaxReading(ctlJustEntered as control, ctlMaxReading as control) >> >> if ctlJustEntered.Value> ctlMaxReading.value then >> ctlMaxReading.value = ctlJustEntered.Value >> endif >> end function >> >> If you need to set dirty false then pass in the form as well. >> >> John W. Colby >> www.ColbyConsulting.com >> >> >> From fuller.artful at gmail.com Sat Jul 23 09:40:19 2011 From: fuller.artful at gmail.com (Arthur Fuller) Date: Sat, 23 Jul 2011 10:40:19 -0400 Subject: [AccessD] Max of 20 values In-Reply-To: <4E2AD8DF.3020202@colbyconsulting.com> References: <4E2AD0C9.2090307@colbyconsulting.com> <4E2AD8DF.3020202@colbyconsulting.com> Message-ID: Excellent questions, all. Here, as briefly as I can make it, is the scenario. There is an object called a workstation. It may have up to 4 LightCurtains (these devices shoot beams of light from Right to Left and detect the interruption of said beam by any object, typically an operator's hand. Upon detection, the machine must shut down within several milliseconds; a typical measurement would be 220. The Safety Engineer tests this by inserting his hand into the gap between sender and receiver, then measures the Shutdown Time. He does this 20 times. Although one would have to be an idiot to record M1 then M17 then M2 then M20, the current implementation does not prevent this idiocy. The measures are taken on a subform. The MaxReading exists on the parent form. That part I've got already. I'm not even sure what I'm looking for here; perhaps basically a defense against entering M1 then M10 then M11 then M20. Chances are that the user would not do this, but I feel the need to protect against it. Further, there are a maximum of 4 LCs (call them N, S, W, E) and in addition 4 Two-Handed-Controls (THCs, in the lingo), each of which has up to 20 Measurements. So I'm looking for a clean and elegant way to: a) prevent you entering Measure 3 without having entered Measure 2. b) to grab the value of the most recently entered Measurement and compare it against the MaxReading so far recorded. I have b) solved. a) is another matter, and I have no idea how to handle it, except perhaps by forcing the focus to the next M# in the AfterUpdate event. There has got to be something slicker than that, I just know it. A. On Sat, Jul 23, 2011 at 10:21 AM, jwcolby wrote: > And further, given that you are working with such numbers of controls I > would start leaning towards a class solution. Does this need to go into > multiple forms? If so leaning further toward a class solution. Are the > controls following a naming convention? Leaning further... > > From you original email I got that the user just entered any controls they > wished, not every control. And you said nothing about multiple forms or > tabs. > > > John W. Colby > www.ColbyConsulting.com > > On 7/23/2011 10:12 AM, Arthur Fuller wrote: > >> 1. Pls forgive me my senior moments, JC. >> 2. You're such a classy guy, I just knew you'd come up with a set of >> classes. >> >> The problem is perhaps in the UI rather than the logic. So far, there is >> no >> prevention upon the user entering M1 then M3 then M20 and leaving all the >> others out. Granted, this style of data-entry doesn't make sense, but >> given >> user-sensibilities (the newly politically correct way to phrase Dumbass >> MoFo), I need to guard against such ostensibly intelligent responses to my >> form. I suppose that one possibility is in each AfterUpdate, force the >> Focus >> to the next in sequence. >> >> All that said, I shall work on implementing your approach. I just imported >> your code and aside from a couple of vbcrlfs if worked fine. The part I >> don't like is the specific reference to the active control. I have looked >> at >> ActiveControl and maybe that's the path I should follow. I want to >> compress >> this into one clean function that receives the currently active control >> and >> the currently defined maximum, and then reset the MaxGroupReading to the >> greater of these two values, so I can copy+paste said "=ComputeMax()" into >> all 20 of the AfterUpdate events and be done with it. >> >> Your last comment (about passing in the form) has immediate potential. In >> the real case, I have to do this four times, with fields numbered M1..M20, >> M21..M40, M41...M60 and M61...M80. Each of these lives on a separate tab's >> subform, but the algorithm remains the same throughout. There may or may >> not >> be data on everything beyond M20, as defined by the Parent form. If a >> WorkStation has only two LightCurtains, then LC1 and LC3 are defined with >> measures, and the others are not. (Please don't ask me why the sequence >> goes >> LC1, LC3, LC2 and LC4 -- I'm just a grunt programmer in the trenches, not >> a >> certified P.Eng). I just do what I'm told... which argument didn't work at >> Nuremberg and perhaps won't pass in Toronto, but that's my argument and >> I'm >> sticking to it. >> >> A. >> >> On Sat, Jul 23, 2011 at 9:46 AM, jwcolby >> >wrote: >> >> Bubble sort? >>> >>> Arthur!!! >>> >>> I think a set of classes... ;) >>> >>> Actually a simple function where you pass the control with the data just >>> entered and the MaxReading control. The function compares the value just >>> entered with max reading and sets maxreading to the new value if the new >>> value is bigger. >>> >>> function SetMaxReading(ctlJustEntered as control, ctlMaxReading as >>> control) >>> >>> if ctlJustEntered.Value> ctlMaxReading.value then >>> ctlMaxReading.value = ctlJustEntered.Value >>> endif >>> end function >>> >>> If you need to set dirty false then pass in the form as well. >>> >>> John W. Colby >>> www.ColbyConsulting.com >>> >>> >>> >>> -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/**mailman/listinfo/accessd > Website: http://www.databaseadvisors.**com > From jwcolby at colbyconsulting.com Sat Jul 23 10:05:27 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Sat, 23 Jul 2011 11:05:27 -0400 Subject: [AccessD] Max of 20 values In-Reply-To: References: <4E2AD0C9.2090307@colbyconsulting.com> <4E2AD8DF.3020202@colbyconsulting.com> Message-ID: <4E2AE337.3050705@colbyconsulting.com> So IOW the readings the engineer takes when he sticks his hand in the light curtain need to be entered in sequential order in the controls? I am way leaning towards a class solution now. I would probably go with a class to hold the control and sink it's events and a parent class with 20 control class variables to hold instances of the control class (assuming that the number of controls (readings) will never change). Each control class raises an event to tell the parent to "step" the sequence. The parent has the stepping code, the control class has the locking / unlocking code. I might even turn the background a different color to visually cue the user. That would also be in the control class. The class would have a method of setting the control enable property. The parent class would load every one of the controls in the (sub) form into a class instance and as they load set all but the first Enable to false. As the Engineer enters the first reading and AfterUpdate fires, the next sequential control (class instance) is enabled, the focus set to that and the current control disabled. Voila, "stepping" enabled controls. Or perhaps instead of enable / disable, use the Locked property. This would allow the user to do something like a double click in the previous control if they made a data entry error, but only immediately. IOW before entering data into the next control Classes would make this whole thing much simpler because all of the code for the manipulation of the control itself would be kept in the control class instead of the form. Further the whole thing "replicates" in each subform simply by instantiating the parent class. The parent class could even load the control classes into the collection. If the order of entering the readings into the controls does not matter, IOW if it is not critical to have reading one entered into control one, then don't worry about it. Just lock the control and allow the user to click in another. But I think the "stepping" paradigm is the cleanest. And of course, as Stuart will point out, you don't have to use classes at all. You could just stuff all of the code in each subform. And enter the nightmare of fixing code in every subform if you find an issue or add a feature. If you are interested I can code this in under an hour. John W. Colby www.ColbyConsulting.com On 7/23/2011 10:40 AM, Arthur Fuller wrote: > Excellent questions, all. > > Here, as briefly as I can make it, is the scenario. There is an object > called a workstation. It may have up to 4 LightCurtains (these devices shoot > beams of light from Right to Left and detect the interruption of said beam > by any object, typically an operator's hand. Upon detection, the machine > must shut down within several milliseconds; a typical measurement would be > 220. The Safety Engineer tests this by inserting his hand into the gap > between sender and receiver, then measures the Shutdown Time. He does this > 20 times. > > Although one would have to be an idiot to record M1 then M17 then M2 then > M20, the current implementation does not prevent this idiocy. > > The measures are taken on a subform. The MaxReading exists on the parent > form. That part I've got already. > > I'm not even sure what I'm looking for here; perhaps basically a defense > against entering M1 then M10 then M11 then M20. Chances are that the user > would not do this, but I feel the need to protect against it. > > Further, there are a maximum of 4 LCs (call them N, S, W, E) and in addition > 4 Two-Handed-Controls (THCs, in the lingo), each of which has up to 20 > Measurements. > > So I'm looking for a clean and elegant way to: > > a) prevent you entering Measure 3 without having entered Measure 2. > b) to grab the value of the most recently entered Measurement and compare it > against the MaxReading so far recorded. > > I have b) solved. a) is another matter, and I have no idea how to handle it, > except perhaps by forcing the focus to the next M# in the AfterUpdate event. > There has got to be something slicker than that, I just know it. > > A. > > On Sat, Jul 23, 2011 at 10:21 AM, jwcolbywrote: > >> And further, given that you are working with such numbers of controls I >> would start leaning towards a class solution. Does this need to go into >> multiple forms? If so leaning further toward a class solution. Are the >> controls following a naming convention? Leaning further... >> >> From you original email I got that the user just entered any controls they >> wished, not every control. And you said nothing about multiple forms or >> tabs. >> >> >> John W. Colby >> www.ColbyConsulting.com >> >> On 7/23/2011 10:12 AM, Arthur Fuller wrote: >> >>> 1. Pls forgive me my senior moments, JC. >>> 2. You're such a classy guy, I just knew you'd come up with a set of >>> classes. >>> >>> The problem is perhaps in the UI rather than the logic. So far, there is >>> no >>> prevention upon the user entering M1 then M3 then M20 and leaving all the >>> others out. Granted, this style of data-entry doesn't make sense, but >>> given >>> user-sensibilities (the newly politically correct way to phrase Dumbass >>> MoFo), I need to guard against such ostensibly intelligent responses to my >>> form. I suppose that one possibility is in each AfterUpdate, force the >>> Focus >>> to the next in sequence. >>> >>> All that said, I shall work on implementing your approach. I just imported >>> your code and aside from a couple of vbcrlfs if worked fine. The part I >>> don't like is the specific reference to the active control. I have looked >>> at >>> ActiveControl and maybe that's the path I should follow. I want to >>> compress >>> this into one clean function that receives the currently active control >>> and >>> the currently defined maximum, and then reset the MaxGroupReading to the >>> greater of these two values, so I can copy+paste said "=ComputeMax()" into >>> all 20 of the AfterUpdate events and be done with it. >>> >>> Your last comment (about passing in the form) has immediate potential. In >>> the real case, I have to do this four times, with fields numbered M1..M20, >>> M21..M40, M41...M60 and M61...M80. Each of these lives on a separate tab's >>> subform, but the algorithm remains the same throughout. There may or may >>> not >>> be data on everything beyond M20, as defined by the Parent form. If a >>> WorkStation has only two LightCurtains, then LC1 and LC3 are defined with >>> measures, and the others are not. (Please don't ask me why the sequence >>> goes >>> LC1, LC3, LC2 and LC4 -- I'm just a grunt programmer in the trenches, not >>> a >>> certified P.Eng). I just do what I'm told... which argument didn't work at >>> Nuremberg and perhaps won't pass in Toronto, but that's my argument and >>> I'm >>> sticking to it. >>> >>> A. >>> >>> On Sat, Jul 23, 2011 at 9:46 AM, jwcolby >>>> wrote: >>> >>> Bubble sort? >>>> >>>> Arthur!!! >>>> >>>> I think a set of classes... ;) >>>> >>>> Actually a simple function where you pass the control with the data just >>>> entered and the MaxReading control. The function compares the value just >>>> entered with max reading and sets maxreading to the new value if the new >>>> value is bigger. >>>> >>>> function SetMaxReading(ctlJustEntered as control, ctlMaxReading as >>>> control) >>>> >>>> if ctlJustEntered.Value> ctlMaxReading.value then >>>> ctlMaxReading.value = ctlJustEntered.Value >>>> endif >>>> end function >>>> >>>> If you need to set dirty false then pass in the form as well. >>>> >>>> John W. Colby >>>> www.ColbyConsulting.com >>>> >>>> >>>> >>>> -- >> AccessD mailing list >> AccessD at databaseadvisors.com >> http://databaseadvisors.com/**mailman/listinfo/accessd >> Website: http://www.databaseadvisors.**com >> From fuller.artful at gmail.com Sat Jul 23 10:28:52 2011 From: fuller.artful at gmail.com (Arthur Fuller) Date: Sat, 23 Jul 2011 11:28:52 -0400 Subject: [AccessD] Max of 20 values In-Reply-To: <4E2AE337.3050705@colbyconsulting.com> References: <4E2AD0C9.2090307@colbyconsulting.com> <4E2AD8DF.3020202@colbyconsulting.com> <4E2AE337.3050705@colbyconsulting.com> Message-ID: Ok, I won't pay you a penny but go ahead and code it. There are four subforms, call them LC#_fsub, each tied to a parent whose values derive from the subform. I have this working for subform1 and can clone the sub proc for each of them, but this strikes me as seriously inelegant. This topic raises an ancillory question: supposing a number of fields named M1...M20, how can one code a loop that grabs their names and walks the loop and obtains these controls' values? Perhaps Eval? I am seriously unsure upon this turf. A. From jwcolby at colbyconsulting.com Sat Jul 23 10:36:01 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Sat, 23 Jul 2011 11:36:01 -0400 Subject: [AccessD] Max of 20 values In-Reply-To: References: <4E2AD0C9.2090307@colbyconsulting.com> <4E2AD8DF.3020202@colbyconsulting.com> <4E2AE337.3050705@colbyconsulting.com> Message-ID: <4E2AEA61.2060809@colbyconsulting.com> > This topic raises an ancillory question: supposing a number of fields named M1...M20, how can one code a loop that grabs their names and walks the loop and obtains these controls' values? Each form has a controls collection dim ctl as control for each ctl in me.controls 'now look at the control name next ctl Having a nice neat naming convention helps. M01, M02 etc allows you to simply do if left(ctl.name,1) = "m" then debug.print ctl.value endif John W. Colby www.ColbyConsulting.com On 7/23/2011 11:28 AM, Arthur Fuller wrote: > Ok, I won't pay you a penny but go ahead and code it. There are four > subforms, call them LC#_fsub, each tied to a parent whose values derive from > the subform. I have this working for subform1 and can clone the sub proc for > each of them, but this strikes me as seriously inelegant. > > This topic raises an ancillory question: supposing a number of fields named > M1...M20, how can one code a loop that grabs their names and walks the loop > and obtains these controls' values? Perhaps Eval? I am seriously unsure upon > this turf. > > A. From df.waters at comcast.net Sat Jul 23 10:35:08 2011 From: df.waters at comcast.net (Dan Waters) Date: Sat, 23 Jul 2011 10:35:08 -0500 Subject: [AccessD] Re Max of 20 values Message-ID: <001b01cc494e$1af91530$50eb3f90$@comcast.net> Hi Arthur, I found this function in my library file. This uses a parameter array and just loops through looking for the highest one. HTH! Dan '--------------------- Private Sub textMaxOfVars() MsgBox MaxOfVars(20, 30, Null, -7, 8, 87.23, "top") End Sub Public Function MaxOfVars(ParamArray varValues() As Variant) On Error GoTo EH '-- Purpose: Return a max of variants. Note that any string will be larger than any numeric value. Dim lvarVal As Variant Dim lvarMax As Variant lvarMax = varValues(0) For Each lvarVal In varValues If lvarVal > lvarMax Then lvarMax = lvarVal End If Next lvarVal MaxOfVars = lvarMax XH: Exit Function EH: Select Case Err.Number Case 9 '-- Subscript out of range - probably due to no values supplied Application.Echo True MaxOfVars = Null GoTo XH End Select End Function '--------------------- -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Arthur Fuller Sent: Saturday, July 23, 2011 7:54 AM To: Access Developers discussion and problem solving Subject: [AccessD] Max of 20 values I have a form into which the user enters up to 20 values (measurements in time). They all default to zero. I'm trying to think of an elegant way to find the max value among the 20. Create an array and bubble sort it? I want to call this code on the AfterUpdate of each of these 20 controls so the control called MaxReading gets a new value if any of the 20 controls goes higher than the current MaxReading value. TIA, Arthur -- 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 jwcolby at colbyconsulting.com Sat Jul 23 10:39:38 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Sat, 23 Jul 2011 11:39:38 -0400 Subject: [AccessD] Max of 20 values In-Reply-To: References: <4E2AD0C9.2090307@colbyconsulting.com> <4E2AD8DF.3020202@colbyconsulting.com> <4E2AE337.3050705@colbyconsulting.com> Message-ID: <4E2AEB3A.8010008@colbyconsulting.com> How many subforms is irrelevant once you have a parent class. You instantiate the parent in the form and pass in the controls and off you go. John W. Colby www.ColbyConsulting.com On 7/23/2011 11:28 AM, Arthur Fuller wrote: > Ok, I won't pay you a penny but go ahead and code it. There are four > subforms, call them LC#_fsub, each tied to a parent whose values derive from > the subform. I have this working for subform1 and can clone the sub proc for > each of them, but this strikes me as seriously inelegant. > > This topic raises an ancillory question: supposing a number of fields named > M1...M20, how can one code a loop that grabs their names and walks the loop > and obtains these controls' values? Perhaps Eval? I am seriously unsure upon > this turf. > > A. From fuller.artful at gmail.com Sat Jul 23 10:41:29 2011 From: fuller.artful at gmail.com (Arthur Fuller) Date: Sat, 23 Jul 2011 11:41:29 -0400 Subject: [AccessD] Max of 20 values In-Reply-To: <4E2AEA61.2060809@colbyconsulting.com> References: <4E2AD0C9.2090307@colbyconsulting.com> <4E2AD8DF.3020202@colbyconsulting.com> <4E2AE337.3050705@colbyconsulting.com> <4E2AEA61.2060809@colbyconsulting.com> Message-ID: I see what you're getting at but the part I don't like about this approach is its need to visit all the controls, when I'm concerned only about the ones that begin with "M" followed by a number. In this case, isn't it better to create a collection based on this naming scheme? This is just a question; you're the class guy. A. From fuller.artful at gmail.com Sat Jul 23 10:45:08 2011 From: fuller.artful at gmail.com (Arthur Fuller) Date: Sat, 23 Jul 2011 11:45:08 -0400 Subject: [AccessD] Re Max of 20 values In-Reply-To: <001b01cc494e$1af91530$50eb3f90$@comcast.net> References: <001b01cc494e$1af91530$50eb3f90$@comcast.net> Message-ID: If I understand what you are saying, I ought to create an array consisting of M1...M29 and pass it to said function, and let the function walk through the array to determine the max value. Is that right? Thx. Arthur On Sat, Jul 23, 2011 at 11:35 AM, Dan Waters wrote: > Hi Arthur, > > I found this function in my library file. This uses a parameter array and > just loops through looking for the highest one. > > From john at winhaven.net Sat Jul 23 11:09:16 2011 From: john at winhaven.net (John Bartow) Date: Sat, 23 Jul 2011 11:09:16 -0500 Subject: [AccessD] report detail - conditional formatting Message-ID: <068301cc4952$df49e690$9dddb3b0$@winhaven.net> Is it possible to create conditional formatting per detail line in an Access report? I would like to have certain items print in bold. TIA John B From jwcolby at colbyconsulting.com Sat Jul 23 11:11:19 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Sat, 23 Jul 2011 12:11:19 -0400 Subject: [AccessD] Max of 20 values In-Reply-To: References: <4E2AD0C9.2090307@colbyconsulting.com> <4E2AD8DF.3020202@colbyconsulting.com> <4E2AE337.3050705@colbyconsulting.com> <4E2AEA61.2060809@colbyconsulting.com> Message-ID: <4E2AF2A7.70401@colbyconsulting.com> I am just addressing how to find the controls not what you do with them when you find them. You could walk the collection once adding the control into a collection when it matches the name. Once you do that then you walk your collection instead of the form's. John W. Colby www.ColbyConsulting.com On 7/23/2011 11:41 AM, Arthur Fuller wrote: > I see what you're getting at but the part I don't like about this approach > is its need to visit all the controls, when I'm concerned only about the > ones that begin with "M" followed by a number. In this case, isn't it better > to create a collection based on this naming scheme? This is just a question; > you're the class guy. > > A. From gustav at cactus.dk Sat Jul 23 11:31:51 2011 From: gustav at cactus.dk (Gustav Brock) Date: Sat, 23 Jul 2011 18:31:51 +0200 Subject: [AccessD] Max of 20 values Message-ID: Hi John and Arthur You also could loop exactly the controls in question: Set frm = Me.Form 'or a subform. For intControlM = 1 To 20 Set ctl = frm.Controls("M" & CStr(intControlM)) ' Do stuff. Next /gustav >>> jwcolby at colbyconsulting.com 23-07-2011 18:11:19 >>> I am just addressing how to find the controls not what you do with them when you find them. You could walk the collection once adding the control into a collection when it matches the name. Once you do that then you walk your collection instead of the form's. John W. Colby www.ColbyConsulting.com On 7/23/2011 11:41 AM, Arthur Fuller wrote: > I see what you're getting at but the part I don't like about this approach > is its need to visit all the controls, when I'm concerned only about the > ones that begin with "M" followed by a number. In this case, isn't it better > to create a collection based on this naming scheme? This is just a question; > you're the class guy. > > A. From fuller.artful at gmail.com Sat Jul 23 11:50:49 2011 From: fuller.artful at gmail.com (Arthur Fuller) Date: Sat, 23 Jul 2011 12:50:49 -0400 Subject: [AccessD] Max of 20 values In-Reply-To: References: Message-ID: Hmmm. I didn't know you could do that. Kewl I'll just scamper off and write a little looper thing and see if it works! Thx, A. On Sat, Jul 23, 2011 at 12:31 PM, Gustav Brock wrote: > Hi John and Arthur > > You also could loop exactly the controls in question: > > Set frm = Me.Form 'or a subform. > For intControlM = 1 To 20 > Set ctl = frm.Controls("M" & CStr(intControlM)) > ' Do stuff. > Next > > /gustav > > > From fuller.artful at gmail.com Sat Jul 23 11:55:18 2011 From: fuller.artful at gmail.com (Arthur Fuller) Date: Sat, 23 Jul 2011 12:55:18 -0400 Subject: [AccessD] report detail - conditional formatting In-Reply-To: <068301cc4952$df49e690$9dddb3b0$@winhaven.net> References: <068301cc4952$df49e690$9dddb3b0$@winhaven.net> Message-ID: I'm not sure why the conditions would apply per detail line, or even what you mean by the question, but just supposing that you are listing, say Categories, then CategoryID would define the CategoryPrice field and say it's Red if Category = 1 or Green if CategoryID = 2, and so on. I fail to see the problem here; forgive me my stupidity here. Bold should not be more difficult than colours. A, On Sat, Jul 23, 2011 at 12:09 PM, John Bartow wrote: > Is it possible to create conditional formatting per detail line in an > Access > report? > > I would like to have certain items print in bold. > > TIA > John B > > From jwcolby at colbyconsulting.com Sat Jul 23 12:32:52 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Sat, 23 Jul 2011 13:32:52 -0400 Subject: [AccessD] Max of 20 values In-Reply-To: References: Message-ID: <4E2B05C4.50903@colbyconsulting.com> Arthur, I sent you a class solution offline. The assumption was that you wanted to lock all but the currently available control and then walk through the controls allowing just the next control to become enabled. I did a little coloring since it is free. It would be possible to unlock the previous for editing if necessary. That adds additional logic and I didn't want to obscure what I am doing with that code until the specs call for it. ;) John W. Colby www.ColbyConsulting.com From BradM at blackforestltd.com Sat Jul 23 13:58:25 2011 From: BradM at blackforestltd.com (Brad Marks) Date: Sat, 23 Jul 2011 13:58:25 -0500 Subject: [AccessD] Exporting from an Access 2007 Query to Excel - DoCmd.OutputTo Versus DoCmd.TransferSpreadsheet References: <4E2AD0C9.2090307@colbyconsulting.com><4E2AD8DF.3020202@colbyconsulting.com><4E2AE337.3050705@colbyconsulting.com><4E2AEA61.2060809@colbyconsulting.com> Message-ID: All, I am curious if there are significant differences between using "DoCmd.OutputTo" Versus "DoCmd.TransferSpreadsheet" when exporting an Access 2007 Query to Excel. As I understand it, TransferSpreadsheet can handle more rows, but I was wondering if there are any other differences that should be kept in mind when choosing between these two approaches. Thanks, Brad From df.waters at comcast.net Sat Jul 23 16:22:13 2011 From: df.waters at comcast.net (Dan Waters) Date: Sat, 23 Jul 2011 16:22:13 -0500 Subject: [AccessD] Re Max of 20 values In-Reply-To: References: <001b01cc494e$1af91530$50eb3f90$@comcast.net> Message-ID: <002801cc497e$98b29890$ca17c9b0$@comcast.net> Exactly! Since you have a fixed set of controls it's write once and walk away. And you have a MaxOfVars function for future use. Null values are ignored. Good Luck! Dan -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Arthur Fuller Sent: Saturday, July 23, 2011 10:45 AM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Re Max of 20 values If I understand what you are saying, I ought to create an array consisting of M1...M29 and pass it to said function, and let the function walk through the array to determine the max value. Is that right? Thx. Arthur On Sat, Jul 23, 2011 at 11:35 AM, Dan Waters wrote: > Hi Arthur, > > I found this function in my library file. This uses a parameter array > and just loops through looking for the highest one. > > -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From rockysmolin at bchacc.com Sat Jul 23 16:30:52 2011 From: rockysmolin at bchacc.com (Rocky Smolin) Date: Sat, 23 Jul 2011 14:30:52 -0700 Subject: [AccessD] report detail - conditional formatting In-Reply-To: <068301cc4952$df49e690$9dddb3b0$@winhaven.net> References: <068301cc4952$df49e690$9dddb3b0$@winhaven.net> Message-ID: <53C8E31E1BFA4ACC8FD459D6E099DE09@HAL9007> John: I use the Detail Format event to do this. Will that work? R -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of John Bartow Sent: Saturday, July 23, 2011 9:09 AM To: DBA-Access Subject: [AccessD] report detail - conditional formatting Is it possible to create conditional formatting per detail line in an Access report? I would like to have certain items print in bold. TIA John B -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From vbacreations at gmail.com Sat Jul 23 20:27:08 2011 From: vbacreations at gmail.com (William Benson (VBACreations.Com)) Date: Sat, 23 Jul 2011 21:27:08 -0400 Subject: [AccessD] Re Max of 20 values In-Reply-To: References: <001b01cc494e$1af91530$50eb3f90$@comcast.net> Message-ID: <000d01cc49a0$ce8242a0$6b86c7e0$@gmail.com> Going back to the original inquiry. John's right, class modules are the way to go. Assumptions: Tag property on all controls which can contain a time value = "Time Values" I have an additional textbox on my form with controlsource = "= HighestValue()" -- that is a public function -- see below 'IN THE FORM'S CODE MODULE Option Compare Database Option Explicit Dim colTimeValueControls As New Collection Dim MyclsSeriesItem As clsTimeSeriesItem Private Sub Form_Load() Dim Ctrl As Control Glob_Dbl_What_Is_Current_Max = 0 Glob_Str_Which_Control_Has_Max = "" For Each Ctrl In Me.Controls If ControlIsTimeValue(Ctrl, TimeValueTag) Then Set MyclsSeriesItem = New clsTimeSeriesItem Set MyclsSeriesItem.Txt = Ctrl MyclsSeriesItem.Txt.AfterUpdate = "[Event Procedure]" colTimeValueControls.Add MyclsSeriesItem End If Next End Sub 'IN A Class Module named clsTimeSeriesItem Option Compare Database Option Explicit Public WithEvents aTxt As Access.TextBox Private Sub aTxt_AfterUpdate() Dim bTestAllControls As Boolean Dim Ctrl As Control bTestAllControls = False If IsNumeric(aTxt.Value) Then If CDbl(Nz(aTxt.Value, 0)) >= Glob_Dbl_What_Is_Current_Max Then Glob_Dbl_What_Is_Current_Max = CDbl(aTxt.Value) Glob_Str_Which_Control_Has_Max = aTxt.Name ElseIf Glob_Str_Which_Control_Has_Max <> aTxt.Name Then 'DO NOTHING, some other control has the max value anyway Else 'It is numeric, it was the max, and it no longer is as high as the max was bTestAllControls = True End If ElseIf Glob_Str_Which_Control_Has_Max = aTxt.Name Then bTestAllControls = True Else 'We don't care if it went non-numeric, it didn't hold the max value prior to now End If If bTestAllControls Then Glob_Str_Which_Control_Has_Max = "" Glob_Dbl_What_Is_Current_Max = 0 For Each Ctrl In aTxt.Parent.Controls If ControlIsTimeValue(Ctrl, TimeValueTag) Then If IsNumeric(Nz(Ctrl.Value, "")) Then If CDbl(Nz(Ctrl.Value, 0)) > Glob_Dbl_What_Is_Current_Max Then Glob_Dbl_What_Is_Current_Max = CDbl(Nz(Ctrl.Value, 0)) Glob_Str_Which_Control_Has_Max = Ctrl.Name End If End If End If Next End If For Each Ctrl In aTxt.Parent.Controls If TypeOf Ctrl Is Access.TextBox Then If Ctrl.Tag = "Max Time Value" Then Ctrl.Requery Exit For End If End If Next End Sub Public Property Set Txt(ByVal ControlThatChanged As Control) If TypeOf ControlThatChanged Is Access.TextBox Then Set aTxt = ControlThatChanged End If End Property Public Property Get Txt() As Access.TextBox If Not aTxt Is Nothing Then Set Txt = aTxt End If End Property 'IN A STANDARD MODULE Public Glob_Str_Which_Control_Has_Max As String Public Glob_Dbl_What_Is_Current_Max As Double Public Function TimeValueTag() As String TimeValueTag = "Time Values" End Function Public Function ControlIsTimeValue(Ctrl As Control, strTagToLookFor As String) As Boolean If TypeOf Ctrl Is Access.TextBox Then ControlIsTimeValue = (Ctrl.Tag = strTagToLookFor) End If End Function Public Function HighestValue() HighestValue = Glob_Dbl_What_Is_Current_Max End Function From rbgajewski at roadrunner.com Sat Jul 23 22:32:50 2011 From: rbgajewski at roadrunner.com (Bob Gajewski) Date: Sat, 23 Jul 2011 23:32:50 -0400 Subject: [AccessD] report detail - conditional formatting In-Reply-To: <068301cc4952$df49e690$9dddb3b0$@winhaven.net> References: <068301cc4952$df49e690$9dddb3b0$@winhaven.net> Message-ID: Hi John You can do just about anything with formatting in the Detail section ... Here are some examples: The "Detail_Print" code makes every other line grey ... Kind of a green-bar paper effect. The "Detail_Format" section checks the value of a field, and if it matches a set value, then a colored textbox become visible behind the other fields ... Else is remains hidden. You can control font formatting the same way ... Bold, italic, underline, etc. Regards, Bob Gajewski Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer) Const conLtGray = 13816530 If Detail.BackColor = conLtGray Then Detail.BackColor = vbWhite Else Detail.BackColor = conLtGray End If End Sub Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer) If Me.CardexStreetSide = "(intersection)" Then If Me.CardexIntersectingStreetID = 327 Then Me.txtIntersectionHighlight = "" Me.txtIntersectionHighlight.Visible = False Me.txtBridgeOverCreekHighlight = " " Me.txtBridgeOverCreekHighlight.Visible = True Else Me.txtIntersectionHighlight = " " Me.txtIntersectionHighlight.Visible = True Me.txtBridgeOverCreekHighlight = "" Me.txtBridgeOverCreekHighlight.Visible = False End If Me.SectorNumber.Visible = False Me.txtCoordinates.Visible = True Else Me.Occupant = Me.Occupant Me.txtIntersectionHighlight = "" Me.txtIntersectionHighlight.Visible = False Me.txtBridgeOverCreekHighlight = "" Me.txtBridgeOverCreekHighlight.Visible = False Me.SectorNumber.Visible = True Me.txtCoordinates.Visible = False End If End Sub -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of John Bartow Sent: Saturday, July 23, 2011 12:09 PM To: DBA-Access Subject: [AccessD] report detail - conditional formatting Is it possible to create conditional formatting per detail line in an Access report? I would like to have certain items print in bold. TIA John B -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From fuller.artful at gmail.com Sun Jul 24 01:41:21 2011 From: fuller.artful at gmail.com (Arthur Fuller) Date: Sun, 24 Jul 2011 02:41:21 -0400 Subject: [AccessD] Re Max of 20 values In-Reply-To: <000d01cc49a0$ce8242a0$6b86c7e0$@gmail.com> References: <001b01cc494e$1af91530$50eb3f90$@comcast.net> <000d01cc49a0$ce8242a0$6b86c7e0$@gmail.com> Message-ID: Thanks! A. On Sat, Jul 23, 2011 at 9:27 PM, William Benson (VBACreations.Com) < vbacreations at gmail.com> wrote: > Going back to the original inquiry. John's right, class modules are the way > to go. > > From phpons at gmail.com Sun Jul 24 03:29:30 2011 From: phpons at gmail.com (philippe pons) Date: Sun, 24 Jul 2011 10:29:30 +0200 Subject: [AccessD] 97 to 2007 Performance issue Message-ID: Dear all, I need your advice re performance issue. I recently migrated an Access 1997 application to Access 2007. It has not been possible to put the app in production at the moment. My customer put it in production the last days, and he reports a heavy reduction in terms of reactivity. Back end on a server, front end on user desktop. Did you ever run into such problems? What would be the possible causes? I get to the customer tomorrow. Thanks in advance for any help, Philippe Pons From vbacreations at gmail.com Sun Jul 24 07:16:05 2011 From: vbacreations at gmail.com (William Benson) Date: Sun, 24 Jul 2011 08:16:05 -0400 Subject: [AccessD] Re Max of 20 values In-Reply-To: References: <001b01cc494e$1af91530$50eb3f90$@comcast.net> <000d01cc49a0$ce8242a0$6b86c7e0$@gmail.com> Message-ID: Arthur... if you do try it out ... maybe you will see-- as I do-- that the textbox holding the highest value at all times seems to take about 200 or300 milliseconds to update. Though it's the same whether 5 or 100 controls (textboxes.) I feel this is slow. Too slow. I assume the Requery is taking the time... because the value in the result box goes blank for entire 200 mil. So maybe there is a better way than the function I bound it to or a faster alternative to requery. On Jul 24, 2011 2:42 AM, "Arthur Fuller" wrote: > Thanks! > > A. > > On Sat, Jul 23, 2011 at 9:27 PM, William Benson (VBACreations.Com) < > vbacreations at gmail.com> wrote: > >> Going back to the original inquiry. John's right, class modules are the way >> to go. >> >> > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com From rockysmolin at bchacc.com Sun Jul 24 09:59:52 2011 From: rockysmolin at bchacc.com (Rocky Smolin) Date: Sun, 24 Jul 2011 07:59:52 -0700 Subject: [AccessD] 97 to 2007 Performance issue In-Reply-To: References: Message-ID: I find that 2007 runs MUCH slower than 97 or 2003. That's why I still develop in 2003 - the awkward IDE aside. Why this is I don't know. I've got 2010 but haven't benchmarked it yet to see if it's any faster than 2007. Has anyone done this? Rocky -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of philippe pons Sent: Sunday, July 24, 2011 1:30 AM To: Access Developers discussion and problem solving Subject: [AccessD] 97 to 2007 Performance issue Dear all, I need your advice re performance issue. I recently migrated an Access 1997 application to Access 2007. It has not been possible to put the app in production at the moment. My customer put it in production the last days, and he reports a heavy reduction in terms of reactivity. Back end on a server, front end on user desktop. Did you ever run into such problems? What would be the possible causes? I get to the customer tomorrow. Thanks in advance for any help, Philippe Pons -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From john at winhaven.net Sun Jul 24 11:08:34 2011 From: john at winhaven.net (John Bartow) Date: Sun, 24 Jul 2011 11:08:34 -0500 Subject: [AccessD] report detail - conditional formatting In-Reply-To: References: <068301cc4952$df49e690$9dddb3b0$@winhaven.net> Message-ID: <07e201cc4a1b$f0bbbe70$d2333b50$@winhaven.net> Thanks all. I'll follow these suggestions and post back if I have any follow ups. (I've been formatting with PhP lately so I needed a thought refresher on Access Report formatting.) -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Bob Gajewski Sent: Saturday, July 23, 2011 10:33 PM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] report detail - conditional formatting Hi John You can do just about anything with formatting in the Detail section ... Here are some examples: The "Detail_Print" code makes every other line grey ... Kind of a green-bar paper effect. The "Detail_Format" section checks the value of a field, and if it matches a set value, then a colored textbox become visible behind the other fields ... Else is remains hidden. You can control font formatting the same way ... Bold, italic, underline, etc. Regards, Bob Gajewski Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer) Const conLtGray = 13816530 If Detail.BackColor = conLtGray Then Detail.BackColor = vbWhite Else Detail.BackColor = conLtGray End If End Sub Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer) If Me.CardexStreetSide = "(intersection)" Then If Me.CardexIntersectingStreetID = 327 Then Me.txtIntersectionHighlight = "" Me.txtIntersectionHighlight.Visible = False Me.txtBridgeOverCreekHighlight = " " Me.txtBridgeOverCreekHighlight.Visible = True Else Me.txtIntersectionHighlight = " " Me.txtIntersectionHighlight.Visible = True Me.txtBridgeOverCreekHighlight = "" Me.txtBridgeOverCreekHighlight.Visible = False End If Me.SectorNumber.Visible = False Me.txtCoordinates.Visible = True Else Me.Occupant = Me.Occupant Me.txtIntersectionHighlight = "" Me.txtIntersectionHighlight.Visible = False Me.txtBridgeOverCreekHighlight = "" Me.txtBridgeOverCreekHighlight.Visible = False Me.SectorNumber.Visible = True Me.txtCoordinates.Visible = False End If End Sub -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of John Bartow Sent: Saturday, July 23, 2011 12:09 PM To: DBA-Access Subject: [AccessD] report detail - conditional formatting Is it possible to create conditional formatting per detail line in an Access report? I would like to have certain items print in bold. TIA John B -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From BradM at blackforestltd.com Sun Jul 24 15:39:58 2011 From: BradM at blackforestltd.com (Brad Marks) Date: Sun, 24 Jul 2011 15:39:58 -0500 Subject: [AccessD] How to Obtain Access Report Filter information References: <068301cc4952$df49e690$9dddb3b0$@winhaven.net> <07e201cc4a1b$f0bbbe70$d2333b50$@winhaven.net> Message-ID: I am trying to build a VBA routine to obtain report filter info. The following line works nicely to obtain the filter for Report1 and store it in a variable called str_Report_Filter str_Report_Filter = Reports.Report1.Filter What I would like to do is make this "Generic" so that I can plug in a variable instead of the hardcoded "Report1" Something along these lines... Dim str_Report_Name str_Report_Name = "Report2" Is there a way to use a variable in a situation such as this? str_Report_Filter = Reports.str_report_name.Filter (I know that this doesn't work. This is just an example of what I am trying to do) I have tried many variations and tried to find an example on the internet, but have not had any luck. A simple example of how to do this would be most appreciated. Thanks for your help/advice. Brad From rlister at actuarial-files.com Sun Jul 24 15:48:16 2011 From: rlister at actuarial-files.com (Ralf Lister) Date: Sun, 24 Jul 2011 16:48:16 -0400 Subject: [AccessD] OT- Max Row Number in Excel Message-ID: <000301cc4a43$0517eca0$0f47c5e0$@com> Hello all, The max. row number of Excel 2007 is 65000 and something. Does Excel 2010 allow more rows? Saludos Ralf Lister From stuart at lexacorp.com.pg Sun Jul 24 16:10:08 2011 From: stuart at lexacorp.com.pg (Stuart McLachlan) Date: Mon, 25 Jul 2011 07:10:08 +1000 Subject: [AccessD] OT- Max Row Number in Excel In-Reply-To: <000301cc4a43$0517eca0$0f47c5e0$@com> References: <000301cc4a43$0517eca0$0f47c5e0$@com> Message-ID: <4E2C8A30.23940.33476F14@stuart.lexacorp.com.pg> No that was the maximum in 2003. Actually 65 536 ( 2^16). In 2007 they changed that to 1 048 576 (2^20). 2010 is the same. -- Stuart On 24 Jul 2011 at 16:48, Ralf Lister wrote: > Hello all, > > The max. row number of Excel 2007 is 65000 and something. > > Does Excel 2010 allow more rows? > > Saludos > Ralf Lister > > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > From stuart at lexacorp.com.pg Sun Jul 24 16:21:17 2011 From: stuart at lexacorp.com.pg (Stuart McLachlan) Date: Mon, 25 Jul 2011 07:21:17 +1000 Subject: [AccessD] How to Obtain Access Report Filter information In-Reply-To: References: <068301cc4952$df49e690$9dddb3b0$@winhaven.net>, Message-ID: <4E2C8CCD.13750.3351A37C@stuart.lexacorp.com.pg> str_Report_name = "rpt" & "1" str_Report_Filter = Reports(str_report_name).Filter But you will get an Error 2451 if the report is not open at the time. -- Stuart On 24 Jul 2011 at 15:39, Brad Marks wrote: > I am trying to build a VBA routine to obtain report filter info. > > > The following line works nicely to obtain the filter for Report1 and > store it in a variable called str_Report_Filter > > str_Report_Filter = Reports.Report1.Filter > > > > What I would like to do is make this "Generic" so that I can plug in a > variable instead of the hardcoded "Report1" > > > > Something along these lines... > > > > Dim str_Report_Name > > str_Report_Name = "Report2" > > Is there a way to use a variable in a situation such as this? > > str_Report_Filter = Reports.str_report_name.Filter > > (I know that this doesn't work. This is just an example of what I am > trying to do) > > > > I have tried many variations and tried to find an example on the > internet, but have not had any luck. > > A simple example of how to do this would be most appreciated. > > Thanks for your help/advice. > > Brad > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > From rlister at actuarial-files.com Sun Jul 24 16:26:04 2011 From: rlister at actuarial-files.com (Ralf Lister) Date: Sun, 24 Jul 2011 17:26:04 -0400 Subject: [AccessD] OT- Max Row Number in Excel In-Reply-To: <4E2C8A30.23940.33476F14@stuart.lexacorp.com.pg> References: <000301cc4a43$0517eca0$0f47c5e0$@com> <4E2C8A30.23940.33476F14@stuart.lexacorp.com.pg> Message-ID: <000401cc4a48$4cb40a30$e61c1e90$@com> Many thanks, Stuart Saludos Ralf Lister -----Mensaje original----- De: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] En nombre de Stuart McLachlan Enviado el: Domingo, 24 de Julio de 2011 05:10 p.m. Para: Access Developers discussion and problem solving Asunto: Re: [AccessD] OT- Max Row Number in Excel No that was the maximum in 2003. Actually 65 536 ( 2^16). In 2007 they changed that to 1 048 576 (2^20). 2010 is the same. -- Stuart On 24 Jul 2011 at 16:48, Ralf Lister wrote: > Hello all, > > The max. row number of Excel 2007 is 65000 and something. > > Does Excel 2010 allow more rows? > > Saludos > Ralf Lister > > > > -- > 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 ----- No virus found in this message. Checked by AVG - www.avg.com Version: 10.0.1390 / Virus Database: 1518/3785 - Release Date: 07/24/11 From BradM at blackforestltd.com Sun Jul 24 16:52:43 2011 From: BradM at blackforestltd.com (Brad Marks) Date: Sun, 24 Jul 2011 16:52:43 -0500 Subject: [AccessD] How to Obtain Access Report Filter information References: <068301cc4952$df49e690$9dddb3b0$@winhaven.net>, <4E2C8CCD.13750.3351A37C@stuart.lexacorp.com.pg> Message-ID: Stuart, Thank you for the help, I really appreciate it. Your example works nicely for what I am trying to accomplish. Brad -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Stuart McLachlan Sent: Sunday, July 24, 2011 4:21 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] How to Obtain Access Report Filter information str_Report_name = "rpt" & "1" str_Report_Filter = Reports(str_report_name).Filter But you will get an Error 2451 if the report is not open at the time. -- Stuart On 24 Jul 2011 at 15:39, Brad Marks wrote: > I am trying to build a VBA routine to obtain report filter info. > > > The following line works nicely to obtain the filter for Report1 and > store it in a variable called str_Report_Filter > > str_Report_Filter = Reports.Report1.Filter > > > > What I would like to do is make this "Generic" so that I can plug in a > variable instead of the hardcoded "Report1" > > > > Something along these lines... > > > > Dim str_Report_Name > > str_Report_Name = "Report2" > > Is there a way to use a variable in a situation such as this? > > str_Report_Filter = Reports.str_report_name.Filter > > (I know that this doesn't work. This is just an example of what I am > trying to do) > > > > I have tried many variations and tried to find an example on the > internet, but have not had any luck. > > A simple example of how to do this would be most appreciated. > > Thanks for your help/advice. > > Brad > > -- > 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 has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. From darren at activebilling.com.au Sun Jul 24 18:47:09 2011 From: darren at activebilling.com.au (Darren - Active Billing) Date: Mon, 25 Jul 2011 09:47:09 +1000 Subject: [AccessD] Max of 20 values In-Reply-To: References: Message-ID: <016f01cc4a5c$01c92d70$055b8850$@activebilling.com.au> Hi Arthur Coming in late to this so you may have already have implemented a solution. (And to be honest haven't read all the threads so I may have missed something in the posts) :-) Couple of assumptions: 1 Assuming your '20' recorded time measurements all sit in one table 2 Assuming they all have a relevant PK/Surrogate key to group each test batch of 20...eg TestBatchNo etc. Can't you just use a Domain lookup? DMAX? E.g. Have some display field bound to the following after the update of each table DMax("TimeTakenToForceShutOffField","InSomeTable","SomePK/SurrogateKeyForThi sTestBatchof20 = " & intSomeTestBatchIdenfifier & ")" Many thanks Darren -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Arthur Fuller Sent: Saturday, 23 July 2011 10:54 PM To: Access Developers discussion and problem solving Subject: [AccessD] Max of 20 values I have a form into which the user enters up to 20 values (measurements in time). They all default to zero. I'm trying to think of an elegant way to find the max value among the 20. Create an array and bubble sort it? I want to call this code on the AfterUpdate of each of these 20 controls so the control called MaxReading gets a new value if any of the 20 controls goes higher than the current MaxReading value. TIA, Arthur -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From vbacreations at gmail.com Sun Jul 24 19:50:26 2011 From: vbacreations at gmail.com (William Benson (VBACreations.Com)) Date: Sun, 24 Jul 2011 20:50:26 -0400 Subject: [AccessD] OT- Max Row Number in Excel In-Reply-To: <000301cc4a43$0517eca0$0f47c5e0$@com> References: <000301cc4a43$0517eca0$0f47c5e0$@com> Message-ID: <000c01cc4a64$d8b41f90$8a1c5eb0$@gmail.com> Excel 2003 had 65536. Excel 2007 and 2010 both allow 1,048,576. If you have opened a Excel 2007 file and see only 65,536 rows you are probably in compatibility mode, which you can turn off in the File Options (Under Save ... if you have default File Save format as .xls, then you will always be seeing 65,536 rows in a new workbook. Change that to .xlsx). -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Ralf Lister Sent: Sunday, July 24, 2011 4:48 PM To: 'Access Developers discussion and problem solving' Subject: [AccessD] OT- Max Row Number in Excel Hello all, The max. row number of Excel 2007 is 65000 and something. Does Excel 2010 allow more rows? Saludos Ralf Lister -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From vbacreations at gmail.com Sun Jul 24 21:19:46 2011 From: vbacreations at gmail.com (William Benson) Date: Sun, 24 Jul 2011 22:19:46 -0400 Subject: [AccessD] 97 to 2007 Performance issue In-Reply-To: References: Message-ID: I will add my plea for information and a means of understanding. .. I totally agree it is slower and would like to know why. Data sheet form filtering, refreshing forms, requeryng controls in particular. From stuart at lexacorp.com.pg Sun Jul 24 21:27:27 2011 From: stuart at lexacorp.com.pg (Stuart McLachlan) Date: Mon, 25 Jul 2011 12:27:27 +1000 Subject: [AccessD] 97 to 2007 Performance issue In-Reply-To: References: , , Message-ID: <4E2CD48F.17611.3469F318@stuart.lexacorp.com.pg> Short answer. It's a Microsoft product. Every new version of everything they have ever released uses more resources and takes longer to do the same thing (with the possible except of Win 7 over Vista) :-) -- Stuart On 24 Jul 2011 at 22:19, William Benson wrote: > I will add my plea for information and a means of understanding. .. I > totally agree it is slower and would like to know why. > > Data sheet form filtering, refreshing forms, requeryng controls in > particular. -- AccessD mailing list AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd Website: > http://www.databaseadvisors.com > From charlotte.foust at gmail.com Sun Jul 24 22:00:08 2011 From: charlotte.foust at gmail.com (Charlotte Foust) Date: Sun, 24 Jul 2011 20:00:08 -0700 Subject: [AccessD] 97 to 2007 Performance issue In-Reply-To: <4E2CD48F.17611.3469F318@stuart.lexacorp.com.pg> References: <4E2CD48F.17611.3469F318@stuart.lexacorp.com.pg> Message-ID: Because 2007 is fat with "end user" features for all the developer wannabes MS is aiming at. A97 was still mostly restricted on the bells and whistles to the stuff developers would want to use ... and knew how to! VBA alone has increased to a huge size in anything later than 2002. Charlotte Foust On Sun, Jul 24, 2011 at 7:27 PM, Stuart McLachlan wrote: > Short answer. It's a Microsoft product. Every new version of everything > they have ever > released uses more resources and takes longer to do the same thing (with > the possible > except of Win 7 over Vista) :-) > > -- > Stuart > > > On 24 Jul 2011 at 22:19, William Benson wrote: > > > I will add my plea for information and a means of understanding. .. I > > totally agree it is slower and would like to know why. > > > > Data sheet form filtering, refreshing forms, requeryng controls in > > particular. -- 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 phpons at gmail.com Mon Jul 25 00:56:36 2011 From: phpons at gmail.com (philippe pons) Date: Mon, 25 Jul 2011 07:56:36 +0200 Subject: [AccessD] 97 to 2007 Performance issue In-Reply-To: References: <4E2CD48F.17611.3469F318@stuart.lexacorp.com.pg> Message-ID: Charlotte, I'm not sure that new features will slow Access. The perf issue comes when the front end requires data from the back end. And to my knowledge, ODBC is the piece of software that do this data transfer. If a new version of ODBC is used by A2007, and don't see why it would be slower than any previous one. Do you think that there are any tuning options that would affect performance? Philippe Pons 2011/7/25 Charlotte Foust > Because 2007 is fat with "end user" features for all the developer wannabes > MS is aiming at. A97 was still mostly restricted on the bells and whistles > to the stuff developers would want to use ... and knew how to! VBA alone > has increased to a huge size in anything later than 2002. > > Charlotte Foust > > On Sun, Jul 24, 2011 at 7:27 PM, Stuart McLachlan >wrote: > > > Short answer. It's a Microsoft product. Every new version of everything > > they have ever > > released uses more resources and takes longer to do the same thing (with > > the possible > > except of Win 7 over Vista) :-) > > > > -- > > Stuart > > > > > > On 24 Jul 2011 at 22:19, William Benson wrote: > > > > > I will add my plea for information and a means of understanding. .. I > > > totally agree it is slower and would like to know why. > > > > > > Data sheet form filtering, refreshing forms, requeryng controls in > > > particular. -- 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 Mon Jul 25 01:33:31 2011 From: stuart at lexacorp.com.pg (Stuart McLachlan) Date: Mon, 25 Jul 2011 16:33:31 +1000 Subject: [AccessD] 97 to 2007 Performance issue In-Reply-To: References: , , Message-ID: <4E2D0E3B.11824.354B3B52@stuart.lexacorp.com.pg> Access to Access links don't use ODBC, AFAIK, they use DAO for linked tables. -- Stuart On 25 Jul 2011 at 7:56, philippe pons wrote: > Charlotte, > > I'm not sure that new features will slow Access. > The perf issue comes when the front end requires > data from the back end. > And to my knowledge, ODBC is the piece of software that > do this data transfer. > If a new version of ODBC is used by A2007, and don't see why it would > be slower than any previous one. Do you think that there are any > tuning options that would affect performance? > > Philippe Pons > > 2011/7/25 Charlotte Foust > > > Because 2007 is fat with "end user" features for all the developer > > wannabes MS is aiming at. A97 was still mostly restricted on the > > bells and whistles to the stuff developers would want to use ... and > > knew how to! VBA alone has increased to a huge size in anything > > later than 2002. > > > > Charlotte Foust > > > > On Sun, Jul 24, 2011 at 7:27 PM, Stuart McLachlan > > > >wrote: > > > > > Short answer. It's a Microsoft product. Every new version of > > > everything they have ever released uses more resources and takes > > > longer to do the same thing (with the possible except of Win 7 > > > over Vista) :-) > > > > > > -- > > > Stuart > > > > > > > > > On 24 Jul 2011 at 22:19, William Benson wrote: > > > > > > > I will add my plea for information and a means of understanding. > > > > .. I totally agree it is slower and would like to know why. > > > > > > > > Data sheet form filtering, refreshing forms, requeryng controls > > > > in particular. -- 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 phpons at gmail.com Mon Jul 25 02:22:42 2011 From: phpons at gmail.com (philippe pons) Date: Mon, 25 Jul 2011 09:22:42 +0200 Subject: [AccessD] 97 to 2007 Performance issue In-Reply-To: <4E2D0E3B.11824.354B3B52@stuart.lexacorp.com.pg> References: <4E2D0E3B.11824.354B3B52@stuart.lexacorp.com.pg> Message-ID: Stuart, You are probably right, and as DAO is optimized for Access, performance should be better than with ODBC. Philippe 2011/7/25 Stuart McLachlan > Access to Access links don't use ODBC, AFAIK, they use DAO for linked > tables. > > -- > Stuart > > On 25 Jul 2011 at 7:56, philippe pons wrote: > > > Charlotte, > > > > I'm not sure that new features will slow Access. > > The perf issue comes when the front end requires > > data from the back end. > > And to my knowledge, ODBC is the piece of software that > > do this data transfer. > > If a new version of ODBC is used by A2007, and don't see why it would > > be slower than any previous one. Do you think that there are any > > tuning options that would affect performance? > > > > Philippe Pons > > > > 2011/7/25 Charlotte Foust > > > > > Because 2007 is fat with "end user" features for all the developer > > > wannabes MS is aiming at. A97 was still mostly restricted on the > > > bells and whistles to the stuff developers would want to use ... and > > > knew how to! VBA alone has increased to a huge size in anything > > > later than 2002. > > > > > > Charlotte Foust > > > > > > On Sun, Jul 24, 2011 at 7:27 PM, Stuart McLachlan > > > > > >wrote: > > > > > > > Short answer. It's a Microsoft product. Every new version of > > > > everything they have ever released uses more resources and takes > > > > longer to do the same thing (with the possible except of Win 7 > > > > over Vista) :-) > > > > > > > > -- > > > > Stuart > > > > > > > > > > > > On 24 Jul 2011 at 22:19, William Benson wrote: > > > > > > > > > I will add my plea for information and a means of understanding. > > > > > .. I totally agree it is slower and would like to know why. > > > > > > > > > > Data sheet form filtering, refreshing forms, requeryng controls > > > > > in particular. -- 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 phpons at gmail.com Mon Jul 25 02:54:54 2011 From: phpons at gmail.com (philippe pons) Date: Mon, 25 Jul 2011 09:54:54 +0200 Subject: [AccessD] 97 to 2007 Performance issue In-Reply-To: References: <4E2D0E3B.11824.354B3B52@stuart.lexacorp.com.pg> Message-ID: I remember that some guys recommended to keep an open connection to the back end, to reduce acces time. But I guess this does not apply to linked tables, as they will use a different connection, won't they? 2011/7/25 philippe pons > Stuart, > > You are probably right, and as DAO is optimized for Access, performance > should be better than > with ODBC. > > Philippe > > > 2011/7/25 Stuart McLachlan > >> Access to Access links don't use ODBC, AFAIK, they use DAO for linked >> tables. >> >> -- >> Stuart >> >> On 25 Jul 2011 at 7:56, philippe pons wrote: >> >> > Charlotte, >> > >> > I'm not sure that new features will slow Access. >> > The perf issue comes when the front end requires >> > data from the back end. >> > And to my knowledge, ODBC is the piece of software that >> > do this data transfer. >> > If a new version of ODBC is used by A2007, and don't see why it would >> > be slower than any previous one. Do you think that there are any >> > tuning options that would affect performance? >> > >> > Philippe Pons >> > >> > 2011/7/25 Charlotte Foust >> > >> > > Because 2007 is fat with "end user" features for all the developer >> > > wannabes MS is aiming at. A97 was still mostly restricted on the >> > > bells and whistles to the stuff developers would want to use ... and >> > > knew how to! VBA alone has increased to a huge size in anything >> > > later than 2002. >> > > >> > > Charlotte Foust >> > > >> > > On Sun, Jul 24, 2011 at 7:27 PM, Stuart McLachlan >> > > > > > >wrote: >> > > >> > > > Short answer. It's a Microsoft product. Every new version of >> > > > everything they have ever released uses more resources and takes >> > > > longer to do the same thing (with the possible except of Win 7 >> > > > over Vista) :-) >> > > > >> > > > -- >> > > > Stuart >> > > > >> > > > >> > > > On 24 Jul 2011 at 22:19, William Benson wrote: >> > > > >> > > > > I will add my plea for information and a means of understanding. >> > > > > .. I totally agree it is slower and would like to know why. >> > > > > >> > > > > Data sheet form filtering, refreshing forms, requeryng controls >> > > > > in particular. -- 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 vbacreations at gmail.com Mon Jul 25 10:08:37 2011 From: vbacreations at gmail.com (William Benson (VBACreations.Com)) Date: Mon, 25 Jul 2011 11:08:37 -0400 Subject: [AccessD] Re Max of 20 values References: <001b01cc494e$1af91530$50eb3f90$@comcast.net> Message-ID: <001501cc4adc$bc17d200$34477600$@gmail.com> The below works much (MUCH) faster by not binding the max-time display textbox to a function (after looping to find it) and using requery. If you know the control's name, just put the variable's value there directly. So For Each Ctrl In aTxt.Parent.Controls If TypeOf Ctrl Is Access.TextBox Then If Ctrl.Tag = "Max Time Value" Then Ctrl.Requery Exit For End If End If Next Becomes aTxt.Parent.Controls("ShowMaxValueHere") = Glob_Dbl_What_Is_Current_Max -----Original Message----- From: William Benson (VBACreations.Com) [mailto:vbacreations at gmail.com] Sent: Saturday, July 23, 2011 9:27 PM To: Access Developers discussion and problem solving Subject: RE: [AccessD] Re Max of 20 values Going back to the original inquiry. John's right, class modules are the way to go. Assumptions: Tag property on all controls which can contain a time value = "Time Values" I have an additional textbox on my form with controlsource = "= HighestValue()" -- that is a public function -- see below 'IN THE FORM'S CODE MODULE Option Compare Database Option Explicit Dim colTimeValueControls As New Collection Dim MyclsSeriesItem As clsTimeSeriesItem Private Sub Form_Load() Dim Ctrl As Control Glob_Dbl_What_Is_Current_Max = 0 Glob_Str_Which_Control_Has_Max = "" For Each Ctrl In Me.Controls If ControlIsTimeValue(Ctrl, TimeValueTag) Then Set MyclsSeriesItem = New clsTimeSeriesItem Set MyclsSeriesItem.Txt = Ctrl MyclsSeriesItem.Txt.AfterUpdate = "[Event Procedure]" colTimeValueControls.Add MyclsSeriesItem End If Next End Sub 'IN A Class Module named clsTimeSeriesItem Option Compare Database Option Explicit Public WithEvents aTxt As Access.TextBox Private Sub aTxt_AfterUpdate() Dim bTestAllControls As Boolean Dim Ctrl As Control bTestAllControls = False If IsNumeric(aTxt.Value) Then If CDbl(Nz(aTxt.Value, 0)) >= Glob_Dbl_What_Is_Current_Max Then Glob_Dbl_What_Is_Current_Max = CDbl(aTxt.Value) Glob_Str_Which_Control_Has_Max = aTxt.Name ElseIf Glob_Str_Which_Control_Has_Max <> aTxt.Name Then 'DO NOTHING, some other control has the max value anyway Else 'It is numeric, it was the max, and it no longer is as high as the max was bTestAllControls = True End If ElseIf Glob_Str_Which_Control_Has_Max = aTxt.Name Then bTestAllControls = True Else 'We don't care if it went non-numeric, it didn't hold the max value prior to now End If If bTestAllControls Then Glob_Str_Which_Control_Has_Max = "" Glob_Dbl_What_Is_Current_Max = 0 For Each Ctrl In aTxt.Parent.Controls If ControlIsTimeValue(Ctrl, TimeValueTag) Then If IsNumeric(Nz(Ctrl.Value, "")) Then If CDbl(Nz(Ctrl.Value, 0)) > Glob_Dbl_What_Is_Current_Max Then Glob_Dbl_What_Is_Current_Max = CDbl(Nz(Ctrl.Value, 0)) Glob_Str_Which_Control_Has_Max = Ctrl.Name End If End If End If Next End If For Each Ctrl In aTxt.Parent.Controls If TypeOf Ctrl Is Access.TextBox Then If Ctrl.Tag = "Max Time Value" Then Ctrl.Requery Exit For End If End If Next End Sub Public Property Set Txt(ByVal ControlThatChanged As Control) If TypeOf ControlThatChanged Is Access.TextBox Then Set aTxt = ControlThatChanged End If End Property Public Property Get Txt() As Access.TextBox If Not aTxt Is Nothing Then Set Txt = aTxt End If End Property 'IN A STANDARD MODULE Public Glob_Str_Which_Control_Has_Max As String Public Glob_Dbl_What_Is_Current_Max As Double Public Function TimeValueTag() As String TimeValueTag = "Time Values" End Function Public Function ControlIsTimeValue(Ctrl As Control, strTagToLookFor As String) As Boolean If TypeOf Ctrl Is Access.TextBox Then ControlIsTimeValue = (Ctrl.Tag = strTagToLookFor) End If End Function Public Function HighestValue() HighestValue = Glob_Dbl_What_Is_Current_Max End Function From BradM at blackforestltd.com Mon Jul 25 12:53:42 2011 From: BradM at blackforestltd.com (Brad Marks) Date: Mon, 25 Jul 2011 12:53:42 -0500 Subject: [AccessD] Exporting Access to Excel - How to "SUM" a column with a variable number of rows? References: <001b01cc494e$1af91530$50eb3f90$@comcast.net> <001501cc4adc$bc17d200$34477600$@gmail.com> Message-ID: I am starting to do some experiments involving the creation of Excel files from Access. Let's say that I have an Access Recordset that can contain anywhere from 100 to 1,000 records. I have a little Access application that currently pushes this data into Excel. This all works nicely. What is the best way to "Sum" a column in Excel after the last record, when the number of records can vary? Thanks, Brad From Lambert.Heenan at chartisinsurance.com Mon Jul 25 13:31:06 2011 From: Lambert.Heenan at chartisinsurance.com (Heenan, Lambert) Date: Mon, 25 Jul 2011 14:31:06 -0400 Subject: [AccessD] Exporting Access to Excel - How to "SUM" a column with a variable number of rows? In-Reply-To: References: <001b01cc494e$1af91530$50eb3f90$@comcast.net> <001501cc4adc$bc17d200$34477600$@gmail.com> Message-ID: The way I do this is after exporting the results of a query to Excel I then run a Dcount() against the same query to discover how many rows were in the output data.... nRows = DCount("*", "Some_Query_Name") Then I open the Excel file with Access (i.e. I set an Excell.Application and Excel.Worksheet object) so that I can then add the formulas that I need to the row under the last row of exported data. Essentially you build the formula in a text variable like this... strFormula = "=Sum(" & Excel_Column(nCol) & nRowOffest - nRowsToSum & ":" & Excel_Column(nCol) & nRowOffest - 1 & ")" Where nRowOffest is the row number to start summing (or averaging or counting, whatever) and nRowsToSum is the number of row in the output. The function Excel_Column is used to get the right alpha prefix in the cells address... Function Excel_Column(nCol As Long) As String ' given a valid column number return the Alpha name for it ' else return an empty string If nCol > 256 Then ' Pre Excel 2007 Excel_Column = "" Else If nCol <= 26 Then Excel_Column = Chr(Asc("A") + nCol - 1) Else Dim sSecond As String sSecond = Excel_Column(nCol Mod 26) Excel_Column = Excel_Column(nCol \ 26) & sSecond End If End If End Function Then, after building the text string with the formula just plug it into the relevant cell in the workbook. After setting the Excel.Application object you then need a reference to the worksheet that needs to be update... Set Ws = xlApp.Sheets(nSheet) With Ws strCellAddress = Excel_Column(nCol) & nRowOffest strFormula = "=Sum(" & Excel_Column(nCol) & nRowOffest - nRowsToSum & ":" & Excel_Column(nCol) & nRowOffest - 1 & ")" .Cells(nRowOffest, nCol) = strFormula End With HTH Lambert -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Brad Marks Sent: Monday, July 25, 2011 1:54 PM To: Access Developers discussion and problem solving Subject: [AccessD] Exporting Access to Excel - How to "SUM" a column with a variable number of rows? I am starting to do some experiments involving the creation of Excel files from Access. Let's say that I have an Access Recordset that can contain anywhere from 100 to 1,000 records. I have a little Access application that currently pushes this data into Excel. This all works nicely. What is the best way to "Sum" a column in Excel after the last record, when the number of records can vary? Thanks, Brad -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From rlister at actuarial-files.com Mon Jul 25 13:43:00 2011 From: rlister at actuarial-files.com (Ralf Lister) Date: Mon, 25 Jul 2011 14:43:00 -0400 Subject: [AccessD] OT- Max Row Number in Excel In-Reply-To: <000c01cc4a64$d8b41f90$8a1c5eb0$@gmail.com> References: <000301cc4a43$0517eca0$0f47c5e0$@com> <000c01cc4a64$d8b41f90$8a1c5eb0$@gmail.com> Message-ID: <000601cc4afa$affc03b0$0ff40b10$@com> Thanks, William. Saludos Ralf Lister -----Mensaje original----- De: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] En nombre de William Benson (VBACreations.Com) Enviado el: Domingo, 24 de Julio de 2011 08:50 p.m. Para: 'Access Developers discussion and problem solving' Asunto: Re: [AccessD] OT- Max Row Number in Excel Excel 2003 had 65536. Excel 2007 and 2010 both allow 1,048,576. If you have opened a Excel 2007 file and see only 65,536 rows you are probably in compatibility mode, which you can turn off in the File Options (Under Save ... if you have default File Save format as .xls, then you will always be seeing 65,536 rows in a new workbook. Change that to .xlsx). -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Ralf Lister Sent: Sunday, July 24, 2011 4:48 PM To: 'Access Developers discussion and problem solving' Subject: [AccessD] OT- Max Row Number in Excel Hello all, The max. row number of Excel 2007 is 65000 and something. Does Excel 2010 allow more rows? Saludos Ralf Lister -- 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 ----- No virus found in this message. Checked by AVG - www.avg.com Version: 10.0.1390 / Virus Database: 1518/3786 - Release Date: 07/24/11 From vbacreations at gmail.com Mon Jul 25 13:50:36 2011 From: vbacreations at gmail.com (William Benson (VBACreations.Com)) Date: Mon, 25 Jul 2011 14:50:36 -0400 Subject: [AccessD] Exporting Access to Excel - How to "SUM" a column with a variable number of rows? In-Reply-To: References: <001b01cc494e$1af91530$50eb3f90$@comcast.net> <001501cc4adc$bc17d200$34477600$@gmail.com> Message-ID: <002001cc4afb$be7a3af0$3b6eb0d0$@gmail.com> Brad, Excel is VERY powerful, and VERY fast. So whenever possible, use what Excel already has, when automating. To sum all the values in a column in Excel, assuming you have hooks to the xl application object and a worksheet: Function TestFunction () Dim xl As Excel.Application Set xl = GetXL With GetXL MsgBox .Sum(.ActiveWorkbook.ActiveSheet.Columns(1)) End With End TestFunction Function GetXL() As Excel.Application On Error Resume Next Set GetXL = GetObject(, "Excel.Application") If GetXL Is Nothing Then Set GetXL = CreateObject("Excel.Application") GetXL.Visible = True End If exit_me: End Function -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Brad Marks Sent: Monday, July 25, 2011 1:54 PM To: Access Developers discussion and problem solving Subject: [AccessD] Exporting Access to Excel - How to "SUM" a column with a variable number of rows? I am starting to do some experiments involving the creation of Excel files from Access. Let's say that I have an Access Recordset that can contain anywhere from 100 to 1,000 records. I have a little Access application that currently pushes this data into Excel. This all works nicely. What is the best way to "Sum" a column in Excel after the last record, when the number of records can vary? Thanks, Brad -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From vbacreations at gmail.com Mon Jul 25 13:52:04 2011 From: vbacreations at gmail.com (William Benson (VBACreations.Com)) Date: Mon, 25 Jul 2011 14:52:04 -0400 Subject: [AccessD] Exporting Access to Excel - How to "SUM" a column with a variable number of rows? References: <001b01cc494e$1af91530$50eb3f90$@comcast.net> <001501cc4adc$bc17d200$34477600$@gmail.com> Message-ID: <002101cc4afb$f2e7dc70$d8b79550$@gmail.com> Oops, I threw the function GetXL in as a bonus without removing xl variable. Function TestFunction () With GetXL MsgBox .Sum(.ActiveWorkbook.ActiveSheet.Columns(1)) End With End TestFunction Function GetXL() As Excel.Application On Error Resume Next Set GetXL = GetObject(, "Excel.Application") If GetXL Is Nothing Then Set GetXL = CreateObject("Excel.Application") GetXL.Visible = True End If exit_me: End Function From jwcolby at colbyconsulting.com Mon Jul 25 13:57:36 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Mon, 25 Jul 2011 14:57:36 -0400 Subject: [AccessD] Link odbc tables in Access Message-ID: <4E2DBCA0.6050603@colbyconsulting.com> When I link to SQL Server from Access using a DSN file, I end up with my tables displayed but also about a billion (sorry, I didn't count) tables that start with INFORMATION_SCHEMA_.xyz. At this time I have no use for those tables and would like to filter them out so that I cannot see them. Does anyone know how to do that? -- John W. Colby www.ColbyConsulting.com From BradM at blackforestltd.com Mon Jul 25 15:51:59 2011 From: BradM at blackforestltd.com (Brad Marks) Date: Mon, 25 Jul 2011 15:51:59 -0500 Subject: [AccessD] Exporting Access to Excel - How to "SUM" a column with a variable number of rows? References: <001b01cc494e$1af91530$50eb3f90$@comcast.net><001501cc4adc$bc17d200$34477600$@gmail.com> Message-ID: William and Lambert, Thanks for the help, I appreciate it. One of the things that I often struggle with is that there is often more than one way to accomplish a task. Before I start to build something big, I like to understand the options and also understand the "Best" way to get something done. Thanks Again, Brad -----Original Message----- From: accessd-bounces at databaseadvisors.com on behalf of Heenan, Lambert Sent: Mon 7/25/2011 1:31 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Exporting Access to Excel - How to "SUM" a column with a variable number of rows? The way I do this is after exporting the results of a query to Excel I then run a Dcount() against the same query to discover how many rows were in the output data.... nRows = DCount("*", "Some_Query_Name") Then I open the Excel file with Access (i.e. I set an Excell.Application and Excel.Worksheet object) so that I can then add the formulas that I need to the row under the last row of exported data. Essentially you build the formula in a text variable like this... strFormula = "=Sum(" & Excel_Column(nCol) & nRowOffest - nRowsToSum & ":" & Excel_Column(nCol) & nRowOffest - 1 & ")" Where nRowOffest is the row number to start summing (or averaging or counting, whatever) and nRowsToSum is the number of row in the output. The function Excel_Column is used to get the right alpha prefix in the cells address... Function Excel_Column(nCol As Long) As String ' given a valid column number return the Alpha name for it ' else return an empty string If nCol > 256 Then ' Pre Excel 2007 Excel_Column = "" Else If nCol <= 26 Then Excel_Column = Chr(Asc("A") + nCol - 1) Else Dim sSecond As String sSecond = Excel_Column(nCol Mod 26) Excel_Column = Excel_Column(nCol \ 26) & sSecond End If End If End Function Then, after building the text string with the formula just plug it into the relevant cell in the workbook. After setting the Excel.Application object you then need a reference to the worksheet that needs to be update... Set Ws = xlApp.Sheets(nSheet) With Ws strCellAddress = Excel_Column(nCol) & nRowOffest strFormula = "=Sum(" & Excel_Column(nCol) & nRowOffest - nRowsToSum & ":" & Excel_Column(nCol) & nRowOffest - 1 & ")" .Cells(nRowOffest, nCol) = strFormula End With HTH Lambert -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Brad Marks Sent: Monday, July 25, 2011 1:54 PM To: Access Developers discussion and problem solving Subject: [AccessD] Exporting Access to Excel - How to "SUM" a column with a variable number of rows? I am starting to do some experiments involving the creation of Excel files from Access. Let's say that I have an Access Recordset that can contain anywhere from 100 to 1,000 records. I have a little Access application that currently pushes this data into Excel. This all works nicely. What is the best way to "Sum" a column in Excel after the last record, when the number of records can vary? Thanks, Brad -- 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 has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. From marksimms at verizon.net Mon Jul 25 19:02:42 2011 From: marksimms at verizon.net (Mark Simms) Date: Mon, 25 Jul 2011 20:02:42 -0400 Subject: [AccessD] Exporting Access to Excel - How to "SUM" a column with a variable number of rows? In-Reply-To: References: <001b01cc494e$1af91530$50eb3f90$@comcast.net><001501cc4adc$bc17d200$34477600$@gmail.com> Message-ID: <016b01cc4b27$57c8ffe0$075affa0$@net> What you need to decide is: dynamic vs. static. If the data is not going to change, then try this: Sub AddTotals Dim rngCol as Range With Activesheet.UsedRange For Each rngCol in .Columns rngCol.Cells(.rows.Count+1) = Application.Sum(rngCol) Next End With End Sub Of course this assumes the starting row is #1. > -----Original Message----- > From: accessd-bounces at databaseadvisors.com [mailto:accessd- > bounces at databaseadvisors.com] On Behalf Of Brad Marks > Sent: Monday, July 25, 2011 4:52 PM > To: Access Developers discussion and problem solving > Subject: Re: [AccessD] Exporting Access to Excel - How to "SUM" a > column with a variable number of rows? > > William and Lambert, > > Thanks for the help, I appreciate it. > > One of the things that I often struggle with is that there is often > more than one way to accomplish a task. Before I start to build > something big, I like to understand the options and also understand the > "Best" way to get something done. > > Thanks Again, > Brad > > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com on behalf of Heenan, Lambert > Sent: Mon 7/25/2011 1:31 PM > To: Access Developers discussion and problem solving > Subject: Re: [AccessD] Exporting Access to Excel - How to "SUM" a > column with a variable number of rows? > > The way I do this is after exporting the results of a query to Excel I > then run a Dcount() against the same query to discover how many rows > were in the output data.... > > nRows = DCount("*", "Some_Query_Name") > > Then I open the Excel file with Access (i.e. I set an > Excell.Application and Excel.Worksheet object) so that I can then add > the formulas that I need to the row under the last row of exported > data. > > Essentially you build the formula in a text variable like this... > > strFormula = "=Sum(" & Excel_Column(nCol) & nRowOffest - nRowsToSum & > ":" & Excel_Column(nCol) & nRowOffest - 1 & ")" > > Where nRowOffest is the row number to start summing (or averaging or > counting, whatever) and nRowsToSum is the number of row in the output. > The function Excel_Column is used to get the right alpha prefix in the > cells address... > > Function Excel_Column(nCol As Long) As String ' given a valid column > number return the Alpha name for it ' else return an empty string > If nCol > 256 Then ' Pre Excel 2007 > Excel_Column = "" > Else > If nCol <= 26 Then > Excel_Column = Chr(Asc("A") + nCol - 1) > Else > Dim sSecond As String > sSecond = Excel_Column(nCol Mod 26) > Excel_Column = Excel_Column(nCol \ 26) & sSecond > End If > End If > End Function > > Then, after building the text string with the formula just plug it into > the relevant cell in the workbook. > > After setting the Excel.Application object you then need a reference to > the worksheet that needs to be update... > > Set Ws = xlApp.Sheets(nSheet) > With Ws > strCellAddress = Excel_Column(nCol) & nRowOffest > strFormula = "=Sum(" & Excel_Column(nCol) & nRowOffest - > nRowsToSum & ":" & Excel_Column(nCol) & nRowOffest - 1 & ")" > .Cells(nRowOffest, nCol) = strFormula > End With > > > HTH > > Lambert > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com [mailto:accessd- > bounces at databaseadvisors.com] On Behalf Of Brad Marks > Sent: Monday, July 25, 2011 1:54 PM > To: Access Developers discussion and problem solving > Subject: [AccessD] Exporting Access to Excel - How to "SUM" a column > with a variable number of rows? > > I am starting to do some experiments involving the creation of Excel > files from Access. > > Let's say that I have an Access Recordset that can contain anywhere > from 100 to 1,000 records. > > I have a little Access application that currently pushes this data into > Excel. This all works nicely. > > What is the best way to "Sum" a column in Excel after the last record, > when the number of records can vary? > > Thanks, > Brad > > -- > 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 has been scanned for viruses and dangerous content by > MailScanner, and is believed to be clean. > > From jeff.developer at gmail.com Tue Jul 26 10:10:45 2011 From: jeff.developer at gmail.com (Jeff B) Date: Tue, 26 Jul 2011 10:10:45 -0500 Subject: [AccessD] Recall: [cross posted] SharePoint 2010 question(s) Message-ID: Jeff B would like to recall the message, "[cross posted] SharePoint 2010 question(s)". From jeff.developer at gmail.com Tue Jul 26 10:11:13 2011 From: jeff.developer at gmail.com (Jeff B) Date: Tue, 26 Jul 2011 10:11:13 -0500 Subject: [AccessD] [cross posted] SharePoint 2010 question(s) Message-ID: I really need to know what you all suggest as the BEST book(s) for learning SharePoint 2010, Access Services, and publishing Access databases to SharePoint. Jeff Barrows MCP, MCAD, MCSD ? Outbak Technologies, LLC Racine, WI jeff.developer at gmail.com From marksimms at verizon.net Tue Jul 26 10:20:21 2011 From: marksimms at verizon.net (Mark Simms) Date: Tue, 26 Jul 2011 11:20:21 -0400 Subject: [AccessD] Exporting Access to Excel - How to "SUM" a column with a variable number of rows? In-Reply-To: <000001cc4b2f$c64b1fe0$52e15fa0$@gmail.com> References: <001b01cc494e$1af91530$50eb3f90$@comcast.net><001501cc4adc$bc17d200$34477600$@gmail.com> <016b01cc4b27$57c8ffe0$075affa0$@net> <000001cc4b2f$c64b1fe0$52e15fa0$@gmail.com> Message-ID: <026e01cc4ba7$8a000320$9e000960$@net> Bill - look again. I am only looping thru EACH COLUMN...and I AM using Application.SUM. I just came from an investment bank where some workbooks would take 20 to 40 MINUTES to complete. Reason: formula-based SUMS, VLOOKUPS, and SUMIFS. VLOOKUPs themselves were horribly inefficient. Even MATCH replacements did not improve performance. When replaced with VBA "static" counterparts, the calc time would decrease 90% in many cases. > -----Original Message----- > From: William Benson (VBACreations.Com) [mailto:vbacreations at gmail.com] > Sent: Monday, July 25, 2011 9:03 PM > To: 'Mark Simms' > Subject: FW: [AccessD] Exporting Access to Excel - How to "SUM" a > column with a variable number of rows? > > Mark, > > I have programmed in Excel for about 8 years and would not recommend > this > approach, but did not want to say so on the ListServ. Perhaps there is > a > reason you would loop through each cell to build a sum instead of using > Excel's marvelous (and instantaneous!) SUM worksheetfunction -- > available to > the application object? > > If you are looping through cells for the purpose of examining them > prior to > adding them, I don't say that is a bad idea - but for a standard > summation, > you would want to use Application.SUM. > > Warm regards, > > Bill > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Mark Simms > Sent: Monday, July 25, 2011 8:03 PM > To: 'Access Developers discussion and problem solving' > Subject: Re: [AccessD] Exporting Access to Excel - How to "SUM" a > column > with a variable number of rows? > > What you need to decide is: dynamic vs. static. > If the data is not going to change, then try this: > > Sub AddTotals > > Dim rngCol as Range > > With Activesheet.UsedRange > > For Each rngCol in .Columns > rngCol.Cells(.rows.Count+1) = Application.Sum(rngCol) > Next > > End With > > End Sub > > Of course this assumes the starting row is #1. > > > -----Original Message----- > > From: accessd-bounces at databaseadvisors.com [mailto:accessd- > > bounces at databaseadvisors.com] On Behalf Of Brad Marks > > Sent: Monday, July 25, 2011 4:52 PM > > To: Access Developers discussion and problem solving > > Subject: Re: [AccessD] Exporting Access to Excel - How to "SUM" a > > column with a variable number of rows? > > > > William and Lambert, > > > > Thanks for the help, I appreciate it. > > > > One of the things that I often struggle with is that there is often > > more than one way to accomplish a task. Before I start to build > > something big, I like to understand the options and also understand > the > > "Best" way to get something done. > > > > Thanks Again, > > Brad > > > > > > -----Original Message----- > > From: accessd-bounces at databaseadvisors.com on behalf of Heenan, > Lambert > > Sent: Mon 7/25/2011 1:31 PM > > To: Access Developers discussion and problem solving > > Subject: Re: [AccessD] Exporting Access to Excel - How to "SUM" a > > column with a variable number of rows? > > > > The way I do this is after exporting the results of a query to Excel > I > > then run a Dcount() against the same query to discover how many rows > > were in the output data.... > > > > nRows = DCount("*", "Some_Query_Name") > > > > Then I open the Excel file with Access (i.e. I set an > > Excell.Application and Excel.Worksheet object) so that I can then add > > the formulas that I need to the row under the last row of exported > > data. > > > > Essentially you build the formula in a text variable like this... > > > > strFormula = "=Sum(" & Excel_Column(nCol) & nRowOffest - nRowsToSum & > > ":" & Excel_Column(nCol) & nRowOffest - 1 & ")" > > > > Where nRowOffest is the row number to start summing (or averaging or > > counting, whatever) and nRowsToSum is the number of row in the > output. > > The function Excel_Column is used to get the right alpha prefix in > the > > cells address... > > > > Function Excel_Column(nCol As Long) As String ' given a valid column > > number return the Alpha name for it ' else return an empty string > > If nCol > 256 Then ' Pre Excel 2007 > > Excel_Column = "" > > Else > > If nCol <= 26 Then > > Excel_Column = Chr(Asc("A") + nCol - 1) > > Else > > Dim sSecond As String > > sSecond = Excel_Column(nCol Mod 26) > > Excel_Column = Excel_Column(nCol \ 26) & sSecond > > End If > > End If > > End Function > > > > Then, after building the text string with the formula just plug it > into > > the relevant cell in the workbook. > > > > After setting the Excel.Application object you then need a reference > to > > the worksheet that needs to be update... > > > > Set Ws = xlApp.Sheets(nSheet) > > With Ws > > strCellAddress = Excel_Column(nCol) & nRowOffest > > strFormula = "=Sum(" & Excel_Column(nCol) & nRowOffest - > > nRowsToSum & ":" & Excel_Column(nCol) & nRowOffest - 1 & ")" > > .Cells(nRowOffest, nCol) = strFormula > > End With > > > > > > HTH > > > > Lambert > > > > -----Original Message----- > > From: accessd-bounces at databaseadvisors.com [mailto:accessd- > > bounces at databaseadvisors.com] On Behalf Of Brad Marks > > Sent: Monday, July 25, 2011 1:54 PM > > To: Access Developers discussion and problem solving > > Subject: [AccessD] Exporting Access to Excel - How to "SUM" a column > > with a variable number of rows? > > > > I am starting to do some experiments involving the creation of Excel > > files from Access. > > > > Let's say that I have an Access Recordset that can contain anywhere > > from 100 to 1,000 records. > > > > I have a little Access application that currently pushes this data > into > > Excel. This all works nicely. > > > > What is the best way to "Sum" a column in Excel after the last > record, > > when the number of records can vary? > > > > Thanks, > > Brad > > > > -- > > 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 has been scanned for viruses and dangerous content by > > MailScanner, and is believed to be clean. > > > > > > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com From BradM at blackforestltd.com Tue Jul 26 15:39:32 2011 From: BradM at blackforestltd.com (Brad Marks) Date: Tue, 26 Jul 2011 15:39:32 -0500 Subject: [AccessD] Exporting Access to Excel - How to "SUM" a column with a variable number of rows? References: <001b01cc494e$1af91530$50eb3f90$@comcast.net><001501cc4adc$bc17d200$34477600$@gmail.com> <016b01cc4b27$57c8ffe0$075affa0$@net> Message-ID: Mark, Thanks for the help, I appreciate it. The sample code that you posted works nicely. Each column is summed. I do have one question, however. How can I prevent select columns from being summed in case they contain data that should not be summed? Thanks, Brad -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Mark Simms Sent: Monday, July 25, 2011 7:03 PM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Exporting Access to Excel - How to "SUM" acolumn with a variable number of rows? What you need to decide is: dynamic vs. static. If the data is not going to change, then try this: Sub AddTotals Dim rngCol as Range With Activesheet.UsedRange For Each rngCol in .Columns rngCol.Cells(.rows.Count+1) = Application.Sum(rngCol) Next End With End Sub Of course this assumes the starting row is #1. > -----Original Message----- > From: accessd-bounces at databaseadvisors.com [mailto:accessd- > bounces at databaseadvisors.com] On Behalf Of Brad Marks > Sent: Monday, July 25, 2011 4:52 PM > To: Access Developers discussion and problem solving > Subject: Re: [AccessD] Exporting Access to Excel - How to "SUM" a > column with a variable number of rows? > > William and Lambert, > > Thanks for the help, I appreciate it. > > One of the things that I often struggle with is that there is often > more than one way to accomplish a task. Before I start to build > something big, I like to understand the options and also understand the > "Best" way to get something done. > > Thanks Again, > Brad > > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com on behalf of Heenan, Lambert > Sent: Mon 7/25/2011 1:31 PM > To: Access Developers discussion and problem solving > Subject: Re: [AccessD] Exporting Access to Excel - How to "SUM" a > column with a variable number of rows? > > The way I do this is after exporting the results of a query to Excel I > then run a Dcount() against the same query to discover how many rows > were in the output data.... > > nRows = DCount("*", "Some_Query_Name") > > Then I open the Excel file with Access (i.e. I set an > Excell.Application and Excel.Worksheet object) so that I can then add > the formulas that I need to the row under the last row of exported > data. > > Essentially you build the formula in a text variable like this... > > strFormula = "=Sum(" & Excel_Column(nCol) & nRowOffest - nRowsToSum & > ":" & Excel_Column(nCol) & nRowOffest - 1 & ")" > > Where nRowOffest is the row number to start summing (or averaging or > counting, whatever) and nRowsToSum is the number of row in the output. > The function Excel_Column is used to get the right alpha prefix in the > cells address... > > Function Excel_Column(nCol As Long) As String ' given a valid column > number return the Alpha name for it ' else return an empty string > If nCol > 256 Then ' Pre Excel 2007 > Excel_Column = "" > Else > If nCol <= 26 Then > Excel_Column = Chr(Asc("A") + nCol - 1) > Else > Dim sSecond As String > sSecond = Excel_Column(nCol Mod 26) > Excel_Column = Excel_Column(nCol \ 26) & sSecond > End If > End If > End Function > > Then, after building the text string with the formula just plug it into > the relevant cell in the workbook. > > After setting the Excel.Application object you then need a reference to > the worksheet that needs to be update... > > Set Ws = xlApp.Sheets(nSheet) > With Ws > strCellAddress = Excel_Column(nCol) & nRowOffest > strFormula = "=Sum(" & Excel_Column(nCol) & nRowOffest - > nRowsToSum & ":" & Excel_Column(nCol) & nRowOffest - 1 & ")" > .Cells(nRowOffest, nCol) = strFormula > End With > > > HTH > > Lambert > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com [mailto:accessd- > bounces at databaseadvisors.com] On Behalf Of Brad Marks > Sent: Monday, July 25, 2011 1:54 PM > To: Access Developers discussion and problem solving > Subject: [AccessD] Exporting Access to Excel - How to "SUM" a column > with a variable number of rows? > > I am starting to do some experiments involving the creation of Excel > files from Access. > > Let's say that I have an Access Recordset that can contain anywhere > from 100 to 1,000 records. > > I have a little Access application that currently pushes this data into > Excel. This all works nicely. > > What is the best way to "Sum" a column in Excel after the last record, > when the number of records can vary? > > Thanks, > Brad > > -- > 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 has been scanned for viruses and dangerous content by > MailScanner, and is believed to be clean. > > -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. From rockysmolin at bchacc.com Tue Jul 26 16:55:13 2011 From: rockysmolin at bchacc.com (Rocky Smolin) Date: Tue, 26 Jul 2011 14:55:13 -0700 Subject: [AccessD] A2003 stops working Message-ID: <8FDCFF410EE948FCAECD101A7CBAE855@HAL9007> Dear List: Running Access 2003 SP3 on a 64bit W7 OS machine. From time to time it stops with a message "Access has stopped working." I am getting it now consistently on one form on an app when deleting a record (DoCmd.RunCommand acCmdDeleteRecord). I have Office 2010 loaded on this machine as well. Anyone have this happen? Any cure? MTIA Rocky Smolin Beach Access Software 858-259-4334 www.bchacc.com www.e-z-mrp.com From rockysmolin at bchacc.com Tue Jul 26 17:02:27 2011 From: rockysmolin at bchacc.com (Rocky Smolin) Date: Tue, 26 Jul 2011 15:02:27 -0700 Subject: [AccessD] A2003 stops working In-Reply-To: <8FDCFF410EE948FCAECD101A7CBAE855@HAL9007> References: <8FDCFF410EE948FCAECD101A7CBAE855@HAL9007> Message-ID: <814A51A1F63345E980C150E6E55B65EA@HAL9007> I just uninstalled O2010 - no effect - still craps out on the delete. R -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Rocky Smolin Sent: Tuesday, July 26, 2011 2:55 PM To: accessd at databaseadvisors.com Subject: [AccessD] A2003 stops working Dear List: Running Access 2003 SP3 on a 64bit W7 OS machine. From time to time it stops with a message "Access has stopped working." I am getting it now consistently on one form on an app when deleting a record (DoCmd.RunCommand acCmdDeleteRecord). I have Office 2010 loaded on this machine as well. Anyone have this happen? Any cure? MTIA Rocky Smolin Beach Access Software 858-259-4334 www.bchacc.com www.e-z-mrp.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From dbdoug at gmail.com Tue Jul 26 18:21:47 2011 From: dbdoug at gmail.com (Doug Steele) Date: Tue, 26 Jul 2011 16:21:47 -0700 Subject: [AccessD] A2003 stops working In-Reply-To: <814A51A1F63345E980C150E6E55B65EA@HAL9007> References: <8FDCFF410EE948FCAECD101A7CBAE855@HAL9007> <814A51A1F63345E980C150E6E55B65EA@HAL9007> Message-ID: Have you tried swinging a lizard around your head three times? I have had these mystery fails, and my general approach (stopping if/when I have success) is: 1. Force a compile. 2. Decompile/recompile. 3. Build an empty database and import all objects from the old database. 4. Delete the form and rebuild it from scratch. 5. Rework the code. In this case, open a dao recordset, find the record and delete it with Recordset.Delete. 6. Tear my hair out. I'm quite bald now. Doug On Tue, Jul 26, 2011 at 3:02 PM, Rocky Smolin wrote: > I just uninstalled O2010 ?- no effect - still craps out on the delete. > > > R > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Rocky Smolin > Sent: Tuesday, July 26, 2011 2:55 PM > To: accessd at databaseadvisors.com > Subject: [AccessD] A2003 stops working > > Dear List: > > Running Access 2003 SP3 on a 64bit W7 OS machine. ?From time to time it > stops with a message "Access has stopped working." > > I am getting it now consistently on one form on an app when deleting a > record (DoCmd.RunCommand acCmdDeleteRecord). > > I have Office 2010 loaded on this machine as well. > > Anyone have this happen? ?Any cure? > > MTIA > > Rocky Smolin > Beach Access Software > 858-259-4334 > www.bchacc.com www.e-z-mrp.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 bill_patten at embarqmail.com Tue Jul 26 19:03:26 2011 From: bill_patten at embarqmail.com (Bill Patten) Date: Tue, 26 Jul 2011 17:03:26 -0700 Subject: [AccessD] A2003 stops working In-Reply-To: <8FDCFF410EE948FCAECD101A7CBAE855@HAL9007> References: <8FDCFF410EE948FCAECD101A7CBAE855@HAL9007> Message-ID: <85943A5EECAC45039D1BAD282EB2A938@BPCS> Rocky, I had a similar problem back in 2009 when I would try to add a control to a form, it would crash. If it maters I had the problem in 2 applications and they were both ADP's In my case if I exported the form to text and opened it in notepad I found a ton of "UnknownProp(## ending in END" If you export the subject form to text and open it up and see the "UnknownProp items then you are experiencing the same problem I had. I wrote a routine to remove the bad lines and all was well. I had lots of them in the project so used a routine that exported each form to text, opened it removed all the lines and put it back. I always believed the problem was caused by opening it in 2007 then reopening it in 2003. I try not to do that anymore. HTH Bill -------------------------------------------------- From: "Rocky Smolin" Sent: Tuesday, July 26, 2011 2:55 PM To: Subject: [AccessD] A2003 stops working Dear List: Running Access 2003 SP3 on a 64bit W7 OS machine. From time to time it stops with a message "Access has stopped working." I am getting it now consistently on one form on an app when deleting a record (DoCmd.RunCommand acCmdDeleteRecord). I have Office 2010 loaded on this machine as well. Anyone have this happen? Any cure? MTIA Rocky Smolin Beach Access Software 858-259-4334 www.bchacc.com www.e-z-mrp.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From marksimms at verizon.net Tue Jul 26 19:16:35 2011 From: marksimms at verizon.net (Mark Simms) Date: Tue, 26 Jul 2011 20:16:35 -0400 Subject: [AccessD] [cross posted] SharePoint 2010 question(s) In-Reply-To: References: Message-ID: <00ab01cc4bf2$72da9c00$588fd400$@net> Jeff - there is a special website devoted to that topic......and it's not Microsoft's....natch. Access Services remains fairly cloaked in secrecy.... > -----Original Message----- > From: accessd-bounces at databaseadvisors.com [mailto:accessd- > bounces at databaseadvisors.com] On Behalf Of Jeff B > Sent: Tuesday, July 26, 2011 11:11 AM > To: Dba-Tech; dba-OT; AccessD > Subject: [AccessD] [cross posted] SharePoint 2010 question(s) > > I really need to know what you all suggest as the BEST book(s) for > learning > SharePoint 2010, Access Services, and publishing Access databases to > SharePoint. > > > Jeff Barrows > MCP, MCAD, MCSD > > Outbak Technologies, LLC > Racine, WI > jeff.developer at gmail.com > > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com From marksimms at verizon.net Tue Jul 26 19:39:40 2011 From: marksimms at verizon.net (Mark Simms) Date: Tue, 26 Jul 2011 20:39:40 -0400 Subject: [AccessD] Exporting Access to Excel - How to "SUM" a column with a variable number of rows? In-Reply-To: References: <001b01cc494e$1af91530$50eb3f90$@comcast.net><001501cc4adc$bc17d200$34477600$@gmail.com> <016b01cc4b27$57c8ffe0$075affa0$@net> Message-ID: <00ac01cc4bf5$ae236e10$0a6a4a30$@net> Simple. Add a paramarray variant parameter to the procedure and pass it the column numbers or column letters that should be ignored. The only other way is to first test the column using Application.Sum. If the result is non-zero, then it is LIKELY a numeric column. Caveat: all zeros in a column will fail the test ! > -----Original Message----- > From: accessd-bounces at databaseadvisors.com [mailto:accessd- > bounces at databaseadvisors.com] On Behalf Of Brad Marks > Sent: Tuesday, July 26, 2011 4:40 PM > To: Access Developers discussion and problem solving > Subject: Re: [AccessD] Exporting Access to Excel - How to "SUM" a > column with a variable number of rows? > > Mark, > > Thanks for the help, I appreciate it. > > The sample code that you posted works nicely. Each column is summed. > > I do have one question, however. > > How can I prevent select columns from being summed in case they contain > data that should not be summed? > > Thanks, > Brad > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Mark Simms > Sent: Monday, July 25, 2011 7:03 PM > To: 'Access Developers discussion and problem solving' > Subject: Re: [AccessD] Exporting Access to Excel - How to "SUM" acolumn > with a variable number of rows? > > What you need to decide is: dynamic vs. static. > If the data is not going to change, then try this: > > Sub AddTotals > > Dim rngCol as Range > > With Activesheet.UsedRange > > For Each rngCol in .Columns > rngCol.Cells(.rows.Count+1) = Application.Sum(rngCol) > Next > > End With > > End Sub > > Of course this assumes the starting row is #1. > > > -----Original Message----- > > From: accessd-bounces at databaseadvisors.com [mailto:accessd- > > bounces at databaseadvisors.com] On Behalf Of Brad Marks > > Sent: Monday, July 25, 2011 4:52 PM > > To: Access Developers discussion and problem solving > > Subject: Re: [AccessD] Exporting Access to Excel - How to "SUM" a > > column with a variable number of rows? > > > > William and Lambert, > > > > Thanks for the help, I appreciate it. > > > > One of the things that I often struggle with is that there is often > > more than one way to accomplish a task. Before I start to build > > something big, I like to understand the options and also understand > the > > "Best" way to get something done. > > > > Thanks Again, > > Brad > > > > > > -----Original Message----- > > From: accessd-bounces at databaseadvisors.com on behalf of Heenan, > Lambert > > Sent: Mon 7/25/2011 1:31 PM > > To: Access Developers discussion and problem solving > > Subject: Re: [AccessD] Exporting Access to Excel - How to "SUM" a > > column with a variable number of rows? > > > > The way I do this is after exporting the results of a query to Excel > I > > then run a Dcount() against the same query to discover how many rows > > were in the output data.... > > > > nRows = DCount("*", "Some_Query_Name") > > > > Then I open the Excel file with Access (i.e. I set an > > Excell.Application and Excel.Worksheet object) so that I can then add > > the formulas that I need to the row under the last row of exported > > data. > > > > Essentially you build the formula in a text variable like this... > > > > strFormula = "=Sum(" & Excel_Column(nCol) & nRowOffest - nRowsToSum & > > ":" & Excel_Column(nCol) & nRowOffest - 1 & ")" > > > > Where nRowOffest is the row number to start summing (or averaging or > > counting, whatever) and nRowsToSum is the number of row in the > output. > > The function Excel_Column is used to get the right alpha prefix in > the > > cells address... > > > > Function Excel_Column(nCol As Long) As String ' given a valid column > > number return the Alpha name for it ' else return an empty string > > If nCol > 256 Then ' Pre Excel 2007 > > Excel_Column = "" > > Else > > If nCol <= 26 Then > > Excel_Column = Chr(Asc("A") + nCol - 1) > > Else > > Dim sSecond As String > > sSecond = Excel_Column(nCol Mod 26) > > Excel_Column = Excel_Column(nCol \ 26) & sSecond > > End If > > End If > > End Function > > > > Then, after building the text string with the formula just plug it > into > > the relevant cell in the workbook. > > > > After setting the Excel.Application object you then need a reference > to > > the worksheet that needs to be update... > > > > Set Ws = xlApp.Sheets(nSheet) > > With Ws > > strCellAddress = Excel_Column(nCol) & nRowOffest > > strFormula = "=Sum(" & Excel_Column(nCol) & nRowOffest - > > nRowsToSum & ":" & Excel_Column(nCol) & nRowOffest - 1 & ")" > > .Cells(nRowOffest, nCol) = strFormula > > End With > > > > > > HTH > > > > Lambert > > > > -----Original Message----- > > From: accessd-bounces at databaseadvisors.com [mailto:accessd- > > bounces at databaseadvisors.com] On Behalf Of Brad Marks > > Sent: Monday, July 25, 2011 1:54 PM > > To: Access Developers discussion and problem solving > > Subject: [AccessD] Exporting Access to Excel - How to "SUM" a column > > with a variable number of rows? > > > > I am starting to do some experiments involving the creation of Excel > > files from Access. > > > > Let's say that I have an Access Recordset that can contain anywhere > > from 100 to 1,000 records. > > > > I have a little Access application that currently pushes this data > into > > Excel. This all works nicely. > > > > What is the best way to "Sum" a column in Excel after the last > record, > > when the number of records can vary? > > > > Thanks, > > Brad > > > > -- > > 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 has been scanned for viruses and dangerous content by > > MailScanner, and is believed to be clean. > > > > > > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > > -- > This message has been scanned for viruses and > dangerous content by MailScanner, and is > believed to be clean. > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com From vbacreations at gmail.com Tue Jul 26 20:46:51 2011 From: vbacreations at gmail.com (William Benson) Date: Tue, 26 Jul 2011 21:46:51 -0400 Subject: [AccessD] Exporting Access to Excel - How to "SUM" a column with a variable number of rows? In-Reply-To: References: <001b01cc494e$1af91530$50eb3f90$@comcast.net> <001501cc4adc$bc17d200$34477600$@gmail.com> <016b01cc4b27$57c8ffe0$075affa0$@net> Message-ID: Brad, When you mention data that should not be summed are you talking about a mixture of text and numbers? Dates ? What? Do you plan to test on sheet? EXCEL =CountA(range ) = Count(range) is one test for mixture of text and numeric in bulk. Can also be tested with Evaluate ... as in if xl.EVALUATE ("=counta(" & Rng.address & ") = Count (" & rng.address & ")") = True then... On Jul 26, 2011 4:43 PM, "Brad Marks" wrote: From BradM at blackforestltd.com Tue Jul 26 21:33:11 2011 From: BradM at blackforestltd.com (Brad Marks) Date: Tue, 26 Jul 2011 21:33:11 -0500 Subject: [AccessD] Exporting Access to Excel - How to "SUM" a column with a variable number of rows? References: <001b01cc494e$1af91530$50eb3f90$@comcast.net><001501cc4adc$bc17d200$34477600$@gmail.com><016b01cc4b27$57c8ffe0$075affa0$@net> <00ac01cc4bf5$ae236e10$0a6a4a30$@net> Message-ID: Mark, Thanks, Brad -----Original Message----- From: accessd-bounces at databaseadvisors.com on behalf of Mark Simms Sent: Tue 7/26/2011 7:39 PM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Exporting Access to Excel - How to "SUM" a column with a variable number of rows? Simple. Add a paramarray variant parameter to the procedure and pass it the column numbers or column letters that should be ignored. The only other way is to first test the column using Application.Sum. If the result is non-zero, then it is LIKELY a numeric column. Caveat: all zeros in a column will fail the test ! > -----Original Message----- > From: accessd-bounces at databaseadvisors.com [mailto:accessd- > bounces at databaseadvisors.com] On Behalf Of Brad Marks > Sent: Tuesday, July 26, 2011 4:40 PM > To: Access Developers discussion and problem solving > Subject: Re: [AccessD] Exporting Access to Excel - How to "SUM" a > column with a variable number of rows? > > Mark, > > Thanks for the help, I appreciate it. > > The sample code that you posted works nicely. Each column is summed. > > I do have one question, however. > > How can I prevent select columns from being summed in case they contain > data that should not be summed? > > Thanks, > Brad > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Mark Simms > Sent: Monday, July 25, 2011 7:03 PM > To: 'Access Developers discussion and problem solving' > Subject: Re: [AccessD] Exporting Access to Excel - How to "SUM" acolumn > with a variable number of rows? > > What you need to decide is: dynamic vs. static. > If the data is not going to change, then try this: > > Sub AddTotals > > Dim rngCol as Range > > With Activesheet.UsedRange > > For Each rngCol in .Columns > rngCol.Cells(.rows.Count+1) = Application.Sum(rngCol) > Next > > End With > > End Sub > > Of course this assumes the starting row is #1. > > > -----Original Message----- > > From: accessd-bounces at databaseadvisors.com [mailto:accessd- > > bounces at databaseadvisors.com] On Behalf Of Brad Marks > > Sent: Monday, July 25, 2011 4:52 PM > > To: Access Developers discussion and problem solving > > Subject: Re: [AccessD] Exporting Access to Excel - How to "SUM" a > > column with a variable number of rows? > > > > William and Lambert, > > > > Thanks for the help, I appreciate it. > > > > One of the things that I often struggle with is that there is often > > more than one way to accomplish a task. Before I start to build > > something big, I like to understand the options and also understand > the > > "Best" way to get something done. > > > > Thanks Again, > > Brad > > > > > > -----Original Message----- > > From: accessd-bounces at databaseadvisors.com on behalf of Heenan, > Lambert > > Sent: Mon 7/25/2011 1:31 PM > > To: Access Developers discussion and problem solving > > Subject: Re: [AccessD] Exporting Access to Excel - How to "SUM" a > > column with a variable number of rows? > > > > The way I do this is after exporting the results of a query to Excel > I > > then run a Dcount() against the same query to discover how many rows > > were in the output data.... > > > > nRows = DCount("*", "Some_Query_Name") > > > > Then I open the Excel file with Access (i.e. I set an > > Excell.Application and Excel.Worksheet object) so that I can then add > > the formulas that I need to the row under the last row of exported > > data. > > > > Essentially you build the formula in a text variable like this... > > > > strFormula = "=Sum(" & Excel_Column(nCol) & nRowOffest - nRowsToSum & > > ":" & Excel_Column(nCol) & nRowOffest - 1 & ")" > > > > Where nRowOffest is the row number to start summing (or averaging or > > counting, whatever) and nRowsToSum is the number of row in the > output. > > The function Excel_Column is used to get the right alpha prefix in > the > > cells address... > > > > Function Excel_Column(nCol As Long) As String ' given a valid column > > number return the Alpha name for it ' else return an empty string > > If nCol > 256 Then ' Pre Excel 2007 > > Excel_Column = "" > > Else > > If nCol <= 26 Then > > Excel_Column = Chr(Asc("A") + nCol - 1) > > Else > > Dim sSecond As String > > sSecond = Excel_Column(nCol Mod 26) > > Excel_Column = Excel_Column(nCol \ 26) & sSecond > > End If > > End If > > End Function > > > > Then, after building the text string with the formula just plug it > into > > the relevant cell in the workbook. > > > > After setting the Excel.Application object you then need a reference > to > > the worksheet that needs to be update... > > > > Set Ws = xlApp.Sheets(nSheet) > > With Ws > > strCellAddress = Excel_Column(nCol) & nRowOffest > > strFormula = "=Sum(" & Excel_Column(nCol) & nRowOffest - > > nRowsToSum & ":" & Excel_Column(nCol) & nRowOffest - 1 & ")" > > .Cells(nRowOffest, nCol) = strFormula > > End With > > > > > > HTH > > > > Lambert > > > > -----Original Message----- > > From: accessd-bounces at databaseadvisors.com [mailto:accessd- > > bounces at databaseadvisors.com] On Behalf Of Brad Marks > > Sent: Monday, July 25, 2011 1:54 PM > > To: Access Developers discussion and problem solving > > Subject: [AccessD] Exporting Access to Excel - How to "SUM" a column > > with a variable number of rows? > > > > I am starting to do some experiments involving the creation of Excel > > files from Access. > > > > Let's say that I have an Access Recordset that can contain anywhere > > from 100 to 1,000 records. > > > > I have a little Access application that currently pushes this data > into > > Excel. This all works nicely. > > > > What is the best way to "Sum" a column in Excel after the last > record, > > when the number of records can vary? > > > > Thanks, > > Brad > > > > -- > > 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 has been scanned for viruses and dangerous content by > > MailScanner, and is believed to be clean. > > > > > > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > > -- > This message has been scanned for viruses and > dangerous content by MailScanner, and is > believed to be clean. > > > -- > 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 has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. From BradM at blackforestltd.com Tue Jul 26 21:41:56 2011 From: BradM at blackforestltd.com (Brad Marks) Date: Tue, 26 Jul 2011 21:41:56 -0500 Subject: [AccessD] Exporting Access to Excel - How to "SUM" a column with a variable number of rows? References: <001b01cc494e$1af91530$50eb3f90$@comcast.net><001501cc4adc$bc17d200$34477600$@gmail.com><016b01cc4b27$57c8ffe0$075affa0$@net> Message-ID: William, I am just doing some R&D work with "Windows Automation" (Access controlling Excel). I can see several uses for this approach down the road with a couple of projects that I am working on (SQL Server and Access Data - reporting and analysis). Some of the fields are numeric fields that will need to be summed in Excel (total sales, etc.). Other fields will not need to be summed (date fields, etc.) Thanks for your ideas. I have worked with Access for a couple years, but my knowledge of Excel is very limited. I am just starting to experiment with Windows Automation. Brad -----Original Message----- From: accessd-bounces at databaseadvisors.com on behalf of William Benson Sent: Tue 7/26/2011 8:46 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Exporting Access to Excel - How to "SUM" a column with a variable number of rows? Brad, When you mention data that should not be summed are you talking about a mixture of text and numbers? Dates ? What? Do you plan to test on sheet? EXCEL =CountA(range ) = Count(range) is one test for mixture of text and numeric in bulk. Can also be tested with Evaluate ... as in if xl.EVALUATE ("=counta(" & Rng.address & ") = Count (" & rng.address & ")") = True then... On Jul 26, 2011 4:43 PM, "Brad Marks" wrote: -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. From rockysmolin at bchacc.com Wed Jul 27 00:03:48 2011 From: rockysmolin at bchacc.com (Rocky Smolin) Date: Tue, 26 Jul 2011 22:03:48 -0700 Subject: [AccessD] A2003 stops working In-Reply-To: References: <8FDCFF410EE948FCAECD101A7CBAE855@HAL9007><814A51A1F63345E980C150E6E55B65EA@HAL9007> Message-ID: <5A5BEB7491F9430FAEDF2AC529F15E18@HAL9007> 1. Done - no joy. 2. Done - no cigar. 3. Gotta try that - it's quick and easy. 4. Or, given the complexity (several tabs with subforms - lots of code) I could resign from the client. As an alternative to sticking my head in the oven. 5. I think it's not that particular record - it's the delete. However, you're right in that I could permanently switch to DAO to do the delete. Could be the fastest solution. 6. Impractical - as this alternative was used multiple times many years ago. There's a limit. I'm pretty much there. 7. Although you did not suggest this - go away for two days and don't think about it. Which is what I'm doing tomorrow. Thanks for the ideas. I'll post what works, eventually. Rocky -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Doug Steele Sent: Tuesday, July 26, 2011 4:22 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] A2003 stops working Have you tried swinging a lizard around your head three times? I have had these mystery fails, and my general approach (stopping if/when I have success) is: 1. Force a compile. 2. Decompile/recompile. 3. Build an empty database and import all objects from the old database. 4. Delete the form and rebuild it from scratch. 5. Rework the code. In this case, open a dao recordset, find the record and delete it with Recordset.Delete. 6. Tear my hair out. I'm quite bald now. Doug On Tue, Jul 26, 2011 at 3:02 PM, Rocky Smolin wrote: > I just uninstalled O2010 ?- no effect - still craps out on the delete. > > > R > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Rocky > Smolin > Sent: Tuesday, July 26, 2011 2:55 PM > To: accessd at databaseadvisors.com > Subject: [AccessD] A2003 stops working > > Dear List: > > Running Access 2003 SP3 on a 64bit W7 OS machine. ?From time to time > it stops with a message "Access has stopped working." > > I am getting it now consistently on one form on an app when deleting a > record (DoCmd.RunCommand acCmdDeleteRecord). > > I have Office 2010 loaded on this machine as well. > > Anyone have this happen? ?Any cure? > > MTIA > > Rocky Smolin > Beach Access Software > 858-259-4334 > www.bchacc.com www.e-z-mrp.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 fuller.artful at gmail.com Wed Jul 27 01:29:12 2011 From: fuller.artful at gmail.com (Arthur Fuller) Date: Wed, 27 Jul 2011 02:29:12 -0400 Subject: [AccessD] A2003 stops working In-Reply-To: <5A5BEB7491F9430FAEDF2AC529F15E18@HAL9007> References: <8FDCFF410EE948FCAECD101A7CBAE855@HAL9007> <814A51A1F63345E980C150E6E55B65EA@HAL9007> <5A5BEB7491F9430FAEDF2AC529F15E18@HAL9007> Message-ID: Sometimes things foul up due to bad References. Before doing the oven thing, you might want to do Tools|References and see wha 'appnin' there. A. On Wed, Jul 27, 2011 at 1:03 AM, Rocky Smolin wrote: > 1. Done - no joy. > 2. Done - no cigar. > 3. Gotta try that - it's quick and easy. > 4. Or, given the complexity (several tabs with subforms - lots of code) I > could resign from the client. As an alternative to sticking my head in the > oven. > 5. I think it's not that particular record - it's the delete. However, > you're right in that I could permanently switch to DAO to do the delete. > Could be the fastest solution. > 6. Impractical - as this alternative was used multiple times many years > ago. > There's a limit. I'm pretty much there. > > 7. Although you did not suggest this - go away for two days and don't think > about it. Which is what I'm doing tomorrow. > > Thanks for the ideas. > > I'll post what works, eventually. > > Rocky > From vbacreations at gmail.com Wed Jul 27 15:35:50 2011 From: vbacreations at gmail.com (William Benson (VBACreations.Com)) Date: Wed, 27 Jul 2011 16:35:50 -0400 Subject: [AccessD] Trouble creating a memo field Message-ID: <001601cc4c9c$c7aa2ed0$56fe8c70$@gmail.com> I sometimes try to create new tables using SQL but not using CREATETABLE. Example: Select 'Test' as Field1 Into Tbl1 One problem I had recently was, how can one make a MEMO field this way? (I can't find a way, not even with MyDB.Execute ("Select '" & string(257,"a") & "' as Field1 Into Tbl1"),DBFailonError When I do that I get only 255 characters and the field is Text. Another problem is that I often like the table to be created without a first row in it. So I might write something like Select 'Test' as Field1 Into Tbl1 From Tbl2 WHERE 1 = 2 Trouble is, What if there is no table named Tbl2? (Obviously it fails). But I can't seem to get the WHERE clause to be acceptable when I do not specify a valid table in the FROM clause, unlike the first example. Now, I might be able to solve the latter problem by specifying a system table as the FROM table, something I know will always be present... such as: Select 'Test' as Field1 Into Tbl1 From MSysObjects WHERE 1 = 2 But then that code probably would not work in other (non-MSAccess) databases. In fact, I am not sure this process of using Select Into works in non-Access databases anyway (does it?) So... I am now leaning towards using CREATE TABLE always and forever as my choice for the best performing method of creating a table using inline SQL. Does anyone beg to differ with this and/or have a way to resolve the issues I have found? From jackandpat.d at gmail.com Wed Jul 27 16:01:44 2011 From: jackandpat.d at gmail.com (jack drawbridge) Date: Wed, 27 Jul 2011 17:01:44 -0400 Subject: [AccessD] Trouble creating a memo field In-Reply-To: <001601cc4c9c$c7aa2ed0$56fe8c70$@gmail.com> References: <001601cc4c9c$c7aa2ed0$56fe8c70$@gmail.com> Message-ID: William, Allen Browne has samples of various DDL statements here. http://allenbrowne.com/func-DDL.html jack On Wed, Jul 27, 2011 at 4:35 PM, William Benson (VBACreations.Com) < vbacreations at gmail.com> wrote: > I sometimes try to create new tables using SQL but not using CREATETABLE. > Example: Select 'Test' as Field1 Into Tbl1 > > One problem I had recently was, how can one make a MEMO field this way? (I > can't find a way, not even with > MyDB.Execute ("Select '" & string(257,"a") & "' as Field1 Into > Tbl1"),DBFailonError > When I do that I get only 255 characters and the field is Text. > > Another problem is that I often like the table to be created without a > first > row in it. So I might write something like > Select 'Test' as Field1 Into Tbl1 From Tbl2 WHERE 1 = 2 > Trouble is, What if there is no table named Tbl2? (Obviously it fails). But > I can't seem to get the WHERE clause to be acceptable when I do not specify > a valid table in the FROM clause, unlike the first example. > > Now, I might be able to solve the latter problem by specifying a system > table as the FROM table, something I know will always be present... such > as: > Select 'Test' as Field1 Into Tbl1 From MSysObjects WHERE 1 = 2 > > But then that code probably would not work in other (non-MSAccess) > databases. In fact, I am not sure this process of using Select Into works > in > non-Access databases anyway (does it?) > > So... I am now leaning towards using CREATE TABLE always and forever as my > choice for the best performing method of creating a table using inline SQL. > > Does anyone beg to differ with this and/or have a way to resolve the issues > I have found? > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > From stuart at lexacorp.com.pg Wed Jul 27 16:13:50 2011 From: stuart at lexacorp.com.pg (Stuart McLachlan) Date: Thu, 28 Jul 2011 07:13:50 +1000 Subject: [AccessD] Trouble creating a memo field In-Reply-To: <001601cc4c9c$c7aa2ed0$56fe8c70$@gmail.com> References: <001601cc4c9c$c7aa2ed0$56fe8c70$@gmail.com> Message-ID: <4E307F8E.27155.42BDF2F4@stuart.lexacorp.com.pg> Select ...Into doesn't allow you to set PKs, indexes or constraints(if avaiable in the destination) and doesn't let you specify the destination datatype. It is a quick and dirty solution in a limited set of cases. I'd stick with Create table if I were you, -- Stuart On 27 Jul 2011 at 16:35, William Benson (VBACreations. wrote: > I sometimes try to create new tables using SQL but not using > CREATETABLE. Example: Select 'Test' as Field1 Into Tbl1 > > One problem I had recently was, how can one make a MEMO field this > way? (I can't find a way, not even with > MyDB.Execute ("Select '" & string(257,"a") & "' as Field1 Into > Tbl1"),DBFailonError When I do that I get only 255 characters and the > field is Text. > > Another problem is that I often like the table to be created without a > first row in it. So I might write something like > Select 'Test' as Field1 Into Tbl1 From Tbl2 WHERE 1 = 2 > Trouble is, What if there is no table named Tbl2? (Obviously it > fails). But I can't seem to get the WHERE clause to be acceptable when > I do not specify a valid table in the FROM clause, unlike the first > example. > > Now, I might be able to solve the latter problem by specifying a > system table as the FROM table, something I know will always be > present... such as: > Select 'Test' as Field1 Into Tbl1 From MSysObjects WHERE 1 = 2 > > But then that code probably would not work in other (non-MSAccess) > databases. In fact, I am not sure this process of using Select Into > works in non-Access databases anyway (does it?) > > So... I am now leaning towards using CREATE TABLE always and forever > as my choice for the best performing method of creating a table using > inline SQL. > > Does anyone beg to differ with this and/or have a way to resolve the > issues I have found? > From ssharkins at gmail.com Wed Jul 27 16:16:24 2011 From: ssharkins at gmail.com (Susan Harkins) Date: Wed, 27 Jul 2011 17:16:24 -0400 Subject: [AccessD] Trouble creating a memo field References: <001601cc4c9c$c7aa2ed0$56fe8c70$@gmail.com> <4E307F8E.27155.42BDF2F4@stuart.lexacorp.com.pg> Message-ID: <83E2A738E65F4CB1B88AB407020C8059@SusanHarkins> Or create the table and go back alter it by adding a Memo field. Susan H. > Select ...Into doesn't allow you to set PKs, indexes or constraints(if > avaiable in the > destination) and doesn't let you specify the destination datatype. It > is a quick and dirty > solution in a limited set of cases. > > I'd stick with Create table if I were you, > > -- From gustav at cactus.dk Wed Jul 27 17:06:24 2011 From: gustav at cactus.dk (Gustav Brock) Date: Thu, 28 Jul 2011 00:06:24 +0200 Subject: [AccessD] Trouble creating a memo field Message-ID: Hi William Use DAO to create tables and fields (and indexes and relations, even databases) and all your trouble will end. Seriously. That way you will be in control of the finest details including all properties of the objects. Example: Public Function SetTableProperties() As Boolean Dim dbs As DAO.Database Dim tdf As DAO.TableDef Dim fld As DAO.Field Dim prp As DAO.Property Dim strPropertyName As String Set dbs = CurrentDb() Set tdf = dbs.TableDefs("tblTest") Set fld = tdf.Fields(0) ' On Error GoTo Err_Prop strPropertyName = "Description" Set prp = tdf.CreateProperty() prp.Name = strPropertyName prp.Type = dbText prp.Value = "Table Description" tdf.Properties.Append prp strPropertyName = "Caption" Set prp = fld.CreateProperty(strPropertyName, dbText, "Field Caption") fld.Properties.Append prp SetTableProperties = True Exit_Prop: Exit Function Err_Prop: If Err.Number = 3265 Then ' Item not found in this collection. Resume Next Else Debug.Print Err.Number, Err.Description Resume Exit_Prop End If End Function /gustav >>> vbacreations at gmail.com 27-07-2011 22:35:50 >>> I sometimes try to create new tables using SQL but not using CREATETABLE. Example: Select 'Test' as Field1 Into Tbl1 One problem I had recently was, how can one make a MEMO field this way? (I can't find a way, not even with MyDB.Execute ("Select '" & string(257,"a") & "' as Field1 Into Tbl1"),DBFailonError When I do that I get only 255 characters and the field is Text. Another problem is that I often like the table to be created without a first row in it. So I might write something like Select 'Test' as Field1 Into Tbl1 From Tbl2 WHERE 1 = 2 Trouble is, What if there is no table named Tbl2? (Obviously it fails). But I can't seem to get the WHERE clause to be acceptable when I do not specify a valid table in the FROM clause, unlike the first example. Now, I might be able to solve the latter problem by specifying a system table as the FROM table, something I know will always be present... such as: Select 'Test' as Field1 Into Tbl1 From MSysObjects WHERE 1 = 2 But then that code probably would not work in other (non-MSAccess) databases. In fact, I am not sure this process of using Select Into works in non-Access databases anyway (does it?) So... I am now leaning towards using CREATE TABLE always and forever as my choice for the best performing method of creating a table using inline SQL. Does anyone beg to differ with this and/or have a way to resolve the issues I have found? From jimdettman at verizon.net Thu Jul 28 05:22:06 2011 From: jimdettman at verizon.net (Jim Dettman) Date: Thu, 28 Jul 2011 06:22:06 -0400 Subject: [AccessD] Trouble creating a memo field In-Reply-To: References: <001601cc4c9c$c7aa2ed0$56fe8c70$@gmail.com> Message-ID: <94E7A40574FF46DA9A1AB75A711F12CC@XPS> Not sure what Allan has posted, so this might be duplication, but there is a series of three MSKB articles that shows what you can do with JET 4.0 and SQL. This one: http://msdn.microsoft.com/en-us/library/aa140015(v=office.10).aspx#acintsql_ intddl Has a section on DDL statements. Good series of articles (links to the others are at the bottom). Jim. -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jack drawbridge Sent: Wednesday, July 27, 2011 05:02 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Trouble creating a memo field William, Allen Browne has samples of various DDL statements here. http://allenbrowne.com/func-DDL.html jack On Wed, Jul 27, 2011 at 4:35 PM, William Benson (VBACreations.Com) < vbacreations at gmail.com> wrote: > I sometimes try to create new tables using SQL but not using CREATETABLE. > Example: Select 'Test' as Field1 Into Tbl1 > > One problem I had recently was, how can one make a MEMO field this way? (I > can't find a way, not even with > MyDB.Execute ("Select '" & string(257,"a") & "' as Field1 Into > Tbl1"),DBFailonError > When I do that I get only 255 characters and the field is Text. > > Another problem is that I often like the table to be created without a > first > row in it. So I might write something like > Select 'Test' as Field1 Into Tbl1 From Tbl2 WHERE 1 = 2 > Trouble is, What if there is no table named Tbl2? (Obviously it fails). But > I can't seem to get the WHERE clause to be acceptable when I do not specify > a valid table in the FROM clause, unlike the first example. > > Now, I might be able to solve the latter problem by specifying a system > table as the FROM table, something I know will always be present... such > as: > Select 'Test' as Field1 Into Tbl1 From MSysObjects WHERE 1 = 2 > > But then that code probably would not work in other (non-MSAccess) > databases. In fact, I am not sure this process of using Select Into works > in > non-Access databases anyway (does it?) > > So... I am now leaning towards using CREATE TABLE always and forever as my > choice for the best performing method of creating a table using inline SQL. > > Does anyone beg to differ with this and/or have a way to resolve the issues > I have found? > > -- > 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 rls at WeBeDb.com Thu Jul 28 10:29:59 2011 From: rls at WeBeDb.com (Robert Stewart) Date: Thu, 28 Jul 2011 10:29:59 -0500 Subject: [AccessD] SharePoint 2010 question(s) In-Reply-To: References: Message-ID: And what would that magic web site be? At 05:05 PM 7/27/2011, you wrote: >Date: Tue, 26 Jul 2011 20:16:35 -0400 >From: "Mark Simms" >To: "'Access Developers discussion and problem solving'" > >Subject: Re: [AccessD] [cross posted] SharePoint 2010 question(s) >Message-ID: <00ab01cc4bf2$72da9c00$588fd400$@net> > >Jeff - there is a special website devoted to that topic......and it's not >Microsoft's....natch. >Access Services remains fairly cloaked in secrecy.... > > > -----Original Message----- > > From: accessd-bounces at databaseadvisors.com [mailto:accessd- > > bounces at databaseadvisors.com] On Behalf Of Jeff B > > Sent: Tuesday, July 26, 2011 11:11 AM > > To: Dba-Tech; dba-OT; AccessD > > Subject: [AccessD] [cross posted] SharePoint 2010 question(s) > > > > I really need to know what you all suggest as the BEST book(s) for > > learning > > SharePoint 2010, Access Services, and publishing Access databases to > > SharePoint. > > > > > > Jeff Barrows > > MCP, MCAD, MCSD > > Robert L. Stewart www.WeBeDb.com www.DBGUIDesign.com www.RLStewartPhotography.com From ssharkins at gmail.com Thu Jul 28 11:54:58 2011 From: ssharkins at gmail.com (Susan Harkins) Date: Thu, 28 Jul 2011 12:54:58 -0400 Subject: [AccessD] Article on upgrading Message-ID: <65F646A7C57044C1B8659201D3378B55@SusanHarkins> I'll be writing about upgrading to SQL Server and I'd like to include as many of you in it as possible -- you'll get credit and a link -- it's a nice thing to show the boss and clients. The angle is -- questions you should ask when deciding whether to upgrade an Access database to SQL Server (Express is Okay too) -- specific to the decision-making process. Anything you think someone considering the move should evaluate before doing so -- but I'll be writing it from a "questions you should ask" perspective. It'll be interesting reading for the list too I think, so if nobody objects -- I see no reason to ask for these responses off list. Thanks! Susan H. From fuller.artful at gmail.com Thu Jul 28 13:08:53 2011 From: fuller.artful at gmail.com (Arthur Fuller) Date: Thu, 28 Jul 2011 14:08:53 -0400 Subject: [AccessD] Article on upgrading In-Reply-To: <65F646A7C57044C1B8659201D3378B55@SusanHarkins> References: <65F646A7C57044C1B8659201D3378B55@SusanHarkins> Message-ID: I would lend this to your proposed article. 1. Find any occurrences of "Select" plus anything, either in RecordSources or DataSources. Revise said code to refer to a named query. 2. Make sure that all date-fields are not null, giving them instead a default value of Date() at worst, but supplying some value at least. 3. Make sure that all FKs hold true; no orphans whatever, else the whole migration will fail. 4. Strictly a matter of opinion, but MO is that 3NF is insufficient for serious dbs; 4- and 5-NF are mandatory. A. On Thu, Jul 28, 2011 at 12:54 PM, Susan Harkins wrote: > I'll be writing about upgrading to SQL Server and I'd like to include as > many of you in it as possible -- you'll get credit and a link -- it's a nice > thing to show the boss and clients. > > The angle is -- questions you should ask when deciding whether to upgrade > an Access database to SQL Server (Express is Okay too) -- specific to the > decision-making process. Anything you think someone considering the move > should evaluate before doing so -- but I'll be writing it from a "questions > you should ask" perspective. > > It'll be interesting reading for the list too I think, so if nobody objects > -- I see no reason to ask for these responses off list. > > Thanks! > Susan H. > > From ssharkins at gmail.com Thu Jul 28 13:13:43 2011 From: ssharkins at gmail.com (Susan Harkins) Date: Thu, 28 Jul 2011 14:13:43 -0400 Subject: [AccessD] Article on upgrading References: <65F646A7C57044C1B8659201D3378B55@SusanHarkins> Message-ID: <2C78D5CF79B043E5A94FC45422B4A5C3@SusanHarkins> This is good advice for actually performing an upgrade, but I'm looking for questions you might ask when deciding whether you actually should or want to upgrade -- see the difference? What kind of questions do you ask your clients before you actually get there -- what kinds of questions do they ask you when they begin to think about upgrading? Thanks Arthur! Please feel free to play again! ;) Susan H. >I would lend this to your proposed article. > > 1. Find any occurrences of "Select" plus anything, either in RecordSources > or DataSources. Revise said code to refer to a named query. > 2. Make sure that all date-fields are not null, giving them instead a > default value of Date() at worst, but supplying some value at least. > 3. Make sure that all FKs hold true; no orphans whatever, else the whole > migration will fail. > 4. Strictly a matter of opinion, but MO is that 3NF is insufficient for > serious dbs; 4- and 5-NF are mandatory. > From gustav at cactus.dk Thu Jul 28 13:29:26 2011 From: gustav at cactus.dk (Gustav Brock) Date: Thu, 28 Jul 2011 20:29:26 +0200 Subject: [AccessD] Article on upgrading Message-ID: Hi Susan Nice to see back doing tech writing! We've never had a client asking why, they all follow my advice(!) So our reasons to suggest and upgrade: 1. Extreme reliability is requested. I have yet to see an SQL Server break down. 2. Remote access (across a WAN) is needed. 3. Easy, daily, and reliable backup is requested even when clients are on-line. 4. Database size can be expected to outgrow Access' capability. 5. Controlled and secure user access is requested. Note the non-tech level of these parameters. /gustav >>> ssharkins at gmail.com 28-07-2011 18:54:58 >>> I'll be writing about upgrading to SQL Server and I'd like to include as many of you in it as possible -- you'll get credit and a link -- it's a nice thing to show the boss and clients. The angle is -- questions you should ask when deciding whether to upgrade an Access database to SQL Server (Express is Okay too) -- specific to the decision-making process. Anything you think someone considering the move should evaluate before doing so -- but I'll be writing it from a "questions you should ask" perspective. It'll be interesting reading for the list too I think, so if nobody objects -- I see no reason to ask for these responses off list. Thanks! Susan H. From jimdettman at verizon.net Thu Jul 28 13:29:38 2011 From: jimdettman at verizon.net (Jim Dettman) Date: Thu, 28 Jul 2011 14:29:38 -0400 Subject: [AccessD] Article on upgrading In-Reply-To: <65F646A7C57044C1B8659201D3378B55@SusanHarkins> References: <65F646A7C57044C1B8659201D3378B55@SusanHarkins> Message-ID: Susan, 1. Does your database need to be available at all times? If so, then online backups are required and JET is not your answer. 2. How many hours worth of data can you afford to loose? If none or only an hour or two, then look to something other then JET. 3. How much data do you have? If tables with anything more then hundreds of thousands of rows, then be looking to something other then JET. 4. How many users do you have? Generally if more then 15-20, you want to be on something other then JET because if your DB corrupts, that many people not working is costly. For some of the above, they are not hard and fast rules. There are many of apps out there that go further in terms or user or records and work quite well. The above should be considered the starting point of where you should start becoming uncomfortable with using JET. Jim. -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Susan Harkins Sent: Thursday, July 28, 2011 12:55 PM To: Access Developers discussion and problem solving Subject: [AccessD] Article on upgrading I'll be writing about upgrading to SQL Server and I'd like to include as many of you in it as possible -- you'll get credit and a link -- it's a nice thing to show the boss and clients. The angle is -- questions you should ask when deciding whether to upgrade an Access database to SQL Server (Express is Okay too) -- specific to the decision-making process. Anything you think someone considering the move should evaluate before doing so -- but I'll be writing it from a "questions you should ask" perspective. It'll be interesting reading for the list too I think, so if nobody objects -- I see no reason to ask for these responses off list. Thanks! Susan H. -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From ssharkins at gmail.com Thu Jul 28 13:32:32 2011 From: ssharkins at gmail.com (Susan Harkins) Date: Thu, 28 Jul 2011 14:32:32 -0400 Subject: [AccessD] Article on upgrading References: Message-ID: These are reasons why you'd want to upgrade and could possibly be turned into decision-type questions. Thank you! Susan H. > Hi Susan > > Nice to see back doing tech writing! > > We've never had a client asking why, they all follow my advice(!) > So our reasons to suggest and upgrade: > > 1. Extreme reliability is requested. I have yet to see an SQL Server break > down. > 2. Remote access (across a WAN) is needed. > 3. Easy, daily, and reliable backup is requested even when clients are > on-line. > 4. Database size can be expected to outgrow Access' capability. > 5. Controlled and secure user access is requested. > > Note the non-tech level of these parameters. > > /gustav From dw-murphy at cox.net Thu Jul 28 13:33:56 2011 From: dw-murphy at cox.net (Doug Murphy) Date: Thu, 28 Jul 2011 11:33:56 -0700 Subject: [AccessD] Article on upgrading In-Reply-To: <65F646A7C57044C1B8659201D3378B55@SusanHarkins> References: <65F646A7C57044C1B8659201D3378B55@SusanHarkins> Message-ID: <006201cc4d54$e9283620$bb78a260$@cox.net> If you are moving from Access 2007 or 2010 and are using the attachment field type it will not upsize. I had a client who required this type of functionality and had to create similar functionality in SQL Server. As an aside we were having issues with the form with the attachment field being very slow in opening and updating. After getting rid of the attachment field and moving to a SQL server back end there was a significant increase in responsiveness. -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Susan Harkins Sent: Thursday, July 28, 2011 9:55 AM To: Access Developers discussion and problem solving Subject: [AccessD] Article on upgrading I'll be writing about upgrading to SQL Server and I'd like to include as many of you in it as possible -- you'll get credit and a link -- it's a nice thing to show the boss and clients. The angle is -- questions you should ask when deciding whether to upgrade an Access database to SQL Server (Express is Okay too) -- specific to the decision-making process. Anything you think someone considering the move should evaluate before doing so -- but I'll be writing it from a "questions you should ask" perspective. It'll be interesting reading for the list too I think, so if nobody objects -- I see no reason to ask for these responses off list. Thanks! Susan H. -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From ssharkins at gmail.com Thu Jul 28 13:35:44 2011 From: ssharkins at gmail.com (Susan Harkins) Date: Thu, 28 Jul 2011 14:35:44 -0400 Subject: [AccessD] Article on upgrading References: <65F646A7C57044C1B8659201D3378B55@SusanHarkins> Message-ID: <1E8BF7CA21694B89829105EA3573E2AB@SusanHarkins> Thank you Jim -- these are great! Susan H. > Susan, > > 1. Does your database need to be available at all times? If so, then > online > backups are required and JET is not your answer. > > 2. How many hours worth of data can you afford to loose? If none or only > an hour or two, then look to something other then JET. > > 3. How much data do you have? If tables with anything more then hundreds > of > thousands of rows, then be looking to something other then JET. > > 4. How many users do you have? Generally if more then 15-20, you want to > be > on something other then JET because if your DB corrupts, that many people > not working is costly. > > > For some of the above, they are not hard and fast rules. There are many > of apps out there that go further in terms or user or records and work > quite > well. The above should be considered the starting point of where you > should > start becoming uncomfortable with using JET. > > Jim. > > > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Susan Harkins > Sent: Thursday, July 28, 2011 12:55 PM > To: Access Developers discussion and problem solving > Subject: [AccessD] Article on upgrading > > I'll be writing about upgrading to SQL Server and I'd like to include as > many of you in it as possible -- you'll get credit and a link -- it's a > nice > thing to show the boss and clients. > > The angle is -- questions you should ask when deciding whether to upgrade > an > Access database to SQL Server (Express is Okay too) -- specific to the > decision-making process. Anything you think someone considering the move > should evaluate before doing so -- but I'll be writing it from a > "questions > you should ask" perspective. > > It'll be interesting reading for the list too I think, so if nobody > objects > -- I see no reason to ask for these responses off list. > > Thanks! > Susan H. > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com From rusty.hammond at cpiqpc.com Thu Jul 28 13:52:45 2011 From: rusty.hammond at cpiqpc.com (Rusty Hammond) Date: Thu, 28 Jul 2011 13:52:45 -0500 Subject: [AccessD] Article on upgrading In-Reply-To: <65F646A7C57044C1B8659201D3378B55@SusanHarkins> References: <65F646A7C57044C1B8659201D3378B55@SusanHarkins> Message-ID: <49A286ABF515E94A8505CD14DEB721701744A02B@CPIEMAIL-EVS1.CPIQPC.NET> Just off the top of my head: - Do they have network stability issues (ie computers losing connections, slow internet connection speeds, etc...) If so, if they think they need to go to SQL because the database is slow or the backend keeps getting corrupt, it may be they need to invest in the network and moving to SQL won't be required. - What kind of machine is the backend hosted on currently? Maybe an upgrade to that machine, or putting the backend on a more robust machine will take care of any issues. - Are they running a frontend/backend setup currently? Splitting up the database to a frontend and backend and putting copies of the frontend on each user computer may alleviate issues they may currently be having. - Is user level security becoming a requirement? Access security is easy to break and, if I remember correctly, non-existent in Access 2007 and 2010 - Using multiple versions of Access on your network to run your frontend? I've seen issues pop-up when different versions are hitting a backend and causing slowness and corruption in the backend. Moving to a SQL backend took care of the issues. - If they move to SQL, do they have a server? If not, a robust pc on a peer-to-peer network (Express only)? If not, are they willing to invest in one? - Are they hesitant to move to SQL because of cost? SQL Express is free. - Are they anticipating a lot of growth? Might be wise to make the move to SQL now so they aren't having to scramble to upgrade later. Rusty -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Susan Harkins Sent: Thursday, July 28, 2011 11:55 AM To: Access Developers discussion and problem solving Subject: [AccessD] Article on upgrading I'll be writing about upgrading to SQL Server and I'd like to include as many of you in it as possible -- you'll get credit and a link -- it's a nice thing to show the boss and clients. The angle is -- questions you should ask when deciding whether to upgrade an Access database to SQL Server (Express is Okay too) -- specific to the decision-making process. Anything you think someone considering the move should evaluate before doing so -- but I'll be writing it from a "questions you should ask" perspective. It'll be interesting reading for the list too I think, so if nobody objects -- I see no reason to ask for these responses off list. Thanks! Susan H. -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com ********************************************************************** WARNING: All e-mail sent to and from this address will be received, scanned or otherwise recorded by the CPI Qualified Plan Consultants, Inc. corporate e-mail system and is subject to archival, monitoring or review by, and/or disclosure to, someone other than the recipient. ********************************************************************** From jm.hwsn at gmail.com Thu Jul 28 14:06:00 2011 From: jm.hwsn at gmail.com (jm.hwsn) Date: Thu, 28 Jul 2011 14:06:00 -0500 Subject: [AccessD] Article on upgrading In-Reply-To: <49A286ABF515E94A8505CD14DEB721701744A02B@CPIEMAIL-EVS1.CPIQPC.NET> References: <65F646A7C57044C1B8659201D3378B55@SusanHarkins> <49A286ABF515E94A8505CD14DEB721701744A02B@CPIEMAIL-EVS1.CPIQPC.NET> Message-ID: <4e31b319.8188ec0a.391e.4fa3@mx.google.com> All the ideas presented so far are great... some I never considered. I would be concerned about cost. As Rusty stated below, do they have a server is a major consideration. The cost of a server, the cost of the software and possibly the cost of an SQL Server Administrator if they don't have one on staff. - How many users are currently using the system and how many will use it once converted? - What is the time-line for conversion? 2-months, 6 months or longer - Do the PCs currently being used need to be upgraded/replaced once the conversion is completed? If the conversion is six months away, is the current plan to replace the user machines adequate? - If the major consideration is performance, then upgrading to Express is a viable option if all things are static. Express has a 4GB data limit so that might also be a consideration. Jim H. -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Rusty Hammond Sent: Thursday, July 28, 2011 1:53 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Article on upgrading Just off the top of my head: - Do they have network stability issues (ie computers losing connections, slow internet connection speeds, etc...) If so, if they think they need to go to SQL because the database is slow or the backend keeps getting corrupt, it may be they need to invest in the network and moving to SQL won't be required. - What kind of machine is the backend hosted on currently? Maybe an upgrade to that machine, or putting the backend on a more robust machine will take care of any issues. - Are they running a frontend/backend setup currently? Splitting up the database to a frontend and backend and putting copies of the frontend on each user computer may alleviate issues they may currently be having. - Is user level security becoming a requirement? Access security is easy to break and, if I remember correctly, non-existent in Access 2007 and 2010 - Using multiple versions of Access on your network to run your frontend? I've seen issues pop-up when different versions are hitting a backend and causing slowness and corruption in the backend. Moving to a SQL backend took care of the issues. - If they move to SQL, do they have a server? If not, a robust pc on a peer-to-peer network (Express only)? If not, are they willing to invest in one? - Are they hesitant to move to SQL because of cost? SQL Express is free. - Are they anticipating a lot of growth? Might be wise to make the move to SQL now so they aren't having to scramble to upgrade later. Rusty -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Susan Harkins Sent: Thursday, July 28, 2011 11:55 AM To: Access Developers discussion and problem solving Subject: [AccessD] Article on upgrading I'll be writing about upgrading to SQL Server and I'd like to include as many of you in it as possible -- you'll get credit and a link -- it's a nice thing to show the boss and clients. The angle is -- questions you should ask when deciding whether to upgrade an Access database to SQL Server (Express is Okay too) -- specific to the decision-making process. Anything you think someone considering the move should evaluate before doing so -- but I'll be writing it from a "questions you should ask" perspective. It'll be interesting reading for the list too I think, so if nobody objects -- I see no reason to ask for these responses off list. Thanks! Susan H. -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com ********************************************************************** WARNING: All e-mail sent to and from this address will be received, scanned or otherwise recorded by the CPI Qualified Plan Consultants, Inc. corporate e-mail system and is subject to archival, monitoring or review by, and/or disclosure to, someone other than the recipient. ********************************************************************** -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From fuller.artful at gmail.com Thu Jul 28 14:08:49 2011 From: fuller.artful at gmail.com (Arthur Fuller) Date: Thu, 28 Jul 2011 15:08:49 -0400 Subject: [AccessD] Article on upgrading In-Reply-To: <2C78D5CF79B043E5A94FC45422B4A5C3@SusanHarkins> References: <65F646A7C57044C1B8659201D3378B55@SusanHarkins> <2C78D5CF79B043E5A94FC45422B4A5C3@SusanHarkins> Message-ID: First, why bother with the upgrade? Two potential answers: 1, Because the DB size limit is going to be a problem. In many cases this is not an issue, but my philosophy is, Plan For Success, according to which maxim what you originally thought were going to be 1K users turns out to be 1M users. 2, Deploy the initial virgin in MDB or AAcdb format, and hope that it works for the short-term. 3. Be prepared to go to SQL Server if you should be so lucky as to achieve success. (Fuller's fifth law: only successful apps require upgrades; the rest die on the vine). And these numbers remind me of the old joke: How many kinds of programmers are there? Three: those who can count and those who can't. A. On Thu, Jul 28, 2011 at 2:13 PM, Susan Harkins wrote: > This is good advice for actually performing an upgrade, but I'm looking for > questions you might ask when deciding whether you actually should or want to > upgrade -- see the difference? What kind of questions do you ask your > clients before you actually get there -- what kinds of questions do they ask > you when they begin to think about upgrading? > > Thanks Arthur! Please feel free to play again! ;) > Susan H. > > From ssharkins at gmail.com Thu Jul 28 14:17:15 2011 From: ssharkins at gmail.com (Susan Harkins) Date: Thu, 28 Jul 2011 15:17:15 -0400 Subject: [AccessD] Article on upgrading References: <65F646A7C57044C1B8659201D3378B55@SusanHarkins> <006201cc4d54$e9283620$bb78a260$@cox.net> Message-ID: Thanks for mentioning these issue Doug -- I wonder how many other folks are being snagged? Susan H. > If you are moving from Access 2007 or 2010 and are using the attachment > field type it will not upsize. I had a client who required this type of > functionality and had to create similar functionality in SQL Server. As an > aside we were having issues with the form with the attachment field being > very slow in opening and updating. After getting rid of the attachment > field > and moving to a SQL server back end there was a significant increase in > responsiveness. > > > I'll be writing about upgrading to SQL Server and I'd like to include as > many of you in it as possible -- you'll get credit and a link -- it's a > nice > thing to show the boss and clients. > From ssharkins at gmail.com Thu Jul 28 14:18:17 2011 From: ssharkins at gmail.com (Susan Harkins) Date: Thu, 28 Jul 2011 15:18:17 -0400 Subject: [AccessD] Article on upgrading References: <65F646A7C57044C1B8659201D3378B55@SusanHarkins> <49A286ABF515E94A8505CD14DEB721701744A02B@CPIEMAIL-EVS1.CPIQPC.NET> Message-ID: Well Rusty... are you trying to steal my job????????? ;) Thank you! Susan H. > Just off the top of my head: > > - Do they have network stability issues (ie computers losing > connections, slow internet connection speeds, etc...) If so, if they > think they need to go to SQL because the database is slow or the backend > keeps getting corrupt, it may be they need to invest in the network and > moving to SQL won't be required. > > - What kind of machine is the backend hosted on currently? Maybe an > upgrade to that machine, or putting the backend on a more robust machine > will take care of any issues. > > - Are they running a frontend/backend setup currently? Splitting up the > database to a frontend and backend and putting copies of the frontend on > each user computer may alleviate issues they may currently be having. > > - Is user level security becoming a requirement? Access security is > easy to break and, if I remember correctly, non-existent in Access 2007 > and 2010 > > - Using multiple versions of Access on your network to run your > frontend? I've seen issues pop-up when different versions are hitting a > backend and causing slowness and corruption in the backend. Moving to a > SQL backend took care of the issues. > > - If they move to SQL, do they have a server? If not, a robust pc on a > peer-to-peer network (Express only)? If not, are they willing to invest > in one? > > - Are they hesitant to move to SQL because of cost? SQL Express is > free. > > - Are they anticipating a lot of growth? Might be wise to make the move > to SQL now so they aren't having to scramble to upgrade later. > > > Rusty > > > I'll be writing about upgrading to SQL Server and I'd like to include as > many of you in it as possible -- you'll get credit and a link -- it's a > nice thing to show the boss and clients. From ssharkins at gmail.com Thu Jul 28 14:16:38 2011 From: ssharkins at gmail.com (Susan Harkins) Date: Thu, 28 Jul 2011 15:16:38 -0400 Subject: [AccessD] Article on upgrading References: <65F646A7C57044C1B8659201D3378B55@SusanHarkins><2C78D5CF79B043E5A94FC45422B4A5C3@SusanHarkins> Message-ID: <467DB63A6DBA4FBAA3D30C3E4A9E4637@SusanHarkins> Thanks Arthur -- these are good -- :) Love your counting logic. :) Susan H. > First, why bother with the upgrade? Two potential answers: > 1, Because the DB size limit is going to be a problem. In many cases this > is > not an issue, but my philosophy is, Plan For Success, according to which > maxim what you originally thought were going to be 1K users turns out to > be > 1M users. > 2, Deploy the initial virgin in MDB or AAcdb format, and hope that it > works > for the short-term. > 3. Be prepared to go to SQL Server if you should be so lucky as to achieve > success. (Fuller's fifth law: only successful apps require upgrades; the > rest die on the vine). > > And these numbers remind me of the old joke: How many kinds of programmers > are there? Three: those who can count and those who can't. > > A. > > On Thu, Jul 28, 2011 at 2:13 PM, Susan Harkins > wrote: > >> This is good advice for actually performing an upgrade, but I'm looking >> for >> questions you might ask when deciding whether you actually should or want >> to >> upgrade -- see the difference? What kind of questions do you ask your >> clients before you actually get there -- what kinds of questions do they >> ask >> you when they begin to think about upgrading? >> >> Thanks Arthur! Please feel free to play again! ;) >> Susan H. >> >> > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com From ssharkins at gmail.com Thu Jul 28 14:19:06 2011 From: ssharkins at gmail.com (Susan Harkins) Date: Thu, 28 Jul 2011 15:19:06 -0400 Subject: [AccessD] Article on upgrading References: <65F646A7C57044C1B8659201D3378B55@SusanHarkins><49A286ABF515E94A8505CD14DEB721701744A02B@CPIEMAIL-EVS1.CPIQPC.NET> <4e31b319.8188ec0a.391e.4fa3@mx.google.com> Message-ID: <5FC2F1EA8EC84688A0D905A9EDF4C3EF@SusanHarkins> Thanks Jim -- you guys have provided some terrific thinking points! Susan H. > All the ideas presented so far are great... some I never considered. > > I would be concerned about cost. > > As Rusty stated below, do they have a server is a major consideration. > The cost of a server, the cost of the software and possibly the cost of an > SQL Server Administrator if they don't have one on staff. > > - How many users are currently using the system and how many will use it > once converted? > - What is the time-line for conversion? 2-months, 6 months or longer > - Do the PCs currently being used need to be upgraded/replaced once the > conversion is completed? If the conversion is six months away, is the > current plan to replace the user machines adequate? > - If the major consideration is performance, then upgrading to Express is > a > viable option if all things are static. Express has a 4GB data limit so > that might also be a consideration. > > From DWUTKA at Marlow.com Thu Jul 28 16:29:30 2011 From: DWUTKA at Marlow.com (Drew Wutka) Date: Thu, 28 Jul 2011 16:29:30 -0500 Subject: [AccessD] Article on upgrading In-Reply-To: References: Message-ID: I completely agree with Gustav's points, with one addition (that I can think of right now), and that would be database driven business logic. Ie, a record is put into table 1, then a record in table 2 is modified. Triggers. Drew -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: Thursday, July 28, 2011 1:29 PM To: accessd at databaseadvisors.com Subject: Re: [AccessD] Article on upgrading Hi Susan Nice to see back doing tech writing! We've never had a client asking why, they all follow my advice(!) So our reasons to suggest and upgrade: 1. Extreme reliability is requested. I have yet to see an SQL Server break down. 2. Remote access (across a WAN) is needed. 3. Easy, daily, and reliable backup is requested even when clients are on-line. 4. Database size can be expected to outgrow Access' capability. 5. Controlled and secure user access is requested. Note the non-tech level of these parameters. /gustav >>> ssharkins at gmail.com 28-07-2011 18:54:58 >>> I'll be writing about upgrading to SQL Server and I'd like to include as many of you in it as possible -- you'll get credit and a link -- it's a nice thing to show the boss and clients. The angle is -- questions you should ask when deciding whether to upgrade an Access database to SQL Server (Express is Okay too) -- specific to the decision-making process. Anything you think someone considering the move should evaluate before doing so -- but I'll be writing it from a "questions you should ask" perspective. It'll be interesting reading for the list too I think, so if nobody objects -- I see no reason to ask for these responses off list. Thanks! Susan H. -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com The information contained in this transmission is intended only for the person or entity to which it is addressed and may contain II-VI Proprietary and/or II-VI Business Sensitive material. If you are not the intended recipient, please contact the sender immediately and destroy the material in its entirety, whether electronic or hard copy. You are notified that any review, retransmission, copying, disclosure, dissemination, or other use of, or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. From darryl at whittleconsulting.com.au Thu Jul 28 18:38:16 2011 From: darryl at whittleconsulting.com.au (Darryl Collins) Date: Fri, 29 Jul 2011 09:38:16 +1000 Subject: [AccessD] Article on upgrading In-Reply-To: <65F646A7C57044C1B8659201D3378B55@SusanHarkins> References: <65F646A7C57044C1B8659201D3378B55@SusanHarkins> Message-ID: <000301cc4d7f$6cf62dc0$46e28940$@com.au> Hi Susan, For people starting out: I downloaded the brand new Denali CTP3 SQL Server Express yesterday. It is a good place to start for new users as it is fairly light and simple (as express used to be) and was totally painless to install (and that hasn't been the case in the past with SQL server installations. Only been a day so haven't had much time to play, but it has been great so far, at least on a Windows 7 PC. <> Happy. Cheers Darryl. -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Susan Harkins Sent: Friday, 29 July 2011 2:55 AM To: Access Developers discussion and problem solving Subject: [AccessD] Article on upgrading I'll be writing about upgrading to SQL Server and I'd like to include as many of you in it as possible -- you'll get credit and a link -- it's a nice thing to show the boss and clients. The angle is -- questions you should ask when deciding whether to upgrade an Access database to SQL Server (Express is Okay too) -- specific to the decision-making process. Anything you think someone considering the move should evaluate before doing so -- but I'll be writing it from a "questions you should ask" perspective. It'll be interesting reading for the list too I think, so if nobody objects -- I see no reason to ask for these responses off list. Thanks! Susan H. -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From darryl at whittleconsulting.com.au Thu Jul 28 18:40:58 2011 From: darryl at whittleconsulting.com.au (Darryl Collins) Date: Fri, 29 Jul 2011 09:40:58 +1000 Subject: [AccessD] Article on upgrading In-Reply-To: References: Message-ID: <000401cc4d7f$cd6c1660$68444320$@com.au> Triggers, Hell Yeah -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Drew Wutka Sent: Friday, 29 July 2011 7:30 AM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Article on upgrading I completely agree with Gustav's points, with one addition (that I can think of right now), and that would be database driven business logic. Ie, a record is put into table 1, then a record in table 2 is modified. Triggers. Drew -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: Thursday, July 28, 2011 1:29 PM To: accessd at databaseadvisors.com Subject: Re: [AccessD] Article on upgrading Hi Susan Nice to see back doing tech writing! We've never had a client asking why, they all follow my advice(!) So our reasons to suggest and upgrade: 1. Extreme reliability is requested. I have yet to see an SQL Server break down. 2. Remote access (across a WAN) is needed. 3. Easy, daily, and reliable backup is requested even when clients are on-line. 4. Database size can be expected to outgrow Access' capability. 5. Controlled and secure user access is requested. Note the non-tech level of these parameters. /gustav >>> ssharkins at gmail.com 28-07-2011 18:54:58 >>> I'll be writing about upgrading to SQL Server and I'd like to include as many of you in it as possible -- you'll get credit and a link -- it's a nice thing to show the boss and clients. The angle is -- questions you should ask when deciding whether to upgrade an Access database to SQL Server (Express is Okay too) -- specific to the decision-making process. Anything you think someone considering the move should evaluate before doing so -- but I'll be writing it from a "questions you should ask" perspective. It'll be interesting reading for the list too I think, so if nobody objects -- I see no reason to ask for these responses off list. Thanks! Susan H. -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com The information contained in this transmission is intended only for the person or entity to which it is addressed and may contain II-VI Proprietary and/or II-VI Business Sensitive material. If you are not the intended recipient, please contact the sender immediately and destroy the material in its entirety, whether electronic or hard copy. You are notified that any review, retransmission, copying, disclosure, dissemination, or other use of, or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From marksimms at verizon.net Fri Jul 29 09:27:54 2011 From: marksimms at verizon.net (Mark Simms) Date: Fri, 29 Jul 2011 10:27:54 -0400 Subject: [AccessD] SharePoint 2010 question(s) In-Reply-To: References: Message-ID: <000001cc4dfb$b5afa920$210efb60$@net> http://dmoffat.wordpress.com/2009/11/06/access-2010-and-sharepoint-welcome-t o-the-hybrid-access-application/ > > And what would that magic web site be? > From davidmcafee at gmail.com Fri Jul 29 11:30:55 2011 From: davidmcafee at gmail.com (David McAfee) Date: Fri, 29 Jul 2011 09:30:55 -0700 Subject: [AccessD] Article on upgrading In-Reply-To: <000401cc4d7f$cd6c1660$68444320$@com.au> References: <000401cc4d7f$cd6c1660$68444320$@com.au> Message-ID: 1. The ability to write comments in the SQL 2. The ability to do changes to data in the back end, without requiring a FE change. I know most will say that you can do this in Access too, but the FE should be for presentation of the data and a place to enter the data. Need to change a view or sproc? Change it, and as long as input parameters haven't changes, to tweaking is needed in the FE. 3. Speed 4. Ability to use UDF's 5. Stored Procedures! 6. Triggers, even though I try not to use them. I feel if the system is designed correctly, there is no reason for a trigger. Now if a system, such as an ERP, has stored procedures which are not allowed to be modified, then I can see a reason to use a trigger for a table that gets updated. 7. The ability to run scheduled jobs and back ups each night 8. The ability to email from the BE if certain conditions are found (new record found during a job ran at midnight) 9. Case statements in SQL I'm sure I can think of more reasons to use SQL :) On Thu, Jul 28, 2011 at 4:40 PM, Darryl Collins < darryl at whittleconsulting.com.au> wrote: > Triggers, Hell Yeah > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Drew Wutka > Sent: Friday, 29 July 2011 7:30 AM > To: Access Developers discussion and problem solving > Subject: Re: [AccessD] Article on upgrading > > I completely agree with Gustav's points, with one addition (that I can > think of right now), and that would be database driven business logic. > > Ie, a record is put into table 1, then a record in table 2 is modified. > Triggers. > > Drew > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Gustav Brock > Sent: Thursday, July 28, 2011 1:29 PM > To: accessd at databaseadvisors.com > Subject: Re: [AccessD] Article on upgrading > > Hi Susan > > Nice to see back doing tech writing! > > We've never had a client asking why, they all follow my advice(!) > So our reasons to suggest and upgrade: > > 1. Extreme reliability is requested. I have yet to see an SQL Server > break down. > 2. Remote access (across a WAN) is needed. > 3. Easy, daily, and reliable backup is requested even when clients are > on-line. > 4. Database size can be expected to outgrow Access' capability. > 5. Controlled and secure user access is requested. > > Note the non-tech level of these parameters. > > /gustav > > > >>> ssharkins at gmail.com 28-07-2011 18:54:58 >>> > I'll be writing about upgrading to SQL Server and I'd like to include as > many of you in it as possible -- you'll get credit and a link -- it's a > nice thing to show the boss and clients. > > The angle is -- questions you should ask when deciding whether to > upgrade an Access database to SQL Server (Express is Okay too) -- > specific to the decision-making process. Anything you think someone > considering the move should evaluate before doing so -- but I'll be > writing it from a "questions you should ask" perspective. > > It'll be interesting reading for the list too I think, so if nobody > objects -- I see no reason to ask for these responses off list. > > Thanks! > Susan H. > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > The information contained in this transmission is intended only for the > person or entity > to which it is addressed and may contain II-VI Proprietary and/or II-VI > Business > Sensitive material. If you are not the intended recipient, please contact > the sender > immediately and destroy the material in its entirety, whether electronic or > hard copy. > You are notified that any review, retransmission, copying, disclosure, > dissemination, > or other use of, or taking of any action in reliance upon this information > by persons > or entities other than the intended recipient is prohibited. > > > -- > 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 Fri Jul 29 12:40:12 2011 From: stuart at lexacorp.com.pg (Stuart McLachlan) Date: Sat, 30 Jul 2011 03:40:12 +1000 Subject: [AccessD] Article on upgrading In-Reply-To: References: , <000401cc4d7f$cd6c1660$68444320$@com.au>, Message-ID: <4E32F07C.16127.4C46D394@stuart.lexacorp.com.pg> Just to play Devil's Advocate :) - See comments in line -- Stuart On 29 Jul 2011 at 9:30, David McAfee wrote: > 1. The ability to write comments in the SQL > Access queries have a Description property which lets you store comments about the query. > 2. The ability to do changes to data in the back end, without > requiring a FE change. I know most will say that you can do this in > Access too, but the FE should be for presentation of the data and a > place to enter the data. Need to change a view or sproc? Change it, > and as long as input parameters haven't changes, to tweaking is needed > in the FE. Changes in an Access BE table are seen automatically by an Access FE. Changes in an SQL Server table are NOT seen automatically in an Access FE. You need to relink the FE to see the changes. > > 3. Speed > Sometimes. > 4. Ability to use UDF's > You can use Access functions in queries to an Access BE > 5. Stored Procedures! > VBA > 6. Triggers, even though I try not to use them. I feel if the system > is designed correctly, > there is no reason for a trigger. Now if a system, such as an ERP, > has > stored procedures > which are not allowed to be modified, then I can see a reason to > use a > trigger for a table > that gets updated. > Access 2010 has table macros/triggers. > 7. The ability to run scheduled jobs and back ups each night > I've been running scheduled jobs and backups with Access BEs since ver 97. Task Scheduler and command line arguments are your friend. > 8. The ability to email from the BE if certain conditions are found > (new record found during a job ran at midnight) > I've been writing functions to automatically email from Access based on various conditiions since ver 97. > 9. Case statements in SQL > Access queries can use IIF() and Access functions containing SELECT CASE and other more complex/powerful conditionals. > I'm sure I can think of more reasons to use SQL :) > From jwcolby at colbyconsulting.com Fri Jul 29 13:07:11 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Fri, 29 Jul 2011 14:07:11 -0400 Subject: [AccessD] Article on upgrading In-Reply-To: <65F646A7C57044C1B8659201D3378B55@SusanHarkins> References: <65F646A7C57044C1B8659201D3378B55@SusanHarkins> Message-ID: <4E32F6CF.5050207@colbyconsulting.com> What is the server that will host SQL Server. This needs to be asked particularly if you are installing SQL Server onto the server. Windows Server 2000 cannot support SQL Server 2008 or beyond. This has to do with not supporting the .Net frameworks required. So for Windows 2000 and below, SQL Server 2005 is a good as it gets. Know that SQL Server 2008 Express is actually the 2008 R2. This matters IF any other SQL Server 2008 instances are running that are not 2008 R2 because the two versions are *not* compatible. 2008R2 can handle the non-R2 files (and backups) but 2008 cannot handle R2 files and backups. Expect to learn SQL Server security! John W. Colby www.ColbyConsulting.com On 7/28/2011 12:54 PM, Susan Harkins wrote: > I'll be writing about upgrading to SQL Server and I'd like to include as many of you in it as possible -- you'll get credit and a link -- it's a nice thing to show the boss and clients. > > The angle is -- questions you should ask when deciding whether to upgrade an Access database to SQL Server (Express is Okay too) -- specific to the decision-making process. Anything you think someone considering the move should evaluate before doing so -- but I'll be writing it from a "questions you should ask" perspective. > > It'll be interesting reading for the list too I think, so if nobody objects -- I see no reason to ask for these responses off list. > > Thanks! > Susan H. From ssharkins at gmail.com Fri Jul 29 13:33:35 2011 From: ssharkins at gmail.com (Susan Harkins) Date: Fri, 29 Jul 2011 14:33:35 -0400 Subject: [AccessD] Article on upgrading References: <65F646A7C57044C1B8659201D3378B55@SusanHarkins> <4E32F6CF.5050207@colbyconsulting.com> Message-ID: Thanks John! Susan H. > What is the server that will host SQL Server. This needs to be asked > particularly if you are installing SQL Server onto the server. Windows > Server 2000 cannot support SQL Server 2008 or beyond. This has to do with > not supporting the .Net frameworks required. So for Windows 2000 and > below, SQL Server 2005 is a good as it gets. > > Know that SQL Server 2008 Express is actually the 2008 R2. This matters > IF any other SQL Server 2008 instances are running that are not 2008 R2 > because the two versions are *not* compatible. 2008R2 can handle the > non-R2 files (and backups) but 2008 cannot handle R2 files and backups. > > Expect to learn SQL Server security! > From davidmcafee at gmail.com Fri Jul 29 13:37:52 2011 From: davidmcafee at gmail.com (David McAfee) Date: Fri, 29 Jul 2011 11:37:52 -0700 Subject: [AccessD] Article on upgrading In-Reply-To: <4E32F07C.16127.4C46D394@stuart.lexacorp.com.pg> References: <000401cc4d7f$cd6c1660$68444320$@com.au> <4E32F07C.16127.4C46D394@stuart.lexacorp.com.pg> Message-ID: Stuart I agree with you on all topics. I've done things with Access that some people don't even know it's even possible to do, which is why those same people consider it a toy. in regards to #1, I meant inline comments as is done in VBA: INSERT INTO tblSomeTable (field1, field2...) SELECT field1, field2 FROM tblSomeWhereElse WHERE Something =1 AND HireDate > @SomeDate --Added on 1/1/2011 for some stupid reason AND SomeOtherReason = @TheCriteria --Added 7/1/2011 because someone decided this is now needed Another reason I love the inline comments is I've had some accountants have me add criteria, then question it 6 months later so I tend to put stuff in the stored procedure (used for a report) that reminds me so. --AND Status Flag IN ('A','R')-- old criteria prior to 6/9/2009 AND Status Flag IN ('A','R','V')--Added on 6/9/2009 as per chuck's email asking for this I love emailing them their original email asking for it to be changed. #2, I guess I'm used to dealing more with ADPs than MDBs. But this too, was worded badly. A stored procedure needs to be changed because a new table needs to be added or criteria changed in WHERE clause. If this was a non split mdb or if the user was creating the dynamic sql in the FE (not just access but VB/C# FE's too), the FE would have to be changed. SQL using ADPs or C#,VB.NET, Web FE's see the change instantly. #3 When have you seen access return a resultset faster than SQL? #4 Yes, you can use functions in the FE, but once again, if it can be done in the BE and does not slow it down, and allows changes without affecting the FE, I prefer doing it back there. #5 :) #6 They're still triggers. Bleh! :P #7 I do this too, but it is nice to have a built in feature that does this. #8 me too, but like I said above, it's nice to have something built in do this. #9 true, but it gets ugly when you have to do a lot of case statements. SELECT CASE WHEN X=0 THEN 'You are Royally Fd today!' CASE WHEN x=1 and Sky=blue and StarsInTheSky =0 THEN 'Its a perfect world' CASE WHEN x=1 and Sky = gray and StarsInTheSky=0 THEN 'MustBeMonday' CASE WHEN X=1 and Sky = black and StartsInTheSky =1 THEN 'Enjoy the night!' --Many more cases here ELSE 'Just a normal day' END AS TypeOfDay #10, Oh, I remember now, restore back in time!!!! I've never had to use this for reasons of my own but I've had other developers yell out "OH SHIT" when testing something on a live system and not use a transaction/rollback. no prob, restore to a point back in time, like 10 minutes. done. :) On Fri, Jul 29, 2011 at 10:40 AM, Stuart McLachlan wrote: > Just to play Devil's Advocate :) > - See comments in line > > -- > Stuart > > On 29 Jul 2011 at 9:30, David McAfee wrote: > > > 1. The ability to write comments in the SQL > > > > Access queries have a Description property which lets you store comments > about the query. > > > 2. The ability to do changes to data in the back end, without > > requiring a FE change. I know most will say that you can do this in > > Access too, but the FE should be for presentation of the data and a > > place to enter the data. Need to change a view or sproc? Change it, > > and as long as input parameters haven't changes, to tweaking is needed > > in the FE. > > Changes in an Access BE table are seen automatically by an Access FE. > Changes in an > SQL Server table are NOT seen automatically in an Access FE. You need to > relink the FE to > see the changes. > > > > > 3. Speed > > > > Sometimes. > > > 4. Ability to use UDF's > > > > You can use Access functions in queries to an Access BE > > > 5. Stored Procedures! > > > > VBA > > > 6. Triggers, even though I try not to use them. I feel if the system > > is designed correctly, > > there is no reason for a trigger. Now if a system, such as an ERP, > > has > > stored procedures > > which are not allowed to be modified, then I can see a reason to > > use a > > trigger for a table > > that gets updated. > > > > Access 2010 has table macros/triggers. > > > 7. The ability to run scheduled jobs and back ups each night > > > > I've been running scheduled jobs and backups with Access BEs since ver 97. > Task > Scheduler and command line arguments are your friend. > > > 8. The ability to email from the BE if certain conditions are found > > (new record found during a job ran at midnight) > > > > I've been writing functions to automatically email from Access based on > various conditiions > since ver 97. > > > 9. Case statements in SQL > > > > Access queries can use IIF() and Access functions containing SELECT CASE > and other > more complex/powerful conditionals. > > > > I'm sure I can think of more reasons to use SQL :) > > > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > From darryl at whittleconsulting.com.au Sun Jul 31 22:28:26 2011 From: darryl at whittleconsulting.com.au (Darryl Collins) Date: Mon, 1 Aug 2011 13:28:26 +1000 Subject: [AccessD] rsR("order") vs rsR!Order In-Reply-To: References: <000401cc4d7f$cd6c1660$68444320$@com.au> <4E32F07C.16127.4C46D394@stuart.lexacorp.com.pg> Message-ID: <000a01cc4ffb$149ef890$3ddce9b0$@com.au> Hi guys & Gals, Slower day at work today so I was poking around some code they use here in my new role and found this syntax when dealing with recordsets in Access VBA rsR.AddNew rsR("order") = rsM("order") rsR("sheetname") = rsM("sheetname") rsR("sheetnumber") = rsM("sheetnumber") rsR.Update It is very, ummm, MS Excel in style, but it does work ok and update the recordset(s) correctly. However I would have written it like: With rsR .AddNew !order = rsM!order !sheetname = rsM!sheetname !sheetnumber = rsM!sheetnumber !Update End with Not withstanding then with / end with bit. What is the advantage (if any) of one syntax over the other? Is one method faster? Actually, Why does the first syntax even work? I would have though you would have had to use the ! method, but very clearly I am totally wrong on that count. I had not seen code used like that before for MS Access recordsets. Maybe I need to get out more? Your thoughts? Cheers Darryl From dbdoug at gmail.com Fri Jul 1 00:47:36 2011 From: dbdoug at gmail.com (Doug Steele) Date: Thu, 30 Jun 2011 22:47:36 -0700 Subject: [AccessD] OT - FW: New computer In-Reply-To: References: <4DFAA63E.50506@colbyconsulting.com> <23775347AAAD47329496777628D6A927@HAL9005> <4DFAD4F0.9090504@colbyconsulting.com> <4DFB4DB9.9050804@colbyconsulting.com> <661A04F55F074D77BC065B3718B90850@HAL9005> <4DFB6633.3020703@colbyconsulting.com> Message-ID: I think so, but I haven't done any real work with the usb setup. I'll report back when I've had a chance to do a couple of days of testing. I have to totally reorganize my workspace to do this, so it may be a while.... Doug On Thu, Jun 30, 2011 at 8:34 PM, Jim Lawrence wrote: > Ha ha, one is just not good enough anymore. ;-) > ...but do you find the USB video cards basically a good deal? > > Jim > > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Doug Steele > Sent: Thursday, June 30, 2011 10:28 AM > To: Access Developers discussion and problem solving > Subject: Re: [AccessD] OT - FW: New computer > > I just received a StarTech USB2VGAE2 usb/video adapter. ?I got a > 'refurbished' one for CAD$69 (plus a rip-off $26 in shipping!). ?It > works pretty well; I'm using it to connect 2 large monitors to my > laptop. ?The USB adapter is connected to a 19" widescreen monitor and > runs at 1680x1050. ?The video is definitely slower on the USB > connected monitor - when you move a window, for example, the edges get > 'jaggies'. ?But the speed is quite acceptable for the kind of work I > do - I'm not going to be playing games on it. > > The only problem I've had is that the driver gets a bit confused > sometimes when you change the graphics setup - like the monitor > positions, or which monitor is the master. ?I discovered that I have > to disable the USB monitor, set the laptop and connected monitor, then > re-enable the USB monitor and set it up. ?Not a big deal. > > It's kind of fun to have three screens running at once - makes me feel > ever so productive. ?An illusion, of course. > > Doug > > On Sun, Jun 19, 2011 at 8:00 AM, Jim Lawrence wrote: >> Hi Doug: >> >> I was just the installer but the screens worked fast enough for doing POS >> work. I doubt whether this configuration will ever replace a DVI > connection >> directly to a high-performance video card but they are quite sufficient > for >> basic office work and the ease of installation is their plus. >> >> Jim >> >> >> >> -----Original Message----- >> From: accessd-bounces at databaseadvisors.com >> [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Doug Steele >> Sent: Friday, June 17, 2011 11:59 AM >> To: Access Developers discussion and problem solving >> Subject: Re: [AccessD] OT - FW: New computer >> >> Do you have any experience or information on these? ?I'd like to run 2 >> big screens off a laptop, but I saw commentary on the Internet that >> they can be so slow as to be useless. >> >> Thanks, >> Doug >> >> On Fri, Jun 17, 2011 at 10:29 AM, Jim Lawrence wrote: >>> Just a note; There are now a little video-chipset block that can just be >>> inserted into any USB slot and can connect another monitor to a computer. >>> >>> See here: http://www.startech.com/product-list/usb-vga-video-adapters >>> >>> The price runs from 60 to 150 per monitor. You can even use them with POE >> to >>> run remote video and camera feeds. >> -- >> 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 BradM at blackforestltd.com Fri Jul 1 13:26:32 2011 From: BradM at blackforestltd.com (Brad Marks) Date: Fri, 1 Jul 2011 13:26:32 -0500 Subject: [AccessD] Pulling Data from Excel into Access with "Automation" References: <201107010022.p610MKvQ022864@databaseadvisors.com> Message-ID: Steve, William, Darryl, Thanks for the help with my questions. The advice that you provided has helped me move forward. Below is a stripped down snippet of the Access 2007 VBA code that I put together based on the advice you provided. I am going to post it here in case some other "newbie" is looking for the very "basic basics" and I am posting it here to see if anyone sees a problem with the direction that I am heading. Thanks again, Brad PS. I also ordered a book on this subject. '~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Sub Pull_Data_From_Excel_Into_Access() Dim XLApp As Excel.Application Dim XLWorkbook As Excel.Workbook Dim XLSheet As Excel.Worksheet Dim Str_Value_in_Cell As Variant Set XLApp = CreateObject("Excel.Application") XLApp.Workbooks.Open ("C:\Book1.xlsx") XLApp.Visible = True ''' to see Spreadsheet Set XLWorkbook = XLApp.Workbooks(1) Set XLSheet = XLWorkbook.Sheets(1) Str_Value_in_Cell = XLSheet.Cells(1, 1).Value MsgBox Str_Value_in_Cell End Sub '~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ From vbacreations at gmail.com Fri Jul 1 15:46:19 2011 From: vbacreations at gmail.com (William Benson (VBACreations.Com)) Date: Fri, 1 Jul 2011 16:46:19 -0400 Subject: [AccessD] Pulling Data from Excel into Access with "Automation" In-Reply-To: References: <201107010022.p610MKvQ022864@databaseadvisors.com> Message-ID: <001a01cc382f$eeb501c0$cc1f0540$@gmail.com> Nice going Brad, I suggest Set XLWorkbook = XLApp.Activeworkbook, rather than Workbooks(1) in case there is a Personal.xls/m workbook opening with every instance of the user's Excel. But better still is Test the opening of the workbook, in case the path is wrong or the network won't give it up Set XLWorkbook = XLApp.Workbooks.Open ("C:\Book1.xlsx") If Not XLWorkbook is Nothing 'Go on End if And now you get the fun of dealing with Value and Value2 as properties as well as Text property. More fun for dates than anything else. Consider too the GetObject (,"Excel.Application") ... which is written respectably into a function like Set XL = GetObject(, "Excel.Application") If XL Is Nothing Then Set XL = CreateObject("Excel.Application") End If Last, you might need App.Activate from time to time to bring the application you want into focus... AppActivate "Microsoft Access" Or AppActivate "Microsoft Excel" I am not sure if it really helps or not, but there is often an annoying flicker when I automate, and I don't recall if XL>VISIBLE = TRUE forces excel into the foreground of your windows, or just makes it appear should it happen to have focus. -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Brad Marks Sent: Friday, July 01, 2011 2:27 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Pulling Data from Excel into Access with "Automation" Steve, William, Darryl, Thanks for the help with my questions. The advice that you provided has helped me move forward. Below is a stripped down snippet of the Access 2007 VBA code that I put together based on the advice you provided. I am going to post it here in case some other "newbie" is looking for the very "basic basics" and I am posting it here to see if anyone sees a problem with the direction that I am heading. Thanks again, Brad PS. I also ordered a book on this subject. '~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Sub Pull_Data_From_Excel_Into_Access() Dim XLApp As Excel.Application Dim XLWorkbook As Excel.Workbook Dim XLSheet As Excel.Worksheet Dim Str_Value_in_Cell As Variant Set XLApp = CreateObject("Excel.Application") Set XLSheet = XLWorkbook.Sheets(1) Str_Value_in_Cell = XLSheet.Cells(1, 1).Value MsgBox Str_Value_in_Cell End Sub '~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From BradM at blackforestltd.com Fri Jul 1 15:49:41 2011 From: BradM at blackforestltd.com (Brad Marks) Date: Fri, 1 Jul 2011 15:49:41 -0500 Subject: [AccessD] Pulling Data from Excel into Access with "Automation" References: <201107010022.p610MKvQ022864@databaseadvisors.com> <001a01cc382f$eeb501c0$cc1f0540$@gmail.com> Message-ID: William, Thanks for the additional advice, I appreciate it. I am starting to have some fun with all of this. I can see many opportunities as the small firm that I work for uses a ton of Excel spreadsheets. Brad -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of William Benson (VBACreations.Com) Sent: Friday, July 01, 2011 3:46 PM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Pulling Data from Excel into Access with "Automation" Nice going Brad, I suggest Set XLWorkbook = XLApp.Activeworkbook, rather than Workbooks(1) in case there is a Personal.xls/m workbook opening with every instance of the user's Excel. But better still is Test the opening of the workbook, in case the path is wrong or the network won't give it up Set XLWorkbook = XLApp.Workbooks.Open ("C:\Book1.xlsx") If Not XLWorkbook is Nothing 'Go on End if And now you get the fun of dealing with Value and Value2 as properties as well as Text property. More fun for dates than anything else. Consider too the GetObject (,"Excel.Application") ... which is written respectably into a function like Set XL = GetObject(, "Excel.Application") If XL Is Nothing Then Set XL = CreateObject("Excel.Application") End If Last, you might need App.Activate from time to time to bring the application you want into focus... AppActivate "Microsoft Access" Or AppActivate "Microsoft Excel" I am not sure if it really helps or not, but there is often an annoying flicker when I automate, and I don't recall if XL>VISIBLE = TRUE forces excel into the foreground of your windows, or just makes it appear should it happen to have focus. -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Brad Marks Sent: Friday, July 01, 2011 2:27 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Pulling Data from Excel into Access with "Automation" Steve, William, Darryl, Thanks for the help with my questions. The advice that you provided has helped me move forward. Below is a stripped down snippet of the Access 2007 VBA code that I put together based on the advice you provided. I am going to post it here in case some other "newbie" is looking for the very "basic basics" and I am posting it here to see if anyone sees a problem with the direction that I am heading. Thanks again, Brad PS. I also ordered a book on this subject. '~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Sub Pull_Data_From_Excel_Into_Access() Dim XLApp As Excel.Application Dim XLWorkbook As Excel.Workbook Dim XLSheet As Excel.Worksheet Dim Str_Value_in_Cell As Variant Set XLApp = CreateObject("Excel.Application") Set XLSheet = XLWorkbook.Sheets(1) Str_Value_in_Cell = XLSheet.Cells(1, 1).Value MsgBox Str_Value_in_Cell End Sub '~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -- 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 has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. From stuart at lexacorp.com.pg Fri Jul 1 16:57:41 2011 From: stuart at lexacorp.com.pg (Stuart McLachlan) Date: Sat, 02 Jul 2011 07:57:41 +1000 Subject: [AccessD] Pulling Data from Excel into Access with "Automation" In-Reply-To: References: <201107010022.p610MKvQ022864@databaseadvisors.com>, Message-ID: <4E0E42D5.32026.D4817AA@stuart.lexacorp.com.pg> ONly change I'd make is: Dim Str_Value_in_Cell As Variant I'd make that Var_Value_in_Cell :-) -- Stuart On 1 Jul 2011 at 13:26, Brad Marks wrote: > Steve, William, Darryl, > > Thanks for the help with my questions. > > The advice that you provided has helped me move forward. > > Below is a stripped down snippet of the Access 2007 VBA code that I > put together based on the advice you provided. > > I am going to post it here in case some other "newbie" is looking for > the very "basic basics" and I am posting it here to see if anyone sees > a problem with the direction that I am heading. > > Thanks again, > Brad > > PS. I also ordered a book on this subject. > > '~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > Sub Pull_Data_From_Excel_Into_Access() > > Dim XLApp As Excel.Application > > Dim XLWorkbook As Excel.Workbook > > Dim XLSheet As Excel.Worksheet > > Dim Str_Value_in_Cell As Variant > > Set XLApp = CreateObject("Excel.Application") > > XLApp.Workbooks.Open ("C:\Book1.xlsx") > > XLApp.Visible = True ''' to see Spreadsheet > > Set XLWorkbook = XLApp.Workbooks(1) > > Set XLSheet = XLWorkbook.Sheets(1) > > Str_Value_in_Cell = XLSheet.Cells(1, 1).Value > > MsgBox Str_Value_in_Cell > > End Sub > > '~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > From BradM at blackforestltd.com Fri Jul 1 19:29:08 2011 From: BradM at blackforestltd.com (Brad Marks) Date: Fri, 1 Jul 2011 19:29:08 -0500 Subject: [AccessD] Pulling Data from Excel into Access with "Automation" References: <201107010022.p610MKvQ022864@databaseadvisors.com>, <4E0E42D5.32026.D4817AA@stuart.lexacorp.com.pg> Message-ID: Stuart, Yes, you are right. After three decades of COBOL, I am still adjusting to "working storage" prefixes. :-) Brad -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Stuart McLachlan Sent: Friday, July 01, 2011 4:58 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Pulling Data from Excel into Access with "Automation" ONly change I'd make is: Dim Str_Value_in_Cell As Variant I'd make that Var_Value_in_Cell :-) -- Stuart On 1 Jul 2011 at 13:26, Brad Marks wrote: > Steve, William, Darryl, > > Thanks for the help with my questions. > > The advice that you provided has helped me move forward. > > Below is a stripped down snippet of the Access 2007 VBA code that I > put together based on the advice you provided. > > I am going to post it here in case some other "newbie" is looking for > the very "basic basics" and I am posting it here to see if anyone sees > a problem with the direction that I am heading. > > Thanks again, > Brad > > PS. I also ordered a book on this subject. > > '~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > Sub Pull_Data_From_Excel_Into_Access() > > Dim XLApp As Excel.Application > > Dim XLWorkbook As Excel.Workbook > > Dim XLSheet As Excel.Worksheet > > Dim Str_Value_in_Cell As Variant > > Set XLApp = CreateObject("Excel.Application") > > XLApp.Workbooks.Open ("C:\Book1.xlsx") > > XLApp.Visible = True ''' to see Spreadsheet > > Set XLWorkbook = XLApp.Workbooks(1) > > Set XLSheet = XLWorkbook.Sheets(1) > > Str_Value_in_Cell = XLSheet.Cells(1, 1).Value > > MsgBox Str_Value_in_Cell > > End Sub > > '~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > > -- > 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 has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. From vbacreations at gmail.com Fri Jul 1 20:58:06 2011 From: vbacreations at gmail.com (William Benson (VBACreations.Com)) Date: Fri, 1 Jul 2011 21:58:06 -0400 Subject: [AccessD] Pulling Data from Excel into Access with "Automation" In-Reply-To: References: <201107010022.p610MKvQ022864@databaseadvisors.com>, <4E0E42D5.32026.D4817AA@stuart.lexacorp.com.pg> Message-ID: <001f01cc385b$7d651e20$782f5a60$@gmail.com> OK, I am leaving the subject line the same, because this was (and mostly is) an awesome automation exercise, which in fact I will send to Brad after I perfect it. I have built a tool for examining all fields and the occurrence rate of distinct values those fields have, within Excel data. Chiefly, from within all worksheets among open workbooks. There is an option to store this info for easy reference later, or to clear it out and/or refresh it later. One thing I like to use it for is examining data when there are way too many excel rows to look at cleanly and the number of distinct items exceeds what Excel will show in the autofilter drop down. I also plan to use this to build Access tables on the fly from the data in a worksheet, and then save specific sheets to CSV, perhaps building import specs on the fly using Duane Hookom's identification of the required tables for maintaining import specs. But I have an annoying glitch which I have solved through a UDF workaround but I feel I should not have to do that. Maybe someone can read through this for the likely issue. Or at least reassure me I have no alternative but the UDF. Which is fast enough, I suppose - but I would think that the UDF will be calculated with every row in the result, whereas the parameters I wanted to use would have been calculated by Access only once then used for every row). Basic structure is: 4 controls: Lst0 shows open workbooks Lst1 shows worksheets which have data in row 1, from the workbook chosen in Lst0 LstFields shows all the column headers on worksheet = Lst1 LstValues shows all distinct values in lstField ... and the number of occurrences. I store the info in a local table and refresh when desired (workbooks have to be open in order To populate the listboxes. My Problem: When creating SQL for the rowsource for lstValues, I tried to reference listbox columns - but was told by Access that was a syntax error. QUESTION! (I don't know if something like this is supposed to work or not: ws = forms!frmCreateTableFromExcel!lst1.column(0, lst1.listindex) - but it don't. I think maybe because listindex can be -1 and there's no value and that is a problem. Here is the complete rowsource SQL SELECT WB, WS, Fld, [Values], Items FROM Tbl_Field_Values WHERE WB = forms!frmCreateTableFromExcel!lst0 and ws = forms!frmCreateTableFromExcel!lst1 and fld = forms!frmCreateTableFromExcel!lstfields So I switched to ws = forms!frmCreateTableFromExcel!lst1.column(0, lst1.listindex). That brought good results except that for some reason I don't quite understand, the value property of the lstFields listbox was not adjusting when a statement like lstFields.Selected(i) = was used to select a different value in the listbox. Sure enough the _AfterUpdate event would fire, but a test of lstFields.Value would show the same value every time, regardless. That seems evil and wrong to me! ==snippet - lstFields.Value didn't change when each row was made the selection. For i = 0 To lstFields.ListCount - 1 lstFields.Selected(i) = True 'no impact on .Value apparently. debug.print lstFields Next K, how I solved this, now tell me if I am craze... I used a UDF in the rowsource, which called the values out of those columns -- which the query wouldn't let me refer to by themselves: my new RowSource is: SELECT WB, WS, Fld, [Values], Items FROM Tbl_Field_Values WHERE WB = ValuefromList("WB") and ws = ValuefromList("WS") and fld = ValuefromList("Fields") 'Here's the function Function ValuefromList(str As String) As String Dim frm As Form Dim strval As String On Error Resume Next Set frm = Screen.ActiveForm If Not frm Is Nothing Then Dim c As Control Set c = frm.Controls("Lst" & str) If Not c Is Nothing Then If c.ListIndex >= 0 Then strval = c.Column(0, c.ListIndex) End If End If End If ValuefromList = strval End Function From vbacreations at gmail.com Fri Jul 1 21:04:23 2011 From: vbacreations at gmail.com (William Benson (VBACreations.Com)) Date: Fri, 1 Jul 2011 22:04:23 -0400 Subject: [AccessD] Pulling Data from Excel into Access with "Automation" References: <201107010022.p610MKvQ022864@databaseadvisors.com>, <4E0E42D5.32026.D4817AA@stuart.lexacorp.com.pg> Message-ID: <002001cc385c$5de1fd60$19a5f820$@gmail.com> There was a typo in the below. Where I said So I switched to ws = forms!frmCreateTableFromExcel!lst1.column(0, lst1.listindex) I meant to say So I switched FROM ws = forms!frmCreateTableFromExcel!lst1.column(0, lst1.listindex) Sorry about that. -----Original Message----- From: William Benson (VBACreations.Com) [mailto:vbacreations at gmail.com] Sent: Friday, July 01, 2011 9:58 PM To: Access Developers discussion and problem solving Subject: RE: [AccessD] Pulling Data from Excel into Access with "Automation" OK, I am leaving the subject line the same, because this was (and mostly is) an awesome automation exercise, which in fact I will send to Brad after I perfect it. I have built a tool for examining all fields and the occurrence rate of distinct values those fields have, within Excel data. Chiefly, from within all worksheets among open workbooks. There is an option to store this info for easy reference later, or to clear it out and/or refresh it later. One thing I like to use it for is examining data when there are way too many excel rows to look at cleanly and the number of distinct items exceeds what Excel will show in the autofilter drop down. I also plan to use this to build Access tables on the fly from the data in a worksheet, and then save specific sheets to CSV, perhaps building import specs on the fly using Duane Hookom's identification of the required tables for maintaining import specs. But I have an annoying glitch which I have solved through a UDF workaround but I feel I should not have to do that. Maybe someone can read through this for the likely issue. Or at least reassure me I have no alternative but the UDF. Which is fast enough, I suppose - but I would think that the UDF will be calculated with every row in the result, whereas the parameters I wanted to use would have been calculated by Access only once then used for every row). Basic structure is: 4 controls: Lst0 shows open workbooks Lst1 shows worksheets which have data in row 1, from the workbook chosen in Lst0 LstFields shows all the column headers on worksheet = Lst1 LstValues shows all distinct values in lstField ... and the number of occurrences. I store the info in a local table and refresh when desired (workbooks have to be open in order To populate the listboxes. My Problem: When creating SQL for the rowsource for lstValues, I tried to reference listbox columns - but was told by Access that was a syntax error. QUESTION! (I don't know if something like this is supposed to work or not: ws = forms!frmCreateTableFromExcel!lst1.column(0, lst1.listindex) - but it don't. I think maybe because listindex can be -1 and there's no value and that is a problem. Here is the complete rowsource SQL SELECT WB, WS, Fld, [Values], Items FROM Tbl_Field_Values WHERE WB = forms!frmCreateTableFromExcel!lst0 and ws = forms!frmCreateTableFromExcel!lst1 and fld = forms!frmCreateTableFromExcel!lstfields So I switched to ws = forms!frmCreateTableFromExcel!lst1.column(0, lst1.listindex). That brought good results except that for some reason I don't quite understand, the value property of the lstFields listbox was not adjusting when a statement like lstFields.Selected(i) = was used to select a different value in the listbox. Sure enough the _AfterUpdate event would fire, but a test of lstFields.Value would show the same value every time, regardless. That seems evil and wrong to me! ==snippet - lstFields.Value didn't change when each row was made the selection. For i = 0 To lstFields.ListCount - 1 lstFields.Selected(i) = True 'no impact on .Value apparently. debug.print lstFields Next K, how I solved this, now tell me if I am craze... I used a UDF in the rowsource, which called the values out of those columns -- which the query wouldn't let me refer to by themselves: my new RowSource is: SELECT WB, WS, Fld, [Values], Items FROM Tbl_Field_Values WHERE WB = ValuefromList("WB") and ws = ValuefromList("WS") and fld = ValuefromList("Fields") 'Here's the function Function ValuefromList(str As String) As String Dim frm As Form Dim strval As String On Error Resume Next Set frm = Screen.ActiveForm If Not frm Is Nothing Then Dim c As Control Set c = frm.Controls("Lst" & str) If Not c Is Nothing Then If c.ListIndex >= 0 Then strval = c.Column(0, c.ListIndex) End If End If End If ValuefromList = strval End Function From rockysmolin at bchacc.com Sat Jul 2 09:43:14 2011 From: rockysmolin at bchacc.com (Rocky Smolin) Date: Sat, 2 Jul 2011 07:43:14 -0700 Subject: [AccessD] Need a new printer? Cheap? Message-ID: <4AC76807705E4A688411F71D46A6C3FE@HAL9007> http://www.walmart.com/ip/Canon-PIXMA-MP250-Photo-All-In-One-Inkjet-Printer- Copier-Scanner-Value-Bundle/12534987?sourceid=06345287580503509743 &wmlspartner=tWsI2R5jHvk but god knows what the cartridges will cost. Rocky From marksimms at verizon.net Sat Jul 2 09:51:33 2011 From: marksimms at verizon.net (Mark Simms) Date: Sat, 02 Jul 2011 10:51:33 -0400 Subject: [AccessD] Pulling Data from Excel into Access with "Automation" In-Reply-To: <002001cc385c$5de1fd60$19a5f820$@gmail.com> References: <201107010022.p610MKvQ022864@databaseadvisors.com>, <4E0E42D5.32026.D4817AA@stuart.lexacorp.com.pg> <002001cc385c$5de1fd60$19a5f820$@gmail.com> Message-ID: <003b01cc38c7$89934840$9cb9d8c0$@net> Just reverse the Column property arguments: lst1.ListIndex should be first. > -----Original Message----- > From: accessd-bounces at databaseadvisors.com [mailto:accessd- > bounces at databaseadvisors.com] On Behalf Of William Benson > (VBACreations.Com) > Sent: Friday, July 01, 2011 10:04 PM > To: 'Access Developers discussion and problem solving' > Subject: Re: [AccessD] Pulling Data from Excel into Access with > "Automation" > > There was a typo in the below. Where I said > > So I switched to ws = > forms!frmCreateTableFromExcel!lst1.column(0, lst1.listindex) > > I meant to say > > So I switched FROM ws = forms!frmCreateTableFromExcel!lst1.column(0, > lst1.listindex) > > Sorry about that. > > > -----Original Message----- > From: William Benson (VBACreations.Com) [mailto:vbacreations at gmail.com] > Sent: Friday, July 01, 2011 9:58 PM > To: Access Developers discussion and problem solving > Subject: RE: [AccessD] Pulling Data from Excel into Access with > "Automation" > > OK, I am leaving the subject line the same, because this was (and > mostly is) > an awesome automation exercise, which in fact I will send to Brad after > I > perfect it. I have built a tool for examining all fields and the > occurrence > rate of distinct values those fields have, within Excel data. Chiefly, > from > within all worksheets among open workbooks. There is an option to store > this > info for easy reference later, or to clear it out and/or refresh it > later. > > One thing I like to use it for is examining data when there are way too > many > excel rows to look at cleanly and the number of distinct items exceeds > what > Excel will show in the autofilter drop down. I also plan to use this to > build Access tables on the fly from the data in a worksheet, and then > save > specific sheets to CSV, perhaps building import specs on the fly using > Duane > Hookom's identification of the required tables for maintaining import > specs. > But I have an annoying glitch which I have solved through a UDF > workaround > but I feel I should not have to do that. Maybe someone can read through > this > for the likely issue. Or at least reassure me I have no alternative but > the > UDF. Which is fast enough, I suppose - but I would think that the UDF > will > be calculated with every row in the result, whereas the parameters I > wanted > to use would have been calculated by Access only once then used for > every > row). > > Basic structure is: > > 4 controls: > Lst0 shows open workbooks > Lst1 shows worksheets which have data in row 1, from the workbook > chosen > in Lst0 > LstFields shows all the column headers on worksheet = Lst1 > LstValues shows all distinct values in lstField ... and the number > of > occurrences. > I store the info in a local table and refresh when desired > (workbooks > have to be open in order > To populate the listboxes. > > My Problem: > When creating SQL for the rowsource for lstValues, I tried to reference > listbox columns - but was told by Access that was a syntax error. > > QUESTION! > (I don't know if something like this is supposed to work or not: > ws = forms!frmCreateTableFromExcel!lst1.column(0, > lst1.listindex) - > but it don't. I think maybe because listindex can be -1 and there's no > value > and that is a problem. > > Here is the complete rowsource SQL > SELECT WB, WS, Fld, [Values], Items FROM Tbl_Field_Values > WHERE WB = forms!frmCreateTableFromExcel!lst0 > and ws = forms!frmCreateTableFromExcel!lst1 > and fld = forms!frmCreateTableFromExcel!lstfields > > > So I switched to ws = forms!frmCreateTableFromExcel!lst1.column(0, > lst1.listindex). That brought good results except that for some reason > I > don't quite understand, the value property of the lstFields listbox was > not > adjusting when a statement like lstFields.Selected(i) = was used to > select a > different value in the listbox. Sure enough the _AfterUpdate event > would > fire, but a test of lstFields.Value would show the same value every > time, > regardless. That seems evil and wrong to me! > ==snippet - lstFields.Value didn't change when each row was made > the > selection. > For i = 0 To lstFields.ListCount - 1 > lstFields.Selected(i) = True 'no impact on .Value > apparently. > debug.print lstFields > Next > > K, how I solved this, now tell me if I am craze... I used a UDF in the > rowsource, which called the values out of those columns -- which the > query > wouldn't let me refer to by themselves: my new RowSource is: > > SELECT WB, WS, Fld, [Values], Items FROM Tbl_Field_Values > WHERE WB = ValuefromList("WB") > and ws = ValuefromList("WS") and > fld = ValuefromList("Fields") > > 'Here's the function > Function ValuefromList(str As String) As String Dim frm As Form Dim > strval > As String On Error Resume Next Set frm = Screen.ActiveForm If Not frm > Is > Nothing Then > Dim c As Control > Set c = frm.Controls("Lst" & str) > If Not c Is Nothing Then > If c.ListIndex >= 0 Then > strval = c.Column(0, c.ListIndex) > End If > End If > End If > ValuefromList = strval > > End Function > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com From fuller.artful at gmail.com Sat Jul 2 12:06:08 2011 From: fuller.artful at gmail.com (Arthur Fuller) Date: Sat, 2 Jul 2011 13:06:08 -0400 Subject: [AccessD] Walk the DB Using ADO Message-ID: I know that I've written this code before, but due to a plethora of backup CDs and my habit of pruning what is not currently necessary from the current situation(s), I can't find the relevant code. And besides, I'm currently semi-retired, and working in hobbyist most not billable mode. Here's what I need, in ADO format if possible: For each t in CurrentDB( Tables ) For each f in t.fields For each a in f.Attributes ' could be Properties not Attributes Debug.Print a.Name, a.Value Next Next Next TIA, Arthur P.S. For years and years and years, I have used Rick Fisher's FindAndReplace, but now it's failing on me due to (I think) the fact that I'm running a 64-bit Windows, which doesn't like what he offers to install. In my retirement mode, I cannot afford to purchase more software. Maybe I could run a Windows 32-bit version of everything, then run F&R, then do what I need to do, then import the results back into 64-bit. Yuck. From jwcolby at colbyconsulting.com Sat Jul 2 12:29:27 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Sat, 02 Jul 2011 13:29:27 -0400 Subject: [AccessD] SQL Server - SSD / Rotating media - Side by side test results Message-ID: <4E0F5577.9060206@colbyconsulting.com> This morning I set out to do a little bit of real world testing to see what my SSD investment buys me. The following are some results. BTW if a SQL Server guru wants to actually gain remote access and run tests on my system I would welcome that. I am obviously not very talented as a SQL Server DBA and so a real DBA who has an interest is welcomed to tune and test. Anyway, I have a pair of databases that I will be testing with. One is my infamous "database from hell" called HSID, containing 51 million records with about 600 fields. The other is my HSIDAllAdults containing about 65 million Name and address fields. HSIDAllAdults is child to HSID, IOW it has a foreign key which contains the PK of HSID. Both databases have a clustered index on their autonumber PK. So... I have both of these databases on a four SSD RAID 0. I backed them up last night and restored them to the same name + _Rotatingmedia on my RAID6 volumes. So I have identical databases on a 4 SSD Raid 0 and a 6 disk RAID 6. I am now doing some comparative A/B runs of rather standard queries - similar to things I do routinely. I backed up the two databases last night just before upgrading the server. I restored both tha HSID and HSIDAllAdults this AM to the same rotating media location I normally hold the databases. I did not defrag the rotating media before doing the restore. I include the counts so that we can be assured that the actual data is identical between the SSD and rotating media DBs. HSIDAllAdults - has a pair of cover indexes each of which includes Address valid DBCC DROPCLEANBUFFERS SELECT AddrValid, COUNT(PK) AS Cnt FROM dbo.tblAllAdultNameAddr GROUP BY AddrValid SSD: 12 seconds ANK 635917 E 2918652 INV 936058 MOV 112093 PO 3780131 V 59074768 Rotating: 52 seconds ANK 635917 E 2918652 INV 936058 MOV 112093 PO 3780131 V 59074768 DBCC DROPCLEANBUFFERS SELECT COUNT(_DataHSID.dbo.tblHSID.PKID) AS Cnt, dbo.tblAllAdultNameAddr.AddrValid FROM dbo.tblAllAdultNameAddr INNER JOIN _DataHSID.dbo.tblHSID ON dbo.tblAllAdultNameAddr.PKHSID = _DataHSID.dbo.tblHSID.PKID GROUP BY dbo.tblAllAdultNameAddr.AddrValid SSD: 35 seconds 635917 ANK 2918652 E 936058 INV 112093 MOV 3780131 PO 59074768 V DBCC DROPCLEANBUFFERS SELECT COUNT(_DataHSID_RotatingMedia.dbo.tblHSID.PKID) AS Cnt, dbo.tblAllAdultNameAddr.AddrValid FROM _DataHSID_RotatingMedia.dbo.tblHSID INNER JOIN dbo.tblAllAdultNameAddr ON _DataHSID_RotatingMedia.dbo.tblHSID.PKID = dbo.tblAllAdultNameAddr.PKHSID GROUP BY dbo.tblAllAdultNameAddr.AddrValid Rotating: 1:00 635917 ANK 2918652 E 936058 INV 112093 MOV 3780131 PO 59074768 V The following appears to be a table scan which would be a "worst case". I just picked a field from HSID which we use occasionally. DBCC DROPCLEANBUFFERS SELECT COUNT(PKID) AS Cnt, Household_Occupation_code FROM dbo.tblHSID GROUP BY Household_Occupation_code Rotating: 7:06 35481479 NULL 7143021 10 11480 11 9780 12 37452 13 115093 20 2266292 21 501715 22 23724 23 1039660 30 1325728 40 1183311 50 8271 51 70318 52 2566 60 33157 61 28595 62 15305 70 511464 80 739340 90 609317 91 Rotating media: 1:05 35481479 NULL 7143021 10 11480 11 9780 12 37452 13 115093 20 2266292 21 501715 22 23724 23 1039660 30 1325728 40 1183311 50 8271 51 70318 52 2566 60 33157 61 28595 62 15305 70 511464 80 739340 90 609317 91 DBCC DROPCLEANBUFFERS SELECT COUNT(PKID) AS Cnt, Narrow_Income_Band FROM dbo.tblHSID GROUP BY Narrow_Income_Band SSD: 8 seconds 13824508 NULL 3762511 1 1675853 2 1015899 3 2307736 4 1031640 5 2595759 6 1069374 7 2662509 8 1100049 9 1055216 A 1026910 B 4285629 C 941494 D 862906 E 831573 F 2443917 G 738328 H 676959 I 478582 J 423856 K 1168819 L 371413 M 333796 N 249064 O 204771 P 708189 Q 193265 R 189413 S 2927130 T Rotating media: 10 seconds 13824508 NULL 3762511 1 1675853 2 1015899 3 2307736 4 1031640 5 2595759 6 1069374 7 2662509 8 1100049 9 1055216 A 1026910 B 4285629 C 941494 D 862906 E 831573 F 2443917 G 738328 H 676959 I 478582 J 423856 K 1168819 L 371413 M 333796 N 249064 O 204771 P 708189 Q 193265 R 189413 S 2927130 T I am going to stop for now. I have the rotating media copies and will leave them in place for awhile. If any real DBA wants to do some testing let me know. Obviously I have to know you. :) -- John W. Colby www.ColbyConsulting.com From jwcolby at colbyconsulting.com Sat Jul 2 13:36:42 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Sat, 02 Jul 2011 14:36:42 -0400 Subject: [AccessD] [dba-SQLServer] SQL Server - SSD / Rotating media - Side by side test results In-Reply-To: References: <4E0F5577.9060206@colbyconsulting.com> Message-ID: <4E0F653A.7070503@colbyconsulting.com> Arthur, There are definite cases where the gains are minimal, others where they are significant. The other thing is that I am intentionally clearing the cache before each test. The cache further minimizes the differences as it turns out. That is to be expected of course. This just goes to show the old axiom that throwing memory at SQL Server does a world of good. Without a shadow of a doubt, one thing that SSDs (and faster / better hardware in general) do is minimize the impact of ignorance and sloth. ;) I am not an accomplished DBA, and I simply do not have the time to become one. As a result I am unable to correctly tune my system. By throwing cores, memory and SSDs at the problem I manage to achieve respectable results in spite of myself. Hardware is cheap. My entire server cost somewhere in the neighborhood of $5K. Additionally I have dragged disk and RAID controllers forward through many upgrades. Back around 2005 I spent the then enormous sum of $1600 for three Areca raid controllers which I am still using today. I bought 10 1 TB drives back when they were $150, but I am still using them today. What I upgrade are the motherboards and more frequently the processors. In 2004 I started with single core AMD 3800 processors using Windows2003 X32 and 4 gigs of RAM. I built two systems for $4000! Moving up to dual and then quad cores, and Windows / SQL Server X64 and 8 GB RAM, then 16 gigs of ram. My latest motherboard / processor cost me (my client of course) about $700 (8 cores, with 24 cores possible) and 32 gigs of ram was about $1000. I was looking last night and another 32 GB of RAM (same modules) is now only $600! And... I am using my entire old server (quad core / 16 gigs ram) for a VM server. The point really is that while it is not a trivial amount spent over the years making these upgrades, over that same period I billed a couple of hundred thousand dollars. All these upgrades make me more and more productive, faster and faster getting the results back to the client. The client *loves me* precisely because he gets results back in hours instead of a week as his previous provider gave him. I program custom C# solutions (and bill him for the programming) which have enabled me to do orders literally in hours which (back in 2006) took me a full day or even two to get out. Counts which took an hour in 2004 now take my custom program 2 minutes. *AND* I have developed a system which allows him to send emails with zip lists as attachments. A program running on my server strips off the CSV attachment, generate counts, build a count spreadsheet, attach it to an email and send it back to him literally within 5 minutes of him pressing send *without* my doing anything. Again those counts used to take me an hour back when I did everything by hand. Now I log that a count came in and put a small charge in my billing database! The lesson for me is that my time is worth much more than the cost of the electronics and my response time is what makes me valuable to the client. I fully understand than everyone cannot solve all their problems by throwing hardware / custom software at it, but for a sole proprietor it just might be the only way! I don't have the time to be good at all the hats I wear! And so I do things like spend a thousand on SSDs on an educated guess that they will make a significant difference for an uneducated sloth. :) And finally, because the client loves me, he is sending me a *ton* more work! MORE CORES! MORE MEMORY! More SSDs! :):):) John W. Colby www.ColbyConsulting.com On 7/2/2011 1:48 PM, Arthur Fuller wrote: > I would be happy to assist. Judging by your IMO rather narrow result-gap (measured in a few > seconds), my initial guess would be that the SSHDs are not gaining you much over your investment in > CPU and RAM. However, that remains to be determined. Could be that table-scans or some other factor > are causing this lag. Should be that SSHD retrieves ought to be an order of magnitude quicker, but > according to your posted measurements they lag significantly behind that thumbnail benchmark. > > And besides all that, how are you? What's new with you and your family? > > A. From vbacreations at gmail.com Sat Jul 2 13:47:40 2011 From: vbacreations at gmail.com (William Benson (VBACreations.Com)) Date: Sat, 2 Jul 2011 14:47:40 -0400 Subject: [AccessD] Pulling Data from Excel into Access with "Automation" In-Reply-To: <003b01cc38c7$89934840$9cb9d8c0$@net> References: <201107010022.p610MKvQ022864@databaseadvisors.com>, <4E0E42D5.32026.D4817AA@stuart.lexacorp.com.pg> <002001cc385c$5de1fd60$19a5f820$@gmail.com> <003b01cc38c7$89934840$9cb9d8c0$@net> Message-ID: <003701cc38e8$85c57460$91505d20$@gmail.com> Hi Mark, I am having some doubts I will be able to refer to .ListIndex at all directly in the sql. As to your suggestion of reversing the arguments, I don't think that is correct. The way to refer to the nth item in the 1st column of a listbox is: lst1.column(0,n). Thus to get the value in the 1st column on the row identified with the listindex is lst1.column(0, lst1.listindex) I guess at heart, my only open question is why LstFields.VALUE does not change when I change the index of the Selected property from, say, 0 to 1. For i = 0 To lstFields.ListCount - 1 lstFields.Selected(i) = True debug.print lstFields 'seems to remain the same throughout loop. Next -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Mark Simms Sent: Saturday, July 02, 2011 10:52 AM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Pulling Data from Excel into Access with "Automation" Just reverse the Column property arguments: lst1.ListIndex should be first. From vbacreations at gmail.com Sat Jul 2 14:53:26 2011 From: vbacreations at gmail.com (William Benson (VBACreations.Com)) Date: Sat, 2 Jul 2011 15:53:26 -0400 Subject: [AccessD] How to tell a button's "air space" is no longer being hovered over Message-ID: <003b01cc38f1$b62edca0$228c95e0$@gmail.com> I have some code which changes the caption of a button when the user has the ctrl key pressed, set during the mousemove event for the button. I want however, that when the user leaves the "air space" for the button, then the caption reverts - regardless whether they still have shift held. I know I can use use the mousemove event associated with all surrounding controls to reset it, but I would like something more related to the control itself. Is there a method of testing that the user has moved the mouse outside the button's air space? I have a feeling I am going to be out of luck... From jwcolby at colbyconsulting.com Sat Jul 2 19:16:52 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Sat, 02 Jul 2011 20:16:52 -0400 Subject: [AccessD] Need a new printer? Cheap? In-Reply-To: <4AC76807705E4A688411F71D46A6C3FE@HAL9007> References: <4AC76807705E4A688411F71D46A6C3FE@HAL9007> Message-ID: <4E0FB4F4.1000003@colbyconsulting.com> http://www.4inkjets.com/Canon-PIXMA-MP250-printer-ink-cartridges-toner John W. Colby www.ColbyConsulting.com On 7/2/2011 10:43 AM, Rocky Smolin wrote: > http://www.walmart.com/ip/Canon-PIXMA-MP250-Photo-All-In-One-Inkjet-Printer- > Copier-Scanner-Value-Bundle/12534987?sourceid=06345287580503509743 From fuller.artful at gmail.com Sun Jul 3 03:29:14 2011 From: fuller.artful at gmail.com (Arthur Fuller) Date: Sun, 3 Jul 2011 04:29:14 -0400 Subject: [AccessD] Pulling Data from Excel into Access with "Automation" In-Reply-To: <003701cc38e8$85c57460$91505d20$@gmail.com> References: <201107010022.p610MKvQ022864@databaseadvisors.com> <4E0E42D5.32026.D4817AA@stuart.lexacorp.com.pg> <002001cc385c$5de1fd60$19a5f820$@gmail.com> <003b01cc38c7$89934840$9cb9d8c0$@net> <003701cc38e8$85c57460$91505d20$@gmail.com> Message-ID: That I think is because the value remains the content of column(o) despite what is selected. And that IMO is how it should respond, i.e. what is selected should not change the value. A. On Sat, Jul 2, 2011 at 2:47 PM, William Benson (VBACreations.Com) < vbacreations at gmail.com> wrote: > Hi Mark, > > I am having some doubts I will be able to refer to .ListIndex at all > directly in the sql. > > As to your suggestion of reversing the arguments, I don't think that is > correct. The way to refer to the nth item in the 1st column of a listbox > is: > lst1.column(0,n). Thus to get the value in the 1st column on the row > identified with the listindex is lst1.column(0, lst1.listindex) > > I guess at heart, my only open question is why LstFields.VALUE does not > change when I change the index of the Selected property from, say, 0 to 1. > > For i = 0 To lstFields.ListCount - 1 > lstFields.Selected(i) = True > debug.print lstFields 'seems to remain the same throughout loop. > Next > > From marksimms at verizon.net Sun Jul 3 10:03:53 2011 From: marksimms at verizon.net (Mark Simms) Date: Sun, 03 Jul 2011 11:03:53 -0400 Subject: [AccessD] Pulling Data from Excel into Access with "Automation" In-Reply-To: <003701cc38e8$85c57460$91505d20$@gmail.com> References: <201107010022.p610MKvQ022864@databaseadvisors.com>, <4E0E42D5.32026.D4817AA@stuart.lexacorp.com.pg> <002001cc385c$5de1fd60$19a5f820$@gmail.com> <003b01cc38c7$89934840$9cb9d8c0$@net> <003701cc38e8$85c57460$91505d20$@gmail.com> Message-ID: <003901cc3992$6d494ab0$47dbe010$@net> My bad....but below is referencing the array, not a specific item. debug.print lstFields 'seems to remain the same throughout try debug.print lstFields(0,i) if there are multiple columns(0=col#1) otherwise debug.print lstFields(i) should do the trick From marksimms at verizon.net Sun Jul 3 10:07:27 2011 From: marksimms at verizon.net (Mark Simms) Date: Sun, 03 Jul 2011 11:07:27 -0400 Subject: [AccessD] How to tell a button's "air space" is no longer being hovered over In-Reply-To: <003b01cc38f1$b62edca0$228c95e0$@gmail.com> References: <003b01cc38f1$b62edca0$228c95e0$@gmail.com> Message-ID: <003a01cc3992$ecac3920$c604ab60$@net> John Walk provided some code in his Excel book for doing this. http://spreadsheetpage.com/ It was very clever as I recall. From vbacreations at gmail.com Sun Jul 3 11:17:52 2011 From: vbacreations at gmail.com (William Benson (VBACreations.Com)) Date: Sun, 3 Jul 2011 12:17:52 -0400 Subject: [AccessD] How to tell a button's "air space" is no longer being hovered over In-Reply-To: <003a01cc3992$ecac3920$c604ab60$@net> References: <003b01cc38f1$b62edca0$228c95e0$@gmail.com> <003a01cc3992$ecac3920$c604ab60$@net> Message-ID: <000301cc399c$c32decb0$4989c610$@gmail.com> Hi Mark, I could not find it :-( Thanks. -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Mark Simms Sent: Sunday, July 03, 2011 11:07 AM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] How to tell a button's "air space" is no longer being hovered over John Walk provided some code in his Excel book for doing this. http://spreadsheetpage.com/ It was very clever as I recall. -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From jwcolby at colbyconsulting.com Sun Jul 3 11:56:54 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Sun, 03 Jul 2011 12:56:54 -0400 Subject: [AccessD] SSD, The Game Changer - SQL Man of Mystery - SQLServerCentral.com Message-ID: <4E109F56.809@colbyconsulting.com> -- John W. Colby www.ColbyConsulting.com http://www.sqlservercentral.com/blogs/sqlmanofmystery/archive/2009/04/14/ssd-the-game-changer.aspx From accessd at shaw.ca Sun Jul 3 14:13:03 2011 From: accessd at shaw.ca (Jim Lawrence) Date: Sun, 3 Jul 2011 12:13:03 -0700 Subject: [AccessD] SSD, The Game Changer - SQL Man of Mystery - SQLServerCentral.com In-Reply-To: <4E109F56.809@colbyconsulting.com> References: <4E109F56.809@colbyconsulting.com> Message-ID: <50EC560B45284179B622DA83C34395C8@creativesystemdesigns.com> Hi John: As your databases do not need do manage transaction queues or locks here is an example of just one of the NoSQL database MongoDB vs. SQL Server 2008 performance showdown comparison. http://tinyurl.com/38cofzg In the article it shows speeds over 100 times as fast when managing a fairly large amount of data but the performance just goes up exponentially when presented with even larger data sets. (1000x and more...) The Cassandra (NoSQL) database (http://cassandra.apache.org/) might be one of the best choices in this genre as it has the support of the big players like FaceBook, IBM, Apache etc... There is also an ever expanding group of experts and help forums (http://cassandra-user-incubator-apache-org.3065146.n2.nabble.com/) on this subject. To add to the functionality there is the new super scaling and searching tools called HPCC (http://gigaom.com/cloud/lexisnexis-open-sources-its-hadoop-killer/) which uses a combination of SQL and NoSQL when searching distributive data and clusters of data servers. In your future plans it might well be worth considering such an option especially as your data requirements and expected results continues to grow. Jim -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Sunday, July 03, 2011 9:57 AM To: Access Developers discussion and problem solving; VBA; Sqlserver-Dba Subject: [AccessD] SSD, The Game Changer - SQL Man of Mystery - SQLServerCentral.com -- John W. Colby www.ColbyConsulting.com http://www.sqlservercentral.com/blogs/sqlmanofmystery/archive/2009/04/14/ssd -the-game-changer.aspx -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From vbacreations at gmail.com Sun Jul 3 16:23:33 2011 From: vbacreations at gmail.com (William Benson (VBACreations.Com)) Date: Sun, 3 Jul 2011 17:23:33 -0400 Subject: [AccessD] Delete query... fast ... deleting from datasheet view ... slow Message-ID: <000901cc39c7$77461ae0$65d250a0$@gmail.com> Why is a query that deletes all records from a table so fast in comparison with a manual delete operation on a table that is opened in datasheet view? From jwcolby at colbyconsulting.com Sun Jul 3 16:41:18 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Sun, 03 Jul 2011 17:41:18 -0400 Subject: [AccessD] SSD, The Game Changer - SQL Man of Mystery - SQLServerCentral.com In-Reply-To: <50EC560B45284179B622DA83C34395C8@creativesystemdesigns.com> References: <4E109F56.809@colbyconsulting.com> <50EC560B45284179B622DA83C34395C8@creativesystemdesigns.com> Message-ID: <4E10E1FE.2010805@colbyconsulting.com> Jim, I read the first article and I don't see how it fits at all. 1) My data is very much a normal table, with rows and columns. In one case (the people table) there is a small number of columns, and most of the columns are fully populated. In the second table, there are pushing 700 fields and the columns are rarely fully populated. 2) The data is relational, though just barely. One of my people tables is directly related to the data table. All of my people tables may have people in the other tables. Eventually I will be pulling all of my people into a single table with pointers back to the non people data in the original table. 3) I rarely update the data. The people table is updated once per month as I validate the addresses looking for moves. I get about 1.5% / month moves. The data table is never updated, at least the data in the existing columns. Very occasionally I add new columns. 4) I only have a single user (myself) and I never expect to have more. In comparison, the NoSQL databases claim to store documents and make them searchable. Blog posts, web pages etc. They claim to be good as the numbers of people simultaneously *writing* to them climbs into the hundreds or thousands. So while the technology is fascinating, it hardly seems like a fit for my application. John W. Colby www.ColbyConsulting.com On 7/3/2011 3:13 PM, Jim Lawrence wrote: > Hi John: > > As your databases do not need do manage transaction queues or locks here is > an example of just one of the NoSQL database MongoDB vs. SQL Server 2008 > performance showdown comparison. > > http://tinyurl.com/38cofzg > > In the article it shows speeds over 100 times as fast when managing a fairly > large amount of data but the performance just goes up exponentially when > presented with even larger data sets. (1000x and more...) > > The Cassandra (NoSQL) database (http://cassandra.apache.org/) might be one > of the best choices in this genre as it has the support of the big players > like FaceBook, IBM, Apache etc... > > There is also an ever expanding group of experts and help forums > (http://cassandra-user-incubator-apache-org.3065146.n2.nabble.com/) on this > subject. > > To add to the functionality there is the new super scaling and searching > tools called HPCC > (http://gigaom.com/cloud/lexisnexis-open-sources-its-hadoop-killer/) which > uses a combination of SQL and NoSQL when searching distributive data and > clusters of data servers. > > In your future plans it might well be worth considering such an option > especially as your data requirements and expected results continues to grow. > > > Jim > > > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby > Sent: Sunday, July 03, 2011 9:57 AM > To: Access Developers discussion and problem solving; VBA; Sqlserver-Dba > Subject: [AccessD] SSD, The Game Changer - SQL Man of Mystery - > SQLServerCentral.com > > From stuart at lexacorp.com.pg Sun Jul 3 16:56:19 2011 From: stuart at lexacorp.com.pg (Stuart McLachlan) Date: Mon, 04 Jul 2011 07:56:19 +1000 Subject: [AccessD] Delete query... fast ... deleting from datasheet view ... slow In-Reply-To: <000901cc39c7$77461ae0$65d250a0$@gmail.com> References: <000901cc39c7$77461ae0$65d250a0$@gmail.com> Message-ID: <4E10E583.18446.179396DD@stuart.lexacorp.com.pg> A SWAG: Because Access can't tell that all the records are selected. It has to step through the rows and checking the "selected" attribute. That means that it can't implement a simple "Delete * >From tblA" but has to specify each of the records separately for deletion. -- Stuart On 3 Jul 2011 at 17:23, William Benson (VBACreations. wrote: > Why is a query that deletes all records from a table so fast in > comparison with a manual delete operation on a table that is opened in > datasheet view? > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > From accessd at shaw.ca Sun Jul 3 22:10:49 2011 From: accessd at shaw.ca (Jim Lawrence) Date: Sun, 3 Jul 2011 20:10:49 -0700 Subject: [AccessD] SSD, The Game Changer - SQL Man of Mystery - SQLServerCentral.com In-Reply-To: <4E10E1FE.2010805@colbyconsulting.com> References: <4E109F56.809@colbyconsulting.com> <50EC560B45284179B622DA83C34395C8@creativesystemdesigns.com> <4E10E1FE.2010805@colbyconsulting.com> Message-ID: Inline: -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Sunday, July 03, 2011 2:41 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] SSD, The Game Changer - SQL Man of Mystery - SQLServerCentral.com Jim, I read the first article and I don't see how it fits at all. * It fits very well. First in overview this database does not require a single PC to run the database. It is distributive in nature so you can just add nodes to a bunch of old new and old PCs. The main problem with the database as you have it now is that it is dependant on the hardware of a single box. Just like in 2006 the single CPU reached it maximum and multi-core processors were then created. Cassandra runs like a multi-core PC. When the database is running on numerous PCs it is like running a full RAID. 1) My data is very much a normal table, with rows and columns. In one case (the people table) there are a small number of columns, and most of the columns are fully populated. In the second table, there are pushing 700 fields and the columns are rarely fully populated. * Cassandra, for example, has a sparse data structure. This means columns can be over 2 billion (rows as well) wide (high), if required and the 'fields' do not have to be populated. At any time you can just insert another 'field' and there is no rebuild required or performance loss (It can all be done in real time). You can have your cake and eat it too. 2) The data is relational, though just barely. One of my people tables is directly related to the data table. All of my people tables may have people in the other tables. Eventually I will be pulling all of my people into a single table with pointers back to the non people data in the original able. * When you say barely relational that is what Cassandra is designed for. What you are describing in item 2 is exactly what type of database Cassandra is. It may not use SQL as we traditionally know it but it uses a system called 'map-reduce' which can quickly (very quickly) obtain the same results...it is data-mining tool on steroids. 3) I rarely update the data. The people table is updated once per month as I validate the addresses looking for moves. I get about 1.5% / month moves. The data table is never updated, at least the data in the existing columns. Very occasionally I add new columns. * Again, your requirements and description is matching Cassandra's design nature to a tee. 4) I only have a single user (myself) and I never expect to have more. * That does not matter if you are the only user. What does matter is that you can pull any data out of a huge mass of mix data fast and easy. You have noticed how Google can pull 365,000,000 hits in somewhere around 0.03 seconds. It is not because they have huge vertical super-powerful computers...their computer are but beaters in comparison but their database is spans hundreds of computers...just like Cassandra is capable of. In comparison, the NoSQL databases claim to store documents and make them searchable. Blog posts, web pages etc. They claim to be good as the numbers of people simultaneously *writing* to them climbs into the hundreds or thousands. So while the technology is fascinating, it hardly seems like a fit for my application. * You are right in all the above but with the exception that the Cassandra is a near perfect fit. To that end I will be starting my own Cassandra database system and just to see how it plays out. Here is a little video to watch that will do a lot to explain what and how Cassandra does things: http://video.disruptivecode.com/video/840645/what-makes-cassandra-trick. I think you will be pleasantly surprised. The product runs on any OS as all that it is needs is a copy of Java and Apache, which is free, downloads. http://www.quora.com/How-can-i-install-Apache-Cassandra-on-Windows-Operating -System John W. Colby www.ColbyConsulting.com On 7/3/2011 3:13 PM, Jim Lawrence wrote: > Hi John: > > As your databases do not need do manage transaction queues or locks here is > an example of just one of the NoSQL database MongoDB vs. SQL Server 2008 > performance showdown comparison. > > http://tinyurl.com/38cofzg > > In the article it shows speeds over 100 times as fast when managing a fairly > large amount of data but the performance just goes up exponentially when > presented with even larger data sets. (1000x and more...) > > The Cassandra (NoSQL) database (http://cassandra.apache.org/) might be one > of the best choices in this genre as it has the support of the big players > like FaceBook, IBM, Apache etc... > > There is also an ever expanding group of experts and help forums > (http://cassandra-user-incubator-apache-org.3065146.n2.nabble.com/) on this > subject. > > To add to the functionality there is the new super scaling and searching > tools called HPCC > (http://gigaom.com/cloud/lexisnexis-open-sources-its-hadoop-killer/) which > uses a combination of SQL and NoSQL when searching distributive data and > clusters of data servers. > > In your future plans it might well be worth considering such an option > especially as your data requirements and expected results continues to grow. > > > Jim From accessd at shaw.ca Sun Jul 3 22:47:18 2011 From: accessd at shaw.ca (Jim Lawrence) Date: Sun, 3 Jul 2011 20:47:18 -0700 Subject: [AccessD] SSD, The Game Changer - SQL Man of Mystery - SQLServerCentral.com In-Reply-To: References: <4E109F56.809@colbyconsulting.com> <50EC560B45284179B622DA83C34395C8@creativesystemdesigns.com> <4E10E1FE.2010805@colbyconsulting.com> Message-ID: <649B92906805469C8BEA4A9C9D96521A@creativesystemdesigns.com> PS: Another site showing how to install Cassandra on a Windows PC, in 10 minutes is: http://www.javageneration.com/?p=19 Jim -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Jim Lawrence Sent: Sunday, July 03, 2011 8:11 PM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] SSD, The Game Changer - SQL Man of Mystery - SQLServerCentral.com Inline: -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Sunday, July 03, 2011 2:41 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] SSD, The Game Changer - SQL Man of Mystery - SQLServerCentral.com Jim, I read the first article and I don't see how it fits at all. * It fits very well. First in overview this database does not require a single PC to run the database. It is distributive in nature so you can just add nodes to a bunch of old new and old PCs. The main problem with the database as you have it now is that it is dependant on the hardware of a single box. Just like in 2006 the single CPU reached it maximum and multi-core processors were then created. Cassandra runs like a multi-core PC. When the database is running on numerous PCs it is like running a full RAID. 1) My data is very much a normal table, with rows and columns. In one case (the people table) there are a small number of columns, and most of the columns are fully populated. In the second table, there are pushing 700 fields and the columns are rarely fully populated. * Cassandra, for example, has a sparse data structure. This means columns can be over 2 billion (rows as well) wide (high), if required and the 'fields' do not have to be populated. At any time you can just insert another 'field' and there is no rebuild required or performance loss (It can all be done in real time). You can have your cake and eat it too. 2) The data is relational, though just barely. One of my people tables is directly related to the data table. All of my people tables may have people in the other tables. Eventually I will be pulling all of my people into a single table with pointers back to the non people data in the original able. * When you say barely relational that is what Cassandra is designed for. What you are describing in item 2 is exactly what type of database Cassandra is. It may not use SQL as we traditionally know it but it uses a system called 'map-reduce' which can quickly (very quickly) obtain the same results...it is data-mining tool on steroids. 3) I rarely update the data. The people table is updated once per month as I validate the addresses looking for moves. I get about 1.5% / month moves. The data table is never updated, at least the data in the existing columns. Very occasionally I add new columns. * Again, your requirements and description is matching Cassandra's design nature to a tee. 4) I only have a single user (myself) and I never expect to have more. * That does not matter if you are the only user. What does matter is that you can pull any data out of a huge mass of mix data fast and easy. You have noticed how Google can pull 365,000,000 hits in somewhere around 0.03 seconds. It is not because they have huge vertical super-powerful computers...their computer are but beaters in comparison but their database is spans hundreds of computers...just like Cassandra is capable of. In comparison, the NoSQL databases claim to store documents and make them searchable. Blog posts, web pages etc. They claim to be good as the numbers of people simultaneously *writing* to them climbs into the hundreds or thousands. So while the technology is fascinating, it hardly seems like a fit for my application. * You are right in all the above but with the exception that the Cassandra is a near perfect fit. To that end I will be starting my own Cassandra database system and just to see how it plays out. Here is a little video to watch that will do a lot to explain what and how Cassandra does things: http://video.disruptivecode.com/video/840645/what-makes-cassandra-trick. I think you will be pleasantly surprised. The product runs on any OS as all that it is needs is a copy of Java and Apache, which is free, downloads. http://www.quora.com/How-can-i-install-Apache-Cassandra-on-Windows-Operating -System John W. Colby www.ColbyConsulting.com On 7/3/2011 3:13 PM, Jim Lawrence wrote: > Hi John: > > As your databases do not need do manage transaction queues or locks here is > an example of just one of the NoSQL database MongoDB vs. SQL Server 2008 > performance showdown comparison. > > http://tinyurl.com/38cofzg > > In the article it shows speeds over 100 times as fast when managing a fairly > large amount of data but the performance just goes up exponentially when > presented with even larger data sets. (1000x and more...) > > The Cassandra (NoSQL) database (http://cassandra.apache.org/) might be one > of the best choices in this genre as it has the support of the big players > like FaceBook, IBM, Apache etc... > > There is also an ever expanding group of experts and help forums > (http://cassandra-user-incubator-apache-org.3065146.n2.nabble.com/) on this > subject. > > To add to the functionality there is the new super scaling and searching > tools called HPCC > (http://gigaom.com/cloud/lexisnexis-open-sources-its-hadoop-killer/) which > uses a combination of SQL and NoSQL when searching distributive data and > clusters of data servers. > > In your future plans it might well be worth considering such an option > especially as your data requirements and expected results continues to grow. > > > Jim -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From charlotte.foust at gmail.com Sun Jul 3 23:59:39 2011 From: charlotte.foust at gmail.com (Charlotte Foust) Date: Sun, 3 Jul 2011 21:59:39 -0700 Subject: [AccessD] How to tell a button's "air space" is no longer being hovered over In-Reply-To: <003b01cc38f1$b62edca0$228c95e0$@gmail.com> References: <003b01cc38f1$b62edca0$228c95e0$@gmail.com> Message-ID: Darn, I've done this but I don't recall how, since it was back in Access 2.0 or maybe 97. One way to do it would be to put a shape or even a textbox under the button and just slightly larger than the button. Then you use the mousemove of the underlying control to switch the caption back. Charlotte Foust On Sat, Jul 2, 2011 at 12:53 PM, William Benson (VBACreations.Com) < vbacreations at gmail.com> wrote: > I have some code which changes the caption of a button when the user has > the > ctrl key pressed, set during the mousemove event for the button. > > I want however, that when the user leaves the "air space" for the button, > then the caption reverts - regardless whether they still have shift held. > > I know I can use use the mousemove event associated with all surrounding > controls to reset it, but I would like something more related to the > control > itself. > > Is there a method of testing that the user has moved the mouse outside the > button's air space? > > I have a feeling I am going to be out of luck... > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > > > Website: http://www.databaseadvisors.com > > > From vbacreations at gmail.com Mon Jul 4 01:15:40 2011 From: vbacreations at gmail.com (William Benson (VBACreations.Com)) Date: Mon, 4 Jul 2011 02:15:40 -0400 Subject: [AccessD] How to tell a button's "air space" is no longer being hovered over In-Reply-To: References: <003b01cc38f1$b62edca0$228c95e0$@gmail.com> Message-ID: <002101cc3a11$cd51ffe0$67f5ffa0$@gmail.com> That is not a bad idea at all Charlotte, I think I will do that! -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Charlotte Foust Sent: Monday, July 04, 2011 1:00 AM To: Access Developers discussion and problem solving Subject: Re: [AccessD] How to tell a button's "air space" is no longer being hovered over Darn, I've done this but I don't recall how, since it was back in Access 2.0 or maybe 97. One way to do it would be to put a shape or even a textbox under the button and just slightly larger than the button. Then you use the mousemove of the underlying control to switch the caption back. Charlotte Foust On Sat, Jul 2, 2011 at 12:53 PM, William Benson (VBACreations.Com) < vbacreations at gmail.com> wrote: > I have some code which changes the caption of a button when the user > has the ctrl key pressed, set during the mousemove event for the > button. > > I want however, that when the user leaves the "air space" for the > button, then the caption reverts - regardless whether they still have shift held. > > I know I can use use the mousemove event associated with all > surrounding controls to reset it, but I would like something more > related to the control itself. > > Is there a method of testing that the user has moved the mouse outside > the button's air space? > > I have a feeling I am going to be out of luck... > > > -- > 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 Mon Jul 4 03:11:35 2011 From: Gustav at cactus.dk (Gustav Brock) Date: Mon, 04 Jul 2011 10:11:35 +0200 Subject: [AccessD] Delete query... fast ... deleting from datasheet view ... slow Message-ID: Hi William and Stuart I don't think that's the reason, but it is similar: Access walks through the recordset (which may be filtered) and copies all records to a temp table to hold them in case you - when asked later via the GUI - choose to undo the operation. Only if you choose to confirm the deleting of the records, this actually takes place. /gustav >>> stuart at lexacorp.com.pg 03-07-2011 23:56 >>> A SWAG: Because Access can't tell that all the records are selected. It has to step through the rows and checking the "selected" attribute. That means that it can't implement a simple "Delete * >From tblA" but has to specify each of the records separately for deletion. -- Stuart On 3 Jul 2011 at 17:23, William Benson (VBACreations. wrote: > Why is a query that deletes all records from a table so fast in > comparison with a manual delete operation on a table that is opened in > datasheet view? From stuart at lexacorp.com.pg Mon Jul 4 04:19:36 2011 From: stuart at lexacorp.com.pg (Stuart McLachlan) Date: Mon, 04 Jul 2011 19:19:36 +1000 Subject: [AccessD] Delete query... fast ... deleting from datasheet view ... slow In-Reply-To: References: Message-ID: <4E1185A8.15835.1A05291B@stuart.lexacorp.com.pg> Good point, I didn't think of the confirmation of multiple deletes requiring a temp table. On 4 Jul 2011 at 10:11, Gustav Brock wrote: > Hi William and Stuart > > I don't think that's the reason, but it is similar: Access walks > through the recordset (which may be filtered) and copies all records > to a temp table to hold them in case you - when asked later via the > GUI - choose to undo the operation. Only if you choose to confirm the > deleting of the records, this actually takes place. > > /gustav > > > >>> stuart at lexacorp.com.pg 03-07-2011 23:56 >>> > A SWAG: > Because Access can't tell that all the records are selected. It has to > step through the rows and checking the "selected" attribute. That > means that it can't implement a simple "Delete * From tblA" but has > to specify each of the records separately for deletion. > > -- > Stuart > > On 3 Jul 2011 at 17:23, William Benson (VBACreations. wrote: > > > Why is a query that deletes all records from a table so fast in > > comparison with a manual delete operation on a table that is opened > > in datasheet view? > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > From Gustav at cactus.dk Mon Jul 4 04:50:15 2011 From: Gustav at cactus.dk (Gustav Brock) Date: Mon, 04 Jul 2011 11:50:15 +0200 Subject: [AccessD] SSD, The Game Changer - SQL Man of Mystery - SQLServerCentral.com Message-ID: Hi Jim But Casandra doesn't seem to be much .Net/C# friendly. Clients exist only for the old version 0.7, and both of these seem to provide nothing that come close to DataTableAdapters or the like (not to mention LINQ), only simple command-type access: http://aquiles.codeplex.com/ On the other hand, MongoDB seems to have proceeded further with NoRM: http://iridescence.no/post/NoSQL-Getting-started-with-MongoDB-and-NoRM.aspx /gustav >>> accessd at shaw.ca 04-07-2011 05:10 >>> Inline: -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Sunday, July 03, 2011 2:41 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] SSD, The Game Changer - SQL Man of Mystery - SQLServerCentral.com Jim, I read the first article and I don't see how it fits at all. * It fits very well. First in overview this database does not require a single PC to run the database. It is distributive in nature so you can just add nodes to a bunch of old new and old PCs. The main problem with the database as you have it now is that it is dependant on the hardware of a single box. Just like in 2006 the single CPU reached it maximum and multi-core processors were then created. Cassandra runs like a multi-core PC. When the database is running on numerous PCs it is like running a full RAID. 1) My data is very much a normal table, with rows and columns. In one case (the people table) there are a small number of columns, and most of the columns are fully populated. In the second table, there are pushing 700 fields and the columns are rarely fully populated. * Cassandra, for example, has a sparse data structure. This means columns can be over 2 billion (rows as well) wide (high), if required and the 'fields' do not have to be populated. At any time you can just insert another 'field' and there is no rebuild required or performance loss (It can all be done in real time). You can have your cake and eat it too. 2) The data is relational, though just barely. One of my people tables is directly related to the data table. All of my people tables may have people in the other tables. Eventually I will be pulling all of my people into a single table with pointers back to the non people data in the original able. * When you say barely relational that is what Cassandra is designed for. What you are describing in item 2 is exactly what type of database Cassandra is. It may not use SQL as we traditionally know it but it uses a system called 'map-reduce' which can quickly (very quickly) obtain the same results...it is data-mining tool on steroids. 3) I rarely update the data. The people table is updated once per month as I validate the addresses looking for moves. I get about 1.5% / month moves. The data table is never updated, at least the data in the existing columns. Very occasionally I add new columns. * Again, your requirements and description is matching Cassandra's design nature to a tee. 4) I only have a single user (myself) and I never expect to have more. * That does not matter if you are the only user. What does matter is that you can pull any data out of a huge mass of mix data fast and easy. You have noticed how Google can pull 365,000,000 hits in somewhere around 0.03 seconds. It is not because they have huge vertical super-powerful computers...their computer are but beaters in comparison but their database is spans hundreds of computers...just like Cassandra is capable of. In comparison, the NoSQL databases claim to store documents and make them searchable. Blog posts, web pages etc. They claim to be good as the numbers of people simultaneously *writing* to them climbs into the hundreds or thousands. So while the technology is fascinating, it hardly seems like a fit for my application. * You are right in all the above but with the exception that the Cassandra is a near perfect fit. To that end I will be starting my own Cassandra database system and just to see how it plays out. Here is a little video to watch that will do a lot to explain what and how Cassandra does things: http://video.disruptivecode.com/video/840645/what-makes-cassandra-trick.html. I think you will be pleasantly surprised. The product runs on any OS as all that it is needs is a copy of Java and Apache, which is free, downloads. http://www.quora.com/How-can-i-install-Apache-Cassandra-on-Windows-Operating-System John W. Colby www.ColbyConsulting.com On 7/3/2011 3:13 PM, Jim Lawrence wrote: > Hi John: > > As your databases do not need do manage transaction queues or locks here is > an example of just one of the NoSQL database MongoDB vs. SQL Server 2008 > performance showdown comparison. > > http://tinyurl.com/38cofzg > > In the article it shows speeds over 100 times as fast when managing a fairly > large amount of data but the performance just goes up exponentially when > presented with even larger data sets. (1000x and more...) > > The Cassandra (NoSQL) database (http://cassandra.apache.org/) might be one > of the best choices in this genre as it has the support of the big players > like FaceBook, IBM, Apache etc... > > There is also an ever expanding group of experts and help forums > (http://cassandra-user-incubator-apache-org.3065146.n2.nabble.com/) on this > subject. > > To add to the functionality there is the new super scaling and searching > tools called HPCC > (http://gigaom.com/cloud/lexisnexis-open-sources-its-hadoop-killer/) which > uses a combination of SQL and NoSQL when searching distributive data and > clusters of data servers. > > In your future plans it might well be worth considering such an option > especially as your data requirements and expected results continues to grow. > > > Jim From vbacreations at gmail.com Mon Jul 4 04:51:30 2011 From: vbacreations at gmail.com (William Benson) Date: Mon, 4 Jul 2011 05:51:30 -0400 Subject: [AccessD] Delete query... fast ... deleting from datasheet view ... slow In-Reply-To: References: Message-ID: I will check again but I think what got me interested in the question was that ia manual delwte takes longer even taking into account just time AFTER the user confirms ok to continue without Undo. Where does Access store the temp table Gustav? In other words if you open a monstrously large table select all records and do several faux deletes one after another which you confirm but cancel at the "Continue without Undo?" Prompt....does the database bloat I wonder! I will check this when I get back to computer!_ Bill Benson Owner VBACreations, LLC On Jul 4, 2011 4:12 AM, "Gustav Brock" wrote: > Hi William and Stuart > > I don't think that's the reason, but it is similar: Access walks through the recordset (which may be filtered) and copies all records to a temp table to hold them in case you - when asked later via the GUI - choose to undo the operation. Only if you choose to confirm the deleting of the records, this actually takes place. > > /gustav > > >>>> stuart at lexacorp.com.pg 03-07-2011 23:56 >>> > A SWAG: > Because Access can't tell that all the records are selected. It has to step through the rows > and checking the "selected" attribute. That means that it can't implement a simple "Delete * > From tblA" but has to specify each of the records separately for deletion. > > -- > Stuart > > On 3 Jul 2011 at 17:23, William Benson (VBACreations. wrote: > >> Why is a query that deletes all records from a table so fast in >> comparison with a manual delete operation on a table that is opened in >> datasheet view? > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com From stuart at lexacorp.com.pg Mon Jul 4 05:45:20 2011 From: stuart at lexacorp.com.pg (Stuart McLachlan) Date: Mon, 04 Jul 2011 20:45:20 +1000 Subject: [AccessD] Delete query... fast ... deleting from datasheet view ... slow In-Reply-To: References: , Message-ID: <4E1199C0.16390.1A53A76F@stuart.lexacorp.com.pg> I suspect it is only stored in memory. On 4 Jul 2011 at 5:51, William Benson wrote: > > Where does Access store the temp table Gustav? In other words if you > open a monstrously large table select all records and do several faux > deletes one after another which you confirm but cancel at the > "Continue without Undo?" Prompt....does the database bloat I wonder! I > will check this when I get back to computer!_ > From Gustav at cactus.dk Mon Jul 4 06:23:55 2011 From: Gustav at cactus.dk (Gustav Brock) Date: Mon, 04 Jul 2011 13:23:55 +0200 Subject: [AccessD] Delete query... fast ... deleting from datasheet view ... slow Message-ID: Hi William and Stuart Yes in memory, if possible. If not, in some temp db in the temp folder of the current user of Windows. /gustav >>> stuart at lexacorp.com.pg 04-07-2011 12:45 >>> I suspect it is only stored in memory. On 4 Jul 2011 at 5:51, William Benson wrote: > > Where does Access store the temp table Gustav? In other words if you > open a monstrously large table select all records and do several faux > deletes one after another which you confirm but cancel at the > "Continue without Undo?" Prompt....does the database bloat I wonder! I > will check this when I get back to computer!_ From jimdettman at verizon.net Mon Jul 4 08:56:51 2011 From: jimdettman at verizon.net (Jim Dettman) Date: Mon, 04 Jul 2011 09:56:51 -0400 Subject: [AccessD] Delete query... fast ... deleting from datasheet view... slow In-Reply-To: References: Message-ID: Yes, the temp DB's are in the directory specified by TEMP and/or TMP and are prefixed with ~JET Not having TEMP or TMP set correctly can yield a "Disk or network I/O error" message. The UseTransactions property also comes into play as to how JET handles the delete as well as whether you have the DB opened exclusive or not. Also of note, if a remote ODBC DB is involved, you need to be careful with the delete queries. If you use anything in the query that is Access/JET specific (ie. a VBA expression) or a join to a local table, then JET ends up issuing one ODBC call for each row that it wants to delete instead of sending one SQL delete statement to the backend. Jim. -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: Monday, July 04, 2011 07:24 AM To: accessd at databaseadvisors.com Subject: Re: [AccessD] Delete query... fast ... deleting from datasheet view... slow Hi William and Stuart Yes in memory, if possible. If not, in some temp db in the temp folder of the current user of Windows. /gustav >>> stuart at lexacorp.com.pg 04-07-2011 12:45 >>> I suspect it is only stored in memory. On 4 Jul 2011 at 5:51, William Benson wrote: > > Where does Access store the temp table Gustav? In other words if you > open a monstrously large table select all records and do several faux > deletes one after another which you confirm but cancel at the > "Continue without Undo?" Prompt....does the database bloat I wonder! I > will check this when I get back to computer!_ -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From adtp at airtelmail.in Mon Jul 4 09:22:34 2011 From: adtp at airtelmail.in (A.D. Tejpal) Date: Mon, 4 Jul 2011 19:52:34 +0530 Subject: [AccessD] How to tell a button's "air space" is no longer beinghovered over References: <003b01cc38f1$b62edca0$228c95e0$@gmail.com> Message-ID: <471F6C8DAB244C66B0AB79536085B3EC@personal4a8ede> William, For detecting whether the mouse pointer has moved away from the control in question, you can use the MouseMove event of form section to which the said control belongs, for example: ' Code in form's module '============================= Private Sub Detail_MouseMove( _ Button As Integer, Shift As Integer, _ X As Single, Y As Single) ' <> End Sub '-------------------------------------------- Private Sub FormFooter_MouseMove( _ Button As Integer, Shift As Integer, _ X As Single, Y As Single) ' <> End Sub '-------------------------------------------- Private Sub FormHeader_MouseMove( _ Button As Integer, Shift As Integer, _ X As Single, Y As Single) ' <> End Sub '============================= Best wishes, A.D. Tejpal ------------ ----- Original Message ----- From: William Benson (VBACreations.Com) To: 'Access Developers discussion and problem solving' Sent: Sunday, July 03, 2011 01:23 Subject: [AccessD] How to tell a button's "air space" is no longer beinghovered over I have some code which changes the caption of a button when the user has the ctrl key pressed, set during the mousemove event for the button. I want however, that when the user leaves the "air space" for the button, then the caption reverts - regardless whether they still have shift held. I know I can use use the mousemove event associated with all surrounding controls to reset it, but I would like something more related to the control itself. Is there a method of testing that the user has moved the mouse outside the button's air space? I have a feeling I am going to be out of luck... From vbacreations at gmail.com Mon Jul 4 09:38:17 2011 From: vbacreations at gmail.com (William Benson (VBACreations.Com)) Date: Mon, 4 Jul 2011 10:38:17 -0400 Subject: [AccessD] Delete query... fast ... deleting from datasheet view ... slow In-Reply-To: References: Message-ID: <000e01cc3a58$040d3810$0c27a830$@gmail.com> Gustav and Stuart, After testing this, I don't think there is a temp table, at least not initially - and I doubt during or afterwards, either. The reason I conclude this is manifold. Primarily, because if you cancel instead of permitting the GUI to continue without UNDO, canceling the delete takes WAY less time than it would take to put the records back in a table. And if you're referring perhaps to some tiny temp table of records which might be deletable WITH THE ABILITY to undo, that is a far smaller chunk of data than the main bulk Access will ultimately delete when you allow it to proceed without undo. Furthermore, I have gone through the exercise I mentioned . Delete, No, Delete, No, . a dozen times or so and the database size never changes on disk. So I am pretty sure Access is storing data in RAM, not on Disk. And certainly it is not creating a temp table at any other time, since allowing it to delete all, or some (pressing Escape) records does not leave the database any bigger than before delete was pressed. I do lean towards the recordset walk however, that makes a lot of sense in terms of what behavior we observe. - Access is very slow to delete from large tables even when allowing it to continue without undo - Records are deleted exactly in the order in which they appear, top to bottom, in the block of selected records - Interrupting a deletion with the Escape key leaves you with whatever records Access didn't get to yet - Deleting Still gotta wonder why Jet would do it that way. With records selected, one would think there is some hidden "selected" flag which Access's delete operation could make use of, to write its own behind the scenes SQL that says "Delete from ThisTable where the UserSelectedMe flag = TRUE". and then delete the records as fast as a query does it! From: William Benson [mailto:vbacreations at gmail.com] Sent: Monday, July 04, 2011 5:52 AM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Delete query... fast ... deleting from datasheet view ... slow I will check again but I think what got me interested in the question was that ia manual delwte takes longer even taking into account just time AFTER the user confirms ok to continue without Undo. Where does Access store the temp table Gustav? In other words if you open a monstrously large table select all records and do several faux deletes one after another which you confirm but cancel at the "Continue without Undo?" Prompt....does the database bloat I wonder! I will check this when I get back to computer!_ Bill Benson Owner VBACreations, LLC On Jul 4, 2011 4:12 AM, "Gustav Brock" wrote: > Hi William and Stuart > > I don't think that's the reason, but it is similar: Access walks through the recordset (which may be filtered) and copies all records to a temp table to hold them in case you - when asked later via the GUI - choose to undo the operation. Only if you choose to confirm the deleting of the records, this actually takes place. > > /gustav > > >>>> stuart at lexacorp.com.pg 03-07-2011 23:56 >>> > A SWAG: > Because Access can't tell that all the records are selected. It has to step through the rows > and checking the "selected" attribute. That means that it can't implement a simple "Delete * > From tblA" but has to specify each of the records separately for deletion. > > -- > Stuart > > On 3 Jul 2011 at 17:23, William Benson (VBACreations. wrote: > >> Why is a query that deletes all records from a table so fast in >> comparison with a manual delete operation on a table that is opened in >> datasheet view? > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com From vbacreations at gmail.com Mon Jul 4 10:23:28 2011 From: vbacreations at gmail.com (William Benson (VBACreations.Com)) Date: Mon, 4 Jul 2011 11:23:28 -0400 Subject: [AccessD] How to tell a button's "air space" is no longer beinghovered over In-Reply-To: <471F6C8DAB244C66B0AB79536085B3EC@personal4a8ede> References: <003b01cc38f1$b62edca0$228c95e0$@gmail.com> <471F6C8DAB244C66B0AB79536085B3EC@personal4a8ede> Message-ID: <002001cc3a5e$5428d240$fc7a76c0$@gmail.com> A.D., Other controls are too near the button's bottom and it's top edge is pretty much as .Top = 0. I have put the code in the other controls already, similar to what you wrote. I was wondering if there was a way like to test the mousemove if the coordinates are exactly on bottom or top or at either side of the button, based on X, Y, or whatever... and if so, the caption is treated as if the mouse were outside it, and if not, use the caption that pertains to the moust being inside. During a normal mousemove operation the user will be headed out or headed into the interior of the button, so -- if on the way out, the last code to execute will be to reset the caption -- if on the way in, the code executing (probably continuously) will be to set the caption appropriate for interior of button But I don't think it is possible to get the event to faithfully fire exactly as the mouse is going over the edge of the button. Thanks a lot, Bill -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of A.D. Tejpal Sent: Monday, July 04, 2011 10:23 AM To: Access Developers discussion and problem solving Subject: Re: [AccessD] How to tell a button's "air space" is no longer beinghovered over William, For detecting whether the mouse pointer has moved away from the control in question, you can use the MouseMove event of form section to which the said control belongs, for example: ' Code in form's module '============================= Private Sub Detail_MouseMove( _ Button As Integer, Shift As Integer, _ X As Single, Y As Single) ' <> End Sub '-------------------------------------------- Private Sub FormFooter_MouseMove( _ Button As Integer, Shift As Integer, _ X As Single, Y As Single) ' <> End Sub '-------------------------------------------- Private Sub FormHeader_MouseMove( _ Button As Integer, Shift As Integer, _ X As Single, Y As Single) ' <> End Sub '============================= Best wishes, A.D. Tejpal ------------ ----- Original Message ----- From: William Benson (VBACreations.Com) To: 'Access Developers discussion and problem solving' Sent: Sunday, July 03, 2011 01:23 Subject: [AccessD] How to tell a button's "air space" is no longer beinghovered over I have some code which changes the caption of a button when the user has the ctrl key pressed, set during the mousemove event for the button. I want however, that when the user leaves the "air space" for the button, then the caption reverts - regardless whether they still have shift held. I know I can use use the mousemove event associated with all surrounding controls to reset it, but I would like something more related to the control itself. Is there a method of testing that the user has moved the mouse outside the button's air space? I have a feeling I am going to be out of luck... -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From accessd at shaw.ca Mon Jul 4 10:56:07 2011 From: accessd at shaw.ca (Jim Lawrence) Date: Mon, 4 Jul 2011 08:56:07 -0700 Subject: [AccessD] SSD, The Game Changer - SQL Man of Mystery -SQLServerCentral.com In-Reply-To: References: Message-ID: Hi Gustav: Good points. Like MongoDB needs the client NoRM so it can connect to .Net, Cassandra needs the client Thrift. There are other clients but Thrift seems to be the most popular probably because it was the first client. An aside: My son-in-law does a lot of work on Cassandra and he uses the client PHPCassa. It can either use Thrift as a plug-in or connect directly through PHP sockets. (As PHPCassa has just been released it is having some growing pains which should be resolved by the fall.) The below sample shows a system connecting through a Virtual drive and then connection to .Net. http://www.ridgway.co.za/archive/2009/11/06/net-developers-guide-to-getting- started-with-cassandra.aspx I have been considering which NoSQL, or more accurately, Map-Reduce instead of SQL, database to become involved with and Cassandra matched some very important points. When I get involved it will be for the long run so: 1. Cassandra has the largest group of fortune 500 companies supporting it. 2. Cassandra, like MongoDB is being supported by Microsoft. After Cassandra's, next major release, coming this summer, I would suspect that there will be a real and full .Net client to follow. In this region, there is a huge presents of Oracle on Linux/Unix/Windows but there appears to be some real limitations with what a vertical Database can do. There is only so powerful an HP Proliant or Dell that can be built and a number of clients have been hitting that wall. In addition, the Oracle licensing, costs are far greater than the servers. Just like single core CPUs hit the wall in 2006 so are large growing databases. In the near future, there will be some real opportunities for NoSQL experts. Jim -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: Monday, July 04, 2011 2:50 AM To: accessd at databaseadvisors.com Subject: Re: [AccessD] SSD, The Game Changer - SQL Man of Mystery -SQLServerCentral.com Hi Jim But Casandra doesn't seem to be much .Net/C# friendly. Clients exist only for the old version 0.7, and both of these seem to provide nothing that come close to DataTableAdapters or the like (not to mention LINQ), only simple command-type access: http://aquiles.codeplex.com/ On the other hand, MongoDB seems to have proceeded further with NoRM: http://iridescence.no/post/NoSQL-Getting-started-with-MongoDB-and-NoRM.aspx /gustav >>> accessd at shaw.ca 04-07-2011 05:10 >>> Inline: -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Sunday, July 03, 2011 2:41 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] SSD, The Game Changer - SQL Man of Mystery - SQLServerCentral.com Jim, I read the first article and I don't see how it fits at all. * It fits very well. First in overview this database does not require a single PC to run the database. It is distributive in nature so you can just add nodes to a bunch of old new and old PCs. The main problem with the database as you have it now is that it is dependant on the hardware of a single box. Just like in 2006 the single CPU reached it maximum and multi-core processors were then created. Cassandra runs like a multi-core PC. When the database is running on numerous PCs it is like running a full RAID. 1) My data is very much a normal table, with rows and columns. In one case (the people table) there are a small number of columns, and most of the columns are fully populated. In the second table, there are pushing 700 fields and the columns are rarely fully populated. * Cassandra, for example, has a sparse data structure. This means columns can be over 2 billion (rows as well) wide (high), if required and the 'fields' do not have to be populated. At any time you can just insert another 'field' and there is no rebuild required or performance loss (It can all be done in real time). You can have your cake and eat it too. 2) The data is relational, though just barely. One of my people tables is directly related to the data table. All of my people tables may have people in the other tables. Eventually I will be pulling all of my people into a single table with pointers back to the non people data in the original able. * When you say barely relational that is what Cassandra is designed for. What you are describing in item 2 is exactly what type of database Cassandra is. It may not use SQL as we traditionally know it but it uses a system called 'map-reduce' which can quickly (very quickly) obtain the same results...it is data-mining tool on steroids. 3) I rarely update the data. The people table is updated once per month as I validate the addresses looking for moves. I get about 1.5% / month moves. The data table is never updated, at least the data in the existing columns. Very occasionally I add new columns. * Again, your requirements and description is matching Cassandra's design nature to a tee. 4) I only have a single user (myself) and I never expect to have more. * That does not matter if you are the only user. What does matter is that you can pull any data out of a huge mass of mix data fast and easy. You have noticed how Google can pull 365,000,000 hits in somewhere around 0.03 seconds. It is not because they have huge vertical super-powerful computers...their computer are but beaters in comparison but their database is spans hundreds of computers...just like Cassandra is capable of. In comparison, the NoSQL databases claim to store documents and make them searchable. Blog posts, web pages etc. They claim to be good as the numbers of people simultaneously *writing* to them climbs into the hundreds or thousands. So while the technology is fascinating, it hardly seems like a fit for my application. * You are right in all the above but with the exception that the Cassandra is a near perfect fit. To that end I will be starting my own Cassandra database system and just to see how it plays out. Here is a little video to watch that will do a lot to explain what and how Cassandra does things: http://video.disruptivecode.com/video/840645/what-makes-cassandra-trick.html . I think you will be pleasantly surprised. The product runs on any OS as all that it is needs is a copy of Java and Apache, which is free, downloads. http://www.quora.com/How-can-i-install-Apache-Cassandra-on-Windows-Operating -System John W. Colby www.ColbyConsulting.com From vbacreations at gmail.com Mon Jul 4 11:02:58 2011 From: vbacreations at gmail.com (William Benson (VBACreations.Com)) Date: Mon, 4 Jul 2011 12:02:58 -0400 Subject: [AccessD] Delete query... fast ... deleting from datasheet view ... slow References: Message-ID: <000301cc3a63$da2bf930$8e83eb90$@gmail.com> Good news, I could get back to VBA by trying to press Ctrl-G as fast as I could while also pressing Enter . apparently there was just enough split-sec pause between "unrecognized database format" prompts - so that after about 50 tries I got into the VBA window and could do a Save before entering Application.Quit, which killed the application as desired. Then even though Access was no longer running, I could not open the database again. Was getting a message that user admin had left it in a state which it could not longer be opened or locked. I was like "huh? So I went to the temp folder and tried to either rename or delete the temp database found in there and couldn't mess with that either! So I rebooted my machine and then I could get into the database again (Thank God). But this is a continual problem for me when deleting large numbers of records .. even if I click No (do not continue without undo) I get a message You tried to commit or rollback a transaction without first beginning a transaction. I say OK to that, then the message is The changes you made can't be saved due to the temporary locking of the records by another user. Eh, come again? What user? Then I say OK to that then I get You tried to commit or rollback a transaction without first beginning a transaction. Again. Then I click OK, and sometimes that's the end of things, and sometimes it's just the beginning of my troubles. Painful. From vbacreations at gmail.com Mon Jul 4 11:04:52 2011 From: vbacreations at gmail.com (William Benson (VBACreations.Com)) Date: Mon, 4 Jul 2011 12:04:52 -0400 Subject: [AccessD] Delete query... fast ... deleting from datasheet view ... slow References: Message-ID: <000801cc3a64$1c8f8490$55ae8db0$@gmail.com> Long and short of it . I use delete queries for large number of rows, exclusively, from now on. :-0(((((((( From: William Benson (VBACreations.Com) [mailto:vbacreations at gmail.com] Sent: Monday, July 04, 2011 12:03 PM To: Access Developers discussion and problem solving Subject: RE: [AccessD] Delete query... fast ... deleting from datasheet view ... slow Good news, I could get back to VBA by trying to press Ctrl-G as fast as I could while also pressing Enter . apparently there was just enough split-sec pause between "unrecognized database format" prompts - so that after about 50 tries I got into the VBA window and could do a Save before entering Application.Quit, which killed the application as desired. Then even though Access was no longer running, I could not open the database again. Was getting a message that user admin had left it in a state which it could not longer be opened or locked. I was like "huh? So I went to the temp folder and tried to either rename or delete the temp database found in there and couldn't mess with that either! So I rebooted my machine and then I could get into the database again (Thank God). But this is a continual problem for me when deleting large numbers of records .. even if I click No (do not continue without undo) I get a message You tried to commit or rollback a transaction without first beginning a transaction. I say OK to that, then the message is The changes you made can't be saved due to the temporary locking of the records by another user. Eh, come again? What user? Then I say OK to that then I get You tried to commit or rollback a transaction without first beginning a transaction. Again. Then I click OK, and sometimes that's the end of things, and sometimes it's just the beginning of my troubles. Painful. From jwcolby at colbyconsulting.com Mon Jul 4 11:13:11 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Mon, 04 Jul 2011 12:13:11 -0400 Subject: [AccessD] SSD, The Game Changer - SQL Man of Mystery - SQLServerCentral.com In-Reply-To: References: Message-ID: <4E11E697.9050301@colbyconsulting.com> Jim / Gustav, In any case it seems like a forced fit if it fits at all. I read the blogs and they are talking about responding to millions of reads / writes of massive quantities of text by massive quantities of users, using tens of thousands of machines to distribute the load. Look at the users and who are they? Search engines and social network sites. From the web site that Gustav posted: MongoDB? ?MongoDB (from "humongous") is a scalable, high-performance, open source, schema-free, document-oriented database.? I don't see how this describes me in any way. http://www.michaelckennedy.net/blog/2010/04/22/TheNoSQLMovementLINQAndMongoDBOhMy.aspx to quote: "This move towards NoSQL is driven by pressure from two angles in the web application world: * Ease-of-use and deployment * Performance - especially when there are many writers as compared to the number of readers (think Twitter or Facebook)." I don't see how this describes me in any way. I am not opposed to using this, however I have to see that it somehow fits and I don't see that. 1) I don't have tens of thousands of machines to distribute the load. And never will! 2) I don't have tens of thousands of users trying to simultaneously read / write to the data store. And never will! 3) I am not storing large quantities of text (think blog text, web page text, pictures etc) per read / write. And never will! 4) I don't have, nor do I wish to maintain a bunch of old / new PCs as a huge network. These guys (Google etc) build entire data centers with highly replicable computers, but they do so for scalability and replicability (redundancy). They also have a megawatt power line coming in to their data center. They also spend a couple of hundred million building the data center. They also have hundreds or thousands of programmers writing their code. How does any of that sound like me? 5) I have spent a year building a pretty sophisticated system for taking data in SQL Server, huge quantities of records, and getting them exported out of the data store into CSVs, through a VM / third party software, and then back in to the server (updating thousands of addresses when people move). I have custom software to build orders and get selected sets of name / address records out to fixed width files. The selection process depends entirely on where clauses - where age in ('1','2','3') and Income in ('a','b','c') and MOB = 'Y' and... This is SQL stuff. It requires an easily manipulatable SQL language. When something doesn't work I need to have an environment that I can cut and paste my sql statements and troubleshoot them. My data has never touched a web page. In fact 99.9999999% of my data has never even been seen by human eyes, other than when it was originally entered by each person typing their name / address into a web site sime time in the last 10 years. *None of that* sounds like these systems (to me). These systems are designed precisely to take pages of data typed in by millions of users and store them in an efficient manner, then pull the entire thing back out millions of times to display on a web browser. Jim, I think these systems are the cat's meow for the purpose they are intended for, but my data and the way I use my data is just not that paradigm. In the meantime I have already built a hardware / software system that does what I want, and I did it on a budget that is remarkably small. Long term I spend around 2% of my income on hardware. Perhaps even 1%. And I did it with myself and a 3 hour / day part time programmer. I really don't get that throwing all that away to start over with a database designed to fit Google's / Facebook's needs is a good thing to do. To be honest, if I were starting from scratch, I don't think it would be the right tool. The fact that it is a million times faster at what it does doesn't matter if what it does isn't what I do. John W. Colby www.ColbyConsulting.com On 7/4/2011 5:50 AM, Gustav Brock wrote: > Hi Jim > > But Casandra doesn't seem to be much .Net/C# friendly. Clients exist only for the old version 0.7, and both of these seem to provide nothing that come close to DataTableAdapters or the like (not to mention LINQ), only simple command-type access: > > http://aquiles.codeplex.com/ > > On the other hand, MongoDB seems to have proceeded further with NoRM: > > http://iridescence.no/post/NoSQL-Getting-started-with-MongoDB-and-NoRM.aspx > > /gustav > > >>>> accessd at shaw.ca 04-07-2011 05:10>>> > Inline: > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby > Sent: Sunday, July 03, 2011 2:41 PM > To: Access Developers discussion and problem solving > Subject: Re: [AccessD] SSD, The Game Changer - SQL Man of Mystery - > SQLServerCentral.com > > Jim, > > I read the first article and I don't see how it fits at all. > > * It fits very well. First in overview this database does not require a > single PC to run the database. It is distributive in nature so you can just > add nodes to a bunch of old new and old PCs. The main problem with the > database as you have it now is that it is dependant on the hardware of a > single box. Just like in 2006 the single CPU reached it maximum and > multi-core processors were then created. Cassandra runs like a multi-core > PC. When the database is running on numerous PCs it is like running a full > RAID. From BradM at blackforestltd.com Mon Jul 4 13:53:23 2011 From: BradM at blackforestltd.com (Brad Marks) Date: Mon, 4 Jul 2011 13:53:23 -0500 Subject: [AccessD] What is the best way to grab fields from a report detail line so that they can be accessed in VBA? References: Message-ID: All, I want to grab the value of fields from report detail lines. Here is the method that I finally got to work. I open the report with a line like this... DoCmd.OpenReport "Report1", acViewPreview, "", "", acNormal I then grab the fields in the "On Print" Event This works, but I would like to know if this is the best method to do this. ~ ~ ~ ~ There rest of the story... Here is what I am trying to accomplish. I have a number of Access 2007 reports that employ "dynamic filters" via the use of "Report View" and the "Where Condition" when the report is opened. In other words, the filters are applied at the report level and not at the underlying query level. (There are buttons on the reports which open up a small form that is used to collect "filter info" and then re-open the report with the appropriate "Where Condition" based on the "filter info") Now there is a need to export the report data to Excel. Because of the complex nature of the reports, they do not Export very nicely to Excel (I have tried several approaches). I know that I could easily export from the underlying queries to Excel, but this type of export would not take into account the filters that are applied at the report level. Therefore, to export the exact data on the reports to Excel, I have started to experiment with grabbing the data from the report as it is being built. This is not ideal, but I can't seem to find a better method. Maybe others have run into this issue and have a better approach. Thanks for your assistance. Brad From marksimms at verizon.net Mon Jul 4 19:56:37 2011 From: marksimms at verizon.net (Mark Simms) Date: Mon, 04 Jul 2011 20:56:37 -0400 Subject: [AccessD] How to tell a button's "air space" is no longer beinghovered over In-Reply-To: <471F6C8DAB244C66B0AB79536085B3EC@personal4a8ede> References: <003b01cc38f1$b62edca0$228c95e0$@gmail.com> <471F6C8DAB244C66B0AB79536085B3EC@personal4a8ede> Message-ID: <003301cc3aae$64e3e840$2eabb8c0$@net> Easier said than done. You must add logic to detect when the mouse is moving INTO the object airspace... And then logic to detect when the mouse is moving OUT OF the airspace. It's called "Mouseover". Another detail that MSFT omitted in Office VBA. Sure would have been nice to have a Mouseover event handler...right ? > -----Original Message----- > From: accessd-bounces at databaseadvisors.com [mailto:accessd- > bounces at databaseadvisors.com] On Behalf Of A.D. Tejpal > Sent: Monday, July 04, 2011 10:23 AM > To: Access Developers discussion and problem solving > Subject: Re: [AccessD] How to tell a button's "air space" is no longer > beinghovered over > > William, > > For detecting whether the mouse pointer has moved away from the > control in question, you can use the MouseMove event of form section to > which the said control belongs, for example: > > ' Code in form's module > '============================= > Private Sub Detail_MouseMove( _ > Button As Integer, Shift As Integer, _ > X As Single, Y As Single) > > ' <> > > End Sub > '-------------------------------------------- > > Private Sub FormFooter_MouseMove( _ > Button As Integer, Shift As Integer, _ > X As Single, Y As Single) > > ' <> > > End Sub > '-------------------------------------------- > > Private Sub FormHeader_MouseMove( _ > Button As Integer, Shift As Integer, _ > X As Single, Y As Single) > > ' <> > > End Sub > '============================= > From dbdoug at gmail.com Mon Jul 4 20:16:43 2011 From: dbdoug at gmail.com (Doug Steele) Date: Mon, 4 Jul 2011 18:16:43 -0700 Subject: [AccessD] What is the best way to grab fields from a report detail line so that they can be accessed in VBA? In-Reply-To: References: Message-ID: Brad, what I do in similar circumstances is build and save the 'Where' string in the filtering form. In code, I take the original SQL for the report recordsource and add the Where string to it. I then save this new SQL into a temporary query and export it to Excel. Doug On Mon, Jul 4, 2011 at 11:53 AM, Brad Marks wrote: > All, > > I want to grab the value of fields from report detail lines. > > Here is the method that I finally got to work. > > I open the report with a line like this... > > DoCmd.OpenReport "Report1", acViewPreview, "", "", acNormal > > I then grab the fields in the "On Print" Event > > This works, but I would like to know if this is the best method to do > this. > > ~ ~ ~ ~ > > There rest of the story... > > Here is what I am trying to accomplish. > > I have a number of Access 2007 reports that employ "dynamic filters" via > the use of "Report View" and the "Where Condition" when the report is > opened. ?In other words, the filters are applied at the report level and > not at the underlying query level. ?(There are buttons on the reports > which open up a small form that is used to collect "filter info" and > then re-open the report with the appropriate "Where Condition" based on > the "filter info") > > Now there is a need to export the report data to Excel. ?Because of the > complex nature of the reports, they do not Export very nicely to Excel > (I have tried several approaches). > > I know that I could easily export from the underlying queries to Excel, > but this type of export would not take into account the filters that are > applied at the report level. > > Therefore, to export the exact data on the reports to Excel, I have > started to experiment with grabbing the data from the report as it is > being built. ?This is not ideal, but I can't seem to find a better > method. > > Maybe others have run into this issue and have a better approach. > > Thanks for your assistance. > > Brad > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > From jwcolby at colbyconsulting.com Tue Jul 5 03:56:04 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Tue, 05 Jul 2011 04:56:04 -0400 Subject: [AccessD] Sourcegear vault free two developer license Message-ID: <4E12D1A4.1010809@colbyconsulting.com> I ran across this today. http://www.sqlservercentral.com/articles/Red+Gate+Software/74579/ http://promotions.sourcegear.com/vouchers/new/ -- John W. Colby www.ColbyConsulting.com From adtp at airtelmail.in Tue Jul 5 04:10:09 2011 From: adtp at airtelmail.in (A.D. Tejpal) Date: Tue, 5 Jul 2011 14:40:09 +0530 Subject: [AccessD] How to tell a button's "air space" is nolonger beinghovered over References: <003b01cc38f1$b62edca0$228c95e0$@gmail.com><471F6C8DAB244C66B0AB79536085B3EC@personal4a8ede> <002001cc3a5e$5428d240$fc7a76c0$@gmail.com> Message-ID: <8DD6228312434CD0940AE4E4807C4FF6@personal4a8ede> Bill, Apparently, in view of special positioning of control in question, you are looking for a solution that is self contained within control's MouseMove event. You could experiment with sample code given below: ' Code in form's module '============================== ' Declarations section Private gX As Single, gY As Single '--------------------------------------------- Private Sub CmdTest_MouseMove( _ Button As Integer, _ Shift As Integer, _ X As Single, Y As Single) With Me.CmdTest Me.CmdTest.Caption = "Test (MM)" If gX <> 0 Then If (X > (0.9 * .Width) And X > gX) _ Or (X < (0.1 * .Width) And _ X < gX) Then Me.CmdTest.Caption = "Test" End If End If If gY <> 0 Then If (Y > (0.9 * .Height) And Y > gY) _ Or (Y < (0.1 * .Height) And _ Y < gY) Then Me.CmdTest.Caption = "Test" End If End If End With gX = X gY = Y End Sub '============================== Normal caption of command button named CmdTest is "Test". When mouse pointer is brought over it, the caption changes to "Test (MM)". As & when the mouse pointer moves away from the control, the caption reverts back to normal, i.e. "Test". Note: (a) MouseMove event fires in rapid-fire style. Values for X and Y returned by this event have a range from 0 upto the width and height (in twips) of the control in question. (b) The multiplying factors of 0.9 and 0.1 used in the sample code could perhaps be fine tuned further (say 0.95 and 0.05) so as to narrow down the twilight zone. However a coarser setting as adopted above, is found conducive to more consistent behavior. This is because a deliberately wild mouse sweep by the user can result in X or Y value getting truncated short of the potential maximum, even though the mouse pointer has moved out. Best wishes, A.D. Tejpal ------------ ----- Original Message ----- From: William Benson (VBACreations.Com) To: 'Access Developers discussion and problem solving' Sent: Monday, July 04, 2011 20:53 Subject: Re: [AccessD] How to tell a button's "air space" is nolonger beinghovered over A.D., Other controls are too near the button's bottom and it's top edge is pretty much as .Top = 0. I have put the code in the other controls already, similar to what you wrote. I was wondering if there was a way like to test the mousemove if the coordinates are exactly on bottom or top or at either side of the button, based on X, Y, or whatever... and if so, the caption is treated as if the mouse were outside it, and if not, use the caption that pertains to the moust being inside. During a normal mousemove operation the user will be headed out or headed into the interior of the button, so -- if on the way out, the last code to execute will be to reset the caption -- if on the way in, the code executing (probably continuously) will be to set the caption appropriate for interior of button But I don't think it is possible to get the event to faithfully fire exactly as the mouse is going over the edge of the button. Thanks a lot, Bill -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of A.D. Tejpal Sent: Monday, July 04, 2011 10:23 AM To: Access Developers discussion and problem solving Subject: Re: [AccessD] How to tell a button's "air space" is no longer beinghovered over William, For detecting whether the mouse pointer has moved away from the control in question, you can use the MouseMove event of form section to which the said control belongs, for example: ' Code in form's module '============================= Private Sub Detail_MouseMove( _ Button As Integer, Shift As Integer, _ X As Single, Y As Single) ' <> End Sub '-------------------------------------------- Private Sub FormFooter_MouseMove( _ Button As Integer, Shift As Integer, _ X As Single, Y As Single) ' <> End Sub '-------------------------------------------- Private Sub FormHeader_MouseMove( _ Button As Integer, Shift As Integer, _ X As Single, Y As Single) ' <> End Sub '============================= Best wishes, A.D. Tejpal ------------ ----- Original Message ----- From: William Benson (VBACreations.Com) To: 'Access Developers discussion and problem solving' Sent: Sunday, July 03, 2011 01:23 Subject: [AccessD] How to tell a button's "air space" is no longer beinghovered over I have some code which changes the caption of a button when the user has the ctrl key pressed, set during the mousemove event for the button. I want however, that when the user leaves the "air space" for the button, then the caption reverts - regardless whether they still have shift held. I know I can use use the mousemove event associated with all surrounding controls to reset it, but I would like something more related to the control itself. Is there a method of testing that the user has moved the mouse outside the button's air space? I have a feeling I am going to be out of luck... From vbacreations at gmail.com Tue Jul 5 07:01:19 2011 From: vbacreations at gmail.com (William Benson (VBACreations.Com)) Date: Tue, 5 Jul 2011 08:01:19 -0400 Subject: [AccessD] How to tell a button's "air space" is nolonger beinghovered over In-Reply-To: <8DD6228312434CD0940AE4E4807C4FF6@personal4a8ede> References: <003b01cc38f1$b62edca0$228c95e0$@gmail.com><471F6C8DAB244C66B0AB79536085B3EC@personal4a8ede> <002001cc3a5e$5428d240$fc7a76c0$@gmail.com> <8DD6228312434CD0940AE4E4807C4FF6@personal4a8ede> Message-ID: <001201cc3b0b$40feef30$c2fccd90$@gmail.com> I tried your code A.D., it works pretty well. It occasionally misses when the button's edge is near the top (but not at the top) of its section and when another control is near the button's edge.. But it's great, thank you. -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of A.D. Tejpal Sent: Tuesday, July 05, 2011 5:10 AM To: Access Developers discussion and problem solving Subject: Re: [AccessD] How to tell a button's "air space" is nolonger beinghovered over Bill, Apparently, in view of special positioning of control in question, you are looking for a solution that is self contained within control's MouseMove event. You could experiment with sample code given below: ' Code in form's module '============================== ' Declarations section Private gX As Single, gY As Single '--------------------------------------------- Private Sub CmdTest_MouseMove( _ Button As Integer, _ Shift As Integer, _ X As Single, Y As Single) With Me.CmdTest Me.CmdTest.Caption = "Test (MM)" If gX <> 0 Then If (X > (0.9 * .Width) And X > gX) _ Or (X < (0.1 * .Width) And _ X < gX) Then Me.CmdTest.Caption = "Test" End If End If If gY <> 0 Then If (Y > (0.9 * .Height) And Y > gY) _ Or (Y < (0.1 * .Height) And _ Y < gY) Then Me.CmdTest.Caption = "Test" End If End If End With gX = X gY = Y End Sub '============================== Normal caption of command button named CmdTest is "Test". When mouse pointer is brought over it, the caption changes to "Test (MM)". As & when the mouse pointer moves away from the control, the caption reverts back to normal, i.e. "Test". Note: (a) MouseMove event fires in rapid-fire style. Values for X and Y returned by this event have a range from 0 upto the width and height (in twips) of the control in question. (b) The multiplying factors of 0.9 and 0.1 used in the sample code could perhaps be fine tuned further (say 0.95 and 0.05) so as to narrow down the twilight zone. However a coarser setting as adopted above, is found conducive to more consistent behavior. This is because a deliberately wild mouse sweep by the user can result in X or Y value getting truncated short of the potential maximum, even though the mouse pointer has moved out. Best wishes, A.D. Tejpal ------------ ----- Original Message ----- From: William Benson (VBACreations.Com) To: 'Access Developers discussion and problem solving' Sent: Monday, July 04, 2011 20:53 Subject: Re: [AccessD] How to tell a button's "air space" is nolonger beinghovered over A.D., Other controls are too near the button's bottom and it's top edge is pretty much as .Top = 0. I have put the code in the other controls already, similar to what you wrote. I was wondering if there was a way like to test the mousemove if the coordinates are exactly on bottom or top or at either side of the button, based on X, Y, or whatever... and if so, the caption is treated as if the mouse were outside it, and if not, use the caption that pertains to the moust being inside. During a normal mousemove operation the user will be headed out or headed into the interior of the button, so -- if on the way out, the last code to execute will be to reset the caption -- if on the way in, the code executing (probably continuously) will be to set the caption appropriate for interior of button But I don't think it is possible to get the event to faithfully fire exactly as the mouse is going over the edge of the button. Thanks a lot, Bill -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of A.D. Tejpal Sent: Monday, July 04, 2011 10:23 AM To: Access Developers discussion and problem solving Subject: Re: [AccessD] How to tell a button's "air space" is no longer beinghovered over William, For detecting whether the mouse pointer has moved away from the control in question, you can use the MouseMove event of form section to which the said control belongs, for example: ' Code in form's module '============================= Private Sub Detail_MouseMove( _ Button As Integer, Shift As Integer, _ X As Single, Y As Single) ' <> End Sub '-------------------------------------------- Private Sub FormFooter_MouseMove( _ Button As Integer, Shift As Integer, _ X As Single, Y As Single) ' <> End Sub '-------------------------------------------- Private Sub FormHeader_MouseMove( _ Button As Integer, Shift As Integer, _ X As Single, Y As Single) ' <> End Sub '============================= Best wishes, A.D. Tejpal ------------ ----- Original Message ----- From: William Benson (VBACreations.Com) To: 'Access Developers discussion and problem solving' Sent: Sunday, July 03, 2011 01:23 Subject: [AccessD] How to tell a button's "air space" is no longer beinghovered over I have some code which changes the caption of a button when the user has the ctrl key pressed, set during the mousemove event for the button. I want however, that when the user leaves the "air space" for the button, then the caption reverts - regardless whether they still have shift held. I know I can use use the mousemove event associated with all surrounding controls to reset it, but I would like something more related to the control itself. Is there a method of testing that the user has moved the mouse outside the button's air space? I have a feeling I am going to be out of luck... -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From BradM at blackforestltd.com Tue Jul 5 07:18:24 2011 From: BradM at blackforestltd.com (Brad Marks) Date: Tue, 5 Jul 2011 07:18:24 -0500 Subject: [AccessD] What is the best way to grab fields from a report detail line so that they can be accessed in VBA? References: Message-ID: Doug, Thanks for the advice. I may need to go down this path. Because of the complexity of the reports and underlying queries, I was hesitant to change the underlying queries. The idea of creating a temporary query is something that I had not considered. Thanks again, Brad -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Doug Steele Sent: Monday, July 04, 2011 8:17 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] What is the best way to grab fields from a report detail line so that they can be accessed in VBA? Brad, what I do in similar circumstances is build and save the 'Where' string in the filtering form. In code, I take the original SQL for the report recordsource and add the Where string to it. I then save this new SQL into a temporary query and export it to Excel. Doug On Mon, Jul 4, 2011 at 11:53 AM, Brad Marks wrote: > All, > > I want to grab the value of fields from report detail lines. > > Here is the method that I finally got to work. > > I open the report with a line like this... > > DoCmd.OpenReport "Report1", acViewPreview, "", "", acNormal > > I then grab the fields in the "On Print" Event > > This works, but I would like to know if this is the best method to do > this. > > ~ ~ ~ ~ > > There rest of the story... > > Here is what I am trying to accomplish. > > I have a number of Access 2007 reports that employ "dynamic filters" via > the use of "Report View" and the "Where Condition" when the report is > opened. ?In other words, the filters are applied at the report level and > not at the underlying query level. ?(There are buttons on the reports > which open up a small form that is used to collect "filter info" and > then re-open the report with the appropriate "Where Condition" based on > the "filter info") > > Now there is a need to export the report data to Excel. ?Because of the > complex nature of the reports, they do not Export very nicely to Excel > (I have tried several approaches). > > I know that I could easily export from the underlying queries to Excel, > but this type of export would not take into account the filters that are > applied at the report level. > > Therefore, to export the exact data on the reports to Excel, I have > started to experiment with grabbing the data from the report as it is > being built. ?This is not ideal, but I can't seem to find a better > method. > > Maybe others have run into this issue and have a better approach. > > Thanks for your assistance. > > Brad > > -- > 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 has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. From df.waters at comcast.net Tue Jul 5 07:45:01 2011 From: df.waters at comcast.net (Dan Waters) Date: Tue, 5 Jul 2011 07:45:01 -0500 Subject: [AccessD] Sourcegear vault free two developer license In-Reply-To: <4E12D1A4.1010809@colbyconsulting.com> References: <4E12D1A4.1010809@colbyconsulting.com> Message-ID: <001d01cc3b11$5c1bf280$1453d780$@comcast.net> Is a version control system useful for a single developer? I noticed that this offer is for 2 developers, assuming that it would help more than one developer. -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Tuesday, July 05, 2011 3:56 AM To: Access Developers discussion and problem solving; VBA; Sqlserver-Dba Subject: [AccessD] Sourcegear vault free two developer license I ran across this today. http://www.sqlservercentral.com/articles/Red+Gate+Software/74579/ http://promotions.sourcegear.com/vouchers/new/ -- John W. Colby www.ColbyConsulting.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From jwcolby at colbyconsulting.com Tue Jul 5 08:46:08 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Tue, 05 Jul 2011 09:46:08 -0400 Subject: [AccessD] Sourcegear vault free two developer license In-Reply-To: <001d01cc3b11$5c1bf280$1453d780$@comcast.net> References: <4E12D1A4.1010809@colbyconsulting.com> <001d01cc3b11$5c1bf280$1453d780$@comcast.net> Message-ID: <4E1315A0.1010005@colbyconsulting.com> http://en.wikipedia.org/wiki/Revision_control John W. Colby www.ColbyConsulting.com On 7/5/2011 8:45 AM, Dan Waters wrote: > Is a version control system useful for a single developer? I noticed that > this offer is for 2 developers, assuming that it would help more than one > developer. > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby > Sent: Tuesday, July 05, 2011 3:56 AM > To: Access Developers discussion and problem solving; VBA; Sqlserver-Dba > Subject: [AccessD] Sourcegear vault free two developer license > > I ran across this today. > > http://www.sqlservercentral.com/articles/Red+Gate+Software/74579/ > http://promotions.sourcegear.com/vouchers/new/ > From charlotte.foust at gmail.com Tue Jul 5 09:54:05 2011 From: charlotte.foust at gmail.com (Charlotte Foust) Date: Tue, 5 Jul 2011 07:54:05 -0700 Subject: [AccessD] Sourcegear vault free two developer license In-Reply-To: <001d01cc3b11$5c1bf280$1453d780$@comcast.net> References: <4E12D1A4.1010809@colbyconsulting.com> <001d01cc3b11$5c1bf280$1453d780$@comcast.net> Message-ID: Yes it is, especially SourceGear Vault. Vault allows you to maintain multiple versions of an application, so you can try something out and then roll back just one part of it if your brilliant idea for something falls on its face. It is very similar in usage to SourceSafe but it has some nifty features that make it well worthwhile. Charlotte Foust On Tue, Jul 5, 2011 at 5:45 AM, Dan Waters wrote: > Is a version control system useful for a single developer? I noticed that > this offer is for 2 developers, assuming that it would help more than one > developer. > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby > Sent: Tuesday, July 05, 2011 3:56 AM > To: Access Developers discussion and problem solving; VBA; Sqlserver-Dba > Subject: [AccessD] Sourcegear vault free two developer license > > I ran across this today. > > http://www.sqlservercentral.com/articles/Red+Gate+Software/74579/ > > > http://promotions.sourcegear.com/vouchers/new/ > > > > -- > John W. Colby > www.ColbyConsulting.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 jwcolby at colbyconsulting.com Tue Jul 5 10:52:37 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Tue, 05 Jul 2011 11:52:37 -0400 Subject: [AccessD] Sourcegear vault free two developer license In-Reply-To: References: <4E12D1A4.1010809@colbyconsulting.com> <001d01cc3b11$5c1bf280$1453d780$@comcast.net> Message-ID: <4E133345.2060102@colbyconsulting.com> Does anyone have it working with Access? John W. Colby www.ColbyConsulting.com On 7/5/2011 10:54 AM, Charlotte Foust wrote: > Yes it is, especially SourceGear Vault. Vault allows you to maintain > multiple versions of an application, so you can try something out and then > roll back just one part of it if your brilliant idea for something falls on > its face. It is very similar in usage to SourceSafe but it has some nifty > features that make it well worthwhile. > > Charlotte Foust > > On Tue, Jul 5, 2011 at 5:45 AM, Dan Waters wrote: > >> Is a version control system useful for a single developer? I noticed that >> this offer is for 2 developers, assuming that it would help more than one >> developer. >> >> -----Original Message----- >> From: accessd-bounces at databaseadvisors.com >> [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby >> Sent: Tuesday, July 05, 2011 3:56 AM >> To: Access Developers discussion and problem solving; VBA; Sqlserver-Dba >> Subject: [AccessD] Sourcegear vault free two developer license >> >> I ran across this today. >> >> http://www.sqlservercentral.com/articles/Red+Gate+Software/74579/ >> >> >> http://promotions.sourcegear.com/vouchers/new/ >> >> >> >> -- >> John W. Colby >> www.ColbyConsulting.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 charlotte.foust at gmail.com Tue Jul 5 10:59:25 2011 From: charlotte.foust at gmail.com (Charlotte Foust) Date: Tue, 5 Jul 2011 08:59:25 -0700 Subject: [AccessD] Sourcegear vault free two developer license In-Reply-To: <4E133345.2060102@colbyconsulting.com> References: <4E12D1A4.1010809@colbyconsulting.com> <001d01cc3b11$5c1bf280$1453d780$@comcast.net> <4E133345.2060102@colbyconsulting.com> Message-ID: I believe there is a widget you need, a bit like the one for SourceSafe, in order to make it work as you might expect with Access, but we only used it with .Net, so I'm not a definitive source for that answer. Charlotte Foust On Tue, Jul 5, 2011 at 8:52 AM, jwcolby wrote: > Does anyone have it working with Access? > > > John W. Colby > www.ColbyConsulting.com > > > > On 7/5/2011 10:54 AM, Charlotte Foust wrote: > >> Yes it is, especially SourceGear Vault. Vault allows you to maintain >> multiple versions of an application, so you can try something out and then >> roll back just one part of it if your brilliant idea for something falls >> on >> its face. It is very similar in usage to SourceSafe but it has some nifty >> features that make it well worthwhile. >> >> Charlotte Foust >> >> On Tue, Jul 5, 2011 at 5:45 AM, Dan Waters wrote: >> >> Is a version control system useful for a single developer? I noticed >>> that >>> this offer is for 2 developers, assuming that it would help more than one >>> developer. >>> >>> -----Original Message----- >>> From: accessd-bounces@**databaseadvisors.com >>> [mailto:accessd-bounces@**databaseadvisors.com] >>> On Behalf Of jwcolby >>> Sent: Tuesday, July 05, 2011 3:56 AM >>> To: Access Developers discussion and problem solving; VBA; Sqlserver-Dba >>> Subject: [AccessD] Sourcegear vault free two developer license >>> >>> I ran across this today. >>> >>> http://www.sqlservercentral.**com/articles/Red+Gate+**Software/74579/ >>> >>> >>> >>> >>> http://promotions.sourcegear.**com/vouchers/new/ >>> >>> >>> >>> >>> >>> -- >>> John W. Colby >>> www.ColbyConsulting.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 EdTesiny at oasas.ny.gov Tue Jul 5 12:09:56 2011 From: EdTesiny at oasas.ny.gov (Tesiny, Ed) Date: Tue, 5 Jul 2011 13:09:56 -0400 Subject: [AccessD] Emailing an .mde Message-ID: Hi All, I'm trying to email a database frontend, of course our system blocks it. Is there an extension that is fairly neutral, I tried .doc with one person last week and that worked but it isn't working with the person I trying to distribute to today. Any suggestions? TIA Ed Edward P. Tesiny Director of Evaluation and Outcomes Management New York State OASAS 1450 Western Avenue Albany, NY 12203 Phone: (518) 485-2322 Fax: (518) 485-5228 EdTesiny at oasas.ny.gov IMPORTANT: This E-mail may contain confidential material for the sole use of the intended recipient. The use, distribution, transmittal or re-transmittal by an unintended recipient of any communication is prohibited without our express approval in writing or by e-mail. Any use, distribution, transmittal or re-transmittal by persons who are not intended recipients of this e-mail may be a violation of law and is strictly prohibited. If you are not the intended recipient please contact the sender and delete all copies. E-mail transmission cannot be guaranteed to be secure or error-free. The sender therefore does not accept liability for any errors or omissions in the contents of this transmission. All e-mails sent to or from NYS OASAS are to be used for our business purposes only. E-mails sent from or to NYS OASAS are subject to review by the Agency. From jimdettman at verizon.net Tue Jul 5 12:23:46 2011 From: jimdettman at verizon.net (Jim Dettman) Date: Tue, 05 Jul 2011 13:23:46 -0400 Subject: [AccessD] Emailing an .mde In-Reply-To: References: Message-ID: <7DEE0381D70E4361A351C1E6B4625F24@XPS> Ed, .ed Jim. -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Tesiny, Ed Sent: Tuesday, July 05, 2011 01:10 PM To: Access Developers discussion and problem solving; Off Topic Subject: [AccessD] Emailing an .mde Hi All, I'm trying to email a database frontend, of course our system blocks it. Is there an extension that is fairly neutral, I tried .doc with one person last week and that worked but it isn't working with the person I trying to distribute to today. Any suggestions? TIA Ed Edward P. Tesiny Director of Evaluation and Outcomes Management New York State OASAS 1450 Western Avenue Albany, NY 12203 Phone: (518) 485-2322 Fax: (518) 485-5228 EdTesiny at oasas.ny.gov IMPORTANT: This E-mail may contain confidential material for the sole use of the intended recipient. The use, distribution, transmittal or re-transmittal by an unintended recipient of any communication is prohibited without our express approval in writing or by e-mail. Any use, distribution, transmittal or re-transmittal by persons who are not intended recipients of this e-mail may be a violation of law and is strictly prohibited. If you are not the intended recipient please contact the sender and delete all copies. E-mail transmission cannot be guaranteed to be secure or error-free. The sender therefore does not accept liability for any errors or omissions in the contents of this transmission. All e-mails sent to or from NYS OASAS are to be used for our business purposes only. E-mails sent from or to NYS OASAS are subject to review by the Agency. -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From fuller.artful at gmail.com Tue Jul 5 13:04:16 2011 From: fuller.artful at gmail.com (Arthur Fuller) Date: Tue, 5 Jul 2011 14:04:16 -0400 Subject: [AccessD] Emailing an .mde In-Reply-To: References: Message-ID: Just rename it to MyFile.mdee and tell the recipient to name it back upon receipt. HTH. Arthur On Tue, Jul 5, 2011 at 1:09 PM, Tesiny, Ed wrote: > Hi All, > > I'm trying to email a database frontend, of course our system blocks it. > Is there an extension that is fairly neutral, I tried .doc with one > person last week and that worked but it isn't working with the person I > trying to distribute to today. Any suggestions? > > TIA > > Ed > > > > Edward P. Tesiny > > Director of Evaluation and Outcomes Management > > New York State OASAS > > 1450 Western Avenue > > Albany, NY 12203 > > Phone: (518) 485-2322 > > Fax: (518) 485-5228 > > EdTesiny at oasas.ny.gov > > > > IMPORTANT: This E-mail may contain confidential material for the sole > use of the intended recipient. The use, distribution, transmittal or > re-transmittal by an unintended recipient of any communication is > prohibited without our express approval in writing or by e-mail. Any > use, distribution, transmittal or re-transmittal by persons who are not > intended recipients of this e-mail may be a violation of law and is > strictly prohibited. If you are not the intended recipient please > contact the sender and delete all copies. E-mail transmission cannot be > guaranteed to be secure or error-free. The sender therefore does not > accept liability for any errors or omissions in the contents of this > transmission. All e-mails sent to or from NYS OASAS are to be used for > our business purposes only. E-mails sent from or to NYS OASAS are > subject to review by the Agency. > > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > From fuller.artful at gmail.com Tue Jul 5 13:06:09 2011 From: fuller.artful at gmail.com (Arthur Fuller) Date: Tue, 5 Jul 2011 14:06:09 -0400 Subject: [AccessD] Sourcegear vault free two developer license In-Reply-To: <001d01cc3b11$5c1bf280$1453d780$@comcast.net> References: <4E12D1A4.1010809@colbyconsulting.com> <001d01cc3b11$5c1bf280$1453d780$@comcast.net> Message-ID: Since I've completely eliminated all my programming errors and second thoughts, I no longer need version control. LOL. I need Developer Control. A. On Tue, Jul 5, 2011 at 8:45 AM, Dan Waters wrote: > Is a version control system useful for a single developer? I noticed that > this offer is for 2 developers, assuming that it would help more than one > developer. > > From adtp at airtelmail.in Tue Jul 5 13:07:22 2011 From: adtp at airtelmail.in (A.D. Tejpal) Date: Tue, 5 Jul 2011 23:37:22 +0530 Subject: [AccessD] How to tell a button's "air space"is nolonger beinghovered over References: <003b01cc38f1$b62edca0$228c95e0$@gmail.com><471F6C8DAB244C66B0AB79536085B3EC@personal4a8ede> <002001cc3a5e$5428d240$fc7a76c0$@gmail.com><8DD6228312434CD0940AE4E4807C4FF6@personal4a8ede> <001201cc3b0b$40feef30$c2fccd90$@gmail.com> Message-ID: You are most welcome Bill! ps: Last month you were seeking a solution for synchronized scrolling of a pair of subforms. Does the problem stand resolved ? Best wishes, A.D. Tejpal ------------ ----- Original Message ----- From: William Benson (VBACreations.Com) To: 'Access Developers discussion and problem solving' Sent: Tuesday, July 05, 2011 17:31 Subject: Re: [AccessD] How to tell a button's "air space"is nolonger beinghovered over I tried your code A.D., it works pretty well. It occasionally misses when the button's edge is near the top (but not at the top) of its section and when another control is near the button's edge.. But it's great, thank you. -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of A.D. Tejpal Sent: Tuesday, July 05, 2011 5:10 AM To: Access Developers discussion and problem solving Subject: Re: [AccessD] How to tell a button's "air space" is nolonger beinghovered over Bill, Apparently, in view of special positioning of control in question, you are looking for a solution that is self contained within control's MouseMove event. You could experiment with sample code given below: ' Code in form's module '============================== ' Declarations section Private gX As Single, gY As Single '--------------------------------------------- Private Sub CmdTest_MouseMove( _ Button As Integer, _ Shift As Integer, _ X As Single, Y As Single) With Me.CmdTest Me.CmdTest.Caption = "Test (MM)" If gX <> 0 Then If (X > (0.9 * .Width) And X > gX) _ Or (X < (0.1 * .Width) And _ X < gX) Then Me.CmdTest.Caption = "Test" End If End If If gY <> 0 Then If (Y > (0.9 * .Height) And Y > gY) _ Or (Y < (0.1 * .Height) And _ Y < gY) Then Me.CmdTest.Caption = "Test" End If End If End With gX = X gY = Y End Sub '============================== Normal caption of command button named CmdTest is "Test". When mouse pointer is brought over it, the caption changes to "Test (MM)". As & when the mouse pointer moves away from the control, the caption reverts back to normal, i.e. "Test". Note: (a) MouseMove event fires in rapid-fire style. Values for X and Y returned by this event have a range from 0 upto the width and height (in twips) of the control in question. (b) The multiplying factors of 0.9 and 0.1 used in the sample code could perhaps be fine tuned further (say 0.95 and 0.05) so as to narrow down the twilight zone. However a coarser setting as adopted above, is found conducive to more consistent behavior. This is because a deliberately wild mouse sweep by the user can result in X or Y value getting truncated short of the potential maximum, even though the mouse pointer has moved out. Best wishes, A.D. Tejpal ------------ From dw-murphy at cox.net Tue Jul 5 13:23:02 2011 From: dw-murphy at cox.net (Doug Murphy) Date: Tue, 5 Jul 2011 11:23:02 -0700 Subject: [AccessD] Emailing an .mde In-Reply-To: References: Message-ID: <004701cc3b40$936642c0$ba32c840$@cox.net> Ed, My approach is to zip the file. Most email systems accept zipped files. The challenge is to make sure the person receiving the file actually unzips it instead of trying to run it from Windows explorer while in the zipped format. Doug -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Tesiny, Ed Sent: Tuesday, July 05, 2011 10:10 AM To: Access Developers discussion and problem solving; Off Topic Subject: [AccessD] Emailing an .mde Hi All, I'm trying to email a database frontend, of course our system blocks it. Is there an extension that is fairly neutral, I tried .doc with one person last week and that worked but it isn't working with the person I trying to distribute to today. Any suggestions? TIA Ed Edward P. Tesiny Director of Evaluation and Outcomes Management New York State OASAS 1450 Western Avenue Albany, NY 12203 Phone: (518) 485-2322 Fax: (518) 485-5228 EdTesiny at oasas.ny.gov IMPORTANT: This E-mail may contain confidential material for the sole use of the intended recipient. The use, distribution, transmittal or re-transmittal by an unintended recipient of any communication is prohibited without our express approval in writing or by e-mail. Any use, distribution, transmittal or re-transmittal by persons who are not intended recipients of this e-mail may be a violation of law and is strictly prohibited. If you are not the intended recipient please contact the sender and delete all copies. E-mail transmission cannot be guaranteed to be secure or error-free. The sender therefore does not accept liability for any errors or omissions in the contents of this transmission. All e-mails sent to or from NYS OASAS are to be used for our business purposes only. E-mails sent from or to NYS OASAS are subject to review by the Agency. -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From dbdoug at gmail.com Tue Jul 5 13:34:36 2011 From: dbdoug at gmail.com (Doug Steele) Date: Tue, 5 Jul 2011 11:34:36 -0700 Subject: [AccessD] Emailing an .mde In-Reply-To: <004701cc3b40$936642c0$ba32c840$@cox.net> References: <004701cc3b40$936642c0$ba32c840$@cox.net> Message-ID: Exchange Server can be configured to look inside a .zip archive and delete any 'dangerous' files. My solution to this problem is to upload the file Box.net and email a link to the file so the user can download it directly. Doug On Tue, Jul 5, 2011 at 11:23 AM, Doug Murphy wrote: > Ed, > > My approach is to zip the file. Most email systems accept zipped files. The > challenge is to make sure the person receiving the file actually unzips it > instead of trying to run it from Windows explorer while in the zipped > format. > > Doug > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Tesiny, Ed > Sent: Tuesday, July 05, 2011 10:10 AM > To: Access Developers discussion and problem solving; Off Topic > Subject: [AccessD] Emailing an .mde > > Hi All, > > I'm trying to email a database frontend, of course our system blocks it. > Is there an extension that is fairly neutral, I tried .doc with one person > last week and that worked but it isn't working with the person I trying to > distribute to today. ?Any suggestions? > > TIA > > Ed > > > > Edward P. Tesiny > > Director of Evaluation and Outcomes Management > > New York State OASAS > > 1450 Western Avenue > > Albany, NY 12203 > > Phone: ?(518) 485-2322 > > Fax: ?(518) 485-5228 > > EdTesiny at oasas.ny.gov > > > > IMPORTANT: ?This E-mail may contain confidential material for the sole use > of the intended recipient. ?The use, distribution, transmittal or > re-transmittal by an unintended recipient of any communication is prohibited > without our express approval in writing or by e-mail. ?Any use, > distribution, transmittal or re-transmittal by persons who are not intended > recipients of this e-mail may be a violation of law and is > strictly prohibited. ? If you are not the intended recipient please > contact the sender and delete all copies. ?E-mail transmission cannot be > guaranteed to be secure or error-free. ? The sender therefore does not > accept liability for any errors or omissions in the contents of this > transmission. ? All e-mails sent to or from NYS OASAS are to be used for > our business purposes only. ?E-mails sent from or to NYS OASAS are subject > to review by the Agency. > > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > From fuller.artful at gmail.com Tue Jul 5 13:36:26 2011 From: fuller.artful at gmail.com (Arthur Fuller) Date: Tue, 5 Jul 2011 14:36:26 -0400 Subject: [AccessD] Emailing an .mde In-Reply-To: <004701cc3b40$936642c0$ba32c840$@cox.net> References: <004701cc3b40$936642c0$ba32c840$@cox.net> Message-ID: Some email systems look inside sent zips to verify that they don't contain executables. That's why I rename the file. Typically I then zip the renamed file and plonk in a readme that tells the recipient to rename it back. A. On Tue, Jul 5, 2011 at 2:23 PM, Doug Murphy wrote: > Ed, > > My approach is to zip the file. Most email systems accept zipped files. The > challenge is to make sure the person receiving the file actually unzips it > instead of trying to run it from Windows explorer while in the zipped > format. > > Doug > From DWUTKA at Marlow.com Tue Jul 5 13:45:11 2011 From: DWUTKA at Marlow.com (Drew Wutka) Date: Tue, 5 Jul 2011 13:45:11 -0500 Subject: [AccessD] Walk the DB Using ADO In-Reply-To: References: Message-ID: Sorry I don't have this code exactly as you have here. But what you need to do is actually all in recordsets. You use a SCHEMA query to get the list of tables (you can get columns this way if you want, too). And then you use properties of the field to get other values (like field name, value, constraints, etc). Drew -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Arthur Fuller Sent: Saturday, July 02, 2011 12:06 PM To: Access Developers discussion and problem solving Subject: [AccessD] Walk the DB Using ADO I know that I've written this code before, but due to a plethora of backup CDs and my habit of pruning what is not currently necessary from the current situation(s), I can't find the relevant code. And besides, I'm currently semi-retired, and working in hobbyist most not billable mode. Here's what I need, in ADO format if possible: For each t in CurrentDB( Tables ) For each f in t.fields For each a in f.Attributes ' could be Properties not Attributes Debug.Print a.Name, a.Value Next Next Next TIA, Arthur P.S. For years and years and years, I have used Rick Fisher's FindAndReplace, but now it's failing on me due to (I think) the fact that I'm running a 64-bit Windows, which doesn't like what he offers to install. In my retirement mode, I cannot afford to purchase more software. Maybe I could run a Windows 32-bit version of everything, then run F&R, then do what I need to do, then import the results back into 64-bit. Yuck. -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com The information contained in this transmission is intended only for the person or entity to which it is addressed and may contain II-VI Proprietary and/or II-VI Business Sensitive material. If you are not the intended recipient, please contact the sender immediately and destroy the material in its entirety, whether electronic or hard copy. You are notified that any review, retransmission, copying, disclosure, dissemination, or other use of, or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. From dw-murphy at cox.net Tue Jul 5 13:57:08 2011 From: dw-murphy at cox.net (Doug Murphy) Date: Tue, 5 Jul 2011 11:57:08 -0700 Subject: [AccessD] Emailing an .mde In-Reply-To: References: <004701cc3b40$936642c0$ba32c840$@cox.net> Message-ID: <005a01cc3b45$5716b570$05442050$@cox.net> The zip file works with most email systems. The only one that seemed to look inside the zip file, in my limited experience, is Gmail. For that system I just reverse the extension piz. Even Gmail seems to accept the Access files now, but maybe they have not entered accdb in their system yet. I zip all files I email just to reduce size. For large files I use USendIt. -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Arthur Fuller Sent: Tuesday, July 05, 2011 11:36 AM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Emailing an .mde Some email systems look inside sent zips to verify that they don't contain executables. That's why I rename the file. Typically I then zip the renamed file and plonk in a readme that tells the recipient to rename it back. A. On Tue, Jul 5, 2011 at 2:23 PM, Doug Murphy wrote: > Ed, > > My approach is to zip the file. Most email systems accept zipped > files. The challenge is to make sure the person receiving the file > actually unzips it instead of trying to run it from Windows explorer > while in the zipped format. > > Doug > -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From jwcolby at colbyconsulting.com Tue Jul 5 13:59:13 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Tue, 05 Jul 2011 14:59:13 -0400 Subject: [AccessD] Sourcegear vault free two developer license In-Reply-To: References: <4E12D1A4.1010809@colbyconsulting.com> <001d01cc3b11$5c1bf280$1453d780$@comcast.net> Message-ID: <4E135F01.4010505@colbyconsulting.com> LOL. Why didn't I think of that? All that time wasted. John W. Colby www.ColbyConsulting.com On 7/5/2011 2:06 PM, Arthur Fuller wrote: > Since I've completely eliminated all my programming errors and second > thoughts, I no longer need version control. LOL. I need Developer Control. > > A. > > On Tue, Jul 5, 2011 at 8:45 AM, Dan Waters wrote: > >> Is a version control system useful for a single developer? I noticed that >> this offer is for 2 developers, assuming that it would help more than one >> developer. >> >> From vbacreations at gmail.com Tue Jul 5 14:02:23 2011 From: vbacreations at gmail.com (William Benson (VBACreations.Com)) Date: Tue, 5 Jul 2011 15:02:23 -0400 Subject: [AccessD] Walk the DB Using ADO In-Reply-To: References: Message-ID: <001901cc3b46$133212e0$399638a0$@gmail.com> >> that I'm running a 64-bit Windows Need that in retirement mode eh? :-) -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Arthur Fuller Sent: Saturday, July 02, 2011 1:06 PM To: Access Developers discussion and problem solving Subject: [AccessD] Walk the DB Using ADO I know that I've written this code before, but due to a plethora of backup CDs and my habit of pruning what is not currently necessary from the current situation(s), I can't find the relevant code. And besides, I'm currently semi-retired, and working in hobbyist most not billable mode. Here's what I need, in ADO format if possible: For each t in CurrentDB( Tables ) For each f in t.fields For each a in f.Attributes ' could be Properties not Attributes Debug.Print a.Name, a.Value Next Next Next TIA, Arthur P.S. For years and years and years, I have used Rick Fisher's FindAndReplace, but now it's failing on me due to (I think) the fact that I'm running a 64-bit Windows, which doesn't like what he offers to install. In my retirement mode, I cannot afford to purchase more software. Maybe I could run a Windows 32-bit version of everything, then run F&R, then do what I need to do, then import the results back into 64-bit. Yuck. -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From EdTesiny at oasas.ny.gov Tue Jul 5 14:48:32 2011 From: EdTesiny at oasas.ny.gov (Tesiny, Ed) Date: Tue, 5 Jul 2011 15:48:32 -0400 Subject: [AccessD] Emailing an .mde In-Reply-To: <005a01cc3b45$5716b570$05442050$@cox.net> References: <004701cc3b40$936642c0$ba32c840$@cox.net> <005a01cc3b45$5716b570$05442050$@cox.net> Message-ID: I got the mde on her desktop but can't map here to the right folder. I think IT needs to fix her permissions...but they have been a little busy as our building was hit by lightening on Sunday morning. :-( Ed Tesiny EdTesiny at oasas.ny.gov -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Doug Murphy Sent: Tuesday, July 05, 2011 2:57 PM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Emailing an .mde The zip file works with most email systems. The only one that seemed to look inside the zip file, in my limited experience, is Gmail. For that system I just reverse the extension piz. Even Gmail seems to accept the Access files now, but maybe they have not entered accdb in their system yet. I zip all files I email just to reduce size. For large files I use USendIt. -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Arthur Fuller Sent: Tuesday, July 05, 2011 11:36 AM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Emailing an .mde Some email systems look inside sent zips to verify that they don't contain executables. That's why I rename the file. Typically I then zip the renamed file and plonk in a readme that tells the recipient to rename it back. A. On Tue, Jul 5, 2011 at 2:23 PM, Doug Murphy wrote: > Ed, > > My approach is to zip the file. Most email systems accept zipped > files. The challenge is to make sure the person receiving the file > actually unzips it instead of trying to run it from Windows explorer > while in the zipped format. > > Doug > -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From fuller.artful at gmail.com Tue Jul 5 14:57:57 2011 From: fuller.artful at gmail.com (Arthur Fuller) Date: Tue, 5 Jul 2011 15:57:57 -0400 Subject: [AccessD] Walk the DB Using ADO In-Reply-To: References: Message-ID: Thanks, Drew. I'll give that a shot. It's been a while since I looked carefully at the ADO model for other than typical recordset operations.. I seem to recall that somewhere I have a diagram of it, and even a DAO->ADO conversion chart. Time to start perusing the documents directories. A. On Tue, Jul 5, 2011 at 2:45 PM, Drew Wutka wrote: > Sorry I don't have this code exactly as you have here. But what you > need to do is actually all in recordsets. > > You use a SCHEMA query to get the list of tables (you can get columns > this way if you want, too). And then you use properties of the field to > get other values (like field name, value, constraints, etc). > > Drew > > From DWUTKA at Marlow.com Tue Jul 5 15:07:59 2011 From: DWUTKA at Marlow.com (Drew Wutka) Date: Tue, 5 Jul 2011 15:07:59 -0500 Subject: [AccessD] Walk the DB Using ADO In-Reply-To: References: Message-ID: Would you like me to send my VB6 Add-on to you off list, which lets me create 'data classes'? It has code to pull the tables and fields from a data source using ADO. Drew -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Arthur Fuller Sent: Tuesday, July 05, 2011 2:58 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Walk the DB Using ADO Thanks, Drew. I'll give that a shot. It's been a while since I looked carefully at the ADO model for other than typical recordset operations.. I seem to recall that somewhere I have a diagram of it, and even a DAO->ADO conversion chart. Time to start perusing the documents directories. A. On Tue, Jul 5, 2011 at 2:45 PM, Drew Wutka wrote: > Sorry I don't have this code exactly as you have here. But what you > need to do is actually all in recordsets. > > You use a SCHEMA query to get the list of tables (you can get columns > this way if you want, too). And then you use properties of the field to > get other values (like field name, value, constraints, etc). > > Drew > > -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com The information contained in this transmission is intended only for the person or entity to which it is addressed and may contain II-VI Proprietary and/or II-VI Business Sensitive material. If you are not the intended recipient, please contact the sender immediately and destroy the material in its entirety, whether electronic or hard copy. You are notified that any review, retransmission, copying, disclosure, dissemination, or other use of, or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. From fuller.artful at gmail.com Tue Jul 5 15:14:47 2011 From: fuller.artful at gmail.com (Arthur Fuller) Date: Tue, 5 Jul 2011 16:14:47 -0400 Subject: [AccessD] Walk the DB Using ADO In-Reply-To: References: Message-ID: Does it require that I have VB6 installed? I suppose I could do that, but at the moment I have only the .NET stuff installed. Sounds like a good add-in, though. A. On Tue, Jul 5, 2011 at 4:07 PM, Drew Wutka wrote: > Would you like me to send my VB6 Add-on to you off list, which lets me > create 'data classes'? It has code to pull the tables and fields from a > data source using ADO. > > Drew > From DWUTKA at Marlow.com Tue Jul 5 15:25:33 2011 From: DWUTKA at Marlow.com (Drew Wutka) Date: Tue, 5 Jul 2011 15:25:33 -0500 Subject: [AccessD] Walk the DB Using ADO In-Reply-To: References: Message-ID: Think I can do this in list. Here are the three relevant functions you should be able to get what you need from them. Private Sub lstTables_Click() Dim cnn As ADODB.Connection Dim rs As ADODB.Recordset Dim i As Long Me.lstFields.Clear If DBConnect(cnn) Then Set rs = New ADODB.Recordset rs.Open Me.lstTables.List(Me.lstTables.ListIndex), cnn, adOpenKeyset, adLockReadOnly, adCmdTableDirect For i = 0 To rs.Fields.Count - 1 Me.lstFields.AddItem rs.Fields(i).Name Next i rs.Close Set rs = Nothing cnn.Close Set cnn = Nothing End If End Sub Function GetDBTables() On Error GoTo ErrorHandler Dim cnn As ADODB.Connection Dim rs As ADODB.Recordset If DBConnect(cnn) Then Set rs = cnn.OpenSchema(adSchemaTables) Me.lstTables.Clear rs.MoveFirst Do Until rs.EOF = True If Me.optTables Then If rs.Fields("TABLE_TYPE") = "TABLE" Then Me.lstTables.AddItem rs.Fields("TABLE_NAME") Else If rs.Fields("TABLE_TYPE") = "VIEW" Then Me.lstTables.AddItem rs.Fields("TABLE_NAME") End If rs.MoveNext Loop rs.Close Set rs = Nothing cnn.Close Set cnn = Nothing End If Exit Function ErrorHandler: Err.Clear End Function Function DBConnect(ByRef cnn As ADODB.Connection) As Boolean On Error GoTo ErrorHandler Set cnn = New ADODB.Connection cnn.Provider = "Microsoft.Jet.OLEDB.4.0" If Dir(Me.txtWorkGroupPath) <> "" Then cnn.Properties("Jet OLEDB:System database").Value = Me.txtWorkGroupPath cnn.Open Me.txtDBPath, Me.txtUserName, Me.txtPassword Else cnn.Open Me.txtDBPath End If DBConnect = True Exit Function ErrorHandler: Err.Clear DBConnect = False End Function -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Arthur Fuller Sent: Tuesday, July 05, 2011 3:15 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Walk the DB Using ADO Does it require that I have VB6 installed? I suppose I could do that, but at the moment I have only the .NET stuff installed. Sounds like a good add-in, though. A. On Tue, Jul 5, 2011 at 4:07 PM, Drew Wutka wrote: > Would you like me to send my VB6 Add-on to you off list, which lets me > create 'data classes'? It has code to pull the tables and fields from a > data source using ADO. > > Drew > -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com The information contained in this transmission is intended only for the person or entity to which it is addressed and may contain II-VI Proprietary and/or II-VI Business Sensitive material. If you are not the intended recipient, please contact the sender immediately and destroy the material in its entirety, whether electronic or hard copy. You are notified that any review, retransmission, copying, disclosure, dissemination, or other use of, or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. From fuller.artful at gmail.com Tue Jul 5 15:28:14 2011 From: fuller.artful at gmail.com (Arthur Fuller) Date: Tue, 5 Jul 2011 16:28:14 -0400 Subject: [AccessD] "Modern" replacement for CommonDlg Message-ID: I may have asked this before; if so, please forgive the redundancy. I've got an old app that I'm sprucing up with A2K7 to run on Windows 7. Some code I lifted from the ADH musketeers no longer works. It seems that the CommonDlg thingie has vanished. I need essentially that functionality, but that works in A2K7 and A2K10: It opens the Windows Open/Save dialog with a bunch of arguments: Public Function adhCommonFileOpenSave( _ Optional ByRef Flags As adhFileOpenConstants = 0, _ Optional ByVal Filter As String = "", _ Optional ByVal FilterIndex As Long = 1, _ Optional ByVal DefaultExt As String = "", _ Optional ByVal FileName As String = "", _ Optional ByVal DialogTitle As String = "", _ Optional ByVal InitDir As String = "", _ Optional ByVal hwndOwner As Long = 0, _ Optional ByVal OpenFile As Boolean = True) As String In a couple of places in the app, I need to ask the user for the directory in which to save this file, or alternatively, the directory to associate with the selected Customer and|or Project. Any suggestions or code to do this? I want to attach it to a button and have the dialog open on the the specified initial directory, then allow creation of a new subdir beneath that, and ultimately return the final directory name. TIA, Arthur From stuart at lexacorp.com.pg Tue Jul 5 15:54:31 2011 From: stuart at lexacorp.com.pg (Stuart McLachlan) Date: Wed, 06 Jul 2011 06:54:31 +1000 Subject: [AccessD] [dba-OT] Emailing an .mde In-Reply-To: References: Message-ID: <4E137A07.1549.21A7C35E@stuart.lexacorp.com.pg> I normally zip and files that i need to email and rename them as .piz On 5 Jul 2011 at 13:09, Tesiny, Ed wrote: > Hi All, > > I'm trying to email a database frontend, of course our system blocks > it. Is there an extension that is fairly neutral, I tried .doc with > one person last week and that worked but it isn't working with the > person I trying to distribute to today. Any suggestions? > > TIA > > Ed > > > > Edward P. Tesiny > > Director of Evaluation and Outcomes Management > > New York State OASAS > > 1450 Western Avenue > > Albany, NY 12203 > > Phone: (518) 485-2322 > > Fax: (518) 485-5228 > > EdTesiny at oasas.ny.gov > > > > IMPORTANT: This E-mail may contain confidential material for the sole > use of the intended recipient. The use, distribution, transmittal or > re-transmittal by an unintended recipient of any communication is > prohibited without our express approval in writing or by e-mail. Any > use, distribution, transmittal or re-transmittal by persons who are > not intended recipients of this e-mail may be a violation of law and > is strictly prohibited. If you are not the intended recipient please > contact the sender and delete all copies. E-mail transmission cannot > be guaranteed to be secure or error-free. The sender therefore does > not accept liability for any errors or omissions in the contents of > this transmission. All e-mails sent to or from NYS OASAS are to be > used for our business purposes only. E-mails sent from or to NYS > OASAS are subject to review by the Agency. > > > > _______________________________________________ > dba-OT mailing list > dba-OT at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-ot > Website: http://www.databaseadvisors.com > From stuart at lexacorp.com.pg Tue Jul 5 16:01:03 2011 From: stuart at lexacorp.com.pg (Stuart McLachlan) Date: Wed, 06 Jul 2011 07:01:03 +1000 Subject: [AccessD] "Modern" replacement for CommonDlg In-Reply-To: References: Message-ID: <4E137B8F.24761.21ADBC5C@stuart.lexacorp.com.pg> Here' ya go, I'm sure I've posted this a few times in the past. Declare Function GetOpenFileName Lib "comdlg32.dll" Alias _ "GetOpenFileNameA" (pOpenfilename As OPENFILENAME) As Long Type OPENFILENAME lStructSize As Long hwndOwner As Long hInstance As Long lpstrFilter As String lpstrCustomFilter As String nMaxCustFilter As Long nFilterIndex As Long lpstrFile As String nMaxFile As Long lpstrFileTitle As String nMaxFileTitle As Long lpstrInitialDir As String lpstrTitle As String flags As Long nFileOffset As Integer nFileExtension As Integer lpstrDefExt As String lCustData As Long lpfnHook As Long lpTemplateName As String End Type Function GetFileName(Directory As String) As String Dim OpenFile As OPENFILENAME Dim lReturn As Long Dim sFilter As String OpenFile.lStructSize = Len(OpenFile) OpenFile.hwndOwner = 0 OpenFile.hInstance = 0 sFilter = "" & Chr(0) OpenFile.lpstrFilter = sFilter OpenFile.nFilterIndex = 0 OpenFile.lpstrFile = String(257, 0) OpenFile.nMaxFile = Len(OpenFile.lpstrFile) - 1 OpenFile.lpstrFileTitle = OpenFile.lpstrFile OpenFile.nMaxFileTitle = OpenFile.nMaxFile OpenFile.lpstrInitialDir = Directory OpenFile.lpstrTitle = "Select File" OpenFile.flags = 0 lReturn = GetOpenFileName(OpenFile) GetFileName = Left$(OpenFile.lpstrFile, InStr(OpenFile.lpstrFile, Chr$(0)) - 1) End Function On 5 Jul 2011 at 16:28, Arthur Fuller wrote: > I may have asked this before; if so, please forgive the redundancy. > I've got an old app that I'm sprucing up with A2K7 to run on Windows > 7. Some code I lifted from the ADH musketeers no longer works. It > seems that the CommonDlg thingie has vanished. > > I need essentially that functionality, but that works in A2K7 and > A2K10: It opens the Windows Open/Save dialog with a bunch of > arguments: > From charlotte.foust at gmail.com Tue Jul 5 16:08:20 2011 From: charlotte.foust at gmail.com (Charlotte Foust) Date: Tue, 5 Jul 2011 14:08:20 -0700 Subject: [AccessD] Sourcegear vault free two developer license In-Reply-To: References: <4E12D1A4.1010809@colbyconsulting.com> <001d01cc3b11$5c1bf280$1453d780$@comcast.net> Message-ID: Arthur, I know a LOT of developers who need that! LOL Charlotte Foust On Tue, Jul 5, 2011 at 11:06 AM, Arthur Fuller wrote: > Since I've completely eliminated all my programming errors and second > thoughts, I no longer need version control. LOL. I need Developer Control. > > A. > > On Tue, Jul 5, 2011 at 8:45 AM, Dan Waters wrote: > > > Is a version control system useful for a single developer? I noticed > that > > this offer is for 2 developers, assuming that it would help more than one > > developer. > > > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > > > Website: http://www.databaseadvisors.com > > > From fuller.artful at gmail.com Tue Jul 5 16:15:18 2011 From: fuller.artful at gmail.com (Arthur Fuller) Date: Tue, 5 Jul 2011 17:15:18 -0400 Subject: [AccessD] Sourcegear vault free two developer license In-Reply-To: References: <4E12D1A4.1010809@colbyconsulting.com> <001d01cc3b11$5c1bf280$1453d780$@comcast.net> Message-ID: wii Do Two. A. You're never alone if you're schizophrenic. What did you say? Noffink! Knot a bloddy nerd. On Tue, Jul 5, 2011 at 5:08 PM, Charlotte Foust wrote: > Arthur, > > I know a LOT of developers who need that! LOL > > Charlotte Foust > > From fahooper at gmail.com Tue Jul 5 16:18:54 2011 From: fahooper at gmail.com (Fred Hooper) Date: Tue, 05 Jul 2011 17:18:54 -0400 Subject: [AccessD] Walk the DB Using ADO In-Reply-To: References: Message-ID: <4E137FBE.2020006@gmail.com> Hi Arthur, As I work with new databases frequently, I've found it useful to create an Access db that uses ADO to get information on the owners, tables and views -- and place it in an Access table. It currently works for Oracle and SQL Server. I'm happy to send a copy if it would be helpful. Fred Hooper On 7/5/2011 3:57 PM, Arthur Fuller wrote: > Thanks, Drew. I'll give that a shot. It's been a while since I looked > carefully at the ADO model for other than typical recordset operations.. I > seem to recall that somewhere I have a diagram of it, and even a DAO->ADO > conversion chart. Time to start perusing the documents directories. > > A. > > On Tue, Jul 5, 2011 at 2:45 PM, Drew Wutka wrote: > >> Sorry I don't have this code exactly as you have here. But what you >> need to do is actually all in recordsets. >> >> You use a SCHEMA query to get the list of tables (you can get columns >> this way if you want, too). And then you use properties of the field to >> get other values (like field name, value, constraints, etc). >> >> Drew >> >> From fahooper at gmail.com Tue Jul 5 16:24:55 2011 From: fahooper at gmail.com (Fred Hooper) Date: Tue, 05 Jul 2011 17:24:55 -0400 Subject: [AccessD] Walk the DB Using ADO In-Reply-To: <4E137FBE.2020006@gmail.com> References: <4E137FBE.2020006@gmail.com> Message-ID: <4E138127.6080001@gmail.com> Whoops, also fields with their type, width and indexes. On 7/5/2011 5:18 PM, Fred Hooper wrote: > Hi Arthur, > > As I work with new databases frequently, I've found it useful to > create an Access db that uses ADO to get information on the owners, > tables and views -- and place it in an Access table. It currently > works for Oracle and SQL Server. > > I'm happy to send a copy if it would be helpful. > > Fred Hooper > > On 7/5/2011 3:57 PM, Arthur Fuller wrote: >> Thanks, Drew. I'll give that a shot. It's been a while since I looked >> carefully at the ADO model for other than typical recordset >> operations.. I >> seem to recall that somewhere I have a diagram of it, and even a >> DAO->ADO >> conversion chart. Time to start perusing the documents directories. >> >> A. >> >> On Tue, Jul 5, 2011 at 2:45 PM, Drew Wutka wrote: >> >>> Sorry I don't have this code exactly as you have here. But what you >>> need to do is actually all in recordsets. >>> >>> You use a SCHEMA query to get the list of tables (you can get columns >>> this way if you want, too). And then you use properties of the >>> field to >>> get other values (like field name, value, constraints, etc). >>> >>> Drew >>> >>> From fuller.artful at gmail.com Tue Jul 5 17:05:23 2011 From: fuller.artful at gmail.com (Arthur Fuller) Date: Tue, 5 Jul 2011 18:05:23 -0400 Subject: [AccessD] Walk the DB Using ADO In-Reply-To: <4E137FBE.2020006@gmail.com> References: <4E137FBE.2020006@gmail.com> Message-ID: I would most appreciate your Send! Thx, A. On Tue, Jul 5, 2011 at 5:18 PM, Fred Hooper wrote: > Hi Arthur, > > As I work with new databases frequently, I've found it useful to create an > Access db that uses ADO to get information on the owners, tables and views > -- and place it in an Access table. It currently works for Oracle and SQL > Server. > > I'm happy to send a copy if it would be helpful. > > Fred Hooper > > > On 7/5/2011 3:57 PM, Arthur Fuller wrote: > >> Thanks, Drew. I'll give that a shot. It's been a while since I looked >> carefully at the ADO model for other than typical recordset operations.. I >> seem to recall that somewhere I have a diagram of it, and even a DAO->ADO >> conversion chart. Time to start perusing the documents directories. >> >> A. >> >> On Tue, Jul 5, 2011 at 2:45 PM, Drew Wutka wrote: >> >> Sorry I don't have this code exactly as you have here. But what you >>> need to do is actually all in recordsets. >>> >>> You use a SCHEMA query to get the list of tables (you can get columns >>> this way if you want, too). And then you use properties of the field to >>> get other values (like field name, value, constraints, etc). >>> >>> Drew >>> >>> >>> -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/**mailman/listinfo/accessd > Website: http://www.databaseadvisors.**com > From steve at datamanagementsolutions.biz Tue Jul 5 18:14:54 2011 From: steve at datamanagementsolutions.biz (Steve Schapel) Date: Wed, 6 Jul 2011 11:14:54 +1200 Subject: [AccessD] Emailing an .mde In-Reply-To: References: Message-ID: Ed I don't remember the last time I sent an email with a file attached. I always upload it to Dropbox, and then email the link for them to grab it from there. Very easy. Regards Steve -----Original Message----- From: Tesiny, Ed Sent: Wednesday, July 06, 2011 5:09 AM To: Access Developers discussion and problem solving ; Off Topic Subject: [AccessD] Emailing an .mde Hi All, I'm trying to email a database frontend, of course our system blocks it. Is there an extension that is fairly neutral, I tried .doc with one person last week and that worked but it isn't working with the person I trying to distribute to today. Any suggestions? TIA Ed From fuller.artful at gmail.com Wed Jul 6 00:37:47 2011 From: fuller.artful at gmail.com (Arthur Fuller) Date: Wed, 6 Jul 2011 01:37:47 -0400 Subject: [AccessD] "Modern" replacement for CommonDlg In-Reply-To: <4E137B8F.24761.21ADBC5C@stuart.lexacorp.com.pg> References: <4E137B8F.24761.21ADBC5C@stuart.lexacorp.com.pg> Message-ID: Thanks! A. On Tue, Jul 5, 2011 at 5:01 PM, Stuart McLachlan wrote: > Here' ya go, I'm sure I've posted this a few times in the past. > > From vbacreations at gmail.com Wed Jul 6 06:28:25 2011 From: vbacreations at gmail.com (William Benson (VBACreations.Com)) Date: Wed, 6 Jul 2011 07:28:25 -0400 Subject: [AccessD] "Modern" replacement for CommonDlg In-Reply-To: <4E137B8F.24761.21ADBC5C@stuart.lexacorp.com.pg> References: <4E137B8F.24761.21ADBC5C@stuart.lexacorp.com.pg> Message-ID: <002e01cc3bcf$d2959830$77c0c890$@gmail.com> If you put in a reference to Office 12.0 or Office 14.0, I think Access will find the opposite one on another user's machine. Then you can use the dialog. Below is code I wrote which will not require API and allows you to pass in strings for the file filter of this nature *.XL*|*.TXT|*.DAT|*.CSV and like items are grouped when it comes to the description. I quit after the most common file types. Also, I could have written a sort routine to put the detail items together in the filter, but I have not (yet). (text files: TXT, DAT, CSV) Function GetSelectedFile(Optional ExtensionStringWithPipeSeparator) As String Dim iFileTypes As Long Dim fDialog As Office.FileDialog Dim varFile As Variant Dim strTypes As String Dim strFilters As String Dim strTemp As String Dim strParseThis As String Dim ItemsSkipped() Dim strSkipped As String Dim i As Long strFilters = "" strTypes = "" ReDim ItemsSkipped(0) If Not IsMissing(ExtensionStringWithPipeSeparator) Then strParseThis = CStr(ExtensionStringWithPipeSeparator) Else strParseThis = "*.*" End If If strParseThis <> "*.*" Then Do Until InStr(strParseThis, "|") = 0 strTemp = Left(strParseThis, InStr(strParseThis, "|") - 1) strParseThis = Mid(strParseThis, Len(strTemp) + 2) strTemp = Replace$(strTemp, "*.", "") UpdateFilterAndType strTypes:=strTypes, strFilters:=strFilters, strTemp:=strTemp, ItemsSkipped:=ItemsSkipped Loop strTemp = Replace$(strParseThis, "*.", "") UpdateFilterAndType strTypes:=strTypes, strFilters:=strFilters, strTemp:=strTemp, ItemsSkipped:=ItemsSkipped Else strTypes = strTypes & ";*.*" strFilters = strFilters & ",All Files" End If If UBound(ItemsSkipped) > 0 Then strSkipped = "" For i = 1 To UBound(ItemsSkipped) strSkipped = strSkipped & Chr(13) & "'" & ItemsSkipped(i) & "'" Next strSkipped = Mid(strSkipped, 2) MsgBox "Known file Type List not comprehensive enough to accommodate extension(s):" & Chr(13) & Chr(13) & strSkipped End If If strTypes <> "" Then Set fDialog = Application.FileDialog(msoFileDialogFilePicker) fDialog.AllowMultiSelect = False fDialog.Title = "Select a file to examine" fDialog.Filters.Clear fDialog.Filters.Add Mid(strFilters, 2), Mid(strTypes, 2) If fDialog.Show <> True Then 'MsgBox "You clicked Cancel in the file dialog box." GoTo Exit_Me Else Set varFile = fDialog.SelectedItems GetSelectedFile = varFile(1) End If Else MsgBox "No Accepted File Types Were Specified!", vbInformation GetSelectedFile = "" End If Exit_Me: End Function Private Function UpdateFilterAndType(ByRef strTypes As String, ByRef strFilters As String, strTemp As String, ByRef ItemsSkipped) If InStr(UCase(strTemp), "DOC") > 0 Then If InStr(UCase(strFilters), "DOC") = 0 Then strFilters = strFilters & "," & "Doc" End If ElseIf InStr(UCase(strTemp), "RTF") > 0 Then If InStr(UCase(strFilters), "DOC") = 0 Then strFilters = strFilters & "," & "Doc" End If ElseIf InStr(UCase(strTemp), "PDF") > 0 Then strFilters = strFilters & "," & "Pdf" ElseIf InStr(UCase(strTemp), "MD") > 0 Then strFilters = strFilters & "," & "Acc" ElseIf InStr(UCase(strTemp), "XL") > 0 Then If InStr(UCase(strFilters), "SSHT") = 0 Then strFilters = strFilters & "," & "Ssht" End If ElseIf InStr(UCase(strTemp), "WK") > 0 Then If InStr(UCase(strFilters), "SSHT") = 0 Then strFilters = strFilters & "," & "Ssht" End If ElseIf InStr(UCase(strTemp), "TXT") > 0 Then If InStr(UCase(strFilters), "TEXT") = 0 Then strFilters = strFilters & "," & "Text" End If ElseIf InStr(UCase(strTemp), "CSV") > 0 Then If InStr(UCase(strFilters), "TEXT") = 0 Then strFilters = strFilters & "," & "Text" End If ElseIf InStr(UCase(strTemp), "LOG") > 0 Then If InStr(UCase(strFilters), "TEXT") = 0 Then strFilters = strFilters & "," & "Text" End If ElseIf InStr(UCase(strTemp), "DAT") > 0 Then If InStr(UCase(strFilters), "TEXT") = 0 Then strFilters = strFilters & "," & "Text" End If Else If UBound(ItemsSkipped) = 0 Then ReDim ItemsSkipped(1) Else ReDim Preserve ItemsSkipped(UBound(ItemsSkipped) + 1) End If ItemsSkipped(UBound(ItemsSkipped)) = strTemp GoTo Exit_Me End If strTypes = strTypes & ";" & "*." & LCase(strTemp) Exit_Me: End Function From jwcolby at colbyconsulting.com Wed Jul 6 06:46:07 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Wed, 06 Jul 2011 07:46:07 -0400 Subject: [AccessD] =?windows-1252?q?HASHBYTES_=96_A_T-SQL_Function_-_SQL_M?= =?windows-1252?q?usings_-_SQLServerCentral=2Ecom?= Message-ID: <4E144AFF.5010306@colbyconsulting.com> We were discussing hashes awhile back. -- John W. Colby www.ColbyConsulting.com http://www.sqlservercentral.com/blogs/steve_jones/archive/2011/6/28/hashbytes-_1320_-a-t_2D00_sql-function.aspx From fuller.artful at gmail.com Wed Jul 6 07:39:34 2011 From: fuller.artful at gmail.com (Arthur Fuller) Date: Wed, 6 Jul 2011 08:39:34 -0400 Subject: [AccessD] "Modern" replacement for CommonDlg In-Reply-To: <002e01cc3bcf$d2959830$77c0c890$@gmail.com> References: <4E137B8F.24761.21ADBC5C@stuart.lexacorp.com.pg> <002e01cc3bcf$d2959830$77c0c890$@gmail.com> Message-ID: Thanks for this. It does appear to work nicely for selecting a file, but I'm not sure how to modify it to return the selected directory rather than a file in it. A. From vbacreations at gmail.com Wed Jul 6 07:50:05 2011 From: vbacreations at gmail.com (William Benson (VBACreations.Com)) Date: Wed, 6 Jul 2011 08:50:05 -0400 Subject: [AccessD] populating a textbox-type field in one table, calc'ed from another table Message-ID: <002f01cc3bdb$3b067fa0$b1137ee0$@gmail.com> Dear Colleagues, The below expression works when the display control for the field is a listbox, and the above expression its row source. But it won't work (as written) when the display control is a textbox and the expression is the Default Value -- getting syntax error. Default Value = SELECT Sum(Tbl_Field_Values.Items) FROM Tbl_Field_Values WHERE Tbl_Field_Values.WB = WB and Tbl_Field_Values.WS = WS and Tbl_Field_Values.FLD = FLD GROUP BY Tbl_Field_Values.WB, Tbl_Field_Values.WS, Tbl_Field_Values.FLD; Table: Tbl_Field_Values_Header Field: SumOfItems Can the syntax be improved to cause the sum of all items where WB, WS, and FLD match between Tbl_Field_Values and Tbl_Field_Values_Header, to display as the default value in the field I am trying to populate (SumOfItems) in my Tbl_Field_Values_Header table? From stuart at lexacorp.com.pg Wed Jul 6 08:02:41 2011 From: stuart at lexacorp.com.pg (Stuart McLachlan) Date: Wed, 06 Jul 2011 23:02:41 +1000 Subject: [AccessD] "Modern" replacement for CommonDlg In-Reply-To: References: , <002e01cc3bcf$d2959830$77c0c890$@gmail.com>, Message-ID: <4E145CF1.1188.D6EFDE@stuart.lexacorp.com.pg> If you want to select a folder, you don't use OpenFilename(), you use ShBrowseForFolder() Private Declare Function SHBrowseForFolder Lib "SHELL32.DLL" _ Alias "SHBrowseForFolderA" (lpbi As BROWSEINFO) As Long Private Declare Function SHGetPathFromIDList _ Lib "shell32" Alias "SHGetPathFromIDListA" _ (ByVal Pidl As Long, ByVal pszPath As String) As Long Type BROWSEINFO hwndOwner As Long pIDLRoot As Long pszDisplayName As String * 256 lpszTitle As String * 256 ulFlags As Long lpfnCallback As Long lParam As Long iImage As Long End Type Const BIF_RETURNONLYFSDIRS = 1 Const BIF_DONTGOBELOWDOMAIN = 2 Const MAX_PATH = 260 Function BrowseForFolder(hwnd As Long, Title As String) As String Dim strPath As String strPath = Space$(MAX_PATH) Dim bi As BROWSEINFO Dim lpIDList As Long strPath = Space$(MAX_PATH) bi.hwndOwner = 0 bi.lpszTitle = Title bi.ulFlags = BIF_RETURNONLYFSDIRS Or BIF_DONTGOBELOWDOMAIN lpIDList = SHBrowseForFolder(bi) If lpIDList Then SHGetPathFromIDList lpIDList, strPath strPath = Left(strPath, InStr(1, strPath, vbNullChar) - 1) If Len(strPath) > 3 Then strPath = strPath & "\" BrowseForFolder = strPath End If End Function -- Stuart On 6 Jul 2011 at 8:39, Arthur Fuller wrote: > Thanks for this. It does appear to work nicely for selecting a file, > but I'm not sure how to modify it to return the selected directory > rather than a file in it. > > A. > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > From Gustav at cactus.dk Wed Jul 6 08:08:26 2011 From: Gustav at cactus.dk (Gustav Brock) Date: Wed, 06 Jul 2011 15:08:26 +0200 Subject: [AccessD] "Modern" replacement for CommonDlg Message-ID: Hi Arthur > It does appear to work nicely for selecting a file .. However, this screams for a class solution: http://www.karstenpries.de/ Pick menu Entwicklertools, FileDialog It's in German, not Chinese, but you know what it is supposed to do. > how to modify it to return the selected directory .. It contains a ShowFolder method as well. /gustav >>> fuller.artful at gmail.com 06-07-2011 14:39 >>> Thanks for this. It does appear to work nicely for selecting a file, but I'm not sure how to modify it to return the selected directory rather than a file in it. A. From stuart at lexacorp.com.pg Wed Jul 6 08:23:20 2011 From: stuart at lexacorp.com.pg (Stuart McLachlan) Date: Wed, 06 Jul 2011 23:23:20 +1000 Subject: [AccessD] "Modern" replacement for CommonDlg In-Reply-To: References: Message-ID: <4E1461C8.16661.E9DA9A@stuart.lexacorp.com.pg> Geez, you're as bad as JC :-) Why bother with writing 600 lines of code to create a class when there are simple API functions to do it in a few lines? -- Stuart On 6 Jul 2011 at 15:08, Gustav Brock wrote: ... > However, this screams for a class solution: > > http://www.karstenpries.de/ > .. From jwcolby at colbyconsulting.com Wed Jul 6 08:25:09 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Wed, 06 Jul 2011 09:25:09 -0400 Subject: [AccessD] "Modern" replacement for CommonDlg In-Reply-To: References: Message-ID: <4E146235.3010109@colbyconsulting.com> Luckily Arthur is studying classes... ;) John W. Colby www.ColbyConsulting.com On 7/6/2011 9:08 AM, Gustav Brock wrote: > Hi Arthur > >> It does appear to work nicely for selecting a file .. > > However, this screams for a class solution: > > http://www.karstenpries.de/ > > Pick menu Entwicklertools, FileDialog > It's in German, not Chinese, but you know what it is supposed to do. > >> how to modify it to return the selected directory .. > > It contains a ShowFolder method as well. > > /gustav > > >>>> fuller.artful at gmail.com 06-07-2011 14:39>>> > Thanks for this. It does appear to work nicely for selecting a file, but I'm > not sure how to modify it to return the selected directory rather than a > file in it. > > A. > > From EdTesiny at oasas.ny.gov Wed Jul 6 08:32:29 2011 From: EdTesiny at oasas.ny.gov (Tesiny, Ed) Date: Wed, 6 Jul 2011 09:32:29 -0400 Subject: [AccessD] Emailing an .mde In-Reply-To: References: Message-ID: Steve, Sounds like an easy solution but even I can't get access to it and I have enhanced internet access. I'm sure the person I'm working with has no ability to download. Ed Tesiny EdTesiny at oasas.ny.gov -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Steve Schapel Sent: Tuesday, July 05, 2011 7:15 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Emailing an .mde Ed I don't remember the last time I sent an email with a file attached. I always upload it to Dropbox, and then email the link for them to grab it from there. Very easy. Regards Steve -----Original Message----- From: Tesiny, Ed Sent: Wednesday, July 06, 2011 5:09 AM To: Access Developers discussion and problem solving ; Off Topic Subject: [AccessD] Emailing an .mde Hi All, I'm trying to email a database frontend, of course our system blocks it. Is there an extension that is fairly neutral, I tried .doc with one person last week and that worked but it isn't working with the person I trying to distribute to today. Any suggestions? TIA Ed -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From jwcolby at colbyconsulting.com Wed Jul 6 08:40:40 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Wed, 06 Jul 2011 09:40:40 -0400 Subject: [AccessD] "Modern" replacement for CommonDlg In-Reply-To: <4E1461C8.16661.E9DA9A@stuart.lexacorp.com.pg> References: <4E1461C8.16661.E9DA9A@stuart.lexacorp.com.pg> Message-ID: <4E1465D8.2070702@colbyconsulting.com> LOL. 600 lines of code? You need to go back to class writing school. John W. Colby www.ColbyConsulting.com On 7/6/2011 9:23 AM, Stuart McLachlan wrote: > Geez, you're as bad as JC :-) > > Why bother with writing 600 lines of code to create a class when there are simple API > functions to do it in a few lines? > From Gustav at cactus.dk Wed Jul 6 08:49:38 2011 From: Gustav at cactus.dk (Gustav Brock) Date: Wed, 06 Jul 2011 15:49:38 +0200 Subject: [AccessD] "Modern" replacement for CommonDlg Message-ID: Hi Stuart Because it is the way to do it. You initialize the object, set some properties, call a method, bingo. If not the right folder/file, adjust some properties, call a method, bingo. When I discovered this logical operation many years ago (I only do very little VBA programming these days) it brought relief and good nights' sleep! Of course, if one prefer traditional methods, no problem, I just wanted to point out that you can do it the OO way even without the OCX. /gustav >>> stuart at lexacorp.com.pg 06-07-2011 15:23 >>> Geez, you're as bad as JC :-) Why bother with writing 600 lines of code to create a class when there are simple API functions to do it in a few lines? -- Stuart On 6 Jul 2011 at 15:08, Gustav Brock wrote: ... > However, this screams for a class solution: > > http://www.karstenpries.de/ > .. From df.waters at comcast.net Wed Jul 6 08:51:30 2011 From: df.waters at comcast.net (Dan Waters) Date: Wed, 6 Jul 2011 08:51:30 -0500 Subject: [AccessD] Emailing an .mde In-Reply-To: References: Message-ID: <002101cc3be3$cfe9e910$6fbdbb30$@comcast.net> I change the extension to .pdf. Always works. If you file is large, you might compress it first, then change .zip to .pdf. Dan -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Tesiny, Ed Sent: Wednesday, July 06, 2011 8:32 AM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Emailing an .mde Steve, Sounds like an easy solution but even I can't get access to it and I have enhanced internet access. I'm sure the person I'm working with has no ability to download. Ed Tesiny EdTesiny at oasas.ny.gov -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Steve Schapel Sent: Tuesday, July 05, 2011 7:15 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Emailing an .mde Ed I don't remember the last time I sent an email with a file attached. I always upload it to Dropbox, and then email the link for them to grab it from there. Very easy. Regards Steve -----Original Message----- From: Tesiny, Ed Sent: Wednesday, July 06, 2011 5:09 AM To: Access Developers discussion and problem solving ; Off Topic Subject: [AccessD] Emailing an .mde Hi All, I'm trying to email a database frontend, of course our system blocks it. Is there an extension that is fairly neutral, I tried .doc with one person last week and that worked but it isn't working with the person I trying to distribute to today. Any suggestions? TIA Ed -- 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 Wed Jul 6 09:27:06 2011 From: rockysmolin at bchacc.com (rockysmolin at bchacc.com) Date: Wed, 06 Jul 2011 07:27:06 -0700 Subject: [AccessD] Emailing an .mde Message-ID: <20110706072706.86c3debdd1c3983866efe200e2feb95f.2abc9b1f88.wbe@email18.secureserver.net> How about YouSendIt.com? I;ve been using that for a year and it's been flawless. I also use a folder on my website /ftpguest where I FTP things and clients can download them from there using a browser. Rocky -------- Original Message -------- Subject: Re: [AccessD] Emailing an .mde From: "Tesiny, Ed" Date: Wed, July 06, 2011 6:32 am To: "Access Developers discussion and problem solving" Steve, Sounds like an easy solution but even I can't get access to it and I have enhanced internet access. I'm sure the person I'm working with has no ability to download. Ed Tesiny EdTesiny at oasas.ny.gov -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Steve Schapel Sent: Tuesday, July 05, 2011 7:15 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Emailing an .mde Ed I don't remember the last time I sent an email with a file attached. I always upload it to Dropbox, and then email the link for them to grab it from there. Very easy. Regards Steve -----Original Message----- From: Tesiny, Ed Sent: Wednesday, July 06, 2011 5:09 AM To: Access Developers discussion and problem solving ; Off Topic Subject: [AccessD] Emailing an .mde Hi All, I'm trying to email a database frontend, of course our system blocks it. Is there an extension that is fairly neutral, I tried .doc with one person last week and that worked but it isn't working with the person I trying to distribute to today. Any suggestions? TIA Ed -- 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 EdTesiny at oasas.ny.gov Wed Jul 6 10:24:50 2011 From: EdTesiny at oasas.ny.gov (Tesiny, Ed) Date: Wed, 6 Jul 2011 11:24:50 -0400 Subject: [AccessD] Emailing an .mde In-Reply-To: <20110706072706.86c3debdd1c3983866efe200e2feb95f.2abc9b1f88.wbe@email18.secureserver.net> References: <20110706072706.86c3debdd1c3983866efe200e2feb95f.2abc9b1f88.wbe@email18.secureserver.net> Message-ID: FTP is totally blocked...the agency is PARANOID! Ed Tesiny EdTesiny at oasas.ny.gov -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of rockysmolin at bchacc.com Sent: Wednesday, July 06, 2011 10:27 AM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Emailing an .mde How about YouSendIt.com? I;ve been using that for a year and it's been flawless. I also use a folder on my website /ftpguest where I FTP things and clients can download them from there using a browser. Rocky -------- Original Message -------- Subject: Re: [AccessD] Emailing an .mde From: "Tesiny, Ed" Date: Wed, July 06, 2011 6:32 am To: "Access Developers discussion and problem solving" Steve, Sounds like an easy solution but even I can't get access to it and I have enhanced internet access. I'm sure the person I'm working with has no ability to download. Ed Tesiny EdTesiny at oasas.ny.gov -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Steve Schapel Sent: Tuesday, July 05, 2011 7:15 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Emailing an .mde Ed I don't remember the last time I sent an email with a file attached. I always upload it to Dropbox, and then email the link for them to grab it from there. Very easy. Regards Steve -----Original Message----- From: Tesiny, Ed Sent: Wednesday, July 06, 2011 5:09 AM To: Access Developers discussion and problem solving ; Off Topic Subject: [AccessD] Emailing an .mde Hi All, I'm trying to email a database frontend, of course our system blocks it. Is there an extension that is fairly neutral, I tried .doc with one person last week and that worked but it isn't working with the person I trying to distribute to today. Any suggestions? TIA Ed -- 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 Wed Jul 6 10:48:05 2011 From: stuart at lexacorp.com.pg (Stuart McLachlan) Date: Thu, 07 Jul 2011 01:48:05 +1000 Subject: [AccessD] "Modern" replacement for CommonDlg In-Reply-To: <4E1465D8.2070702@colbyconsulting.com> References: , <4E1461C8.16661.E9DA9A@stuart.lexacorp.com.pg>, <4E1465D8.2070702@colbyconsulting.com> Message-ID: <4E1483B5.26290.16E6158@stuart.lexacorp.com.pg> Not me. Download the file that Gustav pointed to. The FileDialog class module in the mdb is 615 lines long. -- Stuart On 6 Jul 2011 at 9:40, jwcolby wrote: > LOL. 600 lines of code? You need to go back to class writing school. > > John W. Colby > www.ColbyConsulting.com > > On 7/6/2011 9:23 AM, Stuart McLachlan wrote: > > Geez, you're as bad as JC :-) > > > > Why bother with writing 600 lines of code to create a class when > > there are simple API functions to do it in a few lines? > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > From charlotte.foust at gmail.com Wed Jul 6 11:14:28 2011 From: charlotte.foust at gmail.com (Charlotte Foust) Date: Wed, 6 Jul 2011 09:14:28 -0700 Subject: [AccessD] populating a textbox-type field in one table, calc'ed from another table In-Reply-To: <002f01cc3bdb$3b067fa0$b1137ee0$@gmail.com> References: <002f01cc3bdb$3b067fa0$b1137ee0$@gmail.com> Message-ID: Default values aren't calculated but row sources are. You would need to put some code behind the form to load the value into an unbound textbox in the appropriate event, probably the On Current event. Charlotte Foust On Wed, Jul 6, 2011 at 5:50 AM, William Benson (VBACreations.Com) < vbacreations at gmail.com> wrote: > Dear Colleagues, > > The below expression works when the display control for the field is a > listbox, and the above expression its row source. But it won't work (as > written) when the display control is a textbox and the expression is the > Default Value -- getting syntax error. > > Default Value = SELECT Sum(Tbl_Field_Values.Items) FROM Tbl_Field_Values > WHERE Tbl_Field_Values.WB = WB and Tbl_Field_Values.WS = WS and > Tbl_Field_Values.FLD = FLD GROUP BY Tbl_Field_Values.WB, > Tbl_Field_Values.WS, Tbl_Field_Values.FLD; > > Table: Tbl_Field_Values_Header > Field: SumOfItems > > > Can the syntax be improved to cause the sum of all items where WB, WS, and > FLD match between Tbl_Field_Values and Tbl_Field_Values_Header, to display > as the default value in the field I am trying to populate (SumOfItems) in > my > Tbl_Field_Values_Header table? > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > > > Website: http://www.databaseadvisors.com > > > From vbacreations at gmail.com Wed Jul 6 11:47:02 2011 From: vbacreations at gmail.com (William Benson (VBACreations.Com)) Date: Wed, 6 Jul 2011 12:47:02 -0400 Subject: [AccessD] How to tell a button's "air space" is nolonger beinghovered over References: <003b01cc38f1$b62edca0$228c95e0$@gmail.com><471F6C8DAB244C66B0AB79536085B3EC@personal4a8ede> <002001cc3a5e$5428d240$fc7a76c0$@gmail.com> <8DD6228312434CD0940AE4E4807C4FF6@personal4a8ede> Message-ID: <004001cc3bfc$56097700$021c6500$@gmail.com> OK, I am scratching my head to think why I didn't see this simpler solution the minute A.D. showed me how to test X and Y. This pretty much always resets at the button edge, and if shift is held, shows the alternate caption in the interior. Private Sub cmdClearFieldHistory_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single) Dim W As Single Dim H As Single If Shift = 0 Then cmdClearFieldHistory.Caption = "Clear Field History" Else W = cmdClearFieldHistory.Width H = cmdClearFieldHistory.Height If X = 0 Or X = W Or Y = 0 Or Y = H Then cmdClearFieldHistory.Caption = "Clear Field History" Else cmdClearFieldHistory.Caption = "Clear All Fields" End If End If End Sub From jwcolby at colbyconsulting.com Wed Jul 6 14:12:19 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Wed, 06 Jul 2011 15:12:19 -0400 Subject: [AccessD] "Modern" replacement for CommonDlg In-Reply-To: <4E1483B5.26290.16E6158@stuart.lexacorp.com.pg> References: , <4E1461C8.16661.E9DA9A@stuart.lexacorp.com.pg>, <4E1465D8.2070702@colbyconsulting.com> <4E1483B5.26290.16E6158@stuart.lexacorp.com.pg> Message-ID: <4E14B393.8010500@colbyconsulting.com> Then I have to assume that they are giving you access to properties, i.e. turning it into an object. I wrap things in a class all the time. That is pretty much the entire point of classes is to give you methods and properties. And yea, yea, you don't do classes. John W. Colby www.ColbyConsulting.com On 7/6/2011 11:48 AM, Stuart McLachlan wrote: > Not me. > Download the file that Gustav pointed to. The FileDialog class module in the mdb is 615 > lines long. > From jwcolby at colbyconsulting.com Wed Jul 6 14:14:11 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Wed, 06 Jul 2011 15:14:11 -0400 Subject: [AccessD] "Modern" replacement for CommonDlg In-Reply-To: References: Message-ID: <4E14B403.1010306@colbyconsulting.com> Any chance you could translate it? ;) John W. Colby www.ColbyConsulting.com On 7/6/2011 9:08 AM, Gustav Brock wrote: > Hi Arthur > >> It does appear to work nicely for selecting a file .. > > However, this screams for a class solution: > > http://www.karstenpries.de/ > > Pick menu Entwicklertools, FileDialog > It's in German, not Chinese, but you know what it is supposed to do. > >> how to modify it to return the selected directory .. > > It contains a ShowFolder method as well. > > /gustav > > >>>> fuller.artful at gmail.com 06-07-2011 14:39>>> > Thanks for this. It does appear to work nicely for selecting a file, but I'm > not sure how to modify it to return the selected directory rather than a > file in it. > > A. > > From fuller.artful at gmail.com Wed Jul 6 17:32:19 2011 From: fuller.artful at gmail.com (Arthur Fuller) Date: Wed, 6 Jul 2011 18:32:19 -0400 Subject: [AccessD] "Modern" replacement for CommonDlg In-Reply-To: <4E14B403.1010306@colbyconsulting.com> References: <4E14B403.1010306@colbyconsulting.com> Message-ID: I'm working on it. My German is shaky, but my Cantonese and Mandarin are coming along, and I am already conversant with Spanish and French. This won't take long. Given a gift for languages, I'll be there in a fortnight. LOL. A. On Wed, Jul 6, 2011 at 3:14 PM, jwcolby wrote: > Any chance you could translate it? ;) > > > From jwcolby at colbyconsulting.com Wed Jul 6 18:20:46 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Wed, 06 Jul 2011 19:20:46 -0400 Subject: [AccessD] "Modern" replacement for CommonDlg In-Reply-To: References: <4E14B403.1010306@colbyconsulting.com> Message-ID: <4E14EDCE.8010605@colbyconsulting.com> I keep asking someone to gift me a language. 'Southern' seems to be what is being gifted. ;) John W. Colby www.ColbyConsulting.com On 7/6/2011 6:32 PM, Arthur Fuller wrote: > I'm working on it. My German is shaky, but my Cantonese and Mandarin are > coming along, and I am already conversant with Spanish and French. This > won't take long. Given a gift for languages, I'll be there in a fortnight. > LOL. > > A. > > On Wed, Jul 6, 2011 at 3:14 PM, jwcolby wrote: > >> Any chance you could translate it? ;) >> >> >> From df.waters at comcast.net Wed Jul 6 18:56:04 2011 From: df.waters at comcast.net (Dan Waters) Date: Wed, 6 Jul 2011 18:56:04 -0500 Subject: [AccessD] "Modern" replacement for CommonDlg In-Reply-To: <4E14EDCE.8010605@colbyconsulting.com> References: <4E14B403.1010306@colbyconsulting.com> <4E14EDCE.8010605@colbyconsulting.com> Message-ID: <005e01cc3c38$48280840$d87818c0$@comcast.net> Maybe you can find an on-line translation site? Paste the German into a field and English shows up on another screen. I found one for C# and VB.Net - works great. Dan -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Wednesday, July 06, 2011 6:21 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] "Modern" replacement for CommonDlg I keep asking someone to gift me a language. 'Southern' seems to be what is being gifted. ;) John W. Colby www.ColbyConsulting.com On 7/6/2011 6:32 PM, Arthur Fuller wrote: > I'm working on it. My German is shaky, but my Cantonese and Mandarin > are coming along, and I am already conversant with Spanish and French. > This won't take long. Given a gift for languages, I'll be there in a fortnight. > LOL. > > A. > > On Wed, Jul 6, 2011 at 3:14 PM, jwcolby wrote: > >> Any chance you could translate it? ;) >> >> >> -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From vbacreations at gmail.com Wed Jul 6 23:46:36 2011 From: vbacreations at gmail.com (William Benson (VBACreations.Com)) Date: Thu, 7 Jul 2011 00:46:36 -0400 Subject: [AccessD] "Modern" replacement for CommonDlg In-Reply-To: <005e01cc3c38$48280840$d87818c0$@comcast.net> References: <4E14B403.1010306@colbyconsulting.com> <4E14EDCE.8010605@colbyconsulting.com> <005e01cc3c38$48280840$d87818c0$@comcast.net> Message-ID: <000001cc3c60$db287350$917959f0$@gmail.com> I have this loop which results in my 2nd listbox row being selected every time and it annoys me. I can't figure out what is causing *any* row to be selected. Debug Behavior: Row 0 added, nothing is selected. Row 1 added, it gets selected. Row 2 added, Row 1 stays selected. Row 3 added, Row 1 stays selected. For Each WS In WB.Worksheets lstWS.AddItem WS.Name & ";" & XL.WorksheetFunction.CountA(WS.Rows(1)) Next From charlotte.foust at gmail.com Wed Jul 6 23:55:53 2011 From: charlotte.foust at gmail.com (Charlotte Foust) Date: Wed, 6 Jul 2011 21:55:53 -0700 Subject: [AccessD] "Modern" replacement for CommonDlg In-Reply-To: <000001cc3c60$db287350$917959f0$@gmail.com> References: <4E14B403.1010306@colbyconsulting.com> <4E14EDCE.8010605@colbyconsulting.com> <005e01cc3c38$48280840$d87818c0$@comcast.net> <000001cc3c60$db287350$917959f0$@gmail.com> Message-ID: Does your listbox have a header row? That would affect which row was the default. Charlotte Foust On Wed, Jul 6, 2011 at 9:46 PM, William Benson (VBACreations.Com) < vbacreations at gmail.com> wrote: > I have this loop which results in my 2nd listbox row being selected every > time and it annoys me. I can't figure out what is causing *any* row to be > selected. > > Debug Behavior: > Row 0 added, nothing is selected. > Row 1 added, it gets selected. > Row 2 added, Row 1 stays selected. > Row 3 added, Row 1 stays selected. > > For Each WS In WB.Worksheets > lstWS.AddItem WS.Name & ";" & > XL.WorksheetFunction.CountA(WS.Rows(1)) > Next > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > > > Website: http://www.databaseadvisors.com > > > From Gustav at cactus.dk Thu Jul 7 04:07:29 2011 From: Gustav at cactus.dk (Gustav Brock) Date: Thu, 07 Jul 2011 11:07:29 +0200 Subject: [AccessD] "Modern" replacement for CommonDlg Message-ID: Hi John Sorry, I just picked it from my archive where I have a modified version, looked up the site, and found out that a new link and version was for download. But I don't use it anymore and didn't download it and translating an old version wouldn't make much sense. But again, you know what the class is intended for, so translating may not be needed at all. /gustav >>> jwcolby at colbyconsulting.com 06-07-2011 21:14 >>> Any chance you could translate it? ;) John W. Colby www.ColbyConsulting.com On 7/6/2011 9:08 AM, Gustav Brock wrote: > Hi Arthur > >> It does appear to work nicely for selecting a file .. > > However, this screams for a class solution: > > http://www.karstenpries.de/ > > Pick menu Entwicklertools, FileDialog > It's in German, not Chinese, but you know what it is supposed to do. > >> how to modify it to return the selected directory .. > > It contains a ShowFolder method as well. > > /gustav > > >>>> fuller.artful at gmail.com 06-07-2011 14:39>>> > Thanks for this. It does appear to work nicely for selecting a file, but I'm > not sure how to modify it to return the selected directory rather than a > file in it. > > A. From jwcolby at colbyconsulting.com Thu Jul 7 07:03:20 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Thu, 07 Jul 2011 08:03:20 -0400 Subject: [AccessD] SQL Server - Query non-updateable Message-ID: <4E15A088.9050801@colbyconsulting.com> I have a selection query for a bound form. If I just do a select xyz from tblInmate it works of course. I want to select a subset of inmates that reflect those that I work with (specific camps). I have a tblVolunteerCamps (the camps that a volunteer works with) and I built a stored procedure out in SQL Server that selects the IDs of inmates at those camps. I feed the SP the volunteer ID and back comes the campIDs and the inmateIDs in those camps. I had read (on this list) that if I used IN (SELECT ID from QueryXYZ) in the where clause it would allow the query to be editable but doing so is turning my query into a non-updatable query. SELECT TblInmate.* from tblInmate WHERE (INM_Active <> 0) AND (INM_Location IN (SELECT CMP_LOCCODE FROM qspVolCampIDs)) If I remove the IN clause, the query is updateable. I really need to filter to just the camps the volunteer works with and I am wondering how to accomplish this. In the past I would try to JOIN the main query to the selection filter and that caused non-updateable. I was told to use the IN(SELECT) which has worked in most cases in the past. Any clue why not now and how to go about filtering and keeping it updateable? -- John W. Colby www.ColbyConsulting.com From jwcolby at colbyconsulting.com Thu Jul 7 07:20:46 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Thu, 07 Jul 2011 08:20:46 -0400 Subject: [AccessD] SQL Server - Query non-updateable In-Reply-To: <4E15A088.9050801@colbyconsulting.com> References: <4E15A088.9050801@colbyconsulting.com> Message-ID: <4E15A49E.30002@colbyconsulting.com> Further to this, I have discovered that if I build a temp table inside of the access fe and do the join it is un-updateable. However if I use the temp table in the IN() clause it is now updateable. So it is something about using the stored procedure in the IN() that causes the query to become un-updateable. John W. Colby www.ColbyConsulting.com On 7/7/2011 8:03 AM, jwcolby wrote: > I have a selection query for a bound form. If I just do a select xyz from tblInmate it works of > course. I want to select a subset of inmates that reflect those that I work with (specific camps). > > I have a tblVolunteerCamps (the camps that a volunteer works with) and I built a stored procedure > out in SQL Server that selects the IDs of inmates at those camps. I feed the SP the volunteer ID and > back comes the campIDs and the inmateIDs in those camps. > > I had read (on this list) that if I used IN (SELECT ID from QueryXYZ) in the where clause it would > allow the query to be editable but doing so is turning my query into a non-updatable query. > > SELECT TblInmate.* from tblInmate > WHERE (INM_Active <> 0) AND > (INM_Location IN (SELECT CMP_LOCCODE FROM qspVolCampIDs)) > > If I remove the IN clause, the query is updateable. > > I really need to filter to just the camps the volunteer works with and I am wondering how to > accomplish this. In the past I would try to JOIN the main query to the selection filter and that > caused non-updateable. I was told to use the IN(SELECT) which has worked in most cases in the past. > > Any clue why not now and how to go about filtering and keeping it updateable? > From iggy at nanaimo.ark.com Thu Jul 7 07:59:37 2011 From: iggy at nanaimo.ark.com (Tony Septav) Date: Thu, 7 Jul 2011 05:59:37 -0700 Subject: [AccessD] Cannot Open Anymore Databases Message-ID: Hey All Just curious. I was working on a report, I would view it and when I returned to the design mode I would get the error message "Cannot open anymore databases". The report is based on a union query, which is made up of 6 subqueries. each of these subqueries is based on the results from about 3 or 4 other querys. If I manually run the union query I don't get any error messages, as I mentioned I only get the error message when working with the report. Am I correct in assuming that the results of each of these queries results in 1 instant of the database being opened and I have exceeded the 84 (whatever) limit to the number of databases instances that can be open at one time?? I solved the problem by appending the results of each of the 6 queries to a temp table and using the table for the report. T. Septav Nanaimo, BC Canada From jwcolby at colbyconsulting.com Fri Jul 8 12:24:59 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Fri, 08 Jul 2011 13:24:59 -0400 Subject: [AccessD] xyz* faster than *asd Message-ID: <4E173D6B.4060709@colbyconsulting.com> Does anyone know of a reason that LIKE is faster with the * in back instead of the front of a string to search by in the where clause? -- John W. Colby www.ColbyConsulting.com From fuller.artful at gmail.com Fri Jul 8 12:47:57 2011 From: fuller.artful at gmail.com (Arthur Fuller) Date: Fri, 8 Jul 2011 13:47:57 -0400 Subject: [AccessD] xyz* faster than *asd In-Reply-To: <4E173D6B.4060709@colbyconsulting.com> References: <4E173D6B.4060709@colbyconsulting.com> Message-ID: Well yeah! If prefaced with an asterisk, it means LIKE everything; if suffixed with an asterisk, it means "Everything like JWC*"; hence search for JWC and walk the remaining similarities. A. On Fri, Jul 8, 2011 at 1:24 PM, jwcolby wrote: > Does anyone know of a reason that LIKE is faster with the * in back instead > of the front of a string to search by in the where clause? > > From vbacreations at gmail.com Fri Jul 8 12:54:20 2011 From: vbacreations at gmail.com (William Benson (VBACreations.Com)) Date: Fri, 8 Jul 2011 13:54:20 -0400 Subject: [AccessD] xyz* faster than *asd In-Reply-To: References: <4E173D6B.4060709@colbyconsulting.com> Message-ID: <001401cc3d98$10e777b0$32b66710$@gmail.com> I don't think that is true Arthur. If testing Like XYZ* you are saying ONLY THINGS THAT begin with XYZ, and if testing LIKE *XYZ you are saying only things which end with XYZ -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Arthur Fuller Sent: Friday, July 08, 2011 1:48 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] xyz* faster than *asd Well yeah! If prefaced with an asterisk, it means LIKE everything; if suffixed with an asterisk, it means "Everything like JWC*"; hence search for JWC and walk the remaining similarities. A. On Fri, Jul 8, 2011 at 1:24 PM, jwcolby wrote: > Does anyone know of a reason that LIKE is faster with the * in back > instead of the front of a string to search by in the where clause? > > -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From Lambert.Heenan at chartisinsurance.com Fri Jul 8 12:55:34 2011 From: Lambert.Heenan at chartisinsurance.com (Heenan, Lambert) Date: Fri, 8 Jul 2011 13:55:34 -0400 Subject: [AccessD] xyz* faster than *asd In-Reply-To: <4E173D6B.4060709@colbyconsulting.com> References: <4E173D6B.4060709@colbyconsulting.com> Message-ID: If by 'back' you mean on the right and 'front' meaning on the left, then the answer is surely to do with how the pattern matching takes place. With a search string like "FOOBAR*" the Db engine can simply filter all records where the field starts with 'FOOBAR', and that will be fairly fast as only the first n characters in each record need to be examined. But with LIKE *FOOBAR* the starting location of the search string is indeterminate. Therefore for each record, more characters have to be examined to check if the substring 'FOOBAR' is in the data. For a false match that means every character (minus n - the length of the substring) in the string needs to be checked. Lambert -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Friday, July 08, 2011 1:25 PM To: Access Developers discussion and problem solving Subject: [AccessD] xyz* faster than *asd Does anyone know of a reason that LIKE is faster with the * in back instead of the front of a string to search by in the where clause? -- John W. Colby www.ColbyConsulting.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From jwcolby at colbyconsulting.com Fri Jul 8 12:59:24 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Fri, 08 Jul 2011 13:59:24 -0400 Subject: [AccessD] xyz* faster than *asd In-Reply-To: References: <4E173D6B.4060709@colbyconsulting.com> Message-ID: <4E17457C.9010109@colbyconsulting.com> > Well yeah! If prefaced with an asterisk, it means LIKE everything; AFAIK they mean the same thing (only backward) *asd means everything with 'asd' at the end asd* means everything with 'asd' at the beginning I vaguely remember reading (long ago) that one was faster than the other but the why escapes me. John W. Colby www.ColbyConsulting.com On 7/8/2011 1:47 PM, Arthur Fuller wrote: > Well yeah! If prefaced with an asterisk, it means LIKE everything; if > suffixed with an asterisk, it means "Everything like JWC*"; hence search for > JWC and walk the remaining similarities. > > A. > > On Fri, Jul 8, 2011 at 1:24 PM, jwcolby wrote: > >> Does anyone know of a reason that LIKE is faster with the * in back instead >> of the front of a string to search by in the where clause? >> >> From Lambert.Heenan at chartisinsurance.com Fri Jul 8 12:59:40 2011 From: Lambert.Heenan at chartisinsurance.com (Heenan, Lambert) Date: Fri, 8 Jul 2011 13:59:40 -0400 Subject: [AccessD] xyz* faster than *asd In-Reply-To: References: <4E173D6B.4060709@colbyconsulting.com> Message-ID: And for the case where you have 'LIKE *FOOBAR', that will be slower because the db has to first figure out how long the data is, then look at the last n characters to check for a match, whereas LIKE FOOBAR* still only has to look at the first n characters. Lambert -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Heenan, Lambert Sent: Friday, July 08, 2011 1:56 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] xyz* faster than *asd If by 'back' you mean on the right and 'front' meaning on the left, then the answer is surely to do with how the pattern matching takes place. With a search string like "FOOBAR*" the Db engine can simply filter all records where the field starts with 'FOOBAR', and that will be fairly fast as only the first n characters in each record need to be examined. But with LIKE *FOOBAR* the starting location of the search string is indeterminate. Therefore for each record, more characters have to be examined to check if the substring 'FOOBAR' is in the data. For a false match that means every character (minus n - the length of the substring) in the string needs to be checked. Lambert -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Friday, July 08, 2011 1:25 PM To: Access Developers discussion and problem solving Subject: [AccessD] xyz* faster than *asd Does anyone know of a reason that LIKE is faster with the * in back instead of the front of a string to search by in the where clause? -- John W. Colby www.ColbyConsulting.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 DWUTKA at Marlow.com Fri Jul 8 14:12:37 2011 From: DWUTKA at Marlow.com (Drew Wutka) Date: Fri, 8 Jul 2011 14:12:37 -0500 Subject: [AccessD] xyz* faster than *asd In-Reply-To: <4E173D6B.4060709@colbyconsulting.com> References: <4E173D6B.4060709@colbyconsulting.com> Message-ID: It's based on how indexing, in general, works. If indexing is completely turned off, the search time should be the same either way. I actually built two separate indexing systems. The first was for a PDA version of a system I had, which included a company phone list. The normal application installed on all of our PC's allowed the user to search by first name, last name, or extension number. It was a single textbox search, worked great on the PC version. But when I built it for the palm V... WOW, was slow as dirt. The Palm database didn't have an indexing option. In essence, it was basically a flat file. So what I did, is I created my own index. I had three fields I wanted to search quickly with (First Name, Last Name, extension). I then formatted the system on the Palm to have 6 tables. The main table 3 times, sorted by one key field (so a main table sorted by first name, one sorted by last name, one sorted by extension), then 3 indexing tables, one for each main table. The 'phone list' (at the time) had anywhere from 450 to 900 employees. The data was pretty small though, just text fields, and therefore didn't take up that much space to triplicate it for the palm. (The sorting and table creation were done in process with the Palm synch process). The Index table had 3 fields: The first field was the first letter (which really this was an unnecessary field). So there were 26 records (A thru Z). The Second field was the position in the related main table where that letter started. (for the number index, it obviously had 10 records (with the first field being 0 to 9 (though I only really needed 3 or 4 of those numbers since our extensions were in a specific range))). Then the second field was a text field with a 104 character text field (26x4). Each group of 4 letters (there were 26 of them), represented the hexadecimal value (it may have been decimal, don't remember) of the starting point of the second letter past the first letter's starting point. So, for example, let's say a user searched for Mike, the code would look at the first letter, say 'It's an M, that's the 13th letter (or Asc(UCASE(strFirstLetter))-64), so it would jump to the 13th record in the index table (it was slow to search through each record, but you could jump to a record by it's position very quickly). So the Record in the First Name Index table would look something like this: (oh, if the 4 characters representing the second letter is 0000, then it knows that there are no records for that first/second letter combo... and the numeric representation is 1 off, so 0001 represents the first record of the first letter starting point) M,140,000100000000000000030000000000000010..... So now that I have this record, my code knows that the 9th group for four digits is 0010, and the starting point is 140, it now knows that records starting with MI (for MIKE) start at record 149 (140+10-1(for 1 off offset)). So now the code can jump to the 149th record of the main table (sorted by first name). If the search were to look for Mark (MA for first two letters), it would start at record 140 on the main table (140+1-1). So instead of scanning every record, a slow process taking about 30 seconds on a Palm V, now I am doing a jump to one record, a little math and string reading, and then a jump to a much closer spot to finish the search. So, while my methods/code are probably not identical to indexing in Jet or SQL, it is probably similar, so searching for abc* is able to directly use the index of the record, making very fast jumps through it, where as *xyz, it is going to have to scan every record still. The second indexing system I built was for the old AccessD archives I used to host. I had it hosted with Access as the backend, and posts needed to be able to be searched by word, so a post with a thousand words needed a thousand indexes. SQL allows for full text indexing.... again, my method may not be identical, but the concept is probably similar. What I did for my full text indexing, is as a 'post' came in to be archived, The code would break down each post into individual words. It would then seach a word index (had a table for each starting letter of each word), to see if that word was in the index, if the word exists (say the word is 'AND', it would look in tblAWords), it would take the key of that word, if it didn't exist, it added that word to the index, and then took the newly created key. Then, it would add a record to a tblAWordsToPosts (where 'A' is for search words starting with A, so there were 26 of these tables) with the ID of the search word, and the ID of the post. So if you were to search for 'Unbound Forms', the search would hit tblUWords to get the Key for 'Unbound', then it would hit tblFWords, to get the key for 'Forms', then it would take those two keys, and create a query to return records from tblPosts, where there were joined records with tblUWordsToPosts and tblFWordsToPosts. All in all, with hundreds of thousands of records, the searching of those records were getting done in a second or two, instead of a massively long search going through the memo fields themselves. Drew -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Friday, July 08, 2011 12:25 PM To: Access Developers discussion and problem solving Subject: [AccessD] xyz* faster than *asd Does anyone know of a reason that LIKE is faster with the * in back instead of the front of a string to search by in the where clause? -- John W. Colby www.ColbyConsulting.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com The information contained in this transmission is intended only for the person or entity to which it is addressed and may contain II-VI Proprietary and/or II-VI Business Sensitive material. If you are not the intended recipient, please contact the sender immediately and destroy the material in its entirety, whether electronic or hard copy. You are notified that any review, retransmission, copying, disclosure, dissemination, or other use of, or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. From ab-mi at post3.tele.dk Fri Jul 8 14:57:27 2011 From: ab-mi at post3.tele.dk (Asger Blond) Date: Fri, 8 Jul 2011 21:57:27 +0200 Subject: [AccessD] xyz* faster than *asd References: <4E173D6B.4060709@colbyconsulting.com> Message-ID: Like Drew my answer is: if you have no index on the field there will be no difference to performance because the query engine then has to do a table scan. But if you have an index on the field then the query engine can use the index for LIKE xyz*, but it has to do a table scan for LIKE *xyz. Asger ----- Original meddelelse ----- > Fra: jwcolby > Til: Access Developers discussion and problem solving > > Dato: Fre, 08. jul 2011 19:24 > Emne: [AccessD] xyz* faster than *asd > > Does anyone know of a reason that LIKE is faster with the * in back > instead of the front of a string > to search by in the where clause? > > -- > John W. Colby > www.ColbyConsulting.com > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com From DWUTKA at Marlow.com Fri Jul 8 15:04:34 2011 From: DWUTKA at Marlow.com (Drew Wutka) Date: Fri, 8 Jul 2011 15:04:34 -0500 Subject: [AccessD] xyz* faster than *asd In-Reply-To: References: <4E173D6B.4060709@colbyconsulting.com> Message-ID: Boy, you're answer was WAY shorter then mine! I went into detail though, to explain the process a bit. Drew -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Asger Blond Sent: Friday, July 08, 2011 2:57 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] xyz* faster than *asd Like Drew my answer is: if you have no index on the field there will be no difference to performance because the query engine then has to do a table scan. But if you have an index on the field then the query engine can use the index for LIKE xyz*, but it has to do a table scan for LIKE *xyz. Asger ----- Original meddelelse ----- > Fra: jwcolby > Til: Access Developers discussion and problem solving > > Dato: Fre, 08. jul 2011 19:24 > Emne: [AccessD] xyz* faster than *asd > > Does anyone know of a reason that LIKE is faster with the * in back > instead of the front of a string > to search by in the where clause? > > -- > John W. Colby > www.ColbyConsulting.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 The information contained in this transmission is intended only for the person or entity to which it is addressed and may contain II-VI Proprietary and/or II-VI Business Sensitive material. If you are not the intended recipient, please contact the sender immediately and destroy the material in its entirety, whether electronic or hard copy. You are notified that any review, retransmission, copying, disclosure, dissemination, or other use of, or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. From fuller.artful at gmail.com Fri Jul 8 15:35:40 2011 From: fuller.artful at gmail.com (Arthur Fuller) Date: Fri, 8 Jul 2011 16:35:40 -0400 Subject: [AccessD] xyz* faster than *asd In-Reply-To: <001401cc3d98$10e777b0$32b66710$@gmail.com> References: <4E173D6B.4060709@colbyconsulting.com> <001401cc3d98$10e777b0$32b66710$@gmail.com> Message-ID: I think that is true, and I have just tested and verified my conjecture. A. On Fri, Jul 8, 2011 at 1:54 PM, William Benson (VBACreations.Com) < vbacreations at gmail.com> wrote: > I don't think that is true Arthur. > > If testing Like XYZ* you are saying ONLY THINGS THAT begin with XYZ, and if > testing LIKE *XYZ you are saying only things which end with XYZ > > From john at winhaven.net Fri Jul 8 16:38:35 2011 From: john at winhaven.net (John Bartow) Date: Fri, 8 Jul 2011 16:38:35 -0500 Subject: [AccessD] xyz* faster than *asd In-Reply-To: <4E173D6B.4060709@colbyconsulting.com> References: <4E173D6B.4060709@colbyconsulting.com> Message-ID: <000901cc3db7$642445b0$2c6cd110$@winhaven.net> I remember asking a similar question in an SQL queries class about 20 years ago. I believe the answer was "because". Its Friday ;o) -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Friday, July 08, 2011 12:25 PM To: Access Developers discussion and problem solving Subject: [AccessD] xyz* faster than *asd Does anyone know of a reason that LIKE is faster with the * in back instead of the front of a string to search by in the where clause? -- John W. Colby www.ColbyConsulting.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From ab-mi at post3.tele.dk Fri Jul 8 17:19:30 2011 From: ab-mi at post3.tele.dk (Asger Blond) Date: Sat, 9 Jul 2011 00:19:30 +0200 Subject: [AccessD] xyz* faster than *asd References: <4E173D6B.4060709@colbyconsulting.com> <000901cc3db7$642445b0$2c6cd110$@winhaven.net> Message-ID: Too bad you got this silly answer in your way back SQL class. Because it's quite obvious why a LIKE xyz* will be faster than LIKE *xyz on an indexed field. For a LIKE *xyz the query engine have to investigate each and every record, because it just doesn't know what leading characters to seach - and this traversing all records is what's called a "table scan". For LIKE xyz* the query engine can use the index, because it know that the leading characters are "xyz". So having an index on the search field will allways make a LIKE *xyz query by far faster than a LIKE xyz* query. Asger ----- Original meddelelse ----- > Fra: John Bartow > Til: 'Access Developers discussion and problem solving' > > Dato: Fre, 08. jul 2011 23:38 > Emne: Re: [AccessD] xyz* faster than *asd > > I remember asking a similar question in an SQL queries class about 20 > years > ago. I believe the answer was "because". > > Its Friday ;o) > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby > Sent: Friday, July 08, 2011 12:25 PM > To: Access Developers discussion and problem solving > Subject: [AccessD] xyz* faster than *asd > > Does anyone know of a reason that LIKE is faster with the * in back > instead > of the front of a string to search by in the where clause? > > -- > John W. Colby > www.ColbyConsulting.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 ab-mi at post3.tele.dk Fri Jul 8 17:32:18 2011 From: ab-mi at post3.tele.dk (Asger Blond) Date: Sat, 9 Jul 2011 00:32:18 +0200 Subject: [AccessD] xyz* faster than *asd References: <4E173D6B.4060709@colbyconsulting.com> <000901cc3db7$642445b0$2c6cd110$@winhaven.net> Message-ID: And making a fast answer is not the wise... The last line of my answer should be: So having an index on the search field will allways make a LIKE xyz* query by far faster than a LIKE *xyz query. Asger ----- Original meddelelse ----- > Fra: Asger Blond > Til: Access Developers discussion and problem solving > > Dato: L?r, 09. jul 2011 00:19 > Emne: Re: [AccessD] xyz* faster than *asd > > Too bad you got this silly answer in your way back SQL class. Because > it's quite obvious why a LIKE xyz* will be faster than LIKE *xyz on > an > indexed field. For a LIKE *xyz the query engine have to investigate > each > and every record, because it just doesn't know what leading > characters to > seach - and this traversing all records is what's called a "table > scan". > For LIKE xyz* the query engine can use the index, because it know > that > the leading characters are "xyz". So having an index on the search > field > will allways make a LIKE *xyz query by far faster than a LIKE xyz* > query. > Asger > > ----- Original meddelelse ----- > > > Fra: John Bartow > > Til: 'Access Developers discussion and problem solving' > > > > Dato: Fre, 08. jul 2011 23:38 > > Emne: Re: [AccessD] xyz* faster than *asd > > > > I remember asking a similar question in an SQL queries class about > 20 > > years > > ago. I believe the answer was "because". > > > > Its Friday ;o) > > -----Original Message----- > > From: accessd-bounces at databaseadvisors.com > > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby > > Sent: Friday, July 08, 2011 12:25 PM > > To: Access Developers discussion and problem solving > > Subject: [AccessD] xyz* faster than *asd > > > > Does anyone know of a reason that LIKE is faster with the * in back > > instead > > of the front of a string to search by in the where clause? > > > > -- > > John W. Colby > > www.ColbyConsulting.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 Fri Jul 8 17:37:59 2011 From: stuart at lexacorp.com.pg (Stuart McLachlan) Date: Sat, 09 Jul 2011 08:37:59 +1000 Subject: [AccessD] xyz* faster than *asd In-Reply-To: <4E173D6B.4060709@colbyconsulting.com> References: <4E173D6B.4060709@colbyconsulting.com> Message-ID: <4E1786C7.4212.49B944B@stuart.lexacorp.com.pg> "some*" can use indexes. "*omething" can't On 8 Jul 2011 at 13:24, jwcolby wrote: > Does anyone know of a reason that LIKE is faster with the * in back > instead of the front of a string to search by in the where clause? > > -- > John W. Colby > www.ColbyConsulting.com > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > From jwcolby at colbyconsulting.com Sat Jul 9 09:09:03 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Sat, 09 Jul 2011 10:09:03 -0400 Subject: [AccessD] List box as a status box Message-ID: <4E1860FF.1050407@colbyconsulting.com> I want to put up a control to display a running status, display then last N events that occurred. I have never really liked text boxes for this purpose as the last thing displayed as I always seem to end up with scrolling issues and so forth. I am thinking about using a list control. This has the advantage (for my purposes) of allowing me to have neat columns for the date / time and the status to be displayed. Does anyone do this and want to comment on how they make it work? -- John W. Colby www.ColbyConsulting.com From vbacreations at gmail.com Sat Jul 9 10:34:35 2011 From: vbacreations at gmail.com (William Benson (VBACreations.Com)) Date: Sat, 9 Jul 2011 11:34:35 -0400 Subject: [AccessD] List box as a status box In-Reply-To: <4E1860FF.1050407@colbyconsulting.com> References: <4E1860FF.1050407@colbyconsulting.com> Message-ID: <000001cc3e4d$b5fb7020$21f25060$@gmail.com> John, What kind of events ... and how are they trapped? Bill -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Saturday, July 09, 2011 10:09 AM To: Access Developers discussion and problem solving Subject: [AccessD] List box as a status box I want to put up a control to display a running status, display then last N events that occurred. I have never really liked text boxes for this purpose as the last thing displayed as I always seem to end up with scrolling issues and so forth. I am thinking about using a list control. This has the advantage (for my purposes) of allowing me to have neat columns for the date / time and the status to be displayed. Does anyone do this and want to comment on how they make it work? -- John W. Colby www.ColbyConsulting.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From jwcolby at colbyconsulting.com Sat Jul 9 12:17:13 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Sat, 09 Jul 2011 13:17:13 -0400 Subject: [AccessD] List box as a status box In-Reply-To: <000001cc3e4d$b5fb7020$21f25060$@gmail.com> References: <4E1860FF.1050407@colbyconsulting.com> <000001cc3e4d$b5fb7020$21f25060$@gmail.com> Message-ID: <4E188D19.1060700@colbyconsulting.com> I'm actually talking about "things that happen" events rather than control / form events. I am carving out a piece of my Inmate Checkout program which goes out to the internet and pulls the inmate info for the specific inmates that are already in my database, looking for changes relevant to my ability to check the inmate out. For example they are moved to another camp or their security level goes up (or down) etc. I had a very simple text box on the form which I simply updated with a text string when I discovered a change to the inmate status. However when the next change came along I lost the last. If I did a txt.value = txt.value & vbcrlf & "new status stuff" I ended up with scrolling in the text box which is difficult to control. In this specific case, I was storing these status changes in a table and I ended up just pulling the TOP 50 changes out and displaying them in a list control directly, but doing something like that where I programmatically stuff them into the list columns would also work nicely. John W. Colby www.ColbyConsulting.com On 7/9/2011 11:34 AM, William Benson (VBACreations.Com) wrote: > John, > > What kind of events ... and how are they trapped? > > Bill > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby > Sent: Saturday, July 09, 2011 10:09 AM > To: Access Developers discussion and problem solving > Subject: [AccessD] List box as a status box > > I want to put up a control to display a running status, display then last N > events that occurred. I > have never really liked text boxes for this purpose as the last thing > displayed as I always seem to > end up with scrolling issues and so forth. > > I am thinking about using a list control. This has the advantage (for my > purposes) of allowing me > to have neat columns for the date / time and the status to be displayed. > > Does anyone do this and want to comment on how they make it work? > From vbacreations at gmail.com Sat Jul 9 13:53:06 2011 From: vbacreations at gmail.com (William Benson (VBACreations.Com)) Date: Sat, 9 Jul 2011 14:53:06 -0400 Subject: [AccessD] List box as a status box In-Reply-To: <4E188D19.1060700@colbyconsulting.com> References: <4E1860FF.1050407@colbyconsulting.com> <000001cc3e4d$b5fb7020$21f25060$@gmail.com> <4E188D19.1060700@colbyconsulting.com> Message-ID: <000101cc3e69$715b0360$54110a20$@gmail.com> I am not sure I would use the listbox because they are limited in terms of how much can be displayed. I would probably go with a datasheet subform at a minimum, if you *really* do give up textboxes. But I like textboxes for this use. I use a memo field and only a single record in the textbox. Set enter key behavior to add new line, and scroll to vertical. Note I trim off the entries I don't want to retain... In this implementation I have two textboxes... one holds the accumulated events (last 15 items only) and one holds new event I want to add Option Compare Database Option Explicit 'For module Private Sub cmdAddEvent_Click() If Nz(Me.txtNewEvent, "") <> "" Then RecordLogEntry CurrentDb, Me.txtEvents, Me.txtNewEvent End If End Sub Private Sub Form_Load() Dim R As DAO.Recordset txtEvents = "" Set R = CurrentDb.OpenRecordset("Select First(EventField) as EventToShow >From TblEventLog Group by EventField") If Not R.EOF Then txtEvents = R!EventToshow End If End Sub 'Then this goes in standard module... works pretty well. Function RecordLogEntry(MyDB As DAO.Database, Ctrl As Control, sWhateverEventStringIs As String) Dim bStoreLocked As Boolean Dim strEVENTBREAK As String Const iMaxEntries = 15 Dim RstEventLog As DAO.Recordset Dim sEntry As String Dim sCurrentLog As String Const sLogStart As String = "<============== " Const sLogEnd As String = " ==============>" strEVENTBREAK = sLogStart & Format(Now(), "m/d/yyyy h:mm AM/PM") & sLogEnd & vbCrLf Set RstEventLog = MyDB.OpenRecordset("Select EventField From TblEventLog") sEntry = strEVENTBREAK & sWhateverEventStringIs On Error Resume Next RstEventLog.MoveFirst On Error GoTo Err_Handler If Not RstEventLog.EOF Then sCurrentLog = KeepMostRecent(RstEventLog.Fields(0), iMaxEntries, sLogStart) RstEventLog.Edit RstEventLog.Fields(0) = sEntry & vbCrLf & sCurrentLog 'Newest first RstEventLog.Update Else RstEventLog.AddNew RstEventLog.Fields(0) = sEntry RstEventLog.Update End If If TypeOf Ctrl Is Access.TextBox Then bStoreLocked = Ctrl.Locked Ctrl.Locked = False RstEventLog.Requery Ctrl.Value = RstEventLog.Fields(0) Ctrl.Locked = bStoreLocked End If Exit Function Err_Handler: MsgBox Err.Number & " - " & Err.Description End Function Function KeepMostRecent(ByVal str As String, ByVal iMax As Long, ByVal sLogStart As String) As String Dim iOccurrences As Long iOccurrences = (Len(str) - Len(Replace$(str, sLogStart, ""))) / Len(sLogStart) If iOccurrences >= iMax Then 'Remove last one KeepMostRecent = Left(str, InStrRev(str, sLogStart) - 1) Else KeepMostRecent = str End If End Function From stuart at lexacorp.com.pg Sat Jul 9 16:24:43 2011 From: stuart at lexacorp.com.pg (Stuart McLachlan) Date: Sun, 10 Jul 2011 07:24:43 +1000 Subject: [AccessD] List box as a status box In-Reply-To: <4E1860FF.1050407@colbyconsulting.com> References: <4E1860FF.1050407@colbyconsulting.com> Message-ID: <4E18C71B.3561.97EDB91@stuart.lexacorp.com.pg> I do this quite frequently. It works very well for me. If you just wan to log events that occuring while the application is running, make the listbox source an empty value list and then use something like: Const cLongMaxListItems Function Logitem(ev As String) as long If lstLog.ListCount > clngMaxLogItems Then lstLog.RemoveItem 0 End If lstLog.AddItem Format$(Now(), "d mmm yy h:nn:ss am/pm") & ";" & ev End Function By embedding semicolons in the string "ev", you can use as many columns as you want in your list. If you want the last ten events on record regardless of when they happened, create a query qryEventLog: "Select Top 10 * from tblEvents order by evDate DESC", and make the rowsource a query "Select * from qryLogEvent order by evDate" Then you just need a lstLog.Requery whenever a new record is added. -- Stuart On 9 Jul 2011 at 10:09, jwcolby wrote: > I want to put up a control to display a running status, display then > last N events that occurred. I have never really liked text boxes for > this purpose as the last thing displayed as I always seem to end up > with scrolling issues and so forth. > > I am thinking about using a list control. This has the advantage (for > my purposes) of allowing me to have neat columns for the date / time > and the status to be displayed. > > Does anyone do this and want to comment on how they make it work? > > -- > John W. Colby > www.ColbyConsulting.com > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > From charlotte.foust at gmail.com Sat Jul 9 22:09:35 2011 From: charlotte.foust at gmail.com (Charlotte Foust) Date: Sat, 09 Jul 2011 20:09:35 -0700 Subject: [AccessD] List box as a status box In-Reply-To: <4E188D19.1060700@colbyconsulting.com> References: <4E1860FF.1050407@colbyconsulting.com> <000001cc3e4d$b5fb7020$21f25060$@gmail.com> <4E188D19.1060700@colbyconsulting.com> Message-ID: <4ad3aeb0-2ad1-473e-89e5-e77b736598f2@email.android.com> I've done this but years ago. I added a string for each event to the rowsource for the listbox. -- Sent from my Android phone with K-9 Mail. Please excuse my brevity. jwcolby wrote: I'm actually talking about "things that happen" events rather than control / form events. I am carving out a piece of my Inmate Checkout program which goes out to the internet and pulls the inmate info for the specific inmates that are already in my database, looking for changes relevant to my ability to check the inmate out. For example they are moved to another camp or their security level goes up (or down) etc. I had a very simple text box on the form which I simply updated with a text string when I discovered a change to the inmate status. However when the next change came along I lost the last. If I did a txt.value = txt.value & vbcrlf & "new status stuff" I ended up with scrolling in the text box which is difficult to control. In this specific case, I was storing these status changes in a table and I ended up just pulling the TOP 50 changes out and displaying them in a list control directly, but doing something like that where I programmatically stuff them into the list columns would also work nicely. John W. Colby www.ColbyConsulting.com On 7/9/2011 11:34 AM, William Benson (VBACreations.Com) wrote: > John, > > What kind of events ... and how are they trapped? > > Bill > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby > Sent: Saturday, July 09, 2011 10:09 AM > To: Access Developers discussion and problem solving > Subject: [AccessD] List box as a status box > > I want to put up a control to display a running status, display then last N > events that occurred. I > have never really liked text boxes for this purpose as the last thing > displayed as I always seem to > end up with scrolling issues and so forth. > > I am thinking about using a list control. This has the advantage (for my > purposes) of allowing me > to have neat columns for the date / time and the status to be displayed. > > Does anyone do this and want to comment on how they make it work? > -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From charlotte.foust at gmail.com Sat Jul 9 22:16:17 2011 From: charlotte.foust at gmail.com (Charlotte Foust) Date: Sat, 09 Jul 2011 20:16:17 -0700 Subject: [AccessD] xyz* faster than *asd In-Reply-To: <4E173D6B.4060709@colbyconsulting.com> References: <4E173D6B.4060709@colbyconsulting.com> Message-ID: Because an ampersand at the front means the entire recordset has to be examined. The ampersand at the back means the records that don't match the initial letters don't need to be examined at all. Charlotte Foust -- Sent from my Android phone with K-9 Mail. Please excuse my brevity. jwcolby wrote: Does anyone know of a reason that LIKE is faster with the * in back instead of the front of a string to search by in the where clause? -- John W. Colby www.ColbyConsulting.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From jwcolby at colbyconsulting.com Sun Jul 10 07:13:48 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Sun, 10 Jul 2011 08:13:48 -0400 Subject: [AccessD] Access runtime Message-ID: <4E19977C.2070406@colbyconsulting.com> I am loving Access 2007 runtime! Installs easy and just runs my programs! So far! -- John W. Colby www.ColbyConsulting.com From dhb at flsi.com Mon Jul 11 13:20:09 2011 From: dhb at flsi.com (Darrell Burns) Date: Mon, 11 Jul 2011 11:20:09 -0700 Subject: [AccessD] Cannot Open Anymore Databases In-Reply-To: References: Message-ID: <000001cc3ff7$2b854cd0$828fe670$@com> I had the same problem with a form that had 5 subforms, each with multiple queries. I submitted the question to every forum and discovered that there's no easy cure. The connections limit is 256 but there's no function to tell you how many you've used up. Connections to a back-end database count double. After spending lots of time re-engineering my recordset actions and being very meticulous about closing connections, the final solution was to bind the subforms to temp tables and fill the tables as each tab is clicked. So, your solution is the correct one. - Darrell -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Tony Septav Sent: Thursday, July 07, 2011 6:00 AM To: accessd at databaseadvisors.com Subject: [AccessD] Cannot Open Anymore Databases Hey All Just curious. I was working on a report, I would view it and when I returned to the design mode I would get the error message "Cannot open anymore databases". The report is based on a union query, which is made up of 6 subqueries. each of these subqueries is based on the results from about 3 or 4 other querys. If I manually run the union query I don't get any error messages, as I mentioned I only get the error message when working with the report. Am I correct in assuming that the results of each of these queries results in 1 instant of the database being opened and I have exceeded the 84 (whatever) limit to the number of databases instances that can be open at one time?? I solved the problem by appending the results of each of the 6 queries to a temp table and using the table for the report. T. Septav Nanaimo, BC Canada -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From BradM at blackforestltd.com Mon Jul 11 13:39:37 2011 From: BradM at blackforestltd.com (Brad Marks) Date: Mon, 11 Jul 2011 13:39:37 -0500 Subject: [AccessD] Access and Excel Integration - Resources? References: , <002e01cc3bcf$d2959830$77c0c890$@gmail.com>, <4E145CF1.1188.D6EFDE@stuart.lexacorp.com.pg> Message-ID: I am doing some R&D work involving Access/Excel integration (Windows Automation). I just finished reading a book titled "Excel and Access Integration". It is a well-written book, but it does not get into a great deal of depth with regards to the "Automation" realm. I was wondering if there is a resource (book or website) that covers this area in more depth. In a nutshell, I would like to be able to do anything that a person can do in "native Excel" via commands in Access 2007 which control Excel. Thanks for your help. Brad From rls at WeBeDb.com Mon Jul 11 14:23:09 2011 From: rls at WeBeDb.com (Robert Stewart) Date: Mon, 11 Jul 2011 14:23:09 -0500 Subject: [AccessD] "Modern" replacement for CommonDlg Message-ID: Arthur, This is a different way of doing the same thing using the Office Library. You have to include which ever version of the Office dll that you are using in the references. You will need to comment out the line that contains "udf_WriteErrorToLog" See if the following helps you out: 1 of 2 Public Function udf_SelectFileDialogBox(Optional varDescOfFile As String = "All Files", Optional varExtensions As String = "*.*") As String '**************************************************************************** '* Purpose: : '* (1) Shows the user a dialog box allowing selection of a file. '* Arguments: '* (1) varDescOfFile: The description of the file type to be selected. '* For example: SAP Extract File in TXT format '* (2) varExtensions: The file filter to be used when the user is '* provided a view of the files. For example: *.TXT '* Returns: '* (1) If the user selected the CANCEL button on the dialog box, a '* zero-length string is returned. '* (2) If the user selected a file, the fully-qualified path and file '* name is returned. '* Calls subroutines: None '* Creates Arrays: None '* Uses Arrays: None '* Uses Tools->References: '* (1) Microsoft Office 10.0 Object Library ... or ... '* (2) Microsoft Office 12.0 Object Library ... etc ... '**************************************************************************** 'On Error GoTo Err_udf_SelectFileDialogBox Dim fDialog As FileDialog Dim varFile As Variant Dim strProc As String Dim strCodeLocn As String Dim strMsg As String Dim strRetVal As String '************************************************************************ strCodeLocn = "Initialize values." '************************************************************************ strProc = "udf_SelectFileDialogBox(); " strRetVal = "" '************************************************************************ strCodeLocn = "Set up the File Dialog." '************************************************************************ Set fDialog = Application.FileDialog(msoFileDialogFilePicker) With fDialog .AllowMultiSelect = False 'Disable multiple selections. .Title = varDescOfFile 'Set the title of the dialog box. .Filters.Clear 'Clear out the current filters. .Filters.Add "", varExtensions '.Filters.Add ".TXT file from SAP", "*.TXT" 'assign file filters '.Filters.Add "Access Databases", "*.MDB" '.Filters.Add "All Files", "*.*" '******************************************************************** strCodeLocn = "Show the dialog box." '******************************************************************** 'If the .Show method returns True, the user picked at least one file. 'If the .Show method returns False, the user clicked Cancel. If .Show = True Then strRetVal = .SelectedItems.Item(1) End If End With udf_SelectFileDialogBox = strRetVal Exit_udf_SelectFileDialogBox: Exit Function Err_udf_SelectFileDialogBox: '************************************************************************ '* Write the error message to the log table and display it to the user. '************************************************************************ strMsg = udf_WriteErrorToLog(strModule, strProc, strCodeLocn, Erl, Err.Number, Err.Description) MsgBox (strMsg) GoTo Exit_udf_SelectFileDialogBox End Function At 10:16 PM 7/9/2011, you wrote: > >>>> fuller.artful at gmail.com 06-07-2011 14:39>>> > > Thanks for this. It does appear to work nicely for selecting a > file, but I'm > > not sure how to modify it to return the selected directory rather than a > > file in it. > > > > A. > Robert L. Stewart www.WeBeDb.com www.DBGUIDesign.com www.RLStewartPhotography.com From rls at WeBeDb.com Mon Jul 11 14:23:35 2011 From: rls at WeBeDb.com (Robert Stewart) Date: Mon, 11 Jul 2011 14:23:35 -0500 Subject: [AccessD] "Modern" replacement for CommonDlg Message-ID: <0ADEA7BB-633A-45DC-AE87-102A08B6C00E@holly.arvixe.com> Arthur, This is a different way of doing the same thing using the Office Library. You have to include which ever version of the Office dll that you are using in the references. You will need to comment out the line that contains "udf_WriteErrorToLog" See if the following helps you out: 2 of 2 Public Function udf_SelectFolderDialogBox() As String '**************************************************************************** '* Purpose: : '* (1) Shows the user a dialog box allowing selection of a folder. '* Arguments: None '* Returns: '* (1) If the user selected the CANCEL button on the dialog box, a '* zero-length string is returned. '* (2) If the user selected a file, the fully-qualified path is returned. '* Calls subroutines: None '* Creates Arrays: None '* Uses Arrays: None '* Uses Tools->References: '* (1) Microsoft Office 10.0 Object Library ... or ... '* (2) Microsoft Office 12.0 Object Library ... etc ... '**************************************************************************** 'On Error GoTo Err_udf_SelectFolderDialogBox Dim fDialog As Office.FileDialog Dim varFile As Variant Dim strProc As String Dim strCodeLocn As String Dim strMsg As String Dim strRetVal As String Dim varDescOfFile As Variant '************************************************************************ strCodeLocn = "Initialize values." '************************************************************************ strProc = "udf_SelectFolderDialogBox" strRetVal = "" '************************************************************************ strCodeLocn = "Set up the File Dialog." '************************************************************************ Set fDialog = Application.FileDialog(msoFileDialogFolderPicker) ' Options are: ' msoFileDialogFilePicker 'OK for Access and Excel ' msoFileDialogFolderPicker 'OK for Access and Excel ' msoFileDialogOpen 'Not OK for Access ' msoFileDialogSaveAs 'Not OK for Access ' Note: instead of the option: ' msoFileDialogFilePicker to select a file ' you could also use the option: ' msoFileDialogFolderPicker to select a folder With fDialog .AllowMultiSelect = False 'Disable multiple selections. .Title = varDescOfFile 'Set the title of the dialog box. .Filters.Clear 'Clear out the current filters. '.Filters.Add "", varExtensions '.Filters.Add ".TXT file from SAP", "*.TXT" 'assign file filters '.Filters.Add "Access Databases", "*.MDB" '.Filters.Add "All Files", "*.*" '******************************************************************** strCodeLocn = "Show the dialog box." '******************************************************************** 'If the .Show method returns True, the user picked at least one file. 'If the .Show method returns False, the user clicked Cancel. If .Show = True Then strRetVal = .SelectedItems.Item(1) End If End With Exit_udf_SelectFolderDialogBox: udf_SelectFolderDialogBox = strRetVal Exit Function Err_udf_SelectFolderDialogBox: '************************************************************************ '* Write the error message to the log table and display it to the user. '************************************************************************ strMsg = udf_WriteErrorToLog(strModule, strProc, strCodeLocn, Erl, Err.Number, Err.Description) MsgBox (strMsg) GoTo Exit_udf_SelectFolderDialogBox End Function At 10:16 PM 7/9/2011, you wrote: > >>>> fuller.artful at gmail.com 06-07-2011 14:39>>> > > Thanks for this. It does appear to work nicely for selecting a > file, but I'm > > not sure how to modify it to return the selected directory rather than a > > file in it. > > > > A. > Robert L. Stewart www.WeBeDb.com www.DBGUIDesign.com www.RLStewartPhotography.com From charlotte.foust at gmail.com Mon Jul 11 14:58:23 2011 From: charlotte.foust at gmail.com (Charlotte Foust) Date: Mon, 11 Jul 2011 12:58:23 -0700 Subject: [AccessD] Cannot Open Anymore Databases In-Reply-To: <000001cc3ff7$2b854cd0$828fe670$@com> References: <000001cc3ff7$2b854cd0$828fe670$@com> Message-ID: With reports, it's even worse, because a report when you open it creates "shadow" queries so you are effectively doubling the connections you designed into it. Charlotte Foust On Mon, Jul 11, 2011 at 11:20 AM, Darrell Burns wrote: > I had the same problem with a form that had 5 subforms, each with multiple > queries. I submitted the question to every forum and discovered that > there's > no easy cure. The connections limit is 256 but there's no function to tell > you how many you've used up. Connections to a back-end database count > double. After spending lots of time re-engineering my recordset actions and > being very meticulous about closing connections, the final solution was to > bind the subforms to temp tables and fill the tables as each tab is > clicked. > So, your solution is the correct one. > - Darrell > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Tony Septav > Sent: Thursday, July 07, 2011 6:00 AM > To: accessd at databaseadvisors.com > Subject: [AccessD] Cannot Open Anymore Databases > > Hey All > Just curious. I was working on a report, I would view it and when I > returned > to the design mode I would get the error message "Cannot open anymore > databases". The report is based on a union query, which is made up of 6 > subqueries. each of these subqueries is based on the results from about 3 > or > 4 other querys. If I manually run the union query I don't get any error > messages, as I mentioned I only get the error message when working with the > report. Am I correct in assuming that the results of each of these queries > results in 1 instant of the database being opened and I have exceeded the > 84 > (whatever) limit to the number of databases instances that can be open at > one time?? I solved the problem by appending the results of each of the 6 > queries to a temp table and using the table for the report. > > T. Septav > Nanaimo, BC > Canada > -- > 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 jwcolby at colbyconsulting.com Mon Jul 11 15:14:21 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Mon, 11 Jul 2011 16:14:21 -0400 Subject: [AccessD] Access and Excel Integration - Resources? In-Reply-To: References: , <002e01cc3bcf$d2959830$77c0c890$@gmail.com>, <4E145CF1.1188.D6EFDE@stuart.lexacorp.com.pg> Message-ID: <4E1B599D.1010702@colbyconsulting.com> One of the things we used to do was to use the macro recorder to record keystrokes doing whatever you want to do. Then go look at the macro which is vbE. Now you know the syntax for whatever it was you did you can do that same thing from Access, or alternatively, you can just run the macro from Access. Both methods have their uses. John W. Colby www.ColbyConsulting.com On 7/11/2011 2:39 PM, Brad Marks wrote: > I am doing some R&D work involving Access/Excel integration (Windows > Automation). > > I just finished reading a book titled "Excel and Access Integration". > It is a well-written book, but it does not get into a great deal of > depth with regards to the "Automation" realm. > > I was wondering if there is a resource (book or website) that covers > this area in more depth. > > In a nutshell, I would like to be able to do anything that a person can > do in "native Excel" via commands in Access 2007 which control Excel. > > Thanks for your help. > Brad > From vbacreations at gmail.com Mon Jul 11 15:49:08 2011 From: vbacreations at gmail.com (William Benson (VBACreations.Com)) Date: Mon, 11 Jul 2011 16:49:08 -0400 Subject: [AccessD] Access and Excel Integration - Resources? In-Reply-To: References: , <002e01cc3bcf$d2959830$77c0c890$@gmail.com>, <4E145CF1.1188.D6EFDE@stuart.lexacorp.com.pg> Message-ID: <000001cc400b$fc00a3a0$f401eae0$@gmail.com> Brad, I like john's approach and sometimes use it... but don't like how the macro recorder works in Excel 2007+. My suggestion is to get comfortable with the basics of the Excel object model (easier said...) and in all your access projects, in the beginning at least, add a reference to Excel's object library. Stay away from all late binding in the early period (before you go to production with your application) - so you get the benefit of intellisense. Later you can change declarations to Objects, remove the reference to Excel, and Access will be happy to tell you where you need to substitute numbers for intrinsic constants. You can also join this list http://catalist.lsoft.com/scripts/wl.exe?SL1=EXCEL-L&H=PEACH.EASE.LSOFT.COM. Most seasoned Listers are experienced Access programmers too. Good luck. Bill -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Brad Marks Sent: Monday, July 11, 2011 2:40 PM To: Access Developers discussion and problem solving Subject: [AccessD] Access and Excel Integration - Resources? I am doing some R&D work involving Access/Excel integration (Windows Automation). I just finished reading a book titled "Excel and Access Integration". It is a well-written book, but it does not get into a great deal of depth with regards to the "Automation" realm. I was wondering if there is a resource (book or website) that covers this area in more depth. In a nutshell, I would like to be able to do anything that a person can do in "native Excel" via commands in Access 2007 which control Excel. Thanks for your help. Brad -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From gustav at cactus.dk Mon Jul 11 15:52:58 2011 From: gustav at cactus.dk (Gustav Brock) Date: Mon, 11 Jul 2011 22:52:58 +0200 Subject: [AccessD] Access and Excel Integration - Resources? Message-ID: Hi Brad Here is how (as I learned from Mr. Colby) to run a series of Excel macros from Access: It works very reliably: Function RunExcelMacros( _ ByVal strFileName As String, _ ParamArray avarMacros()) As Boolean Debug.Print "xl ini", Time On Error GoTo Err_RunExcelMacros Static xlApp As Excel.Application Dim xlWkb As Excel.Workbook Dim varMacro As Variant Dim booSuccess As Boolean Dim booTerminate As Boolean If Len(strFileName) = 0 Then ' Excel shall be closed. booTerminate = True End If If xlApp Is Nothing Then If booTerminate = False Then Set xlApp = New Excel.Application End If ElseIf booTerminate = True Then xlApp.Quit Set xlApp = Nothing End If If booTerminate = False Then Set xlWkb = xlApp.Workbooks.Open(FileName:=strFileName, UpdateLinks:=0, ReadOnly:=True) ' Make Excel visible (for troubleshooting only) or not. xlApp.Visible = False 'True For Each varMacro In avarMacros() If Not Len(varMacro) = 0 Then Debug.Print "xl run", Time, varMacro booSuccess = xlApp.Run(varMacro) End If Next varMacro Else booSuccess = True End If RunExcelMacros = booSuccess Exit_RunExcelMacros: On Error Resume Next If booTerminate = False Then xlWkb.Close SaveChanges:=False Set xlWkb = Nothing End If Debug.Print "xl end", Time Exit Function Err_RunExcelMacros: Select Case Err Case 0 'insert Errors you wish to ignore here Resume Next Case Else 'All other errors will trap Beep MsgBox "Error: " & Err & ". " & Err.Description, vbCritical + vbOKOnly, "Error, macro " & varMacro Resume Exit_RunExcelMacros End Select End Function /gustav >>> BradM at blackforestltd.com 11-07-2011 20:39 >>> I am doing some R&D work involving Access/Excel integration (Windows Automation). I just finished reading a book titled "Excel and Access Integration". It is a well-written book, but it does not get into a great deal of depth with regards to the "Automation" realm. I was wondering if there is a resource (book or website) that covers this area in more depth. In a nutshell, I would like to be able to do anything that a person can do in "native Excel" via commands in Access 2007 which control Excel. Thanks for your help. Brad From vbacreations at gmail.com Mon Jul 11 16:10:46 2011 From: vbacreations at gmail.com (William Benson (VBACreations.Com)) Date: Mon, 11 Jul 2011 17:10:46 -0400 Subject: [AccessD] Select Distinct not working on union query - due to MEMO field? Message-ID: <000101cc400f$015a6450$040f2cf0$@gmail.com> I was using Select distinct on records from a subquery which itself was the result of a union query. To my mind, Select distinct should produce the same result in such a situation as a group by query using the same fields. The Group By query condensed the records, however, and the select distinct query did not. I chased down the reason to this: One of the fields was a memo field. I don't know if the takeaway here is (1) Use Group By queries instead of Select Distinct, whenever possible (2) Don't use MEMO fields whenever possible (3) I have not really discerned the real reason for the difference and am fooling myself. ' METHOD 1 - SURPRISE, TOO MANY RECORDS Select Distinct Field1, Field2, ... FieldN From ( Select Field1, Field2, ... FieldN From Tbl1 Union All Select Field1, Field2, ... FieldN From Tbl2 ) 'METHOD 2 - You can trust this result Select Field1, Field2, ... FieldN From ( Select Field1, Field2, ... FieldN From Tbl1 Union All Select Field1, Field2, ... FieldN From Tbl2 ) Group By Field1, Field2, ... FieldN From ssharkins at gmail.com Mon Jul 11 16:43:28 2011 From: ssharkins at gmail.com (Susan Harkins) Date: Mon, 11 Jul 2011 17:43:28 -0400 Subject: [AccessD] Select Distinct not working on union query - due to MEMOfield? References: <000101cc400f$015a6450$040f2cf0$@gmail.com> Message-ID: <11D73F4487694BA2BBE4323F109F64FD@SusanHarkins> DISTINCT considers every field in your query. Susan H. >I was using Select distinct on records from a subquery which itself was the > result of a union query. To my mind, Select distinct should produce the > same > result in such a situation as a group by query using the same fields. The > Group By query condensed the records, however, and the select distinct > query > did not. I chased down the reason to this: One of the fields was a memo > field. > > I don't know if the takeaway here is > > (1) Use Group By queries instead of Select Distinct, whenever possible > (2) Don't use MEMO fields whenever possible > (3) I have not really discerned the real reason for the difference and am > fooling myself. > From vbacreations at gmail.com Mon Jul 11 17:43:30 2011 From: vbacreations at gmail.com (William Benson (VBACreations.Com)) Date: Mon, 11 Jul 2011 18:43:30 -0400 Subject: [AccessD] Select Distinct not working on union query - due to MEMO field? Message-ID: <000201cc401b$f5bd99c0$e138cd40$@gmail.com> Hi Sue, I don't understand what you mean, sorry - please explain deeper if possible. Does it have anything at all to do with the Memo field? - because changing that to TEXT cured the duplication in the DISTINCT query. Also, do you mind commenting (or anyone...) I am trying to write complex SQL queries in VBA, in partial steps so I can evaluate the intermediary SQL for syntax errors. The below expression will not work unless I remove inner parentheses. I would like to understand why that is. Select * from ( (Select * from Tbl1) Union All (Select * from Tbl2) ) Access is happy with Select * from ( Select * from Tbl1 Union All Select * from Tbl2 ) From ssharkins at gmail.com Mon Jul 11 18:02:20 2011 From: ssharkins at gmail.com (Susan Harkins) Date: Mon, 11 Jul 2011 19:02:20 -0400 Subject: [AccessD] Select Distinct not working on union query - dueto MEMO field? References: <000201cc401b$f5bd99c0$e138cd40$@gmail.com> Message-ID: <13934C5C16A249C0AEB922A97A422A1C@SusanHarkins> 1.) You can't group on a MEMO field, but that doesn't seem to be your problem 2.) DISTINCT considers all the fields in your query -- all the fields in the query combined create a unique record. I don't believe DISTINCT is supported by a MEMO field. I know SQL Server doesn't, Fox Pro doesn't -- but Jet and T-SQL have many differences, this could be one of them. Susan H. > > I don't understand what you mean, sorry - please explain deeper if > possible. > Does it have anything at all to do with the Memo field? - because changing > that to TEXT cured the duplication in the DISTINCT query. > > > Also, do you mind commenting (or anyone...) > I am trying to write complex SQL queries in VBA, in partial steps so I can > evaluate the intermediary SQL for syntax errors. The below expression will > not work unless I remove inner parentheses. I would like to understand why > that is. > > Select * from > ( > (Select * from Tbl1) > Union All > (Select * from Tbl2) > ) > > > > Access is happy with > > Select * from > ( > Select * from Tbl1 > Union All > Select * from Tbl2 > ) > > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com From vbacreations at gmail.com Mon Jul 11 19:16:14 2011 From: vbacreations at gmail.com (William Benson (VBACreations.Com)) Date: Mon, 11 Jul 2011 20:16:14 -0400 Subject: [AccessD] Select Distinct not working on union query - dueto MEMO field? In-Reply-To: <13934C5C16A249C0AEB922A97A422A1C@SusanHarkins> References: <000201cc401b$f5bd99c0$e138cd40$@gmail.com> <13934C5C16A249C0AEB922A97A422A1C@SusanHarkins> Message-ID: <000401cc4028$ea6c3010$bf449030$@gmail.com> Sue, I think then (2) reassures me I did the right thing to switch to a Group By query... since Ac2010 appears to be cutting me some slack despite my bucking a convention. Thank you so much for the explanation. -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Susan Harkins Sent: Monday, July 11, 2011 7:02 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Select Distinct not working on union query - dueto MEMO field? 1.) You can't group on a MEMO field, but that doesn't seem to be your problem 2.) DISTINCT considers all the fields in your query -- all the fields in the query combined create a unique record. I don't believe DISTINCT is supported by a MEMO field. I know SQL Server doesn't, Fox Pro doesn't -- but Jet and T-SQL have many differences, this could be one of them. Susan H. > > I don't understand what you mean, sorry - please explain deeper if > possible. > Does it have anything at all to do with the Memo field? - because changing > that to TEXT cured the duplication in the DISTINCT query. > > > Also, do you mind commenting (or anyone...) > I am trying to write complex SQL queries in VBA, in partial steps so I can > evaluate the intermediary SQL for syntax errors. The below expression will > not work unless I remove inner parentheses. I would like to understand why > that is. > > Select * from > ( > (Select * from Tbl1) > Union All > (Select * from Tbl2) > ) > > > > Access is happy with > > Select * from > ( > Select * from Tbl1 > Union All > Select * from Tbl2 > ) > > > > -- > 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 ssharkins at gmail.com Mon Jul 11 19:33:47 2011 From: ssharkins at gmail.com (Susan Harkins) Date: Mon, 11 Jul 2011 20:33:47 -0400 Subject: [AccessD] Select Distinct not working on union query- dueto MEMO field? References: <000201cc401b$f5bd99c0$e138cd40$@gmail.com><13934C5C16A249C0AEB922A97A422A1C@SusanHarkins> <000401cc4028$ea6c3010$bf449030$@gmail.com> Message-ID: I'd be surprised if DISTINCT worked against a MEMO -- although the link only mentions dBase, I'd still be surprised. I'm not sure I understand why a MEMO field would need to be part of a GROUP BY or a DISTINCT, but as long as it works. :) Susan H. > > I think then (2) reassures me I did the right thing to switch to a Group > By > query... since Ac2010 appears to be cutting me some slack despite my > bucking > a convention. Thank you so much for the explanation. > > > 1.) You can't group on a MEMO field, but that doesn't seem to be your > problem > 2.) DISTINCT considers all the fields in your query -- all the fields in > the > > query combined create a unique record. > > I don't believe DISTINCT is supported by a MEMO field. I know SQL Server > doesn't, Fox Pro doesn't -- but Jet and T-SQL have many differences, this > could be one of them. > > > > Susan H. From vbacreations at gmail.com Mon Jul 11 20:59:18 2011 From: vbacreations at gmail.com (William Benson (VBACreations.Com)) Date: Mon, 11 Jul 2011 21:59:18 -0400 Subject: [AccessD] Select Distinct not working on union query- dueto MEMO field? In-Reply-To: References: <000201cc401b$f5bd99c0$e138cd40$@gmail.com><13934C5C16A249C0AEB922A97A422A1C@SusanHarkins> <000401cc4028$ea6c3010$bf449030$@gmail.com> Message-ID: <000b01cc4037$512b1a60$f3814f20$@gmail.com> When I changed the field type from MEMO to TEXT and found Distinct started working again... I was pretty sure the MEMO field was the reason. I know MEMO causes problems with soe other areas of SQL... however, I appreciate you confirming it. What I meant about bucking convention was based on you writing: >> You can't group on a MEMO field I appear to be able to group on a memo field without a problem in my current application. Thanks again, Bill -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Susan Harkins Sent: Monday, July 11, 2011 8:34 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Select Distinct not working on union query- dueto MEMO field? I'd be surprised if DISTINCT worked against a MEMO -- although the link only mentions dBase, I'd still be surprised. I'm not sure I understand why a MEMO field would need to be part of a GROUP BY or a DISTINCT, but as long as it works. :) Susan H. > > I think then (2) reassures me I did the right thing to switch to a Group > By > query... since Ac2010 appears to be cutting me some slack despite my > bucking > a convention. Thank you so much for the explanation. > > > 1.) You can't group on a MEMO field, but that doesn't seem to be your > problem > 2.) DISTINCT considers all the fields in your query -- all the fields in > the > > query combined create a unique record. > > I don't believe DISTINCT is supported by a MEMO field. I know SQL Server > doesn't, Fox Pro doesn't -- but Jet and T-SQL have many differences, this > could be one of them. > > > > Susan H. -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From Gustav at cactus.dk Tue Jul 12 07:01:59 2011 From: Gustav at cactus.dk (Gustav Brock) Date: Tue, 12 Jul 2011 14:01:59 +0200 Subject: [AccessD] Select Distinct not working on union query- due to MEMO field? Message-ID: Hi Bill But you are missing the obvious - the DISTINCT is not needed if you use UNION and not UNION ALL. If you don't need memo fields, certainly don't use them. If you have the need (for holding text beyond 256 chars) you may in your UNION or DISTINCT query use: LEFT(YourMemoField, 256) /gustav From vbacreations at gmail.com Tue Jul 12 07:51:11 2011 From: vbacreations at gmail.com (William Benson (VBACreations.Com)) Date: Tue, 12 Jul 2011 08:51:11 -0400 Subject: [AccessD] Select Distinct not working on union query- due to MEMO field? In-Reply-To: References: Message-ID: <001601cc4092$617ff380$247fda80$@gmail.com> Oh that is good to know! Yes, that will cut out a step or two now and in future. I appreciate the follow up on this! -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: Tuesday, July 12, 2011 8:02 AM To: accessd at databaseadvisors.com Subject: Re: [AccessD] Select Distinct not working on union query- due to MEMO field? Hi Bill But you are missing the obvious - the DISTINCT is not needed if you use UNION and not UNION ALL. If you don't need memo fields, certainly don't use them. If you have the need (for holding text beyond 256 chars) you may in your UNION or DISTINCT query use: LEFT(YourMemoField, 256) /gustav -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From jwcolby at colbyconsulting.com Tue Jul 12 08:43:08 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Tue, 12 Jul 2011 09:43:08 -0400 Subject: [AccessD] Select Distinct not working on union query- due to MEMO field? In-Reply-To: <001601cc4092$617ff380$247fda80$@gmail.com> References: <001601cc4092$617ff380$247fda80$@gmail.com> Message-ID: <4E1C4F6C.30505@colbyconsulting.com> It never occurred to me to use left(MemoField,255) when I needed to do something like that. The obvious is sometimes easy to miss. John W. Colby www.ColbyConsulting.com On 7/12/2011 8:51 AM, William Benson (VBACreations.Com) wrote: > Oh that is good to know! Yes, that will cut out a step or two now and in > future. > > I appreciate the follow up on this! > > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Gustav Brock > Sent: Tuesday, July 12, 2011 8:02 AM > To: accessd at databaseadvisors.com > Subject: Re: [AccessD] Select Distinct not working on union query- due to > MEMO field? > > Hi Bill > > But you are missing the obvious - the DISTINCT is not needed if you use > UNION and not UNION ALL. > > If you don't need memo fields, certainly don't use them. If you have the > need (for holding text beyond 256 chars) you may in your UNION or DISTINCT > query use: > > LEFT(YourMemoField, 256) > > /gustav > > From Gustav at cactus.dk Tue Jul 12 09:09:35 2011 From: Gustav at cactus.dk (Gustav Brock) Date: Tue, 12 Jul 2011 16:09:35 +0200 Subject: [AccessD] Select Distinct not working on union query - due to MEMO field? Message-ID: Hi Bill and JC Right, 255 chars it is. Further, using a second query you may even look up the full memo should you need it. This I posted in 2003 but I haven't used it since so it is still not tested in versions later than A97: Someone (JC?) mentioned this issue recently and I have experienced it too for Access 97 - even if you directly can fill a memo field to 64 K, a query will only retrieve 32 K. Even worse, if you fill a memo field with, say, the Rich Text Box control you can reach megabyte field content sizes while still only the first 32 K are retrieved. To circumvent this you may use DLookup to fetch the full content. Now, when the content is smaller than 32 K it is waste of time to pass DLookup; thus DLookup should only be used when necessary. Here is a method to do that. It is not tested in Access 2000+. /gustav Public Function LookupMemo( _ ByVal strSource As String, _ ByVal strFieldID As String, _ ByVal strFieldMemo As String, _ ByRef lngID As Long, _ ByRef varMemo As Variant) _ As String ' Extracts without truncation to 32768 characters the ' content of a memo field in a query. ' ' Assumes proper wrapping of table/field names containing spaces ' like "[My field name]" and a single field unique numeric key. ' ' Typical usage (SQL): ' ' SELECT ' ID, ' LookupMemo("Table1", "ID", "MemoField", [ID], [MemoField]) AS FullMemo ' FROM ' Table1; ' ' 2003-12-29. Cactus Data ApS, CPH. ' Maximum length of string from memo field when retrieved in a query. Const clngStrLen As Long = &H8000& Dim strExpr As String Dim strDomain As String Dim strCriteria As String Dim strMemo As String Dim lngLen As Long On Error GoTo Exit_LookupMemo If Not IsNull(varMemo) Then lngLen = Len(varMemo) If lngLen < clngStrLen Then ' The memo field is not truncated. strMemo = varMemo ElseIf Len(strSource) > 0 And Len(strFieldID) > 0 And Len(strFieldMemo) > 0 Then ' The memo is probably truncated by the query. ' Lookup the full memo in strSource. strExpr = strFieldMemo strDomain = strSource strCriteria = strFieldID & " = " & lngID & "" strMemo = vbNullString & DLookup(strExpr, strDomain, strCriteria) End If Else ' Return empty string. End If LookupMemo = strMemo Exit_LookupMemo: Exit Function Err_LookupMemo: ' Return empty string. Resume Exit_LookupMemo End Function /gustav >>> jwcolby at colbyconsulting.com 12-07-2011 15:43 >>> It never occurred to me to use left(MemoField,255) when I needed to do something like that. The obvious is sometimes easy to miss. John W. Colby www.ColbyConsulting.com On 7/12/2011 8:51 AM, William Benson (VBACreations.Com) wrote: > Oh that is good to know! Yes, that will cut out a step or two now and in > future. > > I appreciate the follow up on this! > > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Gustav Brock > Sent: Tuesday, July 12, 2011 8:02 AM > To: accessd at databaseadvisors.com > Subject: Re: [AccessD] Select Distinct not working on union query- due to > MEMO field? > > Hi Bill > > But you are missing the obvious - the DISTINCT is not needed if you use > UNION and not UNION ALL. > > If you don't need memo fields, certainly don't use them. If you have the > need (for holding text beyond 256 chars) you may in your UNION or DISTINCT > query use: > > LEFT(YourMemoField, 256) > > /gustav From Gustav at cactus.dk Tue Jul 12 09:16:02 2011 From: Gustav at cactus.dk (Gustav Brock) Date: Tue, 12 Jul 2011 16:16:02 +0200 Subject: [AccessD] The 25000 mark Message-ID: Hi all I noticed that may AccessD folder now holds 25000 postings - and I heavily delete OT and duplicate-type postings (like: Thanks! Much appreciated. -Joe"). No other folder comes near this volume. /gustav From DWUTKA at Marlow.com Tue Jul 12 09:32:06 2011 From: DWUTKA at Marlow.com (Drew Wutka) Date: Tue, 12 Jul 2011 09:32:06 -0500 Subject: [AccessD] The 25000 mark In-Reply-To: References: Message-ID: Should sign up for OT. ;) Drew -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: Tuesday, July 12, 2011 9:16 AM To: accessd at databaseadvisors.com Subject: [AccessD] The 25000 mark Hi all I noticed that may AccessD folder now holds 25000 postings - and I heavily delete OT and duplicate-type postings (like: Thanks! Much appreciated. -Joe"). No other folder comes near this volume. /gustav -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com The information contained in this transmission is intended only for the person or entity to which it is addressed and may contain II-VI Proprietary and/or II-VI Business Sensitive material. If you are not the intended recipient, please contact the sender immediately and destroy the material in its entirety, whether electronic or hard copy. You are notified that any review, retransmission, copying, disclosure, dissemination, or other use of, or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. From df.waters at comcast.net Tue Jul 12 14:34:20 2011 From: df.waters at comcast.net (Dan Waters) Date: Tue, 12 Jul 2011 14:34:20 -0500 Subject: [AccessD] More in Queries and Memo Fields Message-ID: <002501cc40ca$b30a2620$191e7260$@comcast.net> >From Allen Browne?s site: (http://allenbrowne.com/QueryPerfIssue.html) ------------------- This makes a major difference with?Memo?fields. If you GROUP BY a memo (Notes?in the example), Access compares only the first 255 characters, and the rest are?truncated! By choosing?First?instead of?Group By, JET is free to return the entire memo field from the first match. So not only is it more efficient; it actually solves the the problem of memo fields being chopped off. (A downside of using?First?is that the fields are aliased, e.g.?FirstOfNotes.) ------------------- Dan From df.waters at comcast.net Tue Jul 12 14:39:25 2011 From: df.waters at comcast.net (Dan Waters) Date: Tue, 12 Jul 2011 14:39:25 -0500 Subject: [AccessD] More in Queries and Memo Fields In-Reply-To: <002501cc40ca$b30a2620$191e7260$@comcast.net> References: <002501cc40ca$b30a2620$191e7260$@comcast.net> Message-ID: <002601cc40cb$68b89dd0$3a29d970$@comcast.net> This is the complete paragraph: ------------------ FIRST versus GROUP BY SELECT EmployeeID, LastName, Notes FROM Employees GROUP BY EmployeeID, LastName, Notes; SELECT EmployeeID, First(LastName) AS FirstOfLastName, First(Notes) AS FirstOfNotes FROM Employees GROUP BY EmployeeID; When you add a field to a Totals query, Access offers Group By in the Total row. The default behavior, therefore, is that Access must group on all these fields. A primary key is unique. So, if you group by the primary key field, there is no need to group by other fields in that table. You can optimize the query by choosing First instead of Group By in the Total row under the other fields. First allows JET to return the value from the first matching record, without needing to group by the field. This makes a major difference with Memo fields. If you GROUP BY a memo (Notes in the example), Access compares only the first 255 characters, and the rest are truncated! By choosing First instead of Group By, JET is free to return the entire memo field from the first match. So not only is it more efficient; it actually solves the the problem of memo fields being chopped off. (A downside of using First is that the fields are aliased, e.g. FirstOfNotes.) ------------------ From gustav at cactus.dk Tue Jul 12 15:19:53 2011 From: gustav at cactus.dk (Gustav Brock) Date: Tue, 12 Jul 2011 22:19:53 +0200 Subject: [AccessD] More in Queries and Memo Fields Message-ID: Hi Dan But First just returns the value from "one of the first rows", thus it isn't of much use. Actually, I have _never_ found a situation where First was of any use. /gustav >>> df.waters at comcast.net 12-07-2011 21:39 >>> This is the complete paragraph: ------------------ FIRST versus GROUP BY SELECT EmployeeID, LastName, Notes FROM Employees GROUP BY EmployeeID, LastName, Notes; SELECT EmployeeID, First(LastName) AS FirstOfLastName, First(Notes) AS FirstOfNotes FROM Employees GROUP BY EmployeeID; When you add a field to a Totals query, Access offers Group By in the Total row. The default behavior, therefore, is that Access must group on all these fields. A primary key is unique. So, if you group by the primary key field, there is no need to group by other fields in that table. You can optimize the query by choosing First instead of Group By in the Total row under the other fields. First allows JET to return the value from the first matching record, without needing to group by the field. This makes a major difference with Memo fields. If you GROUP BY a memo (Notes in the example), Access compares only the first 255 characters, and the rest are truncated! By choosing First instead of Group By, JET is free to return the entire memo field from the first match. So not only is it more efficient; it actually solves the the problem of memo fields being chopped off. (A downside of using First is that the fields are aliased, e.g. FirstOfNotes.) ------------------ From vbacreations at gmail.com Tue Jul 12 15:28:54 2011 From: vbacreations at gmail.com (William Benson (VBACreations.Com)) Date: Tue, 12 Jul 2011 16:28:54 -0400 Subject: [AccessD] More in Queries and Memo Fields In-Reply-To: <002501cc40ca$b30a2620$191e7260$@comcast.net> References: <002501cc40ca$b30a2620$191e7260$@comcast.net> Message-ID: <003201cc40d2$52999b10$f7ccd130$@gmail.com> At first blush my thought was like Dan's... If the whole point of NOT truncating the field is because you want to two records which have different comments to appear as separate records - then taking First() doesn't seem to get you further ahead. But it is VERY GOOD to be warned that I will never get what I need from a MEMO field, and that I am fooling myself in using it in a Group By. BTW ... the memo field was changed to text a long, long time ago ;-) -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Dan Waters Sent: Tuesday, July 12, 2011 3:34 PM To: 'Access Developers discussion and problem solving' Subject: [AccessD] More in Queries and Memo Fields >From Allen Browne?s site: (http://allenbrowne.com/QueryPerfIssue.html) ------------------- This makes a major difference with?Memo?fields. If you GROUP BY a memo (Notes?in the example), Access compares only the first 255 characters, and the rest are?truncated! By choosing?First?instead of?Group By, JET is free to return the entire memo field from the first match. So not only is it more efficient; it actually solves the the problem of memo fields being chopped off. (A downside of using?First?is that the fields are aliased, e.g.?FirstOfNotes.) ------------------- Dan -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From df.waters at comcast.net Tue Jul 12 16:30:36 2011 From: df.waters at comcast.net (Dan Waters) Date: Tue, 12 Jul 2011 16:30:36 -0500 Subject: [AccessD] More in Queries and Memo Fields In-Reply-To: References: Message-ID: <003801cc40da$f0ca74f0$d25f5ed0$@comcast.net> Well - I haven't tried what Allen was suggesting - just thought it was something to add to the discussion. -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: Tuesday, July 12, 2011 3:20 PM To: accessd at databaseadvisors.com Subject: Re: [AccessD] More in Queries and Memo Fields Hi Dan But First just returns the value from "one of the first rows", thus it isn't of much use. Actually, I have _never_ found a situation where First was of any use. /gustav >>> df.waters at comcast.net 12-07-2011 21:39 >>> This is the complete paragraph: ------------------ FIRST versus GROUP BY SELECT EmployeeID, LastName, Notes FROM Employees GROUP BY EmployeeID, LastName, Notes; SELECT EmployeeID, First(LastName) AS FirstOfLastName, First(Notes) AS FirstOfNotes FROM Employees GROUP BY EmployeeID; When you add a field to a Totals query, Access offers Group By in the Total row. The default behavior, therefore, is that Access must group on all these fields. A primary key is unique. So, if you group by the primary key field, there is no need to group by other fields in that table. You can optimize the query by choosing First instead of Group By in the Total row under the other fields. First allows JET to return the value from the first matching record, without needing to group by the field. This makes a major difference with Memo fields. If you GROUP BY a memo (Notes in the example), Access compares only the first 255 characters, and the rest are truncated! By choosing First instead of Group By, JET is free to return the entire memo field from the first match. So not only is it more efficient; it actually solves the the problem of memo fields being chopped off. (A downside of using First is that the fields are aliased, e.g. FirstOfNotes.) ------------------ -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From vbacreations at gmail.com Tue Jul 12 17:03:08 2011 From: vbacreations at gmail.com (William Benson (VBACreations.Com)) Date: Tue, 12 Jul 2011 18:03:08 -0400 Subject: [AccessD] More in Queries and Memo Fields In-Reply-To: References: Message-ID: <004101cc40df$7c6a2ec0$753e8c40$@gmail.com> Gustav, I think it can be useful. If the fields you are about are being forced to duplicate in the query because of some other field which you don't need to see in all its variations. If you're comfortable taking a representative example of that field, you can use First to show one of its members. FIRST and LAST offer us something that we can do in the Designer rather than resorting to the SQL window. -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: Tuesday, July 12, 2011 4:20 PM To: accessd at databaseadvisors.com Subject: Re: [AccessD] More in Queries and Memo Fields Hi Dan But First just returns the value from "one of the first rows", thus it isn't of much use. Actually, I have _never_ found a situation where First was of any use. /gustav >>> df.waters at comcast.net 12-07-2011 21:39 >>> This is the complete paragraph: ------------------ FIRST versus GROUP BY SELECT EmployeeID, LastName, Notes FROM Employees GROUP BY EmployeeID, LastName, Notes; SELECT EmployeeID, First(LastName) AS FirstOfLastName, First(Notes) AS FirstOfNotes FROM Employees GROUP BY EmployeeID; When you add a field to a Totals query, Access offers Group By in the Total row. The default behavior, therefore, is that Access must group on all these fields. A primary key is unique. So, if you group by the primary key field, there is no need to group by other fields in that table. You can optimize the query by choosing First instead of Group By in the Total row under the other fields. First allows JET to return the value from the first matching record, without needing to group by the field. This makes a major difference with Memo fields. If you GROUP BY a memo (Notes in the example), Access compares only the first 255 characters, and the rest are truncated! By choosing First instead of Group By, JET is free to return the entire memo field from the first match. So not only is it more efficient; it actually solves the the problem of memo fields being chopped off. (A downside of using First is that the fields are aliased, e.g. FirstOfNotes.) ------------------ -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From rls at WeBeDb.com Wed Jul 13 07:49:22 2011 From: rls at WeBeDb.com (Robert Stewart) Date: Wed, 13 Jul 2011 07:49:22 -0500 Subject: [AccessD] Access and Excel Integration - Resources? In-Reply-To: References: Message-ID: Everything is available to MS Access if you include the Excel library. For actual automation, you will have to write functions in MS Access that use the ones in Excel. I have an application (commercial) that allows the user to define the Excel workbook in MS Access via a set of tables and will built the Excel workbook dynamically based on that definition from data in the database. I wrote my own based on the needs of the application. At 03:29 PM 7/12/2011, you wrote: >Date: Mon, 11 Jul 2011 13:39:37 -0500 >From: "Brad Marks" >To: "Access Developers discussion and problem solving" > >Subject: [AccessD] Access and Excel Integration - Resources? >Message-ID: > >Content-Type: text/plain; charset="us-ascii" > >I am doing some R&D work involving Access/Excel integration (Windows >Automation). > >I just finished reading a book titled "Excel and Access Integration". >It is a well-written book, but it does not get into a great deal of >depth with regards to the "Automation" realm. > >I was wondering if there is a resource (book or website) that covers >this area in more depth. > >In a nutshell, I would like to be able to do anything that a person can >do in "native Excel" via commands in Access 2007 which control Excel. > >Thanks for your help. >Brad > Robert L. Stewart www.WeBeDb.com www.DBGUIDesign.com www.RLStewartPhotography.com From jwcolby at colbyconsulting.com Wed Jul 13 08:00:44 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Wed, 13 Jul 2011 09:00:44 -0400 Subject: [AccessD] Good price on 5400 rpm 1.5 tb disks Message-ID: <4E1D96FC.4070801@colbyconsulting.com> http://www.newegg.com/Special/ShellShocker.aspx?Tpk=shellshocker -- John W. Colby www.ColbyConsulting.com From rockysmolin at bchacc.com Wed Jul 13 18:25:24 2011 From: rockysmolin at bchacc.com (Rocky Smolin) Date: Wed, 13 Jul 2011 16:25:24 -0700 Subject: [AccessD] VBA run-time error 3170: Could not find installable ISAM Message-ID: <2B7A375995D24727A5D8506CB9413AF8@HAL9007> A prospect is getting this error: VBA run-time error 3170: Could not find installable ISAM When I do TransferSpreadsheet. Does anyone know offhand what the likeliest cause of this is? MTIA Rocky From BradM at blackforestltd.com Thu Jul 14 07:27:54 2011 From: BradM at blackforestltd.com (Brad Marks) Date: Thu, 14 Jul 2011 07:27:54 -0500 Subject: [AccessD] Generating an Excel Pivot Table from Access - Problem with Second Execution References: Message-ID: All, I am just starting to experiment with Access/Excel Automation Through a process of trial and error I have developed a small test Access application that is able to build a simple Excel Pivot Table. Building and viewing the Pivot Table works nicely the first time I execute the Access VBA code. If I exit Access and get back in again, things work nicely. However, when I try to execute the code more than one time (without getting out of Access), I receive Error 91 - "Object Variable or With block variable Not Set". I have tried many things but I cannot figure out how to prevent this error. I must be missing something. Below is the code that I am using. Thanks for your help with this. Brad ~~~~~~~~~~~~~ Dim XLApp As Excel.Application Dim XLWorkbook As Excel.Workbook Dim XLSheet As Excel.Worksheet Set XLApp = CreateObject("Excel.Application") XLApp.Visible = True Set XLWorkbook = XLApp.Workbooks.Add Set XLSheet = XLWorkbook.Sheets(1) XLSheet.Cells(1, 1).Value = "State" XLSheet.Cells(2, 1).Value = "MN" XLSheet.Cells(3, 1).Value = "WI" XLSheet.Cells(4, 1).Value = "SD" XLSheet.Cells(5, 1).Value = "ND" XLSheet.Cells(1, 2).Value = "Sales_Amt" XLSheet.Cells(2, 2).Value = "200" XLSheet.Cells(3, 2).Value = "300" XLSheet.Cells(4, 2).Value = "400" XLSheet.Cells(5, 2).Value = "500" ActiveWorkbook.PivotCaches.Create(SourceType:=xlDatabase, SourceData:= _ "Sheet1!R1C1:R5C2", Version:=xlPivotTableVersion12).CreatePivotTable _ TableDestination:="Sheet1!R9C1", TableName:="PivotTable3", DefaultVersion _ :=xlPivotTableVersion12 Sheets("Sheet1").Select Cells(9, 1).Select ActiveSheet.PivotTables("PivotTable3").PivotFields("State").Orientation = xlRowField ActiveSheet.PivotTables("PivotTable3").PivotFields("State").Position = 1 ActiveSheet.PivotTables("PivotTable3").AddDataField ActiveSheet.PivotTables( _ "PivotTable3").PivotFields("Sales_Amt"), "Sum of Sales_Amt", xlSum Set XLApp = Nothing Set XLWorkbook = Nothing Set XLSheet = Nothing ~~~~~~~~~~~~~ End of Code ~ ~~~~~~~~~ The Error 91 is issued on this statement on the "Second Execution" ActiveWorkbook.PivotCaches.Create(SourceType:=xlDatabase, SourceData:= _ "Sheet1!R1C1:R5C2", Version:=xlPivotTableVersion12).CreatePivotTable _ TableDestination:="Sheet1!R9C1", TableName:="PivotTable3", DefaultVersion _ :=xlPivotTableVersion12 ~~~~~~~~~~~~ From Gustav at cactus.dk Thu Jul 14 07:51:20 2011 From: Gustav at cactus.dk (Gustav Brock) Date: Thu, 14 Jul 2011 14:51:20 +0200 Subject: [AccessD] Generating an Excel Pivot Table from Access - Problem with Second Execution Message-ID: Hi Brad Without going deeper into your code, in Excel always be extremely careful and strict with properties, methods, and objects. Here you mix Sheet for Worksheet which is a no-no, and you use Select where you could use the much faster Activate. Also, objects should be closed if possible before setting them to Nothing. /gustav >>> BradM at blackforestltd.com 14-07-2011 14:27 >>> All, I am just starting to experiment with Access/Excel Automation Through a process of trial and error I have developed a small test Access application that is able to build a simple Excel Pivot Table. Building and viewing the Pivot Table works nicely the first time I execute the Access VBA code. If I exit Access and get back in again, things work nicely. However, when I try to execute the code more than one time (without getting out of Access), I receive Error 91 - "Object Variable or With block variable Not Set". I have tried many things but I cannot figure out how to prevent this error. I must be missing something. Below is the code that I am using. Thanks for your help with this. Brad ~~~~~~~~~~~~~ Dim XLApp As Excel.Application Dim XLWorkbook As Excel.Workbook Dim XLSheet As Excel.Worksheet Set XLApp = CreateObject("Excel.Application") XLApp.Visible = True Set XLWorkbook = XLApp.Workbooks.Add Set XLSheet = XLWorkbook.Sheets(1) XLSheet.Cells(1, 1).Value = "State" XLSheet.Cells(2, 1).Value = "MN" XLSheet.Cells(3, 1).Value = "WI" XLSheet.Cells(4, 1).Value = "SD" XLSheet.Cells(5, 1).Value = "ND" XLSheet.Cells(1, 2).Value = "Sales_Amt" XLSheet.Cells(2, 2).Value = "200" XLSheet.Cells(3, 2).Value = "300" XLSheet.Cells(4, 2).Value = "400" XLSheet.Cells(5, 2).Value = "500" ActiveWorkbook.PivotCaches.Create(SourceType:=xlDatabase, SourceData:= _ "Sheet1!R1C1:R5C2", Version:=xlPivotTableVersion12).CreatePivotTable _ TableDestination:="Sheet1!R9C1", TableName:="PivotTable3", DefaultVersion _ :=xlPivotTableVersion12 Sheets("Sheet1").Select Cells(9, 1).Select ActiveSheet.PivotTables("PivotTable3").PivotFields("State").Orientation = xlRowField ActiveSheet.PivotTables("PivotTable3").PivotFields("State").Position = 1 ActiveSheet.PivotTables("PivotTable3").AddDataField ActiveSheet.PivotTables( _ "PivotTable3").PivotFields("Sales_Amt"), "Sum of Sales_Amt", xlSum Set XLApp = Nothing Set XLWorkbook = Nothing Set XLSheet = Nothing ~~~~~~~~~~~~~ End of Code ~ ~~~~~~~~~ The Error 91 is issued on this statement on the "Second Execution" ActiveWorkbook.PivotCaches.Create(SourceType:=xlDatabase, SourceData:= _ "Sheet1!R1C1:R5C2", Version:=xlPivotTableVersion12).CreatePivotTable _ TableDestination:="Sheet1!R9C1", TableName:="PivotTable3", DefaultVersion _ :=xlPivotTableVersion12 ~~~~~~~~~~~~ From fuller.artful at gmail.com Thu Jul 14 08:36:36 2011 From: fuller.artful at gmail.com (Arthur Fuller) Date: Thu, 14 Jul 2011 09:36:36 -0400 Subject: [AccessD] Generating an Excel Pivot Table from Access - Problem with Second Execution In-Reply-To: References: Message-ID: I copied your code to a test MDB and interestingly, received an error on a different line than you, and with a different error message. I've played around a bit (e.g. changed "Sheets" to "WorkSheets", etc.) but the error persists. The offending line is: ActiveSheet.PivotTables("PivotTable3").AddDataField And the error message is: RunTime error 450: Wrong number of arguments or invalid property assignment. I'm running Office 2007. Very puzzling. Arthur From jwcolby at colbyconsulting.com Thu Jul 14 09:58:34 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Thu, 14 Jul 2011 10:58:34 -0400 Subject: [AccessD] Cannot Open Anymore Databases In-Reply-To: <000001cc3ff7$2b854cd0$828fe670$@com> References: <000001cc3ff7$2b854cd0$828fe670$@com> Message-ID: <4E1F041A.9030302@colbyconsulting.com> One of the things that helps is to use JIT subforms as well. JIT subforms only load subforms when the tab is clicked on. Since every combo and subform uses a recordset, loading subforms JIT really cuts down the number of recordsets used. It also speeds up loading the main form, sometimes drastically. John W. Colby www.ColbyConsulting.com On 7/11/2011 2:20 PM, Darrell Burns wrote: > I had the same problem with a form that had 5 subforms, each with multiple > queries. I submitted the question to every forum and discovered that there's > no easy cure. The connections limit is 256 but there's no function to tell > you how many you've used up. Connections to a back-end database count > double. After spending lots of time re-engineering my recordset actions and > being very meticulous about closing connections, the final solution was to > bind the subforms to temp tables and fill the tables as each tab is clicked. > So, your solution is the correct one. > - Darrell > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Tony Septav > Sent: Thursday, July 07, 2011 6:00 AM > To: accessd at databaseadvisors.com > Subject: [AccessD] Cannot Open Anymore Databases > > Hey All > Just curious. I was working on a report, I would view it and when I returned > to the design mode I would get the error message "Cannot open anymore > databases". The report is based on a union query, which is made up of 6 > subqueries. each of these subqueries is based on the results from about 3 or > 4 other querys. If I manually run the union query I don't get any error > messages, as I mentioned I only get the error message when working with the > report. Am I correct in assuming that the results of each of these queries > results in 1 instant of the database being opened and I have exceeded the 84 > (whatever) limit to the number of databases instances that can be open at > one time?? I solved the problem by appending the results of each of the 6 > queries to a temp table and using the table for the report. > > T. Septav > Nanaimo, BC > Canada From BradM at blackforestltd.com Thu Jul 14 11:12:15 2011 From: BradM at blackforestltd.com (Brad Marks) Date: Thu, 14 Jul 2011 11:12:15 -0500 Subject: [AccessD] Generating an Excel Pivot Table from Access - Problemwith Second Execution References: Message-ID: Arthur and Gustav, Thanks for the help, I appreciate it. I made the refinements that Gustav suggested, but I am still receiving the "91" Error. I also tried many other things but have not had success. Perhaps someone has an simple example of how to create an Excel Pivot table using "Automation" via Access VBA code. (and be able to execute the logic more than once without getting the 91 error.) Again, if I get out of Access and then back in again, everything works nicely. Thanks, Brad -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Brad Marks Sent: Thursday, July 14, 2011 7:28 AM To: Access Developers discussion and problem solving Subject: [AccessD] Generating an Excel Pivot Table from Access - Problemwith Second Execution All, I am just starting to experiment with Access/Excel Automation Through a process of trial and error I have developed a small test Access application that is able to build a simple Excel Pivot Table. Building and viewing the Pivot Table works nicely the first time I execute the Access VBA code. If I exit Access and get back in again, things work nicely. However, when I try to execute the code more than one time (without getting out of Access), I receive Error 91 - "Object Variable or With block variable Not Set". I have tried many things but I cannot figure out how to prevent this error. I must be missing something. Below is the code that I am using. Thanks for your help with this. Brad ~~~~~~~~~~~~~ Dim XLApp As Excel.Application Dim XLWorkbook As Excel.Workbook Dim XLSheet As Excel.Worksheet Set XLApp = CreateObject("Excel.Application") XLApp.Visible = True Set XLWorkbook = XLApp.Workbooks.Add Set XLSheet = XLWorkbook.Sheets(1) XLSheet.Cells(1, 1).Value = "State" XLSheet.Cells(2, 1).Value = "MN" XLSheet.Cells(3, 1).Value = "WI" XLSheet.Cells(4, 1).Value = "SD" XLSheet.Cells(5, 1).Value = "ND" XLSheet.Cells(1, 2).Value = "Sales_Amt" XLSheet.Cells(2, 2).Value = "200" XLSheet.Cells(3, 2).Value = "300" XLSheet.Cells(4, 2).Value = "400" XLSheet.Cells(5, 2).Value = "500" ActiveWorkbook.PivotCaches.Create(SourceType:=xlDatabase, SourceData:= _ "Sheet1!R1C1:R5C2", Version:=xlPivotTableVersion12).CreatePivotTable _ TableDestination:="Sheet1!R9C1", TableName:="PivotTable3", DefaultVersion _ :=xlPivotTableVersion12 Sheets("Sheet1").Select Cells(9, 1).Select ActiveSheet.PivotTables("PivotTable3").PivotFields("State").Orientation = xlRowField ActiveSheet.PivotTables("PivotTable3").PivotFields("State").Position = 1 ActiveSheet.PivotTables("PivotTable3").AddDataField ActiveSheet.PivotTables( _ "PivotTable3").PivotFields("Sales_Amt"), "Sum of Sales_Amt", xlSum Set XLApp = Nothing Set XLWorkbook = Nothing Set XLSheet = Nothing ~~~~~~~~~~~~~ End of Code ~ ~~~~~~~~~ The Error 91 is issued on this statement on the "Second Execution" ActiveWorkbook.PivotCaches.Create(SourceType:=xlDatabase, SourceData:= _ "Sheet1!R1C1:R5C2", Version:=xlPivotTableVersion12).CreatePivotTable _ TableDestination:="Sheet1!R9C1", TableName:="PivotTable3", DefaultVersion _ :=xlPivotTableVersion12 ~~~~~~~~~~~~ -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. From charlotte.foust at gmail.com Thu Jul 14 11:42:31 2011 From: charlotte.foust at gmail.com (Charlotte Foust) Date: Thu, 14 Jul 2011 09:42:31 -0700 Subject: [AccessD] Cannot Open Anymore Databases In-Reply-To: <4E1F041A.9030302@colbyconsulting.com> References: <000001cc3ff7$2b854cd0$828fe670$@com> <4E1F041A.9030302@colbyconsulting.com> Message-ID: And couple JIT with a tab control and you eliminate a lot of your issues immediately. Charlotte Foust On Thu, Jul 14, 2011 at 7:58 AM, jwcolby wrote: > One of the things that helps is to use JIT subforms as well. JIT subforms > only load subforms when the tab is clicked on. Since every combo and > subform uses a recordset, loading subforms JIT really cuts down the number > of recordsets used. It also speeds up loading the main form, sometimes > drastically. > > John W. Colby > www.ColbyConsulting.com > > > > On 7/11/2011 2:20 PM, Darrell Burns wrote: > >> I had the same problem with a form that had 5 subforms, each with multiple >> queries. I submitted the question to every forum and discovered that >> there's >> no easy cure. The connections limit is 256 but there's no function to tell >> you how many you've used up. Connections to a back-end database count >> double. After spending lots of time re-engineering my recordset actions >> and >> being very meticulous about closing connections, the final solution was to >> bind the subforms to temp tables and fill the tables as each tab is >> clicked. >> So, your solution is the correct one. >> - Darrell >> >> -----Original Message----- >> From: accessd-bounces@**databaseadvisors.com >> [mailto:accessd-bounces@**databaseadvisors.com] >> On Behalf Of Tony Septav >> Sent: Thursday, July 07, 2011 6:00 AM >> To: accessd at databaseadvisors.com >> Subject: [AccessD] Cannot Open Anymore Databases >> >> Hey All >> Just curious. I was working on a report, I would view it and when I >> returned >> to the design mode I would get the error message "Cannot open anymore >> databases". The report is based on a union query, which is made up of 6 >> subqueries. each of these subqueries is based on the results from about 3 >> or >> 4 other querys. If I manually run the union query I don't get any error >> messages, as I mentioned I only get the error message when working with >> the >> report. Am I correct in assuming that the results of each of these queries >> results in 1 instant of the database being opened and I have exceeded the >> 84 >> (whatever) limit to the number of databases instances that can be open at >> one time?? I solved the problem by appending the results of each of the 6 >> queries to a temp table and using the table for the report. >> >> T. Septav >> Nanaimo, BC >> Canada >> > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/**mailman/listinfo/accessd > > > Website: http://www.databaseadvisors.**com > > > From stuart at lexacorp.com.pg Thu Jul 14 15:16:58 2011 From: stuart at lexacorp.com.pg (Stuart McLachlan) Date: Fri, 15 Jul 2011 06:16:58 +1000 Subject: [AccessD] Generating an Excel Pivot Table from Access - Problemwith Second Execution In-Reply-To: References: , Message-ID: <4E1F4EBA.29684.83DCD28@stuart.lexacorp.com.pg> Search the archives for "unquailfied reference" I must have posted the same answer about half a dozen times. The old "unqualified reference" strikes again. See http://support.microsoft.com/kb/319832 When you write code to use an Excel object, method, or property, you should always precede the call with the appropriate object variable. If you do not, Visual Basic establishes its own reference to Excel... These lines for a start are unqualfied: Sheets("Sheet1").Select Cells(9, 1).Select -- Stuart > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Brad Marks > Sent: Thursday, July 14, 2011 7:28 AM To: Access Developers discussion > and problem solving Subject: [AccessD] Generating an Excel Pivot Table > from Access - Problemwith Second Execution > > All, > > I am just starting to experiment with Access/Excel Automation > > Through a process of trial and error I have developed a small test > Access application that is able to build a simple Excel Pivot Table. > Building and viewing the Pivot Table works nicely the first time I > execute the Access VBA code. If I exit Access and get back in again, > things work nicely. > > However, when I try to execute the code more than one time (without > getting out of Access), I receive Error 91 - "Object Variable or With > block variable Not Set". > > I have tried many things but I cannot figure out how to prevent this > error. I must be missing something. > > Below is the code that I am using. Thanks for your help with this. > > Brad > > ~~~~~~~~~~~~~ > Dim XLApp As Excel.Application > Dim XLWorkbook As Excel.Workbook > Dim XLSheet As Excel.Worksheet > > Set XLApp = CreateObject("Excel.Application") > > XLApp.Visible = True > > Set XLWorkbook = XLApp.Workbooks.Add > > Set XLSheet = XLWorkbook.Sheets(1) > > XLSheet.Cells(1, 1).Value = "State" > XLSheet.Cells(2, 1).Value = "MN" > XLSheet.Cells(3, 1).Value = "WI" > XLSheet.Cells(4, 1).Value = "SD" > XLSheet.Cells(5, 1).Value = "ND" > > XLSheet.Cells(1, 2).Value = "Sales_Amt" > XLSheet.Cells(2, 2).Value = "200" > XLSheet.Cells(3, 2).Value = "300" > XLSheet.Cells(4, 2).Value = "400" > XLSheet.Cells(5, 2).Value = "500" > > ActiveWorkbook.PivotCaches.Create(SourceType:=xlDatabase, SourceData:= > _ > "Sheet1!R1C1:R5C2", > Version:=xlPivotTableVersion12).CreatePivotTable _ > TableDestination:="Sheet1!R9C1", TableName:="PivotTable3", > DefaultVersion _ > :=xlPivotTableVersion12 > > Sheets("Sheet1").Select > > Cells(9, 1).Select > From BradM at blackforestltd.com Thu Jul 14 16:01:42 2011 From: BradM at blackforestltd.com (Brad Marks) Date: Thu, 14 Jul 2011 16:01:42 -0500 Subject: [AccessD] Generating an Excel Pivot Table from Access -Problemwith Second Execution References: , <4E1F4EBA.29684.83DCD28@stuart.lexacorp.com.pg> Message-ID: Stuart, Thank You! Thank You! Thank You! I owe you a beer! The Unqualified References were the problem. I am just starting to dabble with Access/Excel Automation. I am learning by trial and error (mostly error). I really appreciate the help. I have spent most of the day wrestling with this problem. Sincerely, Brad Marks ---Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Stuart McLachlan Sent: Thursday, July 14, 2011 3:17 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Generating an Excel Pivot Table from Access -Problemwith Second Execution Search the archives for "unquailfied reference" I must have posted the same answer about half a dozen times. The old "unqualified reference" strikes again. See http://support.microsoft.com/kb/319832 When you write code to use an Excel object, method, or property, you should always precede the call with the appropriate object variable. If you do not, Visual Basic establishes its own reference to Excel... These lines for a start are unqualfied: Sheets("Sheet1").Select Cells(9, 1).Select -- Stuart > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Brad Marks > Sent: Thursday, July 14, 2011 7:28 AM To: Access Developers discussion > and problem solving Subject: [AccessD] Generating an Excel Pivot Table > from Access - Problemwith Second Execution > > All, > > I am just starting to experiment with Access/Excel Automation > > Through a process of trial and error I have developed a small test > Access application that is able to build a simple Excel Pivot Table. > Building and viewing the Pivot Table works nicely the first time I > execute the Access VBA code. If I exit Access and get back in again, > things work nicely. > > However, when I try to execute the code more than one time (without > getting out of Access), I receive Error 91 - "Object Variable or With > block variable Not Set". > > I have tried many things but I cannot figure out how to prevent this > error. I must be missing something. > > Below is the code that I am using. Thanks for your help with this. > > Brad > > ~~~~~~~~~~~~~ > Dim XLApp As Excel.Application > Dim XLWorkbook As Excel.Workbook > Dim XLSheet As Excel.Worksheet > > Set XLApp = CreateObject("Excel.Application") > > XLApp.Visible = True > > Set XLWorkbook = XLApp.Workbooks.Add > > Set XLSheet = XLWorkbook.Sheets(1) > > XLSheet.Cells(1, 1).Value = "State" > XLSheet.Cells(2, 1).Value = "MN" > XLSheet.Cells(3, 1).Value = "WI" > XLSheet.Cells(4, 1).Value = "SD" > XLSheet.Cells(5, 1).Value = "ND" > > XLSheet.Cells(1, 2).Value = "Sales_Amt" > XLSheet.Cells(2, 2).Value = "200" > XLSheet.Cells(3, 2).Value = "300" > XLSheet.Cells(4, 2).Value = "400" > XLSheet.Cells(5, 2).Value = "500" > > ActiveWorkbook.PivotCaches.Create(SourceType:=xlDatabase, SourceData:= > _ > "Sheet1!R1C1:R5C2", > Version:=xlPivotTableVersion12).CreatePivotTable _ > TableDestination:="Sheet1!R9C1", TableName:="PivotTable3", > DefaultVersion _ > :=xlPivotTableVersion12 > > Sheets("Sheet1").Select > > Cells(9, 1).Select > -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. From vbacreations at gmail.com Fri Jul 15 00:34:04 2011 From: vbacreations at gmail.com (William Benson (VBACreations.Com)) Date: Fri, 15 Jul 2011 01:34:04 -0400 Subject: [AccessD] ScreenUpdating coming back on when controlling Excel via automation Message-ID: <000001cc42b0$d0591c80$710b5580$@gmail.com> Brad, here is more for you to geal with! I have googled this and seen it has affected more than me... but no one has a solution. When I am in Excel, I do not find Workbooks.Open causes screenupdating to toggle back on. However, when using an instance of Excel controlled through automation (from Access) it does turn screenupdating back on (and the visible property of the application instance as well). It is a bit frustrating. So far I cannot do anything about it except use code to turn it off again. It is creating visuals that I do not want my client to endure. Anyone have a solution to keep Excel really in the silent and invisible background when using automation? From vbacreations at gmail.com Fri Jul 15 00:34:42 2011 From: vbacreations at gmail.com (William Benson (VBACreations.Com)) Date: Fri, 15 Jul 2011 01:34:42 -0400 Subject: [AccessD] ScreenUpdating coming back on when controlling Excel via automation Message-ID: <000101cc42b0$e6c047a0$b440d6e0$@gmail.com> Deal... -----Original Message----- From: William Benson (VBACreations.Com) [mailto:vbacreations at gmail.com] Sent: Friday, July 15, 2011 1:34 AM To: Access Developers discussion and problem solving Subject: ScreenUpdating coming back on when controlling Excel via automation Brad, here is more for you to geal with! I have googled this and seen it has affected more than me... but no one has a solution. When I am in Excel, I do not find Workbooks.Open causes screenupdating to toggle back on. However, when using an instance of Excel controlled through automation (from Access) it does turn screenupdating back on (and the visible property of the application instance as well). It is a bit frustrating. So far I cannot do anything about it except use code to turn it off again. It is creating visuals that I do not want my client to endure. Anyone have a solution to keep Excel really in the silent and invisible background when using automation? From accessd at shaw.ca Fri Jul 15 16:31:23 2011 From: accessd at shaw.ca (Jim Lawrence) Date: Fri, 15 Jul 2011 14:31:23 -0700 Subject: [AccessD] Migrating Microsoft Access Databases to SQL Server 2008 In-Reply-To: <4E1F4EBA.29684.83DCD28@stuart.lexacorp.com.pg> References: <4E1F4EBA.29684.83DCD28@stuart.lexacorp.com.pg> Message-ID: <21F07958DF334582B074EA55D510209B@creativesystemdesigns.com> For all you who have not done a migration before or are a little rusty here is a link to a very nice article on migrating from a Microsoft Access Databases to SQL Server 2008 Database. http://www.databasejournal.com/features/msaccess/migrating-access-databases- to-sql-server.html Jim From vbacreations at gmail.com Fri Jul 15 20:44:05 2011 From: vbacreations at gmail.com (William Benson) Date: Fri, 15 Jul 2011 21:44:05 -0400 Subject: [AccessD] VBA run-time error 3170: Could not find installable ISAM In-Reply-To: <2B7A375995D24727A5D8506CB9413AF8@HAL9007> References: <2B7A375995D24727A5D8506CB9413AF8@HAL9007> Message-ID: Could it be they have excel set to ignore requests from other applications? (DDE). On Jul 13, 2011 7:27 PM, "Rocky Smolin" wrote: > A prospect is getting this error: > > VBA run-time error 3170: Could not find installable ISAM > > When I do TransferSpreadsheet. > > Does anyone know offhand what the likeliest cause of this is? > > MTIA > > Rocky > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com From gustav at cactus.dk Sat Jul 16 02:53:45 2011 From: gustav at cactus.dk (Gustav Brock) Date: Sat, 16 Jul 2011 09:53:45 +0200 Subject: [AccessD] VBA run-time error 3170: Could not find installable ISAM Message-ID: Hi Rocky Or, when installing Access, you forgot to mark the driver for Excel? /gustav >>> vbacreations at gmail.com 16-07-2011 03:44 >>> Could it be they have excel set to ignore requests from other applications? (DDE). On Jul 13, 2011 7:27 PM, "Rocky Smolin" wrote: > A prospect is getting this error: > > VBA run-time error 3170: Could not find installable ISAM > > When I do TransferSpreadsheet. > > Does anyone know offhand what the likeliest cause of this is? > > MTIA > > Rocky From jwcolby at colbyconsulting.com Sat Jul 16 08:35:28 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Sat, 16 Jul 2011 09:35:28 -0400 Subject: [AccessD] Elapsed time class - Stuart please ignore... Message-ID: <4E2193A0.1000509@colbyconsulting.com> I'm building a little database to time / log my son's computer time. I have a form which he uses to select a game which opens the game for him, creates a record in the table and starts the timer, leaving this form up in the background behind the game. As he closes the game the form becomes visible and he clicks a button to update the stop time in the table and stops the elapsed time timer. Not yet done, I will be causing the form to beep at him as he goes over the allotted time to play the game. Nothing special here, just wrapping the code / date I needed to measure elapsed time into a class. Obviously the point of putting it in a class is that it can be used in one or a hundred forms to perform elapsed time calcs, and it carves out all of that data / logic into a single place. To use it in any form just dimension a variable and set it to a new instance of the variable: Dim mcElapsedTime As clsElapsedTime Private Sub Form_Open(Cancel As Integer) Set mcElapsedTime = New clsElapsedTime Me.TimerInterval = 1000 - set up the timer for one second timer ticks End Sub Private Sub Form_Timer() mcElapsedTime.UpdateElapsedTime txtElapsedTime = mcElapsedTime.pElapsedTime End Sub The elapsed time class: Option Compare Database Option Explicit Private mlngSeconds As Long Private mlngMinutes As Long Private mlngHours As Long Private mstrElapsedTime Property Get pElapsedTime() As String pElapsedTime = mstrElapsedTime End Property Property Get pSeconds() As Long pSeconds = mlngSeconds End Property Property Get pMinutes() As Long pMinutes = mlngMinutes End Property Property Get pHours() As Long pHours = mlngHours End Property Private Function CalcElapsedTime() mstrElapsedTime = mlngHours & ":" & mlngMinutes & ":" & mlngSeconds End Function Function mResetElapsedTime() mlngSeconds = 0 mlngMinutes = 0 mlngHours = 0 End Function Function UpdateElapsedTime() mlngSeconds = mlngSeconds + 1 If mlngSeconds >= 60 Then mlngSeconds = 0 mlngMinutes = mlngMinutes + 1 End If If mlngMinutes >= 60 Then mlngMinutes = 0 mlngHours = mlngHours + 1 End If CalcElapsedTime End Function -- John W. Colby www.ColbyConsulting.com From rockysmolin at bchacc.com Sat Jul 16 09:02:09 2011 From: rockysmolin at bchacc.com (Rocky Smolin) Date: Sat, 16 Jul 2011 07:02:09 -0700 Subject: [AccessD] VBA run-time error 3170: Could not find installableISAM In-Reply-To: References: Message-ID: <2A696EF71D4743F79FE709F132029C5A@HAL9007> Possible. I'll forward to the client. Thanks Rocky -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: Saturday, July 16, 2011 12:54 AM To: accessd at databaseadvisors.com Subject: Re: [AccessD] VBA run-time error 3170: Could not find installableISAM Hi Rocky Or, when installing Access, you forgot to mark the driver for Excel? /gustav >>> vbacreations at gmail.com 16-07-2011 03:44 >>> Could it be they have excel set to ignore requests from other applications? (DDE). On Jul 13, 2011 7:27 PM, "Rocky Smolin" wrote: > A prospect is getting this error: > > VBA run-time error 3170: Could not find installable ISAM > > When I do TransferSpreadsheet. > > Does anyone know offhand what the likeliest cause of this is? > > MTIA > > Rocky -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From rockysmolin at bchacc.com Sat Jul 16 09:10:25 2011 From: rockysmolin at bchacc.com (Rocky Smolin) Date: Sat, 16 Jul 2011 07:10:25 -0700 Subject: [AccessD] Elapsed time class - Stuart please ignore... In-Reply-To: <4E2193A0.1000509@colbyconsulting.com> References: <4E2193A0.1000509@colbyconsulting.com> Message-ID: Ooh, I could that. Can I get a copy when it's ready? Sign me, Living With a StarCraft Addict (Rocky) -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Saturday, July 16, 2011 6:35 AM To: Access Developers discussion and problem solving Subject: [AccessD] Elapsed time class - Stuart please ignore... I'm building a little database to time / log my son's computer time. I have a form which he uses to select a game which opens the game for him, creates a record in the table and starts the timer, leaving this form up in the background behind the game. As he closes the game the form becomes visible and he clicks a button to update the stop time in the table and stops the elapsed time timer. Not yet done, I will be causing the form to beep at him as he goes over the allotted time to play the game. Nothing special here, just wrapping the code / date I needed to measure elapsed time into a class. Obviously the point of putting it in a class is that it can be used in one or a hundred forms to perform elapsed time calcs, and it carves out all of that data / logic into a single place. To use it in any form just dimension a variable and set it to a new instance of the variable: Dim mcElapsedTime As clsElapsedTime Private Sub Form_Open(Cancel As Integer) Set mcElapsedTime = New clsElapsedTime Me.TimerInterval = 1000 - set up the timer for one second timer ticks End Sub Private Sub Form_Timer() mcElapsedTime.UpdateElapsedTime txtElapsedTime = mcElapsedTime.pElapsedTime End Sub The elapsed time class: Option Compare Database Option Explicit Private mlngSeconds As Long Private mlngMinutes As Long Private mlngHours As Long Private mstrElapsedTime Property Get pElapsedTime() As String pElapsedTime = mstrElapsedTime End Property Property Get pSeconds() As Long pSeconds = mlngSeconds End Property Property Get pMinutes() As Long pMinutes = mlngMinutes End Property Property Get pHours() As Long pHours = mlngHours End Property Private Function CalcElapsedTime() mstrElapsedTime = mlngHours & ":" & mlngMinutes & ":" & mlngSeconds End Function Function mResetElapsedTime() mlngSeconds = 0 mlngMinutes = 0 mlngHours = 0 End Function Function UpdateElapsedTime() mlngSeconds = mlngSeconds + 1 If mlngSeconds >= 60 Then mlngSeconds = 0 mlngMinutes = mlngMinutes + 1 End If If mlngMinutes >= 60 Then mlngMinutes = 0 mlngHours = mlngHours + 1 End If CalcElapsedTime End Function -- John W. Colby www.ColbyConsulting.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From jimdettman at verizon.net Sat Jul 16 09:33:56 2011 From: jimdettman at verizon.net (Jim Dettman) Date: Sat, 16 Jul 2011 10:33:56 -0400 Subject: [AccessD] VBA run-time error 3170: Could not find installable ISAM In-Reply-To: <2B7A375995D24727A5D8506CB9413AF8@HAL9007> References: <2B7A375995D24727A5D8506CB9413AF8@HAL9007> Message-ID: <242976E451CD4C82AB1CB0124621F85D@XPS> Rocky, Depends on version, but in the past, corrupt registry entries was usually the cause (assuming this was working already). See: When you import files, export files, or link files in Access 2002 or in Access 2003, some file types are missing, or you may receive a "Could not find installable ISAM" error message http://support.microsoft.com/kb/283881 This type of problem was the same all the way back through A97 (different registry keys though). Jim. -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Rocky Smolin Sent: Wednesday, July 13, 2011 07:25 PM To: accessd at databaseadvisors.com Subject: [AccessD] VBA run-time error 3170: Could not find installable ISAM A prospect is getting this error: VBA run-time error 3170: Could not find installable ISAM When I do TransferSpreadsheet. Does anyone know offhand what the likeliest cause of this is? MTIA Rocky -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From fuller.artful at gmail.com Sat Jul 16 09:48:36 2011 From: fuller.artful at gmail.com (Arthur Fuller) Date: Sat, 16 Jul 2011 10:48:36 -0400 Subject: [AccessD] Elapsed time class - Stuart please ignore... In-Reply-To: <4E2193A0.1000509@colbyconsulting.com> References: <4E2193A0.1000509@colbyconsulting.com> Message-ID: Nice and clean. How do you stop the timer? A. From jwcolby at colbyconsulting.com Sat Jul 16 10:01:25 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Sat, 16 Jul 2011 11:01:25 -0400 Subject: [AccessD] Elapsed time class - Stuart please ignore... In-Reply-To: References: <4E2193A0.1000509@colbyconsulting.com> Message-ID: <4E21A7C5.1000200@colbyconsulting.com> Set the form's TimerInterval to 0. The class with a pad function for the display and changing longs to int. Option Compare Database Option Explicit Private mintSeconds As Integer Private mintMinutes As Integer Private mintHours As Integer Private mstrElapsedTime Property Get pElapsedTime() As String pElapsedTime = mstrElapsedTime End Property Property Get pSeconds() As Integer pSeconds = mintSeconds End Property Property Get pMinutes() As Integer pMinutes = mintMinutes End Property Property Get pHours() As Integer pHours = mintHours End Property Function mPad(intToPad As Integer) As String Dim strToPad strToPad = intToPad If Len(strToPad < 2) Then strToPad = "0" & strToPad End If mPad = strToPad End Function Private Function CalcElapsedTime() Dim strPad As String mstrElapsedTime = mPad(mintHours) & ":" & mPad(mintMinutes) & ":" & mPad(mintSeconds) End Function Function mResetElapsedTime() mintSeconds = 0 mintMinutes = 0 mintHours = 0 End Function Function UpdateElapsedTime() mintSeconds = mintSeconds + 1 If mintSeconds >= 60 Then mintSeconds = 0 mintMinutes = mintMinutes + 1 End If If mintMinutes >= 60 Then mintMinutes = 0 mintHours = mintHours + 1 End If CalcElapsedTime End Function John W. Colby www.ColbyConsulting.com On 7/16/2011 10:48 AM, Arthur Fuller wrote: > Nice and clean. How do you stop the timer? > > A. From rockysmolin at bchacc.com Sat Jul 16 10:11:26 2011 From: rockysmolin at bchacc.com (Rocky Smolin) Date: Sat, 16 Jul 2011 08:11:26 -0700 Subject: [AccessD] VBA run-time error 3170: Could not find installableISAM In-Reply-To: <242976E451CD4C82AB1CB0124621F85D@XPS> References: <2B7A375995D24727A5D8506CB9413AF8@HAL9007> <242976E451CD4C82AB1CB0124621F85D@XPS> Message-ID: Thanks - will forward. BTW, I worked around the problem by using transfertext to a CSV file which opens just fine in Excel. :) Rocky -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Jim Dettman Sent: Saturday, July 16, 2011 7:34 AM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] VBA run-time error 3170: Could not find installableISAM Rocky, Depends on version, but in the past, corrupt registry entries was usually the cause (assuming this was working already). See: When you import files, export files, or link files in Access 2002 or in Access 2003, some file types are missing, or you may receive a "Could not find installable ISAM" error message http://support.microsoft.com/kb/283881 This type of problem was the same all the way back through A97 (different registry keys though). Jim. -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Rocky Smolin Sent: Wednesday, July 13, 2011 07:25 PM To: accessd at databaseadvisors.com Subject: [AccessD] VBA run-time error 3170: Could not find installable ISAM A prospect is getting this error: VBA run-time error 3170: Could not find installable ISAM When I do TransferSpreadsheet. Does anyone know offhand what the likeliest cause of this is? MTIA Rocky -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From rockysmolin at bchacc.com Sat Jul 16 10:18:09 2011 From: rockysmolin at bchacc.com (Rocky Smolin) Date: Sat, 16 Jul 2011 08:18:09 -0700 Subject: [AccessD] VBA run-time error 3170: Could not find installableISAM In-Reply-To: References: <2B7A375995D24727A5D8506CB9413AF8@HAL9007> Message-ID: William: Where do you set that DDE parameter? Thanks, Rocky -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of William Benson Sent: Friday, July 15, 2011 6:44 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] VBA run-time error 3170: Could not find installableISAM Could it be they have excel set to ignore requests from other applications? (DDE). On Jul 13, 2011 7:27 PM, "Rocky Smolin" wrote: > A prospect is getting this error: > > VBA run-time error 3170: Could not find installable ISAM > > When I do TransferSpreadsheet. > > Does anyone know offhand what the likeliest cause of this is? > > MTIA > > Rocky > > > -- > 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 jwcolby at colbyconsulting.com Sat Jul 16 13:46:59 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Sat, 16 Jul 2011 14:46:59 -0400 Subject: [AccessD] BE builder Message-ID: <4E21DCA3.6010105@colbyconsulting.com> I need an ultra simple BE builder. I have built my little game play logger for my son. It logs the time he starts and stops and plays a wave file - more and more often - to remind and encourage him to get off when his time is up. It only has a couple of simple tables, but it would be nice to split FE/BE so that if I fix a problem or add a feature I can update the FE. Ya know! It would be nice to have the program open and check if the BE exists, creating it if not. Placing the BE in the same dir as the FE would be fine. I can of course write that but if anyone has such a thing already that would be better. I did it long ago but it is lost in the deep shadows of the last century. Anyone? -- John W. Colby www.ColbyConsulting.com From stuart at lexacorp.com.pg Sat Jul 16 15:20:20 2011 From: stuart at lexacorp.com.pg (Stuart McLachlan) Date: Sun, 17 Jul 2011 06:20:20 +1000 Subject: [AccessD] BE builder In-Reply-To: <4E21DCA3.6010105@colbyconsulting.com> References: <4E21DCA3.6010105@colbyconsulting.com> Message-ID: <4E21F284.17638.9E6E218@stuart.lexacorp.com.pg> Quick one of the top of my head: Obviously you need would probably want to add indexes and do some error checking as well. Option Compare Database Option Explicit Const BEName As String = "GameTimer.mdb" Function CheckBE() If Dir$(CurrentProject.Path & "\" & BEName) = "" Then CreateBE End Function Function CreateBE() As Long Dim wrkDefault As Workspace Dim dbsNew As Database Dim tdfNew As TableDef Set wrkDefault = DBEngine.Workspaces(0) Set dbsNew = wrkDefault.CreateDatabase(CurrentProject.Path & "\" & BEName, dbLangGeneral) Set tdfNew = dbsNew.CreateTableDef("tblGameTimes") With tdfNew .Fields.Append .CreateField("StartDateTime", dbDate) .Fields.Append .CreateField("ElapsedTime", dbLong) .Fields.Append .CreateField("Game", dbText) End With dbsNew.TableDefs.Append tdfNew dbsNew.Close End Function On 16 Jul 2011 at 14:46, jwcolby wrote: > I need an ultra simple BE builder. I have built my little game play > logger for my son. It logs the time he starts and stops and plays a > wave file - more and more often - to remind and encourage him to get > off when his time is up. > > It only has a couple of simple tables, but it would be nice to split > FE/BE so that if I fix a problem or add a feature I can update the FE. > Ya know! > > It would be nice to have the program open and check if the BE exists, > creating it if not. Placing the BE in the same dir as the FE would be > fine. > > I can of course write that but if anyone has such a thing already that > would be better. I did it long ago but it is lost in the deep shadows > of the last century. > > Anyone? > -- > John W. Colby > www.ColbyConsulting.com > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > From jwcolby at colbyconsulting.com Sat Jul 16 15:38:49 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Sat, 16 Jul 2011 16:38:49 -0400 Subject: [AccessD] BE builder In-Reply-To: <4E21F284.17638.9E6E218@stuart.lexacorp.com.pg> References: <4E21DCA3.6010105@colbyconsulting.com> <4E21F284.17638.9E6E218@stuart.lexacorp.com.pg> Message-ID: <4E21F6D9.1000406@colbyconsulting.com> Thanks Stuart! John W. Colby www.ColbyConsulting.com On 7/16/2011 4:20 PM, Stuart McLachlan wrote: > Quick one of the top of my head: Obviously you need would probably want to add indexes > and do some error checking as well. > > Option Compare Database > Option Explicit > > Const BEName As String = "GameTimer.mdb" > > Function CheckBE() > If Dir$(CurrentProject.Path& "\"& BEName) = "" Then CreateBE > End Function > > Function CreateBE() As Long > Dim wrkDefault As Workspace > Dim dbsNew As Database > Dim tdfNew As TableDef > > Set wrkDefault = DBEngine.Workspaces(0) > Set dbsNew = wrkDefault.CreateDatabase(CurrentProject.Path& "\"& BEName, > dbLangGeneral) > Set tdfNew = dbsNew.CreateTableDef("tblGameTimes") > With tdfNew > .Fields.Append .CreateField("StartDateTime", dbDate) > .Fields.Append .CreateField("ElapsedTime", dbLong) > .Fields.Append .CreateField("Game", dbText) > End With > dbsNew.TableDefs.Append tdfNew > dbsNew.Close > End Function > > > On 16 Jul 2011 at 14:46, jwcolby wrote: > >> I need an ultra simple BE builder. I have built my little game play >> logger for my son. It logs the time he starts and stops and plays a >> wave file - more and more often - to remind and encourage him to get >> off when his time is up. >> >> It only has a couple of simple tables, but it would be nice to split >> FE/BE so that if I fix a problem or add a feature I can update the FE. >> Ya know! >> >> It would be nice to have the program open and check if the BE exists, >> creating it if not. Placing the BE in the same dir as the FE would be >> fine. >> >> I can of course write that but if anyone has such a thing already that >> would be better. I did it long ago but it is lost in the deep shadows >> of the last century. >> >> Anyone? >> -- >> John W. Colby >> www.ColbyConsulting.com >> -- >> AccessD mailing list >> AccessD at databaseadvisors.com >> http://databaseadvisors.com/mailman/listinfo/accessd >> Website: http://www.databaseadvisors.com >> > > > From jwcolby at colbyconsulting.com Sat Jul 16 16:09:35 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Sat, 16 Jul 2011 17:09:35 -0400 Subject: [AccessD] where is OpenOffice data store Message-ID: <4E21FE0F.3090606@colbyconsulting.com> I installed OpenOffice on a computer I am giving away. I just happened to create a table in their database app and the data store looks rather robust, perhaps mysql? I have not managed to Google what data store open office uses. Does anyone know? -- John W. Colby www.ColbyConsulting.com From stuart at lexacorp.com.pg Sat Jul 16 16:49:52 2011 From: stuart at lexacorp.com.pg (Stuart McLachlan) Date: Sun, 17 Jul 2011 07:49:52 +1000 Subject: [AccessD] where is OpenOffice data store In-Reply-To: <4E21FE0F.3090606@colbyconsulting.com> References: <4E21FE0F.3090606@colbyconsulting.com> Message-ID: <4E220780.30775.A38D934@stuart.lexacorp.com.pg> HyperSQL http://hsqldb.org/ -- Stuart On 16 Jul 2011 at 17:09, jwcolby wrote: > I installed OpenOffice on a computer I am giving away. I just > happened to create a table in their database app and the data store > looks rather robust, perhaps mysql? I have not managed to Google what > data store open office uses. > > Does anyone know? > > -- > John W. Colby > www.ColbyConsulting.com > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > From jwcolby at colbyconsulting.com Sun Jul 17 13:22:34 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Sun, 17 Jul 2011 14:22:34 -0400 Subject: [AccessD] Child computer Game timer Message-ID: <4E23286A.8030301@colbyconsulting.com> I have designed a game timer for my son which I am making available to list members if they want it. This timer is designed for children who are old enough to play "unsupervised" and I want them to have a set time that they can play per session. I want to record when they start and stop and have a display of how long they have been playing. I used to have Robbie "write it down" and set a timer on the stove. Both of which he "forgot" more often than not. This is not a "dishonest teenager" control mechanism, I am not getting into trying to outsmart a teenager here. It is merely meant to allow me to see how much time my son is playing. I removed all of the shortcuts from the desktop etc so that the way he opens his games is through this database. I actually copied one of the shortcuts into the startup directory for one game that required a shortcut. I then informed him that there are consequences if he is playing without going through the timer. The timer is an Access form which has a game combo and a child id combo. In my case only my son uses it at the moment, though I will probably have my daughter use it as well. It is FE/BE. The form consists of: 1) A game combo 2) A child combo 3) A start time 4) A stop time 5) The minutes they are allowed to play, fixed ATM though it could be included in the child record. Status controls are: 1) Last Play elapsed time 2) Last play time stopped At the very bottom of the form is an elapsed time. So the child selects the game they will play. The game has the stuff required to actually open the game, usually the filespec for the game (path and file name) but it can also use a shortcut file if the game requires starting directory etc. Selecting the game starts a timer which shows up on the "Elapsed time" at the bottom, and records the start time. There is a button which enters the stopped time and moves to a new record. Once a record is "stopped" it can no longer be edited. No records can be deleted (through the form). When the time is up, my son often does the "I need to do this one small thing before I quit" routine. In order to allow that but still encourage him to get off, i built in an annoyance timer. The database does not (yet) shut down the game automatically (though I might go there) but it does beep a series of beeps when time is up, and then starts beeping at him every N seconds. N decreases over time until it is beeping every second. This is truly annoying (to anyone in the room) and encourages him to finish up and get off. It also alerts any adult near by that "time is up". In fact it is so annoying that he was turning down the speaker when it beeped. I had to inform him that there would be consequences for that. ;) The system is working fine so far. I am finally getting his times logged regularly and getting him off when his time is up. We shall have to see how it works long term. Adolescents can be sneaky. Total loss of gaming privileges for breaking the rules is the consequence of being sneaky. Possible enhancements: 1) Times of day allowed to play 2) Total time allowed to play 3) Play time allowed per child etc. -- John W. Colby www.ColbyConsulting.com From mwp.reid at qub.ac.uk Sun Jul 17 13:38:07 2011 From: mwp.reid at qub.ac.uk (Martin Reid) Date: Sun, 17 Jul 2011 19:38:07 +0100 Subject: [AccessD] Child computer Game timer Message-ID: <631CF83223105545BF43EFB52CB08295492AF7C9ED@EX2K7-VIRT-2.ads.qub.ac.uk> I use the low tech approach walk over and turn it of. Martin Sent from my Windows Phone -----Original Message----- From: jwcolby Sent: 17 July 2011 19:26 To: Access Developers discussion and problem solving Subject: [AccessD] Child computer Game timer I have designed a game timer for my son which I am making available to list members if they want it. This timer is designed for children who are old enough to play "unsupervised" and I want them to have a set time that they can play per session. I want to record when they start and stop and have a display of how long they have been playing. I used to have Robbie "write it down" and set a timer on the stove. Both of which he "forgot" more often than not. This is not a "dishonest teenager" control mechanism, I am not getting into trying to outsmart a teenager here. It is merely meant to allow me to see how much time my son is playing. I removed all of the shortcuts from the desktop etc so that the way he opens his games is through this database. I actually copied one of the shortcuts into the startup directory for one game that required a shortcut. I then informed him that there are consequences if he is playing without going through the timer. The timer is an Access form which has a game combo and a child id combo. In my case only my son uses it at the moment, though I will probably have my daughter use it as well. It is FE/BE. The form consists of: 1) A game combo 2) A child combo 3) A start time 4) A stop time 5) The minutes they are allowed to play, fixed ATM though it could be included in the child record. Status controls are: 1) Last Play elapsed time 2) Last play time stopped At the very bottom of the form is an elapsed time. So the child selects the game they will play. The game has the stuff required to actually open the game, usually the filespec for the game (path and file name) but it can also use a shortcut file if the game requires starting directory etc. Selecting the game starts a timer which shows up on the "Elapsed time" at the bottom, and records the start time. There is a button which enters the stopped time and moves to a new record. Once a record is "stopped" it can no longer be edited. No records can be deleted (through the form). When the time is up, my son often does the "I need to do this one small thing before I quit" routine. In order to allow that but still encourage him to get off, i built in an annoyance timer. The database does not (yet) shut down the game automatically (though I might go there) but it does beep a series of beeps when time is up, and then starts beeping at him every N seconds. N decreases over time until it is beeping every second. This is truly annoying (to anyone in the room) and encourages him to finish up and get off. It also alerts any adult near by that "time is up". In fact it is so annoying that he was turning down the speaker when it beeped. I had to inform him that there would be consequences for that. ;) The system is working fine so far. I am finally getting his times logged regularly and getting him off when his time is up. We shall have to see how it works long term. Adolescents can be sneaky. Total loss of gaming privileges for breaking the rules is the consequence of being sneaky. Possible enhancements: 1) Times of day allowed to play 2) Total time allowed to play 3) Play time allowed per child etc. -- John W. Colby www.ColbyConsulting.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 Jul 17 14:19:38 2011 From: accessd at shaw.ca (Jim Lawrence) Date: Sun, 17 Jul 2011 12:19:38 -0700 Subject: [AccessD] where is OpenOffice data store In-Reply-To: <4E220780.30775.A38D934@stuart.lexacorp.com.pg> References: <4E21FE0F.3090606@colbyconsulting.com> <4E220780.30775.A38D934@stuart.lexacorp.com.pg> Message-ID: <4467AEDCF3B74D77926B9BDB54F72737@creativesystemdesigns.com> Hi John, Stuart... Alternatively, MySQL/PHPAdmin, is so standard and there is thousands of web sites dedicated that DB and Admin FE. For a give away it is the best as you do not really want the client coming back having to ask all sorts of questions...;-) Jim -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Stuart McLachlan Sent: Saturday, July 16, 2011 2:50 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] where is OpenOffice data store HyperSQL http://hsqldb.org/ -- Stuart On 16 Jul 2011 at 17:09, jwcolby wrote: > I installed OpenOffice on a computer I am giving away. I just > happened to create a table in their database app and the data store > looks rather robust, perhaps mysql? I have not managed to Google what > data store open office uses. > > Does anyone know? > > -- > John W. Colby > www.ColbyConsulting.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 Jul 17 14:24:09 2011 From: accessd at shaw.ca (Jim Lawrence) Date: Sun, 17 Jul 2011 12:24:09 -0700 Subject: [AccessD] Child computer Game timer In-Reply-To: <4E23286A.8030301@colbyconsulting.com> References: <4E23286A.8030301@colbyconsulting.com> Message-ID: Hi John: You could just get something like the KidLogger. http://kidlogger.net/download.html Jim -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Sunday, July 17, 2011 11:23 AM To: Access Developers discussion and problem solving Subject: [AccessD] Child computer Game timer I have designed a game timer for my son which I am making available to list members if they want it. This timer is designed for children who are old enough to play "unsupervised" and I want them to have a set time that they can play per session. I want to record when they start and stop and have a display of how long they have been playing. I used to have Robbie "write it down" and set a timer on the stove. Both of which he "forgot" more often than not. This is not a "dishonest teenager" control mechanism, I am not getting into trying to outsmart a teenager here. It is merely meant to allow me to see how much time my son is playing. I removed all of the shortcuts from the desktop etc so that the way he opens his games is through this database. I actually copied one of the shortcuts into the startup directory for one game that required a shortcut. I then informed him that there are consequences if he is playing without going through the timer. The timer is an Access form which has a game combo and a child id combo. In my case only my son uses it at the moment, though I will probably have my daughter use it as well. It is FE/BE. The form consists of: 1) A game combo 2) A child combo 3) A start time 4) A stop time 5) The minutes they are allowed to play, fixed ATM though it could be included in the child record. Status controls are: 1) Last Play elapsed time 2) Last play time stopped At the very bottom of the form is an elapsed time. So the child selects the game they will play. The game has the stuff required to actually open the game, usually the filespec for the game (path and file name) but it can also use a shortcut file if the game requires starting directory etc. Selecting the game starts a timer which shows up on the "Elapsed time" at the bottom, and records the start time. There is a button which enters the stopped time and moves to a new record. Once a record is "stopped" it can no longer be edited. No records can be deleted (through the form). When the time is up, my son often does the "I need to do this one small thing before I quit" routine. In order to allow that but still encourage him to get off, i built in an annoyance timer. The database does not (yet) shut down the game automatically (though I might go there) but it does beep a series of beeps when time is up, and then starts beeping at him every N seconds. N decreases over time until it is beeping every second. This is truly annoying (to anyone in the room) and encourages him to finish up and get off. It also alerts any adult near by that "time is up". In fact it is so annoying that he was turning down the speaker when it beeped. I had to inform him that there would be consequences for that. ;) The system is working fine so far. I am finally getting his times logged regularly and getting him off when his time is up. We shall have to see how it works long term. Adolescents can be sneaky. Total loss of gaming privileges for breaking the rules is the consequence of being sneaky. Possible enhancements: 1) Times of day allowed to play 2) Total time allowed to play 3) Play time allowed per child etc. -- John W. Colby www.ColbyConsulting.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 Sun Jul 17 16:36:45 2011 From: stuart at lexacorp.com.pg (Stuart McLachlan) Date: Mon, 18 Jul 2011 07:36:45 +1000 Subject: [AccessD] where is OpenOffice data store In-Reply-To: <4467AEDCF3B74D77926B9BDB54F72737@creativesystemdesigns.com> References: <4E21FE0F.3090606@colbyconsulting.com>, <4E220780.30775.A38D934@stuart.lexacorp.com.pg>, <4467AEDCF3B74D77926B9BDB54F72737@creativesystemdesigns.com> Message-ID: <4E2355ED.23197.F5337D2@stuart.lexacorp.com.pg> Jim, John wasn't asking for suggestions, he was asking for a fact - what engine does Open Office use, -- Stuart On 17 Jul 2011 at 12:19, Jim Lawrence wrote: > Hi John, Stuart... > > Alternatively, MySQL/PHPAdmin, is so standard and there is thousands > of web sites dedicated that DB and Admin FE. For a give away it is the > best as you do not really want the client coming back having to ask > all sorts of questions...;-) > > Jim > > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Stuart > McLachlan Sent: Saturday, July 16, 2011 2:50 PM To: Access Developers > discussion and problem solving Subject: Re: [AccessD] where is > OpenOffice data store > > HyperSQL http://hsqldb.org/ > > -- > Stuart > > On 16 Jul 2011 at 17:09, jwcolby wrote: > > > I installed OpenOffice on a computer I am giving away. I just > > happened to create a table in their database app and the data store > > looks rather robust, perhaps mysql? I have not managed to Google > > what data store open office uses. > > > > Does anyone know? > > > > -- > > John W. Colby > > www.ColbyConsulting.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 Jul 17 19:00:34 2011 From: accessd at shaw.ca (Jim Lawrence) Date: Sun, 17 Jul 2011 17:00:34 -0700 Subject: [AccessD] where is OpenOffice data store In-Reply-To: <4E2355ED.23197.F5337D2@stuart.lexacorp.com.pg> References: <4E21FE0F.3090606@colbyconsulting.com> <4E220780.30775.A38D934@stuart.lexacorp.com.pg> <4467AEDCF3B74D77926B9BDB54F72737@creativesystemdesigns.com> <4E2355ED.23197.F5337D2@stuart.lexacorp.com.pg> Message-ID: <876882B1D75F40B68C0F13C95949AAAE@creativesystemdesigns.com> Right you are, Stuart... Jim -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Stuart McLachlan Sent: Sunday, July 17, 2011 2:37 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] where is OpenOffice data store Jim, John wasn't asking for suggestions, he was asking for a fact - what engine does Open Office use, -- Stuart On 17 Jul 2011 at 12:19, Jim Lawrence wrote: > Hi John, Stuart... > > Alternatively, MySQL/PHPAdmin, is so standard and there is thousands > of web sites dedicated that DB and Admin FE. For a give away it is the > best as you do not really want the client coming back having to ask > all sorts of questions...;-) > > Jim > > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Stuart > McLachlan Sent: Saturday, July 16, 2011 2:50 PM To: Access Developers > discussion and problem solving Subject: Re: [AccessD] where is > OpenOffice data store > > HyperSQL http://hsqldb.org/ > > -- > Stuart > > On 16 Jul 2011 at 17:09, jwcolby wrote: > > > I installed OpenOffice on a computer I am giving away. I just > > happened to create a table in their database app and the data store > > looks rather robust, perhaps mysql? I have not managed to Google > > what data store open office uses. > > > > Does anyone know? > > > > -- > > John W. Colby > > www.ColbyConsulting.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 jimdettman at verizon.net Sun Jul 17 20:09:10 2011 From: jimdettman at verizon.net (Jim Dettman) Date: Sun, 17 Jul 2011 21:09:10 -0400 Subject: [AccessD] Child computer Game timer In-Reply-To: References: <4E23286A.8030301@colbyconsulting.com> Message-ID: Check your router too...a lot of routers know have bandwidth monitoring, parental controls, and the ability to filter (by Mac address) based on a schedule. I've got mine set to cut out all internet access from 2:00 - 6:00 am. Jim. -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Jim Lawrence Sent: Sunday, July 17, 2011 03:24 PM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Child computer Game timer Hi John: You could just get something like the KidLogger. http://kidlogger.net/download.html Jim -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Sunday, July 17, 2011 11:23 AM To: Access Developers discussion and problem solving Subject: [AccessD] Child computer Game timer I have designed a game timer for my son which I am making available to list members if they want it. This timer is designed for children who are old enough to play "unsupervised" and I want them to have a set time that they can play per session. I want to record when they start and stop and have a display of how long they have been playing. I used to have Robbie "write it down" and set a timer on the stove. Both of which he "forgot" more often than not. This is not a "dishonest teenager" control mechanism, I am not getting into trying to outsmart a teenager here. It is merely meant to allow me to see how much time my son is playing. I removed all of the shortcuts from the desktop etc so that the way he opens his games is through this database. I actually copied one of the shortcuts into the startup directory for one game that required a shortcut. I then informed him that there are consequences if he is playing without going through the timer. The timer is an Access form which has a game combo and a child id combo. In my case only my son uses it at the moment, though I will probably have my daughter use it as well. It is FE/BE. The form consists of: 1) A game combo 2) A child combo 3) A start time 4) A stop time 5) The minutes they are allowed to play, fixed ATM though it could be included in the child record. Status controls are: 1) Last Play elapsed time 2) Last play time stopped At the very bottom of the form is an elapsed time. So the child selects the game they will play. The game has the stuff required to actually open the game, usually the filespec for the game (path and file name) but it can also use a shortcut file if the game requires starting directory etc. Selecting the game starts a timer which shows up on the "Elapsed time" at the bottom, and records the start time. There is a button which enters the stopped time and moves to a new record. Once a record is "stopped" it can no longer be edited. No records can be deleted (through the form). When the time is up, my son often does the "I need to do this one small thing before I quit" routine. In order to allow that but still encourage him to get off, i built in an annoyance timer. The database does not (yet) shut down the game automatically (though I might go there) but it does beep a series of beeps when time is up, and then starts beeping at him every N seconds. N decreases over time until it is beeping every second. This is truly annoying (to anyone in the room) and encourages him to finish up and get off. It also alerts any adult near by that "time is up". In fact it is so annoying that he was turning down the speaker when it beeped. I had to inform him that there would be consequences for that. ;) The system is working fine so far. I am finally getting his times logged regularly and getting him off when his time is up. We shall have to see how it works long term. Adolescents can be sneaky. Total loss of gaming privileges for breaking the rules is the consequence of being sneaky. Possible enhancements: 1) Times of day allowed to play 2) Total time allowed to play 3) Play time allowed per child etc. -- John W. Colby www.ColbyConsulting.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 dbdoug at gmail.com Sun Jul 17 21:31:16 2011 From: dbdoug at gmail.com (Doug Steele) Date: Sun, 17 Jul 2011 19:31:16 -0700 Subject: [AccessD] Child computer Game timer In-Reply-To: References: <4E23286A.8030301@colbyconsulting.com> Message-ID: John's doing it right, in my opinion. If Robbie wants more time, he's going to be forced to learn to hack John's program. Then, before he knows it, no more computer games, just huge SQL databases to maintain while John enjoys his retirement... Doug On Sun, Jul 17, 2011 at 6:09 PM, Jim Dettman wrote: > > ?Check your router too...a lot of routers know have bandwidth monitoring, > parental controls, and the ability to filter (by Mac address) based on a > schedule. > > ?I've got mine set to cut out all internet access from 2:00 - 6:00 am. > > Jim. > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Jim Lawrence > Sent: Sunday, July 17, 2011 03:24 PM > To: 'Access Developers discussion and problem solving' > Subject: Re: [AccessD] Child computer Game timer > > Hi John: > > You could just get something like the KidLogger. > > http://kidlogger.net/download.html > > Jim > > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby > Sent: Sunday, July 17, 2011 11:23 AM > To: Access Developers discussion and problem solving > Subject: [AccessD] Child computer Game timer > > I have designed a game timer for my son which I am making available to list > members if they want it. > > This timer is designed for children who are old enough to play > "unsupervised" and I want them to > have a set time that they can play per session. ?I want to record when they > start and stop and have > a display of how long they have been playing. ?I used to have Robbie "write > it down" and set a timer > on the stove. ?Both of which he "forgot" more often than not. > > This is not a "dishonest teenager" control mechanism, I am not getting into > trying to outsmart a > teenager here. ?It is merely meant to allow me to see how much time my son > is playing. ?I removed > all of the shortcuts from the desktop etc so that the way he opens his games > is through this > database. ?I actually copied one of the shortcuts into the startup directory > for one game that > required a shortcut. > > I then informed him that there are consequences if he is playing without > going through the timer. > > The timer is an Access form which has a game combo and a child id combo. ?In > my case only my son > uses it at the moment, though I will probably have my daughter use it as > well. ?It is FE/BE. > > The form consists of: > > 1) A game combo > 2) A child combo > 3) A start time > 4) A stop time > 5) The minutes they are allowed to play, fixed ATM though it could be > included in the child record. > > Status controls are: > > 1) Last Play elapsed time > 2) Last play time stopped > > At the very bottom of the form is an elapsed time. > > So the child selects the game they will play. ?The game has the stuff > required to actually open the > game, usually the filespec for the game (path and file name) but it can also > use a shortcut file if > the game requires starting directory etc. > > Selecting the game starts a timer which shows up on the "Elapsed time" at > the bottom, and records > the start time. ?There is a button which enters the stopped time and moves > to a new record. ?Once a > record is "stopped" it can no longer be edited. ?No records can be deleted > (through the form). > > When the time is up, my son often does the "I need to do this one small > thing before I quit" > routine. ?In order to allow that but still encourage him to get off, i built > in an annoyance timer. > ?The database does not (yet) shut down the game automatically (though I > might go there) but it does > beep a series of beeps when time is up, and then starts beeping at him every > N seconds. ?N decreases > over time until it is beeping every second. ?This is truly annoying (to > anyone in the room) and > encourages him to finish up and get off. ?It also alerts any adult near by > that "time is up". ?In > fact it is so annoying that he was turning down the speaker when it beeped. > I had to inform him > that there would be consequences for that. ?;) > > The system is working fine so far. ?I am finally getting his times logged > regularly and getting him > off when his time is up. ?We shall have to see how it works long term. > Adolescents can be sneaky. > Total loss of gaming privileges for breaking the rules is the consequence of > being sneaky. > > Possible enhancements: > > 1) Times of day allowed to play > 2) Total time allowed to play > 3) Play time allowed per child > etc. > > -- > John W. Colby > www.ColbyConsulting.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 vbacreations at gmail.com Sun Jul 17 21:46:16 2011 From: vbacreations at gmail.com (William Benson (VBACreations.Com)) Date: Sun, 17 Jul 2011 22:46:16 -0400 Subject: [AccessD] where is OpenOffice data store In-Reply-To: <4E21FE0F.3090606@colbyconsulting.com> References: <4E21FE0F.3090606@colbyconsulting.com> Message-ID: <000101cc44f4$ddf6f4c0$99e4de40$@gmail.com> Since you didn't get to Google at the time, I did some searching. Here were some references I found, but no succinct answer: http://en.wikipedia.org/wiki/OpenOffice.org A database management program similar to Microsoft Access. Base allows the creation and manipulation of databases, and the building of forms and reports to provide easy access to data for end-users. As with MS Access, Base can function as a front-end to a number of different database systems, including Access databases (JET), ODBC data sources and MySQL/PostgreSQL. Base became part of the suite starting with version 2.0. Native to the OpenOffice.org suite is an adaptation of HSQL. While Base can be a front-end for any of the databases listed, there is no need to install any of them. Raw SQL code can be entered by those who prefer it, or graphical user interfaces can be used. Here are two really good links in terms of understanding and usability of ooBase http://sheepdogguides.com/fdb/fdb1main.htm http://www.pitonyak.org/database/AndrewBase.odt Can we get back to MS Access now? ;-) -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Saturday, July 16, 2011 5:10 PM To: Access Developers discussion and problem solving Subject: [AccessD] where is OpenOffice data store I installed OpenOffice on a computer I am giving away. I just happened to create a table in their database app and the data store looks rather robust, perhaps mysql? I have not managed to Google what data store open office uses. Does anyone know? -- John W. Colby www.ColbyConsulting.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From vbacreations at gmail.com Sun Jul 17 22:18:09 2011 From: vbacreations at gmail.com (William Benson (VBACreations.Com)) Date: Sun, 17 Jul 2011 23:18:09 -0400 Subject: [AccessD] Child computer Game timer In-Reply-To: References: <4E23286A.8030301@colbyconsulting.com> Message-ID: <000201cc44f9$527fbb70$f77f3250$@gmail.com> OMG that is soooo funny..... I needed a laugh Doug. -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Doug Steele Sent: Sunday, July 17, 2011 10:31 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Child computer Game timer John's doing it right, in my opinion. If Robbie wants more time, he's going to be forced to learn to hack John's program. Then, before he knows it, no more computer games, just huge SQL databases to maintain while John enjoys his retirement... Doug On Sun, Jul 17, 2011 at 6:09 PM, Jim Dettman wrote: > > ?Check your router too...a lot of routers know have bandwidth monitoring, > parental controls, and the ability to filter (by Mac address) based on a > schedule. > > ?I've got mine set to cut out all internet access from 2:00 - 6:00 am. > > Jim. > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Jim Lawrence > Sent: Sunday, July 17, 2011 03:24 PM > To: 'Access Developers discussion and problem solving' > Subject: Re: [AccessD] Child computer Game timer > > Hi John: > > You could just get something like the KidLogger. > > http://kidlogger.net/download.html > > Jim > > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby > Sent: Sunday, July 17, 2011 11:23 AM > To: Access Developers discussion and problem solving > Subject: [AccessD] Child computer Game timer > > I have designed a game timer for my son which I am making available to list > members if they want it. > > This timer is designed for children who are old enough to play > "unsupervised" and I want them to > have a set time that they can play per session. ?I want to record when they > start and stop and have > a display of how long they have been playing. ?I used to have Robbie "write > it down" and set a timer > on the stove. ?Both of which he "forgot" more often than not. > > This is not a "dishonest teenager" control mechanism, I am not getting into > trying to outsmart a > teenager here. ?It is merely meant to allow me to see how much time my son > is playing. ?I removed > all of the shortcuts from the desktop etc so that the way he opens his games > is through this > database. ?I actually copied one of the shortcuts into the startup directory > for one game that > required a shortcut. > > I then informed him that there are consequences if he is playing without > going through the timer. > > The timer is an Access form which has a game combo and a child id combo. ?In > my case only my son > uses it at the moment, though I will probably have my daughter use it as > well. ?It is FE/BE. > > The form consists of: > > 1) A game combo > 2) A child combo > 3) A start time > 4) A stop time > 5) The minutes they are allowed to play, fixed ATM though it could be > included in the child record. > > Status controls are: > > 1) Last Play elapsed time > 2) Last play time stopped > > At the very bottom of the form is an elapsed time. > > So the child selects the game they will play. ?The game has the stuff > required to actually open the > game, usually the filespec for the game (path and file name) but it can also > use a shortcut file if > the game requires starting directory etc. > > Selecting the game starts a timer which shows up on the "Elapsed time" at > the bottom, and records > the start time. ?There is a button which enters the stopped time and moves > to a new record. ?Once a > record is "stopped" it can no longer be edited. ?No records can be deleted > (through the form). > > When the time is up, my son often does the "I need to do this one small > thing before I quit" > routine. ?In order to allow that but still encourage him to get off, i built > in an annoyance timer. > ?The database does not (yet) shut down the game automatically (though I > might go there) but it does > beep a series of beeps when time is up, and then starts beeping at him every > N seconds. ?N decreases > over time until it is beeping every second. ?This is truly annoying (to > anyone in the room) and > encourages him to finish up and get off. ?It also alerts any adult near by > that "time is up". ?In > fact it is so annoying that he was turning down the speaker when it beeped. > I had to inform him > that there would be consequences for that. ?;) > > The system is working fine so far. ?I am finally getting his times logged > regularly and getting him > off when his time is up. ?We shall have to see how it works long term. > Adolescents can be sneaky. > Total loss of gaming privileges for breaking the rules is the consequence of > being sneaky. > > Possible enhancements: > > 1) Times of day allowed to play > 2) Total time allowed to play > 3) Play time allowed per child > etc. > > -- > John W. Colby > www.ColbyConsulting.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 jwcolby at colbyconsulting.com Mon Jul 18 05:52:37 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Mon, 18 Jul 2011 06:52:37 -0400 Subject: [AccessD] Child computer Game timer In-Reply-To: References: <4E23286A.8030301@colbyconsulting.com> Message-ID: <4E241075.3040204@colbyconsulting.com> I already have him learning Access! He loves learning what dad does. John W. Colby www.ColbyConsulting.com On 7/17/2011 10:31 PM, Doug Steele wrote: > John's doing it right, in my opinion. If Robbie wants more time, he's > going to be forced to learn to hack John's program. Then, before he > knows it, no more computer games, just huge SQL databases to maintain > while John enjoys his retirement... > > Doug > > On Sun, Jul 17, 2011 at 6:09 PM, Jim Dettman wrote: >> >> Check your router too...a lot of routers know have bandwidth monitoring, >> parental controls, and the ability to filter (by Mac address) based on a >> schedule. >> >> I've got mine set to cut out all internet access from 2:00 - 6:00 am. >> >> Jim. >> >> -----Original Message----- >> From: accessd-bounces at databaseadvisors.com >> [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Jim Lawrence >> Sent: Sunday, July 17, 2011 03:24 PM >> To: 'Access Developers discussion and problem solving' >> Subject: Re: [AccessD] Child computer Game timer >> >> Hi John: >> >> You could just get something like the KidLogger. >> >> http://kidlogger.net/download.html >> >> Jim >> >> >> -----Original Message----- >> From: accessd-bounces at databaseadvisors.com >> [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby >> Sent: Sunday, July 17, 2011 11:23 AM >> To: Access Developers discussion and problem solving >> Subject: [AccessD] Child computer Game timer >> >> I have designed a game timer for my son which I am making available to list >> members if they want it. >> >> This timer is designed for children who are old enough to play >> "unsupervised" and I want them to >> have a set time that they can play per session. I want to record when they >> start and stop and have >> a display of how long they have been playing. I used to have Robbie "write >> it down" and set a timer >> on the stove. Both of which he "forgot" more often than not. >> >> This is not a "dishonest teenager" control mechanism, I am not getting into >> trying to outsmart a >> teenager here. It is merely meant to allow me to see how much time my son >> is playing. I removed >> all of the shortcuts from the desktop etc so that the way he opens his games >> is through this >> database. I actually copied one of the shortcuts into the startup directory >> for one game that >> required a shortcut. >> >> I then informed him that there are consequences if he is playing without >> going through the timer. >> >> The timer is an Access form which has a game combo and a child id combo. In >> my case only my son >> uses it at the moment, though I will probably have my daughter use it as >> well. It is FE/BE. >> >> The form consists of: >> >> 1) A game combo >> 2) A child combo >> 3) A start time >> 4) A stop time >> 5) The minutes they are allowed to play, fixed ATM though it could be >> included in the child record. >> >> Status controls are: >> >> 1) Last Play elapsed time >> 2) Last play time stopped >> >> At the very bottom of the form is an elapsed time. >> >> So the child selects the game they will play. The game has the stuff >> required to actually open the >> game, usually the filespec for the game (path and file name) but it can also >> use a shortcut file if >> the game requires starting directory etc. >> >> Selecting the game starts a timer which shows up on the "Elapsed time" at >> the bottom, and records >> the start time. There is a button which enters the stopped time and moves >> to a new record. Once a >> record is "stopped" it can no longer be edited. No records can be deleted >> (through the form). >> >> When the time is up, my son often does the "I need to do this one small >> thing before I quit" >> routine. In order to allow that but still encourage him to get off, i built >> in an annoyance timer. >> The database does not (yet) shut down the game automatically (though I >> might go there) but it does >> beep a series of beeps when time is up, and then starts beeping at him every >> N seconds. N decreases >> over time until it is beeping every second. This is truly annoying (to >> anyone in the room) and >> encourages him to finish up and get off. It also alerts any adult near by >> that "time is up". In >> fact it is so annoying that he was turning down the speaker when it beeped. >> I had to inform him >> that there would be consequences for that. ;) >> >> The system is working fine so far. I am finally getting his times logged >> regularly and getting him >> off when his time is up. We shall have to see how it works long term. >> Adolescents can be sneaky. >> Total loss of gaming privileges for breaking the rules is the consequence of >> being sneaky. >> >> Possible enhancements: >> >> 1) Times of day allowed to play >> 2) Total time allowed to play >> 3) Play time allowed per child >> etc. >> >> -- >> John W. Colby >> www.ColbyConsulting.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 DWUTKA at Marlow.com Mon Jul 18 09:12:29 2011 From: DWUTKA at Marlow.com (Drew Wutka) Date: Mon, 18 Jul 2011 09:12:29 -0500 Subject: [AccessD] Child computer Game timer In-Reply-To: <4E23286A.8030301@colbyconsulting.com> References: <4E23286A.8030301@colbyconsulting.com> Message-ID: Why not just detect the game he is playing based upon the window's that are running? Each game should have a window that should be easy to identify. Drew -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Sunday, July 17, 2011 1:23 PM To: Access Developers discussion and problem solving Subject: [AccessD] Child computer Game timer I have designed a game timer for my son which I am making available to list members if they want it. This timer is designed for children who are old enough to play "unsupervised" and I want them to have a set time that they can play per session. I want to record when they start and stop and have a display of how long they have been playing. I used to have Robbie "write it down" and set a timer on the stove. Both of which he "forgot" more often than not. This is not a "dishonest teenager" control mechanism, I am not getting into trying to outsmart a teenager here. It is merely meant to allow me to see how much time my son is playing. I removed all of the shortcuts from the desktop etc so that the way he opens his games is through this database. I actually copied one of the shortcuts into the startup directory for one game that required a shortcut. I then informed him that there are consequences if he is playing without going through the timer. The timer is an Access form which has a game combo and a child id combo. In my case only my son uses it at the moment, though I will probably have my daughter use it as well. It is FE/BE. The form consists of: 1) A game combo 2) A child combo 3) A start time 4) A stop time 5) The minutes they are allowed to play, fixed ATM though it could be included in the child record. Status controls are: 1) Last Play elapsed time 2) Last play time stopped At the very bottom of the form is an elapsed time. So the child selects the game they will play. The game has the stuff required to actually open the game, usually the filespec for the game (path and file name) but it can also use a shortcut file if the game requires starting directory etc. Selecting the game starts a timer which shows up on the "Elapsed time" at the bottom, and records the start time. There is a button which enters the stopped time and moves to a new record. Once a record is "stopped" it can no longer be edited. No records can be deleted (through the form). When the time is up, my son often does the "I need to do this one small thing before I quit" routine. In order to allow that but still encourage him to get off, i built in an annoyance timer. The database does not (yet) shut down the game automatically (though I might go there) but it does beep a series of beeps when time is up, and then starts beeping at him every N seconds. N decreases over time until it is beeping every second. This is truly annoying (to anyone in the room) and encourages him to finish up and get off. It also alerts any adult near by that "time is up". In fact it is so annoying that he was turning down the speaker when it beeped. I had to inform him that there would be consequences for that. ;) The system is working fine so far. I am finally getting his times logged regularly and getting him off when his time is up. We shall have to see how it works long term. Adolescents can be sneaky. Total loss of gaming privileges for breaking the rules is the consequence of being sneaky. Possible enhancements: 1) Times of day allowed to play 2) Total time allowed to play 3) Play time allowed per child etc. -- John W. Colby www.ColbyConsulting.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com The information contained in this transmission is intended only for the person or entity to which it is addressed and may contain II-VI Proprietary and/or II-VI Business Sensitive material. If you are not the intended recipient, please contact the sender immediately and destroy the material in its entirety, whether electronic or hard copy. You are notified that any review, retransmission, copying, disclosure, dissemination, or other use of, or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. From rockysmolin at bchacc.com Mon Jul 18 10:57:23 2011 From: rockysmolin at bchacc.com (Rocky Smolin) Date: Mon, 18 Jul 2011 08:57:23 -0700 Subject: [AccessD] Referring to a function in a subform Message-ID: <49EBA6DA69794EF88740050C7D84F12A@HAL9007> Dear List: Gets me every time. I want to call a private function in a subform on my main form. Subform name is subfrmAccount, main form is frmEditAccounts, function name is MakeShippingLabelEditAccounts. I've tried a lot of variations like: Me.fldShippingLabel = Forms!frmEditAccounts.subfrmAccount.Form.MakeShippingLabelEditAccounts with ! and . in various places and nothing works. The function works fine when I use it in the subform. Help! MTIA Rocky Smolin Beach Access Software 858-259-4334 www.bchacc.com www.e-z-mrp.com From bill_patten at embarqmail.com Mon Jul 18 11:03:48 2011 From: bill_patten at embarqmail.com (Bill Patten) Date: Mon, 18 Jul 2011 09:03:48 -0700 Subject: [AccessD] Referring to a function in a subform In-Reply-To: <49EBA6DA69794EF88740050C7D84F12A@HAL9007> References: <49EBA6DA69794EF88740050C7D84F12A@HAL9007> Message-ID: Hi Rocky, I think I'd just make it public. Bill -------------------------------------------------- From: "Rocky Smolin" Sent: Monday, July 18, 2011 8:57 AM To: Subject: [AccessD] Referring to a function in a subform Dear List: Gets me every time. I want to call a private function in a subform on my main form. Subform name is subfrmAccount, main form is frmEditAccounts, function name is MakeShippingLabelEditAccounts. I've tried a lot of variations like: Me.fldShippingLabel = Forms!frmEditAccounts.subfrmAccount.Form.MakeShippingLabelEditAccounts with ! and . in various places and nothing works. The function works fine when I use it in the subform. Help! MTIA Rocky Smolin Beach Access Software 858-259-4334 www.bchacc.com www.e-z-mrp.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From charlotte.foust at gmail.com Mon Jul 18 11:13:28 2011 From: charlotte.foust at gmail.com (Charlotte Foust) Date: Mon, 18 Jul 2011 09:13:28 -0700 Subject: [AccessD] Referring to a function in a subform In-Reply-To: <49EBA6DA69794EF88740050C7D84F12A@HAL9007> References: <49EBA6DA69794EF88740050C7D84F12A@HAL9007> Message-ID: Bill has it right. If the scope of the routine isn't public, it is visible as a method only within the subform itself. Charlotte Foust On Mon, Jul 18, 2011 at 8:57 AM, Rocky Smolin wrote: > Dear List: > > Gets me every time. > > I want to call a private function in a subform on my main form. Subform > name is subfrmAccount, main form is frmEditAccounts, function name is > MakeShippingLabelEditAccounts. > > I've tried a lot of variations like: > > Me.fldShippingLabel = > Forms!frmEditAccounts.subfrmAccount.Form.MakeShippingLabelEditAccounts > > with ! and . in various places and nothing works. > > The function works fine when I use it in the subform. > > Help! > > MTIA > > Rocky Smolin > Beach Access Software > 858-259-4334 > www.bchacc.com > > > > > www.e-z-mrp.com > > > > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > > > Website: http://www.databaseadvisors.com > > > From rockysmolin at bchacc.com Mon Jul 18 11:16:07 2011 From: rockysmolin at bchacc.com (Rocky Smolin) Date: Mon, 18 Jul 2011 09:16:07 -0700 Subject: [AccessD] Referring to a function in a subform In-Reply-To: References: <49EBA6DA69794EF88740050C7D84F12A@HAL9007> Message-ID: <7D937294F929402698129D0C7BE01E58@HAL9007> Tried public but no soap. Moving it to a module now. R -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Charlotte Foust Sent: Monday, July 18, 2011 9:13 AM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Referring to a function in a subform Bill has it right. If the scope of the routine isn't public, it is visible as a method only within the subform itself. Charlotte Foust On Mon, Jul 18, 2011 at 8:57 AM, Rocky Smolin wrote: > Dear List: > > Gets me every time. > > I want to call a private function in a subform on my main form. > Subform name is subfrmAccount, main form is frmEditAccounts, function > name is MakeShippingLabelEditAccounts. > > I've tried a lot of variations like: > > Me.fldShippingLabel = > Forms!frmEditAccounts.subfrmAccount.Form.MakeShippingLabelEditAccounts > > with ! and . in various places and nothing works. > > The function works fine when I use it in the subform. > > Help! > > MTIA > > Rocky Smolin > Beach Access Software > 858-259-4334 > www.bchacc.com > > > > > www.e-z-mrp.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 dhb at flsi.com Mon Jul 18 13:06:20 2011 From: dhb at flsi.com (Darrell Burns) Date: Mon, 18 Jul 2011 11:06:20 -0700 Subject: [AccessD] Referring to a function in a subform In-Reply-To: <7D937294F929402698129D0C7BE01E58@HAL9007> References: <49EBA6DA69794EF88740050C7D84F12A@HAL9007> <7D937294F929402698129D0C7BE01E58@HAL9007> Message-ID: <00b101cc4575$6805c300$38114900$@flsi.com> Hey Rocky. Here's how I do it... In MasterForm: Set fSub = Me.Form(SubformName) fSub.Form.GoToID Nz(MoveToID, 0) In SubForm: Public Sub GoToID(Optional optMoveToID) HTH, DB -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Rocky Smolin Sent: Monday, July 18, 2011 9:16 AM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Referring to a function in a subform Tried public but no soap. Moving it to a module now. R -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Charlotte Foust Sent: Monday, July 18, 2011 9:13 AM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Referring to a function in a subform Bill has it right. If the scope of the routine isn't public, it is visible as a method only within the subform itself. Charlotte Foust On Mon, Jul 18, 2011 at 8:57 AM, Rocky Smolin wrote: > Dear List: > > Gets me every time. > > I want to call a private function in a subform on my main form. > Subform name is subfrmAccount, main form is frmEditAccounts, function > name is MakeShippingLabelEditAccounts. > > I've tried a lot of variations like: > > Me.fldShippingLabel = > Forms!frmEditAccounts.subfrmAccount.Form.MakeShippingLabelEditAccounts > > with ! and . in various places and nothing works. > > The function works fine when I use it in the subform. > > Help! > > MTIA > > Rocky Smolin > Beach Access Software > 858-259-4334 > www.bchacc.com > > > > > www.e-z-mrp.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 dhb at flsi.com Mon Jul 18 13:24:48 2011 From: dhb at flsi.com (Darrell Burns) Date: Mon, 18 Jul 2011 11:24:48 -0700 Subject: [AccessD] Access2010 vs Access2007 Message-ID: <00b201cc4577$fa709a10$ef51ce30$@flsi.com> Hi folks. I bought a new dev machine with Win7 and Office2010 32-bit. It installed the Access 14.0 Object Library. The "default file format" in Settings is Access 2007. My app runs on my client's Win2008 R2 Server and all the workstations run Win7. However, their Access references point to the Access 12.0 Object Library. As a result, when I upload my app to their server and open it up I get a warning message that "some of the features may be incompatible", even though I haven't used any of those features. Do I need to scale back to 12.0 on my side or upgrade the client to 14.0? And how would I do that? Thanx, Darrell From vbacreations at gmail.com Mon Jul 18 14:16:26 2011 From: vbacreations at gmail.com (William Benson) Date: Mon, 18 Jul 2011 15:16:26 -0400 Subject: [AccessD] Access2010 vs Access2007 In-Reply-To: <00b201cc4577$fa709a10$ef51ce30$@flsi.com> References: <00b201cc4577$fa709a10$ef51ce30$@flsi.com> Message-ID: I wouldn't worry about it. After all how ya gonna learn the differences if you don't let them bite you? Just kidding, hope you get a less smart-arse answer soon. On Jul 18, 2011 2:26 PM, "Darrell Burns" wrote: > Hi folks. > I bought a new dev machine with Win7 and Office2010 32-bit. It installed the > Access 14.0 Object Library. The "default file format" in Settings is Access > 2007. > My app runs on my client's Win2008 R2 Server and all the workstations run > Win7. However, their Access references point to the Access 12.0 Object > Library. As a result, when I upload my app to their server and open it up I > get a warning message that "some of the features may be incompatible", even > though I haven't used any of those features. > Do I need to scale back to 12.0 on my side or upgrade the client to 14.0? > And how would I do that? > Thanx, > Darrell > > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com From rockysmolin at bchacc.com Mon Jul 18 15:16:14 2011 From: rockysmolin at bchacc.com (Rocky Smolin) Date: Mon, 18 Jul 2011 13:16:14 -0700 Subject: [AccessD] Referring to a function in a subform In-Reply-To: <00b101cc4575$6805c300$38114900$@flsi.com> References: <49EBA6DA69794EF88740050C7D84F12A@HAL9007> <7D937294F929402698129D0C7BE01E58@HAL9007> <00b101cc4575$6805c300$38114900$@flsi.com> Message-ID: <5F0603DB08D74800B92076ADC69B82A1@HAL9007> That's the way it SHOULD work. But it didn't for me. So I moved it to a public function and it works now. Rocky -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Darrell Burns Sent: Monday, July 18, 2011 11:06 AM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Referring to a function in a subform Hey Rocky. Here's how I do it... In MasterForm: Set fSub = Me.Form(SubformName) fSub.Form.GoToID Nz(MoveToID, 0) In SubForm: Public Sub GoToID(Optional optMoveToID) HTH, DB -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Rocky Smolin Sent: Monday, July 18, 2011 9:16 AM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Referring to a function in a subform Tried public but no soap. Moving it to a module now. R -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Charlotte Foust Sent: Monday, July 18, 2011 9:13 AM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Referring to a function in a subform Bill has it right. If the scope of the routine isn't public, it is visible as a method only within the subform itself. Charlotte Foust On Mon, Jul 18, 2011 at 8:57 AM, Rocky Smolin wrote: > Dear List: > > Gets me every time. > > I want to call a private function in a subform on my main form. > Subform name is subfrmAccount, main form is frmEditAccounts, function > name is MakeShippingLabelEditAccounts. > > I've tried a lot of variations like: > > Me.fldShippingLabel = > Forms!frmEditAccounts.subfrmAccount.Form.MakeShippingLabelEditAccounts > > with ! and . in various places and nothing works. > > The function works fine when I use it in the subform. > > Help! > > MTIA > > Rocky Smolin > Beach Access Software > 858-259-4334 > www.bchacc.com > > > > > www.e-z-mrp.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 dhb at flsi.com Mon Jul 18 16:08:23 2011 From: dhb at flsi.com (Darrell Burns) Date: Mon, 18 Jul 2011 14:08:23 -0700 Subject: [AccessD] Access2010 vs Access2007 In-Reply-To: References: <00b201cc4577$fa709a10$ef51ce30$@flsi.com> Message-ID: <00c201cc458e$d5146d20$7f3d4760$@flsi.com> I have to worry about it...I don't want the users seeing warning messages or getting "bitten". -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of William Benson Sent: Monday, July 18, 2011 12:16 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Access2010 vs Access2007 I wouldn't worry about it. After all how ya gonna learn the differences if you don't let them bite you? Just kidding, hope you get a less smart-arse answer soon. On Jul 18, 2011 2:26 PM, "Darrell Burns" wrote: > Hi folks. > I bought a new dev machine with Win7 and Office2010 32-bit. It > installed the > Access 14.0 Object Library. The "default file format" in Settings is Access > 2007. > My app runs on my client's Win2008 R2 Server and all the workstations > run Win7. However, their Access references point to the Access 12.0 > Object Library. As a result, when I upload my app to their server and > open it up I > get a warning message that "some of the features may be incompatible", even > though I haven't used any of those features. > Do I need to scale back to 12.0 on my side or upgrade the client to 14.0? > And how would I do that? > Thanx, > Darrell > > > > -- > 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 ssharkins at gmail.com Mon Jul 18 19:13:16 2011 From: ssharkins at gmail.com (Susan Harkins) Date: Mon, 18 Jul 2011 20:13:16 -0400 Subject: [AccessD] update wouldn't run Message-ID: I ran into a really weird, and a bit humiliating situation this afternoon. I volunteer at our county fair and someone asked me to help them update some entry numbers in an Access table. It was a simple update query -- make all 20's 21. It was a text field. I created the query, ran it... it wouldn't run. It did nothing. The text field was part of a natural key primary key, but she was able to change the values manually. That query should've run and changed all those values in a second -- fortunately, there were only a few dozen, but I was still... deflated. :( Any ideas what might have been the problem? Susan H. From df.waters at comcast.net Mon Jul 18 20:08:28 2011 From: df.waters at comcast.net (Dan Waters) Date: Mon, 18 Jul 2011 20:08:28 -0500 Subject: [AccessD] update wouldn't run In-Reply-To: References: Message-ID: <004c01cc45b0$5fa68150$1ef383f0$@comcast.net> Hi Susan, Your query may have tried to update a text 20 to a numeric 21, which would have been the wrong type and should not have worked. Just a guess ... Dan PS - Don't ever tell anyone you're an expert. As soon as I said it - I wasn't! :-( -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Susan Harkins Sent: Monday, July 18, 2011 7:13 PM To: Access Developers discussion and problem solving Subject: [AccessD] update wouldn't run I ran into a really weird, and a bit humiliating situation this afternoon. I volunteer at our county fair and someone asked me to help them update some entry numbers in an Access table. It was a simple update query -- make all 20's 21. It was a text field. I created the query, ran it... it wouldn't run. It did nothing. The text field was part of a natural key primary key, but she was able to change the values manually. That query should've run and changed all those values in a second -- fortunately, there were only a few dozen, but I was still... deflated. :( Any ideas what might have been the problem? Susan H. -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From jwcolby at colbyconsulting.com Mon Jul 18 20:41:48 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Mon, 18 Jul 2011 21:41:48 -0400 Subject: [AccessD] Child computer Game timer In-Reply-To: References: <4E23286A.8030301@colbyconsulting.com> Message-ID: <4E24E0DC.9080209@colbyconsulting.com> Because I won't know what games your child is playing. John W. Colby www.ColbyConsulting.com On 7/18/2011 10:12 AM, Drew Wutka wrote: > Why not just detect the game he is playing based upon the window's that > are running? Each game should have a window that should be easy to > identify. > > Drew > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby > Sent: Sunday, July 17, 2011 1:23 PM > To: Access Developers discussion and problem solving > Subject: [AccessD] Child computer Game timer > > I have designed a game timer for my son which I am making available to > list members if they want it. > > This timer is designed for children who are old enough to play > "unsupervised" and I want them to > have a set time that they can play per session. I want to record when > they start and stop and have > a display of how long they have been playing. I used to have Robbie > "write it down" and set a timer > on the stove. Both of which he "forgot" more often than not. > > This is not a "dishonest teenager" control mechanism, I am not getting > into trying to outsmart a > teenager here. It is merely meant to allow me to see how much time my > son is playing. I removed > all of the shortcuts from the desktop etc so that the way he opens his > games is through this > database. I actually copied one of the shortcuts into the startup > directory for one game that > required a shortcut. > > I then informed him that there are consequences if he is playing without > going through the timer. > > The timer is an Access form which has a game combo and a child id combo. > In my case only my son > uses it at the moment, though I will probably have my daughter use it as > well. It is FE/BE. > > The form consists of: > > 1) A game combo > 2) A child combo > 3) A start time > 4) A stop time > 5) The minutes they are allowed to play, fixed ATM though it could be > included in the child record. > > Status controls are: > > 1) Last Play elapsed time > 2) Last play time stopped > > At the very bottom of the form is an elapsed time. > > So the child selects the game they will play. The game has the stuff > required to actually open the > game, usually the filespec for the game (path and file name) but it can > also use a shortcut file if > the game requires starting directory etc. > > Selecting the game starts a timer which shows up on the "Elapsed time" > at the bottom, and records > the start time. There is a button which enters the stopped time and > moves to a new record. Once a > record is "stopped" it can no longer be edited. No records can be > deleted (through the form). > > When the time is up, my son often does the "I need to do this one small > thing before I quit" > routine. In order to allow that but still encourage him to get off, i > built in an annoyance timer. > The database does not (yet) shut down the game automatically (though I > might go there) but it does > beep a series of beeps when time is up, and then starts beeping at him > every N seconds. N decreases > over time until it is beeping every second. This is truly annoying (to > anyone in the room) and > encourages him to finish up and get off. It also alerts any adult near > by that "time is up". In > fact it is so annoying that he was turning down the speaker when it > beeped. I had to inform him > that there would be consequences for that. ;) > > The system is working fine so far. I am finally getting his times > logged regularly and getting him > off when his time is up. We shall have to see how it works long term. > Adolescents can be sneaky. > Total loss of gaming privileges for breaking the rules is the > consequence of being sneaky. > > Possible enhancements: > > 1) Times of day allowed to play > 2) Total time allowed to play > 3) Play time allowed per child > etc. > From vbacreations at gmail.com Mon Jul 18 21:30:52 2011 From: vbacreations at gmail.com (William Benson (VBACreations.Com)) Date: Mon, 18 Jul 2011 22:30:52 -0400 Subject: [AccessD] Access2010 vs Access2007 In-Reply-To: <00c201cc458e$d5146d20$7f3d4760$@flsi.com> References: <00b201cc4577$fa709a10$ef51ce30$@flsi.com> <00c201cc458e$d5146d20$7f3d4760$@flsi.com> Message-ID: <004f01cc45bb$e2972960$a7c57c20$@gmail.com> There might not be so many folk who have bothered to move to Ac2007 formatted databases, let alone to Ac2010 platform. While others are still quiet on the topic, I will put forth my half-penny advice. I did it to have strange bugginess stop showing up when my database got too big and I didn't know it -- only to find that I still seemed to have a 2 GB limitation even after it became an accdb file. Goodness knows why, and it is quite frustrating. One thing I would recommend but it is because I am an Excel programmer and may not know the difference in how Access works versus Excel... is to call every function somehow, in debugging mode, at least once - just in case there are things which the compiler only checks at runtime, and only when the code in that particular routine executes. This can be a real chore. Things that lie on the other side of IF conditions which almost never happen are especially burdensome to check, and error handling for very off-chance exceptions. But if you are needing to be that sure about things, you have to force every condition so it gets tested at least once (and even then you will only have feedback on the conditions you thought to check). There are some controls which if you have used them in an Ac2007 database you might not find them there any more, like Calendar control. Data Access pages were minimally supported in 2007 (could not create but could still run) and in 2010 will not function. Anyway, I would just be parroting what I read here, were I to go on. http://technet.microsoft.com/en-us/library/cc179181.aspx -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Darrell Burns Sent: Monday, July 18, 2011 5:08 PM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Access2010 vs Access2007 I have to worry about it...I don't want the users seeing warning messages or getting "bitten". -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of William Benson Sent: Monday, July 18, 2011 12:16 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Access2010 vs Access2007 I wouldn't worry about it. After all how ya gonna learn the differences if you don't let them bite you? Just kidding, hope you get a less smart-arse answer soon. On Jul 18, 2011 2:26 PM, "Darrell Burns" wrote: > Hi folks. > I bought a new dev machine with Win7 and Office2010 32-bit. It > installed the > Access 14.0 Object Library. The "default file format" in Settings is Access > 2007. > My app runs on my client's Win2008 R2 Server and all the workstations > run Win7. However, their Access references point to the Access 12.0 > Object Library. As a result, when I upload my app to their server and > open it up I > get a warning message that "some of the features may be incompatible", even > though I haven't used any of those features. > Do I need to scale back to 12.0 on my side or upgrade the client to 14.0? > And how would I do that? > Thanx, > Darrell > > > > -- > 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 ssharkins at gmail.com Tue Jul 19 05:46:36 2011 From: ssharkins at gmail.com (Susan Harkins) Date: Tue, 19 Jul 2011 06:46:36 -0400 Subject: [AccessD] update wouldn't run References: <004c01cc45b0$5fa68150$1ef383f0$@comcast.net> Message-ID: No, they were both text -- I checked that and Access automatically knew that the field was text and took care of it for me. I never call myself an expert. :) Susan H. > > Your query may have tried to update a text 20 to a numeric 21, which would > have been the wrong type and should not have worked. > > Just a guess ... > > Dan > > PS - Don't ever tell anyone you're an expert. As soon as I said it - I > wasn't! :-( From charlotte.foust at gmail.com Tue Jul 19 10:00:29 2011 From: charlotte.foust at gmail.com (Charlotte Foust) Date: Tue, 19 Jul 2011 08:00:29 -0700 Subject: [AccessD] update wouldn't run In-Reply-To: References: <004c01cc45b0$5fa68150$1ef383f0$@comcast.net> Message-ID: I'll never forget the time a developer who worked for me decided to update all of a certain numeric string to a text number in an address field. The query ran and worked...sort of. He had forgotten to provide for spaces around numeric string. I had to go through thousands of records and find every instance of "two" in a longer number and replace it with "2"! Charlotte Foust On Tue, Jul 19, 2011 at 3:46 AM, Susan Harkins wrote: > No, they were both text -- I checked that and Access automatically knew > that the field was text and took care of it for me. I never call myself an > expert. :) > > Susan H. > >> >> Your query may have tried to update a text 20 to a numeric 21, which would >> have been the wrong type and should not have worked. >> >> Just a guess ... >> >> Dan >> >> PS - Don't ever tell anyone you're an expert. As soon as I said it - I >> wasn't! :-( >> > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/**mailman/listinfo/accessd > > > Website: http://www.databaseadvisors.**com > > > From dnod at aol.com Tue Jul 19 10:13:19 2011 From: dnod at aol.com (Dean Davids) Date: Tue, 19 Jul 2011 11:13:19 -0400 Subject: [AccessD] update wouldn't run In-Reply-To: References: <004c01cc45b0$5fa68150$1ef383f0$@comcast.net> Message-ID: If you do that kind of thing in a QBE window, you can preview the results before committing the results. I do that always. Still, it is a bit scary when you push that action button and then look for unexpected issues. Dean S. Davids www.cmbscorp.com 954-868-4421 On Jul 19, 2011, at 11:00 AM, Charlotte Foust wrote: > I'll never forget the time a developer who worked for me decided to update > all of a certain numeric string to a text number in an address field. The > query ran and worked...sort of. He had forgotten to provide for spaces > around numeric string. I had to go through thousands of records and find > every instance of "two" in a longer number and replace it with "2"! > > Charlotte Foust > > On Tue, Jul 19, 2011 at 3:46 AM, Susan Harkins wrote: > >> No, they were both text -- I checked that and Access automatically knew >> that the field was text and took care of it for me. I never call myself an >> expert. :) >> >> Susan H. >> >>> >>> Your query may have tried to update a text 20 to a numeric 21, which would >>> have been the wrong type and should not have worked. >>> >>> Just a guess ... >>> >>> Dan >>> >>> PS - Don't ever tell anyone you're an expert. As soon as I said it - I >>> wasn't! :-( >>> >> >> -- >> 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 ssharkins at gmail.com Tue Jul 19 10:21:31 2011 From: ssharkins at gmail.com (Susan Harkins) Date: Tue, 19 Jul 2011 11:21:31 -0400 Subject: [AccessD] update wouldn't run References: <004c01cc45b0$5fa68150$1ef383f0$@comcast.net> Message-ID: <1B38E9446F80476EB23735A7899241DF@SusanHarkins> When I used Datasheet view to see the uncommitted results, I saw only the original values. Susan H. > If you do that kind of thing in a QBE window, you can preview the results > before committing the results. I do that always. Still, it is a bit scary > when you push that action button and then look for unexpected issues. > > > >> I'll never forget the time a developer who worked for me decided to >> update >> all of a certain numeric string to a text number in an address field. >> The >> query ran and worked...sort of. He had forgotten to provide for spaces >> around numeric string. I had to go through thousands of records and find >> every instance of "two" in a longer number and replace it with "2"! >> >> Charlotte Foust >> >> On Tue, Jul 19, 2011 at 3:46 AM, Susan Harkins >> wrote: >> >>> No, they were both text -- I checked that and Access automatically knew >>> that the field was text and took care of it for me. I never call myself >>> an >>> expert. :) >>> >>> Susan H. >>> >>>> >>>> Your query may have tried to update a text 20 to a numeric 21, which >>>> would >>>> have been the wrong type and should not have worked. >>>> >>>> Just a guess ... From garykjos at gmail.com Tue Jul 19 10:52:52 2011 From: garykjos at gmail.com (Gary Kjos) Date: Tue, 19 Jul 2011 10:52:52 -0500 Subject: [AccessD] update wouldn't run In-Reply-To: <1B38E9446F80476EB23735A7899241DF@SusanHarkins> References: <004c01cc45b0$5fa68150$1ef383f0$@comcast.net> <1B38E9446F80476EB23735A7899241DF@SusanHarkins> Message-ID: I wonder if you dropped the key and then ran it if it would work. then you could reset the key after. Multi-field keys might have different rules. Doing one record at a time in a table view might have different rules than a mass change in a query. Hope you made a copy of the db or at least the table before you touched anything though. Always want to have a way to return to the before state, especially when you are working with other peoples databases. Stuff happens. ;-) GK On Tue, Jul 19, 2011 at 10:21 AM, Susan Harkins wrote: > When I used Datasheet view to see the uncommitted results, I saw only the > original values. > > Susan H. > > >> If you do that kind of thing in a QBE window, you can preview the results >> before committing the results. I do that always. Still, it is a bit scary >> when you push that action button and then look for unexpected issues. >> >> >> >>> I'll never forget the time a developer who worked for me decided to >>> update >>> all of a certain numeric string to a text number in an address field. The >>> query ran and worked...sort of. ?He had forgotten to provide for spaces >>> around numeric string. I had to go through thousands of records and find >>> every instance of "two" in a longer number and replace it with "2"! >>> >>> Charlotte Foust >>> >>> On Tue, Jul 19, 2011 at 3:46 AM, Susan Harkins >>> wrote: >>> >>>> No, they were both text -- I checked that and Access automatically knew >>>> that the field was text and took care of it for me. I never call myself >>>> an >>>> expert. :) >>>> >>>> Susan H. >>>> >>>>> >>>>> Your query may have tried to update a text 20 to a numeric 21, which >>>>> would >>>>> have been the wrong type and should not have worked. >>>>> >>>>> Just a guess ... > > -- > 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 ssharkins at gmail.com Tue Jul 19 11:07:51 2011 From: ssharkins at gmail.com (Susan Harkins) Date: Tue, 19 Jul 2011 12:07:51 -0400 Subject: [AccessD] update wouldn't run References: <004c01cc45b0$5fa68150$1ef383f0$@comcast.net><1B38E9446F80476EB23735A7899241DF@SusanHarkins> Message-ID: Well... I thought about doing that, but couldn't think of a reason why it should've mattered, but you know, you might be right -- I might experiment later. Susan H. I wonder if you dropped the key and then ran it if it would work. then you could reset the key after. Multi-field keys might have different rules. Doing one record at a time in a table view might have different rules than a mass change in a query. Hope you made a copy of the db or at least the table before you touched anything though. Always want to have a way to return to the before state, especially when you are working with other peoples databases. Stuff happens. ;-) From gustav at cactus.dk Tue Jul 19 16:07:39 2011 From: gustav at cactus.dk (Gustav Brock) Date: Tue, 19 Jul 2011 23:07:39 +0200 Subject: [AccessD] DatePart "WW" (C#: Extension of DateTime) Message-ID: Hi all Now, would you believe this _old_ bug has survived A2010 and .Net 4 / Visual Studio 2010! So - as someone brought up a long-winded solution - I had to post my version of the extension method for DateTime of C# at CodeProject: http://www.codeproject.com/Tips/227801/DateTime-extension-method-to-give-Week-number /gustav >>> Gustav at cactus.dk 24-05-2007 16:44 >>> Hi Mark If you are looking for ISO week numbers, use these constants: bytWeek = DatePart("ww", datDate, vbMonday, vbFirstFourDays) However, DatePart has always - since Access 1.0 - been buggy for week number 53. Thus, for serious business use, use a function like this which I have posted many times: Public Function ISO_WeekNumber( _ ByVal datDate As Date) _ As Byte ' Calculates and returns week number for date datDate according to the ISO 8601:1988 standard. ' 1998-2000, Gustav Brock, Cactus Data ApS, CPH. ' May be freely used and distributed. Const cbytFirstWeekOfAnyYear As Byte = 1 Const cbytLastWeekOfLeapYear As Byte = 53 Dim bytWeek As Byte Dim bytISOThursday As Byte Dim datLastDayOfYear As Date bytWeek = DatePart("ww", datDate, vbMonday, vbFirstFourDays) If bytWeek = cbytLastWeekOfLeapYear Then bytISOThursday = WeekDay(vbThursday, vbMonday) datLastDayOfYear = DateSerial(Year(datDate), 12, 31) If WeekDay(datLastDayOfYear, vbMonday) >= bytISOThursday Then ' OK, week count of 53 is caused by leap year. Else ' Correct for Access97/2000 bug. bytWeek = cbytFirstWeekOfAnyYear End If End If ISO_WeekNumber = bytWeek End Function /gustav >>> markamatte at hotmail.com 24-05-2007 16:14 >>> Hello All, I'm using datepart to get the week. 12/31/2006 I am having an issue...No matter what optional constant I use or change...I get Day1 of week 53... and 1/1/2007 shows as Day2 of week 1. How do I get Day1 of Week1? Thanks, Mark A. Matte From vbacreations at gmail.com Tue Jul 19 19:11:51 2011 From: vbacreations at gmail.com (William Benson) Date: Tue, 19 Jul 2011 20:11:51 -0400 Subject: [AccessD] update wouldn't run In-Reply-To: References: <004c01cc45b0$5fa68150$1ef383f0$@comcast.net> <1B38E9446F80476EB23735A7899241DF@SusanHarkins> Message-ID: The first thing I would try would be to update to some strange 2-car string to rule out the key and numeric aspects. If that world you would have a partial info. On Jul 19, 2011 12:09 PM, "Susan Harkins" wrote: > Well... I thought about doing that, but couldn't think of a reason why it > should've mattered, but you know, you might be right -- I might experiment > later. > > Susan H. > > > I wonder if you dropped the key and then ran it if it would work. then > you could reset the key after. Multi-field keys might have different > rules. Doing one record at a time in a table view might have different > rules than a mass change in a query. > > Hope you made a copy of the db or at least the table before you > touched anything though. Always want to have a way to return to the > before state, especially when you are working with other peoples > databases. > > Stuff happens. ;-) > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com From fuller.artful at gmail.com Tue Jul 19 21:09:00 2011 From: fuller.artful at gmail.com (Arthur Fuller) Date: Tue, 19 Jul 2011 22:09:00 -0400 Subject: [AccessD] update wouldn't run In-Reply-To: References: <004c01cc45b0$5fa68150$1ef383f0$@comcast.net> <1B38E9446F80476EB23735A7899241DF@SusanHarkins> Message-ID: Do n this in two parts. According to my personal nomenclature, the queries would be _ On Tue, Jul 19, 2011 at 12:07 PM, Susan Harkins wrote: > Well... I thought about doing that, but couldn't think of a reason why it > should've mattered, but you know, you might be right -- I might experiment > later. > > Susan H. > > > > I wonder if you dropped the key and then ran it if it would work. then > you could reset the key after. Multi-field keys might have different > rules. Doing one record at a time in a table view might have different > rules than a mass change in a query. > > Hope you made a copy of the db or at least the table before you > touched anything though. Always want to have a way to return to the > before state, especially when you are working with other peoples > databases. > > Stuff happens. ;-) > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/**mailman/listinfo/accessd > Website: http://www.databaseadvisors.**com > From dhb at flsi.com Wed Jul 20 16:04:02 2011 From: dhb at flsi.com (Darrell Burns) Date: Wed, 20 Jul 2011 14:04:02 -0700 Subject: [AccessD] Access 2010 -- The database cannot be opened because the VBA project contained in it cannot be read. Message-ID: <024501cc4720$8d8aef40$a8a0cdc0$@flsi.com> I just lost all of my code! I'm running 32-bit Access 2010 in 64-bit Windows7 (Access 14.0 Object library and Office Access database engine 14.0)..the 32-bit version of Office2010. My application was developed in Access2007. My default file format says Access 2007 (there is no A2010 option). I was trying to import a form from one database into another when I got a "Microsoft Access has stopped working" message, then both databases were hosed. I tried opening a blank database and importing a form but I get "Name conflicts with existing module...." and it won't import. Of course, I have a live demo in 3 hours! Help! Is there any way of salvaging the code I had written behind my forms? How do I prevent this from happening again? From vbacreations at gmail.com Wed Jul 20 16:26:55 2011 From: vbacreations at gmail.com (William Benson (VBACreations.Com)) Date: Wed, 20 Jul 2011 17:26:55 -0400 Subject: [AccessD] Access 2010 -- The database cannot be opened because the VBA project contained in it cannot be read. In-Reply-To: <024501cc4720$8d8aef40$a8a0cdc0$@flsi.com> References: <024501cc4720$8d8aef40$a8a0cdc0$@flsi.com> Message-ID: <004301cc4723$c0c316a0$424943e0$@gmail.com> I don't think so. If you cannot import them into a blank (or any) database and you cannot open the one in which they were originally contained. If you could do either of those things, you could then export the form as text and read the text file. I have posted others' code for how to do all of this in the recent past ... but again, if you cannot get access to a database containing the objects, then I don't think you have any shot. :-( Been there. From rockysmolin at bchacc.com Wed Jul 20 16:48:27 2011 From: rockysmolin at bchacc.com (Rocky Smolin) Date: Wed, 20 Jul 2011 14:48:27 -0700 Subject: [AccessD] Access 2010 -- The database cannot be opened because theVBA project contained in it cannot be read. In-Reply-To: <024501cc4720$8d8aef40$a8a0cdc0$@flsi.com> References: <024501cc4720$8d8aef40$a8a0cdc0$@flsi.com> Message-ID: No backup? Tsk-tsk. I've had the problem before and you might try decompile, but IME, it usually doesn't recover the code. Rocky -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Darrell Burns Sent: Wednesday, July 20, 2011 2:04 PM To: 'Access Developers discussion and problem solving' Subject: [AccessD] Access 2010 -- The database cannot be opened because theVBA project contained in it cannot be read. I just lost all of my code! I'm running 32-bit Access 2010 in 64-bit Windows7 (Access 14.0 Object library and Office Access database engine 14.0)..the 32-bit version of Office2010. My application was developed in Access2007. My default file format says Access 2007 (there is no A2010 option). I was trying to import a form from one database into another when I got a "Microsoft Access has stopped working" message, then both databases were hosed. I tried opening a blank database and importing a form but I get "Name conflicts with existing module...." and it won't import. Of course, I have a live demo in 3 hours! Help! Is there any way of salvaging the code I had written behind my forms? How do I prevent this from happening again? -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From dhb at flsi.com Wed Jul 20 17:45:22 2011 From: dhb at flsi.com (Darrell Burns) Date: Wed, 20 Jul 2011 15:45:22 -0700 Subject: [AccessD] Access 2010 -- The database cannot be opened because theVBA project contained in it cannot be read. In-Reply-To: References: <024501cc4720$8d8aef40$a8a0cdc0$@flsi.com> Message-ID: <026001cc472e$b5ddc720$21995560$@flsi.com> Yes, backed up yesterday. Lost today's work. -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Rocky Smolin Sent: Wednesday, July 20, 2011 2:48 PM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Access 2010 -- The database cannot be opened because theVBA project contained in it cannot be read. No backup? Tsk-tsk. I've had the problem before and you might try decompile, but IME, it usually doesn't recover the code. Rocky -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Darrell Burns Sent: Wednesday, July 20, 2011 2:04 PM To: 'Access Developers discussion and problem solving' Subject: [AccessD] Access 2010 -- The database cannot be opened because theVBA project contained in it cannot be read. I just lost all of my code! I'm running 32-bit Access 2010 in 64-bit Windows7 (Access 14.0 Object library and Office Access database engine 14.0)..the 32-bit version of Office2010. My application was developed in Access2007. My default file format says Access 2007 (there is no A2010 option). I was trying to import a form from one database into another when I got a "Microsoft Access has stopped working" message, then both databases were hosed. I tried opening a blank database and importing a form but I get "Name conflicts with existing module...." and it won't import. Of course, I have a live demo in 3 hours! Help! Is there any way of salvaging the code I had written behind my forms? How do I prevent this from happening again? -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From fuller.artful at gmail.com Wed Jul 20 19:45:12 2011 From: fuller.artful at gmail.com (Arthur Fuller) Date: Wed, 20 Jul 2011 20:45:12 -0400 Subject: [AccessD] Access 2010 -- The database cannot be opened because theVBA project contained in it cannot be read. In-Reply-To: <026001cc472e$b5ddc720$21995560$@flsi.com> References: <024501cc4720$8d8aef40$a8a0cdc0$@flsi.com> <026001cc472e$b5ddc720$21995560$@flsi.com> Message-ID: So you only lost one day's work. Take this as a sign from the gods in Redmond. Back up several times a day. It's not difficult. Click the Orb and then Manage and then Backup. It takes about 3 seconds and your ass is saved. I do it several times per session and don't have to recover more than an hour or so's work. A. On Wed, Jul 20, 2011 at 6:45 PM, Darrell Burns wrote: > Yes, backed up yesterday. Lost today's work. > > From vbacreations at gmail.com Wed Jul 20 21:44:00 2011 From: vbacreations at gmail.com (William Benson (VBACreations.Com)) Date: Wed, 20 Jul 2011 22:44:00 -0400 Subject: [AccessD] Access 2010 -- The database cannot be opened because theVBA project contained in it cannot be read. In-Reply-To: References: <024501cc4720$8d8aef40$a8a0cdc0$@flsi.com> <026001cc472e$b5ddc720$21995560$@flsi.com> Message-ID: <004801cc4750$0c961560$25c24020$@gmail.com> What is the orb? This link seems to have some code for backing up and zipping a database. http://developpers.blogspot.com/2008/03/how-to-backup-access-file-using-vba. html as well as a link to software that might repair a database. -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Arthur Fuller Sent: Wednesday, July 20, 2011 8:45 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Access 2010 -- The database cannot be opened because theVBA project contained in it cannot be read. So you only lost one day's work. Take this as a sign from the gods in Redmond. Back up several times a day. It's not difficult. Click the Orb and then Manage and then Backup. It takes about 3 seconds and your ass is saved. I do it several times per session and don't have to recover more than an hour or so's work. A. On Wed, Jul 20, 2011 at 6:45 PM, Darrell Burns wrote: > Yes, backed up yesterday. Lost today's work. > > -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From stuart at lexacorp.com.pg Wed Jul 20 22:53:17 2011 From: stuart at lexacorp.com.pg (Stuart McLachlan) Date: Thu, 21 Jul 2011 13:53:17 +1000 Subject: [AccessD] Access 2010 -- The database cannot be opened because theVBA project contained in it cannot be read. In-Reply-To: <004801cc4750$0c961560$25c24020$@gmail.com> References: <024501cc4720$8d8aef40$a8a0cdc0$@flsi.com>, , <004801cc4750$0c961560$25c24020$@gmail.com> Message-ID: <4E27A2AD.17124.201F10AB@stuart.lexacorp.com.pg> Access 2007 and 2010. The big "Office Button" ball on the left hand side of the menu bar. On 20 Jul 2011 at 22:44, William Benson (VBACreations. wrote: > What is the orb? > > This link seems to have some code for backing up and zipping a > database. > > http://developpers.blogspot.com/2008/03/how-to-backup-access-file-usin > g-vba. html > > as well as a link to software that might repair a database. > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Arthur > Fuller Sent: Wednesday, July 20, 2011 8:45 PM To: Access Developers > discussion and problem solving Subject: Re: [AccessD] Access 2010 -- > The database cannot be opened because theVBA project contained in it > cannot be read. > > So you only lost one day's work. Take this as a sign from the gods in > Redmond. Back up several times a day. It's not difficult. Click the > Orb and then Manage and then Backup. It takes about 3 seconds and your > ass is saved. I do it several times per session and don't have to > recover more than an hour or so's work. > > A. > > On Wed, Jul 20, 2011 at 6:45 PM, Darrell Burns wrote: > > > Yes, backed up yesterday. Lost today's work. > > > > > -- > 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 vbacreations at gmail.com Wed Jul 20 23:43:29 2011 From: vbacreations at gmail.com (William Benson (VBACreations.Com)) Date: Thu, 21 Jul 2011 00:43:29 -0400 Subject: [AccessD] Access 2010 -- The database cannot be opened because theVBA project contained in it cannot be read. In-Reply-To: <4E27A2AD.17124.201F10AB@stuart.lexacorp.com.pg> References: <024501cc4720$8d8aef40$a8a0cdc0$@flsi.com>, , <004801cc4750$0c961560$25c24020$@gmail.com> <4E27A2AD.17124.201F10AB@stuart.lexacorp.com.pg> Message-ID: <005001cc4760$bd07cfa0$37176ee0$@gmail.com> 2010 (which I am using) does not seem to have this... And I cannot see a Manage function. -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Stuart McLachlan Sent: Wednesday, July 20, 2011 11:53 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Access 2010 -- The database cannot be opened because theVBA project contained in it cannot be read. Access 2007 and 2010. The big "Office Button" ball on the left hand side of the menu bar. On 20 Jul 2011 at 22:44, William Benson (VBACreations. wrote: > What is the orb? > > This link seems to have some code for backing up and zipping a > database. > > http://developpers.blogspot.com/2008/03/how-to-backup-access-file-usin > g-vba. html > > as well as a link to software that might repair a database. > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Arthur > Fuller Sent: Wednesday, July 20, 2011 8:45 PM To: Access Developers > discussion and problem solving Subject: Re: [AccessD] Access 2010 -- > The database cannot be opened because theVBA project contained in it > cannot be read. > > So you only lost one day's work. Take this as a sign from the gods in > Redmond. Back up several times a day. It's not difficult. Click the > Orb and then Manage and then Backup. It takes about 3 seconds and your > ass is saved. I do it several times per session and don't have to > recover more than an hour or so's work. > > A. > > On Wed, Jul 20, 2011 at 6:45 PM, Darrell Burns wrote: > > > Yes, backed up yesterday. Lost today's work. > > > > > -- > 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 Wed Jul 20 23:53:21 2011 From: stuart at lexacorp.com.pg (Stuart McLachlan) Date: Thu, 21 Jul 2011 14:53:21 +1000 Subject: [AccessD] Access 2010 -- The database cannot be opened because theVBA project contained in it cannot be read. In-Reply-To: <005001cc4760$bd07cfa0$37176ee0$@gmail.com> References: <024501cc4720$8d8aef40$a8a0cdc0$@flsi.com>, <4E27A2AD.17124.201F10AB@stuart.lexacorp.com.pg>, <005001cc4760$bd07cfa0$37176ee0$@gmail.com> Message-ID: <4E27B0C1.26772.20560F93@stuart.lexacorp.com.pg> You're right, that is only in 2007. I do wish they couldn't keep changing the interface every few years. :( No idea where it is (if it exists at all ) in 2010. I can't find it. -- Stuart On 21 Jul 2011 at 0:43, William Benson (VBACreations. wrote: > 2010 (which I am using) does not seem to have this... And I cannot see > a Manage function. > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Stuart > McLachlan Sent: Wednesday, July 20, 2011 11:53 PM To: Access > Developers discussion and problem solving Subject: Re: [AccessD] > Access 2010 -- The database cannot be opened because theVBA project > contained in it cannot be read. > > Access 2007 and 2010. The big "Office Button" ball on the left hand > side of the menu bar. > > On 20 Jul 2011 at 22:44, William Benson (VBACreations. wrote: > > > What is the orb? > > > > This link seems to have some code for backing up and zipping a > > database. > > > > http://developpers.blogspot.com/2008/03/how-to-backup-access-file-us > > in g-vba. html > > > > as well as a link to software that might repair a database. > > > > -----Original Message----- > > From: accessd-bounces at databaseadvisors.com > > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Arthur > > Fuller Sent: Wednesday, July 20, 2011 8:45 PM To: Access Developers > > discussion and problem solving Subject: Re: [AccessD] Access 2010 -- > > The database cannot be opened because theVBA project contained in it > > cannot be read. > > > > So you only lost one day's work. Take this as a sign from the gods > > in Redmond. Back up several times a day. It's not difficult. Click > > the Orb and then Manage and then Backup. It takes about 3 seconds > > and your ass is saved. I do it several times per session and don't > > have to recover more than an hour or so's work. > > > > A. > > > > On Wed, Jul 20, 2011 at 6:45 PM, Darrell Burns wrote: > > > > > Yes, backed up yesterday. Lost today's work. > > > > > > > > -- > > 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 charlotte.foust at gmail.com Wed Jul 20 23:57:12 2011 From: charlotte.foust at gmail.com (Charlotte Foust) Date: Wed, 20 Jul 2011 21:57:12 -0700 Subject: [AccessD] Access 2010 -- The database cannot be opened because theVBA project contained in it cannot be read. In-Reply-To: <005001cc4760$bd07cfa0$37176ee0$@gmail.com> References: <024501cc4720$8d8aef40$a8a0cdc0$@flsi.com> <004801cc4750$0c961560$25c24020$@gmail.com> <4E27A2AD.17124.201F10AB@stuart.lexacorp.com.pg> <005001cc4760$bd07cfa0$37176ee0$@gmail.com> Message-ID: They did away with the ugly office button in 2010, The file menu in 2010 gives you a Save Database As option. There's also a Save & Publish selection on the file menu that offers a backup database option. Charlotte Foust On Wed, Jul 20, 2011 at 9:43 PM, William Benson (VBACreations.Com) < vbacreations at gmail.com> wrote: > 2010 (which I am using) does not seem to have this... And I cannot see a > Manage function. > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Stuart > McLachlan > Sent: Wednesday, July 20, 2011 11:53 PM > To: Access Developers discussion and problem solving > Subject: Re: [AccessD] Access 2010 -- The database cannot be opened because > theVBA project contained in it cannot be read. > > Access 2007 and 2010. The big "Office Button" ball on the left hand side > of the menu bar. > From davidmcafee at gmail.com Thu Jul 21 14:17:53 2011 From: davidmcafee at gmail.com (David McAfee) Date: Thu, 21 Jul 2011 12:17:53 -0700 Subject: [AccessD] Access 2010 SP1 issue Message-ID: I have an ADP with a form that gets bound at run-time. This has worked flawlessly for several years until this morning. The user is complaining that the form opens up with all of the fields displaying #NAME? I haven't touched this form, or even the ADP in the longest time so I new it wasn't anything I've done. :) It works as it is supposed to on my computer and all the other employees in his department. We had him go to another user's computer and log in as himself. It worked. So I figured it was tied to his machine. I then realized his is on Win7, using Acess2010SP1. I found out SP1 was just released internally this week. A-HA! I ended up getting it working by doing this quick fix as shown below: I added the "If (SysCmd(acSysCmdAccessVer) = 14) Then" statement. Private Sub Form_Open(Cancel As Integer) On Error GoTo Form_Open_Error Me.RecordSource = "" If Nz(Me.OpenArgs, "") <> "" Then ' Is Not Null Then If IsNumeric(Me.OpenArgs) Then Me.InputParameters = "@IncStatJunctID = " & CInt(Me.OpenArgs) If (SysCmd(acSysCmdAccessVer) = 14) Then Me.RecordSource = "EXEC dbo.stpItemDetHist " & Me.InputParameters Else Me.RecordSourceQualifier = "dbo" Me.RecordSource = "stpItemDetHist" End If 'Do a bunch of stuff here Else Cancel = True End If Else Cancel = True End If This works, but technically isn't correct. I need to check for A2010 SP1, not just A2010 (Ver14) Does anyone know how I can check for SP1? Exit Sub From dc8 at btinternet.com Thu Jul 21 16:20:15 2011 From: dc8 at btinternet.com (Chris Swann) Date: Thu, 21 Jul 2011 22:20:15 +0100 Subject: [AccessD] Transpose from columns to rows Message-ID: <4E28980F.1060401@btinternet.com> Hi all, Once again my skills need a little help. I have a table which contains data in rows. I need to be able to take the values for each record and, where there is more than one value per record, put it into separate columns. Here is what the data looks like (there are other fields but these are the ones I need to move) ID CODE 1 A1 1 B1 1 C1 2 3 A1 4 Z1 4 etc etc what I need is this ID CODE1 CODE2 CODE3 1 A1 B1 C1 2 3 A1 4 Z1 If anyone can point me in the right direction I would be really grateful. Chris Swann From rockysmolin at bchacc.com Thu Jul 21 16:41:44 2011 From: rockysmolin at bchacc.com (Rocky Smolin) Date: Thu, 21 Jul 2011 14:41:44 -0700 Subject: [AccessD] Format During Edit Message-ID: <380200D6F70246DC9332CF6BD6DF470B@HAL9007> Dear List: I have a text box formatted to Currency - 2 decimal places. The text box is editable and since some decimal numbers do not have an exact equivalent in binary, when I click into the box to edit it, I get a long string of decimal numbers. For example, if the box has $3.25, when I click into it to edit it it displays 3.24999992735684. The user would like it not to do this for obvious reasons but I can't seem to force the behavior I want which would be to display 3.25 for editing. Tried the input mask but no cigar. What trick am I missing? MTIA Rocky Smolin Beach Access Software 858-259-4334 www.bchacc.com www.e-z-mrp.com From stuart at lexacorp.com.pg Thu Jul 21 16:47:44 2011 From: stuart at lexacorp.com.pg (Stuart McLachlan) Date: Fri, 22 Jul 2011 07:47:44 +1000 Subject: [AccessD] Format During Edit In-Reply-To: <380200D6F70246DC9332CF6BD6DF470B@HAL9007> References: <380200D6F70246DC9332CF6BD6DF470B@HAL9007> Message-ID: <4E289E80.8450.23F6C31C@stuart.lexacorp.com.pg> Can you change the type of the underlying field to Currency rather than Double? -- Stuart On 21 Jul 2011 at 14:41, Rocky Smolin wrote: > Dear List: > > I have a text box formatted to Currency - 2 decimal places. The text > box is editable and since some decimal numbers do not have an exact > equivalent in binary, when I click into the box to edit it, I get a > long string of decimal numbers. > > For example, if the box has $3.25, when I click into it to edit it it > displays 3.24999992735684. > > The user would like it not to do this for obvious reasons but I can't > seem to force the behavior I want which would be to display 3.25 for > editing. Tried the input mask but no cigar. > > What trick am I missing? > > MTIA > > Rocky Smolin > Beach Access Software > 858-259-4334 > www.bchacc.com > www.e-z-mrp.com > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > From rockysmolin at bchacc.com Thu Jul 21 17:09:23 2011 From: rockysmolin at bchacc.com (Rocky Smolin) Date: Thu, 21 Jul 2011 15:09:23 -0700 Subject: [AccessD] Format During Edit In-Reply-To: <4E289E80.8450.23F6C31C@stuart.lexacorp.com.pg> References: <380200D6F70246DC9332CF6BD6DF470B@HAL9007> <4E289E80.8450.23F6C31C@stuart.lexacorp.com.pg> Message-ID: <88CFAB5D8A8C4D36B3936D4BAFF59E56@HAL9007> That worked. Thanks, Stuart. Rocky -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Stuart McLachlan Sent: Thursday, July 21, 2011 2:48 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Format During Edit Can you change the type of the underlying field to Currency rather than Double? -- Stuart On 21 Jul 2011 at 14:41, Rocky Smolin wrote: > Dear List: > > I have a text box formatted to Currency - 2 decimal places. The text > box is editable and since some decimal numbers do not have an exact > equivalent in binary, when I click into the box to edit it, I get a > long string of decimal numbers. > > For example, if the box has $3.25, when I click into it to edit it it > displays 3.24999992735684. > > The user would like it not to do this for obvious reasons but I can't > seem to force the behavior I want which would be to display 3.25 for > editing. Tried the input mask but no cigar. > > What trick am I missing? > > MTIA > > Rocky Smolin > Beach Access Software > 858-259-4334 > www.bchacc.com www.e-z-mrp.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 Thu Jul 21 17:20:04 2011 From: accessd at shaw.ca (Jim Lawrence) Date: Thu, 21 Jul 2011 15:20:04 -0700 Subject: [AccessD] Format During Edit In-Reply-To: <4E289E80.8450.23F6C31C@stuart.lexacorp.com.pg> References: <380200D6F70246DC9332CF6BD6DF470B@HAL9007> <4E289E80.8450.23F6C31C@stuart.lexacorp.com.pg> Message-ID: <91295BD047274B88A7DC842F5C16F12F@creativesystemdesigns.com> ...Or you could put the display format to ######.##. Jim -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Stuart McLachlan Sent: Thursday, July 21, 2011 2:48 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Format During Edit Can you change the type of the underlying field to Currency rather than Double? -- Stuart On 21 Jul 2011 at 14:41, Rocky Smolin wrote: > Dear List: > > I have a text box formatted to Currency - 2 decimal places. The text > box is editable and since some decimal numbers do not have an exact > equivalent in binary, when I click into the box to edit it, I get a > long string of decimal numbers. > > For example, if the box has $3.25, when I click into it to edit it it > displays 3.24999992735684. > > The user would like it not to do this for obvious reasons but I can't > seem to force the behavior I want which would be to display 3.25 for > editing. Tried the input mask but no cigar. > > What trick am I missing? > > MTIA > > Rocky Smolin > Beach Access Software > 858-259-4334 > www.bchacc.com > www.e-z-mrp.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 Thu Jul 21 17:37:21 2011 From: stuart at lexacorp.com.pg (Stuart McLachlan) Date: Fri, 22 Jul 2011 08:37:21 +1000 Subject: [AccessD] Format During Edit In-Reply-To: <91295BD047274B88A7DC842F5C16F12F@creativesystemdesigns.com> References: <380200D6F70246DC9332CF6BD6DF470B@HAL9007>, <4E289E80.8450.23F6C31C@stuart.lexacorp.com.pg>, <91295BD047274B88A7DC842F5C16F12F@creativesystemdesigns.com> Message-ID: <4E28AA21.2454.24242E00@stuart.lexacorp.com.pg> That doesn't help when you are actually in the textbox. The full value is shown, regardless of the display fromat. On 21 Jul 2011 at 15:20, Jim Lawrence wrote: > ...Or you could put the display format to ######.##. > > Jim > > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Stuart > McLachlan Sent: Thursday, July 21, 2011 2:48 PM To: Access Developers > discussion and problem solving Subject: Re: [AccessD] Format During > Edit > > Can you change the type of the underlying field to Currency rather > than Double? > > -- > Stuart > > On 21 Jul 2011 at 14:41, Rocky Smolin wrote: > > > Dear List: > > > > I have a text box formatted to Currency - 2 decimal places. The > > text box is editable and since some decimal numbers do not have an > > exact equivalent in binary, when I click into the box to edit it, I > > get a long string of decimal numbers. > > > > For example, if the box has $3.25, when I click into it to edit it > > it displays 3.24999992735684. > > > > The user would like it not to do this for obvious reasons but I > > can't seem to force the behavior I want which would be to display > > 3.25 for editing. Tried the input mask but no cigar. > > > > What trick am I missing? > > > > MTIA > > > > Rocky Smolin > > Beach Access Software > > 858-259-4334 > > www.bchacc.com > > www.e-z-mrp.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 adtp at airtelmail.in Fri Jul 22 06:46:23 2011 From: adtp at airtelmail.in (A.D. Tejpal) Date: Fri, 22 Jul 2011 17:16:23 +0530 Subject: [AccessD] Transpose from columns to rows References: <4E28980F.1060401@btinternet.com> Message-ID: <6C18FCC4C4B74F73B88454EAE286B3E1@personal4a8ede> Chris, Sample query Q_Codes as given below, should get you the desired output. Q_Codes (Crosstab Query) ============================= TRANSFORM First(T_Codes.Code) AS FirstOfCode SELECT T_Codes.ID FROM T_Codes GROUP BY T_Codes.ID PIVOT "Code" & Format(DCount("*","T_Codes","ID = " & [ID] & " AND Code <= '" & [Code] & "'"),"00"); ============================= Note: Table T_Codes has fields ID (number type) and Code (text type). Best wishes, A.D. Tejpal ------------ ----- Original Message ----- From: Chris Swann To: Access Developers discussion and problem solving Sent: Friday, July 22, 2011 02:50 Subject: [AccessD] Transpose from columns to rows Hi all, Once again my skills need a little help. I have a table which contains data in rows. I need to be able to take the values for each record and, where there is more than one value per record, put it into separate columns. Here is what the data looks like (there are other fields but these are the ones I need to move) ID CODE 1 A1 1 B1 1 C1 2 3 A1 4 Z1 4 etc etc what I need is this ID CODE1 CODE2 CODE3 1 A1 B1 C1 2 3 A1 4 Z1 If anyone can point me in the right direction I would be really grateful. Chris Swann From jimdettman at verizon.net Fri Jul 22 07:50:50 2011 From: jimdettman at verizon.net (Jim Dettman) Date: Fri, 22 Jul 2011 08:50:50 -0400 Subject: [AccessD] Access 2010 SP1 issue In-Reply-To: References: Message-ID: <9194940DCB064CFFAB1C278BC0F711FB@XPS> David, Use the GetAccessVersion() code here: http://allenbrowne.com/ser-53code.html To determine the build number of the MSACCESS.EXE. These will be different for the 2010 vs 2010 SP1. The standard 2010 build is 14.0.4750.1000. I don't know what the SP1 version is because I have not installed it yet. Note that both MSKB fixes and SP's will increase the build number so your best bet is not to check for a specific level. Jim. -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of David McAfee Sent: Thursday, July 21, 2011 03:18 PM To: Access Developers discussion and problem solving Subject: [AccessD] Access 2010 SP1 issue I have an ADP with a form that gets bound at run-time. This has worked flawlessly for several years until this morning. The user is complaining that the form opens up with all of the fields displaying #NAME? I haven't touched this form, or even the ADP in the longest time so I new it wasn't anything I've done. :) It works as it is supposed to on my computer and all the other employees in his department. We had him go to another user's computer and log in as himself. It worked. So I figured it was tied to his machine. I then realized his is on Win7, using Acess2010SP1. I found out SP1 was just released internally this week. A-HA! I ended up getting it working by doing this quick fix as shown below: I added the "If (SysCmd(acSysCmdAccessVer) = 14) Then" statement. Private Sub Form_Open(Cancel As Integer) On Error GoTo Form_Open_Error Me.RecordSource = "" If Nz(Me.OpenArgs, "") <> "" Then ' Is Not Null Then If IsNumeric(Me.OpenArgs) Then Me.InputParameters = "@IncStatJunctID = " & CInt(Me.OpenArgs) If (SysCmd(acSysCmdAccessVer) = 14) Then Me.RecordSource = "EXEC dbo.stpItemDetHist " & Me.InputParameters Else Me.RecordSourceQualifier = "dbo" Me.RecordSource = "stpItemDetHist" End If 'Do a bunch of stuff here Else Cancel = True End If Else Cancel = True End If This works, but technically isn't correct. I need to check for A2010 SP1, not just A2010 (Ver14) Does anyone know how I can check for SP1? Exit Sub -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From jimdettman at verizon.net Fri Jul 22 07:54:08 2011 From: jimdettman at verizon.net (Jim Dettman) Date: Fri, 22 Jul 2011 08:54:08 -0400 Subject: [AccessD] Access 2010 SP1 issue In-Reply-To: References: Message-ID: <863C452D91EA4261AB37E2440CEF1110@XPS> BTW, I should have added that your not alone; the bug has already been reported to Microsoft. Jim. -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of David McAfee Sent: Thursday, July 21, 2011 03:18 PM To: Access Developers discussion and problem solving Subject: [AccessD] Access 2010 SP1 issue I have an ADP with a form that gets bound at run-time. This has worked flawlessly for several years until this morning. The user is complaining that the form opens up with all of the fields displaying #NAME? I haven't touched this form, or even the ADP in the longest time so I new it wasn't anything I've done. :) It works as it is supposed to on my computer and all the other employees in his department. We had him go to another user's computer and log in as himself. It worked. So I figured it was tied to his machine. I then realized his is on Win7, using Acess2010SP1. I found out SP1 was just released internally this week. A-HA! I ended up getting it working by doing this quick fix as shown below: I added the "If (SysCmd(acSysCmdAccessVer) = 14) Then" statement. Private Sub Form_Open(Cancel As Integer) On Error GoTo Form_Open_Error Me.RecordSource = "" If Nz(Me.OpenArgs, "") <> "" Then ' Is Not Null Then If IsNumeric(Me.OpenArgs) Then Me.InputParameters = "@IncStatJunctID = " & CInt(Me.OpenArgs) If (SysCmd(acSysCmdAccessVer) = 14) Then Me.RecordSource = "EXEC dbo.stpItemDetHist " & Me.InputParameters Else Me.RecordSourceQualifier = "dbo" Me.RecordSource = "stpItemDetHist" End If 'Do a bunch of stuff here Else Cancel = True End If Else Cancel = True End If This works, but technically isn't correct. I need to check for A2010 SP1, not just A2010 (Ver14) Does anyone know how I can check for SP1? Exit Sub -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From dc8 at btinternet.com Fri Jul 22 15:29:34 2011 From: dc8 at btinternet.com (Chris Swann) Date: Fri, 22 Jul 2011 21:29:34 +0100 Subject: [AccessD] Transpose from columns to rows In-Reply-To: <6C18FCC4C4B74F73B88454EAE286B3E1@personal4a8ede> References: <4E28980F.1060401@btinternet.com> <6C18FCC4C4B74F73B88454EAE286B3E1@personal4a8ede> Message-ID: <4E29DDAE.4060902@btinternet.com> Many, many thanks for that code. I've added it to the database and I now have exactly the output I need. All I have to do now is to find out how to get hold of some other data I need but that's a WHOLE different problem !! Chris On 22/07/2011 12:46, A.D. Tejpal wrote: > Chris, > > Sample query Q_Codes as given below, should get you the desired output. > > Q_Codes (Crosstab Query) > ============================= > TRANSFORM First(T_Codes.Code) AS FirstOfCode > SELECT T_Codes.ID > FROM T_Codes > GROUP BY T_Codes.ID > PIVOT "Code"& Format(DCount("*","T_Codes","ID = "& [ID]& " AND Code<= '"& [Code]& "'"),"00"); > ============================= > > Note: Table T_Codes has fields ID (number type) and Code (text type). > > Best wishes, > A.D. Tejpal > ------------ > > ----- Original Message ----- > From: Chris Swann > To: Access Developers discussion and problem solving > Sent: Friday, July 22, 2011 02:50 > Subject: [AccessD] Transpose from columns to rows > > > Hi all, > > Once again my skills need a little help. > > I have a table which contains data in rows. I need to be able to take > the values for each record and, where there is more than one value per > record, put it into separate columns. > > Here is what the data looks like (there are other fields but these are > the ones I need to move) > > ID CODE > 1 A1 > 1 B1 > 1 C1 > 2 > 3 A1 > 4 Z1 > 4 > > etc etc > > what I need is this > > ID CODE1 CODE2 CODE3 > 1 A1 B1 C1 > 2 > 3 A1 > 4 Z1 > > If anyone can point me in the right direction I would be really grateful. > > Chris Swann From newsgrps at dalyn.co.nz Fri Jul 22 16:54:54 2011 From: newsgrps at dalyn.co.nz (newsgrps) Date: Sat, 23 Jul 2011 09:54:54 +1200 Subject: [AccessD] Access 2010 SP1 issue In-Reply-To: <863C452D91EA4261AB37E2440CEF1110@XPS> References: <863C452D91EA4261AB37E2440CEF1110@XPS> Message-ID: <20110722215605.XVUV4056.mta02.xtra.co.nz@David-PC.dalyn.co.nz> Jim, How do we find out when Microsoft have solved the problem? Is there a website for these things? Regards David Emerson Dalyn Software Ltd New Zealand At 23/07/2011, Jim Dettman wrote: > BTW, I should have added that your not alone; the bug has already been >reported to Microsoft. > >Jim. > >-----Original Message----- >From: accessd-bounces at databaseadvisors.com >[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of David McAfee >Sent: Thursday, July 21, 2011 03:18 PM >To: Access Developers discussion and problem solving >Subject: [AccessD] Access 2010 SP1 issue > >I have an ADP with a form that gets bound at run-time. >This has worked flawlessly for several years until this morning. > >The user is complaining that the form opens up with all of the fields >displaying #NAME? > >I haven't touched this form, or even the ADP in the longest time so I new it >wasn't anything I've done. :) > >It works as it is supposed to on my computer and all the other employees in >his department. > >We had him go to another user's computer and log in as himself. It worked. > >So I figured it was tied to his machine. I then realized his is on Win7, >using Acess2010SP1. > >I found out SP1 was just released internally this week. A-HA! > >I ended up getting it working by doing this quick fix as shown below: >I added the "If (SysCmd(acSysCmdAccessVer) = 14) Then" statement. > >Private Sub Form_Open(Cancel As Integer) > On Error GoTo Form_Open_Error >Me.RecordSource = "" >If Nz(Me.OpenArgs, "") <> "" Then ' Is Not Null Then > If IsNumeric(Me.OpenArgs) Then > Me.InputParameters = "@IncStatJunctID = " & CInt(Me.OpenArgs) > If (SysCmd(acSysCmdAccessVer) = 14) Then > Me.RecordSource = "EXEC dbo.stpItemDetHist " & >Me.InputParameters > Else > Me.RecordSourceQualifier = "dbo" > Me.RecordSource = "stpItemDetHist" > End If > > 'Do a bunch of stuff here > > Else > Cancel = True > End If >Else > Cancel = True >End If > > >This works, but technically isn't correct. I need to check for A2010 SP1, >not just A2010 (Ver14) > >Does anyone know how I can check for SP1? >Exit Sub >-- >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 Sat Jul 23 07:03:09 2011 From: jimdettman at verizon.net (Jim Dettman) Date: Sat, 23 Jul 2011 08:03:09 -0400 Subject: [AccessD] Access 2010 SP1 issue In-Reply-To: <20110722215605.XVUV4056.mta02.xtra.co.nz@David-PC.dalyn.co.nz> References: <863C452D91EA4261AB37E2440CEF1110@XPS> <20110722215605.XVUV4056.mta02.xtra.co.nz@David-PC.dalyn.co.nz> Message-ID: David, Depending on the severity of the bug and the scope of it, and based on past experience, a couple of things might happen: 1. They will issue a KB and a hot patch for an immediate fix. 2. They will issue a KB with a work around and include it in the next SP. 3. They will simply include it in the next SP. 4. They will issue a KB with a work around and not bother to fix it. All I can say definitely is that we are still in the very initial stages with this. SP1 became available not too long ago and in many places is just starting to be rolled out. If I hear of anything I can pass along, I will. But in the meantime, it looks like simply adding EXEC takes care of the problem with the input parameters. Jim. -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of newsgrps Sent: Friday, July 22, 2011 05:55 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Access 2010 SP1 issue Jim, How do we find out when Microsoft have solved the problem? Is there a website for these things? Regards David Emerson Dalyn Software Ltd New Zealand At 23/07/2011, Jim Dettman wrote: > BTW, I should have added that your not alone; the bug has already been >reported to Microsoft. > >Jim. > >-----Original Message----- >From: accessd-bounces at databaseadvisors.com >[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of David McAfee >Sent: Thursday, July 21, 2011 03:18 PM >To: Access Developers discussion and problem solving >Subject: [AccessD] Access 2010 SP1 issue > >I have an ADP with a form that gets bound at run-time. >This has worked flawlessly for several years until this morning. > >The user is complaining that the form opens up with all of the fields >displaying #NAME? > >I haven't touched this form, or even the ADP in the longest time so I new it >wasn't anything I've done. :) > >It works as it is supposed to on my computer and all the other employees in >his department. > >We had him go to another user's computer and log in as himself. It worked. > >So I figured it was tied to his machine. I then realized his is on Win7, >using Acess2010SP1. > >I found out SP1 was just released internally this week. A-HA! > >I ended up getting it working by doing this quick fix as shown below: >I added the "If (SysCmd(acSysCmdAccessVer) = 14) Then" statement. > >Private Sub Form_Open(Cancel As Integer) > On Error GoTo Form_Open_Error >Me.RecordSource = "" >If Nz(Me.OpenArgs, "") <> "" Then ' Is Not Null Then > If IsNumeric(Me.OpenArgs) Then > Me.InputParameters = "@IncStatJunctID = " & CInt(Me.OpenArgs) > If (SysCmd(acSysCmdAccessVer) = 14) Then > Me.RecordSource = "EXEC dbo.stpItemDetHist " & >Me.InputParameters > Else > Me.RecordSourceQualifier = "dbo" > Me.RecordSource = "stpItemDetHist" > End If > > 'Do a bunch of stuff here > > Else > Cancel = True > End If >Else > Cancel = True >End If > > >This works, but technically isn't correct. I need to check for A2010 SP1, >not just A2010 (Ver14) > >Does anyone know how I can check for SP1? >Exit Sub >-- >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 fuller.artful at gmail.com Sat Jul 23 07:54:01 2011 From: fuller.artful at gmail.com (Arthur Fuller) Date: Sat, 23 Jul 2011 08:54:01 -0400 Subject: [AccessD] Max of 20 values Message-ID: I have a form into which the user enters up to 20 values (measurements in time). They all default to zero. I'm trying to think of an elegant way to find the max value among the 20. Create an array and bubble sort it? I want to call this code on the AfterUpdate of each of these 20 controls so the control called MaxReading gets a new value if any of the 20 controls goes higher than the current MaxReading value. TIA, Arthur From rockysmolin at bchacc.com Sat Jul 23 08:15:34 2011 From: rockysmolin at bchacc.com (Rocky Smolin) Date: Sat, 23 Jul 2011 06:15:34 -0700 Subject: [AccessD] Max of 20 values In-Reply-To: References: Message-ID: Crude as it sounds, twenty IF statements might be the fastest, easiest, cheapest way. Easy to read, easy to maintain in the future. If the text boxes all have consistent names list txtValuenn where nn is a number from 01 to 20, then you could do it in a loop, creating the name of the text box in a string and checking to see if the value in that box is greater than the currently highest value -- If Me(strtxtBoxName) > dblCurrentHIgh then dblCurrentHigh = Me(strtxtBoxName). That would be clever, harder to maintain 5 years form now, and take....almost 20 lines of code. You coud write the twenty values to a temp table and to a Dmax on the table. That would take about 20 lines of code and would be even longer and more fun to create. Or bind the twenty values to a table and put them in a continuous subform. Then the Dmax would be easy. Or 20 If statements... R -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Arthur Fuller Sent: Saturday, July 23, 2011 5:54 AM To: Access Developers discussion and problem solving Subject: [AccessD] Max of 20 values I have a form into which the user enters up to 20 values (measurements in time). They all default to zero. I'm trying to think of an elegant way to find the max value among the 20. Create an array and bubble sort it? I want to call this code on the AfterUpdate of each of these 20 controls so the control called MaxReading gets a new value if any of the 20 controls goes higher than the current MaxReading value. TIA, Arthur -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From df.waters at comcast.net Sat Jul 23 08:42:00 2011 From: df.waters at comcast.net (Dan Waters) Date: Sat, 23 Jul 2011 08:42:00 -0500 Subject: [AccessD] Max of 20 values In-Reply-To: References: Message-ID: <001701cc493e$4ca62a60$e5f27f20$@comcast.net> Hi Arthur, I found this function in my library file. This uses a parameter array and just loops through looking for the highest one. HTH! Dan '--------------------- Private Sub textMaxOfVars() MsgBox MaxOfVars(20, 30, Null, -7, 8, 87.23, "top") End Sub Public Function MaxOfVars(ParamArray varValues() As Variant) On Error GoTo EH '-- Purpose: Return a max of variants. Note that any string will be larger than any numeric value. Dim lvarVal As Variant Dim lvarMax As Variant lvarMax = varValues(0) For Each lvarVal In varValues If lvarVal > lvarMax Then lvarMax = lvarVal End If Next lvarVal MaxOfVars = lvarMax XH: Exit Function EH: Select Case Err.Number Case 9 '-- Subscript out of range - probably due to no values supplied Application.Echo True MaxOfVars = Null GoTo XH End Select End Function '--------------------- -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Arthur Fuller Sent: Saturday, July 23, 2011 7:54 AM To: Access Developers discussion and problem solving Subject: [AccessD] Max of 20 values I have a form into which the user enters up to 20 values (measurements in time). They all default to zero. I'm trying to think of an elegant way to find the max value among the 20. Create an array and bubble sort it? I want to call this code on the AfterUpdate of each of these 20 controls so the control called MaxReading gets a new value if any of the 20 controls goes higher than the current MaxReading value. TIA, Arthur -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From jwcolby at colbyconsulting.com Sat Jul 23 08:46:49 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Sat, 23 Jul 2011 09:46:49 -0400 Subject: [AccessD] Max of 20 values In-Reply-To: References: Message-ID: <4E2AD0C9.2090307@colbyconsulting.com> Bubble sort? Arthur!!! I think a set of classes... ;) Actually a simple function where you pass the control with the data just entered and the MaxReading control. The function compares the value just entered with max reading and sets maxreading to the new value if the new value is bigger. function SetMaxReading(ctlJustEntered as control, ctlMaxReading as control) if ctlJustEntered.Value > ctlMaxReading.value then ctlMaxReading.value = ctlJustEntered.Value endif end function If you need to set dirty false then pass in the form as well. John W. Colby www.ColbyConsulting.com On 7/23/2011 8:54 AM, Arthur Fuller wrote: > I have a form into which the user enters up to 20 values (measurements in > time). They all default to zero. I'm trying to think of an elegant way to > find the max value among the 20. Create an array and bubble sort it? I want > to call this code on the AfterUpdate of each of these 20 controls so the > control called MaxReading gets a new value if any of the 20 controls goes > higher than the current MaxReading value. > > TIA, > Arthur From fuller.artful at gmail.com Sat Jul 23 09:12:04 2011 From: fuller.artful at gmail.com (Arthur Fuller) Date: Sat, 23 Jul 2011 10:12:04 -0400 Subject: [AccessD] Max of 20 values In-Reply-To: <4E2AD0C9.2090307@colbyconsulting.com> References: <4E2AD0C9.2090307@colbyconsulting.com> Message-ID: 1. Pls forgive me my senior moments, JC. 2. You're such a classy guy, I just knew you'd come up with a set of classes. The problem is perhaps in the UI rather than the logic. So far, there is no prevention upon the user entering M1 then M3 then M20 and leaving all the others out. Granted, this style of data-entry doesn't make sense, but given user-sensibilities (the newly politically correct way to phrase Dumbass MoFo), I need to guard against such ostensibly intelligent responses to my form. I suppose that one possibility is in each AfterUpdate, force the Focus to the next in sequence. All that said, I shall work on implementing your approach. I just imported your code and aside from a couple of vbcrlfs if worked fine. The part I don't like is the specific reference to the active control. I have looked at ActiveControl and maybe that's the path I should follow. I want to compress this into one clean function that receives the currently active control and the currently defined maximum, and then reset the MaxGroupReading to the greater of these two values, so I can copy+paste said "=ComputeMax()" into all 20 of the AfterUpdate events and be done with it. Your last comment (about passing in the form) has immediate potential. In the real case, I have to do this four times, with fields numbered M1..M20, M21..M40, M41...M60 and M61...M80. Each of these lives on a separate tab's subform, but the algorithm remains the same throughout. There may or may not be data on everything beyond M20, as defined by the Parent form. If a WorkStation has only two LightCurtains, then LC1 and LC3 are defined with measures, and the others are not. (Please don't ask me why the sequence goes LC1, LC3, LC2 and LC4 -- I'm just a grunt programmer in the trenches, not a certified P.Eng). I just do what I'm told... which argument didn't work at Nuremberg and perhaps won't pass in Toronto, but that's my argument and I'm sticking to it. A. On Sat, Jul 23, 2011 at 9:46 AM, jwcolby wrote: > Bubble sort? > > Arthur!!! > > I think a set of classes... ;) > > Actually a simple function where you pass the control with the data just > entered and the MaxReading control. The function compares the value just > entered with max reading and sets maxreading to the new value if the new > value is bigger. > > function SetMaxReading(ctlJustEntered as control, ctlMaxReading as control) > > if ctlJustEntered.Value > ctlMaxReading.value then > ctlMaxReading.value = ctlJustEntered.Value > endif > end function > > If you need to set dirty false then pass in the form as well. > > John W. Colby > www.ColbyConsulting.com > > > From jwcolby at colbyconsulting.com Sat Jul 23 09:19:14 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Sat, 23 Jul 2011 10:19:14 -0400 Subject: [AccessD] Max of 20 values In-Reply-To: References: <4E2AD0C9.2090307@colbyconsulting.com> Message-ID: <4E2AD862.9060109@colbyconsulting.com> So you are saying that every single control needs data entered into it? John W. Colby www.ColbyConsulting.com On 7/23/2011 10:12 AM, Arthur Fuller wrote: > 1. Pls forgive me my senior moments, JC. > 2. You're such a classy guy, I just knew you'd come up with a set of > classes. > > The problem is perhaps in the UI rather than the logic. So far, there is no > prevention upon the user entering M1 then M3 then M20 and leaving all the > others out. Granted, this style of data-entry doesn't make sense, but given > user-sensibilities (the newly politically correct way to phrase Dumbass > MoFo), I need to guard against such ostensibly intelligent responses to my > form. I suppose that one possibility is in each AfterUpdate, force the Focus > to the next in sequence. > > All that said, I shall work on implementing your approach. I just imported > your code and aside from a couple of vbcrlfs if worked fine. The part I > don't like is the specific reference to the active control. I have looked at > ActiveControl and maybe that's the path I should follow. I want to compress > this into one clean function that receives the currently active control and > the currently defined maximum, and then reset the MaxGroupReading to the > greater of these two values, so I can copy+paste said "=ComputeMax()" into > all 20 of the AfterUpdate events and be done with it. > > Your last comment (about passing in the form) has immediate potential. In > the real case, I have to do this four times, with fields numbered M1..M20, > M21..M40, M41...M60 and M61...M80. Each of these lives on a separate tab's > subform, but the algorithm remains the same throughout. There may or may not > be data on everything beyond M20, as defined by the Parent form. If a > WorkStation has only two LightCurtains, then LC1 and LC3 are defined with > measures, and the others are not. (Please don't ask me why the sequence goes > LC1, LC3, LC2 and LC4 -- I'm just a grunt programmer in the trenches, not a > certified P.Eng). I just do what I'm told... which argument didn't work at > Nuremberg and perhaps won't pass in Toronto, but that's my argument and I'm > sticking to it. > > A. > > On Sat, Jul 23, 2011 at 9:46 AM, jwcolbywrote: > >> Bubble sort? >> >> Arthur!!! >> >> I think a set of classes... ;) >> >> Actually a simple function where you pass the control with the data just >> entered and the MaxReading control. The function compares the value just >> entered with max reading and sets maxreading to the new value if the new >> value is bigger. >> >> function SetMaxReading(ctlJustEntered as control, ctlMaxReading as control) >> >> if ctlJustEntered.Value> ctlMaxReading.value then >> ctlMaxReading.value = ctlJustEntered.Value >> endif >> end function >> >> If you need to set dirty false then pass in the form as well. >> >> John W. Colby >> www.ColbyConsulting.com >> >> >> From jwcolby at colbyconsulting.com Sat Jul 23 09:21:19 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Sat, 23 Jul 2011 10:21:19 -0400 Subject: [AccessD] Max of 20 values In-Reply-To: References: <4E2AD0C9.2090307@colbyconsulting.com> Message-ID: <4E2AD8DF.3020202@colbyconsulting.com> And further, given that you are working with such numbers of controls I would start leaning towards a class solution. Does this need to go into multiple forms? If so leaning further toward a class solution. Are the controls following a naming convention? Leaning further... From you original email I got that the user just entered any controls they wished, not every control. And you said nothing about multiple forms or tabs. John W. Colby www.ColbyConsulting.com On 7/23/2011 10:12 AM, Arthur Fuller wrote: > 1. Pls forgive me my senior moments, JC. > 2. You're such a classy guy, I just knew you'd come up with a set of > classes. > > The problem is perhaps in the UI rather than the logic. So far, there is no > prevention upon the user entering M1 then M3 then M20 and leaving all the > others out. Granted, this style of data-entry doesn't make sense, but given > user-sensibilities (the newly politically correct way to phrase Dumbass > MoFo), I need to guard against such ostensibly intelligent responses to my > form. I suppose that one possibility is in each AfterUpdate, force the Focus > to the next in sequence. > > All that said, I shall work on implementing your approach. I just imported > your code and aside from a couple of vbcrlfs if worked fine. The part I > don't like is the specific reference to the active control. I have looked at > ActiveControl and maybe that's the path I should follow. I want to compress > this into one clean function that receives the currently active control and > the currently defined maximum, and then reset the MaxGroupReading to the > greater of these two values, so I can copy+paste said "=ComputeMax()" into > all 20 of the AfterUpdate events and be done with it. > > Your last comment (about passing in the form) has immediate potential. In > the real case, I have to do this four times, with fields numbered M1..M20, > M21..M40, M41...M60 and M61...M80. Each of these lives on a separate tab's > subform, but the algorithm remains the same throughout. There may or may not > be data on everything beyond M20, as defined by the Parent form. If a > WorkStation has only two LightCurtains, then LC1 and LC3 are defined with > measures, and the others are not. (Please don't ask me why the sequence goes > LC1, LC3, LC2 and LC4 -- I'm just a grunt programmer in the trenches, not a > certified P.Eng). I just do what I'm told... which argument didn't work at > Nuremberg and perhaps won't pass in Toronto, but that's my argument and I'm > sticking to it. > > A. > > On Sat, Jul 23, 2011 at 9:46 AM, jwcolbywrote: > >> Bubble sort? >> >> Arthur!!! >> >> I think a set of classes... ;) >> >> Actually a simple function where you pass the control with the data just >> entered and the MaxReading control. The function compares the value just >> entered with max reading and sets maxreading to the new value if the new >> value is bigger. >> >> function SetMaxReading(ctlJustEntered as control, ctlMaxReading as control) >> >> if ctlJustEntered.Value> ctlMaxReading.value then >> ctlMaxReading.value = ctlJustEntered.Value >> endif >> end function >> >> If you need to set dirty false then pass in the form as well. >> >> John W. Colby >> www.ColbyConsulting.com >> >> >> From fuller.artful at gmail.com Sat Jul 23 09:40:19 2011 From: fuller.artful at gmail.com (Arthur Fuller) Date: Sat, 23 Jul 2011 10:40:19 -0400 Subject: [AccessD] Max of 20 values In-Reply-To: <4E2AD8DF.3020202@colbyconsulting.com> References: <4E2AD0C9.2090307@colbyconsulting.com> <4E2AD8DF.3020202@colbyconsulting.com> Message-ID: Excellent questions, all. Here, as briefly as I can make it, is the scenario. There is an object called a workstation. It may have up to 4 LightCurtains (these devices shoot beams of light from Right to Left and detect the interruption of said beam by any object, typically an operator's hand. Upon detection, the machine must shut down within several milliseconds; a typical measurement would be 220. The Safety Engineer tests this by inserting his hand into the gap between sender and receiver, then measures the Shutdown Time. He does this 20 times. Although one would have to be an idiot to record M1 then M17 then M2 then M20, the current implementation does not prevent this idiocy. The measures are taken on a subform. The MaxReading exists on the parent form. That part I've got already. I'm not even sure what I'm looking for here; perhaps basically a defense against entering M1 then M10 then M11 then M20. Chances are that the user would not do this, but I feel the need to protect against it. Further, there are a maximum of 4 LCs (call them N, S, W, E) and in addition 4 Two-Handed-Controls (THCs, in the lingo), each of which has up to 20 Measurements. So I'm looking for a clean and elegant way to: a) prevent you entering Measure 3 without having entered Measure 2. b) to grab the value of the most recently entered Measurement and compare it against the MaxReading so far recorded. I have b) solved. a) is another matter, and I have no idea how to handle it, except perhaps by forcing the focus to the next M# in the AfterUpdate event. There has got to be something slicker than that, I just know it. A. On Sat, Jul 23, 2011 at 10:21 AM, jwcolby wrote: > And further, given that you are working with such numbers of controls I > would start leaning towards a class solution. Does this need to go into > multiple forms? If so leaning further toward a class solution. Are the > controls following a naming convention? Leaning further... > > From you original email I got that the user just entered any controls they > wished, not every control. And you said nothing about multiple forms or > tabs. > > > John W. Colby > www.ColbyConsulting.com > > On 7/23/2011 10:12 AM, Arthur Fuller wrote: > >> 1. Pls forgive me my senior moments, JC. >> 2. You're such a classy guy, I just knew you'd come up with a set of >> classes. >> >> The problem is perhaps in the UI rather than the logic. So far, there is >> no >> prevention upon the user entering M1 then M3 then M20 and leaving all the >> others out. Granted, this style of data-entry doesn't make sense, but >> given >> user-sensibilities (the newly politically correct way to phrase Dumbass >> MoFo), I need to guard against such ostensibly intelligent responses to my >> form. I suppose that one possibility is in each AfterUpdate, force the >> Focus >> to the next in sequence. >> >> All that said, I shall work on implementing your approach. I just imported >> your code and aside from a couple of vbcrlfs if worked fine. The part I >> don't like is the specific reference to the active control. I have looked >> at >> ActiveControl and maybe that's the path I should follow. I want to >> compress >> this into one clean function that receives the currently active control >> and >> the currently defined maximum, and then reset the MaxGroupReading to the >> greater of these two values, so I can copy+paste said "=ComputeMax()" into >> all 20 of the AfterUpdate events and be done with it. >> >> Your last comment (about passing in the form) has immediate potential. In >> the real case, I have to do this four times, with fields numbered M1..M20, >> M21..M40, M41...M60 and M61...M80. Each of these lives on a separate tab's >> subform, but the algorithm remains the same throughout. There may or may >> not >> be data on everything beyond M20, as defined by the Parent form. If a >> WorkStation has only two LightCurtains, then LC1 and LC3 are defined with >> measures, and the others are not. (Please don't ask me why the sequence >> goes >> LC1, LC3, LC2 and LC4 -- I'm just a grunt programmer in the trenches, not >> a >> certified P.Eng). I just do what I'm told... which argument didn't work at >> Nuremberg and perhaps won't pass in Toronto, but that's my argument and >> I'm >> sticking to it. >> >> A. >> >> On Sat, Jul 23, 2011 at 9:46 AM, jwcolby >> >wrote: >> >> Bubble sort? >>> >>> Arthur!!! >>> >>> I think a set of classes... ;) >>> >>> Actually a simple function where you pass the control with the data just >>> entered and the MaxReading control. The function compares the value just >>> entered with max reading and sets maxreading to the new value if the new >>> value is bigger. >>> >>> function SetMaxReading(ctlJustEntered as control, ctlMaxReading as >>> control) >>> >>> if ctlJustEntered.Value> ctlMaxReading.value then >>> ctlMaxReading.value = ctlJustEntered.Value >>> endif >>> end function >>> >>> If you need to set dirty false then pass in the form as well. >>> >>> John W. Colby >>> www.ColbyConsulting.com >>> >>> >>> >>> -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/**mailman/listinfo/accessd > Website: http://www.databaseadvisors.**com > From jwcolby at colbyconsulting.com Sat Jul 23 10:05:27 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Sat, 23 Jul 2011 11:05:27 -0400 Subject: [AccessD] Max of 20 values In-Reply-To: References: <4E2AD0C9.2090307@colbyconsulting.com> <4E2AD8DF.3020202@colbyconsulting.com> Message-ID: <4E2AE337.3050705@colbyconsulting.com> So IOW the readings the engineer takes when he sticks his hand in the light curtain need to be entered in sequential order in the controls? I am way leaning towards a class solution now. I would probably go with a class to hold the control and sink it's events and a parent class with 20 control class variables to hold instances of the control class (assuming that the number of controls (readings) will never change). Each control class raises an event to tell the parent to "step" the sequence. The parent has the stepping code, the control class has the locking / unlocking code. I might even turn the background a different color to visually cue the user. That would also be in the control class. The class would have a method of setting the control enable property. The parent class would load every one of the controls in the (sub) form into a class instance and as they load set all but the first Enable to false. As the Engineer enters the first reading and AfterUpdate fires, the next sequential control (class instance) is enabled, the focus set to that and the current control disabled. Voila, "stepping" enabled controls. Or perhaps instead of enable / disable, use the Locked property. This would allow the user to do something like a double click in the previous control if they made a data entry error, but only immediately. IOW before entering data into the next control Classes would make this whole thing much simpler because all of the code for the manipulation of the control itself would be kept in the control class instead of the form. Further the whole thing "replicates" in each subform simply by instantiating the parent class. The parent class could even load the control classes into the collection. If the order of entering the readings into the controls does not matter, IOW if it is not critical to have reading one entered into control one, then don't worry about it. Just lock the control and allow the user to click in another. But I think the "stepping" paradigm is the cleanest. And of course, as Stuart will point out, you don't have to use classes at all. You could just stuff all of the code in each subform. And enter the nightmare of fixing code in every subform if you find an issue or add a feature. If you are interested I can code this in under an hour. John W. Colby www.ColbyConsulting.com On 7/23/2011 10:40 AM, Arthur Fuller wrote: > Excellent questions, all. > > Here, as briefly as I can make it, is the scenario. There is an object > called a workstation. It may have up to 4 LightCurtains (these devices shoot > beams of light from Right to Left and detect the interruption of said beam > by any object, typically an operator's hand. Upon detection, the machine > must shut down within several milliseconds; a typical measurement would be > 220. The Safety Engineer tests this by inserting his hand into the gap > between sender and receiver, then measures the Shutdown Time. He does this > 20 times. > > Although one would have to be an idiot to record M1 then M17 then M2 then > M20, the current implementation does not prevent this idiocy. > > The measures are taken on a subform. The MaxReading exists on the parent > form. That part I've got already. > > I'm not even sure what I'm looking for here; perhaps basically a defense > against entering M1 then M10 then M11 then M20. Chances are that the user > would not do this, but I feel the need to protect against it. > > Further, there are a maximum of 4 LCs (call them N, S, W, E) and in addition > 4 Two-Handed-Controls (THCs, in the lingo), each of which has up to 20 > Measurements. > > So I'm looking for a clean and elegant way to: > > a) prevent you entering Measure 3 without having entered Measure 2. > b) to grab the value of the most recently entered Measurement and compare it > against the MaxReading so far recorded. > > I have b) solved. a) is another matter, and I have no idea how to handle it, > except perhaps by forcing the focus to the next M# in the AfterUpdate event. > There has got to be something slicker than that, I just know it. > > A. > > On Sat, Jul 23, 2011 at 10:21 AM, jwcolbywrote: > >> And further, given that you are working with such numbers of controls I >> would start leaning towards a class solution. Does this need to go into >> multiple forms? If so leaning further toward a class solution. Are the >> controls following a naming convention? Leaning further... >> >> From you original email I got that the user just entered any controls they >> wished, not every control. And you said nothing about multiple forms or >> tabs. >> >> >> John W. Colby >> www.ColbyConsulting.com >> >> On 7/23/2011 10:12 AM, Arthur Fuller wrote: >> >>> 1. Pls forgive me my senior moments, JC. >>> 2. You're such a classy guy, I just knew you'd come up with a set of >>> classes. >>> >>> The problem is perhaps in the UI rather than the logic. So far, there is >>> no >>> prevention upon the user entering M1 then M3 then M20 and leaving all the >>> others out. Granted, this style of data-entry doesn't make sense, but >>> given >>> user-sensibilities (the newly politically correct way to phrase Dumbass >>> MoFo), I need to guard against such ostensibly intelligent responses to my >>> form. I suppose that one possibility is in each AfterUpdate, force the >>> Focus >>> to the next in sequence. >>> >>> All that said, I shall work on implementing your approach. I just imported >>> your code and aside from a couple of vbcrlfs if worked fine. The part I >>> don't like is the specific reference to the active control. I have looked >>> at >>> ActiveControl and maybe that's the path I should follow. I want to >>> compress >>> this into one clean function that receives the currently active control >>> and >>> the currently defined maximum, and then reset the MaxGroupReading to the >>> greater of these two values, so I can copy+paste said "=ComputeMax()" into >>> all 20 of the AfterUpdate events and be done with it. >>> >>> Your last comment (about passing in the form) has immediate potential. In >>> the real case, I have to do this four times, with fields numbered M1..M20, >>> M21..M40, M41...M60 and M61...M80. Each of these lives on a separate tab's >>> subform, but the algorithm remains the same throughout. There may or may >>> not >>> be data on everything beyond M20, as defined by the Parent form. If a >>> WorkStation has only two LightCurtains, then LC1 and LC3 are defined with >>> measures, and the others are not. (Please don't ask me why the sequence >>> goes >>> LC1, LC3, LC2 and LC4 -- I'm just a grunt programmer in the trenches, not >>> a >>> certified P.Eng). I just do what I'm told... which argument didn't work at >>> Nuremberg and perhaps won't pass in Toronto, but that's my argument and >>> I'm >>> sticking to it. >>> >>> A. >>> >>> On Sat, Jul 23, 2011 at 9:46 AM, jwcolby >>>> wrote: >>> >>> Bubble sort? >>>> >>>> Arthur!!! >>>> >>>> I think a set of classes... ;) >>>> >>>> Actually a simple function where you pass the control with the data just >>>> entered and the MaxReading control. The function compares the value just >>>> entered with max reading and sets maxreading to the new value if the new >>>> value is bigger. >>>> >>>> function SetMaxReading(ctlJustEntered as control, ctlMaxReading as >>>> control) >>>> >>>> if ctlJustEntered.Value> ctlMaxReading.value then >>>> ctlMaxReading.value = ctlJustEntered.Value >>>> endif >>>> end function >>>> >>>> If you need to set dirty false then pass in the form as well. >>>> >>>> John W. Colby >>>> www.ColbyConsulting.com >>>> >>>> >>>> >>>> -- >> AccessD mailing list >> AccessD at databaseadvisors.com >> http://databaseadvisors.com/**mailman/listinfo/accessd >> Website: http://www.databaseadvisors.**com >> From fuller.artful at gmail.com Sat Jul 23 10:28:52 2011 From: fuller.artful at gmail.com (Arthur Fuller) Date: Sat, 23 Jul 2011 11:28:52 -0400 Subject: [AccessD] Max of 20 values In-Reply-To: <4E2AE337.3050705@colbyconsulting.com> References: <4E2AD0C9.2090307@colbyconsulting.com> <4E2AD8DF.3020202@colbyconsulting.com> <4E2AE337.3050705@colbyconsulting.com> Message-ID: Ok, I won't pay you a penny but go ahead and code it. There are four subforms, call them LC#_fsub, each tied to a parent whose values derive from the subform. I have this working for subform1 and can clone the sub proc for each of them, but this strikes me as seriously inelegant. This topic raises an ancillory question: supposing a number of fields named M1...M20, how can one code a loop that grabs their names and walks the loop and obtains these controls' values? Perhaps Eval? I am seriously unsure upon this turf. A. From jwcolby at colbyconsulting.com Sat Jul 23 10:36:01 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Sat, 23 Jul 2011 11:36:01 -0400 Subject: [AccessD] Max of 20 values In-Reply-To: References: <4E2AD0C9.2090307@colbyconsulting.com> <4E2AD8DF.3020202@colbyconsulting.com> <4E2AE337.3050705@colbyconsulting.com> Message-ID: <4E2AEA61.2060809@colbyconsulting.com> > This topic raises an ancillory question: supposing a number of fields named M1...M20, how can one code a loop that grabs their names and walks the loop and obtains these controls' values? Each form has a controls collection dim ctl as control for each ctl in me.controls 'now look at the control name next ctl Having a nice neat naming convention helps. M01, M02 etc allows you to simply do if left(ctl.name,1) = "m" then debug.print ctl.value endif John W. Colby www.ColbyConsulting.com On 7/23/2011 11:28 AM, Arthur Fuller wrote: > Ok, I won't pay you a penny but go ahead and code it. There are four > subforms, call them LC#_fsub, each tied to a parent whose values derive from > the subform. I have this working for subform1 and can clone the sub proc for > each of them, but this strikes me as seriously inelegant. > > This topic raises an ancillory question: supposing a number of fields named > M1...M20, how can one code a loop that grabs their names and walks the loop > and obtains these controls' values? Perhaps Eval? I am seriously unsure upon > this turf. > > A. From df.waters at comcast.net Sat Jul 23 10:35:08 2011 From: df.waters at comcast.net (Dan Waters) Date: Sat, 23 Jul 2011 10:35:08 -0500 Subject: [AccessD] Re Max of 20 values Message-ID: <001b01cc494e$1af91530$50eb3f90$@comcast.net> Hi Arthur, I found this function in my library file. This uses a parameter array and just loops through looking for the highest one. HTH! Dan '--------------------- Private Sub textMaxOfVars() MsgBox MaxOfVars(20, 30, Null, -7, 8, 87.23, "top") End Sub Public Function MaxOfVars(ParamArray varValues() As Variant) On Error GoTo EH '-- Purpose: Return a max of variants. Note that any string will be larger than any numeric value. Dim lvarVal As Variant Dim lvarMax As Variant lvarMax = varValues(0) For Each lvarVal In varValues If lvarVal > lvarMax Then lvarMax = lvarVal End If Next lvarVal MaxOfVars = lvarMax XH: Exit Function EH: Select Case Err.Number Case 9 '-- Subscript out of range - probably due to no values supplied Application.Echo True MaxOfVars = Null GoTo XH End Select End Function '--------------------- -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Arthur Fuller Sent: Saturday, July 23, 2011 7:54 AM To: Access Developers discussion and problem solving Subject: [AccessD] Max of 20 values I have a form into which the user enters up to 20 values (measurements in time). They all default to zero. I'm trying to think of an elegant way to find the max value among the 20. Create an array and bubble sort it? I want to call this code on the AfterUpdate of each of these 20 controls so the control called MaxReading gets a new value if any of the 20 controls goes higher than the current MaxReading value. TIA, Arthur -- 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 jwcolby at colbyconsulting.com Sat Jul 23 10:39:38 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Sat, 23 Jul 2011 11:39:38 -0400 Subject: [AccessD] Max of 20 values In-Reply-To: References: <4E2AD0C9.2090307@colbyconsulting.com> <4E2AD8DF.3020202@colbyconsulting.com> <4E2AE337.3050705@colbyconsulting.com> Message-ID: <4E2AEB3A.8010008@colbyconsulting.com> How many subforms is irrelevant once you have a parent class. You instantiate the parent in the form and pass in the controls and off you go. John W. Colby www.ColbyConsulting.com On 7/23/2011 11:28 AM, Arthur Fuller wrote: > Ok, I won't pay you a penny but go ahead and code it. There are four > subforms, call them LC#_fsub, each tied to a parent whose values derive from > the subform. I have this working for subform1 and can clone the sub proc for > each of them, but this strikes me as seriously inelegant. > > This topic raises an ancillory question: supposing a number of fields named > M1...M20, how can one code a loop that grabs their names and walks the loop > and obtains these controls' values? Perhaps Eval? I am seriously unsure upon > this turf. > > A. From fuller.artful at gmail.com Sat Jul 23 10:41:29 2011 From: fuller.artful at gmail.com (Arthur Fuller) Date: Sat, 23 Jul 2011 11:41:29 -0400 Subject: [AccessD] Max of 20 values In-Reply-To: <4E2AEA61.2060809@colbyconsulting.com> References: <4E2AD0C9.2090307@colbyconsulting.com> <4E2AD8DF.3020202@colbyconsulting.com> <4E2AE337.3050705@colbyconsulting.com> <4E2AEA61.2060809@colbyconsulting.com> Message-ID: I see what you're getting at but the part I don't like about this approach is its need to visit all the controls, when I'm concerned only about the ones that begin with "M" followed by a number. In this case, isn't it better to create a collection based on this naming scheme? This is just a question; you're the class guy. A. From fuller.artful at gmail.com Sat Jul 23 10:45:08 2011 From: fuller.artful at gmail.com (Arthur Fuller) Date: Sat, 23 Jul 2011 11:45:08 -0400 Subject: [AccessD] Re Max of 20 values In-Reply-To: <001b01cc494e$1af91530$50eb3f90$@comcast.net> References: <001b01cc494e$1af91530$50eb3f90$@comcast.net> Message-ID: If I understand what you are saying, I ought to create an array consisting of M1...M29 and pass it to said function, and let the function walk through the array to determine the max value. Is that right? Thx. Arthur On Sat, Jul 23, 2011 at 11:35 AM, Dan Waters wrote: > Hi Arthur, > > I found this function in my library file. This uses a parameter array and > just loops through looking for the highest one. > > From john at winhaven.net Sat Jul 23 11:09:16 2011 From: john at winhaven.net (John Bartow) Date: Sat, 23 Jul 2011 11:09:16 -0500 Subject: [AccessD] report detail - conditional formatting Message-ID: <068301cc4952$df49e690$9dddb3b0$@winhaven.net> Is it possible to create conditional formatting per detail line in an Access report? I would like to have certain items print in bold. TIA John B From jwcolby at colbyconsulting.com Sat Jul 23 11:11:19 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Sat, 23 Jul 2011 12:11:19 -0400 Subject: [AccessD] Max of 20 values In-Reply-To: References: <4E2AD0C9.2090307@colbyconsulting.com> <4E2AD8DF.3020202@colbyconsulting.com> <4E2AE337.3050705@colbyconsulting.com> <4E2AEA61.2060809@colbyconsulting.com> Message-ID: <4E2AF2A7.70401@colbyconsulting.com> I am just addressing how to find the controls not what you do with them when you find them. You could walk the collection once adding the control into a collection when it matches the name. Once you do that then you walk your collection instead of the form's. John W. Colby www.ColbyConsulting.com On 7/23/2011 11:41 AM, Arthur Fuller wrote: > I see what you're getting at but the part I don't like about this approach > is its need to visit all the controls, when I'm concerned only about the > ones that begin with "M" followed by a number. In this case, isn't it better > to create a collection based on this naming scheme? This is just a question; > you're the class guy. > > A. From gustav at cactus.dk Sat Jul 23 11:31:51 2011 From: gustav at cactus.dk (Gustav Brock) Date: Sat, 23 Jul 2011 18:31:51 +0200 Subject: [AccessD] Max of 20 values Message-ID: Hi John and Arthur You also could loop exactly the controls in question: Set frm = Me.Form 'or a subform. For intControlM = 1 To 20 Set ctl = frm.Controls("M" & CStr(intControlM)) ' Do stuff. Next /gustav >>> jwcolby at colbyconsulting.com 23-07-2011 18:11:19 >>> I am just addressing how to find the controls not what you do with them when you find them. You could walk the collection once adding the control into a collection when it matches the name. Once you do that then you walk your collection instead of the form's. John W. Colby www.ColbyConsulting.com On 7/23/2011 11:41 AM, Arthur Fuller wrote: > I see what you're getting at but the part I don't like about this approach > is its need to visit all the controls, when I'm concerned only about the > ones that begin with "M" followed by a number. In this case, isn't it better > to create a collection based on this naming scheme? This is just a question; > you're the class guy. > > A. From fuller.artful at gmail.com Sat Jul 23 11:50:49 2011 From: fuller.artful at gmail.com (Arthur Fuller) Date: Sat, 23 Jul 2011 12:50:49 -0400 Subject: [AccessD] Max of 20 values In-Reply-To: References: Message-ID: Hmmm. I didn't know you could do that. Kewl I'll just scamper off and write a little looper thing and see if it works! Thx, A. On Sat, Jul 23, 2011 at 12:31 PM, Gustav Brock wrote: > Hi John and Arthur > > You also could loop exactly the controls in question: > > Set frm = Me.Form 'or a subform. > For intControlM = 1 To 20 > Set ctl = frm.Controls("M" & CStr(intControlM)) > ' Do stuff. > Next > > /gustav > > > From fuller.artful at gmail.com Sat Jul 23 11:55:18 2011 From: fuller.artful at gmail.com (Arthur Fuller) Date: Sat, 23 Jul 2011 12:55:18 -0400 Subject: [AccessD] report detail - conditional formatting In-Reply-To: <068301cc4952$df49e690$9dddb3b0$@winhaven.net> References: <068301cc4952$df49e690$9dddb3b0$@winhaven.net> Message-ID: I'm not sure why the conditions would apply per detail line, or even what you mean by the question, but just supposing that you are listing, say Categories, then CategoryID would define the CategoryPrice field and say it's Red if Category = 1 or Green if CategoryID = 2, and so on. I fail to see the problem here; forgive me my stupidity here. Bold should not be more difficult than colours. A, On Sat, Jul 23, 2011 at 12:09 PM, John Bartow wrote: > Is it possible to create conditional formatting per detail line in an > Access > report? > > I would like to have certain items print in bold. > > TIA > John B > > From jwcolby at colbyconsulting.com Sat Jul 23 12:32:52 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Sat, 23 Jul 2011 13:32:52 -0400 Subject: [AccessD] Max of 20 values In-Reply-To: References: Message-ID: <4E2B05C4.50903@colbyconsulting.com> Arthur, I sent you a class solution offline. The assumption was that you wanted to lock all but the currently available control and then walk through the controls allowing just the next control to become enabled. I did a little coloring since it is free. It would be possible to unlock the previous for editing if necessary. That adds additional logic and I didn't want to obscure what I am doing with that code until the specs call for it. ;) John W. Colby www.ColbyConsulting.com From BradM at blackforestltd.com Sat Jul 23 13:58:25 2011 From: BradM at blackforestltd.com (Brad Marks) Date: Sat, 23 Jul 2011 13:58:25 -0500 Subject: [AccessD] Exporting from an Access 2007 Query to Excel - DoCmd.OutputTo Versus DoCmd.TransferSpreadsheet References: <4E2AD0C9.2090307@colbyconsulting.com><4E2AD8DF.3020202@colbyconsulting.com><4E2AE337.3050705@colbyconsulting.com><4E2AEA61.2060809@colbyconsulting.com> Message-ID: All, I am curious if there are significant differences between using "DoCmd.OutputTo" Versus "DoCmd.TransferSpreadsheet" when exporting an Access 2007 Query to Excel. As I understand it, TransferSpreadsheet can handle more rows, but I was wondering if there are any other differences that should be kept in mind when choosing between these two approaches. Thanks, Brad From df.waters at comcast.net Sat Jul 23 16:22:13 2011 From: df.waters at comcast.net (Dan Waters) Date: Sat, 23 Jul 2011 16:22:13 -0500 Subject: [AccessD] Re Max of 20 values In-Reply-To: References: <001b01cc494e$1af91530$50eb3f90$@comcast.net> Message-ID: <002801cc497e$98b29890$ca17c9b0$@comcast.net> Exactly! Since you have a fixed set of controls it's write once and walk away. And you have a MaxOfVars function for future use. Null values are ignored. Good Luck! Dan -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Arthur Fuller Sent: Saturday, July 23, 2011 10:45 AM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Re Max of 20 values If I understand what you are saying, I ought to create an array consisting of M1...M29 and pass it to said function, and let the function walk through the array to determine the max value. Is that right? Thx. Arthur On Sat, Jul 23, 2011 at 11:35 AM, Dan Waters wrote: > Hi Arthur, > > I found this function in my library file. This uses a parameter array > and just loops through looking for the highest one. > > -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From rockysmolin at bchacc.com Sat Jul 23 16:30:52 2011 From: rockysmolin at bchacc.com (Rocky Smolin) Date: Sat, 23 Jul 2011 14:30:52 -0700 Subject: [AccessD] report detail - conditional formatting In-Reply-To: <068301cc4952$df49e690$9dddb3b0$@winhaven.net> References: <068301cc4952$df49e690$9dddb3b0$@winhaven.net> Message-ID: <53C8E31E1BFA4ACC8FD459D6E099DE09@HAL9007> John: I use the Detail Format event to do this. Will that work? R -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of John Bartow Sent: Saturday, July 23, 2011 9:09 AM To: DBA-Access Subject: [AccessD] report detail - conditional formatting Is it possible to create conditional formatting per detail line in an Access report? I would like to have certain items print in bold. TIA John B -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From vbacreations at gmail.com Sat Jul 23 20:27:08 2011 From: vbacreations at gmail.com (William Benson (VBACreations.Com)) Date: Sat, 23 Jul 2011 21:27:08 -0400 Subject: [AccessD] Re Max of 20 values In-Reply-To: References: <001b01cc494e$1af91530$50eb3f90$@comcast.net> Message-ID: <000d01cc49a0$ce8242a0$6b86c7e0$@gmail.com> Going back to the original inquiry. John's right, class modules are the way to go. Assumptions: Tag property on all controls which can contain a time value = "Time Values" I have an additional textbox on my form with controlsource = "= HighestValue()" -- that is a public function -- see below 'IN THE FORM'S CODE MODULE Option Compare Database Option Explicit Dim colTimeValueControls As New Collection Dim MyclsSeriesItem As clsTimeSeriesItem Private Sub Form_Load() Dim Ctrl As Control Glob_Dbl_What_Is_Current_Max = 0 Glob_Str_Which_Control_Has_Max = "" For Each Ctrl In Me.Controls If ControlIsTimeValue(Ctrl, TimeValueTag) Then Set MyclsSeriesItem = New clsTimeSeriesItem Set MyclsSeriesItem.Txt = Ctrl MyclsSeriesItem.Txt.AfterUpdate = "[Event Procedure]" colTimeValueControls.Add MyclsSeriesItem End If Next End Sub 'IN A Class Module named clsTimeSeriesItem Option Compare Database Option Explicit Public WithEvents aTxt As Access.TextBox Private Sub aTxt_AfterUpdate() Dim bTestAllControls As Boolean Dim Ctrl As Control bTestAllControls = False If IsNumeric(aTxt.Value) Then If CDbl(Nz(aTxt.Value, 0)) >= Glob_Dbl_What_Is_Current_Max Then Glob_Dbl_What_Is_Current_Max = CDbl(aTxt.Value) Glob_Str_Which_Control_Has_Max = aTxt.Name ElseIf Glob_Str_Which_Control_Has_Max <> aTxt.Name Then 'DO NOTHING, some other control has the max value anyway Else 'It is numeric, it was the max, and it no longer is as high as the max was bTestAllControls = True End If ElseIf Glob_Str_Which_Control_Has_Max = aTxt.Name Then bTestAllControls = True Else 'We don't care if it went non-numeric, it didn't hold the max value prior to now End If If bTestAllControls Then Glob_Str_Which_Control_Has_Max = "" Glob_Dbl_What_Is_Current_Max = 0 For Each Ctrl In aTxt.Parent.Controls If ControlIsTimeValue(Ctrl, TimeValueTag) Then If IsNumeric(Nz(Ctrl.Value, "")) Then If CDbl(Nz(Ctrl.Value, 0)) > Glob_Dbl_What_Is_Current_Max Then Glob_Dbl_What_Is_Current_Max = CDbl(Nz(Ctrl.Value, 0)) Glob_Str_Which_Control_Has_Max = Ctrl.Name End If End If End If Next End If For Each Ctrl In aTxt.Parent.Controls If TypeOf Ctrl Is Access.TextBox Then If Ctrl.Tag = "Max Time Value" Then Ctrl.Requery Exit For End If End If Next End Sub Public Property Set Txt(ByVal ControlThatChanged As Control) If TypeOf ControlThatChanged Is Access.TextBox Then Set aTxt = ControlThatChanged End If End Property Public Property Get Txt() As Access.TextBox If Not aTxt Is Nothing Then Set Txt = aTxt End If End Property 'IN A STANDARD MODULE Public Glob_Str_Which_Control_Has_Max As String Public Glob_Dbl_What_Is_Current_Max As Double Public Function TimeValueTag() As String TimeValueTag = "Time Values" End Function Public Function ControlIsTimeValue(Ctrl As Control, strTagToLookFor As String) As Boolean If TypeOf Ctrl Is Access.TextBox Then ControlIsTimeValue = (Ctrl.Tag = strTagToLookFor) End If End Function Public Function HighestValue() HighestValue = Glob_Dbl_What_Is_Current_Max End Function From rbgajewski at roadrunner.com Sat Jul 23 22:32:50 2011 From: rbgajewski at roadrunner.com (Bob Gajewski) Date: Sat, 23 Jul 2011 23:32:50 -0400 Subject: [AccessD] report detail - conditional formatting In-Reply-To: <068301cc4952$df49e690$9dddb3b0$@winhaven.net> References: <068301cc4952$df49e690$9dddb3b0$@winhaven.net> Message-ID: Hi John You can do just about anything with formatting in the Detail section ... Here are some examples: The "Detail_Print" code makes every other line grey ... Kind of a green-bar paper effect. The "Detail_Format" section checks the value of a field, and if it matches a set value, then a colored textbox become visible behind the other fields ... Else is remains hidden. You can control font formatting the same way ... Bold, italic, underline, etc. Regards, Bob Gajewski Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer) Const conLtGray = 13816530 If Detail.BackColor = conLtGray Then Detail.BackColor = vbWhite Else Detail.BackColor = conLtGray End If End Sub Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer) If Me.CardexStreetSide = "(intersection)" Then If Me.CardexIntersectingStreetID = 327 Then Me.txtIntersectionHighlight = "" Me.txtIntersectionHighlight.Visible = False Me.txtBridgeOverCreekHighlight = " " Me.txtBridgeOverCreekHighlight.Visible = True Else Me.txtIntersectionHighlight = " " Me.txtIntersectionHighlight.Visible = True Me.txtBridgeOverCreekHighlight = "" Me.txtBridgeOverCreekHighlight.Visible = False End If Me.SectorNumber.Visible = False Me.txtCoordinates.Visible = True Else Me.Occupant = Me.Occupant Me.txtIntersectionHighlight = "" Me.txtIntersectionHighlight.Visible = False Me.txtBridgeOverCreekHighlight = "" Me.txtBridgeOverCreekHighlight.Visible = False Me.SectorNumber.Visible = True Me.txtCoordinates.Visible = False End If End Sub -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of John Bartow Sent: Saturday, July 23, 2011 12:09 PM To: DBA-Access Subject: [AccessD] report detail - conditional formatting Is it possible to create conditional formatting per detail line in an Access report? I would like to have certain items print in bold. TIA John B -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From fuller.artful at gmail.com Sun Jul 24 01:41:21 2011 From: fuller.artful at gmail.com (Arthur Fuller) Date: Sun, 24 Jul 2011 02:41:21 -0400 Subject: [AccessD] Re Max of 20 values In-Reply-To: <000d01cc49a0$ce8242a0$6b86c7e0$@gmail.com> References: <001b01cc494e$1af91530$50eb3f90$@comcast.net> <000d01cc49a0$ce8242a0$6b86c7e0$@gmail.com> Message-ID: Thanks! A. On Sat, Jul 23, 2011 at 9:27 PM, William Benson (VBACreations.Com) < vbacreations at gmail.com> wrote: > Going back to the original inquiry. John's right, class modules are the way > to go. > > From phpons at gmail.com Sun Jul 24 03:29:30 2011 From: phpons at gmail.com (philippe pons) Date: Sun, 24 Jul 2011 10:29:30 +0200 Subject: [AccessD] 97 to 2007 Performance issue Message-ID: Dear all, I need your advice re performance issue. I recently migrated an Access 1997 application to Access 2007. It has not been possible to put the app in production at the moment. My customer put it in production the last days, and he reports a heavy reduction in terms of reactivity. Back end on a server, front end on user desktop. Did you ever run into such problems? What would be the possible causes? I get to the customer tomorrow. Thanks in advance for any help, Philippe Pons From vbacreations at gmail.com Sun Jul 24 07:16:05 2011 From: vbacreations at gmail.com (William Benson) Date: Sun, 24 Jul 2011 08:16:05 -0400 Subject: [AccessD] Re Max of 20 values In-Reply-To: References: <001b01cc494e$1af91530$50eb3f90$@comcast.net> <000d01cc49a0$ce8242a0$6b86c7e0$@gmail.com> Message-ID: Arthur... if you do try it out ... maybe you will see-- as I do-- that the textbox holding the highest value at all times seems to take about 200 or300 milliseconds to update. Though it's the same whether 5 or 100 controls (textboxes.) I feel this is slow. Too slow. I assume the Requery is taking the time... because the value in the result box goes blank for entire 200 mil. So maybe there is a better way than the function I bound it to or a faster alternative to requery. On Jul 24, 2011 2:42 AM, "Arthur Fuller" wrote: > Thanks! > > A. > > On Sat, Jul 23, 2011 at 9:27 PM, William Benson (VBACreations.Com) < > vbacreations at gmail.com> wrote: > >> Going back to the original inquiry. John's right, class modules are the way >> to go. >> >> > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com From rockysmolin at bchacc.com Sun Jul 24 09:59:52 2011 From: rockysmolin at bchacc.com (Rocky Smolin) Date: Sun, 24 Jul 2011 07:59:52 -0700 Subject: [AccessD] 97 to 2007 Performance issue In-Reply-To: References: Message-ID: I find that 2007 runs MUCH slower than 97 or 2003. That's why I still develop in 2003 - the awkward IDE aside. Why this is I don't know. I've got 2010 but haven't benchmarked it yet to see if it's any faster than 2007. Has anyone done this? Rocky -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of philippe pons Sent: Sunday, July 24, 2011 1:30 AM To: Access Developers discussion and problem solving Subject: [AccessD] 97 to 2007 Performance issue Dear all, I need your advice re performance issue. I recently migrated an Access 1997 application to Access 2007. It has not been possible to put the app in production at the moment. My customer put it in production the last days, and he reports a heavy reduction in terms of reactivity. Back end on a server, front end on user desktop. Did you ever run into such problems? What would be the possible causes? I get to the customer tomorrow. Thanks in advance for any help, Philippe Pons -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From john at winhaven.net Sun Jul 24 11:08:34 2011 From: john at winhaven.net (John Bartow) Date: Sun, 24 Jul 2011 11:08:34 -0500 Subject: [AccessD] report detail - conditional formatting In-Reply-To: References: <068301cc4952$df49e690$9dddb3b0$@winhaven.net> Message-ID: <07e201cc4a1b$f0bbbe70$d2333b50$@winhaven.net> Thanks all. I'll follow these suggestions and post back if I have any follow ups. (I've been formatting with PhP lately so I needed a thought refresher on Access Report formatting.) -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Bob Gajewski Sent: Saturday, July 23, 2011 10:33 PM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] report detail - conditional formatting Hi John You can do just about anything with formatting in the Detail section ... Here are some examples: The "Detail_Print" code makes every other line grey ... Kind of a green-bar paper effect. The "Detail_Format" section checks the value of a field, and if it matches a set value, then a colored textbox become visible behind the other fields ... Else is remains hidden. You can control font formatting the same way ... Bold, italic, underline, etc. Regards, Bob Gajewski Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer) Const conLtGray = 13816530 If Detail.BackColor = conLtGray Then Detail.BackColor = vbWhite Else Detail.BackColor = conLtGray End If End Sub Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer) If Me.CardexStreetSide = "(intersection)" Then If Me.CardexIntersectingStreetID = 327 Then Me.txtIntersectionHighlight = "" Me.txtIntersectionHighlight.Visible = False Me.txtBridgeOverCreekHighlight = " " Me.txtBridgeOverCreekHighlight.Visible = True Else Me.txtIntersectionHighlight = " " Me.txtIntersectionHighlight.Visible = True Me.txtBridgeOverCreekHighlight = "" Me.txtBridgeOverCreekHighlight.Visible = False End If Me.SectorNumber.Visible = False Me.txtCoordinates.Visible = True Else Me.Occupant = Me.Occupant Me.txtIntersectionHighlight = "" Me.txtIntersectionHighlight.Visible = False Me.txtBridgeOverCreekHighlight = "" Me.txtBridgeOverCreekHighlight.Visible = False Me.SectorNumber.Visible = True Me.txtCoordinates.Visible = False End If End Sub -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of John Bartow Sent: Saturday, July 23, 2011 12:09 PM To: DBA-Access Subject: [AccessD] report detail - conditional formatting Is it possible to create conditional formatting per detail line in an Access report? I would like to have certain items print in bold. TIA John B -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From BradM at blackforestltd.com Sun Jul 24 15:39:58 2011 From: BradM at blackforestltd.com (Brad Marks) Date: Sun, 24 Jul 2011 15:39:58 -0500 Subject: [AccessD] How to Obtain Access Report Filter information References: <068301cc4952$df49e690$9dddb3b0$@winhaven.net> <07e201cc4a1b$f0bbbe70$d2333b50$@winhaven.net> Message-ID: I am trying to build a VBA routine to obtain report filter info. The following line works nicely to obtain the filter for Report1 and store it in a variable called str_Report_Filter str_Report_Filter = Reports.Report1.Filter What I would like to do is make this "Generic" so that I can plug in a variable instead of the hardcoded "Report1" Something along these lines... Dim str_Report_Name str_Report_Name = "Report2" Is there a way to use a variable in a situation such as this? str_Report_Filter = Reports.str_report_name.Filter (I know that this doesn't work. This is just an example of what I am trying to do) I have tried many variations and tried to find an example on the internet, but have not had any luck. A simple example of how to do this would be most appreciated. Thanks for your help/advice. Brad From rlister at actuarial-files.com Sun Jul 24 15:48:16 2011 From: rlister at actuarial-files.com (Ralf Lister) Date: Sun, 24 Jul 2011 16:48:16 -0400 Subject: [AccessD] OT- Max Row Number in Excel Message-ID: <000301cc4a43$0517eca0$0f47c5e0$@com> Hello all, The max. row number of Excel 2007 is 65000 and something. Does Excel 2010 allow more rows? Saludos Ralf Lister From stuart at lexacorp.com.pg Sun Jul 24 16:10:08 2011 From: stuart at lexacorp.com.pg (Stuart McLachlan) Date: Mon, 25 Jul 2011 07:10:08 +1000 Subject: [AccessD] OT- Max Row Number in Excel In-Reply-To: <000301cc4a43$0517eca0$0f47c5e0$@com> References: <000301cc4a43$0517eca0$0f47c5e0$@com> Message-ID: <4E2C8A30.23940.33476F14@stuart.lexacorp.com.pg> No that was the maximum in 2003. Actually 65 536 ( 2^16). In 2007 they changed that to 1 048 576 (2^20). 2010 is the same. -- Stuart On 24 Jul 2011 at 16:48, Ralf Lister wrote: > Hello all, > > The max. row number of Excel 2007 is 65000 and something. > > Does Excel 2010 allow more rows? > > Saludos > Ralf Lister > > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > From stuart at lexacorp.com.pg Sun Jul 24 16:21:17 2011 From: stuart at lexacorp.com.pg (Stuart McLachlan) Date: Mon, 25 Jul 2011 07:21:17 +1000 Subject: [AccessD] How to Obtain Access Report Filter information In-Reply-To: References: <068301cc4952$df49e690$9dddb3b0$@winhaven.net>, Message-ID: <4E2C8CCD.13750.3351A37C@stuart.lexacorp.com.pg> str_Report_name = "rpt" & "1" str_Report_Filter = Reports(str_report_name).Filter But you will get an Error 2451 if the report is not open at the time. -- Stuart On 24 Jul 2011 at 15:39, Brad Marks wrote: > I am trying to build a VBA routine to obtain report filter info. > > > The following line works nicely to obtain the filter for Report1 and > store it in a variable called str_Report_Filter > > str_Report_Filter = Reports.Report1.Filter > > > > What I would like to do is make this "Generic" so that I can plug in a > variable instead of the hardcoded "Report1" > > > > Something along these lines... > > > > Dim str_Report_Name > > str_Report_Name = "Report2" > > Is there a way to use a variable in a situation such as this? > > str_Report_Filter = Reports.str_report_name.Filter > > (I know that this doesn't work. This is just an example of what I am > trying to do) > > > > I have tried many variations and tried to find an example on the > internet, but have not had any luck. > > A simple example of how to do this would be most appreciated. > > Thanks for your help/advice. > > Brad > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > From rlister at actuarial-files.com Sun Jul 24 16:26:04 2011 From: rlister at actuarial-files.com (Ralf Lister) Date: Sun, 24 Jul 2011 17:26:04 -0400 Subject: [AccessD] OT- Max Row Number in Excel In-Reply-To: <4E2C8A30.23940.33476F14@stuart.lexacorp.com.pg> References: <000301cc4a43$0517eca0$0f47c5e0$@com> <4E2C8A30.23940.33476F14@stuart.lexacorp.com.pg> Message-ID: <000401cc4a48$4cb40a30$e61c1e90$@com> Many thanks, Stuart Saludos Ralf Lister -----Mensaje original----- De: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] En nombre de Stuart McLachlan Enviado el: Domingo, 24 de Julio de 2011 05:10 p.m. Para: Access Developers discussion and problem solving Asunto: Re: [AccessD] OT- Max Row Number in Excel No that was the maximum in 2003. Actually 65 536 ( 2^16). In 2007 they changed that to 1 048 576 (2^20). 2010 is the same. -- Stuart On 24 Jul 2011 at 16:48, Ralf Lister wrote: > Hello all, > > The max. row number of Excel 2007 is 65000 and something. > > Does Excel 2010 allow more rows? > > Saludos > Ralf Lister > > > > -- > 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 ----- No virus found in this message. Checked by AVG - www.avg.com Version: 10.0.1390 / Virus Database: 1518/3785 - Release Date: 07/24/11 From BradM at blackforestltd.com Sun Jul 24 16:52:43 2011 From: BradM at blackforestltd.com (Brad Marks) Date: Sun, 24 Jul 2011 16:52:43 -0500 Subject: [AccessD] How to Obtain Access Report Filter information References: <068301cc4952$df49e690$9dddb3b0$@winhaven.net>, <4E2C8CCD.13750.3351A37C@stuart.lexacorp.com.pg> Message-ID: Stuart, Thank you for the help, I really appreciate it. Your example works nicely for what I am trying to accomplish. Brad -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Stuart McLachlan Sent: Sunday, July 24, 2011 4:21 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] How to Obtain Access Report Filter information str_Report_name = "rpt" & "1" str_Report_Filter = Reports(str_report_name).Filter But you will get an Error 2451 if the report is not open at the time. -- Stuart On 24 Jul 2011 at 15:39, Brad Marks wrote: > I am trying to build a VBA routine to obtain report filter info. > > > The following line works nicely to obtain the filter for Report1 and > store it in a variable called str_Report_Filter > > str_Report_Filter = Reports.Report1.Filter > > > > What I would like to do is make this "Generic" so that I can plug in a > variable instead of the hardcoded "Report1" > > > > Something along these lines... > > > > Dim str_Report_Name > > str_Report_Name = "Report2" > > Is there a way to use a variable in a situation such as this? > > str_Report_Filter = Reports.str_report_name.Filter > > (I know that this doesn't work. This is just an example of what I am > trying to do) > > > > I have tried many variations and tried to find an example on the > internet, but have not had any luck. > > A simple example of how to do this would be most appreciated. > > Thanks for your help/advice. > > Brad > > -- > 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 has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. From darren at activebilling.com.au Sun Jul 24 18:47:09 2011 From: darren at activebilling.com.au (Darren - Active Billing) Date: Mon, 25 Jul 2011 09:47:09 +1000 Subject: [AccessD] Max of 20 values In-Reply-To: References: Message-ID: <016f01cc4a5c$01c92d70$055b8850$@activebilling.com.au> Hi Arthur Coming in late to this so you may have already have implemented a solution. (And to be honest haven't read all the threads so I may have missed something in the posts) :-) Couple of assumptions: 1 Assuming your '20' recorded time measurements all sit in one table 2 Assuming they all have a relevant PK/Surrogate key to group each test batch of 20...eg TestBatchNo etc. Can't you just use a Domain lookup? DMAX? E.g. Have some display field bound to the following after the update of each table DMax("TimeTakenToForceShutOffField","InSomeTable","SomePK/SurrogateKeyForThi sTestBatchof20 = " & intSomeTestBatchIdenfifier & ")" Many thanks Darren -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Arthur Fuller Sent: Saturday, 23 July 2011 10:54 PM To: Access Developers discussion and problem solving Subject: [AccessD] Max of 20 values I have a form into which the user enters up to 20 values (measurements in time). They all default to zero. I'm trying to think of an elegant way to find the max value among the 20. Create an array and bubble sort it? I want to call this code on the AfterUpdate of each of these 20 controls so the control called MaxReading gets a new value if any of the 20 controls goes higher than the current MaxReading value. TIA, Arthur -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From vbacreations at gmail.com Sun Jul 24 19:50:26 2011 From: vbacreations at gmail.com (William Benson (VBACreations.Com)) Date: Sun, 24 Jul 2011 20:50:26 -0400 Subject: [AccessD] OT- Max Row Number in Excel In-Reply-To: <000301cc4a43$0517eca0$0f47c5e0$@com> References: <000301cc4a43$0517eca0$0f47c5e0$@com> Message-ID: <000c01cc4a64$d8b41f90$8a1c5eb0$@gmail.com> Excel 2003 had 65536. Excel 2007 and 2010 both allow 1,048,576. If you have opened a Excel 2007 file and see only 65,536 rows you are probably in compatibility mode, which you can turn off in the File Options (Under Save ... if you have default File Save format as .xls, then you will always be seeing 65,536 rows in a new workbook. Change that to .xlsx). -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Ralf Lister Sent: Sunday, July 24, 2011 4:48 PM To: 'Access Developers discussion and problem solving' Subject: [AccessD] OT- Max Row Number in Excel Hello all, The max. row number of Excel 2007 is 65000 and something. Does Excel 2010 allow more rows? Saludos Ralf Lister -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From vbacreations at gmail.com Sun Jul 24 21:19:46 2011 From: vbacreations at gmail.com (William Benson) Date: Sun, 24 Jul 2011 22:19:46 -0400 Subject: [AccessD] 97 to 2007 Performance issue In-Reply-To: References: Message-ID: I will add my plea for information and a means of understanding. .. I totally agree it is slower and would like to know why. Data sheet form filtering, refreshing forms, requeryng controls in particular. From stuart at lexacorp.com.pg Sun Jul 24 21:27:27 2011 From: stuart at lexacorp.com.pg (Stuart McLachlan) Date: Mon, 25 Jul 2011 12:27:27 +1000 Subject: [AccessD] 97 to 2007 Performance issue In-Reply-To: References: , , Message-ID: <4E2CD48F.17611.3469F318@stuart.lexacorp.com.pg> Short answer. It's a Microsoft product. Every new version of everything they have ever released uses more resources and takes longer to do the same thing (with the possible except of Win 7 over Vista) :-) -- Stuart On 24 Jul 2011 at 22:19, William Benson wrote: > I will add my plea for information and a means of understanding. .. I > totally agree it is slower and would like to know why. > > Data sheet form filtering, refreshing forms, requeryng controls in > particular. -- AccessD mailing list AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd Website: > http://www.databaseadvisors.com > From charlotte.foust at gmail.com Sun Jul 24 22:00:08 2011 From: charlotte.foust at gmail.com (Charlotte Foust) Date: Sun, 24 Jul 2011 20:00:08 -0700 Subject: [AccessD] 97 to 2007 Performance issue In-Reply-To: <4E2CD48F.17611.3469F318@stuart.lexacorp.com.pg> References: <4E2CD48F.17611.3469F318@stuart.lexacorp.com.pg> Message-ID: Because 2007 is fat with "end user" features for all the developer wannabes MS is aiming at. A97 was still mostly restricted on the bells and whistles to the stuff developers would want to use ... and knew how to! VBA alone has increased to a huge size in anything later than 2002. Charlotte Foust On Sun, Jul 24, 2011 at 7:27 PM, Stuart McLachlan wrote: > Short answer. It's a Microsoft product. Every new version of everything > they have ever > released uses more resources and takes longer to do the same thing (with > the possible > except of Win 7 over Vista) :-) > > -- > Stuart > > > On 24 Jul 2011 at 22:19, William Benson wrote: > > > I will add my plea for information and a means of understanding. .. I > > totally agree it is slower and would like to know why. > > > > Data sheet form filtering, refreshing forms, requeryng controls in > > particular. -- 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 phpons at gmail.com Mon Jul 25 00:56:36 2011 From: phpons at gmail.com (philippe pons) Date: Mon, 25 Jul 2011 07:56:36 +0200 Subject: [AccessD] 97 to 2007 Performance issue In-Reply-To: References: <4E2CD48F.17611.3469F318@stuart.lexacorp.com.pg> Message-ID: Charlotte, I'm not sure that new features will slow Access. The perf issue comes when the front end requires data from the back end. And to my knowledge, ODBC is the piece of software that do this data transfer. If a new version of ODBC is used by A2007, and don't see why it would be slower than any previous one. Do you think that there are any tuning options that would affect performance? Philippe Pons 2011/7/25 Charlotte Foust > Because 2007 is fat with "end user" features for all the developer wannabes > MS is aiming at. A97 was still mostly restricted on the bells and whistles > to the stuff developers would want to use ... and knew how to! VBA alone > has increased to a huge size in anything later than 2002. > > Charlotte Foust > > On Sun, Jul 24, 2011 at 7:27 PM, Stuart McLachlan >wrote: > > > Short answer. It's a Microsoft product. Every new version of everything > > they have ever > > released uses more resources and takes longer to do the same thing (with > > the possible > > except of Win 7 over Vista) :-) > > > > -- > > Stuart > > > > > > On 24 Jul 2011 at 22:19, William Benson wrote: > > > > > I will add my plea for information and a means of understanding. .. I > > > totally agree it is slower and would like to know why. > > > > > > Data sheet form filtering, refreshing forms, requeryng controls in > > > particular. -- 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 Mon Jul 25 01:33:31 2011 From: stuart at lexacorp.com.pg (Stuart McLachlan) Date: Mon, 25 Jul 2011 16:33:31 +1000 Subject: [AccessD] 97 to 2007 Performance issue In-Reply-To: References: , , Message-ID: <4E2D0E3B.11824.354B3B52@stuart.lexacorp.com.pg> Access to Access links don't use ODBC, AFAIK, they use DAO for linked tables. -- Stuart On 25 Jul 2011 at 7:56, philippe pons wrote: > Charlotte, > > I'm not sure that new features will slow Access. > The perf issue comes when the front end requires > data from the back end. > And to my knowledge, ODBC is the piece of software that > do this data transfer. > If a new version of ODBC is used by A2007, and don't see why it would > be slower than any previous one. Do you think that there are any > tuning options that would affect performance? > > Philippe Pons > > 2011/7/25 Charlotte Foust > > > Because 2007 is fat with "end user" features for all the developer > > wannabes MS is aiming at. A97 was still mostly restricted on the > > bells and whistles to the stuff developers would want to use ... and > > knew how to! VBA alone has increased to a huge size in anything > > later than 2002. > > > > Charlotte Foust > > > > On Sun, Jul 24, 2011 at 7:27 PM, Stuart McLachlan > > > >wrote: > > > > > Short answer. It's a Microsoft product. Every new version of > > > everything they have ever released uses more resources and takes > > > longer to do the same thing (with the possible except of Win 7 > > > over Vista) :-) > > > > > > -- > > > Stuart > > > > > > > > > On 24 Jul 2011 at 22:19, William Benson wrote: > > > > > > > I will add my plea for information and a means of understanding. > > > > .. I totally agree it is slower and would like to know why. > > > > > > > > Data sheet form filtering, refreshing forms, requeryng controls > > > > in particular. -- 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 phpons at gmail.com Mon Jul 25 02:22:42 2011 From: phpons at gmail.com (philippe pons) Date: Mon, 25 Jul 2011 09:22:42 +0200 Subject: [AccessD] 97 to 2007 Performance issue In-Reply-To: <4E2D0E3B.11824.354B3B52@stuart.lexacorp.com.pg> References: <4E2D0E3B.11824.354B3B52@stuart.lexacorp.com.pg> Message-ID: Stuart, You are probably right, and as DAO is optimized for Access, performance should be better than with ODBC. Philippe 2011/7/25 Stuart McLachlan > Access to Access links don't use ODBC, AFAIK, they use DAO for linked > tables. > > -- > Stuart > > On 25 Jul 2011 at 7:56, philippe pons wrote: > > > Charlotte, > > > > I'm not sure that new features will slow Access. > > The perf issue comes when the front end requires > > data from the back end. > > And to my knowledge, ODBC is the piece of software that > > do this data transfer. > > If a new version of ODBC is used by A2007, and don't see why it would > > be slower than any previous one. Do you think that there are any > > tuning options that would affect performance? > > > > Philippe Pons > > > > 2011/7/25 Charlotte Foust > > > > > Because 2007 is fat with "end user" features for all the developer > > > wannabes MS is aiming at. A97 was still mostly restricted on the > > > bells and whistles to the stuff developers would want to use ... and > > > knew how to! VBA alone has increased to a huge size in anything > > > later than 2002. > > > > > > Charlotte Foust > > > > > > On Sun, Jul 24, 2011 at 7:27 PM, Stuart McLachlan > > > > > >wrote: > > > > > > > Short answer. It's a Microsoft product. Every new version of > > > > everything they have ever released uses more resources and takes > > > > longer to do the same thing (with the possible except of Win 7 > > > > over Vista) :-) > > > > > > > > -- > > > > Stuart > > > > > > > > > > > > On 24 Jul 2011 at 22:19, William Benson wrote: > > > > > > > > > I will add my plea for information and a means of understanding. > > > > > .. I totally agree it is slower and would like to know why. > > > > > > > > > > Data sheet form filtering, refreshing forms, requeryng controls > > > > > in particular. -- 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 phpons at gmail.com Mon Jul 25 02:54:54 2011 From: phpons at gmail.com (philippe pons) Date: Mon, 25 Jul 2011 09:54:54 +0200 Subject: [AccessD] 97 to 2007 Performance issue In-Reply-To: References: <4E2D0E3B.11824.354B3B52@stuart.lexacorp.com.pg> Message-ID: I remember that some guys recommended to keep an open connection to the back end, to reduce acces time. But I guess this does not apply to linked tables, as they will use a different connection, won't they? 2011/7/25 philippe pons > Stuart, > > You are probably right, and as DAO is optimized for Access, performance > should be better than > with ODBC. > > Philippe > > > 2011/7/25 Stuart McLachlan > >> Access to Access links don't use ODBC, AFAIK, they use DAO for linked >> tables. >> >> -- >> Stuart >> >> On 25 Jul 2011 at 7:56, philippe pons wrote: >> >> > Charlotte, >> > >> > I'm not sure that new features will slow Access. >> > The perf issue comes when the front end requires >> > data from the back end. >> > And to my knowledge, ODBC is the piece of software that >> > do this data transfer. >> > If a new version of ODBC is used by A2007, and don't see why it would >> > be slower than any previous one. Do you think that there are any >> > tuning options that would affect performance? >> > >> > Philippe Pons >> > >> > 2011/7/25 Charlotte Foust >> > >> > > Because 2007 is fat with "end user" features for all the developer >> > > wannabes MS is aiming at. A97 was still mostly restricted on the >> > > bells and whistles to the stuff developers would want to use ... and >> > > knew how to! VBA alone has increased to a huge size in anything >> > > later than 2002. >> > > >> > > Charlotte Foust >> > > >> > > On Sun, Jul 24, 2011 at 7:27 PM, Stuart McLachlan >> > > > > > >wrote: >> > > >> > > > Short answer. It's a Microsoft product. Every new version of >> > > > everything they have ever released uses more resources and takes >> > > > longer to do the same thing (with the possible except of Win 7 >> > > > over Vista) :-) >> > > > >> > > > -- >> > > > Stuart >> > > > >> > > > >> > > > On 24 Jul 2011 at 22:19, William Benson wrote: >> > > > >> > > > > I will add my plea for information and a means of understanding. >> > > > > .. I totally agree it is slower and would like to know why. >> > > > > >> > > > > Data sheet form filtering, refreshing forms, requeryng controls >> > > > > in particular. -- 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 vbacreations at gmail.com Mon Jul 25 10:08:37 2011 From: vbacreations at gmail.com (William Benson (VBACreations.Com)) Date: Mon, 25 Jul 2011 11:08:37 -0400 Subject: [AccessD] Re Max of 20 values References: <001b01cc494e$1af91530$50eb3f90$@comcast.net> Message-ID: <001501cc4adc$bc17d200$34477600$@gmail.com> The below works much (MUCH) faster by not binding the max-time display textbox to a function (after looping to find it) and using requery. If you know the control's name, just put the variable's value there directly. So For Each Ctrl In aTxt.Parent.Controls If TypeOf Ctrl Is Access.TextBox Then If Ctrl.Tag = "Max Time Value" Then Ctrl.Requery Exit For End If End If Next Becomes aTxt.Parent.Controls("ShowMaxValueHere") = Glob_Dbl_What_Is_Current_Max -----Original Message----- From: William Benson (VBACreations.Com) [mailto:vbacreations at gmail.com] Sent: Saturday, July 23, 2011 9:27 PM To: Access Developers discussion and problem solving Subject: RE: [AccessD] Re Max of 20 values Going back to the original inquiry. John's right, class modules are the way to go. Assumptions: Tag property on all controls which can contain a time value = "Time Values" I have an additional textbox on my form with controlsource = "= HighestValue()" -- that is a public function -- see below 'IN THE FORM'S CODE MODULE Option Compare Database Option Explicit Dim colTimeValueControls As New Collection Dim MyclsSeriesItem As clsTimeSeriesItem Private Sub Form_Load() Dim Ctrl As Control Glob_Dbl_What_Is_Current_Max = 0 Glob_Str_Which_Control_Has_Max = "" For Each Ctrl In Me.Controls If ControlIsTimeValue(Ctrl, TimeValueTag) Then Set MyclsSeriesItem = New clsTimeSeriesItem Set MyclsSeriesItem.Txt = Ctrl MyclsSeriesItem.Txt.AfterUpdate = "[Event Procedure]" colTimeValueControls.Add MyclsSeriesItem End If Next End Sub 'IN A Class Module named clsTimeSeriesItem Option Compare Database Option Explicit Public WithEvents aTxt As Access.TextBox Private Sub aTxt_AfterUpdate() Dim bTestAllControls As Boolean Dim Ctrl As Control bTestAllControls = False If IsNumeric(aTxt.Value) Then If CDbl(Nz(aTxt.Value, 0)) >= Glob_Dbl_What_Is_Current_Max Then Glob_Dbl_What_Is_Current_Max = CDbl(aTxt.Value) Glob_Str_Which_Control_Has_Max = aTxt.Name ElseIf Glob_Str_Which_Control_Has_Max <> aTxt.Name Then 'DO NOTHING, some other control has the max value anyway Else 'It is numeric, it was the max, and it no longer is as high as the max was bTestAllControls = True End If ElseIf Glob_Str_Which_Control_Has_Max = aTxt.Name Then bTestAllControls = True Else 'We don't care if it went non-numeric, it didn't hold the max value prior to now End If If bTestAllControls Then Glob_Str_Which_Control_Has_Max = "" Glob_Dbl_What_Is_Current_Max = 0 For Each Ctrl In aTxt.Parent.Controls If ControlIsTimeValue(Ctrl, TimeValueTag) Then If IsNumeric(Nz(Ctrl.Value, "")) Then If CDbl(Nz(Ctrl.Value, 0)) > Glob_Dbl_What_Is_Current_Max Then Glob_Dbl_What_Is_Current_Max = CDbl(Nz(Ctrl.Value, 0)) Glob_Str_Which_Control_Has_Max = Ctrl.Name End If End If End If Next End If For Each Ctrl In aTxt.Parent.Controls If TypeOf Ctrl Is Access.TextBox Then If Ctrl.Tag = "Max Time Value" Then Ctrl.Requery Exit For End If End If Next End Sub Public Property Set Txt(ByVal ControlThatChanged As Control) If TypeOf ControlThatChanged Is Access.TextBox Then Set aTxt = ControlThatChanged End If End Property Public Property Get Txt() As Access.TextBox If Not aTxt Is Nothing Then Set Txt = aTxt End If End Property 'IN A STANDARD MODULE Public Glob_Str_Which_Control_Has_Max As String Public Glob_Dbl_What_Is_Current_Max As Double Public Function TimeValueTag() As String TimeValueTag = "Time Values" End Function Public Function ControlIsTimeValue(Ctrl As Control, strTagToLookFor As String) As Boolean If TypeOf Ctrl Is Access.TextBox Then ControlIsTimeValue = (Ctrl.Tag = strTagToLookFor) End If End Function Public Function HighestValue() HighestValue = Glob_Dbl_What_Is_Current_Max End Function From BradM at blackforestltd.com Mon Jul 25 12:53:42 2011 From: BradM at blackforestltd.com (Brad Marks) Date: Mon, 25 Jul 2011 12:53:42 -0500 Subject: [AccessD] Exporting Access to Excel - How to "SUM" a column with a variable number of rows? References: <001b01cc494e$1af91530$50eb3f90$@comcast.net> <001501cc4adc$bc17d200$34477600$@gmail.com> Message-ID: I am starting to do some experiments involving the creation of Excel files from Access. Let's say that I have an Access Recordset that can contain anywhere from 100 to 1,000 records. I have a little Access application that currently pushes this data into Excel. This all works nicely. What is the best way to "Sum" a column in Excel after the last record, when the number of records can vary? Thanks, Brad From Lambert.Heenan at chartisinsurance.com Mon Jul 25 13:31:06 2011 From: Lambert.Heenan at chartisinsurance.com (Heenan, Lambert) Date: Mon, 25 Jul 2011 14:31:06 -0400 Subject: [AccessD] Exporting Access to Excel - How to "SUM" a column with a variable number of rows? In-Reply-To: References: <001b01cc494e$1af91530$50eb3f90$@comcast.net> <001501cc4adc$bc17d200$34477600$@gmail.com> Message-ID: The way I do this is after exporting the results of a query to Excel I then run a Dcount() against the same query to discover how many rows were in the output data.... nRows = DCount("*", "Some_Query_Name") Then I open the Excel file with Access (i.e. I set an Excell.Application and Excel.Worksheet object) so that I can then add the formulas that I need to the row under the last row of exported data. Essentially you build the formula in a text variable like this... strFormula = "=Sum(" & Excel_Column(nCol) & nRowOffest - nRowsToSum & ":" & Excel_Column(nCol) & nRowOffest - 1 & ")" Where nRowOffest is the row number to start summing (or averaging or counting, whatever) and nRowsToSum is the number of row in the output. The function Excel_Column is used to get the right alpha prefix in the cells address... Function Excel_Column(nCol As Long) As String ' given a valid column number return the Alpha name for it ' else return an empty string If nCol > 256 Then ' Pre Excel 2007 Excel_Column = "" Else If nCol <= 26 Then Excel_Column = Chr(Asc("A") + nCol - 1) Else Dim sSecond As String sSecond = Excel_Column(nCol Mod 26) Excel_Column = Excel_Column(nCol \ 26) & sSecond End If End If End Function Then, after building the text string with the formula just plug it into the relevant cell in the workbook. After setting the Excel.Application object you then need a reference to the worksheet that needs to be update... Set Ws = xlApp.Sheets(nSheet) With Ws strCellAddress = Excel_Column(nCol) & nRowOffest strFormula = "=Sum(" & Excel_Column(nCol) & nRowOffest - nRowsToSum & ":" & Excel_Column(nCol) & nRowOffest - 1 & ")" .Cells(nRowOffest, nCol) = strFormula End With HTH Lambert -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Brad Marks Sent: Monday, July 25, 2011 1:54 PM To: Access Developers discussion and problem solving Subject: [AccessD] Exporting Access to Excel - How to "SUM" a column with a variable number of rows? I am starting to do some experiments involving the creation of Excel files from Access. Let's say that I have an Access Recordset that can contain anywhere from 100 to 1,000 records. I have a little Access application that currently pushes this data into Excel. This all works nicely. What is the best way to "Sum" a column in Excel after the last record, when the number of records can vary? Thanks, Brad -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From rlister at actuarial-files.com Mon Jul 25 13:43:00 2011 From: rlister at actuarial-files.com (Ralf Lister) Date: Mon, 25 Jul 2011 14:43:00 -0400 Subject: [AccessD] OT- Max Row Number in Excel In-Reply-To: <000c01cc4a64$d8b41f90$8a1c5eb0$@gmail.com> References: <000301cc4a43$0517eca0$0f47c5e0$@com> <000c01cc4a64$d8b41f90$8a1c5eb0$@gmail.com> Message-ID: <000601cc4afa$affc03b0$0ff40b10$@com> Thanks, William. Saludos Ralf Lister -----Mensaje original----- De: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] En nombre de William Benson (VBACreations.Com) Enviado el: Domingo, 24 de Julio de 2011 08:50 p.m. Para: 'Access Developers discussion and problem solving' Asunto: Re: [AccessD] OT- Max Row Number in Excel Excel 2003 had 65536. Excel 2007 and 2010 both allow 1,048,576. If you have opened a Excel 2007 file and see only 65,536 rows you are probably in compatibility mode, which you can turn off in the File Options (Under Save ... if you have default File Save format as .xls, then you will always be seeing 65,536 rows in a new workbook. Change that to .xlsx). -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Ralf Lister Sent: Sunday, July 24, 2011 4:48 PM To: 'Access Developers discussion and problem solving' Subject: [AccessD] OT- Max Row Number in Excel Hello all, The max. row number of Excel 2007 is 65000 and something. Does Excel 2010 allow more rows? Saludos Ralf Lister -- 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 ----- No virus found in this message. Checked by AVG - www.avg.com Version: 10.0.1390 / Virus Database: 1518/3786 - Release Date: 07/24/11 From vbacreations at gmail.com Mon Jul 25 13:50:36 2011 From: vbacreations at gmail.com (William Benson (VBACreations.Com)) Date: Mon, 25 Jul 2011 14:50:36 -0400 Subject: [AccessD] Exporting Access to Excel - How to "SUM" a column with a variable number of rows? In-Reply-To: References: <001b01cc494e$1af91530$50eb3f90$@comcast.net> <001501cc4adc$bc17d200$34477600$@gmail.com> Message-ID: <002001cc4afb$be7a3af0$3b6eb0d0$@gmail.com> Brad, Excel is VERY powerful, and VERY fast. So whenever possible, use what Excel already has, when automating. To sum all the values in a column in Excel, assuming you have hooks to the xl application object and a worksheet: Function TestFunction () Dim xl As Excel.Application Set xl = GetXL With GetXL MsgBox .Sum(.ActiveWorkbook.ActiveSheet.Columns(1)) End With End TestFunction Function GetXL() As Excel.Application On Error Resume Next Set GetXL = GetObject(, "Excel.Application") If GetXL Is Nothing Then Set GetXL = CreateObject("Excel.Application") GetXL.Visible = True End If exit_me: End Function -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Brad Marks Sent: Monday, July 25, 2011 1:54 PM To: Access Developers discussion and problem solving Subject: [AccessD] Exporting Access to Excel - How to "SUM" a column with a variable number of rows? I am starting to do some experiments involving the creation of Excel files from Access. Let's say that I have an Access Recordset that can contain anywhere from 100 to 1,000 records. I have a little Access application that currently pushes this data into Excel. This all works nicely. What is the best way to "Sum" a column in Excel after the last record, when the number of records can vary? Thanks, Brad -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From vbacreations at gmail.com Mon Jul 25 13:52:04 2011 From: vbacreations at gmail.com (William Benson (VBACreations.Com)) Date: Mon, 25 Jul 2011 14:52:04 -0400 Subject: [AccessD] Exporting Access to Excel - How to "SUM" a column with a variable number of rows? References: <001b01cc494e$1af91530$50eb3f90$@comcast.net> <001501cc4adc$bc17d200$34477600$@gmail.com> Message-ID: <002101cc4afb$f2e7dc70$d8b79550$@gmail.com> Oops, I threw the function GetXL in as a bonus without removing xl variable. Function TestFunction () With GetXL MsgBox .Sum(.ActiveWorkbook.ActiveSheet.Columns(1)) End With End TestFunction Function GetXL() As Excel.Application On Error Resume Next Set GetXL = GetObject(, "Excel.Application") If GetXL Is Nothing Then Set GetXL = CreateObject("Excel.Application") GetXL.Visible = True End If exit_me: End Function From jwcolby at colbyconsulting.com Mon Jul 25 13:57:36 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Mon, 25 Jul 2011 14:57:36 -0400 Subject: [AccessD] Link odbc tables in Access Message-ID: <4E2DBCA0.6050603@colbyconsulting.com> When I link to SQL Server from Access using a DSN file, I end up with my tables displayed but also about a billion (sorry, I didn't count) tables that start with INFORMATION_SCHEMA_.xyz. At this time I have no use for those tables and would like to filter them out so that I cannot see them. Does anyone know how to do that? -- John W. Colby www.ColbyConsulting.com From BradM at blackforestltd.com Mon Jul 25 15:51:59 2011 From: BradM at blackforestltd.com (Brad Marks) Date: Mon, 25 Jul 2011 15:51:59 -0500 Subject: [AccessD] Exporting Access to Excel - How to "SUM" a column with a variable number of rows? References: <001b01cc494e$1af91530$50eb3f90$@comcast.net><001501cc4adc$bc17d200$34477600$@gmail.com> Message-ID: William and Lambert, Thanks for the help, I appreciate it. One of the things that I often struggle with is that there is often more than one way to accomplish a task. Before I start to build something big, I like to understand the options and also understand the "Best" way to get something done. Thanks Again, Brad -----Original Message----- From: accessd-bounces at databaseadvisors.com on behalf of Heenan, Lambert Sent: Mon 7/25/2011 1:31 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Exporting Access to Excel - How to "SUM" a column with a variable number of rows? The way I do this is after exporting the results of a query to Excel I then run a Dcount() against the same query to discover how many rows were in the output data.... nRows = DCount("*", "Some_Query_Name") Then I open the Excel file with Access (i.e. I set an Excell.Application and Excel.Worksheet object) so that I can then add the formulas that I need to the row under the last row of exported data. Essentially you build the formula in a text variable like this... strFormula = "=Sum(" & Excel_Column(nCol) & nRowOffest - nRowsToSum & ":" & Excel_Column(nCol) & nRowOffest - 1 & ")" Where nRowOffest is the row number to start summing (or averaging or counting, whatever) and nRowsToSum is the number of row in the output. The function Excel_Column is used to get the right alpha prefix in the cells address... Function Excel_Column(nCol As Long) As String ' given a valid column number return the Alpha name for it ' else return an empty string If nCol > 256 Then ' Pre Excel 2007 Excel_Column = "" Else If nCol <= 26 Then Excel_Column = Chr(Asc("A") + nCol - 1) Else Dim sSecond As String sSecond = Excel_Column(nCol Mod 26) Excel_Column = Excel_Column(nCol \ 26) & sSecond End If End If End Function Then, after building the text string with the formula just plug it into the relevant cell in the workbook. After setting the Excel.Application object you then need a reference to the worksheet that needs to be update... Set Ws = xlApp.Sheets(nSheet) With Ws strCellAddress = Excel_Column(nCol) & nRowOffest strFormula = "=Sum(" & Excel_Column(nCol) & nRowOffest - nRowsToSum & ":" & Excel_Column(nCol) & nRowOffest - 1 & ")" .Cells(nRowOffest, nCol) = strFormula End With HTH Lambert -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Brad Marks Sent: Monday, July 25, 2011 1:54 PM To: Access Developers discussion and problem solving Subject: [AccessD] Exporting Access to Excel - How to "SUM" a column with a variable number of rows? I am starting to do some experiments involving the creation of Excel files from Access. Let's say that I have an Access Recordset that can contain anywhere from 100 to 1,000 records. I have a little Access application that currently pushes this data into Excel. This all works nicely. What is the best way to "Sum" a column in Excel after the last record, when the number of records can vary? Thanks, Brad -- 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 has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. From marksimms at verizon.net Mon Jul 25 19:02:42 2011 From: marksimms at verizon.net (Mark Simms) Date: Mon, 25 Jul 2011 20:02:42 -0400 Subject: [AccessD] Exporting Access to Excel - How to "SUM" a column with a variable number of rows? In-Reply-To: References: <001b01cc494e$1af91530$50eb3f90$@comcast.net><001501cc4adc$bc17d200$34477600$@gmail.com> Message-ID: <016b01cc4b27$57c8ffe0$075affa0$@net> What you need to decide is: dynamic vs. static. If the data is not going to change, then try this: Sub AddTotals Dim rngCol as Range With Activesheet.UsedRange For Each rngCol in .Columns rngCol.Cells(.rows.Count+1) = Application.Sum(rngCol) Next End With End Sub Of course this assumes the starting row is #1. > -----Original Message----- > From: accessd-bounces at databaseadvisors.com [mailto:accessd- > bounces at databaseadvisors.com] On Behalf Of Brad Marks > Sent: Monday, July 25, 2011 4:52 PM > To: Access Developers discussion and problem solving > Subject: Re: [AccessD] Exporting Access to Excel - How to "SUM" a > column with a variable number of rows? > > William and Lambert, > > Thanks for the help, I appreciate it. > > One of the things that I often struggle with is that there is often > more than one way to accomplish a task. Before I start to build > something big, I like to understand the options and also understand the > "Best" way to get something done. > > Thanks Again, > Brad > > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com on behalf of Heenan, Lambert > Sent: Mon 7/25/2011 1:31 PM > To: Access Developers discussion and problem solving > Subject: Re: [AccessD] Exporting Access to Excel - How to "SUM" a > column with a variable number of rows? > > The way I do this is after exporting the results of a query to Excel I > then run a Dcount() against the same query to discover how many rows > were in the output data.... > > nRows = DCount("*", "Some_Query_Name") > > Then I open the Excel file with Access (i.e. I set an > Excell.Application and Excel.Worksheet object) so that I can then add > the formulas that I need to the row under the last row of exported > data. > > Essentially you build the formula in a text variable like this... > > strFormula = "=Sum(" & Excel_Column(nCol) & nRowOffest - nRowsToSum & > ":" & Excel_Column(nCol) & nRowOffest - 1 & ")" > > Where nRowOffest is the row number to start summing (or averaging or > counting, whatever) and nRowsToSum is the number of row in the output. > The function Excel_Column is used to get the right alpha prefix in the > cells address... > > Function Excel_Column(nCol As Long) As String ' given a valid column > number return the Alpha name for it ' else return an empty string > If nCol > 256 Then ' Pre Excel 2007 > Excel_Column = "" > Else > If nCol <= 26 Then > Excel_Column = Chr(Asc("A") + nCol - 1) > Else > Dim sSecond As String > sSecond = Excel_Column(nCol Mod 26) > Excel_Column = Excel_Column(nCol \ 26) & sSecond > End If > End If > End Function > > Then, after building the text string with the formula just plug it into > the relevant cell in the workbook. > > After setting the Excel.Application object you then need a reference to > the worksheet that needs to be update... > > Set Ws = xlApp.Sheets(nSheet) > With Ws > strCellAddress = Excel_Column(nCol) & nRowOffest > strFormula = "=Sum(" & Excel_Column(nCol) & nRowOffest - > nRowsToSum & ":" & Excel_Column(nCol) & nRowOffest - 1 & ")" > .Cells(nRowOffest, nCol) = strFormula > End With > > > HTH > > Lambert > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com [mailto:accessd- > bounces at databaseadvisors.com] On Behalf Of Brad Marks > Sent: Monday, July 25, 2011 1:54 PM > To: Access Developers discussion and problem solving > Subject: [AccessD] Exporting Access to Excel - How to "SUM" a column > with a variable number of rows? > > I am starting to do some experiments involving the creation of Excel > files from Access. > > Let's say that I have an Access Recordset that can contain anywhere > from 100 to 1,000 records. > > I have a little Access application that currently pushes this data into > Excel. This all works nicely. > > What is the best way to "Sum" a column in Excel after the last record, > when the number of records can vary? > > Thanks, > Brad > > -- > 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 has been scanned for viruses and dangerous content by > MailScanner, and is believed to be clean. > > From jeff.developer at gmail.com Tue Jul 26 10:10:45 2011 From: jeff.developer at gmail.com (Jeff B) Date: Tue, 26 Jul 2011 10:10:45 -0500 Subject: [AccessD] Recall: [cross posted] SharePoint 2010 question(s) Message-ID: Jeff B would like to recall the message, "[cross posted] SharePoint 2010 question(s)". From jeff.developer at gmail.com Tue Jul 26 10:11:13 2011 From: jeff.developer at gmail.com (Jeff B) Date: Tue, 26 Jul 2011 10:11:13 -0500 Subject: [AccessD] [cross posted] SharePoint 2010 question(s) Message-ID: I really need to know what you all suggest as the BEST book(s) for learning SharePoint 2010, Access Services, and publishing Access databases to SharePoint. Jeff Barrows MCP, MCAD, MCSD ? Outbak Technologies, LLC Racine, WI jeff.developer at gmail.com From marksimms at verizon.net Tue Jul 26 10:20:21 2011 From: marksimms at verizon.net (Mark Simms) Date: Tue, 26 Jul 2011 11:20:21 -0400 Subject: [AccessD] Exporting Access to Excel - How to "SUM" a column with a variable number of rows? In-Reply-To: <000001cc4b2f$c64b1fe0$52e15fa0$@gmail.com> References: <001b01cc494e$1af91530$50eb3f90$@comcast.net><001501cc4adc$bc17d200$34477600$@gmail.com> <016b01cc4b27$57c8ffe0$075affa0$@net> <000001cc4b2f$c64b1fe0$52e15fa0$@gmail.com> Message-ID: <026e01cc4ba7$8a000320$9e000960$@net> Bill - look again. I am only looping thru EACH COLUMN...and I AM using Application.SUM. I just came from an investment bank where some workbooks would take 20 to 40 MINUTES to complete. Reason: formula-based SUMS, VLOOKUPS, and SUMIFS. VLOOKUPs themselves were horribly inefficient. Even MATCH replacements did not improve performance. When replaced with VBA "static" counterparts, the calc time would decrease 90% in many cases. > -----Original Message----- > From: William Benson (VBACreations.Com) [mailto:vbacreations at gmail.com] > Sent: Monday, July 25, 2011 9:03 PM > To: 'Mark Simms' > Subject: FW: [AccessD] Exporting Access to Excel - How to "SUM" a > column with a variable number of rows? > > Mark, > > I have programmed in Excel for about 8 years and would not recommend > this > approach, but did not want to say so on the ListServ. Perhaps there is > a > reason you would loop through each cell to build a sum instead of using > Excel's marvelous (and instantaneous!) SUM worksheetfunction -- > available to > the application object? > > If you are looping through cells for the purpose of examining them > prior to > adding them, I don't say that is a bad idea - but for a standard > summation, > you would want to use Application.SUM. > > Warm regards, > > Bill > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Mark Simms > Sent: Monday, July 25, 2011 8:03 PM > To: 'Access Developers discussion and problem solving' > Subject: Re: [AccessD] Exporting Access to Excel - How to "SUM" a > column > with a variable number of rows? > > What you need to decide is: dynamic vs. static. > If the data is not going to change, then try this: > > Sub AddTotals > > Dim rngCol as Range > > With Activesheet.UsedRange > > For Each rngCol in .Columns > rngCol.Cells(.rows.Count+1) = Application.Sum(rngCol) > Next > > End With > > End Sub > > Of course this assumes the starting row is #1. > > > -----Original Message----- > > From: accessd-bounces at databaseadvisors.com [mailto:accessd- > > bounces at databaseadvisors.com] On Behalf Of Brad Marks > > Sent: Monday, July 25, 2011 4:52 PM > > To: Access Developers discussion and problem solving > > Subject: Re: [AccessD] Exporting Access to Excel - How to "SUM" a > > column with a variable number of rows? > > > > William and Lambert, > > > > Thanks for the help, I appreciate it. > > > > One of the things that I often struggle with is that there is often > > more than one way to accomplish a task. Before I start to build > > something big, I like to understand the options and also understand > the > > "Best" way to get something done. > > > > Thanks Again, > > Brad > > > > > > -----Original Message----- > > From: accessd-bounces at databaseadvisors.com on behalf of Heenan, > Lambert > > Sent: Mon 7/25/2011 1:31 PM > > To: Access Developers discussion and problem solving > > Subject: Re: [AccessD] Exporting Access to Excel - How to "SUM" a > > column with a variable number of rows? > > > > The way I do this is after exporting the results of a query to Excel > I > > then run a Dcount() against the same query to discover how many rows > > were in the output data.... > > > > nRows = DCount("*", "Some_Query_Name") > > > > Then I open the Excel file with Access (i.e. I set an > > Excell.Application and Excel.Worksheet object) so that I can then add > > the formulas that I need to the row under the last row of exported > > data. > > > > Essentially you build the formula in a text variable like this... > > > > strFormula = "=Sum(" & Excel_Column(nCol) & nRowOffest - nRowsToSum & > > ":" & Excel_Column(nCol) & nRowOffest - 1 & ")" > > > > Where nRowOffest is the row number to start summing (or averaging or > > counting, whatever) and nRowsToSum is the number of row in the > output. > > The function Excel_Column is used to get the right alpha prefix in > the > > cells address... > > > > Function Excel_Column(nCol As Long) As String ' given a valid column > > number return the Alpha name for it ' else return an empty string > > If nCol > 256 Then ' Pre Excel 2007 > > Excel_Column = "" > > Else > > If nCol <= 26 Then > > Excel_Column = Chr(Asc("A") + nCol - 1) > > Else > > Dim sSecond As String > > sSecond = Excel_Column(nCol Mod 26) > > Excel_Column = Excel_Column(nCol \ 26) & sSecond > > End If > > End If > > End Function > > > > Then, after building the text string with the formula just plug it > into > > the relevant cell in the workbook. > > > > After setting the Excel.Application object you then need a reference > to > > the worksheet that needs to be update... > > > > Set Ws = xlApp.Sheets(nSheet) > > With Ws > > strCellAddress = Excel_Column(nCol) & nRowOffest > > strFormula = "=Sum(" & Excel_Column(nCol) & nRowOffest - > > nRowsToSum & ":" & Excel_Column(nCol) & nRowOffest - 1 & ")" > > .Cells(nRowOffest, nCol) = strFormula > > End With > > > > > > HTH > > > > Lambert > > > > -----Original Message----- > > From: accessd-bounces at databaseadvisors.com [mailto:accessd- > > bounces at databaseadvisors.com] On Behalf Of Brad Marks > > Sent: Monday, July 25, 2011 1:54 PM > > To: Access Developers discussion and problem solving > > Subject: [AccessD] Exporting Access to Excel - How to "SUM" a column > > with a variable number of rows? > > > > I am starting to do some experiments involving the creation of Excel > > files from Access. > > > > Let's say that I have an Access Recordset that can contain anywhere > > from 100 to 1,000 records. > > > > I have a little Access application that currently pushes this data > into > > Excel. This all works nicely. > > > > What is the best way to "Sum" a column in Excel after the last > record, > > when the number of records can vary? > > > > Thanks, > > Brad > > > > -- > > 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 has been scanned for viruses and dangerous content by > > MailScanner, and is believed to be clean. > > > > > > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com From BradM at blackforestltd.com Tue Jul 26 15:39:32 2011 From: BradM at blackforestltd.com (Brad Marks) Date: Tue, 26 Jul 2011 15:39:32 -0500 Subject: [AccessD] Exporting Access to Excel - How to "SUM" a column with a variable number of rows? References: <001b01cc494e$1af91530$50eb3f90$@comcast.net><001501cc4adc$bc17d200$34477600$@gmail.com> <016b01cc4b27$57c8ffe0$075affa0$@net> Message-ID: Mark, Thanks for the help, I appreciate it. The sample code that you posted works nicely. Each column is summed. I do have one question, however. How can I prevent select columns from being summed in case they contain data that should not be summed? Thanks, Brad -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Mark Simms Sent: Monday, July 25, 2011 7:03 PM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Exporting Access to Excel - How to "SUM" acolumn with a variable number of rows? What you need to decide is: dynamic vs. static. If the data is not going to change, then try this: Sub AddTotals Dim rngCol as Range With Activesheet.UsedRange For Each rngCol in .Columns rngCol.Cells(.rows.Count+1) = Application.Sum(rngCol) Next End With End Sub Of course this assumes the starting row is #1. > -----Original Message----- > From: accessd-bounces at databaseadvisors.com [mailto:accessd- > bounces at databaseadvisors.com] On Behalf Of Brad Marks > Sent: Monday, July 25, 2011 4:52 PM > To: Access Developers discussion and problem solving > Subject: Re: [AccessD] Exporting Access to Excel - How to "SUM" a > column with a variable number of rows? > > William and Lambert, > > Thanks for the help, I appreciate it. > > One of the things that I often struggle with is that there is often > more than one way to accomplish a task. Before I start to build > something big, I like to understand the options and also understand the > "Best" way to get something done. > > Thanks Again, > Brad > > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com on behalf of Heenan, Lambert > Sent: Mon 7/25/2011 1:31 PM > To: Access Developers discussion and problem solving > Subject: Re: [AccessD] Exporting Access to Excel - How to "SUM" a > column with a variable number of rows? > > The way I do this is after exporting the results of a query to Excel I > then run a Dcount() against the same query to discover how many rows > were in the output data.... > > nRows = DCount("*", "Some_Query_Name") > > Then I open the Excel file with Access (i.e. I set an > Excell.Application and Excel.Worksheet object) so that I can then add > the formulas that I need to the row under the last row of exported > data. > > Essentially you build the formula in a text variable like this... > > strFormula = "=Sum(" & Excel_Column(nCol) & nRowOffest - nRowsToSum & > ":" & Excel_Column(nCol) & nRowOffest - 1 & ")" > > Where nRowOffest is the row number to start summing (or averaging or > counting, whatever) and nRowsToSum is the number of row in the output. > The function Excel_Column is used to get the right alpha prefix in the > cells address... > > Function Excel_Column(nCol As Long) As String ' given a valid column > number return the Alpha name for it ' else return an empty string > If nCol > 256 Then ' Pre Excel 2007 > Excel_Column = "" > Else > If nCol <= 26 Then > Excel_Column = Chr(Asc("A") + nCol - 1) > Else > Dim sSecond As String > sSecond = Excel_Column(nCol Mod 26) > Excel_Column = Excel_Column(nCol \ 26) & sSecond > End If > End If > End Function > > Then, after building the text string with the formula just plug it into > the relevant cell in the workbook. > > After setting the Excel.Application object you then need a reference to > the worksheet that needs to be update... > > Set Ws = xlApp.Sheets(nSheet) > With Ws > strCellAddress = Excel_Column(nCol) & nRowOffest > strFormula = "=Sum(" & Excel_Column(nCol) & nRowOffest - > nRowsToSum & ":" & Excel_Column(nCol) & nRowOffest - 1 & ")" > .Cells(nRowOffest, nCol) = strFormula > End With > > > HTH > > Lambert > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com [mailto:accessd- > bounces at databaseadvisors.com] On Behalf Of Brad Marks > Sent: Monday, July 25, 2011 1:54 PM > To: Access Developers discussion and problem solving > Subject: [AccessD] Exporting Access to Excel - How to "SUM" a column > with a variable number of rows? > > I am starting to do some experiments involving the creation of Excel > files from Access. > > Let's say that I have an Access Recordset that can contain anywhere > from 100 to 1,000 records. > > I have a little Access application that currently pushes this data into > Excel. This all works nicely. > > What is the best way to "Sum" a column in Excel after the last record, > when the number of records can vary? > > Thanks, > Brad > > -- > 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 has been scanned for viruses and dangerous content by > MailScanner, and is believed to be clean. > > -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. From rockysmolin at bchacc.com Tue Jul 26 16:55:13 2011 From: rockysmolin at bchacc.com (Rocky Smolin) Date: Tue, 26 Jul 2011 14:55:13 -0700 Subject: [AccessD] A2003 stops working Message-ID: <8FDCFF410EE948FCAECD101A7CBAE855@HAL9007> Dear List: Running Access 2003 SP3 on a 64bit W7 OS machine. From time to time it stops with a message "Access has stopped working." I am getting it now consistently on one form on an app when deleting a record (DoCmd.RunCommand acCmdDeleteRecord). I have Office 2010 loaded on this machine as well. Anyone have this happen? Any cure? MTIA Rocky Smolin Beach Access Software 858-259-4334 www.bchacc.com www.e-z-mrp.com From rockysmolin at bchacc.com Tue Jul 26 17:02:27 2011 From: rockysmolin at bchacc.com (Rocky Smolin) Date: Tue, 26 Jul 2011 15:02:27 -0700 Subject: [AccessD] A2003 stops working In-Reply-To: <8FDCFF410EE948FCAECD101A7CBAE855@HAL9007> References: <8FDCFF410EE948FCAECD101A7CBAE855@HAL9007> Message-ID: <814A51A1F63345E980C150E6E55B65EA@HAL9007> I just uninstalled O2010 - no effect - still craps out on the delete. R -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Rocky Smolin Sent: Tuesday, July 26, 2011 2:55 PM To: accessd at databaseadvisors.com Subject: [AccessD] A2003 stops working Dear List: Running Access 2003 SP3 on a 64bit W7 OS machine. From time to time it stops with a message "Access has stopped working." I am getting it now consistently on one form on an app when deleting a record (DoCmd.RunCommand acCmdDeleteRecord). I have Office 2010 loaded on this machine as well. Anyone have this happen? Any cure? MTIA Rocky Smolin Beach Access Software 858-259-4334 www.bchacc.com www.e-z-mrp.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From dbdoug at gmail.com Tue Jul 26 18:21:47 2011 From: dbdoug at gmail.com (Doug Steele) Date: Tue, 26 Jul 2011 16:21:47 -0700 Subject: [AccessD] A2003 stops working In-Reply-To: <814A51A1F63345E980C150E6E55B65EA@HAL9007> References: <8FDCFF410EE948FCAECD101A7CBAE855@HAL9007> <814A51A1F63345E980C150E6E55B65EA@HAL9007> Message-ID: Have you tried swinging a lizard around your head three times? I have had these mystery fails, and my general approach (stopping if/when I have success) is: 1. Force a compile. 2. Decompile/recompile. 3. Build an empty database and import all objects from the old database. 4. Delete the form and rebuild it from scratch. 5. Rework the code. In this case, open a dao recordset, find the record and delete it with Recordset.Delete. 6. Tear my hair out. I'm quite bald now. Doug On Tue, Jul 26, 2011 at 3:02 PM, Rocky Smolin wrote: > I just uninstalled O2010 ?- no effect - still craps out on the delete. > > > R > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Rocky Smolin > Sent: Tuesday, July 26, 2011 2:55 PM > To: accessd at databaseadvisors.com > Subject: [AccessD] A2003 stops working > > Dear List: > > Running Access 2003 SP3 on a 64bit W7 OS machine. ?From time to time it > stops with a message "Access has stopped working." > > I am getting it now consistently on one form on an app when deleting a > record (DoCmd.RunCommand acCmdDeleteRecord). > > I have Office 2010 loaded on this machine as well. > > Anyone have this happen? ?Any cure? > > MTIA > > Rocky Smolin > Beach Access Software > 858-259-4334 > www.bchacc.com www.e-z-mrp.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 bill_patten at embarqmail.com Tue Jul 26 19:03:26 2011 From: bill_patten at embarqmail.com (Bill Patten) Date: Tue, 26 Jul 2011 17:03:26 -0700 Subject: [AccessD] A2003 stops working In-Reply-To: <8FDCFF410EE948FCAECD101A7CBAE855@HAL9007> References: <8FDCFF410EE948FCAECD101A7CBAE855@HAL9007> Message-ID: <85943A5EECAC45039D1BAD282EB2A938@BPCS> Rocky, I had a similar problem back in 2009 when I would try to add a control to a form, it would crash. If it maters I had the problem in 2 applications and they were both ADP's In my case if I exported the form to text and opened it in notepad I found a ton of "UnknownProp(## ending in END" If you export the subject form to text and open it up and see the "UnknownProp items then you are experiencing the same problem I had. I wrote a routine to remove the bad lines and all was well. I had lots of them in the project so used a routine that exported each form to text, opened it removed all the lines and put it back. I always believed the problem was caused by opening it in 2007 then reopening it in 2003. I try not to do that anymore. HTH Bill -------------------------------------------------- From: "Rocky Smolin" Sent: Tuesday, July 26, 2011 2:55 PM To: Subject: [AccessD] A2003 stops working Dear List: Running Access 2003 SP3 on a 64bit W7 OS machine. From time to time it stops with a message "Access has stopped working." I am getting it now consistently on one form on an app when deleting a record (DoCmd.RunCommand acCmdDeleteRecord). I have Office 2010 loaded on this machine as well. Anyone have this happen? Any cure? MTIA Rocky Smolin Beach Access Software 858-259-4334 www.bchacc.com www.e-z-mrp.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From marksimms at verizon.net Tue Jul 26 19:16:35 2011 From: marksimms at verizon.net (Mark Simms) Date: Tue, 26 Jul 2011 20:16:35 -0400 Subject: [AccessD] [cross posted] SharePoint 2010 question(s) In-Reply-To: References: Message-ID: <00ab01cc4bf2$72da9c00$588fd400$@net> Jeff - there is a special website devoted to that topic......and it's not Microsoft's....natch. Access Services remains fairly cloaked in secrecy.... > -----Original Message----- > From: accessd-bounces at databaseadvisors.com [mailto:accessd- > bounces at databaseadvisors.com] On Behalf Of Jeff B > Sent: Tuesday, July 26, 2011 11:11 AM > To: Dba-Tech; dba-OT; AccessD > Subject: [AccessD] [cross posted] SharePoint 2010 question(s) > > I really need to know what you all suggest as the BEST book(s) for > learning > SharePoint 2010, Access Services, and publishing Access databases to > SharePoint. > > > Jeff Barrows > MCP, MCAD, MCSD > > Outbak Technologies, LLC > Racine, WI > jeff.developer at gmail.com > > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com From marksimms at verizon.net Tue Jul 26 19:39:40 2011 From: marksimms at verizon.net (Mark Simms) Date: Tue, 26 Jul 2011 20:39:40 -0400 Subject: [AccessD] Exporting Access to Excel - How to "SUM" a column with a variable number of rows? In-Reply-To: References: <001b01cc494e$1af91530$50eb3f90$@comcast.net><001501cc4adc$bc17d200$34477600$@gmail.com> <016b01cc4b27$57c8ffe0$075affa0$@net> Message-ID: <00ac01cc4bf5$ae236e10$0a6a4a30$@net> Simple. Add a paramarray variant parameter to the procedure and pass it the column numbers or column letters that should be ignored. The only other way is to first test the column using Application.Sum. If the result is non-zero, then it is LIKELY a numeric column. Caveat: all zeros in a column will fail the test ! > -----Original Message----- > From: accessd-bounces at databaseadvisors.com [mailto:accessd- > bounces at databaseadvisors.com] On Behalf Of Brad Marks > Sent: Tuesday, July 26, 2011 4:40 PM > To: Access Developers discussion and problem solving > Subject: Re: [AccessD] Exporting Access to Excel - How to "SUM" a > column with a variable number of rows? > > Mark, > > Thanks for the help, I appreciate it. > > The sample code that you posted works nicely. Each column is summed. > > I do have one question, however. > > How can I prevent select columns from being summed in case they contain > data that should not be summed? > > Thanks, > Brad > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Mark Simms > Sent: Monday, July 25, 2011 7:03 PM > To: 'Access Developers discussion and problem solving' > Subject: Re: [AccessD] Exporting Access to Excel - How to "SUM" acolumn > with a variable number of rows? > > What you need to decide is: dynamic vs. static. > If the data is not going to change, then try this: > > Sub AddTotals > > Dim rngCol as Range > > With Activesheet.UsedRange > > For Each rngCol in .Columns > rngCol.Cells(.rows.Count+1) = Application.Sum(rngCol) > Next > > End With > > End Sub > > Of course this assumes the starting row is #1. > > > -----Original Message----- > > From: accessd-bounces at databaseadvisors.com [mailto:accessd- > > bounces at databaseadvisors.com] On Behalf Of Brad Marks > > Sent: Monday, July 25, 2011 4:52 PM > > To: Access Developers discussion and problem solving > > Subject: Re: [AccessD] Exporting Access to Excel - How to "SUM" a > > column with a variable number of rows? > > > > William and Lambert, > > > > Thanks for the help, I appreciate it. > > > > One of the things that I often struggle with is that there is often > > more than one way to accomplish a task. Before I start to build > > something big, I like to understand the options and also understand > the > > "Best" way to get something done. > > > > Thanks Again, > > Brad > > > > > > -----Original Message----- > > From: accessd-bounces at databaseadvisors.com on behalf of Heenan, > Lambert > > Sent: Mon 7/25/2011 1:31 PM > > To: Access Developers discussion and problem solving > > Subject: Re: [AccessD] Exporting Access to Excel - How to "SUM" a > > column with a variable number of rows? > > > > The way I do this is after exporting the results of a query to Excel > I > > then run a Dcount() against the same query to discover how many rows > > were in the output data.... > > > > nRows = DCount("*", "Some_Query_Name") > > > > Then I open the Excel file with Access (i.e. I set an > > Excell.Application and Excel.Worksheet object) so that I can then add > > the formulas that I need to the row under the last row of exported > > data. > > > > Essentially you build the formula in a text variable like this... > > > > strFormula = "=Sum(" & Excel_Column(nCol) & nRowOffest - nRowsToSum & > > ":" & Excel_Column(nCol) & nRowOffest - 1 & ")" > > > > Where nRowOffest is the row number to start summing (or averaging or > > counting, whatever) and nRowsToSum is the number of row in the > output. > > The function Excel_Column is used to get the right alpha prefix in > the > > cells address... > > > > Function Excel_Column(nCol As Long) As String ' given a valid column > > number return the Alpha name for it ' else return an empty string > > If nCol > 256 Then ' Pre Excel 2007 > > Excel_Column = "" > > Else > > If nCol <= 26 Then > > Excel_Column = Chr(Asc("A") + nCol - 1) > > Else > > Dim sSecond As String > > sSecond = Excel_Column(nCol Mod 26) > > Excel_Column = Excel_Column(nCol \ 26) & sSecond > > End If > > End If > > End Function > > > > Then, after building the text string with the formula just plug it > into > > the relevant cell in the workbook. > > > > After setting the Excel.Application object you then need a reference > to > > the worksheet that needs to be update... > > > > Set Ws = xlApp.Sheets(nSheet) > > With Ws > > strCellAddress = Excel_Column(nCol) & nRowOffest > > strFormula = "=Sum(" & Excel_Column(nCol) & nRowOffest - > > nRowsToSum & ":" & Excel_Column(nCol) & nRowOffest - 1 & ")" > > .Cells(nRowOffest, nCol) = strFormula > > End With > > > > > > HTH > > > > Lambert > > > > -----Original Message----- > > From: accessd-bounces at databaseadvisors.com [mailto:accessd- > > bounces at databaseadvisors.com] On Behalf Of Brad Marks > > Sent: Monday, July 25, 2011 1:54 PM > > To: Access Developers discussion and problem solving > > Subject: [AccessD] Exporting Access to Excel - How to "SUM" a column > > with a variable number of rows? > > > > I am starting to do some experiments involving the creation of Excel > > files from Access. > > > > Let's say that I have an Access Recordset that can contain anywhere > > from 100 to 1,000 records. > > > > I have a little Access application that currently pushes this data > into > > Excel. This all works nicely. > > > > What is the best way to "Sum" a column in Excel after the last > record, > > when the number of records can vary? > > > > Thanks, > > Brad > > > > -- > > 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 has been scanned for viruses and dangerous content by > > MailScanner, and is believed to be clean. > > > > > > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > > -- > This message has been scanned for viruses and > dangerous content by MailScanner, and is > believed to be clean. > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com From vbacreations at gmail.com Tue Jul 26 20:46:51 2011 From: vbacreations at gmail.com (William Benson) Date: Tue, 26 Jul 2011 21:46:51 -0400 Subject: [AccessD] Exporting Access to Excel - How to "SUM" a column with a variable number of rows? In-Reply-To: References: <001b01cc494e$1af91530$50eb3f90$@comcast.net> <001501cc4adc$bc17d200$34477600$@gmail.com> <016b01cc4b27$57c8ffe0$075affa0$@net> Message-ID: Brad, When you mention data that should not be summed are you talking about a mixture of text and numbers? Dates ? What? Do you plan to test on sheet? EXCEL =CountA(range ) = Count(range) is one test for mixture of text and numeric in bulk. Can also be tested with Evaluate ... as in if xl.EVALUATE ("=counta(" & Rng.address & ") = Count (" & rng.address & ")") = True then... On Jul 26, 2011 4:43 PM, "Brad Marks" wrote: From BradM at blackforestltd.com Tue Jul 26 21:33:11 2011 From: BradM at blackforestltd.com (Brad Marks) Date: Tue, 26 Jul 2011 21:33:11 -0500 Subject: [AccessD] Exporting Access to Excel - How to "SUM" a column with a variable number of rows? References: <001b01cc494e$1af91530$50eb3f90$@comcast.net><001501cc4adc$bc17d200$34477600$@gmail.com><016b01cc4b27$57c8ffe0$075affa0$@net> <00ac01cc4bf5$ae236e10$0a6a4a30$@net> Message-ID: Mark, Thanks, Brad -----Original Message----- From: accessd-bounces at databaseadvisors.com on behalf of Mark Simms Sent: Tue 7/26/2011 7:39 PM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Exporting Access to Excel - How to "SUM" a column with a variable number of rows? Simple. Add a paramarray variant parameter to the procedure and pass it the column numbers or column letters that should be ignored. The only other way is to first test the column using Application.Sum. If the result is non-zero, then it is LIKELY a numeric column. Caveat: all zeros in a column will fail the test ! > -----Original Message----- > From: accessd-bounces at databaseadvisors.com [mailto:accessd- > bounces at databaseadvisors.com] On Behalf Of Brad Marks > Sent: Tuesday, July 26, 2011 4:40 PM > To: Access Developers discussion and problem solving > Subject: Re: [AccessD] Exporting Access to Excel - How to "SUM" a > column with a variable number of rows? > > Mark, > > Thanks for the help, I appreciate it. > > The sample code that you posted works nicely. Each column is summed. > > I do have one question, however. > > How can I prevent select columns from being summed in case they contain > data that should not be summed? > > Thanks, > Brad > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Mark Simms > Sent: Monday, July 25, 2011 7:03 PM > To: 'Access Developers discussion and problem solving' > Subject: Re: [AccessD] Exporting Access to Excel - How to "SUM" acolumn > with a variable number of rows? > > What you need to decide is: dynamic vs. static. > If the data is not going to change, then try this: > > Sub AddTotals > > Dim rngCol as Range > > With Activesheet.UsedRange > > For Each rngCol in .Columns > rngCol.Cells(.rows.Count+1) = Application.Sum(rngCol) > Next > > End With > > End Sub > > Of course this assumes the starting row is #1. > > > -----Original Message----- > > From: accessd-bounces at databaseadvisors.com [mailto:accessd- > > bounces at databaseadvisors.com] On Behalf Of Brad Marks > > Sent: Monday, July 25, 2011 4:52 PM > > To: Access Developers discussion and problem solving > > Subject: Re: [AccessD] Exporting Access to Excel - How to "SUM" a > > column with a variable number of rows? > > > > William and Lambert, > > > > Thanks for the help, I appreciate it. > > > > One of the things that I often struggle with is that there is often > > more than one way to accomplish a task. Before I start to build > > something big, I like to understand the options and also understand > the > > "Best" way to get something done. > > > > Thanks Again, > > Brad > > > > > > -----Original Message----- > > From: accessd-bounces at databaseadvisors.com on behalf of Heenan, > Lambert > > Sent: Mon 7/25/2011 1:31 PM > > To: Access Developers discussion and problem solving > > Subject: Re: [AccessD] Exporting Access to Excel - How to "SUM" a > > column with a variable number of rows? > > > > The way I do this is after exporting the results of a query to Excel > I > > then run a Dcount() against the same query to discover how many rows > > were in the output data.... > > > > nRows = DCount("*", "Some_Query_Name") > > > > Then I open the Excel file with Access (i.e. I set an > > Excell.Application and Excel.Worksheet object) so that I can then add > > the formulas that I need to the row under the last row of exported > > data. > > > > Essentially you build the formula in a text variable like this... > > > > strFormula = "=Sum(" & Excel_Column(nCol) & nRowOffest - nRowsToSum & > > ":" & Excel_Column(nCol) & nRowOffest - 1 & ")" > > > > Where nRowOffest is the row number to start summing (or averaging or > > counting, whatever) and nRowsToSum is the number of row in the > output. > > The function Excel_Column is used to get the right alpha prefix in > the > > cells address... > > > > Function Excel_Column(nCol As Long) As String ' given a valid column > > number return the Alpha name for it ' else return an empty string > > If nCol > 256 Then ' Pre Excel 2007 > > Excel_Column = "" > > Else > > If nCol <= 26 Then > > Excel_Column = Chr(Asc("A") + nCol - 1) > > Else > > Dim sSecond As String > > sSecond = Excel_Column(nCol Mod 26) > > Excel_Column = Excel_Column(nCol \ 26) & sSecond > > End If > > End If > > End Function > > > > Then, after building the text string with the formula just plug it > into > > the relevant cell in the workbook. > > > > After setting the Excel.Application object you then need a reference > to > > the worksheet that needs to be update... > > > > Set Ws = xlApp.Sheets(nSheet) > > With Ws > > strCellAddress = Excel_Column(nCol) & nRowOffest > > strFormula = "=Sum(" & Excel_Column(nCol) & nRowOffest - > > nRowsToSum & ":" & Excel_Column(nCol) & nRowOffest - 1 & ")" > > .Cells(nRowOffest, nCol) = strFormula > > End With > > > > > > HTH > > > > Lambert > > > > -----Original Message----- > > From: accessd-bounces at databaseadvisors.com [mailto:accessd- > > bounces at databaseadvisors.com] On Behalf Of Brad Marks > > Sent: Monday, July 25, 2011 1:54 PM > > To: Access Developers discussion and problem solving > > Subject: [AccessD] Exporting Access to Excel - How to "SUM" a column > > with a variable number of rows? > > > > I am starting to do some experiments involving the creation of Excel > > files from Access. > > > > Let's say that I have an Access Recordset that can contain anywhere > > from 100 to 1,000 records. > > > > I have a little Access application that currently pushes this data > into > > Excel. This all works nicely. > > > > What is the best way to "Sum" a column in Excel after the last > record, > > when the number of records can vary? > > > > Thanks, > > Brad > > > > -- > > 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 has been scanned for viruses and dangerous content by > > MailScanner, and is believed to be clean. > > > > > > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > > -- > This message has been scanned for viruses and > dangerous content by MailScanner, and is > believed to be clean. > > > -- > 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 has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. From BradM at blackforestltd.com Tue Jul 26 21:41:56 2011 From: BradM at blackforestltd.com (Brad Marks) Date: Tue, 26 Jul 2011 21:41:56 -0500 Subject: [AccessD] Exporting Access to Excel - How to "SUM" a column with a variable number of rows? References: <001b01cc494e$1af91530$50eb3f90$@comcast.net><001501cc4adc$bc17d200$34477600$@gmail.com><016b01cc4b27$57c8ffe0$075affa0$@net> Message-ID: William, I am just doing some R&D work with "Windows Automation" (Access controlling Excel). I can see several uses for this approach down the road with a couple of projects that I am working on (SQL Server and Access Data - reporting and analysis). Some of the fields are numeric fields that will need to be summed in Excel (total sales, etc.). Other fields will not need to be summed (date fields, etc.) Thanks for your ideas. I have worked with Access for a couple years, but my knowledge of Excel is very limited. I am just starting to experiment with Windows Automation. Brad -----Original Message----- From: accessd-bounces at databaseadvisors.com on behalf of William Benson Sent: Tue 7/26/2011 8:46 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Exporting Access to Excel - How to "SUM" a column with a variable number of rows? Brad, When you mention data that should not be summed are you talking about a mixture of text and numbers? Dates ? What? Do you plan to test on sheet? EXCEL =CountA(range ) = Count(range) is one test for mixture of text and numeric in bulk. Can also be tested with Evaluate ... as in if xl.EVALUATE ("=counta(" & Rng.address & ") = Count (" & rng.address & ")") = True then... On Jul 26, 2011 4:43 PM, "Brad Marks" wrote: -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. From rockysmolin at bchacc.com Wed Jul 27 00:03:48 2011 From: rockysmolin at bchacc.com (Rocky Smolin) Date: Tue, 26 Jul 2011 22:03:48 -0700 Subject: [AccessD] A2003 stops working In-Reply-To: References: <8FDCFF410EE948FCAECD101A7CBAE855@HAL9007><814A51A1F63345E980C150E6E55B65EA@HAL9007> Message-ID: <5A5BEB7491F9430FAEDF2AC529F15E18@HAL9007> 1. Done - no joy. 2. Done - no cigar. 3. Gotta try that - it's quick and easy. 4. Or, given the complexity (several tabs with subforms - lots of code) I could resign from the client. As an alternative to sticking my head in the oven. 5. I think it's not that particular record - it's the delete. However, you're right in that I could permanently switch to DAO to do the delete. Could be the fastest solution. 6. Impractical - as this alternative was used multiple times many years ago. There's a limit. I'm pretty much there. 7. Although you did not suggest this - go away for two days and don't think about it. Which is what I'm doing tomorrow. Thanks for the ideas. I'll post what works, eventually. Rocky -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Doug Steele Sent: Tuesday, July 26, 2011 4:22 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] A2003 stops working Have you tried swinging a lizard around your head three times? I have had these mystery fails, and my general approach (stopping if/when I have success) is: 1. Force a compile. 2. Decompile/recompile. 3. Build an empty database and import all objects from the old database. 4. Delete the form and rebuild it from scratch. 5. Rework the code. In this case, open a dao recordset, find the record and delete it with Recordset.Delete. 6. Tear my hair out. I'm quite bald now. Doug On Tue, Jul 26, 2011 at 3:02 PM, Rocky Smolin wrote: > I just uninstalled O2010 ?- no effect - still craps out on the delete. > > > R > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Rocky > Smolin > Sent: Tuesday, July 26, 2011 2:55 PM > To: accessd at databaseadvisors.com > Subject: [AccessD] A2003 stops working > > Dear List: > > Running Access 2003 SP3 on a 64bit W7 OS machine. ?From time to time > it stops with a message "Access has stopped working." > > I am getting it now consistently on one form on an app when deleting a > record (DoCmd.RunCommand acCmdDeleteRecord). > > I have Office 2010 loaded on this machine as well. > > Anyone have this happen? ?Any cure? > > MTIA > > Rocky Smolin > Beach Access Software > 858-259-4334 > www.bchacc.com www.e-z-mrp.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 fuller.artful at gmail.com Wed Jul 27 01:29:12 2011 From: fuller.artful at gmail.com (Arthur Fuller) Date: Wed, 27 Jul 2011 02:29:12 -0400 Subject: [AccessD] A2003 stops working In-Reply-To: <5A5BEB7491F9430FAEDF2AC529F15E18@HAL9007> References: <8FDCFF410EE948FCAECD101A7CBAE855@HAL9007> <814A51A1F63345E980C150E6E55B65EA@HAL9007> <5A5BEB7491F9430FAEDF2AC529F15E18@HAL9007> Message-ID: Sometimes things foul up due to bad References. Before doing the oven thing, you might want to do Tools|References and see wha 'appnin' there. A. On Wed, Jul 27, 2011 at 1:03 AM, Rocky Smolin wrote: > 1. Done - no joy. > 2. Done - no cigar. > 3. Gotta try that - it's quick and easy. > 4. Or, given the complexity (several tabs with subforms - lots of code) I > could resign from the client. As an alternative to sticking my head in the > oven. > 5. I think it's not that particular record - it's the delete. However, > you're right in that I could permanently switch to DAO to do the delete. > Could be the fastest solution. > 6. Impractical - as this alternative was used multiple times many years > ago. > There's a limit. I'm pretty much there. > > 7. Although you did not suggest this - go away for two days and don't think > about it. Which is what I'm doing tomorrow. > > Thanks for the ideas. > > I'll post what works, eventually. > > Rocky > From vbacreations at gmail.com Wed Jul 27 15:35:50 2011 From: vbacreations at gmail.com (William Benson (VBACreations.Com)) Date: Wed, 27 Jul 2011 16:35:50 -0400 Subject: [AccessD] Trouble creating a memo field Message-ID: <001601cc4c9c$c7aa2ed0$56fe8c70$@gmail.com> I sometimes try to create new tables using SQL but not using CREATETABLE. Example: Select 'Test' as Field1 Into Tbl1 One problem I had recently was, how can one make a MEMO field this way? (I can't find a way, not even with MyDB.Execute ("Select '" & string(257,"a") & "' as Field1 Into Tbl1"),DBFailonError When I do that I get only 255 characters and the field is Text. Another problem is that I often like the table to be created without a first row in it. So I might write something like Select 'Test' as Field1 Into Tbl1 From Tbl2 WHERE 1 = 2 Trouble is, What if there is no table named Tbl2? (Obviously it fails). But I can't seem to get the WHERE clause to be acceptable when I do not specify a valid table in the FROM clause, unlike the first example. Now, I might be able to solve the latter problem by specifying a system table as the FROM table, something I know will always be present... such as: Select 'Test' as Field1 Into Tbl1 From MSysObjects WHERE 1 = 2 But then that code probably would not work in other (non-MSAccess) databases. In fact, I am not sure this process of using Select Into works in non-Access databases anyway (does it?) So... I am now leaning towards using CREATE TABLE always and forever as my choice for the best performing method of creating a table using inline SQL. Does anyone beg to differ with this and/or have a way to resolve the issues I have found? From jackandpat.d at gmail.com Wed Jul 27 16:01:44 2011 From: jackandpat.d at gmail.com (jack drawbridge) Date: Wed, 27 Jul 2011 17:01:44 -0400 Subject: [AccessD] Trouble creating a memo field In-Reply-To: <001601cc4c9c$c7aa2ed0$56fe8c70$@gmail.com> References: <001601cc4c9c$c7aa2ed0$56fe8c70$@gmail.com> Message-ID: William, Allen Browne has samples of various DDL statements here. http://allenbrowne.com/func-DDL.html jack On Wed, Jul 27, 2011 at 4:35 PM, William Benson (VBACreations.Com) < vbacreations at gmail.com> wrote: > I sometimes try to create new tables using SQL but not using CREATETABLE. > Example: Select 'Test' as Field1 Into Tbl1 > > One problem I had recently was, how can one make a MEMO field this way? (I > can't find a way, not even with > MyDB.Execute ("Select '" & string(257,"a") & "' as Field1 Into > Tbl1"),DBFailonError > When I do that I get only 255 characters and the field is Text. > > Another problem is that I often like the table to be created without a > first > row in it. So I might write something like > Select 'Test' as Field1 Into Tbl1 From Tbl2 WHERE 1 = 2 > Trouble is, What if there is no table named Tbl2? (Obviously it fails). But > I can't seem to get the WHERE clause to be acceptable when I do not specify > a valid table in the FROM clause, unlike the first example. > > Now, I might be able to solve the latter problem by specifying a system > table as the FROM table, something I know will always be present... such > as: > Select 'Test' as Field1 Into Tbl1 From MSysObjects WHERE 1 = 2 > > But then that code probably would not work in other (non-MSAccess) > databases. In fact, I am not sure this process of using Select Into works > in > non-Access databases anyway (does it?) > > So... I am now leaning towards using CREATE TABLE always and forever as my > choice for the best performing method of creating a table using inline SQL. > > Does anyone beg to differ with this and/or have a way to resolve the issues > I have found? > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > From stuart at lexacorp.com.pg Wed Jul 27 16:13:50 2011 From: stuart at lexacorp.com.pg (Stuart McLachlan) Date: Thu, 28 Jul 2011 07:13:50 +1000 Subject: [AccessD] Trouble creating a memo field In-Reply-To: <001601cc4c9c$c7aa2ed0$56fe8c70$@gmail.com> References: <001601cc4c9c$c7aa2ed0$56fe8c70$@gmail.com> Message-ID: <4E307F8E.27155.42BDF2F4@stuart.lexacorp.com.pg> Select ...Into doesn't allow you to set PKs, indexes or constraints(if avaiable in the destination) and doesn't let you specify the destination datatype. It is a quick and dirty solution in a limited set of cases. I'd stick with Create table if I were you, -- Stuart On 27 Jul 2011 at 16:35, William Benson (VBACreations. wrote: > I sometimes try to create new tables using SQL but not using > CREATETABLE. Example: Select 'Test' as Field1 Into Tbl1 > > One problem I had recently was, how can one make a MEMO field this > way? (I can't find a way, not even with > MyDB.Execute ("Select '" & string(257,"a") & "' as Field1 Into > Tbl1"),DBFailonError When I do that I get only 255 characters and the > field is Text. > > Another problem is that I often like the table to be created without a > first row in it. So I might write something like > Select 'Test' as Field1 Into Tbl1 From Tbl2 WHERE 1 = 2 > Trouble is, What if there is no table named Tbl2? (Obviously it > fails). But I can't seem to get the WHERE clause to be acceptable when > I do not specify a valid table in the FROM clause, unlike the first > example. > > Now, I might be able to solve the latter problem by specifying a > system table as the FROM table, something I know will always be > present... such as: > Select 'Test' as Field1 Into Tbl1 From MSysObjects WHERE 1 = 2 > > But then that code probably would not work in other (non-MSAccess) > databases. In fact, I am not sure this process of using Select Into > works in non-Access databases anyway (does it?) > > So... I am now leaning towards using CREATE TABLE always and forever > as my choice for the best performing method of creating a table using > inline SQL. > > Does anyone beg to differ with this and/or have a way to resolve the > issues I have found? > From ssharkins at gmail.com Wed Jul 27 16:16:24 2011 From: ssharkins at gmail.com (Susan Harkins) Date: Wed, 27 Jul 2011 17:16:24 -0400 Subject: [AccessD] Trouble creating a memo field References: <001601cc4c9c$c7aa2ed0$56fe8c70$@gmail.com> <4E307F8E.27155.42BDF2F4@stuart.lexacorp.com.pg> Message-ID: <83E2A738E65F4CB1B88AB407020C8059@SusanHarkins> Or create the table and go back alter it by adding a Memo field. Susan H. > Select ...Into doesn't allow you to set PKs, indexes or constraints(if > avaiable in the > destination) and doesn't let you specify the destination datatype. It > is a quick and dirty > solution in a limited set of cases. > > I'd stick with Create table if I were you, > > -- From gustav at cactus.dk Wed Jul 27 17:06:24 2011 From: gustav at cactus.dk (Gustav Brock) Date: Thu, 28 Jul 2011 00:06:24 +0200 Subject: [AccessD] Trouble creating a memo field Message-ID: Hi William Use DAO to create tables and fields (and indexes and relations, even databases) and all your trouble will end. Seriously. That way you will be in control of the finest details including all properties of the objects. Example: Public Function SetTableProperties() As Boolean Dim dbs As DAO.Database Dim tdf As DAO.TableDef Dim fld As DAO.Field Dim prp As DAO.Property Dim strPropertyName As String Set dbs = CurrentDb() Set tdf = dbs.TableDefs("tblTest") Set fld = tdf.Fields(0) ' On Error GoTo Err_Prop strPropertyName = "Description" Set prp = tdf.CreateProperty() prp.Name = strPropertyName prp.Type = dbText prp.Value = "Table Description" tdf.Properties.Append prp strPropertyName = "Caption" Set prp = fld.CreateProperty(strPropertyName, dbText, "Field Caption") fld.Properties.Append prp SetTableProperties = True Exit_Prop: Exit Function Err_Prop: If Err.Number = 3265 Then ' Item not found in this collection. Resume Next Else Debug.Print Err.Number, Err.Description Resume Exit_Prop End If End Function /gustav >>> vbacreations at gmail.com 27-07-2011 22:35:50 >>> I sometimes try to create new tables using SQL but not using CREATETABLE. Example: Select 'Test' as Field1 Into Tbl1 One problem I had recently was, how can one make a MEMO field this way? (I can't find a way, not even with MyDB.Execute ("Select '" & string(257,"a") & "' as Field1 Into Tbl1"),DBFailonError When I do that I get only 255 characters and the field is Text. Another problem is that I often like the table to be created without a first row in it. So I might write something like Select 'Test' as Field1 Into Tbl1 From Tbl2 WHERE 1 = 2 Trouble is, What if there is no table named Tbl2? (Obviously it fails). But I can't seem to get the WHERE clause to be acceptable when I do not specify a valid table in the FROM clause, unlike the first example. Now, I might be able to solve the latter problem by specifying a system table as the FROM table, something I know will always be present... such as: Select 'Test' as Field1 Into Tbl1 From MSysObjects WHERE 1 = 2 But then that code probably would not work in other (non-MSAccess) databases. In fact, I am not sure this process of using Select Into works in non-Access databases anyway (does it?) So... I am now leaning towards using CREATE TABLE always and forever as my choice for the best performing method of creating a table using inline SQL. Does anyone beg to differ with this and/or have a way to resolve the issues I have found? From jimdettman at verizon.net Thu Jul 28 05:22:06 2011 From: jimdettman at verizon.net (Jim Dettman) Date: Thu, 28 Jul 2011 06:22:06 -0400 Subject: [AccessD] Trouble creating a memo field In-Reply-To: References: <001601cc4c9c$c7aa2ed0$56fe8c70$@gmail.com> Message-ID: <94E7A40574FF46DA9A1AB75A711F12CC@XPS> Not sure what Allan has posted, so this might be duplication, but there is a series of three MSKB articles that shows what you can do with JET 4.0 and SQL. This one: http://msdn.microsoft.com/en-us/library/aa140015(v=office.10).aspx#acintsql_ intddl Has a section on DDL statements. Good series of articles (links to the others are at the bottom). Jim. -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jack drawbridge Sent: Wednesday, July 27, 2011 05:02 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Trouble creating a memo field William, Allen Browne has samples of various DDL statements here. http://allenbrowne.com/func-DDL.html jack On Wed, Jul 27, 2011 at 4:35 PM, William Benson (VBACreations.Com) < vbacreations at gmail.com> wrote: > I sometimes try to create new tables using SQL but not using CREATETABLE. > Example: Select 'Test' as Field1 Into Tbl1 > > One problem I had recently was, how can one make a MEMO field this way? (I > can't find a way, not even with > MyDB.Execute ("Select '" & string(257,"a") & "' as Field1 Into > Tbl1"),DBFailonError > When I do that I get only 255 characters and the field is Text. > > Another problem is that I often like the table to be created without a > first > row in it. So I might write something like > Select 'Test' as Field1 Into Tbl1 From Tbl2 WHERE 1 = 2 > Trouble is, What if there is no table named Tbl2? (Obviously it fails). But > I can't seem to get the WHERE clause to be acceptable when I do not specify > a valid table in the FROM clause, unlike the first example. > > Now, I might be able to solve the latter problem by specifying a system > table as the FROM table, something I know will always be present... such > as: > Select 'Test' as Field1 Into Tbl1 From MSysObjects WHERE 1 = 2 > > But then that code probably would not work in other (non-MSAccess) > databases. In fact, I am not sure this process of using Select Into works > in > non-Access databases anyway (does it?) > > So... I am now leaning towards using CREATE TABLE always and forever as my > choice for the best performing method of creating a table using inline SQL. > > Does anyone beg to differ with this and/or have a way to resolve the issues > I have found? > > -- > 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 rls at WeBeDb.com Thu Jul 28 10:29:59 2011 From: rls at WeBeDb.com (Robert Stewart) Date: Thu, 28 Jul 2011 10:29:59 -0500 Subject: [AccessD] SharePoint 2010 question(s) In-Reply-To: References: Message-ID: And what would that magic web site be? At 05:05 PM 7/27/2011, you wrote: >Date: Tue, 26 Jul 2011 20:16:35 -0400 >From: "Mark Simms" >To: "'Access Developers discussion and problem solving'" > >Subject: Re: [AccessD] [cross posted] SharePoint 2010 question(s) >Message-ID: <00ab01cc4bf2$72da9c00$588fd400$@net> > >Jeff - there is a special website devoted to that topic......and it's not >Microsoft's....natch. >Access Services remains fairly cloaked in secrecy.... > > > -----Original Message----- > > From: accessd-bounces at databaseadvisors.com [mailto:accessd- > > bounces at databaseadvisors.com] On Behalf Of Jeff B > > Sent: Tuesday, July 26, 2011 11:11 AM > > To: Dba-Tech; dba-OT; AccessD > > Subject: [AccessD] [cross posted] SharePoint 2010 question(s) > > > > I really need to know what you all suggest as the BEST book(s) for > > learning > > SharePoint 2010, Access Services, and publishing Access databases to > > SharePoint. > > > > > > Jeff Barrows > > MCP, MCAD, MCSD > > Robert L. Stewart www.WeBeDb.com www.DBGUIDesign.com www.RLStewartPhotography.com From ssharkins at gmail.com Thu Jul 28 11:54:58 2011 From: ssharkins at gmail.com (Susan Harkins) Date: Thu, 28 Jul 2011 12:54:58 -0400 Subject: [AccessD] Article on upgrading Message-ID: <65F646A7C57044C1B8659201D3378B55@SusanHarkins> I'll be writing about upgrading to SQL Server and I'd like to include as many of you in it as possible -- you'll get credit and a link -- it's a nice thing to show the boss and clients. The angle is -- questions you should ask when deciding whether to upgrade an Access database to SQL Server (Express is Okay too) -- specific to the decision-making process. Anything you think someone considering the move should evaluate before doing so -- but I'll be writing it from a "questions you should ask" perspective. It'll be interesting reading for the list too I think, so if nobody objects -- I see no reason to ask for these responses off list. Thanks! Susan H. From fuller.artful at gmail.com Thu Jul 28 13:08:53 2011 From: fuller.artful at gmail.com (Arthur Fuller) Date: Thu, 28 Jul 2011 14:08:53 -0400 Subject: [AccessD] Article on upgrading In-Reply-To: <65F646A7C57044C1B8659201D3378B55@SusanHarkins> References: <65F646A7C57044C1B8659201D3378B55@SusanHarkins> Message-ID: I would lend this to your proposed article. 1. Find any occurrences of "Select" plus anything, either in RecordSources or DataSources. Revise said code to refer to a named query. 2. Make sure that all date-fields are not null, giving them instead a default value of Date() at worst, but supplying some value at least. 3. Make sure that all FKs hold true; no orphans whatever, else the whole migration will fail. 4. Strictly a matter of opinion, but MO is that 3NF is insufficient for serious dbs; 4- and 5-NF are mandatory. A. On Thu, Jul 28, 2011 at 12:54 PM, Susan Harkins wrote: > I'll be writing about upgrading to SQL Server and I'd like to include as > many of you in it as possible -- you'll get credit and a link -- it's a nice > thing to show the boss and clients. > > The angle is -- questions you should ask when deciding whether to upgrade > an Access database to SQL Server (Express is Okay too) -- specific to the > decision-making process. Anything you think someone considering the move > should evaluate before doing so -- but I'll be writing it from a "questions > you should ask" perspective. > > It'll be interesting reading for the list too I think, so if nobody objects > -- I see no reason to ask for these responses off list. > > Thanks! > Susan H. > > From ssharkins at gmail.com Thu Jul 28 13:13:43 2011 From: ssharkins at gmail.com (Susan Harkins) Date: Thu, 28 Jul 2011 14:13:43 -0400 Subject: [AccessD] Article on upgrading References: <65F646A7C57044C1B8659201D3378B55@SusanHarkins> Message-ID: <2C78D5CF79B043E5A94FC45422B4A5C3@SusanHarkins> This is good advice for actually performing an upgrade, but I'm looking for questions you might ask when deciding whether you actually should or want to upgrade -- see the difference? What kind of questions do you ask your clients before you actually get there -- what kinds of questions do they ask you when they begin to think about upgrading? Thanks Arthur! Please feel free to play again! ;) Susan H. >I would lend this to your proposed article. > > 1. Find any occurrences of "Select" plus anything, either in RecordSources > or DataSources. Revise said code to refer to a named query. > 2. Make sure that all date-fields are not null, giving them instead a > default value of Date() at worst, but supplying some value at least. > 3. Make sure that all FKs hold true; no orphans whatever, else the whole > migration will fail. > 4. Strictly a matter of opinion, but MO is that 3NF is insufficient for > serious dbs; 4- and 5-NF are mandatory. > From gustav at cactus.dk Thu Jul 28 13:29:26 2011 From: gustav at cactus.dk (Gustav Brock) Date: Thu, 28 Jul 2011 20:29:26 +0200 Subject: [AccessD] Article on upgrading Message-ID: Hi Susan Nice to see back doing tech writing! We've never had a client asking why, they all follow my advice(!) So our reasons to suggest and upgrade: 1. Extreme reliability is requested. I have yet to see an SQL Server break down. 2. Remote access (across a WAN) is needed. 3. Easy, daily, and reliable backup is requested even when clients are on-line. 4. Database size can be expected to outgrow Access' capability. 5. Controlled and secure user access is requested. Note the non-tech level of these parameters. /gustav >>> ssharkins at gmail.com 28-07-2011 18:54:58 >>> I'll be writing about upgrading to SQL Server and I'd like to include as many of you in it as possible -- you'll get credit and a link -- it's a nice thing to show the boss and clients. The angle is -- questions you should ask when deciding whether to upgrade an Access database to SQL Server (Express is Okay too) -- specific to the decision-making process. Anything you think someone considering the move should evaluate before doing so -- but I'll be writing it from a "questions you should ask" perspective. It'll be interesting reading for the list too I think, so if nobody objects -- I see no reason to ask for these responses off list. Thanks! Susan H. From jimdettman at verizon.net Thu Jul 28 13:29:38 2011 From: jimdettman at verizon.net (Jim Dettman) Date: Thu, 28 Jul 2011 14:29:38 -0400 Subject: [AccessD] Article on upgrading In-Reply-To: <65F646A7C57044C1B8659201D3378B55@SusanHarkins> References: <65F646A7C57044C1B8659201D3378B55@SusanHarkins> Message-ID: Susan, 1. Does your database need to be available at all times? If so, then online backups are required and JET is not your answer. 2. How many hours worth of data can you afford to loose? If none or only an hour or two, then look to something other then JET. 3. How much data do you have? If tables with anything more then hundreds of thousands of rows, then be looking to something other then JET. 4. How many users do you have? Generally if more then 15-20, you want to be on something other then JET because if your DB corrupts, that many people not working is costly. For some of the above, they are not hard and fast rules. There are many of apps out there that go further in terms or user or records and work quite well. The above should be considered the starting point of where you should start becoming uncomfortable with using JET. Jim. -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Susan Harkins Sent: Thursday, July 28, 2011 12:55 PM To: Access Developers discussion and problem solving Subject: [AccessD] Article on upgrading I'll be writing about upgrading to SQL Server and I'd like to include as many of you in it as possible -- you'll get credit and a link -- it's a nice thing to show the boss and clients. The angle is -- questions you should ask when deciding whether to upgrade an Access database to SQL Server (Express is Okay too) -- specific to the decision-making process. Anything you think someone considering the move should evaluate before doing so -- but I'll be writing it from a "questions you should ask" perspective. It'll be interesting reading for the list too I think, so if nobody objects -- I see no reason to ask for these responses off list. Thanks! Susan H. -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From ssharkins at gmail.com Thu Jul 28 13:32:32 2011 From: ssharkins at gmail.com (Susan Harkins) Date: Thu, 28 Jul 2011 14:32:32 -0400 Subject: [AccessD] Article on upgrading References: Message-ID: These are reasons why you'd want to upgrade and could possibly be turned into decision-type questions. Thank you! Susan H. > Hi Susan > > Nice to see back doing tech writing! > > We've never had a client asking why, they all follow my advice(!) > So our reasons to suggest and upgrade: > > 1. Extreme reliability is requested. I have yet to see an SQL Server break > down. > 2. Remote access (across a WAN) is needed. > 3. Easy, daily, and reliable backup is requested even when clients are > on-line. > 4. Database size can be expected to outgrow Access' capability. > 5. Controlled and secure user access is requested. > > Note the non-tech level of these parameters. > > /gustav From dw-murphy at cox.net Thu Jul 28 13:33:56 2011 From: dw-murphy at cox.net (Doug Murphy) Date: Thu, 28 Jul 2011 11:33:56 -0700 Subject: [AccessD] Article on upgrading In-Reply-To: <65F646A7C57044C1B8659201D3378B55@SusanHarkins> References: <65F646A7C57044C1B8659201D3378B55@SusanHarkins> Message-ID: <006201cc4d54$e9283620$bb78a260$@cox.net> If you are moving from Access 2007 or 2010 and are using the attachment field type it will not upsize. I had a client who required this type of functionality and had to create similar functionality in SQL Server. As an aside we were having issues with the form with the attachment field being very slow in opening and updating. After getting rid of the attachment field and moving to a SQL server back end there was a significant increase in responsiveness. -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Susan Harkins Sent: Thursday, July 28, 2011 9:55 AM To: Access Developers discussion and problem solving Subject: [AccessD] Article on upgrading I'll be writing about upgrading to SQL Server and I'd like to include as many of you in it as possible -- you'll get credit and a link -- it's a nice thing to show the boss and clients. The angle is -- questions you should ask when deciding whether to upgrade an Access database to SQL Server (Express is Okay too) -- specific to the decision-making process. Anything you think someone considering the move should evaluate before doing so -- but I'll be writing it from a "questions you should ask" perspective. It'll be interesting reading for the list too I think, so if nobody objects -- I see no reason to ask for these responses off list. Thanks! Susan H. -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From ssharkins at gmail.com Thu Jul 28 13:35:44 2011 From: ssharkins at gmail.com (Susan Harkins) Date: Thu, 28 Jul 2011 14:35:44 -0400 Subject: [AccessD] Article on upgrading References: <65F646A7C57044C1B8659201D3378B55@SusanHarkins> Message-ID: <1E8BF7CA21694B89829105EA3573E2AB@SusanHarkins> Thank you Jim -- these are great! Susan H. > Susan, > > 1. Does your database need to be available at all times? If so, then > online > backups are required and JET is not your answer. > > 2. How many hours worth of data can you afford to loose? If none or only > an hour or two, then look to something other then JET. > > 3. How much data do you have? If tables with anything more then hundreds > of > thousands of rows, then be looking to something other then JET. > > 4. How many users do you have? Generally if more then 15-20, you want to > be > on something other then JET because if your DB corrupts, that many people > not working is costly. > > > For some of the above, they are not hard and fast rules. There are many > of apps out there that go further in terms or user or records and work > quite > well. The above should be considered the starting point of where you > should > start becoming uncomfortable with using JET. > > Jim. > > > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Susan Harkins > Sent: Thursday, July 28, 2011 12:55 PM > To: Access Developers discussion and problem solving > Subject: [AccessD] Article on upgrading > > I'll be writing about upgrading to SQL Server and I'd like to include as > many of you in it as possible -- you'll get credit and a link -- it's a > nice > thing to show the boss and clients. > > The angle is -- questions you should ask when deciding whether to upgrade > an > Access database to SQL Server (Express is Okay too) -- specific to the > decision-making process. Anything you think someone considering the move > should evaluate before doing so -- but I'll be writing it from a > "questions > you should ask" perspective. > > It'll be interesting reading for the list too I think, so if nobody > objects > -- I see no reason to ask for these responses off list. > > Thanks! > Susan H. > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com From rusty.hammond at cpiqpc.com Thu Jul 28 13:52:45 2011 From: rusty.hammond at cpiqpc.com (Rusty Hammond) Date: Thu, 28 Jul 2011 13:52:45 -0500 Subject: [AccessD] Article on upgrading In-Reply-To: <65F646A7C57044C1B8659201D3378B55@SusanHarkins> References: <65F646A7C57044C1B8659201D3378B55@SusanHarkins> Message-ID: <49A286ABF515E94A8505CD14DEB721701744A02B@CPIEMAIL-EVS1.CPIQPC.NET> Just off the top of my head: - Do they have network stability issues (ie computers losing connections, slow internet connection speeds, etc...) If so, if they think they need to go to SQL because the database is slow or the backend keeps getting corrupt, it may be they need to invest in the network and moving to SQL won't be required. - What kind of machine is the backend hosted on currently? Maybe an upgrade to that machine, or putting the backend on a more robust machine will take care of any issues. - Are they running a frontend/backend setup currently? Splitting up the database to a frontend and backend and putting copies of the frontend on each user computer may alleviate issues they may currently be having. - Is user level security becoming a requirement? Access security is easy to break and, if I remember correctly, non-existent in Access 2007 and 2010 - Using multiple versions of Access on your network to run your frontend? I've seen issues pop-up when different versions are hitting a backend and causing slowness and corruption in the backend. Moving to a SQL backend took care of the issues. - If they move to SQL, do they have a server? If not, a robust pc on a peer-to-peer network (Express only)? If not, are they willing to invest in one? - Are they hesitant to move to SQL because of cost? SQL Express is free. - Are they anticipating a lot of growth? Might be wise to make the move to SQL now so they aren't having to scramble to upgrade later. Rusty -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Susan Harkins Sent: Thursday, July 28, 2011 11:55 AM To: Access Developers discussion and problem solving Subject: [AccessD] Article on upgrading I'll be writing about upgrading to SQL Server and I'd like to include as many of you in it as possible -- you'll get credit and a link -- it's a nice thing to show the boss and clients. The angle is -- questions you should ask when deciding whether to upgrade an Access database to SQL Server (Express is Okay too) -- specific to the decision-making process. Anything you think someone considering the move should evaluate before doing so -- but I'll be writing it from a "questions you should ask" perspective. It'll be interesting reading for the list too I think, so if nobody objects -- I see no reason to ask for these responses off list. Thanks! Susan H. -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com ********************************************************************** WARNING: All e-mail sent to and from this address will be received, scanned or otherwise recorded by the CPI Qualified Plan Consultants, Inc. corporate e-mail system and is subject to archival, monitoring or review by, and/or disclosure to, someone other than the recipient. ********************************************************************** From jm.hwsn at gmail.com Thu Jul 28 14:06:00 2011 From: jm.hwsn at gmail.com (jm.hwsn) Date: Thu, 28 Jul 2011 14:06:00 -0500 Subject: [AccessD] Article on upgrading In-Reply-To: <49A286ABF515E94A8505CD14DEB721701744A02B@CPIEMAIL-EVS1.CPIQPC.NET> References: <65F646A7C57044C1B8659201D3378B55@SusanHarkins> <49A286ABF515E94A8505CD14DEB721701744A02B@CPIEMAIL-EVS1.CPIQPC.NET> Message-ID: <4e31b319.8188ec0a.391e.4fa3@mx.google.com> All the ideas presented so far are great... some I never considered. I would be concerned about cost. As Rusty stated below, do they have a server is a major consideration. The cost of a server, the cost of the software and possibly the cost of an SQL Server Administrator if they don't have one on staff. - How many users are currently using the system and how many will use it once converted? - What is the time-line for conversion? 2-months, 6 months or longer - Do the PCs currently being used need to be upgraded/replaced once the conversion is completed? If the conversion is six months away, is the current plan to replace the user machines adequate? - If the major consideration is performance, then upgrading to Express is a viable option if all things are static. Express has a 4GB data limit so that might also be a consideration. Jim H. -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Rusty Hammond Sent: Thursday, July 28, 2011 1:53 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Article on upgrading Just off the top of my head: - Do they have network stability issues (ie computers losing connections, slow internet connection speeds, etc...) If so, if they think they need to go to SQL because the database is slow or the backend keeps getting corrupt, it may be they need to invest in the network and moving to SQL won't be required. - What kind of machine is the backend hosted on currently? Maybe an upgrade to that machine, or putting the backend on a more robust machine will take care of any issues. - Are they running a frontend/backend setup currently? Splitting up the database to a frontend and backend and putting copies of the frontend on each user computer may alleviate issues they may currently be having. - Is user level security becoming a requirement? Access security is easy to break and, if I remember correctly, non-existent in Access 2007 and 2010 - Using multiple versions of Access on your network to run your frontend? I've seen issues pop-up when different versions are hitting a backend and causing slowness and corruption in the backend. Moving to a SQL backend took care of the issues. - If they move to SQL, do they have a server? If not, a robust pc on a peer-to-peer network (Express only)? If not, are they willing to invest in one? - Are they hesitant to move to SQL because of cost? SQL Express is free. - Are they anticipating a lot of growth? Might be wise to make the move to SQL now so they aren't having to scramble to upgrade later. Rusty -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Susan Harkins Sent: Thursday, July 28, 2011 11:55 AM To: Access Developers discussion and problem solving Subject: [AccessD] Article on upgrading I'll be writing about upgrading to SQL Server and I'd like to include as many of you in it as possible -- you'll get credit and a link -- it's a nice thing to show the boss and clients. The angle is -- questions you should ask when deciding whether to upgrade an Access database to SQL Server (Express is Okay too) -- specific to the decision-making process. Anything you think someone considering the move should evaluate before doing so -- but I'll be writing it from a "questions you should ask" perspective. It'll be interesting reading for the list too I think, so if nobody objects -- I see no reason to ask for these responses off list. Thanks! Susan H. -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com ********************************************************************** WARNING: All e-mail sent to and from this address will be received, scanned or otherwise recorded by the CPI Qualified Plan Consultants, Inc. corporate e-mail system and is subject to archival, monitoring or review by, and/or disclosure to, someone other than the recipient. ********************************************************************** -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From fuller.artful at gmail.com Thu Jul 28 14:08:49 2011 From: fuller.artful at gmail.com (Arthur Fuller) Date: Thu, 28 Jul 2011 15:08:49 -0400 Subject: [AccessD] Article on upgrading In-Reply-To: <2C78D5CF79B043E5A94FC45422B4A5C3@SusanHarkins> References: <65F646A7C57044C1B8659201D3378B55@SusanHarkins> <2C78D5CF79B043E5A94FC45422B4A5C3@SusanHarkins> Message-ID: First, why bother with the upgrade? Two potential answers: 1, Because the DB size limit is going to be a problem. In many cases this is not an issue, but my philosophy is, Plan For Success, according to which maxim what you originally thought were going to be 1K users turns out to be 1M users. 2, Deploy the initial virgin in MDB or AAcdb format, and hope that it works for the short-term. 3. Be prepared to go to SQL Server if you should be so lucky as to achieve success. (Fuller's fifth law: only successful apps require upgrades; the rest die on the vine). And these numbers remind me of the old joke: How many kinds of programmers are there? Three: those who can count and those who can't. A. On Thu, Jul 28, 2011 at 2:13 PM, Susan Harkins wrote: > This is good advice for actually performing an upgrade, but I'm looking for > questions you might ask when deciding whether you actually should or want to > upgrade -- see the difference? What kind of questions do you ask your > clients before you actually get there -- what kinds of questions do they ask > you when they begin to think about upgrading? > > Thanks Arthur! Please feel free to play again! ;) > Susan H. > > From ssharkins at gmail.com Thu Jul 28 14:17:15 2011 From: ssharkins at gmail.com (Susan Harkins) Date: Thu, 28 Jul 2011 15:17:15 -0400 Subject: [AccessD] Article on upgrading References: <65F646A7C57044C1B8659201D3378B55@SusanHarkins> <006201cc4d54$e9283620$bb78a260$@cox.net> Message-ID: Thanks for mentioning these issue Doug -- I wonder how many other folks are being snagged? Susan H. > If you are moving from Access 2007 or 2010 and are using the attachment > field type it will not upsize. I had a client who required this type of > functionality and had to create similar functionality in SQL Server. As an > aside we were having issues with the form with the attachment field being > very slow in opening and updating. After getting rid of the attachment > field > and moving to a SQL server back end there was a significant increase in > responsiveness. > > > I'll be writing about upgrading to SQL Server and I'd like to include as > many of you in it as possible -- you'll get credit and a link -- it's a > nice > thing to show the boss and clients. > From ssharkins at gmail.com Thu Jul 28 14:18:17 2011 From: ssharkins at gmail.com (Susan Harkins) Date: Thu, 28 Jul 2011 15:18:17 -0400 Subject: [AccessD] Article on upgrading References: <65F646A7C57044C1B8659201D3378B55@SusanHarkins> <49A286ABF515E94A8505CD14DEB721701744A02B@CPIEMAIL-EVS1.CPIQPC.NET> Message-ID: Well Rusty... are you trying to steal my job????????? ;) Thank you! Susan H. > Just off the top of my head: > > - Do they have network stability issues (ie computers losing > connections, slow internet connection speeds, etc...) If so, if they > think they need to go to SQL because the database is slow or the backend > keeps getting corrupt, it may be they need to invest in the network and > moving to SQL won't be required. > > - What kind of machine is the backend hosted on currently? Maybe an > upgrade to that machine, or putting the backend on a more robust machine > will take care of any issues. > > - Are they running a frontend/backend setup currently? Splitting up the > database to a frontend and backend and putting copies of the frontend on > each user computer may alleviate issues they may currently be having. > > - Is user level security becoming a requirement? Access security is > easy to break and, if I remember correctly, non-existent in Access 2007 > and 2010 > > - Using multiple versions of Access on your network to run your > frontend? I've seen issues pop-up when different versions are hitting a > backend and causing slowness and corruption in the backend. Moving to a > SQL backend took care of the issues. > > - If they move to SQL, do they have a server? If not, a robust pc on a > peer-to-peer network (Express only)? If not, are they willing to invest > in one? > > - Are they hesitant to move to SQL because of cost? SQL Express is > free. > > - Are they anticipating a lot of growth? Might be wise to make the move > to SQL now so they aren't having to scramble to upgrade later. > > > Rusty > > > I'll be writing about upgrading to SQL Server and I'd like to include as > many of you in it as possible -- you'll get credit and a link -- it's a > nice thing to show the boss and clients. From ssharkins at gmail.com Thu Jul 28 14:16:38 2011 From: ssharkins at gmail.com (Susan Harkins) Date: Thu, 28 Jul 2011 15:16:38 -0400 Subject: [AccessD] Article on upgrading References: <65F646A7C57044C1B8659201D3378B55@SusanHarkins><2C78D5CF79B043E5A94FC45422B4A5C3@SusanHarkins> Message-ID: <467DB63A6DBA4FBAA3D30C3E4A9E4637@SusanHarkins> Thanks Arthur -- these are good -- :) Love your counting logic. :) Susan H. > First, why bother with the upgrade? Two potential answers: > 1, Because the DB size limit is going to be a problem. In many cases this > is > not an issue, but my philosophy is, Plan For Success, according to which > maxim what you originally thought were going to be 1K users turns out to > be > 1M users. > 2, Deploy the initial virgin in MDB or AAcdb format, and hope that it > works > for the short-term. > 3. Be prepared to go to SQL Server if you should be so lucky as to achieve > success. (Fuller's fifth law: only successful apps require upgrades; the > rest die on the vine). > > And these numbers remind me of the old joke: How many kinds of programmers > are there? Three: those who can count and those who can't. > > A. > > On Thu, Jul 28, 2011 at 2:13 PM, Susan Harkins > wrote: > >> This is good advice for actually performing an upgrade, but I'm looking >> for >> questions you might ask when deciding whether you actually should or want >> to >> upgrade -- see the difference? What kind of questions do you ask your >> clients before you actually get there -- what kinds of questions do they >> ask >> you when they begin to think about upgrading? >> >> Thanks Arthur! Please feel free to play again! ;) >> Susan H. >> >> > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com From ssharkins at gmail.com Thu Jul 28 14:19:06 2011 From: ssharkins at gmail.com (Susan Harkins) Date: Thu, 28 Jul 2011 15:19:06 -0400 Subject: [AccessD] Article on upgrading References: <65F646A7C57044C1B8659201D3378B55@SusanHarkins><49A286ABF515E94A8505CD14DEB721701744A02B@CPIEMAIL-EVS1.CPIQPC.NET> <4e31b319.8188ec0a.391e.4fa3@mx.google.com> Message-ID: <5FC2F1EA8EC84688A0D905A9EDF4C3EF@SusanHarkins> Thanks Jim -- you guys have provided some terrific thinking points! Susan H. > All the ideas presented so far are great... some I never considered. > > I would be concerned about cost. > > As Rusty stated below, do they have a server is a major consideration. > The cost of a server, the cost of the software and possibly the cost of an > SQL Server Administrator if they don't have one on staff. > > - How many users are currently using the system and how many will use it > once converted? > - What is the time-line for conversion? 2-months, 6 months or longer > - Do the PCs currently being used need to be upgraded/replaced once the > conversion is completed? If the conversion is six months away, is the > current plan to replace the user machines adequate? > - If the major consideration is performance, then upgrading to Express is > a > viable option if all things are static. Express has a 4GB data limit so > that might also be a consideration. > > From DWUTKA at Marlow.com Thu Jul 28 16:29:30 2011 From: DWUTKA at Marlow.com (Drew Wutka) Date: Thu, 28 Jul 2011 16:29:30 -0500 Subject: [AccessD] Article on upgrading In-Reply-To: References: Message-ID: I completely agree with Gustav's points, with one addition (that I can think of right now), and that would be database driven business logic. Ie, a record is put into table 1, then a record in table 2 is modified. Triggers. Drew -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: Thursday, July 28, 2011 1:29 PM To: accessd at databaseadvisors.com Subject: Re: [AccessD] Article on upgrading Hi Susan Nice to see back doing tech writing! We've never had a client asking why, they all follow my advice(!) So our reasons to suggest and upgrade: 1. Extreme reliability is requested. I have yet to see an SQL Server break down. 2. Remote access (across a WAN) is needed. 3. Easy, daily, and reliable backup is requested even when clients are on-line. 4. Database size can be expected to outgrow Access' capability. 5. Controlled and secure user access is requested. Note the non-tech level of these parameters. /gustav >>> ssharkins at gmail.com 28-07-2011 18:54:58 >>> I'll be writing about upgrading to SQL Server and I'd like to include as many of you in it as possible -- you'll get credit and a link -- it's a nice thing to show the boss and clients. The angle is -- questions you should ask when deciding whether to upgrade an Access database to SQL Server (Express is Okay too) -- specific to the decision-making process. Anything you think someone considering the move should evaluate before doing so -- but I'll be writing it from a "questions you should ask" perspective. It'll be interesting reading for the list too I think, so if nobody objects -- I see no reason to ask for these responses off list. Thanks! Susan H. -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com The information contained in this transmission is intended only for the person or entity to which it is addressed and may contain II-VI Proprietary and/or II-VI Business Sensitive material. If you are not the intended recipient, please contact the sender immediately and destroy the material in its entirety, whether electronic or hard copy. You are notified that any review, retransmission, copying, disclosure, dissemination, or other use of, or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. From darryl at whittleconsulting.com.au Thu Jul 28 18:38:16 2011 From: darryl at whittleconsulting.com.au (Darryl Collins) Date: Fri, 29 Jul 2011 09:38:16 +1000 Subject: [AccessD] Article on upgrading In-Reply-To: <65F646A7C57044C1B8659201D3378B55@SusanHarkins> References: <65F646A7C57044C1B8659201D3378B55@SusanHarkins> Message-ID: <000301cc4d7f$6cf62dc0$46e28940$@com.au> Hi Susan, For people starting out: I downloaded the brand new Denali CTP3 SQL Server Express yesterday. It is a good place to start for new users as it is fairly light and simple (as express used to be) and was totally painless to install (and that hasn't been the case in the past with SQL server installations. Only been a day so haven't had much time to play, but it has been great so far, at least on a Windows 7 PC. <> Happy. Cheers Darryl. -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Susan Harkins Sent: Friday, 29 July 2011 2:55 AM To: Access Developers discussion and problem solving Subject: [AccessD] Article on upgrading I'll be writing about upgrading to SQL Server and I'd like to include as many of you in it as possible -- you'll get credit and a link -- it's a nice thing to show the boss and clients. The angle is -- questions you should ask when deciding whether to upgrade an Access database to SQL Server (Express is Okay too) -- specific to the decision-making process. Anything you think someone considering the move should evaluate before doing so -- but I'll be writing it from a "questions you should ask" perspective. It'll be interesting reading for the list too I think, so if nobody objects -- I see no reason to ask for these responses off list. Thanks! Susan H. -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From darryl at whittleconsulting.com.au Thu Jul 28 18:40:58 2011 From: darryl at whittleconsulting.com.au (Darryl Collins) Date: Fri, 29 Jul 2011 09:40:58 +1000 Subject: [AccessD] Article on upgrading In-Reply-To: References: Message-ID: <000401cc4d7f$cd6c1660$68444320$@com.au> Triggers, Hell Yeah -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Drew Wutka Sent: Friday, 29 July 2011 7:30 AM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Article on upgrading I completely agree with Gustav's points, with one addition (that I can think of right now), and that would be database driven business logic. Ie, a record is put into table 1, then a record in table 2 is modified. Triggers. Drew -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: Thursday, July 28, 2011 1:29 PM To: accessd at databaseadvisors.com Subject: Re: [AccessD] Article on upgrading Hi Susan Nice to see back doing tech writing! We've never had a client asking why, they all follow my advice(!) So our reasons to suggest and upgrade: 1. Extreme reliability is requested. I have yet to see an SQL Server break down. 2. Remote access (across a WAN) is needed. 3. Easy, daily, and reliable backup is requested even when clients are on-line. 4. Database size can be expected to outgrow Access' capability. 5. Controlled and secure user access is requested. Note the non-tech level of these parameters. /gustav >>> ssharkins at gmail.com 28-07-2011 18:54:58 >>> I'll be writing about upgrading to SQL Server and I'd like to include as many of you in it as possible -- you'll get credit and a link -- it's a nice thing to show the boss and clients. The angle is -- questions you should ask when deciding whether to upgrade an Access database to SQL Server (Express is Okay too) -- specific to the decision-making process. Anything you think someone considering the move should evaluate before doing so -- but I'll be writing it from a "questions you should ask" perspective. It'll be interesting reading for the list too I think, so if nobody objects -- I see no reason to ask for these responses off list. Thanks! Susan H. -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com The information contained in this transmission is intended only for the person or entity to which it is addressed and may contain II-VI Proprietary and/or II-VI Business Sensitive material. If you are not the intended recipient, please contact the sender immediately and destroy the material in its entirety, whether electronic or hard copy. You are notified that any review, retransmission, copying, disclosure, dissemination, or other use of, or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From marksimms at verizon.net Fri Jul 29 09:27:54 2011 From: marksimms at verizon.net (Mark Simms) Date: Fri, 29 Jul 2011 10:27:54 -0400 Subject: [AccessD] SharePoint 2010 question(s) In-Reply-To: References: Message-ID: <000001cc4dfb$b5afa920$210efb60$@net> http://dmoffat.wordpress.com/2009/11/06/access-2010-and-sharepoint-welcome-t o-the-hybrid-access-application/ > > And what would that magic web site be? > From davidmcafee at gmail.com Fri Jul 29 11:30:55 2011 From: davidmcafee at gmail.com (David McAfee) Date: Fri, 29 Jul 2011 09:30:55 -0700 Subject: [AccessD] Article on upgrading In-Reply-To: <000401cc4d7f$cd6c1660$68444320$@com.au> References: <000401cc4d7f$cd6c1660$68444320$@com.au> Message-ID: 1. The ability to write comments in the SQL 2. The ability to do changes to data in the back end, without requiring a FE change. I know most will say that you can do this in Access too, but the FE should be for presentation of the data and a place to enter the data. Need to change a view or sproc? Change it, and as long as input parameters haven't changes, to tweaking is needed in the FE. 3. Speed 4. Ability to use UDF's 5. Stored Procedures! 6. Triggers, even though I try not to use them. I feel if the system is designed correctly, there is no reason for a trigger. Now if a system, such as an ERP, has stored procedures which are not allowed to be modified, then I can see a reason to use a trigger for a table that gets updated. 7. The ability to run scheduled jobs and back ups each night 8. The ability to email from the BE if certain conditions are found (new record found during a job ran at midnight) 9. Case statements in SQL I'm sure I can think of more reasons to use SQL :) On Thu, Jul 28, 2011 at 4:40 PM, Darryl Collins < darryl at whittleconsulting.com.au> wrote: > Triggers, Hell Yeah > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Drew Wutka > Sent: Friday, 29 July 2011 7:30 AM > To: Access Developers discussion and problem solving > Subject: Re: [AccessD] Article on upgrading > > I completely agree with Gustav's points, with one addition (that I can > think of right now), and that would be database driven business logic. > > Ie, a record is put into table 1, then a record in table 2 is modified. > Triggers. > > Drew > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Gustav Brock > Sent: Thursday, July 28, 2011 1:29 PM > To: accessd at databaseadvisors.com > Subject: Re: [AccessD] Article on upgrading > > Hi Susan > > Nice to see back doing tech writing! > > We've never had a client asking why, they all follow my advice(!) > So our reasons to suggest and upgrade: > > 1. Extreme reliability is requested. I have yet to see an SQL Server > break down. > 2. Remote access (across a WAN) is needed. > 3. Easy, daily, and reliable backup is requested even when clients are > on-line. > 4. Database size can be expected to outgrow Access' capability. > 5. Controlled and secure user access is requested. > > Note the non-tech level of these parameters. > > /gustav > > > >>> ssharkins at gmail.com 28-07-2011 18:54:58 >>> > I'll be writing about upgrading to SQL Server and I'd like to include as > many of you in it as possible -- you'll get credit and a link -- it's a > nice thing to show the boss and clients. > > The angle is -- questions you should ask when deciding whether to > upgrade an Access database to SQL Server (Express is Okay too) -- > specific to the decision-making process. Anything you think someone > considering the move should evaluate before doing so -- but I'll be > writing it from a "questions you should ask" perspective. > > It'll be interesting reading for the list too I think, so if nobody > objects -- I see no reason to ask for these responses off list. > > Thanks! > Susan H. > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > The information contained in this transmission is intended only for the > person or entity > to which it is addressed and may contain II-VI Proprietary and/or II-VI > Business > Sensitive material. If you are not the intended recipient, please contact > the sender > immediately and destroy the material in its entirety, whether electronic or > hard copy. > You are notified that any review, retransmission, copying, disclosure, > dissemination, > or other use of, or taking of any action in reliance upon this information > by persons > or entities other than the intended recipient is prohibited. > > > -- > 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 Fri Jul 29 12:40:12 2011 From: stuart at lexacorp.com.pg (Stuart McLachlan) Date: Sat, 30 Jul 2011 03:40:12 +1000 Subject: [AccessD] Article on upgrading In-Reply-To: References: , <000401cc4d7f$cd6c1660$68444320$@com.au>, Message-ID: <4E32F07C.16127.4C46D394@stuart.lexacorp.com.pg> Just to play Devil's Advocate :) - See comments in line -- Stuart On 29 Jul 2011 at 9:30, David McAfee wrote: > 1. The ability to write comments in the SQL > Access queries have a Description property which lets you store comments about the query. > 2. The ability to do changes to data in the back end, without > requiring a FE change. I know most will say that you can do this in > Access too, but the FE should be for presentation of the data and a > place to enter the data. Need to change a view or sproc? Change it, > and as long as input parameters haven't changes, to tweaking is needed > in the FE. Changes in an Access BE table are seen automatically by an Access FE. Changes in an SQL Server table are NOT seen automatically in an Access FE. You need to relink the FE to see the changes. > > 3. Speed > Sometimes. > 4. Ability to use UDF's > You can use Access functions in queries to an Access BE > 5. Stored Procedures! > VBA > 6. Triggers, even though I try not to use them. I feel if the system > is designed correctly, > there is no reason for a trigger. Now if a system, such as an ERP, > has > stored procedures > which are not allowed to be modified, then I can see a reason to > use a > trigger for a table > that gets updated. > Access 2010 has table macros/triggers. > 7. The ability to run scheduled jobs and back ups each night > I've been running scheduled jobs and backups with Access BEs since ver 97. Task Scheduler and command line arguments are your friend. > 8. The ability to email from the BE if certain conditions are found > (new record found during a job ran at midnight) > I've been writing functions to automatically email from Access based on various conditiions since ver 97. > 9. Case statements in SQL > Access queries can use IIF() and Access functions containing SELECT CASE and other more complex/powerful conditionals. > I'm sure I can think of more reasons to use SQL :) > From jwcolby at colbyconsulting.com Fri Jul 29 13:07:11 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Fri, 29 Jul 2011 14:07:11 -0400 Subject: [AccessD] Article on upgrading In-Reply-To: <65F646A7C57044C1B8659201D3378B55@SusanHarkins> References: <65F646A7C57044C1B8659201D3378B55@SusanHarkins> Message-ID: <4E32F6CF.5050207@colbyconsulting.com> What is the server that will host SQL Server. This needs to be asked particularly if you are installing SQL Server onto the server. Windows Server 2000 cannot support SQL Server 2008 or beyond. This has to do with not supporting the .Net frameworks required. So for Windows 2000 and below, SQL Server 2005 is a good as it gets. Know that SQL Server 2008 Express is actually the 2008 R2. This matters IF any other SQL Server 2008 instances are running that are not 2008 R2 because the two versions are *not* compatible. 2008R2 can handle the non-R2 files (and backups) but 2008 cannot handle R2 files and backups. Expect to learn SQL Server security! John W. Colby www.ColbyConsulting.com On 7/28/2011 12:54 PM, Susan Harkins wrote: > I'll be writing about upgrading to SQL Server and I'd like to include as many of you in it as possible -- you'll get credit and a link -- it's a nice thing to show the boss and clients. > > The angle is -- questions you should ask when deciding whether to upgrade an Access database to SQL Server (Express is Okay too) -- specific to the decision-making process. Anything you think someone considering the move should evaluate before doing so -- but I'll be writing it from a "questions you should ask" perspective. > > It'll be interesting reading for the list too I think, so if nobody objects -- I see no reason to ask for these responses off list. > > Thanks! > Susan H. From ssharkins at gmail.com Fri Jul 29 13:33:35 2011 From: ssharkins at gmail.com (Susan Harkins) Date: Fri, 29 Jul 2011 14:33:35 -0400 Subject: [AccessD] Article on upgrading References: <65F646A7C57044C1B8659201D3378B55@SusanHarkins> <4E32F6CF.5050207@colbyconsulting.com> Message-ID: Thanks John! Susan H. > What is the server that will host SQL Server. This needs to be asked > particularly if you are installing SQL Server onto the server. Windows > Server 2000 cannot support SQL Server 2008 or beyond. This has to do with > not supporting the .Net frameworks required. So for Windows 2000 and > below, SQL Server 2005 is a good as it gets. > > Know that SQL Server 2008 Express is actually the 2008 R2. This matters > IF any other SQL Server 2008 instances are running that are not 2008 R2 > because the two versions are *not* compatible. 2008R2 can handle the > non-R2 files (and backups) but 2008 cannot handle R2 files and backups. > > Expect to learn SQL Server security! > From davidmcafee at gmail.com Fri Jul 29 13:37:52 2011 From: davidmcafee at gmail.com (David McAfee) Date: Fri, 29 Jul 2011 11:37:52 -0700 Subject: [AccessD] Article on upgrading In-Reply-To: <4E32F07C.16127.4C46D394@stuart.lexacorp.com.pg> References: <000401cc4d7f$cd6c1660$68444320$@com.au> <4E32F07C.16127.4C46D394@stuart.lexacorp.com.pg> Message-ID: Stuart I agree with you on all topics. I've done things with Access that some people don't even know it's even possible to do, which is why those same people consider it a toy. in regards to #1, I meant inline comments as is done in VBA: INSERT INTO tblSomeTable (field1, field2...) SELECT field1, field2 FROM tblSomeWhereElse WHERE Something =1 AND HireDate > @SomeDate --Added on 1/1/2011 for some stupid reason AND SomeOtherReason = @TheCriteria --Added 7/1/2011 because someone decided this is now needed Another reason I love the inline comments is I've had some accountants have me add criteria, then question it 6 months later so I tend to put stuff in the stored procedure (used for a report) that reminds me so. --AND Status Flag IN ('A','R')-- old criteria prior to 6/9/2009 AND Status Flag IN ('A','R','V')--Added on 6/9/2009 as per chuck's email asking for this I love emailing them their original email asking for it to be changed. #2, I guess I'm used to dealing more with ADPs than MDBs. But this too, was worded badly. A stored procedure needs to be changed because a new table needs to be added or criteria changed in WHERE clause. If this was a non split mdb or if the user was creating the dynamic sql in the FE (not just access but VB/C# FE's too), the FE would have to be changed. SQL using ADPs or C#,VB.NET, Web FE's see the change instantly. #3 When have you seen access return a resultset faster than SQL? #4 Yes, you can use functions in the FE, but once again, if it can be done in the BE and does not slow it down, and allows changes without affecting the FE, I prefer doing it back there. #5 :) #6 They're still triggers. Bleh! :P #7 I do this too, but it is nice to have a built in feature that does this. #8 me too, but like I said above, it's nice to have something built in do this. #9 true, but it gets ugly when you have to do a lot of case statements. SELECT CASE WHEN X=0 THEN 'You are Royally Fd today!' CASE WHEN x=1 and Sky=blue and StarsInTheSky =0 THEN 'Its a perfect world' CASE WHEN x=1 and Sky = gray and StarsInTheSky=0 THEN 'MustBeMonday' CASE WHEN X=1 and Sky = black and StartsInTheSky =1 THEN 'Enjoy the night!' --Many more cases here ELSE 'Just a normal day' END AS TypeOfDay #10, Oh, I remember now, restore back in time!!!! I've never had to use this for reasons of my own but I've had other developers yell out "OH SHIT" when testing something on a live system and not use a transaction/rollback. no prob, restore to a point back in time, like 10 minutes. done. :) On Fri, Jul 29, 2011 at 10:40 AM, Stuart McLachlan wrote: > Just to play Devil's Advocate :) > - See comments in line > > -- > Stuart > > On 29 Jul 2011 at 9:30, David McAfee wrote: > > > 1. The ability to write comments in the SQL > > > > Access queries have a Description property which lets you store comments > about the query. > > > 2. The ability to do changes to data in the back end, without > > requiring a FE change. I know most will say that you can do this in > > Access too, but the FE should be for presentation of the data and a > > place to enter the data. Need to change a view or sproc? Change it, > > and as long as input parameters haven't changes, to tweaking is needed > > in the FE. > > Changes in an Access BE table are seen automatically by an Access FE. > Changes in an > SQL Server table are NOT seen automatically in an Access FE. You need to > relink the FE to > see the changes. > > > > > 3. Speed > > > > Sometimes. > > > 4. Ability to use UDF's > > > > You can use Access functions in queries to an Access BE > > > 5. Stored Procedures! > > > > VBA > > > 6. Triggers, even though I try not to use them. I feel if the system > > is designed correctly, > > there is no reason for a trigger. Now if a system, such as an ERP, > > has > > stored procedures > > which are not allowed to be modified, then I can see a reason to > > use a > > trigger for a table > > that gets updated. > > > > Access 2010 has table macros/triggers. > > > 7. The ability to run scheduled jobs and back ups each night > > > > I've been running scheduled jobs and backups with Access BEs since ver 97. > Task > Scheduler and command line arguments are your friend. > > > 8. The ability to email from the BE if certain conditions are found > > (new record found during a job ran at midnight) > > > > I've been writing functions to automatically email from Access based on > various conditiions > since ver 97. > > > 9. Case statements in SQL > > > > Access queries can use IIF() and Access functions containing SELECT CASE > and other > more complex/powerful conditionals. > > > > I'm sure I can think of more reasons to use SQL :) > > > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > From darryl at whittleconsulting.com.au Sun Jul 31 22:28:26 2011 From: darryl at whittleconsulting.com.au (Darryl Collins) Date: Mon, 1 Aug 2011 13:28:26 +1000 Subject: [AccessD] rsR("order") vs rsR!Order In-Reply-To: References: <000401cc4d7f$cd6c1660$68444320$@com.au> <4E32F07C.16127.4C46D394@stuart.lexacorp.com.pg> Message-ID: <000a01cc4ffb$149ef890$3ddce9b0$@com.au> Hi guys & Gals, Slower day at work today so I was poking around some code they use here in my new role and found this syntax when dealing with recordsets in Access VBA rsR.AddNew rsR("order") = rsM("order") rsR("sheetname") = rsM("sheetname") rsR("sheetnumber") = rsM("sheetnumber") rsR.Update It is very, ummm, MS Excel in style, but it does work ok and update the recordset(s) correctly. However I would have written it like: With rsR .AddNew !order = rsM!order !sheetname = rsM!sheetname !sheetnumber = rsM!sheetnumber !Update End with Not withstanding then with / end with bit. What is the advantage (if any) of one syntax over the other? Is one method faster? Actually, Why does the first syntax even work? I would have though you would have had to use the ! method, but very clearly I am totally wrong on that count. I had not seen code used like that before for MS Access recordsets. Maybe I need to get out more? Your thoughts? Cheers Darryl From dbdoug at gmail.com Fri Jul 1 00:47:36 2011 From: dbdoug at gmail.com (Doug Steele) Date: Thu, 30 Jun 2011 22:47:36 -0700 Subject: [AccessD] OT - FW: New computer In-Reply-To: References: <4DFAA63E.50506@colbyconsulting.com> <23775347AAAD47329496777628D6A927@HAL9005> <4DFAD4F0.9090504@colbyconsulting.com> <4DFB4DB9.9050804@colbyconsulting.com> <661A04F55F074D77BC065B3718B90850@HAL9005> <4DFB6633.3020703@colbyconsulting.com> Message-ID: I think so, but I haven't done any real work with the usb setup. I'll report back when I've had a chance to do a couple of days of testing. I have to totally reorganize my workspace to do this, so it may be a while.... Doug On Thu, Jun 30, 2011 at 8:34 PM, Jim Lawrence wrote: > Ha ha, one is just not good enough anymore. ;-) > ...but do you find the USB video cards basically a good deal? > > Jim > > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Doug Steele > Sent: Thursday, June 30, 2011 10:28 AM > To: Access Developers discussion and problem solving > Subject: Re: [AccessD] OT - FW: New computer > > I just received a StarTech USB2VGAE2 usb/video adapter. ?I got a > 'refurbished' one for CAD$69 (plus a rip-off $26 in shipping!). ?It > works pretty well; I'm using it to connect 2 large monitors to my > laptop. ?The USB adapter is connected to a 19" widescreen monitor and > runs at 1680x1050. ?The video is definitely slower on the USB > connected monitor - when you move a window, for example, the edges get > 'jaggies'. ?But the speed is quite acceptable for the kind of work I > do - I'm not going to be playing games on it. > > The only problem I've had is that the driver gets a bit confused > sometimes when you change the graphics setup - like the monitor > positions, or which monitor is the master. ?I discovered that I have > to disable the USB monitor, set the laptop and connected monitor, then > re-enable the USB monitor and set it up. ?Not a big deal. > > It's kind of fun to have three screens running at once - makes me feel > ever so productive. ?An illusion, of course. > > Doug > > On Sun, Jun 19, 2011 at 8:00 AM, Jim Lawrence wrote: >> Hi Doug: >> >> I was just the installer but the screens worked fast enough for doing POS >> work. I doubt whether this configuration will ever replace a DVI > connection >> directly to a high-performance video card but they are quite sufficient > for >> basic office work and the ease of installation is their plus. >> >> Jim >> >> >> >> -----Original Message----- >> From: accessd-bounces at databaseadvisors.com >> [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Doug Steele >> Sent: Friday, June 17, 2011 11:59 AM >> To: Access Developers discussion and problem solving >> Subject: Re: [AccessD] OT - FW: New computer >> >> Do you have any experience or information on these? ?I'd like to run 2 >> big screens off a laptop, but I saw commentary on the Internet that >> they can be so slow as to be useless. >> >> Thanks, >> Doug >> >> On Fri, Jun 17, 2011 at 10:29 AM, Jim Lawrence wrote: >>> Just a note; There are now a little video-chipset block that can just be >>> inserted into any USB slot and can connect another monitor to a computer. >>> >>> See here: http://www.startech.com/product-list/usb-vga-video-adapters >>> >>> The price runs from 60 to 150 per monitor. You can even use them with POE >> to >>> run remote video and camera feeds. >> -- >> 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 BradM at blackforestltd.com Fri Jul 1 13:26:32 2011 From: BradM at blackforestltd.com (Brad Marks) Date: Fri, 1 Jul 2011 13:26:32 -0500 Subject: [AccessD] Pulling Data from Excel into Access with "Automation" References: <201107010022.p610MKvQ022864@databaseadvisors.com> Message-ID: Steve, William, Darryl, Thanks for the help with my questions. The advice that you provided has helped me move forward. Below is a stripped down snippet of the Access 2007 VBA code that I put together based on the advice you provided. I am going to post it here in case some other "newbie" is looking for the very "basic basics" and I am posting it here to see if anyone sees a problem with the direction that I am heading. Thanks again, Brad PS. I also ordered a book on this subject. '~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Sub Pull_Data_From_Excel_Into_Access() Dim XLApp As Excel.Application Dim XLWorkbook As Excel.Workbook Dim XLSheet As Excel.Worksheet Dim Str_Value_in_Cell As Variant Set XLApp = CreateObject("Excel.Application") XLApp.Workbooks.Open ("C:\Book1.xlsx") XLApp.Visible = True ''' to see Spreadsheet Set XLWorkbook = XLApp.Workbooks(1) Set XLSheet = XLWorkbook.Sheets(1) Str_Value_in_Cell = XLSheet.Cells(1, 1).Value MsgBox Str_Value_in_Cell End Sub '~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ From vbacreations at gmail.com Fri Jul 1 15:46:19 2011 From: vbacreations at gmail.com (William Benson (VBACreations.Com)) Date: Fri, 1 Jul 2011 16:46:19 -0400 Subject: [AccessD] Pulling Data from Excel into Access with "Automation" In-Reply-To: References: <201107010022.p610MKvQ022864@databaseadvisors.com> Message-ID: <001a01cc382f$eeb501c0$cc1f0540$@gmail.com> Nice going Brad, I suggest Set XLWorkbook = XLApp.Activeworkbook, rather than Workbooks(1) in case there is a Personal.xls/m workbook opening with every instance of the user's Excel. But better still is Test the opening of the workbook, in case the path is wrong or the network won't give it up Set XLWorkbook = XLApp.Workbooks.Open ("C:\Book1.xlsx") If Not XLWorkbook is Nothing 'Go on End if And now you get the fun of dealing with Value and Value2 as properties as well as Text property. More fun for dates than anything else. Consider too the GetObject (,"Excel.Application") ... which is written respectably into a function like Set XL = GetObject(, "Excel.Application") If XL Is Nothing Then Set XL = CreateObject("Excel.Application") End If Last, you might need App.Activate from time to time to bring the application you want into focus... AppActivate "Microsoft Access" Or AppActivate "Microsoft Excel" I am not sure if it really helps or not, but there is often an annoying flicker when I automate, and I don't recall if XL>VISIBLE = TRUE forces excel into the foreground of your windows, or just makes it appear should it happen to have focus. -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Brad Marks Sent: Friday, July 01, 2011 2:27 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Pulling Data from Excel into Access with "Automation" Steve, William, Darryl, Thanks for the help with my questions. The advice that you provided has helped me move forward. Below is a stripped down snippet of the Access 2007 VBA code that I put together based on the advice you provided. I am going to post it here in case some other "newbie" is looking for the very "basic basics" and I am posting it here to see if anyone sees a problem with the direction that I am heading. Thanks again, Brad PS. I also ordered a book on this subject. '~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Sub Pull_Data_From_Excel_Into_Access() Dim XLApp As Excel.Application Dim XLWorkbook As Excel.Workbook Dim XLSheet As Excel.Worksheet Dim Str_Value_in_Cell As Variant Set XLApp = CreateObject("Excel.Application") Set XLSheet = XLWorkbook.Sheets(1) Str_Value_in_Cell = XLSheet.Cells(1, 1).Value MsgBox Str_Value_in_Cell End Sub '~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From BradM at blackforestltd.com Fri Jul 1 15:49:41 2011 From: BradM at blackforestltd.com (Brad Marks) Date: Fri, 1 Jul 2011 15:49:41 -0500 Subject: [AccessD] Pulling Data from Excel into Access with "Automation" References: <201107010022.p610MKvQ022864@databaseadvisors.com> <001a01cc382f$eeb501c0$cc1f0540$@gmail.com> Message-ID: William, Thanks for the additional advice, I appreciate it. I am starting to have some fun with all of this. I can see many opportunities as the small firm that I work for uses a ton of Excel spreadsheets. Brad -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of William Benson (VBACreations.Com) Sent: Friday, July 01, 2011 3:46 PM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Pulling Data from Excel into Access with "Automation" Nice going Brad, I suggest Set XLWorkbook = XLApp.Activeworkbook, rather than Workbooks(1) in case there is a Personal.xls/m workbook opening with every instance of the user's Excel. But better still is Test the opening of the workbook, in case the path is wrong or the network won't give it up Set XLWorkbook = XLApp.Workbooks.Open ("C:\Book1.xlsx") If Not XLWorkbook is Nothing 'Go on End if And now you get the fun of dealing with Value and Value2 as properties as well as Text property. More fun for dates than anything else. Consider too the GetObject (,"Excel.Application") ... which is written respectably into a function like Set XL = GetObject(, "Excel.Application") If XL Is Nothing Then Set XL = CreateObject("Excel.Application") End If Last, you might need App.Activate from time to time to bring the application you want into focus... AppActivate "Microsoft Access" Or AppActivate "Microsoft Excel" I am not sure if it really helps or not, but there is often an annoying flicker when I automate, and I don't recall if XL>VISIBLE = TRUE forces excel into the foreground of your windows, or just makes it appear should it happen to have focus. -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Brad Marks Sent: Friday, July 01, 2011 2:27 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Pulling Data from Excel into Access with "Automation" Steve, William, Darryl, Thanks for the help with my questions. The advice that you provided has helped me move forward. Below is a stripped down snippet of the Access 2007 VBA code that I put together based on the advice you provided. I am going to post it here in case some other "newbie" is looking for the very "basic basics" and I am posting it here to see if anyone sees a problem with the direction that I am heading. Thanks again, Brad PS. I also ordered a book on this subject. '~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Sub Pull_Data_From_Excel_Into_Access() Dim XLApp As Excel.Application Dim XLWorkbook As Excel.Workbook Dim XLSheet As Excel.Worksheet Dim Str_Value_in_Cell As Variant Set XLApp = CreateObject("Excel.Application") Set XLSheet = XLWorkbook.Sheets(1) Str_Value_in_Cell = XLSheet.Cells(1, 1).Value MsgBox Str_Value_in_Cell End Sub '~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -- 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 has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. From stuart at lexacorp.com.pg Fri Jul 1 16:57:41 2011 From: stuart at lexacorp.com.pg (Stuart McLachlan) Date: Sat, 02 Jul 2011 07:57:41 +1000 Subject: [AccessD] Pulling Data from Excel into Access with "Automation" In-Reply-To: References: <201107010022.p610MKvQ022864@databaseadvisors.com>, Message-ID: <4E0E42D5.32026.D4817AA@stuart.lexacorp.com.pg> ONly change I'd make is: Dim Str_Value_in_Cell As Variant I'd make that Var_Value_in_Cell :-) -- Stuart On 1 Jul 2011 at 13:26, Brad Marks wrote: > Steve, William, Darryl, > > Thanks for the help with my questions. > > The advice that you provided has helped me move forward. > > Below is a stripped down snippet of the Access 2007 VBA code that I > put together based on the advice you provided. > > I am going to post it here in case some other "newbie" is looking for > the very "basic basics" and I am posting it here to see if anyone sees > a problem with the direction that I am heading. > > Thanks again, > Brad > > PS. I also ordered a book on this subject. > > '~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > Sub Pull_Data_From_Excel_Into_Access() > > Dim XLApp As Excel.Application > > Dim XLWorkbook As Excel.Workbook > > Dim XLSheet As Excel.Worksheet > > Dim Str_Value_in_Cell As Variant > > Set XLApp = CreateObject("Excel.Application") > > XLApp.Workbooks.Open ("C:\Book1.xlsx") > > XLApp.Visible = True ''' to see Spreadsheet > > Set XLWorkbook = XLApp.Workbooks(1) > > Set XLSheet = XLWorkbook.Sheets(1) > > Str_Value_in_Cell = XLSheet.Cells(1, 1).Value > > MsgBox Str_Value_in_Cell > > End Sub > > '~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > From BradM at blackforestltd.com Fri Jul 1 19:29:08 2011 From: BradM at blackforestltd.com (Brad Marks) Date: Fri, 1 Jul 2011 19:29:08 -0500 Subject: [AccessD] Pulling Data from Excel into Access with "Automation" References: <201107010022.p610MKvQ022864@databaseadvisors.com>, <4E0E42D5.32026.D4817AA@stuart.lexacorp.com.pg> Message-ID: Stuart, Yes, you are right. After three decades of COBOL, I am still adjusting to "working storage" prefixes. :-) Brad -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Stuart McLachlan Sent: Friday, July 01, 2011 4:58 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Pulling Data from Excel into Access with "Automation" ONly change I'd make is: Dim Str_Value_in_Cell As Variant I'd make that Var_Value_in_Cell :-) -- Stuart On 1 Jul 2011 at 13:26, Brad Marks wrote: > Steve, William, Darryl, > > Thanks for the help with my questions. > > The advice that you provided has helped me move forward. > > Below is a stripped down snippet of the Access 2007 VBA code that I > put together based on the advice you provided. > > I am going to post it here in case some other "newbie" is looking for > the very "basic basics" and I am posting it here to see if anyone sees > a problem with the direction that I am heading. > > Thanks again, > Brad > > PS. I also ordered a book on this subject. > > '~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > Sub Pull_Data_From_Excel_Into_Access() > > Dim XLApp As Excel.Application > > Dim XLWorkbook As Excel.Workbook > > Dim XLSheet As Excel.Worksheet > > Dim Str_Value_in_Cell As Variant > > Set XLApp = CreateObject("Excel.Application") > > XLApp.Workbooks.Open ("C:\Book1.xlsx") > > XLApp.Visible = True ''' to see Spreadsheet > > Set XLWorkbook = XLApp.Workbooks(1) > > Set XLSheet = XLWorkbook.Sheets(1) > > Str_Value_in_Cell = XLSheet.Cells(1, 1).Value > > MsgBox Str_Value_in_Cell > > End Sub > > '~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > > -- > 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 has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. From vbacreations at gmail.com Fri Jul 1 20:58:06 2011 From: vbacreations at gmail.com (William Benson (VBACreations.Com)) Date: Fri, 1 Jul 2011 21:58:06 -0400 Subject: [AccessD] Pulling Data from Excel into Access with "Automation" In-Reply-To: References: <201107010022.p610MKvQ022864@databaseadvisors.com>, <4E0E42D5.32026.D4817AA@stuart.lexacorp.com.pg> Message-ID: <001f01cc385b$7d651e20$782f5a60$@gmail.com> OK, I am leaving the subject line the same, because this was (and mostly is) an awesome automation exercise, which in fact I will send to Brad after I perfect it. I have built a tool for examining all fields and the occurrence rate of distinct values those fields have, within Excel data. Chiefly, from within all worksheets among open workbooks. There is an option to store this info for easy reference later, or to clear it out and/or refresh it later. One thing I like to use it for is examining data when there are way too many excel rows to look at cleanly and the number of distinct items exceeds what Excel will show in the autofilter drop down. I also plan to use this to build Access tables on the fly from the data in a worksheet, and then save specific sheets to CSV, perhaps building import specs on the fly using Duane Hookom's identification of the required tables for maintaining import specs. But I have an annoying glitch which I have solved through a UDF workaround but I feel I should not have to do that. Maybe someone can read through this for the likely issue. Or at least reassure me I have no alternative but the UDF. Which is fast enough, I suppose - but I would think that the UDF will be calculated with every row in the result, whereas the parameters I wanted to use would have been calculated by Access only once then used for every row). Basic structure is: 4 controls: Lst0 shows open workbooks Lst1 shows worksheets which have data in row 1, from the workbook chosen in Lst0 LstFields shows all the column headers on worksheet = Lst1 LstValues shows all distinct values in lstField ... and the number of occurrences. I store the info in a local table and refresh when desired (workbooks have to be open in order To populate the listboxes. My Problem: When creating SQL for the rowsource for lstValues, I tried to reference listbox columns - but was told by Access that was a syntax error. QUESTION! (I don't know if something like this is supposed to work or not: ws = forms!frmCreateTableFromExcel!lst1.column(0, lst1.listindex) - but it don't. I think maybe because listindex can be -1 and there's no value and that is a problem. Here is the complete rowsource SQL SELECT WB, WS, Fld, [Values], Items FROM Tbl_Field_Values WHERE WB = forms!frmCreateTableFromExcel!lst0 and ws = forms!frmCreateTableFromExcel!lst1 and fld = forms!frmCreateTableFromExcel!lstfields So I switched to ws = forms!frmCreateTableFromExcel!lst1.column(0, lst1.listindex). That brought good results except that for some reason I don't quite understand, the value property of the lstFields listbox was not adjusting when a statement like lstFields.Selected(i) = was used to select a different value in the listbox. Sure enough the _AfterUpdate event would fire, but a test of lstFields.Value would show the same value every time, regardless. That seems evil and wrong to me! ==snippet - lstFields.Value didn't change when each row was made the selection. For i = 0 To lstFields.ListCount - 1 lstFields.Selected(i) = True 'no impact on .Value apparently. debug.print lstFields Next K, how I solved this, now tell me if I am craze... I used a UDF in the rowsource, which called the values out of those columns -- which the query wouldn't let me refer to by themselves: my new RowSource is: SELECT WB, WS, Fld, [Values], Items FROM Tbl_Field_Values WHERE WB = ValuefromList("WB") and ws = ValuefromList("WS") and fld = ValuefromList("Fields") 'Here's the function Function ValuefromList(str As String) As String Dim frm As Form Dim strval As String On Error Resume Next Set frm = Screen.ActiveForm If Not frm Is Nothing Then Dim c As Control Set c = frm.Controls("Lst" & str) If Not c Is Nothing Then If c.ListIndex >= 0 Then strval = c.Column(0, c.ListIndex) End If End If End If ValuefromList = strval End Function From vbacreations at gmail.com Fri Jul 1 21:04:23 2011 From: vbacreations at gmail.com (William Benson (VBACreations.Com)) Date: Fri, 1 Jul 2011 22:04:23 -0400 Subject: [AccessD] Pulling Data from Excel into Access with "Automation" References: <201107010022.p610MKvQ022864@databaseadvisors.com>, <4E0E42D5.32026.D4817AA@stuart.lexacorp.com.pg> Message-ID: <002001cc385c$5de1fd60$19a5f820$@gmail.com> There was a typo in the below. Where I said So I switched to ws = forms!frmCreateTableFromExcel!lst1.column(0, lst1.listindex) I meant to say So I switched FROM ws = forms!frmCreateTableFromExcel!lst1.column(0, lst1.listindex) Sorry about that. -----Original Message----- From: William Benson (VBACreations.Com) [mailto:vbacreations at gmail.com] Sent: Friday, July 01, 2011 9:58 PM To: Access Developers discussion and problem solving Subject: RE: [AccessD] Pulling Data from Excel into Access with "Automation" OK, I am leaving the subject line the same, because this was (and mostly is) an awesome automation exercise, which in fact I will send to Brad after I perfect it. I have built a tool for examining all fields and the occurrence rate of distinct values those fields have, within Excel data. Chiefly, from within all worksheets among open workbooks. There is an option to store this info for easy reference later, or to clear it out and/or refresh it later. One thing I like to use it for is examining data when there are way too many excel rows to look at cleanly and the number of distinct items exceeds what Excel will show in the autofilter drop down. I also plan to use this to build Access tables on the fly from the data in a worksheet, and then save specific sheets to CSV, perhaps building import specs on the fly using Duane Hookom's identification of the required tables for maintaining import specs. But I have an annoying glitch which I have solved through a UDF workaround but I feel I should not have to do that. Maybe someone can read through this for the likely issue. Or at least reassure me I have no alternative but the UDF. Which is fast enough, I suppose - but I would think that the UDF will be calculated with every row in the result, whereas the parameters I wanted to use would have been calculated by Access only once then used for every row). Basic structure is: 4 controls: Lst0 shows open workbooks Lst1 shows worksheets which have data in row 1, from the workbook chosen in Lst0 LstFields shows all the column headers on worksheet = Lst1 LstValues shows all distinct values in lstField ... and the number of occurrences. I store the info in a local table and refresh when desired (workbooks have to be open in order To populate the listboxes. My Problem: When creating SQL for the rowsource for lstValues, I tried to reference listbox columns - but was told by Access that was a syntax error. QUESTION! (I don't know if something like this is supposed to work or not: ws = forms!frmCreateTableFromExcel!lst1.column(0, lst1.listindex) - but it don't. I think maybe because listindex can be -1 and there's no value and that is a problem. Here is the complete rowsource SQL SELECT WB, WS, Fld, [Values], Items FROM Tbl_Field_Values WHERE WB = forms!frmCreateTableFromExcel!lst0 and ws = forms!frmCreateTableFromExcel!lst1 and fld = forms!frmCreateTableFromExcel!lstfields So I switched to ws = forms!frmCreateTableFromExcel!lst1.column(0, lst1.listindex). That brought good results except that for some reason I don't quite understand, the value property of the lstFields listbox was not adjusting when a statement like lstFields.Selected(i) = was used to select a different value in the listbox. Sure enough the _AfterUpdate event would fire, but a test of lstFields.Value would show the same value every time, regardless. That seems evil and wrong to me! ==snippet - lstFields.Value didn't change when each row was made the selection. For i = 0 To lstFields.ListCount - 1 lstFields.Selected(i) = True 'no impact on .Value apparently. debug.print lstFields Next K, how I solved this, now tell me if I am craze... I used a UDF in the rowsource, which called the values out of those columns -- which the query wouldn't let me refer to by themselves: my new RowSource is: SELECT WB, WS, Fld, [Values], Items FROM Tbl_Field_Values WHERE WB = ValuefromList("WB") and ws = ValuefromList("WS") and fld = ValuefromList("Fields") 'Here's the function Function ValuefromList(str As String) As String Dim frm As Form Dim strval As String On Error Resume Next Set frm = Screen.ActiveForm If Not frm Is Nothing Then Dim c As Control Set c = frm.Controls("Lst" & str) If Not c Is Nothing Then If c.ListIndex >= 0 Then strval = c.Column(0, c.ListIndex) End If End If End If ValuefromList = strval End Function From rockysmolin at bchacc.com Sat Jul 2 09:43:14 2011 From: rockysmolin at bchacc.com (Rocky Smolin) Date: Sat, 2 Jul 2011 07:43:14 -0700 Subject: [AccessD] Need a new printer? Cheap? Message-ID: <4AC76807705E4A688411F71D46A6C3FE@HAL9007> http://www.walmart.com/ip/Canon-PIXMA-MP250-Photo-All-In-One-Inkjet-Printer- Copier-Scanner-Value-Bundle/12534987?sourceid=06345287580503509743 &wmlspartner=tWsI2R5jHvk but god knows what the cartridges will cost. Rocky From marksimms at verizon.net Sat Jul 2 09:51:33 2011 From: marksimms at verizon.net (Mark Simms) Date: Sat, 02 Jul 2011 10:51:33 -0400 Subject: [AccessD] Pulling Data from Excel into Access with "Automation" In-Reply-To: <002001cc385c$5de1fd60$19a5f820$@gmail.com> References: <201107010022.p610MKvQ022864@databaseadvisors.com>, <4E0E42D5.32026.D4817AA@stuart.lexacorp.com.pg> <002001cc385c$5de1fd60$19a5f820$@gmail.com> Message-ID: <003b01cc38c7$89934840$9cb9d8c0$@net> Just reverse the Column property arguments: lst1.ListIndex should be first. > -----Original Message----- > From: accessd-bounces at databaseadvisors.com [mailto:accessd- > bounces at databaseadvisors.com] On Behalf Of William Benson > (VBACreations.Com) > Sent: Friday, July 01, 2011 10:04 PM > To: 'Access Developers discussion and problem solving' > Subject: Re: [AccessD] Pulling Data from Excel into Access with > "Automation" > > There was a typo in the below. Where I said > > So I switched to ws = > forms!frmCreateTableFromExcel!lst1.column(0, lst1.listindex) > > I meant to say > > So I switched FROM ws = forms!frmCreateTableFromExcel!lst1.column(0, > lst1.listindex) > > Sorry about that. > > > -----Original Message----- > From: William Benson (VBACreations.Com) [mailto:vbacreations at gmail.com] > Sent: Friday, July 01, 2011 9:58 PM > To: Access Developers discussion and problem solving > Subject: RE: [AccessD] Pulling Data from Excel into Access with > "Automation" > > OK, I am leaving the subject line the same, because this was (and > mostly is) > an awesome automation exercise, which in fact I will send to Brad after > I > perfect it. I have built a tool for examining all fields and the > occurrence > rate of distinct values those fields have, within Excel data. Chiefly, > from > within all worksheets among open workbooks. There is an option to store > this > info for easy reference later, or to clear it out and/or refresh it > later. > > One thing I like to use it for is examining data when there are way too > many > excel rows to look at cleanly and the number of distinct items exceeds > what > Excel will show in the autofilter drop down. I also plan to use this to > build Access tables on the fly from the data in a worksheet, and then > save > specific sheets to CSV, perhaps building import specs on the fly using > Duane > Hookom's identification of the required tables for maintaining import > specs. > But I have an annoying glitch which I have solved through a UDF > workaround > but I feel I should not have to do that. Maybe someone can read through > this > for the likely issue. Or at least reassure me I have no alternative but > the > UDF. Which is fast enough, I suppose - but I would think that the UDF > will > be calculated with every row in the result, whereas the parameters I > wanted > to use would have been calculated by Access only once then used for > every > row). > > Basic structure is: > > 4 controls: > Lst0 shows open workbooks > Lst1 shows worksheets which have data in row 1, from the workbook > chosen > in Lst0 > LstFields shows all the column headers on worksheet = Lst1 > LstValues shows all distinct values in lstField ... and the number > of > occurrences. > I store the info in a local table and refresh when desired > (workbooks > have to be open in order > To populate the listboxes. > > My Problem: > When creating SQL for the rowsource for lstValues, I tried to reference > listbox columns - but was told by Access that was a syntax error. > > QUESTION! > (I don't know if something like this is supposed to work or not: > ws = forms!frmCreateTableFromExcel!lst1.column(0, > lst1.listindex) - > but it don't. I think maybe because listindex can be -1 and there's no > value > and that is a problem. > > Here is the complete rowsource SQL > SELECT WB, WS, Fld, [Values], Items FROM Tbl_Field_Values > WHERE WB = forms!frmCreateTableFromExcel!lst0 > and ws = forms!frmCreateTableFromExcel!lst1 > and fld = forms!frmCreateTableFromExcel!lstfields > > > So I switched to ws = forms!frmCreateTableFromExcel!lst1.column(0, > lst1.listindex). That brought good results except that for some reason > I > don't quite understand, the value property of the lstFields listbox was > not > adjusting when a statement like lstFields.Selected(i) = was used to > select a > different value in the listbox. Sure enough the _AfterUpdate event > would > fire, but a test of lstFields.Value would show the same value every > time, > regardless. That seems evil and wrong to me! > ==snippet - lstFields.Value didn't change when each row was made > the > selection. > For i = 0 To lstFields.ListCount - 1 > lstFields.Selected(i) = True 'no impact on .Value > apparently. > debug.print lstFields > Next > > K, how I solved this, now tell me if I am craze... I used a UDF in the > rowsource, which called the values out of those columns -- which the > query > wouldn't let me refer to by themselves: my new RowSource is: > > SELECT WB, WS, Fld, [Values], Items FROM Tbl_Field_Values > WHERE WB = ValuefromList("WB") > and ws = ValuefromList("WS") and > fld = ValuefromList("Fields") > > 'Here's the function > Function ValuefromList(str As String) As String Dim frm As Form Dim > strval > As String On Error Resume Next Set frm = Screen.ActiveForm If Not frm > Is > Nothing Then > Dim c As Control > Set c = frm.Controls("Lst" & str) > If Not c Is Nothing Then > If c.ListIndex >= 0 Then > strval = c.Column(0, c.ListIndex) > End If > End If > End If > ValuefromList = strval > > End Function > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com From fuller.artful at gmail.com Sat Jul 2 12:06:08 2011 From: fuller.artful at gmail.com (Arthur Fuller) Date: Sat, 2 Jul 2011 13:06:08 -0400 Subject: [AccessD] Walk the DB Using ADO Message-ID: I know that I've written this code before, but due to a plethora of backup CDs and my habit of pruning what is not currently necessary from the current situation(s), I can't find the relevant code. And besides, I'm currently semi-retired, and working in hobbyist most not billable mode. Here's what I need, in ADO format if possible: For each t in CurrentDB( Tables ) For each f in t.fields For each a in f.Attributes ' could be Properties not Attributes Debug.Print a.Name, a.Value Next Next Next TIA, Arthur P.S. For years and years and years, I have used Rick Fisher's FindAndReplace, but now it's failing on me due to (I think) the fact that I'm running a 64-bit Windows, which doesn't like what he offers to install. In my retirement mode, I cannot afford to purchase more software. Maybe I could run a Windows 32-bit version of everything, then run F&R, then do what I need to do, then import the results back into 64-bit. Yuck. From jwcolby at colbyconsulting.com Sat Jul 2 12:29:27 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Sat, 02 Jul 2011 13:29:27 -0400 Subject: [AccessD] SQL Server - SSD / Rotating media - Side by side test results Message-ID: <4E0F5577.9060206@colbyconsulting.com> This morning I set out to do a little bit of real world testing to see what my SSD investment buys me. The following are some results. BTW if a SQL Server guru wants to actually gain remote access and run tests on my system I would welcome that. I am obviously not very talented as a SQL Server DBA and so a real DBA who has an interest is welcomed to tune and test. Anyway, I have a pair of databases that I will be testing with. One is my infamous "database from hell" called HSID, containing 51 million records with about 600 fields. The other is my HSIDAllAdults containing about 65 million Name and address fields. HSIDAllAdults is child to HSID, IOW it has a foreign key which contains the PK of HSID. Both databases have a clustered index on their autonumber PK. So... I have both of these databases on a four SSD RAID 0. I backed them up last night and restored them to the same name + _Rotatingmedia on my RAID6 volumes. So I have identical databases on a 4 SSD Raid 0 and a 6 disk RAID 6. I am now doing some comparative A/B runs of rather standard queries - similar to things I do routinely. I backed up the two databases last night just before upgrading the server. I restored both tha HSID and HSIDAllAdults this AM to the same rotating media location I normally hold the databases. I did not defrag the rotating media before doing the restore. I include the counts so that we can be assured that the actual data is identical between the SSD and rotating media DBs. HSIDAllAdults - has a pair of cover indexes each of which includes Address valid DBCC DROPCLEANBUFFERS SELECT AddrValid, COUNT(PK) AS Cnt FROM dbo.tblAllAdultNameAddr GROUP BY AddrValid SSD: 12 seconds ANK 635917 E 2918652 INV 936058 MOV 112093 PO 3780131 V 59074768 Rotating: 52 seconds ANK 635917 E 2918652 INV 936058 MOV 112093 PO 3780131 V 59074768 DBCC DROPCLEANBUFFERS SELECT COUNT(_DataHSID.dbo.tblHSID.PKID) AS Cnt, dbo.tblAllAdultNameAddr.AddrValid FROM dbo.tblAllAdultNameAddr INNER JOIN _DataHSID.dbo.tblHSID ON dbo.tblAllAdultNameAddr.PKHSID = _DataHSID.dbo.tblHSID.PKID GROUP BY dbo.tblAllAdultNameAddr.AddrValid SSD: 35 seconds 635917 ANK 2918652 E 936058 INV 112093 MOV 3780131 PO 59074768 V DBCC DROPCLEANBUFFERS SELECT COUNT(_DataHSID_RotatingMedia.dbo.tblHSID.PKID) AS Cnt, dbo.tblAllAdultNameAddr.AddrValid FROM _DataHSID_RotatingMedia.dbo.tblHSID INNER JOIN dbo.tblAllAdultNameAddr ON _DataHSID_RotatingMedia.dbo.tblHSID.PKID = dbo.tblAllAdultNameAddr.PKHSID GROUP BY dbo.tblAllAdultNameAddr.AddrValid Rotating: 1:00 635917 ANK 2918652 E 936058 INV 112093 MOV 3780131 PO 59074768 V The following appears to be a table scan which would be a "worst case". I just picked a field from HSID which we use occasionally. DBCC DROPCLEANBUFFERS SELECT COUNT(PKID) AS Cnt, Household_Occupation_code FROM dbo.tblHSID GROUP BY Household_Occupation_code Rotating: 7:06 35481479 NULL 7143021 10 11480 11 9780 12 37452 13 115093 20 2266292 21 501715 22 23724 23 1039660 30 1325728 40 1183311 50 8271 51 70318 52 2566 60 33157 61 28595 62 15305 70 511464 80 739340 90 609317 91 Rotating media: 1:05 35481479 NULL 7143021 10 11480 11 9780 12 37452 13 115093 20 2266292 21 501715 22 23724 23 1039660 30 1325728 40 1183311 50 8271 51 70318 52 2566 60 33157 61 28595 62 15305 70 511464 80 739340 90 609317 91 DBCC DROPCLEANBUFFERS SELECT COUNT(PKID) AS Cnt, Narrow_Income_Band FROM dbo.tblHSID GROUP BY Narrow_Income_Band SSD: 8 seconds 13824508 NULL 3762511 1 1675853 2 1015899 3 2307736 4 1031640 5 2595759 6 1069374 7 2662509 8 1100049 9 1055216 A 1026910 B 4285629 C 941494 D 862906 E 831573 F 2443917 G 738328 H 676959 I 478582 J 423856 K 1168819 L 371413 M 333796 N 249064 O 204771 P 708189 Q 193265 R 189413 S 2927130 T Rotating media: 10 seconds 13824508 NULL 3762511 1 1675853 2 1015899 3 2307736 4 1031640 5 2595759 6 1069374 7 2662509 8 1100049 9 1055216 A 1026910 B 4285629 C 941494 D 862906 E 831573 F 2443917 G 738328 H 676959 I 478582 J 423856 K 1168819 L 371413 M 333796 N 249064 O 204771 P 708189 Q 193265 R 189413 S 2927130 T I am going to stop for now. I have the rotating media copies and will leave them in place for awhile. If any real DBA wants to do some testing let me know. Obviously I have to know you. :) -- John W. Colby www.ColbyConsulting.com From jwcolby at colbyconsulting.com Sat Jul 2 13:36:42 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Sat, 02 Jul 2011 14:36:42 -0400 Subject: [AccessD] [dba-SQLServer] SQL Server - SSD / Rotating media - Side by side test results In-Reply-To: References: <4E0F5577.9060206@colbyconsulting.com> Message-ID: <4E0F653A.7070503@colbyconsulting.com> Arthur, There are definite cases where the gains are minimal, others where they are significant. The other thing is that I am intentionally clearing the cache before each test. The cache further minimizes the differences as it turns out. That is to be expected of course. This just goes to show the old axiom that throwing memory at SQL Server does a world of good. Without a shadow of a doubt, one thing that SSDs (and faster / better hardware in general) do is minimize the impact of ignorance and sloth. ;) I am not an accomplished DBA, and I simply do not have the time to become one. As a result I am unable to correctly tune my system. By throwing cores, memory and SSDs at the problem I manage to achieve respectable results in spite of myself. Hardware is cheap. My entire server cost somewhere in the neighborhood of $5K. Additionally I have dragged disk and RAID controllers forward through many upgrades. Back around 2005 I spent the then enormous sum of $1600 for three Areca raid controllers which I am still using today. I bought 10 1 TB drives back when they were $150, but I am still using them today. What I upgrade are the motherboards and more frequently the processors. In 2004 I started with single core AMD 3800 processors using Windows2003 X32 and 4 gigs of RAM. I built two systems for $4000! Moving up to dual and then quad cores, and Windows / SQL Server X64 and 8 GB RAM, then 16 gigs of ram. My latest motherboard / processor cost me (my client of course) about $700 (8 cores, with 24 cores possible) and 32 gigs of ram was about $1000. I was looking last night and another 32 GB of RAM (same modules) is now only $600! And... I am using my entire old server (quad core / 16 gigs ram) for a VM server. The point really is that while it is not a trivial amount spent over the years making these upgrades, over that same period I billed a couple of hundred thousand dollars. All these upgrades make me more and more productive, faster and faster getting the results back to the client. The client *loves me* precisely because he gets results back in hours instead of a week as his previous provider gave him. I program custom C# solutions (and bill him for the programming) which have enabled me to do orders literally in hours which (back in 2006) took me a full day or even two to get out. Counts which took an hour in 2004 now take my custom program 2 minutes. *AND* I have developed a system which allows him to send emails with zip lists as attachments. A program running on my server strips off the CSV attachment, generate counts, build a count spreadsheet, attach it to an email and send it back to him literally within 5 minutes of him pressing send *without* my doing anything. Again those counts used to take me an hour back when I did everything by hand. Now I log that a count came in and put a small charge in my billing database! The lesson for me is that my time is worth much more than the cost of the electronics and my response time is what makes me valuable to the client. I fully understand than everyone cannot solve all their problems by throwing hardware / custom software at it, but for a sole proprietor it just might be the only way! I don't have the time to be good at all the hats I wear! And so I do things like spend a thousand on SSDs on an educated guess that they will make a significant difference for an uneducated sloth. :) And finally, because the client loves me, he is sending me a *ton* more work! MORE CORES! MORE MEMORY! More SSDs! :):):) John W. Colby www.ColbyConsulting.com On 7/2/2011 1:48 PM, Arthur Fuller wrote: > I would be happy to assist. Judging by your IMO rather narrow result-gap (measured in a few > seconds), my initial guess would be that the SSHDs are not gaining you much over your investment in > CPU and RAM. However, that remains to be determined. Could be that table-scans or some other factor > are causing this lag. Should be that SSHD retrieves ought to be an order of magnitude quicker, but > according to your posted measurements they lag significantly behind that thumbnail benchmark. > > And besides all that, how are you? What's new with you and your family? > > A. From vbacreations at gmail.com Sat Jul 2 13:47:40 2011 From: vbacreations at gmail.com (William Benson (VBACreations.Com)) Date: Sat, 2 Jul 2011 14:47:40 -0400 Subject: [AccessD] Pulling Data from Excel into Access with "Automation" In-Reply-To: <003b01cc38c7$89934840$9cb9d8c0$@net> References: <201107010022.p610MKvQ022864@databaseadvisors.com>, <4E0E42D5.32026.D4817AA@stuart.lexacorp.com.pg> <002001cc385c$5de1fd60$19a5f820$@gmail.com> <003b01cc38c7$89934840$9cb9d8c0$@net> Message-ID: <003701cc38e8$85c57460$91505d20$@gmail.com> Hi Mark, I am having some doubts I will be able to refer to .ListIndex at all directly in the sql. As to your suggestion of reversing the arguments, I don't think that is correct. The way to refer to the nth item in the 1st column of a listbox is: lst1.column(0,n). Thus to get the value in the 1st column on the row identified with the listindex is lst1.column(0, lst1.listindex) I guess at heart, my only open question is why LstFields.VALUE does not change when I change the index of the Selected property from, say, 0 to 1. For i = 0 To lstFields.ListCount - 1 lstFields.Selected(i) = True debug.print lstFields 'seems to remain the same throughout loop. Next -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Mark Simms Sent: Saturday, July 02, 2011 10:52 AM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Pulling Data from Excel into Access with "Automation" Just reverse the Column property arguments: lst1.ListIndex should be first. From vbacreations at gmail.com Sat Jul 2 14:53:26 2011 From: vbacreations at gmail.com (William Benson (VBACreations.Com)) Date: Sat, 2 Jul 2011 15:53:26 -0400 Subject: [AccessD] How to tell a button's "air space" is no longer being hovered over Message-ID: <003b01cc38f1$b62edca0$228c95e0$@gmail.com> I have some code which changes the caption of a button when the user has the ctrl key pressed, set during the mousemove event for the button. I want however, that when the user leaves the "air space" for the button, then the caption reverts - regardless whether they still have shift held. I know I can use use the mousemove event associated with all surrounding controls to reset it, but I would like something more related to the control itself. Is there a method of testing that the user has moved the mouse outside the button's air space? I have a feeling I am going to be out of luck... From jwcolby at colbyconsulting.com Sat Jul 2 19:16:52 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Sat, 02 Jul 2011 20:16:52 -0400 Subject: [AccessD] Need a new printer? Cheap? In-Reply-To: <4AC76807705E4A688411F71D46A6C3FE@HAL9007> References: <4AC76807705E4A688411F71D46A6C3FE@HAL9007> Message-ID: <4E0FB4F4.1000003@colbyconsulting.com> http://www.4inkjets.com/Canon-PIXMA-MP250-printer-ink-cartridges-toner John W. Colby www.ColbyConsulting.com On 7/2/2011 10:43 AM, Rocky Smolin wrote: > http://www.walmart.com/ip/Canon-PIXMA-MP250-Photo-All-In-One-Inkjet-Printer- > Copier-Scanner-Value-Bundle/12534987?sourceid=06345287580503509743 From fuller.artful at gmail.com Sun Jul 3 03:29:14 2011 From: fuller.artful at gmail.com (Arthur Fuller) Date: Sun, 3 Jul 2011 04:29:14 -0400 Subject: [AccessD] Pulling Data from Excel into Access with "Automation" In-Reply-To: <003701cc38e8$85c57460$91505d20$@gmail.com> References: <201107010022.p610MKvQ022864@databaseadvisors.com> <4E0E42D5.32026.D4817AA@stuart.lexacorp.com.pg> <002001cc385c$5de1fd60$19a5f820$@gmail.com> <003b01cc38c7$89934840$9cb9d8c0$@net> <003701cc38e8$85c57460$91505d20$@gmail.com> Message-ID: That I think is because the value remains the content of column(o) despite what is selected. And that IMO is how it should respond, i.e. what is selected should not change the value. A. On Sat, Jul 2, 2011 at 2:47 PM, William Benson (VBACreations.Com) < vbacreations at gmail.com> wrote: > Hi Mark, > > I am having some doubts I will be able to refer to .ListIndex at all > directly in the sql. > > As to your suggestion of reversing the arguments, I don't think that is > correct. The way to refer to the nth item in the 1st column of a listbox > is: > lst1.column(0,n). Thus to get the value in the 1st column on the row > identified with the listindex is lst1.column(0, lst1.listindex) > > I guess at heart, my only open question is why LstFields.VALUE does not > change when I change the index of the Selected property from, say, 0 to 1. > > For i = 0 To lstFields.ListCount - 1 > lstFields.Selected(i) = True > debug.print lstFields 'seems to remain the same throughout loop. > Next > > From marksimms at verizon.net Sun Jul 3 10:03:53 2011 From: marksimms at verizon.net (Mark Simms) Date: Sun, 03 Jul 2011 11:03:53 -0400 Subject: [AccessD] Pulling Data from Excel into Access with "Automation" In-Reply-To: <003701cc38e8$85c57460$91505d20$@gmail.com> References: <201107010022.p610MKvQ022864@databaseadvisors.com>, <4E0E42D5.32026.D4817AA@stuart.lexacorp.com.pg> <002001cc385c$5de1fd60$19a5f820$@gmail.com> <003b01cc38c7$89934840$9cb9d8c0$@net> <003701cc38e8$85c57460$91505d20$@gmail.com> Message-ID: <003901cc3992$6d494ab0$47dbe010$@net> My bad....but below is referencing the array, not a specific item. debug.print lstFields 'seems to remain the same throughout try debug.print lstFields(0,i) if there are multiple columns(0=col#1) otherwise debug.print lstFields(i) should do the trick From marksimms at verizon.net Sun Jul 3 10:07:27 2011 From: marksimms at verizon.net (Mark Simms) Date: Sun, 03 Jul 2011 11:07:27 -0400 Subject: [AccessD] How to tell a button's "air space" is no longer being hovered over In-Reply-To: <003b01cc38f1$b62edca0$228c95e0$@gmail.com> References: <003b01cc38f1$b62edca0$228c95e0$@gmail.com> Message-ID: <003a01cc3992$ecac3920$c604ab60$@net> John Walk provided some code in his Excel book for doing this. http://spreadsheetpage.com/ It was very clever as I recall. From vbacreations at gmail.com Sun Jul 3 11:17:52 2011 From: vbacreations at gmail.com (William Benson (VBACreations.Com)) Date: Sun, 3 Jul 2011 12:17:52 -0400 Subject: [AccessD] How to tell a button's "air space" is no longer being hovered over In-Reply-To: <003a01cc3992$ecac3920$c604ab60$@net> References: <003b01cc38f1$b62edca0$228c95e0$@gmail.com> <003a01cc3992$ecac3920$c604ab60$@net> Message-ID: <000301cc399c$c32decb0$4989c610$@gmail.com> Hi Mark, I could not find it :-( Thanks. -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Mark Simms Sent: Sunday, July 03, 2011 11:07 AM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] How to tell a button's "air space" is no longer being hovered over John Walk provided some code in his Excel book for doing this. http://spreadsheetpage.com/ It was very clever as I recall. -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From jwcolby at colbyconsulting.com Sun Jul 3 11:56:54 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Sun, 03 Jul 2011 12:56:54 -0400 Subject: [AccessD] SSD, The Game Changer - SQL Man of Mystery - SQLServerCentral.com Message-ID: <4E109F56.809@colbyconsulting.com> -- John W. Colby www.ColbyConsulting.com http://www.sqlservercentral.com/blogs/sqlmanofmystery/archive/2009/04/14/ssd-the-game-changer.aspx From accessd at shaw.ca Sun Jul 3 14:13:03 2011 From: accessd at shaw.ca (Jim Lawrence) Date: Sun, 3 Jul 2011 12:13:03 -0700 Subject: [AccessD] SSD, The Game Changer - SQL Man of Mystery - SQLServerCentral.com In-Reply-To: <4E109F56.809@colbyconsulting.com> References: <4E109F56.809@colbyconsulting.com> Message-ID: <50EC560B45284179B622DA83C34395C8@creativesystemdesigns.com> Hi John: As your databases do not need do manage transaction queues or locks here is an example of just one of the NoSQL database MongoDB vs. SQL Server 2008 performance showdown comparison. http://tinyurl.com/38cofzg In the article it shows speeds over 100 times as fast when managing a fairly large amount of data but the performance just goes up exponentially when presented with even larger data sets. (1000x and more...) The Cassandra (NoSQL) database (http://cassandra.apache.org/) might be one of the best choices in this genre as it has the support of the big players like FaceBook, IBM, Apache etc... There is also an ever expanding group of experts and help forums (http://cassandra-user-incubator-apache-org.3065146.n2.nabble.com/) on this subject. To add to the functionality there is the new super scaling and searching tools called HPCC (http://gigaom.com/cloud/lexisnexis-open-sources-its-hadoop-killer/) which uses a combination of SQL and NoSQL when searching distributive data and clusters of data servers. In your future plans it might well be worth considering such an option especially as your data requirements and expected results continues to grow. Jim -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Sunday, July 03, 2011 9:57 AM To: Access Developers discussion and problem solving; VBA; Sqlserver-Dba Subject: [AccessD] SSD, The Game Changer - SQL Man of Mystery - SQLServerCentral.com -- John W. Colby www.ColbyConsulting.com http://www.sqlservercentral.com/blogs/sqlmanofmystery/archive/2009/04/14/ssd -the-game-changer.aspx -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From vbacreations at gmail.com Sun Jul 3 16:23:33 2011 From: vbacreations at gmail.com (William Benson (VBACreations.Com)) Date: Sun, 3 Jul 2011 17:23:33 -0400 Subject: [AccessD] Delete query... fast ... deleting from datasheet view ... slow Message-ID: <000901cc39c7$77461ae0$65d250a0$@gmail.com> Why is a query that deletes all records from a table so fast in comparison with a manual delete operation on a table that is opened in datasheet view? From jwcolby at colbyconsulting.com Sun Jul 3 16:41:18 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Sun, 03 Jul 2011 17:41:18 -0400 Subject: [AccessD] SSD, The Game Changer - SQL Man of Mystery - SQLServerCentral.com In-Reply-To: <50EC560B45284179B622DA83C34395C8@creativesystemdesigns.com> References: <4E109F56.809@colbyconsulting.com> <50EC560B45284179B622DA83C34395C8@creativesystemdesigns.com> Message-ID: <4E10E1FE.2010805@colbyconsulting.com> Jim, I read the first article and I don't see how it fits at all. 1) My data is very much a normal table, with rows and columns. In one case (the people table) there is a small number of columns, and most of the columns are fully populated. In the second table, there are pushing 700 fields and the columns are rarely fully populated. 2) The data is relational, though just barely. One of my people tables is directly related to the data table. All of my people tables may have people in the other tables. Eventually I will be pulling all of my people into a single table with pointers back to the non people data in the original table. 3) I rarely update the data. The people table is updated once per month as I validate the addresses looking for moves. I get about 1.5% / month moves. The data table is never updated, at least the data in the existing columns. Very occasionally I add new columns. 4) I only have a single user (myself) and I never expect to have more. In comparison, the NoSQL databases claim to store documents and make them searchable. Blog posts, web pages etc. They claim to be good as the numbers of people simultaneously *writing* to them climbs into the hundreds or thousands. So while the technology is fascinating, it hardly seems like a fit for my application. John W. Colby www.ColbyConsulting.com On 7/3/2011 3:13 PM, Jim Lawrence wrote: > Hi John: > > As your databases do not need do manage transaction queues or locks here is > an example of just one of the NoSQL database MongoDB vs. SQL Server 2008 > performance showdown comparison. > > http://tinyurl.com/38cofzg > > In the article it shows speeds over 100 times as fast when managing a fairly > large amount of data but the performance just goes up exponentially when > presented with even larger data sets. (1000x and more...) > > The Cassandra (NoSQL) database (http://cassandra.apache.org/) might be one > of the best choices in this genre as it has the support of the big players > like FaceBook, IBM, Apache etc... > > There is also an ever expanding group of experts and help forums > (http://cassandra-user-incubator-apache-org.3065146.n2.nabble.com/) on this > subject. > > To add to the functionality there is the new super scaling and searching > tools called HPCC > (http://gigaom.com/cloud/lexisnexis-open-sources-its-hadoop-killer/) which > uses a combination of SQL and NoSQL when searching distributive data and > clusters of data servers. > > In your future plans it might well be worth considering such an option > especially as your data requirements and expected results continues to grow. > > > Jim > > > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby > Sent: Sunday, July 03, 2011 9:57 AM > To: Access Developers discussion and problem solving; VBA; Sqlserver-Dba > Subject: [AccessD] SSD, The Game Changer - SQL Man of Mystery - > SQLServerCentral.com > > From stuart at lexacorp.com.pg Sun Jul 3 16:56:19 2011 From: stuart at lexacorp.com.pg (Stuart McLachlan) Date: Mon, 04 Jul 2011 07:56:19 +1000 Subject: [AccessD] Delete query... fast ... deleting from datasheet view ... slow In-Reply-To: <000901cc39c7$77461ae0$65d250a0$@gmail.com> References: <000901cc39c7$77461ae0$65d250a0$@gmail.com> Message-ID: <4E10E583.18446.179396DD@stuart.lexacorp.com.pg> A SWAG: Because Access can't tell that all the records are selected. It has to step through the rows and checking the "selected" attribute. That means that it can't implement a simple "Delete * >From tblA" but has to specify each of the records separately for deletion. -- Stuart On 3 Jul 2011 at 17:23, William Benson (VBACreations. wrote: > Why is a query that deletes all records from a table so fast in > comparison with a manual delete operation on a table that is opened in > datasheet view? > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > From accessd at shaw.ca Sun Jul 3 22:10:49 2011 From: accessd at shaw.ca (Jim Lawrence) Date: Sun, 3 Jul 2011 20:10:49 -0700 Subject: [AccessD] SSD, The Game Changer - SQL Man of Mystery - SQLServerCentral.com In-Reply-To: <4E10E1FE.2010805@colbyconsulting.com> References: <4E109F56.809@colbyconsulting.com> <50EC560B45284179B622DA83C34395C8@creativesystemdesigns.com> <4E10E1FE.2010805@colbyconsulting.com> Message-ID: Inline: -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Sunday, July 03, 2011 2:41 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] SSD, The Game Changer - SQL Man of Mystery - SQLServerCentral.com Jim, I read the first article and I don't see how it fits at all. * It fits very well. First in overview this database does not require a single PC to run the database. It is distributive in nature so you can just add nodes to a bunch of old new and old PCs. The main problem with the database as you have it now is that it is dependant on the hardware of a single box. Just like in 2006 the single CPU reached it maximum and multi-core processors were then created. Cassandra runs like a multi-core PC. When the database is running on numerous PCs it is like running a full RAID. 1) My data is very much a normal table, with rows and columns. In one case (the people table) there are a small number of columns, and most of the columns are fully populated. In the second table, there are pushing 700 fields and the columns are rarely fully populated. * Cassandra, for example, has a sparse data structure. This means columns can be over 2 billion (rows as well) wide (high), if required and the 'fields' do not have to be populated. At any time you can just insert another 'field' and there is no rebuild required or performance loss (It can all be done in real time). You can have your cake and eat it too. 2) The data is relational, though just barely. One of my people tables is directly related to the data table. All of my people tables may have people in the other tables. Eventually I will be pulling all of my people into a single table with pointers back to the non people data in the original able. * When you say barely relational that is what Cassandra is designed for. What you are describing in item 2 is exactly what type of database Cassandra is. It may not use SQL as we traditionally know it but it uses a system called 'map-reduce' which can quickly (very quickly) obtain the same results...it is data-mining tool on steroids. 3) I rarely update the data. The people table is updated once per month as I validate the addresses looking for moves. I get about 1.5% / month moves. The data table is never updated, at least the data in the existing columns. Very occasionally I add new columns. * Again, your requirements and description is matching Cassandra's design nature to a tee. 4) I only have a single user (myself) and I never expect to have more. * That does not matter if you are the only user. What does matter is that you can pull any data out of a huge mass of mix data fast and easy. You have noticed how Google can pull 365,000,000 hits in somewhere around 0.03 seconds. It is not because they have huge vertical super-powerful computers...their computer are but beaters in comparison but their database is spans hundreds of computers...just like Cassandra is capable of. In comparison, the NoSQL databases claim to store documents and make them searchable. Blog posts, web pages etc. They claim to be good as the numbers of people simultaneously *writing* to them climbs into the hundreds or thousands. So while the technology is fascinating, it hardly seems like a fit for my application. * You are right in all the above but with the exception that the Cassandra is a near perfect fit. To that end I will be starting my own Cassandra database system and just to see how it plays out. Here is a little video to watch that will do a lot to explain what and how Cassandra does things: http://video.disruptivecode.com/video/840645/what-makes-cassandra-trick. I think you will be pleasantly surprised. The product runs on any OS as all that it is needs is a copy of Java and Apache, which is free, downloads. http://www.quora.com/How-can-i-install-Apache-Cassandra-on-Windows-Operating -System John W. Colby www.ColbyConsulting.com On 7/3/2011 3:13 PM, Jim Lawrence wrote: > Hi John: > > As your databases do not need do manage transaction queues or locks here is > an example of just one of the NoSQL database MongoDB vs. SQL Server 2008 > performance showdown comparison. > > http://tinyurl.com/38cofzg > > In the article it shows speeds over 100 times as fast when managing a fairly > large amount of data but the performance just goes up exponentially when > presented with even larger data sets. (1000x and more...) > > The Cassandra (NoSQL) database (http://cassandra.apache.org/) might be one > of the best choices in this genre as it has the support of the big players > like FaceBook, IBM, Apache etc... > > There is also an ever expanding group of experts and help forums > (http://cassandra-user-incubator-apache-org.3065146.n2.nabble.com/) on this > subject. > > To add to the functionality there is the new super scaling and searching > tools called HPCC > (http://gigaom.com/cloud/lexisnexis-open-sources-its-hadoop-killer/) which > uses a combination of SQL and NoSQL when searching distributive data and > clusters of data servers. > > In your future plans it might well be worth considering such an option > especially as your data requirements and expected results continues to grow. > > > Jim From accessd at shaw.ca Sun Jul 3 22:47:18 2011 From: accessd at shaw.ca (Jim Lawrence) Date: Sun, 3 Jul 2011 20:47:18 -0700 Subject: [AccessD] SSD, The Game Changer - SQL Man of Mystery - SQLServerCentral.com In-Reply-To: References: <4E109F56.809@colbyconsulting.com> <50EC560B45284179B622DA83C34395C8@creativesystemdesigns.com> <4E10E1FE.2010805@colbyconsulting.com> Message-ID: <649B92906805469C8BEA4A9C9D96521A@creativesystemdesigns.com> PS: Another site showing how to install Cassandra on a Windows PC, in 10 minutes is: http://www.javageneration.com/?p=19 Jim -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Jim Lawrence Sent: Sunday, July 03, 2011 8:11 PM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] SSD, The Game Changer - SQL Man of Mystery - SQLServerCentral.com Inline: -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Sunday, July 03, 2011 2:41 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] SSD, The Game Changer - SQL Man of Mystery - SQLServerCentral.com Jim, I read the first article and I don't see how it fits at all. * It fits very well. First in overview this database does not require a single PC to run the database. It is distributive in nature so you can just add nodes to a bunch of old new and old PCs. The main problem with the database as you have it now is that it is dependant on the hardware of a single box. Just like in 2006 the single CPU reached it maximum and multi-core processors were then created. Cassandra runs like a multi-core PC. When the database is running on numerous PCs it is like running a full RAID. 1) My data is very much a normal table, with rows and columns. In one case (the people table) there are a small number of columns, and most of the columns are fully populated. In the second table, there are pushing 700 fields and the columns are rarely fully populated. * Cassandra, for example, has a sparse data structure. This means columns can be over 2 billion (rows as well) wide (high), if required and the 'fields' do not have to be populated. At any time you can just insert another 'field' and there is no rebuild required or performance loss (It can all be done in real time). You can have your cake and eat it too. 2) The data is relational, though just barely. One of my people tables is directly related to the data table. All of my people tables may have people in the other tables. Eventually I will be pulling all of my people into a single table with pointers back to the non people data in the original able. * When you say barely relational that is what Cassandra is designed for. What you are describing in item 2 is exactly what type of database Cassandra is. It may not use SQL as we traditionally know it but it uses a system called 'map-reduce' which can quickly (very quickly) obtain the same results...it is data-mining tool on steroids. 3) I rarely update the data. The people table is updated once per month as I validate the addresses looking for moves. I get about 1.5% / month moves. The data table is never updated, at least the data in the existing columns. Very occasionally I add new columns. * Again, your requirements and description is matching Cassandra's design nature to a tee. 4) I only have a single user (myself) and I never expect to have more. * That does not matter if you are the only user. What does matter is that you can pull any data out of a huge mass of mix data fast and easy. You have noticed how Google can pull 365,000,000 hits in somewhere around 0.03 seconds. It is not because they have huge vertical super-powerful computers...their computer are but beaters in comparison but their database is spans hundreds of computers...just like Cassandra is capable of. In comparison, the NoSQL databases claim to store documents and make them searchable. Blog posts, web pages etc. They claim to be good as the numbers of people simultaneously *writing* to them climbs into the hundreds or thousands. So while the technology is fascinating, it hardly seems like a fit for my application. * You are right in all the above but with the exception that the Cassandra is a near perfect fit. To that end I will be starting my own Cassandra database system and just to see how it plays out. Here is a little video to watch that will do a lot to explain what and how Cassandra does things: http://video.disruptivecode.com/video/840645/what-makes-cassandra-trick. I think you will be pleasantly surprised. The product runs on any OS as all that it is needs is a copy of Java and Apache, which is free, downloads. http://www.quora.com/How-can-i-install-Apache-Cassandra-on-Windows-Operating -System John W. Colby www.ColbyConsulting.com On 7/3/2011 3:13 PM, Jim Lawrence wrote: > Hi John: > > As your databases do not need do manage transaction queues or locks here is > an example of just one of the NoSQL database MongoDB vs. SQL Server 2008 > performance showdown comparison. > > http://tinyurl.com/38cofzg > > In the article it shows speeds over 100 times as fast when managing a fairly > large amount of data but the performance just goes up exponentially when > presented with even larger data sets. (1000x and more...) > > The Cassandra (NoSQL) database (http://cassandra.apache.org/) might be one > of the best choices in this genre as it has the support of the big players > like FaceBook, IBM, Apache etc... > > There is also an ever expanding group of experts and help forums > (http://cassandra-user-incubator-apache-org.3065146.n2.nabble.com/) on this > subject. > > To add to the functionality there is the new super scaling and searching > tools called HPCC > (http://gigaom.com/cloud/lexisnexis-open-sources-its-hadoop-killer/) which > uses a combination of SQL and NoSQL when searching distributive data and > clusters of data servers. > > In your future plans it might well be worth considering such an option > especially as your data requirements and expected results continues to grow. > > > Jim -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From charlotte.foust at gmail.com Sun Jul 3 23:59:39 2011 From: charlotte.foust at gmail.com (Charlotte Foust) Date: Sun, 3 Jul 2011 21:59:39 -0700 Subject: [AccessD] How to tell a button's "air space" is no longer being hovered over In-Reply-To: <003b01cc38f1$b62edca0$228c95e0$@gmail.com> References: <003b01cc38f1$b62edca0$228c95e0$@gmail.com> Message-ID: Darn, I've done this but I don't recall how, since it was back in Access 2.0 or maybe 97. One way to do it would be to put a shape or even a textbox under the button and just slightly larger than the button. Then you use the mousemove of the underlying control to switch the caption back. Charlotte Foust On Sat, Jul 2, 2011 at 12:53 PM, William Benson (VBACreations.Com) < vbacreations at gmail.com> wrote: > I have some code which changes the caption of a button when the user has > the > ctrl key pressed, set during the mousemove event for the button. > > I want however, that when the user leaves the "air space" for the button, > then the caption reverts - regardless whether they still have shift held. > > I know I can use use the mousemove event associated with all surrounding > controls to reset it, but I would like something more related to the > control > itself. > > Is there a method of testing that the user has moved the mouse outside the > button's air space? > > I have a feeling I am going to be out of luck... > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > > > Website: http://www.databaseadvisors.com > > > From vbacreations at gmail.com Mon Jul 4 01:15:40 2011 From: vbacreations at gmail.com (William Benson (VBACreations.Com)) Date: Mon, 4 Jul 2011 02:15:40 -0400 Subject: [AccessD] How to tell a button's "air space" is no longer being hovered over In-Reply-To: References: <003b01cc38f1$b62edca0$228c95e0$@gmail.com> Message-ID: <002101cc3a11$cd51ffe0$67f5ffa0$@gmail.com> That is not a bad idea at all Charlotte, I think I will do that! -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Charlotte Foust Sent: Monday, July 04, 2011 1:00 AM To: Access Developers discussion and problem solving Subject: Re: [AccessD] How to tell a button's "air space" is no longer being hovered over Darn, I've done this but I don't recall how, since it was back in Access 2.0 or maybe 97. One way to do it would be to put a shape or even a textbox under the button and just slightly larger than the button. Then you use the mousemove of the underlying control to switch the caption back. Charlotte Foust On Sat, Jul 2, 2011 at 12:53 PM, William Benson (VBACreations.Com) < vbacreations at gmail.com> wrote: > I have some code which changes the caption of a button when the user > has the ctrl key pressed, set during the mousemove event for the > button. > > I want however, that when the user leaves the "air space" for the > button, then the caption reverts - regardless whether they still have shift held. > > I know I can use use the mousemove event associated with all > surrounding controls to reset it, but I would like something more > related to the control itself. > > Is there a method of testing that the user has moved the mouse outside > the button's air space? > > I have a feeling I am going to be out of luck... > > > -- > 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 Mon Jul 4 03:11:35 2011 From: Gustav at cactus.dk (Gustav Brock) Date: Mon, 04 Jul 2011 10:11:35 +0200 Subject: [AccessD] Delete query... fast ... deleting from datasheet view ... slow Message-ID: Hi William and Stuart I don't think that's the reason, but it is similar: Access walks through the recordset (which may be filtered) and copies all records to a temp table to hold them in case you - when asked later via the GUI - choose to undo the operation. Only if you choose to confirm the deleting of the records, this actually takes place. /gustav >>> stuart at lexacorp.com.pg 03-07-2011 23:56 >>> A SWAG: Because Access can't tell that all the records are selected. It has to step through the rows and checking the "selected" attribute. That means that it can't implement a simple "Delete * >From tblA" but has to specify each of the records separately for deletion. -- Stuart On 3 Jul 2011 at 17:23, William Benson (VBACreations. wrote: > Why is a query that deletes all records from a table so fast in > comparison with a manual delete operation on a table that is opened in > datasheet view? From stuart at lexacorp.com.pg Mon Jul 4 04:19:36 2011 From: stuart at lexacorp.com.pg (Stuart McLachlan) Date: Mon, 04 Jul 2011 19:19:36 +1000 Subject: [AccessD] Delete query... fast ... deleting from datasheet view ... slow In-Reply-To: References: Message-ID: <4E1185A8.15835.1A05291B@stuart.lexacorp.com.pg> Good point, I didn't think of the confirmation of multiple deletes requiring a temp table. On 4 Jul 2011 at 10:11, Gustav Brock wrote: > Hi William and Stuart > > I don't think that's the reason, but it is similar: Access walks > through the recordset (which may be filtered) and copies all records > to a temp table to hold them in case you - when asked later via the > GUI - choose to undo the operation. Only if you choose to confirm the > deleting of the records, this actually takes place. > > /gustav > > > >>> stuart at lexacorp.com.pg 03-07-2011 23:56 >>> > A SWAG: > Because Access can't tell that all the records are selected. It has to > step through the rows and checking the "selected" attribute. That > means that it can't implement a simple "Delete * From tblA" but has > to specify each of the records separately for deletion. > > -- > Stuart > > On 3 Jul 2011 at 17:23, William Benson (VBACreations. wrote: > > > Why is a query that deletes all records from a table so fast in > > comparison with a manual delete operation on a table that is opened > > in datasheet view? > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > From Gustav at cactus.dk Mon Jul 4 04:50:15 2011 From: Gustav at cactus.dk (Gustav Brock) Date: Mon, 04 Jul 2011 11:50:15 +0200 Subject: [AccessD] SSD, The Game Changer - SQL Man of Mystery - SQLServerCentral.com Message-ID: Hi Jim But Casandra doesn't seem to be much .Net/C# friendly. Clients exist only for the old version 0.7, and both of these seem to provide nothing that come close to DataTableAdapters or the like (not to mention LINQ), only simple command-type access: http://aquiles.codeplex.com/ On the other hand, MongoDB seems to have proceeded further with NoRM: http://iridescence.no/post/NoSQL-Getting-started-with-MongoDB-and-NoRM.aspx /gustav >>> accessd at shaw.ca 04-07-2011 05:10 >>> Inline: -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Sunday, July 03, 2011 2:41 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] SSD, The Game Changer - SQL Man of Mystery - SQLServerCentral.com Jim, I read the first article and I don't see how it fits at all. * It fits very well. First in overview this database does not require a single PC to run the database. It is distributive in nature so you can just add nodes to a bunch of old new and old PCs. The main problem with the database as you have it now is that it is dependant on the hardware of a single box. Just like in 2006 the single CPU reached it maximum and multi-core processors were then created. Cassandra runs like a multi-core PC. When the database is running on numerous PCs it is like running a full RAID. 1) My data is very much a normal table, with rows and columns. In one case (the people table) there are a small number of columns, and most of the columns are fully populated. In the second table, there are pushing 700 fields and the columns are rarely fully populated. * Cassandra, for example, has a sparse data structure. This means columns can be over 2 billion (rows as well) wide (high), if required and the 'fields' do not have to be populated. At any time you can just insert another 'field' and there is no rebuild required or performance loss (It can all be done in real time). You can have your cake and eat it too. 2) The data is relational, though just barely. One of my people tables is directly related to the data table. All of my people tables may have people in the other tables. Eventually I will be pulling all of my people into a single table with pointers back to the non people data in the original able. * When you say barely relational that is what Cassandra is designed for. What you are describing in item 2 is exactly what type of database Cassandra is. It may not use SQL as we traditionally know it but it uses a system called 'map-reduce' which can quickly (very quickly) obtain the same results...it is data-mining tool on steroids. 3) I rarely update the data. The people table is updated once per month as I validate the addresses looking for moves. I get about 1.5% / month moves. The data table is never updated, at least the data in the existing columns. Very occasionally I add new columns. * Again, your requirements and description is matching Cassandra's design nature to a tee. 4) I only have a single user (myself) and I never expect to have more. * That does not matter if you are the only user. What does matter is that you can pull any data out of a huge mass of mix data fast and easy. You have noticed how Google can pull 365,000,000 hits in somewhere around 0.03 seconds. It is not because they have huge vertical super-powerful computers...their computer are but beaters in comparison but their database is spans hundreds of computers...just like Cassandra is capable of. In comparison, the NoSQL databases claim to store documents and make them searchable. Blog posts, web pages etc. They claim to be good as the numbers of people simultaneously *writing* to them climbs into the hundreds or thousands. So while the technology is fascinating, it hardly seems like a fit for my application. * You are right in all the above but with the exception that the Cassandra is a near perfect fit. To that end I will be starting my own Cassandra database system and just to see how it plays out. Here is a little video to watch that will do a lot to explain what and how Cassandra does things: http://video.disruptivecode.com/video/840645/what-makes-cassandra-trick.html. I think you will be pleasantly surprised. The product runs on any OS as all that it is needs is a copy of Java and Apache, which is free, downloads. http://www.quora.com/How-can-i-install-Apache-Cassandra-on-Windows-Operating-System John W. Colby www.ColbyConsulting.com On 7/3/2011 3:13 PM, Jim Lawrence wrote: > Hi John: > > As your databases do not need do manage transaction queues or locks here is > an example of just one of the NoSQL database MongoDB vs. SQL Server 2008 > performance showdown comparison. > > http://tinyurl.com/38cofzg > > In the article it shows speeds over 100 times as fast when managing a fairly > large amount of data but the performance just goes up exponentially when > presented with even larger data sets. (1000x and more...) > > The Cassandra (NoSQL) database (http://cassandra.apache.org/) might be one > of the best choices in this genre as it has the support of the big players > like FaceBook, IBM, Apache etc... > > There is also an ever expanding group of experts and help forums > (http://cassandra-user-incubator-apache-org.3065146.n2.nabble.com/) on this > subject. > > To add to the functionality there is the new super scaling and searching > tools called HPCC > (http://gigaom.com/cloud/lexisnexis-open-sources-its-hadoop-killer/) which > uses a combination of SQL and NoSQL when searching distributive data and > clusters of data servers. > > In your future plans it might well be worth considering such an option > especially as your data requirements and expected results continues to grow. > > > Jim From vbacreations at gmail.com Mon Jul 4 04:51:30 2011 From: vbacreations at gmail.com (William Benson) Date: Mon, 4 Jul 2011 05:51:30 -0400 Subject: [AccessD] Delete query... fast ... deleting from datasheet view ... slow In-Reply-To: References: Message-ID: I will check again but I think what got me interested in the question was that ia manual delwte takes longer even taking into account just time AFTER the user confirms ok to continue without Undo. Where does Access store the temp table Gustav? In other words if you open a monstrously large table select all records and do several faux deletes one after another which you confirm but cancel at the "Continue without Undo?" Prompt....does the database bloat I wonder! I will check this when I get back to computer!_ Bill Benson Owner VBACreations, LLC On Jul 4, 2011 4:12 AM, "Gustav Brock" wrote: > Hi William and Stuart > > I don't think that's the reason, but it is similar: Access walks through the recordset (which may be filtered) and copies all records to a temp table to hold them in case you - when asked later via the GUI - choose to undo the operation. Only if you choose to confirm the deleting of the records, this actually takes place. > > /gustav > > >>>> stuart at lexacorp.com.pg 03-07-2011 23:56 >>> > A SWAG: > Because Access can't tell that all the records are selected. It has to step through the rows > and checking the "selected" attribute. That means that it can't implement a simple "Delete * > From tblA" but has to specify each of the records separately for deletion. > > -- > Stuart > > On 3 Jul 2011 at 17:23, William Benson (VBACreations. wrote: > >> Why is a query that deletes all records from a table so fast in >> comparison with a manual delete operation on a table that is opened in >> datasheet view? > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com From stuart at lexacorp.com.pg Mon Jul 4 05:45:20 2011 From: stuart at lexacorp.com.pg (Stuart McLachlan) Date: Mon, 04 Jul 2011 20:45:20 +1000 Subject: [AccessD] Delete query... fast ... deleting from datasheet view ... slow In-Reply-To: References: , Message-ID: <4E1199C0.16390.1A53A76F@stuart.lexacorp.com.pg> I suspect it is only stored in memory. On 4 Jul 2011 at 5:51, William Benson wrote: > > Where does Access store the temp table Gustav? In other words if you > open a monstrously large table select all records and do several faux > deletes one after another which you confirm but cancel at the > "Continue without Undo?" Prompt....does the database bloat I wonder! I > will check this when I get back to computer!_ > From Gustav at cactus.dk Mon Jul 4 06:23:55 2011 From: Gustav at cactus.dk (Gustav Brock) Date: Mon, 04 Jul 2011 13:23:55 +0200 Subject: [AccessD] Delete query... fast ... deleting from datasheet view ... slow Message-ID: Hi William and Stuart Yes in memory, if possible. If not, in some temp db in the temp folder of the current user of Windows. /gustav >>> stuart at lexacorp.com.pg 04-07-2011 12:45 >>> I suspect it is only stored in memory. On 4 Jul 2011 at 5:51, William Benson wrote: > > Where does Access store the temp table Gustav? In other words if you > open a monstrously large table select all records and do several faux > deletes one after another which you confirm but cancel at the > "Continue without Undo?" Prompt....does the database bloat I wonder! I > will check this when I get back to computer!_ From jimdettman at verizon.net Mon Jul 4 08:56:51 2011 From: jimdettman at verizon.net (Jim Dettman) Date: Mon, 04 Jul 2011 09:56:51 -0400 Subject: [AccessD] Delete query... fast ... deleting from datasheet view... slow In-Reply-To: References: Message-ID: Yes, the temp DB's are in the directory specified by TEMP and/or TMP and are prefixed with ~JET Not having TEMP or TMP set correctly can yield a "Disk or network I/O error" message. The UseTransactions property also comes into play as to how JET handles the delete as well as whether you have the DB opened exclusive or not. Also of note, if a remote ODBC DB is involved, you need to be careful with the delete queries. If you use anything in the query that is Access/JET specific (ie. a VBA expression) or a join to a local table, then JET ends up issuing one ODBC call for each row that it wants to delete instead of sending one SQL delete statement to the backend. Jim. -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: Monday, July 04, 2011 07:24 AM To: accessd at databaseadvisors.com Subject: Re: [AccessD] Delete query... fast ... deleting from datasheet view... slow Hi William and Stuart Yes in memory, if possible. If not, in some temp db in the temp folder of the current user of Windows. /gustav >>> stuart at lexacorp.com.pg 04-07-2011 12:45 >>> I suspect it is only stored in memory. On 4 Jul 2011 at 5:51, William Benson wrote: > > Where does Access store the temp table Gustav? In other words if you > open a monstrously large table select all records and do several faux > deletes one after another which you confirm but cancel at the > "Continue without Undo?" Prompt....does the database bloat I wonder! I > will check this when I get back to computer!_ -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From adtp at airtelmail.in Mon Jul 4 09:22:34 2011 From: adtp at airtelmail.in (A.D. Tejpal) Date: Mon, 4 Jul 2011 19:52:34 +0530 Subject: [AccessD] How to tell a button's "air space" is no longer beinghovered over References: <003b01cc38f1$b62edca0$228c95e0$@gmail.com> Message-ID: <471F6C8DAB244C66B0AB79536085B3EC@personal4a8ede> William, For detecting whether the mouse pointer has moved away from the control in question, you can use the MouseMove event of form section to which the said control belongs, for example: ' Code in form's module '============================= Private Sub Detail_MouseMove( _ Button As Integer, Shift As Integer, _ X As Single, Y As Single) ' <> End Sub '-------------------------------------------- Private Sub FormFooter_MouseMove( _ Button As Integer, Shift As Integer, _ X As Single, Y As Single) ' <> End Sub '-------------------------------------------- Private Sub FormHeader_MouseMove( _ Button As Integer, Shift As Integer, _ X As Single, Y As Single) ' <> End Sub '============================= Best wishes, A.D. Tejpal ------------ ----- Original Message ----- From: William Benson (VBACreations.Com) To: 'Access Developers discussion and problem solving' Sent: Sunday, July 03, 2011 01:23 Subject: [AccessD] How to tell a button's "air space" is no longer beinghovered over I have some code which changes the caption of a button when the user has the ctrl key pressed, set during the mousemove event for the button. I want however, that when the user leaves the "air space" for the button, then the caption reverts - regardless whether they still have shift held. I know I can use use the mousemove event associated with all surrounding controls to reset it, but I would like something more related to the control itself. Is there a method of testing that the user has moved the mouse outside the button's air space? I have a feeling I am going to be out of luck... From vbacreations at gmail.com Mon Jul 4 09:38:17 2011 From: vbacreations at gmail.com (William Benson (VBACreations.Com)) Date: Mon, 4 Jul 2011 10:38:17 -0400 Subject: [AccessD] Delete query... fast ... deleting from datasheet view ... slow In-Reply-To: References: Message-ID: <000e01cc3a58$040d3810$0c27a830$@gmail.com> Gustav and Stuart, After testing this, I don't think there is a temp table, at least not initially - and I doubt during or afterwards, either. The reason I conclude this is manifold. Primarily, because if you cancel instead of permitting the GUI to continue without UNDO, canceling the delete takes WAY less time than it would take to put the records back in a table. And if you're referring perhaps to some tiny temp table of records which might be deletable WITH THE ABILITY to undo, that is a far smaller chunk of data than the main bulk Access will ultimately delete when you allow it to proceed without undo. Furthermore, I have gone through the exercise I mentioned . Delete, No, Delete, No, . a dozen times or so and the database size never changes on disk. So I am pretty sure Access is storing data in RAM, not on Disk. And certainly it is not creating a temp table at any other time, since allowing it to delete all, or some (pressing Escape) records does not leave the database any bigger than before delete was pressed. I do lean towards the recordset walk however, that makes a lot of sense in terms of what behavior we observe. - Access is very slow to delete from large tables even when allowing it to continue without undo - Records are deleted exactly in the order in which they appear, top to bottom, in the block of selected records - Interrupting a deletion with the Escape key leaves you with whatever records Access didn't get to yet - Deleting Still gotta wonder why Jet would do it that way. With records selected, one would think there is some hidden "selected" flag which Access's delete operation could make use of, to write its own behind the scenes SQL that says "Delete from ThisTable where the UserSelectedMe flag = TRUE". and then delete the records as fast as a query does it! From: William Benson [mailto:vbacreations at gmail.com] Sent: Monday, July 04, 2011 5:52 AM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Delete query... fast ... deleting from datasheet view ... slow I will check again but I think what got me interested in the question was that ia manual delwte takes longer even taking into account just time AFTER the user confirms ok to continue without Undo. Where does Access store the temp table Gustav? In other words if you open a monstrously large table select all records and do several faux deletes one after another which you confirm but cancel at the "Continue without Undo?" Prompt....does the database bloat I wonder! I will check this when I get back to computer!_ Bill Benson Owner VBACreations, LLC On Jul 4, 2011 4:12 AM, "Gustav Brock" wrote: > Hi William and Stuart > > I don't think that's the reason, but it is similar: Access walks through the recordset (which may be filtered) and copies all records to a temp table to hold them in case you - when asked later via the GUI - choose to undo the operation. Only if you choose to confirm the deleting of the records, this actually takes place. > > /gustav > > >>>> stuart at lexacorp.com.pg 03-07-2011 23:56 >>> > A SWAG: > Because Access can't tell that all the records are selected. It has to step through the rows > and checking the "selected" attribute. That means that it can't implement a simple "Delete * > From tblA" but has to specify each of the records separately for deletion. > > -- > Stuart > > On 3 Jul 2011 at 17:23, William Benson (VBACreations. wrote: > >> Why is a query that deletes all records from a table so fast in >> comparison with a manual delete operation on a table that is opened in >> datasheet view? > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com From vbacreations at gmail.com Mon Jul 4 10:23:28 2011 From: vbacreations at gmail.com (William Benson (VBACreations.Com)) Date: Mon, 4 Jul 2011 11:23:28 -0400 Subject: [AccessD] How to tell a button's "air space" is no longer beinghovered over In-Reply-To: <471F6C8DAB244C66B0AB79536085B3EC@personal4a8ede> References: <003b01cc38f1$b62edca0$228c95e0$@gmail.com> <471F6C8DAB244C66B0AB79536085B3EC@personal4a8ede> Message-ID: <002001cc3a5e$5428d240$fc7a76c0$@gmail.com> A.D., Other controls are too near the button's bottom and it's top edge is pretty much as .Top = 0. I have put the code in the other controls already, similar to what you wrote. I was wondering if there was a way like to test the mousemove if the coordinates are exactly on bottom or top or at either side of the button, based on X, Y, or whatever... and if so, the caption is treated as if the mouse were outside it, and if not, use the caption that pertains to the moust being inside. During a normal mousemove operation the user will be headed out or headed into the interior of the button, so -- if on the way out, the last code to execute will be to reset the caption -- if on the way in, the code executing (probably continuously) will be to set the caption appropriate for interior of button But I don't think it is possible to get the event to faithfully fire exactly as the mouse is going over the edge of the button. Thanks a lot, Bill -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of A.D. Tejpal Sent: Monday, July 04, 2011 10:23 AM To: Access Developers discussion and problem solving Subject: Re: [AccessD] How to tell a button's "air space" is no longer beinghovered over William, For detecting whether the mouse pointer has moved away from the control in question, you can use the MouseMove event of form section to which the said control belongs, for example: ' Code in form's module '============================= Private Sub Detail_MouseMove( _ Button As Integer, Shift As Integer, _ X As Single, Y As Single) ' <> End Sub '-------------------------------------------- Private Sub FormFooter_MouseMove( _ Button As Integer, Shift As Integer, _ X As Single, Y As Single) ' <> End Sub '-------------------------------------------- Private Sub FormHeader_MouseMove( _ Button As Integer, Shift As Integer, _ X As Single, Y As Single) ' <> End Sub '============================= Best wishes, A.D. Tejpal ------------ ----- Original Message ----- From: William Benson (VBACreations.Com) To: 'Access Developers discussion and problem solving' Sent: Sunday, July 03, 2011 01:23 Subject: [AccessD] How to tell a button's "air space" is no longer beinghovered over I have some code which changes the caption of a button when the user has the ctrl key pressed, set during the mousemove event for the button. I want however, that when the user leaves the "air space" for the button, then the caption reverts - regardless whether they still have shift held. I know I can use use the mousemove event associated with all surrounding controls to reset it, but I would like something more related to the control itself. Is there a method of testing that the user has moved the mouse outside the button's air space? I have a feeling I am going to be out of luck... -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From accessd at shaw.ca Mon Jul 4 10:56:07 2011 From: accessd at shaw.ca (Jim Lawrence) Date: Mon, 4 Jul 2011 08:56:07 -0700 Subject: [AccessD] SSD, The Game Changer - SQL Man of Mystery -SQLServerCentral.com In-Reply-To: References: Message-ID: Hi Gustav: Good points. Like MongoDB needs the client NoRM so it can connect to .Net, Cassandra needs the client Thrift. There are other clients but Thrift seems to be the most popular probably because it was the first client. An aside: My son-in-law does a lot of work on Cassandra and he uses the client PHPCassa. It can either use Thrift as a plug-in or connect directly through PHP sockets. (As PHPCassa has just been released it is having some growing pains which should be resolved by the fall.) The below sample shows a system connecting through a Virtual drive and then connection to .Net. http://www.ridgway.co.za/archive/2009/11/06/net-developers-guide-to-getting- started-with-cassandra.aspx I have been considering which NoSQL, or more accurately, Map-Reduce instead of SQL, database to become involved with and Cassandra matched some very important points. When I get involved it will be for the long run so: 1. Cassandra has the largest group of fortune 500 companies supporting it. 2. Cassandra, like MongoDB is being supported by Microsoft. After Cassandra's, next major release, coming this summer, I would suspect that there will be a real and full .Net client to follow. In this region, there is a huge presents of Oracle on Linux/Unix/Windows but there appears to be some real limitations with what a vertical Database can do. There is only so powerful an HP Proliant or Dell that can be built and a number of clients have been hitting that wall. In addition, the Oracle licensing, costs are far greater than the servers. Just like single core CPUs hit the wall in 2006 so are large growing databases. In the near future, there will be some real opportunities for NoSQL experts. Jim -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: Monday, July 04, 2011 2:50 AM To: accessd at databaseadvisors.com Subject: Re: [AccessD] SSD, The Game Changer - SQL Man of Mystery -SQLServerCentral.com Hi Jim But Casandra doesn't seem to be much .Net/C# friendly. Clients exist only for the old version 0.7, and both of these seem to provide nothing that come close to DataTableAdapters or the like (not to mention LINQ), only simple command-type access: http://aquiles.codeplex.com/ On the other hand, MongoDB seems to have proceeded further with NoRM: http://iridescence.no/post/NoSQL-Getting-started-with-MongoDB-and-NoRM.aspx /gustav >>> accessd at shaw.ca 04-07-2011 05:10 >>> Inline: -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Sunday, July 03, 2011 2:41 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] SSD, The Game Changer - SQL Man of Mystery - SQLServerCentral.com Jim, I read the first article and I don't see how it fits at all. * It fits very well. First in overview this database does not require a single PC to run the database. It is distributive in nature so you can just add nodes to a bunch of old new and old PCs. The main problem with the database as you have it now is that it is dependant on the hardware of a single box. Just like in 2006 the single CPU reached it maximum and multi-core processors were then created. Cassandra runs like a multi-core PC. When the database is running on numerous PCs it is like running a full RAID. 1) My data is very much a normal table, with rows and columns. In one case (the people table) there are a small number of columns, and most of the columns are fully populated. In the second table, there are pushing 700 fields and the columns are rarely fully populated. * Cassandra, for example, has a sparse data structure. This means columns can be over 2 billion (rows as well) wide (high), if required and the 'fields' do not have to be populated. At any time you can just insert another 'field' and there is no rebuild required or performance loss (It can all be done in real time). You can have your cake and eat it too. 2) The data is relational, though just barely. One of my people tables is directly related to the data table. All of my people tables may have people in the other tables. Eventually I will be pulling all of my people into a single table with pointers back to the non people data in the original able. * When you say barely relational that is what Cassandra is designed for. What you are describing in item 2 is exactly what type of database Cassandra is. It may not use SQL as we traditionally know it but it uses a system called 'map-reduce' which can quickly (very quickly) obtain the same results...it is data-mining tool on steroids. 3) I rarely update the data. The people table is updated once per month as I validate the addresses looking for moves. I get about 1.5% / month moves. The data table is never updated, at least the data in the existing columns. Very occasionally I add new columns. * Again, your requirements and description is matching Cassandra's design nature to a tee. 4) I only have a single user (myself) and I never expect to have more. * That does not matter if you are the only user. What does matter is that you can pull any data out of a huge mass of mix data fast and easy. You have noticed how Google can pull 365,000,000 hits in somewhere around 0.03 seconds. It is not because they have huge vertical super-powerful computers...their computer are but beaters in comparison but their database is spans hundreds of computers...just like Cassandra is capable of. In comparison, the NoSQL databases claim to store documents and make them searchable. Blog posts, web pages etc. They claim to be good as the numbers of people simultaneously *writing* to them climbs into the hundreds or thousands. So while the technology is fascinating, it hardly seems like a fit for my application. * You are right in all the above but with the exception that the Cassandra is a near perfect fit. To that end I will be starting my own Cassandra database system and just to see how it plays out. Here is a little video to watch that will do a lot to explain what and how Cassandra does things: http://video.disruptivecode.com/video/840645/what-makes-cassandra-trick.html . I think you will be pleasantly surprised. The product runs on any OS as all that it is needs is a copy of Java and Apache, which is free, downloads. http://www.quora.com/How-can-i-install-Apache-Cassandra-on-Windows-Operating -System John W. Colby www.ColbyConsulting.com From vbacreations at gmail.com Mon Jul 4 11:02:58 2011 From: vbacreations at gmail.com (William Benson (VBACreations.Com)) Date: Mon, 4 Jul 2011 12:02:58 -0400 Subject: [AccessD] Delete query... fast ... deleting from datasheet view ... slow References: Message-ID: <000301cc3a63$da2bf930$8e83eb90$@gmail.com> Good news, I could get back to VBA by trying to press Ctrl-G as fast as I could while also pressing Enter . apparently there was just enough split-sec pause between "unrecognized database format" prompts - so that after about 50 tries I got into the VBA window and could do a Save before entering Application.Quit, which killed the application as desired. Then even though Access was no longer running, I could not open the database again. Was getting a message that user admin had left it in a state which it could not longer be opened or locked. I was like "huh? So I went to the temp folder and tried to either rename or delete the temp database found in there and couldn't mess with that either! So I rebooted my machine and then I could get into the database again (Thank God). But this is a continual problem for me when deleting large numbers of records .. even if I click No (do not continue without undo) I get a message You tried to commit or rollback a transaction without first beginning a transaction. I say OK to that, then the message is The changes you made can't be saved due to the temporary locking of the records by another user. Eh, come again? What user? Then I say OK to that then I get You tried to commit or rollback a transaction without first beginning a transaction. Again. Then I click OK, and sometimes that's the end of things, and sometimes it's just the beginning of my troubles. Painful. From vbacreations at gmail.com Mon Jul 4 11:04:52 2011 From: vbacreations at gmail.com (William Benson (VBACreations.Com)) Date: Mon, 4 Jul 2011 12:04:52 -0400 Subject: [AccessD] Delete query... fast ... deleting from datasheet view ... slow References: Message-ID: <000801cc3a64$1c8f8490$55ae8db0$@gmail.com> Long and short of it . I use delete queries for large number of rows, exclusively, from now on. :-0(((((((( From: William Benson (VBACreations.Com) [mailto:vbacreations at gmail.com] Sent: Monday, July 04, 2011 12:03 PM To: Access Developers discussion and problem solving Subject: RE: [AccessD] Delete query... fast ... deleting from datasheet view ... slow Good news, I could get back to VBA by trying to press Ctrl-G as fast as I could while also pressing Enter . apparently there was just enough split-sec pause between "unrecognized database format" prompts - so that after about 50 tries I got into the VBA window and could do a Save before entering Application.Quit, which killed the application as desired. Then even though Access was no longer running, I could not open the database again. Was getting a message that user admin had left it in a state which it could not longer be opened or locked. I was like "huh? So I went to the temp folder and tried to either rename or delete the temp database found in there and couldn't mess with that either! So I rebooted my machine and then I could get into the database again (Thank God). But this is a continual problem for me when deleting large numbers of records .. even if I click No (do not continue without undo) I get a message You tried to commit or rollback a transaction without first beginning a transaction. I say OK to that, then the message is The changes you made can't be saved due to the temporary locking of the records by another user. Eh, come again? What user? Then I say OK to that then I get You tried to commit or rollback a transaction without first beginning a transaction. Again. Then I click OK, and sometimes that's the end of things, and sometimes it's just the beginning of my troubles. Painful. From jwcolby at colbyconsulting.com Mon Jul 4 11:13:11 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Mon, 04 Jul 2011 12:13:11 -0400 Subject: [AccessD] SSD, The Game Changer - SQL Man of Mystery - SQLServerCentral.com In-Reply-To: References: Message-ID: <4E11E697.9050301@colbyconsulting.com> Jim / Gustav, In any case it seems like a forced fit if it fits at all. I read the blogs and they are talking about responding to millions of reads / writes of massive quantities of text by massive quantities of users, using tens of thousands of machines to distribute the load. Look at the users and who are they? Search engines and social network sites. From the web site that Gustav posted: MongoDB? ?MongoDB (from "humongous") is a scalable, high-performance, open source, schema-free, document-oriented database.? I don't see how this describes me in any way. http://www.michaelckennedy.net/blog/2010/04/22/TheNoSQLMovementLINQAndMongoDBOhMy.aspx to quote: "This move towards NoSQL is driven by pressure from two angles in the web application world: * Ease-of-use and deployment * Performance - especially when there are many writers as compared to the number of readers (think Twitter or Facebook)." I don't see how this describes me in any way. I am not opposed to using this, however I have to see that it somehow fits and I don't see that. 1) I don't have tens of thousands of machines to distribute the load. And never will! 2) I don't have tens of thousands of users trying to simultaneously read / write to the data store. And never will! 3) I am not storing large quantities of text (think blog text, web page text, pictures etc) per read / write. And never will! 4) I don't have, nor do I wish to maintain a bunch of old / new PCs as a huge network. These guys (Google etc) build entire data centers with highly replicable computers, but they do so for scalability and replicability (redundancy). They also have a megawatt power line coming in to their data center. They also spend a couple of hundred million building the data center. They also have hundreds or thousands of programmers writing their code. How does any of that sound like me? 5) I have spent a year building a pretty sophisticated system for taking data in SQL Server, huge quantities of records, and getting them exported out of the data store into CSVs, through a VM / third party software, and then back in to the server (updating thousands of addresses when people move). I have custom software to build orders and get selected sets of name / address records out to fixed width files. The selection process depends entirely on where clauses - where age in ('1','2','3') and Income in ('a','b','c') and MOB = 'Y' and... This is SQL stuff. It requires an easily manipulatable SQL language. When something doesn't work I need to have an environment that I can cut and paste my sql statements and troubleshoot them. My data has never touched a web page. In fact 99.9999999% of my data has never even been seen by human eyes, other than when it was originally entered by each person typing their name / address into a web site sime time in the last 10 years. *None of that* sounds like these systems (to me). These systems are designed precisely to take pages of data typed in by millions of users and store them in an efficient manner, then pull the entire thing back out millions of times to display on a web browser. Jim, I think these systems are the cat's meow for the purpose they are intended for, but my data and the way I use my data is just not that paradigm. In the meantime I have already built a hardware / software system that does what I want, and I did it on a budget that is remarkably small. Long term I spend around 2% of my income on hardware. Perhaps even 1%. And I did it with myself and a 3 hour / day part time programmer. I really don't get that throwing all that away to start over with a database designed to fit Google's / Facebook's needs is a good thing to do. To be honest, if I were starting from scratch, I don't think it would be the right tool. The fact that it is a million times faster at what it does doesn't matter if what it does isn't what I do. John W. Colby www.ColbyConsulting.com On 7/4/2011 5:50 AM, Gustav Brock wrote: > Hi Jim > > But Casandra doesn't seem to be much .Net/C# friendly. Clients exist only for the old version 0.7, and both of these seem to provide nothing that come close to DataTableAdapters or the like (not to mention LINQ), only simple command-type access: > > http://aquiles.codeplex.com/ > > On the other hand, MongoDB seems to have proceeded further with NoRM: > > http://iridescence.no/post/NoSQL-Getting-started-with-MongoDB-and-NoRM.aspx > > /gustav > > >>>> accessd at shaw.ca 04-07-2011 05:10>>> > Inline: > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby > Sent: Sunday, July 03, 2011 2:41 PM > To: Access Developers discussion and problem solving > Subject: Re: [AccessD] SSD, The Game Changer - SQL Man of Mystery - > SQLServerCentral.com > > Jim, > > I read the first article and I don't see how it fits at all. > > * It fits very well. First in overview this database does not require a > single PC to run the database. It is distributive in nature so you can just > add nodes to a bunch of old new and old PCs. The main problem with the > database as you have it now is that it is dependant on the hardware of a > single box. Just like in 2006 the single CPU reached it maximum and > multi-core processors were then created. Cassandra runs like a multi-core > PC. When the database is running on numerous PCs it is like running a full > RAID. From BradM at blackforestltd.com Mon Jul 4 13:53:23 2011 From: BradM at blackforestltd.com (Brad Marks) Date: Mon, 4 Jul 2011 13:53:23 -0500 Subject: [AccessD] What is the best way to grab fields from a report detail line so that they can be accessed in VBA? References: Message-ID: All, I want to grab the value of fields from report detail lines. Here is the method that I finally got to work. I open the report with a line like this... DoCmd.OpenReport "Report1", acViewPreview, "", "", acNormal I then grab the fields in the "On Print" Event This works, but I would like to know if this is the best method to do this. ~ ~ ~ ~ There rest of the story... Here is what I am trying to accomplish. I have a number of Access 2007 reports that employ "dynamic filters" via the use of "Report View" and the "Where Condition" when the report is opened. In other words, the filters are applied at the report level and not at the underlying query level. (There are buttons on the reports which open up a small form that is used to collect "filter info" and then re-open the report with the appropriate "Where Condition" based on the "filter info") Now there is a need to export the report data to Excel. Because of the complex nature of the reports, they do not Export very nicely to Excel (I have tried several approaches). I know that I could easily export from the underlying queries to Excel, but this type of export would not take into account the filters that are applied at the report level. Therefore, to export the exact data on the reports to Excel, I have started to experiment with grabbing the data from the report as it is being built. This is not ideal, but I can't seem to find a better method. Maybe others have run into this issue and have a better approach. Thanks for your assistance. Brad From marksimms at verizon.net Mon Jul 4 19:56:37 2011 From: marksimms at verizon.net (Mark Simms) Date: Mon, 04 Jul 2011 20:56:37 -0400 Subject: [AccessD] How to tell a button's "air space" is no longer beinghovered over In-Reply-To: <471F6C8DAB244C66B0AB79536085B3EC@personal4a8ede> References: <003b01cc38f1$b62edca0$228c95e0$@gmail.com> <471F6C8DAB244C66B0AB79536085B3EC@personal4a8ede> Message-ID: <003301cc3aae$64e3e840$2eabb8c0$@net> Easier said than done. You must add logic to detect when the mouse is moving INTO the object airspace... And then logic to detect when the mouse is moving OUT OF the airspace. It's called "Mouseover". Another detail that MSFT omitted in Office VBA. Sure would have been nice to have a Mouseover event handler...right ? > -----Original Message----- > From: accessd-bounces at databaseadvisors.com [mailto:accessd- > bounces at databaseadvisors.com] On Behalf Of A.D. Tejpal > Sent: Monday, July 04, 2011 10:23 AM > To: Access Developers discussion and problem solving > Subject: Re: [AccessD] How to tell a button's "air space" is no longer > beinghovered over > > William, > > For detecting whether the mouse pointer has moved away from the > control in question, you can use the MouseMove event of form section to > which the said control belongs, for example: > > ' Code in form's module > '============================= > Private Sub Detail_MouseMove( _ > Button As Integer, Shift As Integer, _ > X As Single, Y As Single) > > ' <> > > End Sub > '-------------------------------------------- > > Private Sub FormFooter_MouseMove( _ > Button As Integer, Shift As Integer, _ > X As Single, Y As Single) > > ' <> > > End Sub > '-------------------------------------------- > > Private Sub FormHeader_MouseMove( _ > Button As Integer, Shift As Integer, _ > X As Single, Y As Single) > > ' <> > > End Sub > '============================= > From dbdoug at gmail.com Mon Jul 4 20:16:43 2011 From: dbdoug at gmail.com (Doug Steele) Date: Mon, 4 Jul 2011 18:16:43 -0700 Subject: [AccessD] What is the best way to grab fields from a report detail line so that they can be accessed in VBA? In-Reply-To: References: Message-ID: Brad, what I do in similar circumstances is build and save the 'Where' string in the filtering form. In code, I take the original SQL for the report recordsource and add the Where string to it. I then save this new SQL into a temporary query and export it to Excel. Doug On Mon, Jul 4, 2011 at 11:53 AM, Brad Marks wrote: > All, > > I want to grab the value of fields from report detail lines. > > Here is the method that I finally got to work. > > I open the report with a line like this... > > DoCmd.OpenReport "Report1", acViewPreview, "", "", acNormal > > I then grab the fields in the "On Print" Event > > This works, but I would like to know if this is the best method to do > this. > > ~ ~ ~ ~ > > There rest of the story... > > Here is what I am trying to accomplish. > > I have a number of Access 2007 reports that employ "dynamic filters" via > the use of "Report View" and the "Where Condition" when the report is > opened. ?In other words, the filters are applied at the report level and > not at the underlying query level. ?(There are buttons on the reports > which open up a small form that is used to collect "filter info" and > then re-open the report with the appropriate "Where Condition" based on > the "filter info") > > Now there is a need to export the report data to Excel. ?Because of the > complex nature of the reports, they do not Export very nicely to Excel > (I have tried several approaches). > > I know that I could easily export from the underlying queries to Excel, > but this type of export would not take into account the filters that are > applied at the report level. > > Therefore, to export the exact data on the reports to Excel, I have > started to experiment with grabbing the data from the report as it is > being built. ?This is not ideal, but I can't seem to find a better > method. > > Maybe others have run into this issue and have a better approach. > > Thanks for your assistance. > > Brad > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > From jwcolby at colbyconsulting.com Tue Jul 5 03:56:04 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Tue, 05 Jul 2011 04:56:04 -0400 Subject: [AccessD] Sourcegear vault free two developer license Message-ID: <4E12D1A4.1010809@colbyconsulting.com> I ran across this today. http://www.sqlservercentral.com/articles/Red+Gate+Software/74579/ http://promotions.sourcegear.com/vouchers/new/ -- John W. Colby www.ColbyConsulting.com From adtp at airtelmail.in Tue Jul 5 04:10:09 2011 From: adtp at airtelmail.in (A.D. Tejpal) Date: Tue, 5 Jul 2011 14:40:09 +0530 Subject: [AccessD] How to tell a button's "air space" is nolonger beinghovered over References: <003b01cc38f1$b62edca0$228c95e0$@gmail.com><471F6C8DAB244C66B0AB79536085B3EC@personal4a8ede> <002001cc3a5e$5428d240$fc7a76c0$@gmail.com> Message-ID: <8DD6228312434CD0940AE4E4807C4FF6@personal4a8ede> Bill, Apparently, in view of special positioning of control in question, you are looking for a solution that is self contained within control's MouseMove event. You could experiment with sample code given below: ' Code in form's module '============================== ' Declarations section Private gX As Single, gY As Single '--------------------------------------------- Private Sub CmdTest_MouseMove( _ Button As Integer, _ Shift As Integer, _ X As Single, Y As Single) With Me.CmdTest Me.CmdTest.Caption = "Test (MM)" If gX <> 0 Then If (X > (0.9 * .Width) And X > gX) _ Or (X < (0.1 * .Width) And _ X < gX) Then Me.CmdTest.Caption = "Test" End If End If If gY <> 0 Then If (Y > (0.9 * .Height) And Y > gY) _ Or (Y < (0.1 * .Height) And _ Y < gY) Then Me.CmdTest.Caption = "Test" End If End If End With gX = X gY = Y End Sub '============================== Normal caption of command button named CmdTest is "Test". When mouse pointer is brought over it, the caption changes to "Test (MM)". As & when the mouse pointer moves away from the control, the caption reverts back to normal, i.e. "Test". Note: (a) MouseMove event fires in rapid-fire style. Values for X and Y returned by this event have a range from 0 upto the width and height (in twips) of the control in question. (b) The multiplying factors of 0.9 and 0.1 used in the sample code could perhaps be fine tuned further (say 0.95 and 0.05) so as to narrow down the twilight zone. However a coarser setting as adopted above, is found conducive to more consistent behavior. This is because a deliberately wild mouse sweep by the user can result in X or Y value getting truncated short of the potential maximum, even though the mouse pointer has moved out. Best wishes, A.D. Tejpal ------------ ----- Original Message ----- From: William Benson (VBACreations.Com) To: 'Access Developers discussion and problem solving' Sent: Monday, July 04, 2011 20:53 Subject: Re: [AccessD] How to tell a button's "air space" is nolonger beinghovered over A.D., Other controls are too near the button's bottom and it's top edge is pretty much as .Top = 0. I have put the code in the other controls already, similar to what you wrote. I was wondering if there was a way like to test the mousemove if the coordinates are exactly on bottom or top or at either side of the button, based on X, Y, or whatever... and if so, the caption is treated as if the mouse were outside it, and if not, use the caption that pertains to the moust being inside. During a normal mousemove operation the user will be headed out or headed into the interior of the button, so -- if on the way out, the last code to execute will be to reset the caption -- if on the way in, the code executing (probably continuously) will be to set the caption appropriate for interior of button But I don't think it is possible to get the event to faithfully fire exactly as the mouse is going over the edge of the button. Thanks a lot, Bill -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of A.D. Tejpal Sent: Monday, July 04, 2011 10:23 AM To: Access Developers discussion and problem solving Subject: Re: [AccessD] How to tell a button's "air space" is no longer beinghovered over William, For detecting whether the mouse pointer has moved away from the control in question, you can use the MouseMove event of form section to which the said control belongs, for example: ' Code in form's module '============================= Private Sub Detail_MouseMove( _ Button As Integer, Shift As Integer, _ X As Single, Y As Single) ' <> End Sub '-------------------------------------------- Private Sub FormFooter_MouseMove( _ Button As Integer, Shift As Integer, _ X As Single, Y As Single) ' <> End Sub '-------------------------------------------- Private Sub FormHeader_MouseMove( _ Button As Integer, Shift As Integer, _ X As Single, Y As Single) ' <> End Sub '============================= Best wishes, A.D. Tejpal ------------ ----- Original Message ----- From: William Benson (VBACreations.Com) To: 'Access Developers discussion and problem solving' Sent: Sunday, July 03, 2011 01:23 Subject: [AccessD] How to tell a button's "air space" is no longer beinghovered over I have some code which changes the caption of a button when the user has the ctrl key pressed, set during the mousemove event for the button. I want however, that when the user leaves the "air space" for the button, then the caption reverts - regardless whether they still have shift held. I know I can use use the mousemove event associated with all surrounding controls to reset it, but I would like something more related to the control itself. Is there a method of testing that the user has moved the mouse outside the button's air space? I have a feeling I am going to be out of luck... From vbacreations at gmail.com Tue Jul 5 07:01:19 2011 From: vbacreations at gmail.com (William Benson (VBACreations.Com)) Date: Tue, 5 Jul 2011 08:01:19 -0400 Subject: [AccessD] How to tell a button's "air space" is nolonger beinghovered over In-Reply-To: <8DD6228312434CD0940AE4E4807C4FF6@personal4a8ede> References: <003b01cc38f1$b62edca0$228c95e0$@gmail.com><471F6C8DAB244C66B0AB79536085B3EC@personal4a8ede> <002001cc3a5e$5428d240$fc7a76c0$@gmail.com> <8DD6228312434CD0940AE4E4807C4FF6@personal4a8ede> Message-ID: <001201cc3b0b$40feef30$c2fccd90$@gmail.com> I tried your code A.D., it works pretty well. It occasionally misses when the button's edge is near the top (but not at the top) of its section and when another control is near the button's edge.. But it's great, thank you. -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of A.D. Tejpal Sent: Tuesday, July 05, 2011 5:10 AM To: Access Developers discussion and problem solving Subject: Re: [AccessD] How to tell a button's "air space" is nolonger beinghovered over Bill, Apparently, in view of special positioning of control in question, you are looking for a solution that is self contained within control's MouseMove event. You could experiment with sample code given below: ' Code in form's module '============================== ' Declarations section Private gX As Single, gY As Single '--------------------------------------------- Private Sub CmdTest_MouseMove( _ Button As Integer, _ Shift As Integer, _ X As Single, Y As Single) With Me.CmdTest Me.CmdTest.Caption = "Test (MM)" If gX <> 0 Then If (X > (0.9 * .Width) And X > gX) _ Or (X < (0.1 * .Width) And _ X < gX) Then Me.CmdTest.Caption = "Test" End If End If If gY <> 0 Then If (Y > (0.9 * .Height) And Y > gY) _ Or (Y < (0.1 * .Height) And _ Y < gY) Then Me.CmdTest.Caption = "Test" End If End If End With gX = X gY = Y End Sub '============================== Normal caption of command button named CmdTest is "Test". When mouse pointer is brought over it, the caption changes to "Test (MM)". As & when the mouse pointer moves away from the control, the caption reverts back to normal, i.e. "Test". Note: (a) MouseMove event fires in rapid-fire style. Values for X and Y returned by this event have a range from 0 upto the width and height (in twips) of the control in question. (b) The multiplying factors of 0.9 and 0.1 used in the sample code could perhaps be fine tuned further (say 0.95 and 0.05) so as to narrow down the twilight zone. However a coarser setting as adopted above, is found conducive to more consistent behavior. This is because a deliberately wild mouse sweep by the user can result in X or Y value getting truncated short of the potential maximum, even though the mouse pointer has moved out. Best wishes, A.D. Tejpal ------------ ----- Original Message ----- From: William Benson (VBACreations.Com) To: 'Access Developers discussion and problem solving' Sent: Monday, July 04, 2011 20:53 Subject: Re: [AccessD] How to tell a button's "air space" is nolonger beinghovered over A.D., Other controls are too near the button's bottom and it's top edge is pretty much as .Top = 0. I have put the code in the other controls already, similar to what you wrote. I was wondering if there was a way like to test the mousemove if the coordinates are exactly on bottom or top or at either side of the button, based on X, Y, or whatever... and if so, the caption is treated as if the mouse were outside it, and if not, use the caption that pertains to the moust being inside. During a normal mousemove operation the user will be headed out or headed into the interior of the button, so -- if on the way out, the last code to execute will be to reset the caption -- if on the way in, the code executing (probably continuously) will be to set the caption appropriate for interior of button But I don't think it is possible to get the event to faithfully fire exactly as the mouse is going over the edge of the button. Thanks a lot, Bill -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of A.D. Tejpal Sent: Monday, July 04, 2011 10:23 AM To: Access Developers discussion and problem solving Subject: Re: [AccessD] How to tell a button's "air space" is no longer beinghovered over William, For detecting whether the mouse pointer has moved away from the control in question, you can use the MouseMove event of form section to which the said control belongs, for example: ' Code in form's module '============================= Private Sub Detail_MouseMove( _ Button As Integer, Shift As Integer, _ X As Single, Y As Single) ' <> End Sub '-------------------------------------------- Private Sub FormFooter_MouseMove( _ Button As Integer, Shift As Integer, _ X As Single, Y As Single) ' <> End Sub '-------------------------------------------- Private Sub FormHeader_MouseMove( _ Button As Integer, Shift As Integer, _ X As Single, Y As Single) ' <> End Sub '============================= Best wishes, A.D. Tejpal ------------ ----- Original Message ----- From: William Benson (VBACreations.Com) To: 'Access Developers discussion and problem solving' Sent: Sunday, July 03, 2011 01:23 Subject: [AccessD] How to tell a button's "air space" is no longer beinghovered over I have some code which changes the caption of a button when the user has the ctrl key pressed, set during the mousemove event for the button. I want however, that when the user leaves the "air space" for the button, then the caption reverts - regardless whether they still have shift held. I know I can use use the mousemove event associated with all surrounding controls to reset it, but I would like something more related to the control itself. Is there a method of testing that the user has moved the mouse outside the button's air space? I have a feeling I am going to be out of luck... -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From BradM at blackforestltd.com Tue Jul 5 07:18:24 2011 From: BradM at blackforestltd.com (Brad Marks) Date: Tue, 5 Jul 2011 07:18:24 -0500 Subject: [AccessD] What is the best way to grab fields from a report detail line so that they can be accessed in VBA? References: Message-ID: Doug, Thanks for the advice. I may need to go down this path. Because of the complexity of the reports and underlying queries, I was hesitant to change the underlying queries. The idea of creating a temporary query is something that I had not considered. Thanks again, Brad -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Doug Steele Sent: Monday, July 04, 2011 8:17 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] What is the best way to grab fields from a report detail line so that they can be accessed in VBA? Brad, what I do in similar circumstances is build and save the 'Where' string in the filtering form. In code, I take the original SQL for the report recordsource and add the Where string to it. I then save this new SQL into a temporary query and export it to Excel. Doug On Mon, Jul 4, 2011 at 11:53 AM, Brad Marks wrote: > All, > > I want to grab the value of fields from report detail lines. > > Here is the method that I finally got to work. > > I open the report with a line like this... > > DoCmd.OpenReport "Report1", acViewPreview, "", "", acNormal > > I then grab the fields in the "On Print" Event > > This works, but I would like to know if this is the best method to do > this. > > ~ ~ ~ ~ > > There rest of the story... > > Here is what I am trying to accomplish. > > I have a number of Access 2007 reports that employ "dynamic filters" via > the use of "Report View" and the "Where Condition" when the report is > opened. ?In other words, the filters are applied at the report level and > not at the underlying query level. ?(There are buttons on the reports > which open up a small form that is used to collect "filter info" and > then re-open the report with the appropriate "Where Condition" based on > the "filter info") > > Now there is a need to export the report data to Excel. ?Because of the > complex nature of the reports, they do not Export very nicely to Excel > (I have tried several approaches). > > I know that I could easily export from the underlying queries to Excel, > but this type of export would not take into account the filters that are > applied at the report level. > > Therefore, to export the exact data on the reports to Excel, I have > started to experiment with grabbing the data from the report as it is > being built. ?This is not ideal, but I can't seem to find a better > method. > > Maybe others have run into this issue and have a better approach. > > Thanks for your assistance. > > Brad > > -- > 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 has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. From df.waters at comcast.net Tue Jul 5 07:45:01 2011 From: df.waters at comcast.net (Dan Waters) Date: Tue, 5 Jul 2011 07:45:01 -0500 Subject: [AccessD] Sourcegear vault free two developer license In-Reply-To: <4E12D1A4.1010809@colbyconsulting.com> References: <4E12D1A4.1010809@colbyconsulting.com> Message-ID: <001d01cc3b11$5c1bf280$1453d780$@comcast.net> Is a version control system useful for a single developer? I noticed that this offer is for 2 developers, assuming that it would help more than one developer. -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Tuesday, July 05, 2011 3:56 AM To: Access Developers discussion and problem solving; VBA; Sqlserver-Dba Subject: [AccessD] Sourcegear vault free two developer license I ran across this today. http://www.sqlservercentral.com/articles/Red+Gate+Software/74579/ http://promotions.sourcegear.com/vouchers/new/ -- John W. Colby www.ColbyConsulting.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From jwcolby at colbyconsulting.com Tue Jul 5 08:46:08 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Tue, 05 Jul 2011 09:46:08 -0400 Subject: [AccessD] Sourcegear vault free two developer license In-Reply-To: <001d01cc3b11$5c1bf280$1453d780$@comcast.net> References: <4E12D1A4.1010809@colbyconsulting.com> <001d01cc3b11$5c1bf280$1453d780$@comcast.net> Message-ID: <4E1315A0.1010005@colbyconsulting.com> http://en.wikipedia.org/wiki/Revision_control John W. Colby www.ColbyConsulting.com On 7/5/2011 8:45 AM, Dan Waters wrote: > Is a version control system useful for a single developer? I noticed that > this offer is for 2 developers, assuming that it would help more than one > developer. > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby > Sent: Tuesday, July 05, 2011 3:56 AM > To: Access Developers discussion and problem solving; VBA; Sqlserver-Dba > Subject: [AccessD] Sourcegear vault free two developer license > > I ran across this today. > > http://www.sqlservercentral.com/articles/Red+Gate+Software/74579/ > http://promotions.sourcegear.com/vouchers/new/ > From charlotte.foust at gmail.com Tue Jul 5 09:54:05 2011 From: charlotte.foust at gmail.com (Charlotte Foust) Date: Tue, 5 Jul 2011 07:54:05 -0700 Subject: [AccessD] Sourcegear vault free two developer license In-Reply-To: <001d01cc3b11$5c1bf280$1453d780$@comcast.net> References: <4E12D1A4.1010809@colbyconsulting.com> <001d01cc3b11$5c1bf280$1453d780$@comcast.net> Message-ID: Yes it is, especially SourceGear Vault. Vault allows you to maintain multiple versions of an application, so you can try something out and then roll back just one part of it if your brilliant idea for something falls on its face. It is very similar in usage to SourceSafe but it has some nifty features that make it well worthwhile. Charlotte Foust On Tue, Jul 5, 2011 at 5:45 AM, Dan Waters wrote: > Is a version control system useful for a single developer? I noticed that > this offer is for 2 developers, assuming that it would help more than one > developer. > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby > Sent: Tuesday, July 05, 2011 3:56 AM > To: Access Developers discussion and problem solving; VBA; Sqlserver-Dba > Subject: [AccessD] Sourcegear vault free two developer license > > I ran across this today. > > http://www.sqlservercentral.com/articles/Red+Gate+Software/74579/ > > > http://promotions.sourcegear.com/vouchers/new/ > > > > -- > John W. Colby > www.ColbyConsulting.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 jwcolby at colbyconsulting.com Tue Jul 5 10:52:37 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Tue, 05 Jul 2011 11:52:37 -0400 Subject: [AccessD] Sourcegear vault free two developer license In-Reply-To: References: <4E12D1A4.1010809@colbyconsulting.com> <001d01cc3b11$5c1bf280$1453d780$@comcast.net> Message-ID: <4E133345.2060102@colbyconsulting.com> Does anyone have it working with Access? John W. Colby www.ColbyConsulting.com On 7/5/2011 10:54 AM, Charlotte Foust wrote: > Yes it is, especially SourceGear Vault. Vault allows you to maintain > multiple versions of an application, so you can try something out and then > roll back just one part of it if your brilliant idea for something falls on > its face. It is very similar in usage to SourceSafe but it has some nifty > features that make it well worthwhile. > > Charlotte Foust > > On Tue, Jul 5, 2011 at 5:45 AM, Dan Waters wrote: > >> Is a version control system useful for a single developer? I noticed that >> this offer is for 2 developers, assuming that it would help more than one >> developer. >> >> -----Original Message----- >> From: accessd-bounces at databaseadvisors.com >> [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby >> Sent: Tuesday, July 05, 2011 3:56 AM >> To: Access Developers discussion and problem solving; VBA; Sqlserver-Dba >> Subject: [AccessD] Sourcegear vault free two developer license >> >> I ran across this today. >> >> http://www.sqlservercentral.com/articles/Red+Gate+Software/74579/ >> >> >> http://promotions.sourcegear.com/vouchers/new/ >> >> >> >> -- >> John W. Colby >> www.ColbyConsulting.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 charlotte.foust at gmail.com Tue Jul 5 10:59:25 2011 From: charlotte.foust at gmail.com (Charlotte Foust) Date: Tue, 5 Jul 2011 08:59:25 -0700 Subject: [AccessD] Sourcegear vault free two developer license In-Reply-To: <4E133345.2060102@colbyconsulting.com> References: <4E12D1A4.1010809@colbyconsulting.com> <001d01cc3b11$5c1bf280$1453d780$@comcast.net> <4E133345.2060102@colbyconsulting.com> Message-ID: I believe there is a widget you need, a bit like the one for SourceSafe, in order to make it work as you might expect with Access, but we only used it with .Net, so I'm not a definitive source for that answer. Charlotte Foust On Tue, Jul 5, 2011 at 8:52 AM, jwcolby wrote: > Does anyone have it working with Access? > > > John W. Colby > www.ColbyConsulting.com > > > > On 7/5/2011 10:54 AM, Charlotte Foust wrote: > >> Yes it is, especially SourceGear Vault. Vault allows you to maintain >> multiple versions of an application, so you can try something out and then >> roll back just one part of it if your brilliant idea for something falls >> on >> its face. It is very similar in usage to SourceSafe but it has some nifty >> features that make it well worthwhile. >> >> Charlotte Foust >> >> On Tue, Jul 5, 2011 at 5:45 AM, Dan Waters wrote: >> >> Is a version control system useful for a single developer? I noticed >>> that >>> this offer is for 2 developers, assuming that it would help more than one >>> developer. >>> >>> -----Original Message----- >>> From: accessd-bounces@**databaseadvisors.com >>> [mailto:accessd-bounces@**databaseadvisors.com] >>> On Behalf Of jwcolby >>> Sent: Tuesday, July 05, 2011 3:56 AM >>> To: Access Developers discussion and problem solving; VBA; Sqlserver-Dba >>> Subject: [AccessD] Sourcegear vault free two developer license >>> >>> I ran across this today. >>> >>> http://www.sqlservercentral.**com/articles/Red+Gate+**Software/74579/ >>> >>> >>> >>> >>> http://promotions.sourcegear.**com/vouchers/new/ >>> >>> >>> >>> >>> >>> -- >>> John W. Colby >>> www.ColbyConsulting.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 EdTesiny at oasas.ny.gov Tue Jul 5 12:09:56 2011 From: EdTesiny at oasas.ny.gov (Tesiny, Ed) Date: Tue, 5 Jul 2011 13:09:56 -0400 Subject: [AccessD] Emailing an .mde Message-ID: Hi All, I'm trying to email a database frontend, of course our system blocks it. Is there an extension that is fairly neutral, I tried .doc with one person last week and that worked but it isn't working with the person I trying to distribute to today. Any suggestions? TIA Ed Edward P. Tesiny Director of Evaluation and Outcomes Management New York State OASAS 1450 Western Avenue Albany, NY 12203 Phone: (518) 485-2322 Fax: (518) 485-5228 EdTesiny at oasas.ny.gov IMPORTANT: This E-mail may contain confidential material for the sole use of the intended recipient. The use, distribution, transmittal or re-transmittal by an unintended recipient of any communication is prohibited without our express approval in writing or by e-mail. Any use, distribution, transmittal or re-transmittal by persons who are not intended recipients of this e-mail may be a violation of law and is strictly prohibited. If you are not the intended recipient please contact the sender and delete all copies. E-mail transmission cannot be guaranteed to be secure or error-free. The sender therefore does not accept liability for any errors or omissions in the contents of this transmission. All e-mails sent to or from NYS OASAS are to be used for our business purposes only. E-mails sent from or to NYS OASAS are subject to review by the Agency. From jimdettman at verizon.net Tue Jul 5 12:23:46 2011 From: jimdettman at verizon.net (Jim Dettman) Date: Tue, 05 Jul 2011 13:23:46 -0400 Subject: [AccessD] Emailing an .mde In-Reply-To: References: Message-ID: <7DEE0381D70E4361A351C1E6B4625F24@XPS> Ed, .ed Jim. -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Tesiny, Ed Sent: Tuesday, July 05, 2011 01:10 PM To: Access Developers discussion and problem solving; Off Topic Subject: [AccessD] Emailing an .mde Hi All, I'm trying to email a database frontend, of course our system blocks it. Is there an extension that is fairly neutral, I tried .doc with one person last week and that worked but it isn't working with the person I trying to distribute to today. Any suggestions? TIA Ed Edward P. Tesiny Director of Evaluation and Outcomes Management New York State OASAS 1450 Western Avenue Albany, NY 12203 Phone: (518) 485-2322 Fax: (518) 485-5228 EdTesiny at oasas.ny.gov IMPORTANT: This E-mail may contain confidential material for the sole use of the intended recipient. The use, distribution, transmittal or re-transmittal by an unintended recipient of any communication is prohibited without our express approval in writing or by e-mail. Any use, distribution, transmittal or re-transmittal by persons who are not intended recipients of this e-mail may be a violation of law and is strictly prohibited. If you are not the intended recipient please contact the sender and delete all copies. E-mail transmission cannot be guaranteed to be secure or error-free. The sender therefore does not accept liability for any errors or omissions in the contents of this transmission. All e-mails sent to or from NYS OASAS are to be used for our business purposes only. E-mails sent from or to NYS OASAS are subject to review by the Agency. -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From fuller.artful at gmail.com Tue Jul 5 13:04:16 2011 From: fuller.artful at gmail.com (Arthur Fuller) Date: Tue, 5 Jul 2011 14:04:16 -0400 Subject: [AccessD] Emailing an .mde In-Reply-To: References: Message-ID: Just rename it to MyFile.mdee and tell the recipient to name it back upon receipt. HTH. Arthur On Tue, Jul 5, 2011 at 1:09 PM, Tesiny, Ed wrote: > Hi All, > > I'm trying to email a database frontend, of course our system blocks it. > Is there an extension that is fairly neutral, I tried .doc with one > person last week and that worked but it isn't working with the person I > trying to distribute to today. Any suggestions? > > TIA > > Ed > > > > Edward P. Tesiny > > Director of Evaluation and Outcomes Management > > New York State OASAS > > 1450 Western Avenue > > Albany, NY 12203 > > Phone: (518) 485-2322 > > Fax: (518) 485-5228 > > EdTesiny at oasas.ny.gov > > > > IMPORTANT: This E-mail may contain confidential material for the sole > use of the intended recipient. The use, distribution, transmittal or > re-transmittal by an unintended recipient of any communication is > prohibited without our express approval in writing or by e-mail. Any > use, distribution, transmittal or re-transmittal by persons who are not > intended recipients of this e-mail may be a violation of law and is > strictly prohibited. If you are not the intended recipient please > contact the sender and delete all copies. E-mail transmission cannot be > guaranteed to be secure or error-free. The sender therefore does not > accept liability for any errors or omissions in the contents of this > transmission. All e-mails sent to or from NYS OASAS are to be used for > our business purposes only. E-mails sent from or to NYS OASAS are > subject to review by the Agency. > > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > From fuller.artful at gmail.com Tue Jul 5 13:06:09 2011 From: fuller.artful at gmail.com (Arthur Fuller) Date: Tue, 5 Jul 2011 14:06:09 -0400 Subject: [AccessD] Sourcegear vault free two developer license In-Reply-To: <001d01cc3b11$5c1bf280$1453d780$@comcast.net> References: <4E12D1A4.1010809@colbyconsulting.com> <001d01cc3b11$5c1bf280$1453d780$@comcast.net> Message-ID: Since I've completely eliminated all my programming errors and second thoughts, I no longer need version control. LOL. I need Developer Control. A. On Tue, Jul 5, 2011 at 8:45 AM, Dan Waters wrote: > Is a version control system useful for a single developer? I noticed that > this offer is for 2 developers, assuming that it would help more than one > developer. > > From adtp at airtelmail.in Tue Jul 5 13:07:22 2011 From: adtp at airtelmail.in (A.D. Tejpal) Date: Tue, 5 Jul 2011 23:37:22 +0530 Subject: [AccessD] How to tell a button's "air space"is nolonger beinghovered over References: <003b01cc38f1$b62edca0$228c95e0$@gmail.com><471F6C8DAB244C66B0AB79536085B3EC@personal4a8ede> <002001cc3a5e$5428d240$fc7a76c0$@gmail.com><8DD6228312434CD0940AE4E4807C4FF6@personal4a8ede> <001201cc3b0b$40feef30$c2fccd90$@gmail.com> Message-ID: You are most welcome Bill! ps: Last month you were seeking a solution for synchronized scrolling of a pair of subforms. Does the problem stand resolved ? Best wishes, A.D. Tejpal ------------ ----- Original Message ----- From: William Benson (VBACreations.Com) To: 'Access Developers discussion and problem solving' Sent: Tuesday, July 05, 2011 17:31 Subject: Re: [AccessD] How to tell a button's "air space"is nolonger beinghovered over I tried your code A.D., it works pretty well. It occasionally misses when the button's edge is near the top (but not at the top) of its section and when another control is near the button's edge.. But it's great, thank you. -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of A.D. Tejpal Sent: Tuesday, July 05, 2011 5:10 AM To: Access Developers discussion and problem solving Subject: Re: [AccessD] How to tell a button's "air space" is nolonger beinghovered over Bill, Apparently, in view of special positioning of control in question, you are looking for a solution that is self contained within control's MouseMove event. You could experiment with sample code given below: ' Code in form's module '============================== ' Declarations section Private gX As Single, gY As Single '--------------------------------------------- Private Sub CmdTest_MouseMove( _ Button As Integer, _ Shift As Integer, _ X As Single, Y As Single) With Me.CmdTest Me.CmdTest.Caption = "Test (MM)" If gX <> 0 Then If (X > (0.9 * .Width) And X > gX) _ Or (X < (0.1 * .Width) And _ X < gX) Then Me.CmdTest.Caption = "Test" End If End If If gY <> 0 Then If (Y > (0.9 * .Height) And Y > gY) _ Or (Y < (0.1 * .Height) And _ Y < gY) Then Me.CmdTest.Caption = "Test" End If End If End With gX = X gY = Y End Sub '============================== Normal caption of command button named CmdTest is "Test". When mouse pointer is brought over it, the caption changes to "Test (MM)". As & when the mouse pointer moves away from the control, the caption reverts back to normal, i.e. "Test". Note: (a) MouseMove event fires in rapid-fire style. Values for X and Y returned by this event have a range from 0 upto the width and height (in twips) of the control in question. (b) The multiplying factors of 0.9 and 0.1 used in the sample code could perhaps be fine tuned further (say 0.95 and 0.05) so as to narrow down the twilight zone. However a coarser setting as adopted above, is found conducive to more consistent behavior. This is because a deliberately wild mouse sweep by the user can result in X or Y value getting truncated short of the potential maximum, even though the mouse pointer has moved out. Best wishes, A.D. Tejpal ------------ From dw-murphy at cox.net Tue Jul 5 13:23:02 2011 From: dw-murphy at cox.net (Doug Murphy) Date: Tue, 5 Jul 2011 11:23:02 -0700 Subject: [AccessD] Emailing an .mde In-Reply-To: References: Message-ID: <004701cc3b40$936642c0$ba32c840$@cox.net> Ed, My approach is to zip the file. Most email systems accept zipped files. The challenge is to make sure the person receiving the file actually unzips it instead of trying to run it from Windows explorer while in the zipped format. Doug -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Tesiny, Ed Sent: Tuesday, July 05, 2011 10:10 AM To: Access Developers discussion and problem solving; Off Topic Subject: [AccessD] Emailing an .mde Hi All, I'm trying to email a database frontend, of course our system blocks it. Is there an extension that is fairly neutral, I tried .doc with one person last week and that worked but it isn't working with the person I trying to distribute to today. Any suggestions? TIA Ed Edward P. Tesiny Director of Evaluation and Outcomes Management New York State OASAS 1450 Western Avenue Albany, NY 12203 Phone: (518) 485-2322 Fax: (518) 485-5228 EdTesiny at oasas.ny.gov IMPORTANT: This E-mail may contain confidential material for the sole use of the intended recipient. The use, distribution, transmittal or re-transmittal by an unintended recipient of any communication is prohibited without our express approval in writing or by e-mail. Any use, distribution, transmittal or re-transmittal by persons who are not intended recipients of this e-mail may be a violation of law and is strictly prohibited. If you are not the intended recipient please contact the sender and delete all copies. E-mail transmission cannot be guaranteed to be secure or error-free. The sender therefore does not accept liability for any errors or omissions in the contents of this transmission. All e-mails sent to or from NYS OASAS are to be used for our business purposes only. E-mails sent from or to NYS OASAS are subject to review by the Agency. -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From dbdoug at gmail.com Tue Jul 5 13:34:36 2011 From: dbdoug at gmail.com (Doug Steele) Date: Tue, 5 Jul 2011 11:34:36 -0700 Subject: [AccessD] Emailing an .mde In-Reply-To: <004701cc3b40$936642c0$ba32c840$@cox.net> References: <004701cc3b40$936642c0$ba32c840$@cox.net> Message-ID: Exchange Server can be configured to look inside a .zip archive and delete any 'dangerous' files. My solution to this problem is to upload the file Box.net and email a link to the file so the user can download it directly. Doug On Tue, Jul 5, 2011 at 11:23 AM, Doug Murphy wrote: > Ed, > > My approach is to zip the file. Most email systems accept zipped files. The > challenge is to make sure the person receiving the file actually unzips it > instead of trying to run it from Windows explorer while in the zipped > format. > > Doug > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Tesiny, Ed > Sent: Tuesday, July 05, 2011 10:10 AM > To: Access Developers discussion and problem solving; Off Topic > Subject: [AccessD] Emailing an .mde > > Hi All, > > I'm trying to email a database frontend, of course our system blocks it. > Is there an extension that is fairly neutral, I tried .doc with one person > last week and that worked but it isn't working with the person I trying to > distribute to today. ?Any suggestions? > > TIA > > Ed > > > > Edward P. Tesiny > > Director of Evaluation and Outcomes Management > > New York State OASAS > > 1450 Western Avenue > > Albany, NY 12203 > > Phone: ?(518) 485-2322 > > Fax: ?(518) 485-5228 > > EdTesiny at oasas.ny.gov > > > > IMPORTANT: ?This E-mail may contain confidential material for the sole use > of the intended recipient. ?The use, distribution, transmittal or > re-transmittal by an unintended recipient of any communication is prohibited > without our express approval in writing or by e-mail. ?Any use, > distribution, transmittal or re-transmittal by persons who are not intended > recipients of this e-mail may be a violation of law and is > strictly prohibited. ? If you are not the intended recipient please > contact the sender and delete all copies. ?E-mail transmission cannot be > guaranteed to be secure or error-free. ? The sender therefore does not > accept liability for any errors or omissions in the contents of this > transmission. ? All e-mails sent to or from NYS OASAS are to be used for > our business purposes only. ?E-mails sent from or to NYS OASAS are subject > to review by the Agency. > > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > From fuller.artful at gmail.com Tue Jul 5 13:36:26 2011 From: fuller.artful at gmail.com (Arthur Fuller) Date: Tue, 5 Jul 2011 14:36:26 -0400 Subject: [AccessD] Emailing an .mde In-Reply-To: <004701cc3b40$936642c0$ba32c840$@cox.net> References: <004701cc3b40$936642c0$ba32c840$@cox.net> Message-ID: Some email systems look inside sent zips to verify that they don't contain executables. That's why I rename the file. Typically I then zip the renamed file and plonk in a readme that tells the recipient to rename it back. A. On Tue, Jul 5, 2011 at 2:23 PM, Doug Murphy wrote: > Ed, > > My approach is to zip the file. Most email systems accept zipped files. The > challenge is to make sure the person receiving the file actually unzips it > instead of trying to run it from Windows explorer while in the zipped > format. > > Doug > From DWUTKA at Marlow.com Tue Jul 5 13:45:11 2011 From: DWUTKA at Marlow.com (Drew Wutka) Date: Tue, 5 Jul 2011 13:45:11 -0500 Subject: [AccessD] Walk the DB Using ADO In-Reply-To: References: Message-ID: Sorry I don't have this code exactly as you have here. But what you need to do is actually all in recordsets. You use a SCHEMA query to get the list of tables (you can get columns this way if you want, too). And then you use properties of the field to get other values (like field name, value, constraints, etc). Drew -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Arthur Fuller Sent: Saturday, July 02, 2011 12:06 PM To: Access Developers discussion and problem solving Subject: [AccessD] Walk the DB Using ADO I know that I've written this code before, but due to a plethora of backup CDs and my habit of pruning what is not currently necessary from the current situation(s), I can't find the relevant code. And besides, I'm currently semi-retired, and working in hobbyist most not billable mode. Here's what I need, in ADO format if possible: For each t in CurrentDB( Tables ) For each f in t.fields For each a in f.Attributes ' could be Properties not Attributes Debug.Print a.Name, a.Value Next Next Next TIA, Arthur P.S. For years and years and years, I have used Rick Fisher's FindAndReplace, but now it's failing on me due to (I think) the fact that I'm running a 64-bit Windows, which doesn't like what he offers to install. In my retirement mode, I cannot afford to purchase more software. Maybe I could run a Windows 32-bit version of everything, then run F&R, then do what I need to do, then import the results back into 64-bit. Yuck. -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com The information contained in this transmission is intended only for the person or entity to which it is addressed and may contain II-VI Proprietary and/or II-VI Business Sensitive material. If you are not the intended recipient, please contact the sender immediately and destroy the material in its entirety, whether electronic or hard copy. You are notified that any review, retransmission, copying, disclosure, dissemination, or other use of, or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. From dw-murphy at cox.net Tue Jul 5 13:57:08 2011 From: dw-murphy at cox.net (Doug Murphy) Date: Tue, 5 Jul 2011 11:57:08 -0700 Subject: [AccessD] Emailing an .mde In-Reply-To: References: <004701cc3b40$936642c0$ba32c840$@cox.net> Message-ID: <005a01cc3b45$5716b570$05442050$@cox.net> The zip file works with most email systems. The only one that seemed to look inside the zip file, in my limited experience, is Gmail. For that system I just reverse the extension piz. Even Gmail seems to accept the Access files now, but maybe they have not entered accdb in their system yet. I zip all files I email just to reduce size. For large files I use USendIt. -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Arthur Fuller Sent: Tuesday, July 05, 2011 11:36 AM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Emailing an .mde Some email systems look inside sent zips to verify that they don't contain executables. That's why I rename the file. Typically I then zip the renamed file and plonk in a readme that tells the recipient to rename it back. A. On Tue, Jul 5, 2011 at 2:23 PM, Doug Murphy wrote: > Ed, > > My approach is to zip the file. Most email systems accept zipped > files. The challenge is to make sure the person receiving the file > actually unzips it instead of trying to run it from Windows explorer > while in the zipped format. > > Doug > -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From jwcolby at colbyconsulting.com Tue Jul 5 13:59:13 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Tue, 05 Jul 2011 14:59:13 -0400 Subject: [AccessD] Sourcegear vault free two developer license In-Reply-To: References: <4E12D1A4.1010809@colbyconsulting.com> <001d01cc3b11$5c1bf280$1453d780$@comcast.net> Message-ID: <4E135F01.4010505@colbyconsulting.com> LOL. Why didn't I think of that? All that time wasted. John W. Colby www.ColbyConsulting.com On 7/5/2011 2:06 PM, Arthur Fuller wrote: > Since I've completely eliminated all my programming errors and second > thoughts, I no longer need version control. LOL. I need Developer Control. > > A. > > On Tue, Jul 5, 2011 at 8:45 AM, Dan Waters wrote: > >> Is a version control system useful for a single developer? I noticed that >> this offer is for 2 developers, assuming that it would help more than one >> developer. >> >> From vbacreations at gmail.com Tue Jul 5 14:02:23 2011 From: vbacreations at gmail.com (William Benson (VBACreations.Com)) Date: Tue, 5 Jul 2011 15:02:23 -0400 Subject: [AccessD] Walk the DB Using ADO In-Reply-To: References: Message-ID: <001901cc3b46$133212e0$399638a0$@gmail.com> >> that I'm running a 64-bit Windows Need that in retirement mode eh? :-) -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Arthur Fuller Sent: Saturday, July 02, 2011 1:06 PM To: Access Developers discussion and problem solving Subject: [AccessD] Walk the DB Using ADO I know that I've written this code before, but due to a plethora of backup CDs and my habit of pruning what is not currently necessary from the current situation(s), I can't find the relevant code. And besides, I'm currently semi-retired, and working in hobbyist most not billable mode. Here's what I need, in ADO format if possible: For each t in CurrentDB( Tables ) For each f in t.fields For each a in f.Attributes ' could be Properties not Attributes Debug.Print a.Name, a.Value Next Next Next TIA, Arthur P.S. For years and years and years, I have used Rick Fisher's FindAndReplace, but now it's failing on me due to (I think) the fact that I'm running a 64-bit Windows, which doesn't like what he offers to install. In my retirement mode, I cannot afford to purchase more software. Maybe I could run a Windows 32-bit version of everything, then run F&R, then do what I need to do, then import the results back into 64-bit. Yuck. -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From EdTesiny at oasas.ny.gov Tue Jul 5 14:48:32 2011 From: EdTesiny at oasas.ny.gov (Tesiny, Ed) Date: Tue, 5 Jul 2011 15:48:32 -0400 Subject: [AccessD] Emailing an .mde In-Reply-To: <005a01cc3b45$5716b570$05442050$@cox.net> References: <004701cc3b40$936642c0$ba32c840$@cox.net> <005a01cc3b45$5716b570$05442050$@cox.net> Message-ID: I got the mde on her desktop but can't map here to the right folder. I think IT needs to fix her permissions...but they have been a little busy as our building was hit by lightening on Sunday morning. :-( Ed Tesiny EdTesiny at oasas.ny.gov -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Doug Murphy Sent: Tuesday, July 05, 2011 2:57 PM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Emailing an .mde The zip file works with most email systems. The only one that seemed to look inside the zip file, in my limited experience, is Gmail. For that system I just reverse the extension piz. Even Gmail seems to accept the Access files now, but maybe they have not entered accdb in their system yet. I zip all files I email just to reduce size. For large files I use USendIt. -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Arthur Fuller Sent: Tuesday, July 05, 2011 11:36 AM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Emailing an .mde Some email systems look inside sent zips to verify that they don't contain executables. That's why I rename the file. Typically I then zip the renamed file and plonk in a readme that tells the recipient to rename it back. A. On Tue, Jul 5, 2011 at 2:23 PM, Doug Murphy wrote: > Ed, > > My approach is to zip the file. Most email systems accept zipped > files. The challenge is to make sure the person receiving the file > actually unzips it instead of trying to run it from Windows explorer > while in the zipped format. > > Doug > -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From fuller.artful at gmail.com Tue Jul 5 14:57:57 2011 From: fuller.artful at gmail.com (Arthur Fuller) Date: Tue, 5 Jul 2011 15:57:57 -0400 Subject: [AccessD] Walk the DB Using ADO In-Reply-To: References: Message-ID: Thanks, Drew. I'll give that a shot. It's been a while since I looked carefully at the ADO model for other than typical recordset operations.. I seem to recall that somewhere I have a diagram of it, and even a DAO->ADO conversion chart. Time to start perusing the documents directories. A. On Tue, Jul 5, 2011 at 2:45 PM, Drew Wutka wrote: > Sorry I don't have this code exactly as you have here. But what you > need to do is actually all in recordsets. > > You use a SCHEMA query to get the list of tables (you can get columns > this way if you want, too). And then you use properties of the field to > get other values (like field name, value, constraints, etc). > > Drew > > From DWUTKA at Marlow.com Tue Jul 5 15:07:59 2011 From: DWUTKA at Marlow.com (Drew Wutka) Date: Tue, 5 Jul 2011 15:07:59 -0500 Subject: [AccessD] Walk the DB Using ADO In-Reply-To: References: Message-ID: Would you like me to send my VB6 Add-on to you off list, which lets me create 'data classes'? It has code to pull the tables and fields from a data source using ADO. Drew -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Arthur Fuller Sent: Tuesday, July 05, 2011 2:58 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Walk the DB Using ADO Thanks, Drew. I'll give that a shot. It's been a while since I looked carefully at the ADO model for other than typical recordset operations.. I seem to recall that somewhere I have a diagram of it, and even a DAO->ADO conversion chart. Time to start perusing the documents directories. A. On Tue, Jul 5, 2011 at 2:45 PM, Drew Wutka wrote: > Sorry I don't have this code exactly as you have here. But what you > need to do is actually all in recordsets. > > You use a SCHEMA query to get the list of tables (you can get columns > this way if you want, too). And then you use properties of the field to > get other values (like field name, value, constraints, etc). > > Drew > > -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com The information contained in this transmission is intended only for the person or entity to which it is addressed and may contain II-VI Proprietary and/or II-VI Business Sensitive material. If you are not the intended recipient, please contact the sender immediately and destroy the material in its entirety, whether electronic or hard copy. You are notified that any review, retransmission, copying, disclosure, dissemination, or other use of, or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. From fuller.artful at gmail.com Tue Jul 5 15:14:47 2011 From: fuller.artful at gmail.com (Arthur Fuller) Date: Tue, 5 Jul 2011 16:14:47 -0400 Subject: [AccessD] Walk the DB Using ADO In-Reply-To: References: Message-ID: Does it require that I have VB6 installed? I suppose I could do that, but at the moment I have only the .NET stuff installed. Sounds like a good add-in, though. A. On Tue, Jul 5, 2011 at 4:07 PM, Drew Wutka wrote: > Would you like me to send my VB6 Add-on to you off list, which lets me > create 'data classes'? It has code to pull the tables and fields from a > data source using ADO. > > Drew > From DWUTKA at Marlow.com Tue Jul 5 15:25:33 2011 From: DWUTKA at Marlow.com (Drew Wutka) Date: Tue, 5 Jul 2011 15:25:33 -0500 Subject: [AccessD] Walk the DB Using ADO In-Reply-To: References: Message-ID: Think I can do this in list. Here are the three relevant functions you should be able to get what you need from them. Private Sub lstTables_Click() Dim cnn As ADODB.Connection Dim rs As ADODB.Recordset Dim i As Long Me.lstFields.Clear If DBConnect(cnn) Then Set rs = New ADODB.Recordset rs.Open Me.lstTables.List(Me.lstTables.ListIndex), cnn, adOpenKeyset, adLockReadOnly, adCmdTableDirect For i = 0 To rs.Fields.Count - 1 Me.lstFields.AddItem rs.Fields(i).Name Next i rs.Close Set rs = Nothing cnn.Close Set cnn = Nothing End If End Sub Function GetDBTables() On Error GoTo ErrorHandler Dim cnn As ADODB.Connection Dim rs As ADODB.Recordset If DBConnect(cnn) Then Set rs = cnn.OpenSchema(adSchemaTables) Me.lstTables.Clear rs.MoveFirst Do Until rs.EOF = True If Me.optTables Then If rs.Fields("TABLE_TYPE") = "TABLE" Then Me.lstTables.AddItem rs.Fields("TABLE_NAME") Else If rs.Fields("TABLE_TYPE") = "VIEW" Then Me.lstTables.AddItem rs.Fields("TABLE_NAME") End If rs.MoveNext Loop rs.Close Set rs = Nothing cnn.Close Set cnn = Nothing End If Exit Function ErrorHandler: Err.Clear End Function Function DBConnect(ByRef cnn As ADODB.Connection) As Boolean On Error GoTo ErrorHandler Set cnn = New ADODB.Connection cnn.Provider = "Microsoft.Jet.OLEDB.4.0" If Dir(Me.txtWorkGroupPath) <> "" Then cnn.Properties("Jet OLEDB:System database").Value = Me.txtWorkGroupPath cnn.Open Me.txtDBPath, Me.txtUserName, Me.txtPassword Else cnn.Open Me.txtDBPath End If DBConnect = True Exit Function ErrorHandler: Err.Clear DBConnect = False End Function -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Arthur Fuller Sent: Tuesday, July 05, 2011 3:15 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Walk the DB Using ADO Does it require that I have VB6 installed? I suppose I could do that, but at the moment I have only the .NET stuff installed. Sounds like a good add-in, though. A. On Tue, Jul 5, 2011 at 4:07 PM, Drew Wutka wrote: > Would you like me to send my VB6 Add-on to you off list, which lets me > create 'data classes'? It has code to pull the tables and fields from a > data source using ADO. > > Drew > -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com The information contained in this transmission is intended only for the person or entity to which it is addressed and may contain II-VI Proprietary and/or II-VI Business Sensitive material. If you are not the intended recipient, please contact the sender immediately and destroy the material in its entirety, whether electronic or hard copy. You are notified that any review, retransmission, copying, disclosure, dissemination, or other use of, or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. From fuller.artful at gmail.com Tue Jul 5 15:28:14 2011 From: fuller.artful at gmail.com (Arthur Fuller) Date: Tue, 5 Jul 2011 16:28:14 -0400 Subject: [AccessD] "Modern" replacement for CommonDlg Message-ID: I may have asked this before; if so, please forgive the redundancy. I've got an old app that I'm sprucing up with A2K7 to run on Windows 7. Some code I lifted from the ADH musketeers no longer works. It seems that the CommonDlg thingie has vanished. I need essentially that functionality, but that works in A2K7 and A2K10: It opens the Windows Open/Save dialog with a bunch of arguments: Public Function adhCommonFileOpenSave( _ Optional ByRef Flags As adhFileOpenConstants = 0, _ Optional ByVal Filter As String = "", _ Optional ByVal FilterIndex As Long = 1, _ Optional ByVal DefaultExt As String = "", _ Optional ByVal FileName As String = "", _ Optional ByVal DialogTitle As String = "", _ Optional ByVal InitDir As String = "", _ Optional ByVal hwndOwner As Long = 0, _ Optional ByVal OpenFile As Boolean = True) As String In a couple of places in the app, I need to ask the user for the directory in which to save this file, or alternatively, the directory to associate with the selected Customer and|or Project. Any suggestions or code to do this? I want to attach it to a button and have the dialog open on the the specified initial directory, then allow creation of a new subdir beneath that, and ultimately return the final directory name. TIA, Arthur From stuart at lexacorp.com.pg Tue Jul 5 15:54:31 2011 From: stuart at lexacorp.com.pg (Stuart McLachlan) Date: Wed, 06 Jul 2011 06:54:31 +1000 Subject: [AccessD] [dba-OT] Emailing an .mde In-Reply-To: References: Message-ID: <4E137A07.1549.21A7C35E@stuart.lexacorp.com.pg> I normally zip and files that i need to email and rename them as .piz On 5 Jul 2011 at 13:09, Tesiny, Ed wrote: > Hi All, > > I'm trying to email a database frontend, of course our system blocks > it. Is there an extension that is fairly neutral, I tried .doc with > one person last week and that worked but it isn't working with the > person I trying to distribute to today. Any suggestions? > > TIA > > Ed > > > > Edward P. Tesiny > > Director of Evaluation and Outcomes Management > > New York State OASAS > > 1450 Western Avenue > > Albany, NY 12203 > > Phone: (518) 485-2322 > > Fax: (518) 485-5228 > > EdTesiny at oasas.ny.gov > > > > IMPORTANT: This E-mail may contain confidential material for the sole > use of the intended recipient. The use, distribution, transmittal or > re-transmittal by an unintended recipient of any communication is > prohibited without our express approval in writing or by e-mail. Any > use, distribution, transmittal or re-transmittal by persons who are > not intended recipients of this e-mail may be a violation of law and > is strictly prohibited. If you are not the intended recipient please > contact the sender and delete all copies. E-mail transmission cannot > be guaranteed to be secure or error-free. The sender therefore does > not accept liability for any errors or omissions in the contents of > this transmission. All e-mails sent to or from NYS OASAS are to be > used for our business purposes only. E-mails sent from or to NYS > OASAS are subject to review by the Agency. > > > > _______________________________________________ > dba-OT mailing list > dba-OT at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-ot > Website: http://www.databaseadvisors.com > From stuart at lexacorp.com.pg Tue Jul 5 16:01:03 2011 From: stuart at lexacorp.com.pg (Stuart McLachlan) Date: Wed, 06 Jul 2011 07:01:03 +1000 Subject: [AccessD] "Modern" replacement for CommonDlg In-Reply-To: References: Message-ID: <4E137B8F.24761.21ADBC5C@stuart.lexacorp.com.pg> Here' ya go, I'm sure I've posted this a few times in the past. Declare Function GetOpenFileName Lib "comdlg32.dll" Alias _ "GetOpenFileNameA" (pOpenfilename As OPENFILENAME) As Long Type OPENFILENAME lStructSize As Long hwndOwner As Long hInstance As Long lpstrFilter As String lpstrCustomFilter As String nMaxCustFilter As Long nFilterIndex As Long lpstrFile As String nMaxFile As Long lpstrFileTitle As String nMaxFileTitle As Long lpstrInitialDir As String lpstrTitle As String flags As Long nFileOffset As Integer nFileExtension As Integer lpstrDefExt As String lCustData As Long lpfnHook As Long lpTemplateName As String End Type Function GetFileName(Directory As String) As String Dim OpenFile As OPENFILENAME Dim lReturn As Long Dim sFilter As String OpenFile.lStructSize = Len(OpenFile) OpenFile.hwndOwner = 0 OpenFile.hInstance = 0 sFilter = "" & Chr(0) OpenFile.lpstrFilter = sFilter OpenFile.nFilterIndex = 0 OpenFile.lpstrFile = String(257, 0) OpenFile.nMaxFile = Len(OpenFile.lpstrFile) - 1 OpenFile.lpstrFileTitle = OpenFile.lpstrFile OpenFile.nMaxFileTitle = OpenFile.nMaxFile OpenFile.lpstrInitialDir = Directory OpenFile.lpstrTitle = "Select File" OpenFile.flags = 0 lReturn = GetOpenFileName(OpenFile) GetFileName = Left$(OpenFile.lpstrFile, InStr(OpenFile.lpstrFile, Chr$(0)) - 1) End Function On 5 Jul 2011 at 16:28, Arthur Fuller wrote: > I may have asked this before; if so, please forgive the redundancy. > I've got an old app that I'm sprucing up with A2K7 to run on Windows > 7. Some code I lifted from the ADH musketeers no longer works. It > seems that the CommonDlg thingie has vanished. > > I need essentially that functionality, but that works in A2K7 and > A2K10: It opens the Windows Open/Save dialog with a bunch of > arguments: > From charlotte.foust at gmail.com Tue Jul 5 16:08:20 2011 From: charlotte.foust at gmail.com (Charlotte Foust) Date: Tue, 5 Jul 2011 14:08:20 -0700 Subject: [AccessD] Sourcegear vault free two developer license In-Reply-To: References: <4E12D1A4.1010809@colbyconsulting.com> <001d01cc3b11$5c1bf280$1453d780$@comcast.net> Message-ID: Arthur, I know a LOT of developers who need that! LOL Charlotte Foust On Tue, Jul 5, 2011 at 11:06 AM, Arthur Fuller wrote: > Since I've completely eliminated all my programming errors and second > thoughts, I no longer need version control. LOL. I need Developer Control. > > A. > > On Tue, Jul 5, 2011 at 8:45 AM, Dan Waters wrote: > > > Is a version control system useful for a single developer? I noticed > that > > this offer is for 2 developers, assuming that it would help more than one > > developer. > > > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > > > Website: http://www.databaseadvisors.com > > > From fuller.artful at gmail.com Tue Jul 5 16:15:18 2011 From: fuller.artful at gmail.com (Arthur Fuller) Date: Tue, 5 Jul 2011 17:15:18 -0400 Subject: [AccessD] Sourcegear vault free two developer license In-Reply-To: References: <4E12D1A4.1010809@colbyconsulting.com> <001d01cc3b11$5c1bf280$1453d780$@comcast.net> Message-ID: wii Do Two. A. You're never alone if you're schizophrenic. What did you say? Noffink! Knot a bloddy nerd. On Tue, Jul 5, 2011 at 5:08 PM, Charlotte Foust wrote: > Arthur, > > I know a LOT of developers who need that! LOL > > Charlotte Foust > > From fahooper at gmail.com Tue Jul 5 16:18:54 2011 From: fahooper at gmail.com (Fred Hooper) Date: Tue, 05 Jul 2011 17:18:54 -0400 Subject: [AccessD] Walk the DB Using ADO In-Reply-To: References: Message-ID: <4E137FBE.2020006@gmail.com> Hi Arthur, As I work with new databases frequently, I've found it useful to create an Access db that uses ADO to get information on the owners, tables and views -- and place it in an Access table. It currently works for Oracle and SQL Server. I'm happy to send a copy if it would be helpful. Fred Hooper On 7/5/2011 3:57 PM, Arthur Fuller wrote: > Thanks, Drew. I'll give that a shot. It's been a while since I looked > carefully at the ADO model for other than typical recordset operations.. I > seem to recall that somewhere I have a diagram of it, and even a DAO->ADO > conversion chart. Time to start perusing the documents directories. > > A. > > On Tue, Jul 5, 2011 at 2:45 PM, Drew Wutka wrote: > >> Sorry I don't have this code exactly as you have here. But what you >> need to do is actually all in recordsets. >> >> You use a SCHEMA query to get the list of tables (you can get columns >> this way if you want, too). And then you use properties of the field to >> get other values (like field name, value, constraints, etc). >> >> Drew >> >> From fahooper at gmail.com Tue Jul 5 16:24:55 2011 From: fahooper at gmail.com (Fred Hooper) Date: Tue, 05 Jul 2011 17:24:55 -0400 Subject: [AccessD] Walk the DB Using ADO In-Reply-To: <4E137FBE.2020006@gmail.com> References: <4E137FBE.2020006@gmail.com> Message-ID: <4E138127.6080001@gmail.com> Whoops, also fields with their type, width and indexes. On 7/5/2011 5:18 PM, Fred Hooper wrote: > Hi Arthur, > > As I work with new databases frequently, I've found it useful to > create an Access db that uses ADO to get information on the owners, > tables and views -- and place it in an Access table. It currently > works for Oracle and SQL Server. > > I'm happy to send a copy if it would be helpful. > > Fred Hooper > > On 7/5/2011 3:57 PM, Arthur Fuller wrote: >> Thanks, Drew. I'll give that a shot. It's been a while since I looked >> carefully at the ADO model for other than typical recordset >> operations.. I >> seem to recall that somewhere I have a diagram of it, and even a >> DAO->ADO >> conversion chart. Time to start perusing the documents directories. >> >> A. >> >> On Tue, Jul 5, 2011 at 2:45 PM, Drew Wutka wrote: >> >>> Sorry I don't have this code exactly as you have here. But what you >>> need to do is actually all in recordsets. >>> >>> You use a SCHEMA query to get the list of tables (you can get columns >>> this way if you want, too). And then you use properties of the >>> field to >>> get other values (like field name, value, constraints, etc). >>> >>> Drew >>> >>> From fuller.artful at gmail.com Tue Jul 5 17:05:23 2011 From: fuller.artful at gmail.com (Arthur Fuller) Date: Tue, 5 Jul 2011 18:05:23 -0400 Subject: [AccessD] Walk the DB Using ADO In-Reply-To: <4E137FBE.2020006@gmail.com> References: <4E137FBE.2020006@gmail.com> Message-ID: I would most appreciate your Send! Thx, A. On Tue, Jul 5, 2011 at 5:18 PM, Fred Hooper wrote: > Hi Arthur, > > As I work with new databases frequently, I've found it useful to create an > Access db that uses ADO to get information on the owners, tables and views > -- and place it in an Access table. It currently works for Oracle and SQL > Server. > > I'm happy to send a copy if it would be helpful. > > Fred Hooper > > > On 7/5/2011 3:57 PM, Arthur Fuller wrote: > >> Thanks, Drew. I'll give that a shot. It's been a while since I looked >> carefully at the ADO model for other than typical recordset operations.. I >> seem to recall that somewhere I have a diagram of it, and even a DAO->ADO >> conversion chart. Time to start perusing the documents directories. >> >> A. >> >> On Tue, Jul 5, 2011 at 2:45 PM, Drew Wutka wrote: >> >> Sorry I don't have this code exactly as you have here. But what you >>> need to do is actually all in recordsets. >>> >>> You use a SCHEMA query to get the list of tables (you can get columns >>> this way if you want, too). And then you use properties of the field to >>> get other values (like field name, value, constraints, etc). >>> >>> Drew >>> >>> >>> -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/**mailman/listinfo/accessd > Website: http://www.databaseadvisors.**com > From steve at datamanagementsolutions.biz Tue Jul 5 18:14:54 2011 From: steve at datamanagementsolutions.biz (Steve Schapel) Date: Wed, 6 Jul 2011 11:14:54 +1200 Subject: [AccessD] Emailing an .mde In-Reply-To: References: Message-ID: Ed I don't remember the last time I sent an email with a file attached. I always upload it to Dropbox, and then email the link for them to grab it from there. Very easy. Regards Steve -----Original Message----- From: Tesiny, Ed Sent: Wednesday, July 06, 2011 5:09 AM To: Access Developers discussion and problem solving ; Off Topic Subject: [AccessD] Emailing an .mde Hi All, I'm trying to email a database frontend, of course our system blocks it. Is there an extension that is fairly neutral, I tried .doc with one person last week and that worked but it isn't working with the person I trying to distribute to today. Any suggestions? TIA Ed From fuller.artful at gmail.com Wed Jul 6 00:37:47 2011 From: fuller.artful at gmail.com (Arthur Fuller) Date: Wed, 6 Jul 2011 01:37:47 -0400 Subject: [AccessD] "Modern" replacement for CommonDlg In-Reply-To: <4E137B8F.24761.21ADBC5C@stuart.lexacorp.com.pg> References: <4E137B8F.24761.21ADBC5C@stuart.lexacorp.com.pg> Message-ID: Thanks! A. On Tue, Jul 5, 2011 at 5:01 PM, Stuart McLachlan wrote: > Here' ya go, I'm sure I've posted this a few times in the past. > > From vbacreations at gmail.com Wed Jul 6 06:28:25 2011 From: vbacreations at gmail.com (William Benson (VBACreations.Com)) Date: Wed, 6 Jul 2011 07:28:25 -0400 Subject: [AccessD] "Modern" replacement for CommonDlg In-Reply-To: <4E137B8F.24761.21ADBC5C@stuart.lexacorp.com.pg> References: <4E137B8F.24761.21ADBC5C@stuart.lexacorp.com.pg> Message-ID: <002e01cc3bcf$d2959830$77c0c890$@gmail.com> If you put in a reference to Office 12.0 or Office 14.0, I think Access will find the opposite one on another user's machine. Then you can use the dialog. Below is code I wrote which will not require API and allows you to pass in strings for the file filter of this nature *.XL*|*.TXT|*.DAT|*.CSV and like items are grouped when it comes to the description. I quit after the most common file types. Also, I could have written a sort routine to put the detail items together in the filter, but I have not (yet). (text files: TXT, DAT, CSV) Function GetSelectedFile(Optional ExtensionStringWithPipeSeparator) As String Dim iFileTypes As Long Dim fDialog As Office.FileDialog Dim varFile As Variant Dim strTypes As String Dim strFilters As String Dim strTemp As String Dim strParseThis As String Dim ItemsSkipped() Dim strSkipped As String Dim i As Long strFilters = "" strTypes = "" ReDim ItemsSkipped(0) If Not IsMissing(ExtensionStringWithPipeSeparator) Then strParseThis = CStr(ExtensionStringWithPipeSeparator) Else strParseThis = "*.*" End If If strParseThis <> "*.*" Then Do Until InStr(strParseThis, "|") = 0 strTemp = Left(strParseThis, InStr(strParseThis, "|") - 1) strParseThis = Mid(strParseThis, Len(strTemp) + 2) strTemp = Replace$(strTemp, "*.", "") UpdateFilterAndType strTypes:=strTypes, strFilters:=strFilters, strTemp:=strTemp, ItemsSkipped:=ItemsSkipped Loop strTemp = Replace$(strParseThis, "*.", "") UpdateFilterAndType strTypes:=strTypes, strFilters:=strFilters, strTemp:=strTemp, ItemsSkipped:=ItemsSkipped Else strTypes = strTypes & ";*.*" strFilters = strFilters & ",All Files" End If If UBound(ItemsSkipped) > 0 Then strSkipped = "" For i = 1 To UBound(ItemsSkipped) strSkipped = strSkipped & Chr(13) & "'" & ItemsSkipped(i) & "'" Next strSkipped = Mid(strSkipped, 2) MsgBox "Known file Type List not comprehensive enough to accommodate extension(s):" & Chr(13) & Chr(13) & strSkipped End If If strTypes <> "" Then Set fDialog = Application.FileDialog(msoFileDialogFilePicker) fDialog.AllowMultiSelect = False fDialog.Title = "Select a file to examine" fDialog.Filters.Clear fDialog.Filters.Add Mid(strFilters, 2), Mid(strTypes, 2) If fDialog.Show <> True Then 'MsgBox "You clicked Cancel in the file dialog box." GoTo Exit_Me Else Set varFile = fDialog.SelectedItems GetSelectedFile = varFile(1) End If Else MsgBox "No Accepted File Types Were Specified!", vbInformation GetSelectedFile = "" End If Exit_Me: End Function Private Function UpdateFilterAndType(ByRef strTypes As String, ByRef strFilters As String, strTemp As String, ByRef ItemsSkipped) If InStr(UCase(strTemp), "DOC") > 0 Then If InStr(UCase(strFilters), "DOC") = 0 Then strFilters = strFilters & "," & "Doc" End If ElseIf InStr(UCase(strTemp), "RTF") > 0 Then If InStr(UCase(strFilters), "DOC") = 0 Then strFilters = strFilters & "," & "Doc" End If ElseIf InStr(UCase(strTemp), "PDF") > 0 Then strFilters = strFilters & "," & "Pdf" ElseIf InStr(UCase(strTemp), "MD") > 0 Then strFilters = strFilters & "," & "Acc" ElseIf InStr(UCase(strTemp), "XL") > 0 Then If InStr(UCase(strFilters), "SSHT") = 0 Then strFilters = strFilters & "," & "Ssht" End If ElseIf InStr(UCase(strTemp), "WK") > 0 Then If InStr(UCase(strFilters), "SSHT") = 0 Then strFilters = strFilters & "," & "Ssht" End If ElseIf InStr(UCase(strTemp), "TXT") > 0 Then If InStr(UCase(strFilters), "TEXT") = 0 Then strFilters = strFilters & "," & "Text" End If ElseIf InStr(UCase(strTemp), "CSV") > 0 Then If InStr(UCase(strFilters), "TEXT") = 0 Then strFilters = strFilters & "," & "Text" End If ElseIf InStr(UCase(strTemp), "LOG") > 0 Then If InStr(UCase(strFilters), "TEXT") = 0 Then strFilters = strFilters & "," & "Text" End If ElseIf InStr(UCase(strTemp), "DAT") > 0 Then If InStr(UCase(strFilters), "TEXT") = 0 Then strFilters = strFilters & "," & "Text" End If Else If UBound(ItemsSkipped) = 0 Then ReDim ItemsSkipped(1) Else ReDim Preserve ItemsSkipped(UBound(ItemsSkipped) + 1) End If ItemsSkipped(UBound(ItemsSkipped)) = strTemp GoTo Exit_Me End If strTypes = strTypes & ";" & "*." & LCase(strTemp) Exit_Me: End Function From jwcolby at colbyconsulting.com Wed Jul 6 06:46:07 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Wed, 06 Jul 2011 07:46:07 -0400 Subject: [AccessD] =?windows-1252?q?HASHBYTES_=96_A_T-SQL_Function_-_SQL_M?= =?windows-1252?q?usings_-_SQLServerCentral=2Ecom?= Message-ID: <4E144AFF.5010306@colbyconsulting.com> We were discussing hashes awhile back. -- John W. Colby www.ColbyConsulting.com http://www.sqlservercentral.com/blogs/steve_jones/archive/2011/6/28/hashbytes-_1320_-a-t_2D00_sql-function.aspx From fuller.artful at gmail.com Wed Jul 6 07:39:34 2011 From: fuller.artful at gmail.com (Arthur Fuller) Date: Wed, 6 Jul 2011 08:39:34 -0400 Subject: [AccessD] "Modern" replacement for CommonDlg In-Reply-To: <002e01cc3bcf$d2959830$77c0c890$@gmail.com> References: <4E137B8F.24761.21ADBC5C@stuart.lexacorp.com.pg> <002e01cc3bcf$d2959830$77c0c890$@gmail.com> Message-ID: Thanks for this. It does appear to work nicely for selecting a file, but I'm not sure how to modify it to return the selected directory rather than a file in it. A. From vbacreations at gmail.com Wed Jul 6 07:50:05 2011 From: vbacreations at gmail.com (William Benson (VBACreations.Com)) Date: Wed, 6 Jul 2011 08:50:05 -0400 Subject: [AccessD] populating a textbox-type field in one table, calc'ed from another table Message-ID: <002f01cc3bdb$3b067fa0$b1137ee0$@gmail.com> Dear Colleagues, The below expression works when the display control for the field is a listbox, and the above expression its row source. But it won't work (as written) when the display control is a textbox and the expression is the Default Value -- getting syntax error. Default Value = SELECT Sum(Tbl_Field_Values.Items) FROM Tbl_Field_Values WHERE Tbl_Field_Values.WB = WB and Tbl_Field_Values.WS = WS and Tbl_Field_Values.FLD = FLD GROUP BY Tbl_Field_Values.WB, Tbl_Field_Values.WS, Tbl_Field_Values.FLD; Table: Tbl_Field_Values_Header Field: SumOfItems Can the syntax be improved to cause the sum of all items where WB, WS, and FLD match between Tbl_Field_Values and Tbl_Field_Values_Header, to display as the default value in the field I am trying to populate (SumOfItems) in my Tbl_Field_Values_Header table? From stuart at lexacorp.com.pg Wed Jul 6 08:02:41 2011 From: stuart at lexacorp.com.pg (Stuart McLachlan) Date: Wed, 06 Jul 2011 23:02:41 +1000 Subject: [AccessD] "Modern" replacement for CommonDlg In-Reply-To: References: , <002e01cc3bcf$d2959830$77c0c890$@gmail.com>, Message-ID: <4E145CF1.1188.D6EFDE@stuart.lexacorp.com.pg> If you want to select a folder, you don't use OpenFilename(), you use ShBrowseForFolder() Private Declare Function SHBrowseForFolder Lib "SHELL32.DLL" _ Alias "SHBrowseForFolderA" (lpbi As BROWSEINFO) As Long Private Declare Function SHGetPathFromIDList _ Lib "shell32" Alias "SHGetPathFromIDListA" _ (ByVal Pidl As Long, ByVal pszPath As String) As Long Type BROWSEINFO hwndOwner As Long pIDLRoot As Long pszDisplayName As String * 256 lpszTitle As String * 256 ulFlags As Long lpfnCallback As Long lParam As Long iImage As Long End Type Const BIF_RETURNONLYFSDIRS = 1 Const BIF_DONTGOBELOWDOMAIN = 2 Const MAX_PATH = 260 Function BrowseForFolder(hwnd As Long, Title As String) As String Dim strPath As String strPath = Space$(MAX_PATH) Dim bi As BROWSEINFO Dim lpIDList As Long strPath = Space$(MAX_PATH) bi.hwndOwner = 0 bi.lpszTitle = Title bi.ulFlags = BIF_RETURNONLYFSDIRS Or BIF_DONTGOBELOWDOMAIN lpIDList = SHBrowseForFolder(bi) If lpIDList Then SHGetPathFromIDList lpIDList, strPath strPath = Left(strPath, InStr(1, strPath, vbNullChar) - 1) If Len(strPath) > 3 Then strPath = strPath & "\" BrowseForFolder = strPath End If End Function -- Stuart On 6 Jul 2011 at 8:39, Arthur Fuller wrote: > Thanks for this. It does appear to work nicely for selecting a file, > but I'm not sure how to modify it to return the selected directory > rather than a file in it. > > A. > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > From Gustav at cactus.dk Wed Jul 6 08:08:26 2011 From: Gustav at cactus.dk (Gustav Brock) Date: Wed, 06 Jul 2011 15:08:26 +0200 Subject: [AccessD] "Modern" replacement for CommonDlg Message-ID: Hi Arthur > It does appear to work nicely for selecting a file .. However, this screams for a class solution: http://www.karstenpries.de/ Pick menu Entwicklertools, FileDialog It's in German, not Chinese, but you know what it is supposed to do. > how to modify it to return the selected directory .. It contains a ShowFolder method as well. /gustav >>> fuller.artful at gmail.com 06-07-2011 14:39 >>> Thanks for this. It does appear to work nicely for selecting a file, but I'm not sure how to modify it to return the selected directory rather than a file in it. A. From stuart at lexacorp.com.pg Wed Jul 6 08:23:20 2011 From: stuart at lexacorp.com.pg (Stuart McLachlan) Date: Wed, 06 Jul 2011 23:23:20 +1000 Subject: [AccessD] "Modern" replacement for CommonDlg In-Reply-To: References: Message-ID: <4E1461C8.16661.E9DA9A@stuart.lexacorp.com.pg> Geez, you're as bad as JC :-) Why bother with writing 600 lines of code to create a class when there are simple API functions to do it in a few lines? -- Stuart On 6 Jul 2011 at 15:08, Gustav Brock wrote: ... > However, this screams for a class solution: > > http://www.karstenpries.de/ > .. From jwcolby at colbyconsulting.com Wed Jul 6 08:25:09 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Wed, 06 Jul 2011 09:25:09 -0400 Subject: [AccessD] "Modern" replacement for CommonDlg In-Reply-To: References: Message-ID: <4E146235.3010109@colbyconsulting.com> Luckily Arthur is studying classes... ;) John W. Colby www.ColbyConsulting.com On 7/6/2011 9:08 AM, Gustav Brock wrote: > Hi Arthur > >> It does appear to work nicely for selecting a file .. > > However, this screams for a class solution: > > http://www.karstenpries.de/ > > Pick menu Entwicklertools, FileDialog > It's in German, not Chinese, but you know what it is supposed to do. > >> how to modify it to return the selected directory .. > > It contains a ShowFolder method as well. > > /gustav > > >>>> fuller.artful at gmail.com 06-07-2011 14:39>>> > Thanks for this. It does appear to work nicely for selecting a file, but I'm > not sure how to modify it to return the selected directory rather than a > file in it. > > A. > > From EdTesiny at oasas.ny.gov Wed Jul 6 08:32:29 2011 From: EdTesiny at oasas.ny.gov (Tesiny, Ed) Date: Wed, 6 Jul 2011 09:32:29 -0400 Subject: [AccessD] Emailing an .mde In-Reply-To: References: Message-ID: Steve, Sounds like an easy solution but even I can't get access to it and I have enhanced internet access. I'm sure the person I'm working with has no ability to download. Ed Tesiny EdTesiny at oasas.ny.gov -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Steve Schapel Sent: Tuesday, July 05, 2011 7:15 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Emailing an .mde Ed I don't remember the last time I sent an email with a file attached. I always upload it to Dropbox, and then email the link for them to grab it from there. Very easy. Regards Steve -----Original Message----- From: Tesiny, Ed Sent: Wednesday, July 06, 2011 5:09 AM To: Access Developers discussion and problem solving ; Off Topic Subject: [AccessD] Emailing an .mde Hi All, I'm trying to email a database frontend, of course our system blocks it. Is there an extension that is fairly neutral, I tried .doc with one person last week and that worked but it isn't working with the person I trying to distribute to today. Any suggestions? TIA Ed -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From jwcolby at colbyconsulting.com Wed Jul 6 08:40:40 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Wed, 06 Jul 2011 09:40:40 -0400 Subject: [AccessD] "Modern" replacement for CommonDlg In-Reply-To: <4E1461C8.16661.E9DA9A@stuart.lexacorp.com.pg> References: <4E1461C8.16661.E9DA9A@stuart.lexacorp.com.pg> Message-ID: <4E1465D8.2070702@colbyconsulting.com> LOL. 600 lines of code? You need to go back to class writing school. John W. Colby www.ColbyConsulting.com On 7/6/2011 9:23 AM, Stuart McLachlan wrote: > Geez, you're as bad as JC :-) > > Why bother with writing 600 lines of code to create a class when there are simple API > functions to do it in a few lines? > From Gustav at cactus.dk Wed Jul 6 08:49:38 2011 From: Gustav at cactus.dk (Gustav Brock) Date: Wed, 06 Jul 2011 15:49:38 +0200 Subject: [AccessD] "Modern" replacement for CommonDlg Message-ID: Hi Stuart Because it is the way to do it. You initialize the object, set some properties, call a method, bingo. If not the right folder/file, adjust some properties, call a method, bingo. When I discovered this logical operation many years ago (I only do very little VBA programming these days) it brought relief and good nights' sleep! Of course, if one prefer traditional methods, no problem, I just wanted to point out that you can do it the OO way even without the OCX. /gustav >>> stuart at lexacorp.com.pg 06-07-2011 15:23 >>> Geez, you're as bad as JC :-) Why bother with writing 600 lines of code to create a class when there are simple API functions to do it in a few lines? -- Stuart On 6 Jul 2011 at 15:08, Gustav Brock wrote: ... > However, this screams for a class solution: > > http://www.karstenpries.de/ > .. From df.waters at comcast.net Wed Jul 6 08:51:30 2011 From: df.waters at comcast.net (Dan Waters) Date: Wed, 6 Jul 2011 08:51:30 -0500 Subject: [AccessD] Emailing an .mde In-Reply-To: References: Message-ID: <002101cc3be3$cfe9e910$6fbdbb30$@comcast.net> I change the extension to .pdf. Always works. If you file is large, you might compress it first, then change .zip to .pdf. Dan -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Tesiny, Ed Sent: Wednesday, July 06, 2011 8:32 AM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Emailing an .mde Steve, Sounds like an easy solution but even I can't get access to it and I have enhanced internet access. I'm sure the person I'm working with has no ability to download. Ed Tesiny EdTesiny at oasas.ny.gov -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Steve Schapel Sent: Tuesday, July 05, 2011 7:15 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Emailing an .mde Ed I don't remember the last time I sent an email with a file attached. I always upload it to Dropbox, and then email the link for them to grab it from there. Very easy. Regards Steve -----Original Message----- From: Tesiny, Ed Sent: Wednesday, July 06, 2011 5:09 AM To: Access Developers discussion and problem solving ; Off Topic Subject: [AccessD] Emailing an .mde Hi All, I'm trying to email a database frontend, of course our system blocks it. Is there an extension that is fairly neutral, I tried .doc with one person last week and that worked but it isn't working with the person I trying to distribute to today. Any suggestions? TIA Ed -- 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 Wed Jul 6 09:27:06 2011 From: rockysmolin at bchacc.com (rockysmolin at bchacc.com) Date: Wed, 06 Jul 2011 07:27:06 -0700 Subject: [AccessD] Emailing an .mde Message-ID: <20110706072706.86c3debdd1c3983866efe200e2feb95f.2abc9b1f88.wbe@email18.secureserver.net> How about YouSendIt.com? I;ve been using that for a year and it's been flawless. I also use a folder on my website /ftpguest where I FTP things and clients can download them from there using a browser. Rocky -------- Original Message -------- Subject: Re: [AccessD] Emailing an .mde From: "Tesiny, Ed" Date: Wed, July 06, 2011 6:32 am To: "Access Developers discussion and problem solving" Steve, Sounds like an easy solution but even I can't get access to it and I have enhanced internet access. I'm sure the person I'm working with has no ability to download. Ed Tesiny EdTesiny at oasas.ny.gov -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Steve Schapel Sent: Tuesday, July 05, 2011 7:15 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Emailing an .mde Ed I don't remember the last time I sent an email with a file attached. I always upload it to Dropbox, and then email the link for them to grab it from there. Very easy. Regards Steve -----Original Message----- From: Tesiny, Ed Sent: Wednesday, July 06, 2011 5:09 AM To: Access Developers discussion and problem solving ; Off Topic Subject: [AccessD] Emailing an .mde Hi All, I'm trying to email a database frontend, of course our system blocks it. Is there an extension that is fairly neutral, I tried .doc with one person last week and that worked but it isn't working with the person I trying to distribute to today. Any suggestions? TIA Ed -- 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 EdTesiny at oasas.ny.gov Wed Jul 6 10:24:50 2011 From: EdTesiny at oasas.ny.gov (Tesiny, Ed) Date: Wed, 6 Jul 2011 11:24:50 -0400 Subject: [AccessD] Emailing an .mde In-Reply-To: <20110706072706.86c3debdd1c3983866efe200e2feb95f.2abc9b1f88.wbe@email18.secureserver.net> References: <20110706072706.86c3debdd1c3983866efe200e2feb95f.2abc9b1f88.wbe@email18.secureserver.net> Message-ID: FTP is totally blocked...the agency is PARANOID! Ed Tesiny EdTesiny at oasas.ny.gov -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of rockysmolin at bchacc.com Sent: Wednesday, July 06, 2011 10:27 AM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Emailing an .mde How about YouSendIt.com? I;ve been using that for a year and it's been flawless. I also use a folder on my website /ftpguest where I FTP things and clients can download them from there using a browser. Rocky -------- Original Message -------- Subject: Re: [AccessD] Emailing an .mde From: "Tesiny, Ed" Date: Wed, July 06, 2011 6:32 am To: "Access Developers discussion and problem solving" Steve, Sounds like an easy solution but even I can't get access to it and I have enhanced internet access. I'm sure the person I'm working with has no ability to download. Ed Tesiny EdTesiny at oasas.ny.gov -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Steve Schapel Sent: Tuesday, July 05, 2011 7:15 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Emailing an .mde Ed I don't remember the last time I sent an email with a file attached. I always upload it to Dropbox, and then email the link for them to grab it from there. Very easy. Regards Steve -----Original Message----- From: Tesiny, Ed Sent: Wednesday, July 06, 2011 5:09 AM To: Access Developers discussion and problem solving ; Off Topic Subject: [AccessD] Emailing an .mde Hi All, I'm trying to email a database frontend, of course our system blocks it. Is there an extension that is fairly neutral, I tried .doc with one person last week and that worked but it isn't working with the person I trying to distribute to today. Any suggestions? TIA Ed -- 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 Wed Jul 6 10:48:05 2011 From: stuart at lexacorp.com.pg (Stuart McLachlan) Date: Thu, 07 Jul 2011 01:48:05 +1000 Subject: [AccessD] "Modern" replacement for CommonDlg In-Reply-To: <4E1465D8.2070702@colbyconsulting.com> References: , <4E1461C8.16661.E9DA9A@stuart.lexacorp.com.pg>, <4E1465D8.2070702@colbyconsulting.com> Message-ID: <4E1483B5.26290.16E6158@stuart.lexacorp.com.pg> Not me. Download the file that Gustav pointed to. The FileDialog class module in the mdb is 615 lines long. -- Stuart On 6 Jul 2011 at 9:40, jwcolby wrote: > LOL. 600 lines of code? You need to go back to class writing school. > > John W. Colby > www.ColbyConsulting.com > > On 7/6/2011 9:23 AM, Stuart McLachlan wrote: > > Geez, you're as bad as JC :-) > > > > Why bother with writing 600 lines of code to create a class when > > there are simple API functions to do it in a few lines? > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > From charlotte.foust at gmail.com Wed Jul 6 11:14:28 2011 From: charlotte.foust at gmail.com (Charlotte Foust) Date: Wed, 6 Jul 2011 09:14:28 -0700 Subject: [AccessD] populating a textbox-type field in one table, calc'ed from another table In-Reply-To: <002f01cc3bdb$3b067fa0$b1137ee0$@gmail.com> References: <002f01cc3bdb$3b067fa0$b1137ee0$@gmail.com> Message-ID: Default values aren't calculated but row sources are. You would need to put some code behind the form to load the value into an unbound textbox in the appropriate event, probably the On Current event. Charlotte Foust On Wed, Jul 6, 2011 at 5:50 AM, William Benson (VBACreations.Com) < vbacreations at gmail.com> wrote: > Dear Colleagues, > > The below expression works when the display control for the field is a > listbox, and the above expression its row source. But it won't work (as > written) when the display control is a textbox and the expression is the > Default Value -- getting syntax error. > > Default Value = SELECT Sum(Tbl_Field_Values.Items) FROM Tbl_Field_Values > WHERE Tbl_Field_Values.WB = WB and Tbl_Field_Values.WS = WS and > Tbl_Field_Values.FLD = FLD GROUP BY Tbl_Field_Values.WB, > Tbl_Field_Values.WS, Tbl_Field_Values.FLD; > > Table: Tbl_Field_Values_Header > Field: SumOfItems > > > Can the syntax be improved to cause the sum of all items where WB, WS, and > FLD match between Tbl_Field_Values and Tbl_Field_Values_Header, to display > as the default value in the field I am trying to populate (SumOfItems) in > my > Tbl_Field_Values_Header table? > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > > > Website: http://www.databaseadvisors.com > > > From vbacreations at gmail.com Wed Jul 6 11:47:02 2011 From: vbacreations at gmail.com (William Benson (VBACreations.Com)) Date: Wed, 6 Jul 2011 12:47:02 -0400 Subject: [AccessD] How to tell a button's "air space" is nolonger beinghovered over References: <003b01cc38f1$b62edca0$228c95e0$@gmail.com><471F6C8DAB244C66B0AB79536085B3EC@personal4a8ede> <002001cc3a5e$5428d240$fc7a76c0$@gmail.com> <8DD6228312434CD0940AE4E4807C4FF6@personal4a8ede> Message-ID: <004001cc3bfc$56097700$021c6500$@gmail.com> OK, I am scratching my head to think why I didn't see this simpler solution the minute A.D. showed me how to test X and Y. This pretty much always resets at the button edge, and if shift is held, shows the alternate caption in the interior. Private Sub cmdClearFieldHistory_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single) Dim W As Single Dim H As Single If Shift = 0 Then cmdClearFieldHistory.Caption = "Clear Field History" Else W = cmdClearFieldHistory.Width H = cmdClearFieldHistory.Height If X = 0 Or X = W Or Y = 0 Or Y = H Then cmdClearFieldHistory.Caption = "Clear Field History" Else cmdClearFieldHistory.Caption = "Clear All Fields" End If End If End Sub From jwcolby at colbyconsulting.com Wed Jul 6 14:12:19 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Wed, 06 Jul 2011 15:12:19 -0400 Subject: [AccessD] "Modern" replacement for CommonDlg In-Reply-To: <4E1483B5.26290.16E6158@stuart.lexacorp.com.pg> References: , <4E1461C8.16661.E9DA9A@stuart.lexacorp.com.pg>, <4E1465D8.2070702@colbyconsulting.com> <4E1483B5.26290.16E6158@stuart.lexacorp.com.pg> Message-ID: <4E14B393.8010500@colbyconsulting.com> Then I have to assume that they are giving you access to properties, i.e. turning it into an object. I wrap things in a class all the time. That is pretty much the entire point of classes is to give you methods and properties. And yea, yea, you don't do classes. John W. Colby www.ColbyConsulting.com On 7/6/2011 11:48 AM, Stuart McLachlan wrote: > Not me. > Download the file that Gustav pointed to. The FileDialog class module in the mdb is 615 > lines long. > From jwcolby at colbyconsulting.com Wed Jul 6 14:14:11 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Wed, 06 Jul 2011 15:14:11 -0400 Subject: [AccessD] "Modern" replacement for CommonDlg In-Reply-To: References: Message-ID: <4E14B403.1010306@colbyconsulting.com> Any chance you could translate it? ;) John W. Colby www.ColbyConsulting.com On 7/6/2011 9:08 AM, Gustav Brock wrote: > Hi Arthur > >> It does appear to work nicely for selecting a file .. > > However, this screams for a class solution: > > http://www.karstenpries.de/ > > Pick menu Entwicklertools, FileDialog > It's in German, not Chinese, but you know what it is supposed to do. > >> how to modify it to return the selected directory .. > > It contains a ShowFolder method as well. > > /gustav > > >>>> fuller.artful at gmail.com 06-07-2011 14:39>>> > Thanks for this. It does appear to work nicely for selecting a file, but I'm > not sure how to modify it to return the selected directory rather than a > file in it. > > A. > > From fuller.artful at gmail.com Wed Jul 6 17:32:19 2011 From: fuller.artful at gmail.com (Arthur Fuller) Date: Wed, 6 Jul 2011 18:32:19 -0400 Subject: [AccessD] "Modern" replacement for CommonDlg In-Reply-To: <4E14B403.1010306@colbyconsulting.com> References: <4E14B403.1010306@colbyconsulting.com> Message-ID: I'm working on it. My German is shaky, but my Cantonese and Mandarin are coming along, and I am already conversant with Spanish and French. This won't take long. Given a gift for languages, I'll be there in a fortnight. LOL. A. On Wed, Jul 6, 2011 at 3:14 PM, jwcolby wrote: > Any chance you could translate it? ;) > > > From jwcolby at colbyconsulting.com Wed Jul 6 18:20:46 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Wed, 06 Jul 2011 19:20:46 -0400 Subject: [AccessD] "Modern" replacement for CommonDlg In-Reply-To: References: <4E14B403.1010306@colbyconsulting.com> Message-ID: <4E14EDCE.8010605@colbyconsulting.com> I keep asking someone to gift me a language. 'Southern' seems to be what is being gifted. ;) John W. Colby www.ColbyConsulting.com On 7/6/2011 6:32 PM, Arthur Fuller wrote: > I'm working on it. My German is shaky, but my Cantonese and Mandarin are > coming along, and I am already conversant with Spanish and French. This > won't take long. Given a gift for languages, I'll be there in a fortnight. > LOL. > > A. > > On Wed, Jul 6, 2011 at 3:14 PM, jwcolby wrote: > >> Any chance you could translate it? ;) >> >> >> From df.waters at comcast.net Wed Jul 6 18:56:04 2011 From: df.waters at comcast.net (Dan Waters) Date: Wed, 6 Jul 2011 18:56:04 -0500 Subject: [AccessD] "Modern" replacement for CommonDlg In-Reply-To: <4E14EDCE.8010605@colbyconsulting.com> References: <4E14B403.1010306@colbyconsulting.com> <4E14EDCE.8010605@colbyconsulting.com> Message-ID: <005e01cc3c38$48280840$d87818c0$@comcast.net> Maybe you can find an on-line translation site? Paste the German into a field and English shows up on another screen. I found one for C# and VB.Net - works great. Dan -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Wednesday, July 06, 2011 6:21 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] "Modern" replacement for CommonDlg I keep asking someone to gift me a language. 'Southern' seems to be what is being gifted. ;) John W. Colby www.ColbyConsulting.com On 7/6/2011 6:32 PM, Arthur Fuller wrote: > I'm working on it. My German is shaky, but my Cantonese and Mandarin > are coming along, and I am already conversant with Spanish and French. > This won't take long. Given a gift for languages, I'll be there in a fortnight. > LOL. > > A. > > On Wed, Jul 6, 2011 at 3:14 PM, jwcolby wrote: > >> Any chance you could translate it? ;) >> >> >> -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From vbacreations at gmail.com Wed Jul 6 23:46:36 2011 From: vbacreations at gmail.com (William Benson (VBACreations.Com)) Date: Thu, 7 Jul 2011 00:46:36 -0400 Subject: [AccessD] "Modern" replacement for CommonDlg In-Reply-To: <005e01cc3c38$48280840$d87818c0$@comcast.net> References: <4E14B403.1010306@colbyconsulting.com> <4E14EDCE.8010605@colbyconsulting.com> <005e01cc3c38$48280840$d87818c0$@comcast.net> Message-ID: <000001cc3c60$db287350$917959f0$@gmail.com> I have this loop which results in my 2nd listbox row being selected every time and it annoys me. I can't figure out what is causing *any* row to be selected. Debug Behavior: Row 0 added, nothing is selected. Row 1 added, it gets selected. Row 2 added, Row 1 stays selected. Row 3 added, Row 1 stays selected. For Each WS In WB.Worksheets lstWS.AddItem WS.Name & ";" & XL.WorksheetFunction.CountA(WS.Rows(1)) Next From charlotte.foust at gmail.com Wed Jul 6 23:55:53 2011 From: charlotte.foust at gmail.com (Charlotte Foust) Date: Wed, 6 Jul 2011 21:55:53 -0700 Subject: [AccessD] "Modern" replacement for CommonDlg In-Reply-To: <000001cc3c60$db287350$917959f0$@gmail.com> References: <4E14B403.1010306@colbyconsulting.com> <4E14EDCE.8010605@colbyconsulting.com> <005e01cc3c38$48280840$d87818c0$@comcast.net> <000001cc3c60$db287350$917959f0$@gmail.com> Message-ID: Does your listbox have a header row? That would affect which row was the default. Charlotte Foust On Wed, Jul 6, 2011 at 9:46 PM, William Benson (VBACreations.Com) < vbacreations at gmail.com> wrote: > I have this loop which results in my 2nd listbox row being selected every > time and it annoys me. I can't figure out what is causing *any* row to be > selected. > > Debug Behavior: > Row 0 added, nothing is selected. > Row 1 added, it gets selected. > Row 2 added, Row 1 stays selected. > Row 3 added, Row 1 stays selected. > > For Each WS In WB.Worksheets > lstWS.AddItem WS.Name & ";" & > XL.WorksheetFunction.CountA(WS.Rows(1)) > Next > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > > > Website: http://www.databaseadvisors.com > > > From Gustav at cactus.dk Thu Jul 7 04:07:29 2011 From: Gustav at cactus.dk (Gustav Brock) Date: Thu, 07 Jul 2011 11:07:29 +0200 Subject: [AccessD] "Modern" replacement for CommonDlg Message-ID: Hi John Sorry, I just picked it from my archive where I have a modified version, looked up the site, and found out that a new link and version was for download. But I don't use it anymore and didn't download it and translating an old version wouldn't make much sense. But again, you know what the class is intended for, so translating may not be needed at all. /gustav >>> jwcolby at colbyconsulting.com 06-07-2011 21:14 >>> Any chance you could translate it? ;) John W. Colby www.ColbyConsulting.com On 7/6/2011 9:08 AM, Gustav Brock wrote: > Hi Arthur > >> It does appear to work nicely for selecting a file .. > > However, this screams for a class solution: > > http://www.karstenpries.de/ > > Pick menu Entwicklertools, FileDialog > It's in German, not Chinese, but you know what it is supposed to do. > >> how to modify it to return the selected directory .. > > It contains a ShowFolder method as well. > > /gustav > > >>>> fuller.artful at gmail.com 06-07-2011 14:39>>> > Thanks for this. It does appear to work nicely for selecting a file, but I'm > not sure how to modify it to return the selected directory rather than a > file in it. > > A. From jwcolby at colbyconsulting.com Thu Jul 7 07:03:20 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Thu, 07 Jul 2011 08:03:20 -0400 Subject: [AccessD] SQL Server - Query non-updateable Message-ID: <4E15A088.9050801@colbyconsulting.com> I have a selection query for a bound form. If I just do a select xyz from tblInmate it works of course. I want to select a subset of inmates that reflect those that I work with (specific camps). I have a tblVolunteerCamps (the camps that a volunteer works with) and I built a stored procedure out in SQL Server that selects the IDs of inmates at those camps. I feed the SP the volunteer ID and back comes the campIDs and the inmateIDs in those camps. I had read (on this list) that if I used IN (SELECT ID from QueryXYZ) in the where clause it would allow the query to be editable but doing so is turning my query into a non-updatable query. SELECT TblInmate.* from tblInmate WHERE (INM_Active <> 0) AND (INM_Location IN (SELECT CMP_LOCCODE FROM qspVolCampIDs)) If I remove the IN clause, the query is updateable. I really need to filter to just the camps the volunteer works with and I am wondering how to accomplish this. In the past I would try to JOIN the main query to the selection filter and that caused non-updateable. I was told to use the IN(SELECT) which has worked in most cases in the past. Any clue why not now and how to go about filtering and keeping it updateable? -- John W. Colby www.ColbyConsulting.com From jwcolby at colbyconsulting.com Thu Jul 7 07:20:46 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Thu, 07 Jul 2011 08:20:46 -0400 Subject: [AccessD] SQL Server - Query non-updateable In-Reply-To: <4E15A088.9050801@colbyconsulting.com> References: <4E15A088.9050801@colbyconsulting.com> Message-ID: <4E15A49E.30002@colbyconsulting.com> Further to this, I have discovered that if I build a temp table inside of the access fe and do the join it is un-updateable. However if I use the temp table in the IN() clause it is now updateable. So it is something about using the stored procedure in the IN() that causes the query to become un-updateable. John W. Colby www.ColbyConsulting.com On 7/7/2011 8:03 AM, jwcolby wrote: > I have a selection query for a bound form. If I just do a select xyz from tblInmate it works of > course. I want to select a subset of inmates that reflect those that I work with (specific camps). > > I have a tblVolunteerCamps (the camps that a volunteer works with) and I built a stored procedure > out in SQL Server that selects the IDs of inmates at those camps. I feed the SP the volunteer ID and > back comes the campIDs and the inmateIDs in those camps. > > I had read (on this list) that if I used IN (SELECT ID from QueryXYZ) in the where clause it would > allow the query to be editable but doing so is turning my query into a non-updatable query. > > SELECT TblInmate.* from tblInmate > WHERE (INM_Active <> 0) AND > (INM_Location IN (SELECT CMP_LOCCODE FROM qspVolCampIDs)) > > If I remove the IN clause, the query is updateable. > > I really need to filter to just the camps the volunteer works with and I am wondering how to > accomplish this. In the past I would try to JOIN the main query to the selection filter and that > caused non-updateable. I was told to use the IN(SELECT) which has worked in most cases in the past. > > Any clue why not now and how to go about filtering and keeping it updateable? > From iggy at nanaimo.ark.com Thu Jul 7 07:59:37 2011 From: iggy at nanaimo.ark.com (Tony Septav) Date: Thu, 7 Jul 2011 05:59:37 -0700 Subject: [AccessD] Cannot Open Anymore Databases Message-ID: Hey All Just curious. I was working on a report, I would view it and when I returned to the design mode I would get the error message "Cannot open anymore databases". The report is based on a union query, which is made up of 6 subqueries. each of these subqueries is based on the results from about 3 or 4 other querys. If I manually run the union query I don't get any error messages, as I mentioned I only get the error message when working with the report. Am I correct in assuming that the results of each of these queries results in 1 instant of the database being opened and I have exceeded the 84 (whatever) limit to the number of databases instances that can be open at one time?? I solved the problem by appending the results of each of the 6 queries to a temp table and using the table for the report. T. Septav Nanaimo, BC Canada From jwcolby at colbyconsulting.com Fri Jul 8 12:24:59 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Fri, 08 Jul 2011 13:24:59 -0400 Subject: [AccessD] xyz* faster than *asd Message-ID: <4E173D6B.4060709@colbyconsulting.com> Does anyone know of a reason that LIKE is faster with the * in back instead of the front of a string to search by in the where clause? -- John W. Colby www.ColbyConsulting.com From fuller.artful at gmail.com Fri Jul 8 12:47:57 2011 From: fuller.artful at gmail.com (Arthur Fuller) Date: Fri, 8 Jul 2011 13:47:57 -0400 Subject: [AccessD] xyz* faster than *asd In-Reply-To: <4E173D6B.4060709@colbyconsulting.com> References: <4E173D6B.4060709@colbyconsulting.com> Message-ID: Well yeah! If prefaced with an asterisk, it means LIKE everything; if suffixed with an asterisk, it means "Everything like JWC*"; hence search for JWC and walk the remaining similarities. A. On Fri, Jul 8, 2011 at 1:24 PM, jwcolby wrote: > Does anyone know of a reason that LIKE is faster with the * in back instead > of the front of a string to search by in the where clause? > > From vbacreations at gmail.com Fri Jul 8 12:54:20 2011 From: vbacreations at gmail.com (William Benson (VBACreations.Com)) Date: Fri, 8 Jul 2011 13:54:20 -0400 Subject: [AccessD] xyz* faster than *asd In-Reply-To: References: <4E173D6B.4060709@colbyconsulting.com> Message-ID: <001401cc3d98$10e777b0$32b66710$@gmail.com> I don't think that is true Arthur. If testing Like XYZ* you are saying ONLY THINGS THAT begin with XYZ, and if testing LIKE *XYZ you are saying only things which end with XYZ -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Arthur Fuller Sent: Friday, July 08, 2011 1:48 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] xyz* faster than *asd Well yeah! If prefaced with an asterisk, it means LIKE everything; if suffixed with an asterisk, it means "Everything like JWC*"; hence search for JWC and walk the remaining similarities. A. On Fri, Jul 8, 2011 at 1:24 PM, jwcolby wrote: > Does anyone know of a reason that LIKE is faster with the * in back > instead of the front of a string to search by in the where clause? > > -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From Lambert.Heenan at chartisinsurance.com Fri Jul 8 12:55:34 2011 From: Lambert.Heenan at chartisinsurance.com (Heenan, Lambert) Date: Fri, 8 Jul 2011 13:55:34 -0400 Subject: [AccessD] xyz* faster than *asd In-Reply-To: <4E173D6B.4060709@colbyconsulting.com> References: <4E173D6B.4060709@colbyconsulting.com> Message-ID: If by 'back' you mean on the right and 'front' meaning on the left, then the answer is surely to do with how the pattern matching takes place. With a search string like "FOOBAR*" the Db engine can simply filter all records where the field starts with 'FOOBAR', and that will be fairly fast as only the first n characters in each record need to be examined. But with LIKE *FOOBAR* the starting location of the search string is indeterminate. Therefore for each record, more characters have to be examined to check if the substring 'FOOBAR' is in the data. For a false match that means every character (minus n - the length of the substring) in the string needs to be checked. Lambert -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Friday, July 08, 2011 1:25 PM To: Access Developers discussion and problem solving Subject: [AccessD] xyz* faster than *asd Does anyone know of a reason that LIKE is faster with the * in back instead of the front of a string to search by in the where clause? -- John W. Colby www.ColbyConsulting.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From jwcolby at colbyconsulting.com Fri Jul 8 12:59:24 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Fri, 08 Jul 2011 13:59:24 -0400 Subject: [AccessD] xyz* faster than *asd In-Reply-To: References: <4E173D6B.4060709@colbyconsulting.com> Message-ID: <4E17457C.9010109@colbyconsulting.com> > Well yeah! If prefaced with an asterisk, it means LIKE everything; AFAIK they mean the same thing (only backward) *asd means everything with 'asd' at the end asd* means everything with 'asd' at the beginning I vaguely remember reading (long ago) that one was faster than the other but the why escapes me. John W. Colby www.ColbyConsulting.com On 7/8/2011 1:47 PM, Arthur Fuller wrote: > Well yeah! If prefaced with an asterisk, it means LIKE everything; if > suffixed with an asterisk, it means "Everything like JWC*"; hence search for > JWC and walk the remaining similarities. > > A. > > On Fri, Jul 8, 2011 at 1:24 PM, jwcolby wrote: > >> Does anyone know of a reason that LIKE is faster with the * in back instead >> of the front of a string to search by in the where clause? >> >> From Lambert.Heenan at chartisinsurance.com Fri Jul 8 12:59:40 2011 From: Lambert.Heenan at chartisinsurance.com (Heenan, Lambert) Date: Fri, 8 Jul 2011 13:59:40 -0400 Subject: [AccessD] xyz* faster than *asd In-Reply-To: References: <4E173D6B.4060709@colbyconsulting.com> Message-ID: And for the case where you have 'LIKE *FOOBAR', that will be slower because the db has to first figure out how long the data is, then look at the last n characters to check for a match, whereas LIKE FOOBAR* still only has to look at the first n characters. Lambert -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Heenan, Lambert Sent: Friday, July 08, 2011 1:56 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] xyz* faster than *asd If by 'back' you mean on the right and 'front' meaning on the left, then the answer is surely to do with how the pattern matching takes place. With a search string like "FOOBAR*" the Db engine can simply filter all records where the field starts with 'FOOBAR', and that will be fairly fast as only the first n characters in each record need to be examined. But with LIKE *FOOBAR* the starting location of the search string is indeterminate. Therefore for each record, more characters have to be examined to check if the substring 'FOOBAR' is in the data. For a false match that means every character (minus n - the length of the substring) in the string needs to be checked. Lambert -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Friday, July 08, 2011 1:25 PM To: Access Developers discussion and problem solving Subject: [AccessD] xyz* faster than *asd Does anyone know of a reason that LIKE is faster with the * in back instead of the front of a string to search by in the where clause? -- John W. Colby www.ColbyConsulting.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 DWUTKA at Marlow.com Fri Jul 8 14:12:37 2011 From: DWUTKA at Marlow.com (Drew Wutka) Date: Fri, 8 Jul 2011 14:12:37 -0500 Subject: [AccessD] xyz* faster than *asd In-Reply-To: <4E173D6B.4060709@colbyconsulting.com> References: <4E173D6B.4060709@colbyconsulting.com> Message-ID: It's based on how indexing, in general, works. If indexing is completely turned off, the search time should be the same either way. I actually built two separate indexing systems. The first was for a PDA version of a system I had, which included a company phone list. The normal application installed on all of our PC's allowed the user to search by first name, last name, or extension number. It was a single textbox search, worked great on the PC version. But when I built it for the palm V... WOW, was slow as dirt. The Palm database didn't have an indexing option. In essence, it was basically a flat file. So what I did, is I created my own index. I had three fields I wanted to search quickly with (First Name, Last Name, extension). I then formatted the system on the Palm to have 6 tables. The main table 3 times, sorted by one key field (so a main table sorted by first name, one sorted by last name, one sorted by extension), then 3 indexing tables, one for each main table. The 'phone list' (at the time) had anywhere from 450 to 900 employees. The data was pretty small though, just text fields, and therefore didn't take up that much space to triplicate it for the palm. (The sorting and table creation were done in process with the Palm synch process). The Index table had 3 fields: The first field was the first letter (which really this was an unnecessary field). So there were 26 records (A thru Z). The Second field was the position in the related main table where that letter started. (for the number index, it obviously had 10 records (with the first field being 0 to 9 (though I only really needed 3 or 4 of those numbers since our extensions were in a specific range))). Then the second field was a text field with a 104 character text field (26x4). Each group of 4 letters (there were 26 of them), represented the hexadecimal value (it may have been decimal, don't remember) of the starting point of the second letter past the first letter's starting point. So, for example, let's say a user searched for Mike, the code would look at the first letter, say 'It's an M, that's the 13th letter (or Asc(UCASE(strFirstLetter))-64), so it would jump to the 13th record in the index table (it was slow to search through each record, but you could jump to a record by it's position very quickly). So the Record in the First Name Index table would look something like this: (oh, if the 4 characters representing the second letter is 0000, then it knows that there are no records for that first/second letter combo... and the numeric representation is 1 off, so 0001 represents the first record of the first letter starting point) M,140,000100000000000000030000000000000010..... So now that I have this record, my code knows that the 9th group for four digits is 0010, and the starting point is 140, it now knows that records starting with MI (for MIKE) start at record 149 (140+10-1(for 1 off offset)). So now the code can jump to the 149th record of the main table (sorted by first name). If the search were to look for Mark (MA for first two letters), it would start at record 140 on the main table (140+1-1). So instead of scanning every record, a slow process taking about 30 seconds on a Palm V, now I am doing a jump to one record, a little math and string reading, and then a jump to a much closer spot to finish the search. So, while my methods/code are probably not identical to indexing in Jet or SQL, it is probably similar, so searching for abc* is able to directly use the index of the record, making very fast jumps through it, where as *xyz, it is going to have to scan every record still. The second indexing system I built was for the old AccessD archives I used to host. I had it hosted with Access as the backend, and posts needed to be able to be searched by word, so a post with a thousand words needed a thousand indexes. SQL allows for full text indexing.... again, my method may not be identical, but the concept is probably similar. What I did for my full text indexing, is as a 'post' came in to be archived, The code would break down each post into individual words. It would then seach a word index (had a table for each starting letter of each word), to see if that word was in the index, if the word exists (say the word is 'AND', it would look in tblAWords), it would take the key of that word, if it didn't exist, it added that word to the index, and then took the newly created key. Then, it would add a record to a tblAWordsToPosts (where 'A' is for search words starting with A, so there were 26 of these tables) with the ID of the search word, and the ID of the post. So if you were to search for 'Unbound Forms', the search would hit tblUWords to get the Key for 'Unbound', then it would hit tblFWords, to get the key for 'Forms', then it would take those two keys, and create a query to return records from tblPosts, where there were joined records with tblUWordsToPosts and tblFWordsToPosts. All in all, with hundreds of thousands of records, the searching of those records were getting done in a second or two, instead of a massively long search going through the memo fields themselves. Drew -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Friday, July 08, 2011 12:25 PM To: Access Developers discussion and problem solving Subject: [AccessD] xyz* faster than *asd Does anyone know of a reason that LIKE is faster with the * in back instead of the front of a string to search by in the where clause? -- John W. Colby www.ColbyConsulting.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com The information contained in this transmission is intended only for the person or entity to which it is addressed and may contain II-VI Proprietary and/or II-VI Business Sensitive material. If you are not the intended recipient, please contact the sender immediately and destroy the material in its entirety, whether electronic or hard copy. You are notified that any review, retransmission, copying, disclosure, dissemination, or other use of, or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. From ab-mi at post3.tele.dk Fri Jul 8 14:57:27 2011 From: ab-mi at post3.tele.dk (Asger Blond) Date: Fri, 8 Jul 2011 21:57:27 +0200 Subject: [AccessD] xyz* faster than *asd References: <4E173D6B.4060709@colbyconsulting.com> Message-ID: Like Drew my answer is: if you have no index on the field there will be no difference to performance because the query engine then has to do a table scan. But if you have an index on the field then the query engine can use the index for LIKE xyz*, but it has to do a table scan for LIKE *xyz. Asger ----- Original meddelelse ----- > Fra: jwcolby > Til: Access Developers discussion and problem solving > > Dato: Fre, 08. jul 2011 19:24 > Emne: [AccessD] xyz* faster than *asd > > Does anyone know of a reason that LIKE is faster with the * in back > instead of the front of a string > to search by in the where clause? > > -- > John W. Colby > www.ColbyConsulting.com > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com From DWUTKA at Marlow.com Fri Jul 8 15:04:34 2011 From: DWUTKA at Marlow.com (Drew Wutka) Date: Fri, 8 Jul 2011 15:04:34 -0500 Subject: [AccessD] xyz* faster than *asd In-Reply-To: References: <4E173D6B.4060709@colbyconsulting.com> Message-ID: Boy, you're answer was WAY shorter then mine! I went into detail though, to explain the process a bit. Drew -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Asger Blond Sent: Friday, July 08, 2011 2:57 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] xyz* faster than *asd Like Drew my answer is: if you have no index on the field there will be no difference to performance because the query engine then has to do a table scan. But if you have an index on the field then the query engine can use the index for LIKE xyz*, but it has to do a table scan for LIKE *xyz. Asger ----- Original meddelelse ----- > Fra: jwcolby > Til: Access Developers discussion and problem solving > > Dato: Fre, 08. jul 2011 19:24 > Emne: [AccessD] xyz* faster than *asd > > Does anyone know of a reason that LIKE is faster with the * in back > instead of the front of a string > to search by in the where clause? > > -- > John W. Colby > www.ColbyConsulting.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 The information contained in this transmission is intended only for the person or entity to which it is addressed and may contain II-VI Proprietary and/or II-VI Business Sensitive material. If you are not the intended recipient, please contact the sender immediately and destroy the material in its entirety, whether electronic or hard copy. You are notified that any review, retransmission, copying, disclosure, dissemination, or other use of, or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. From fuller.artful at gmail.com Fri Jul 8 15:35:40 2011 From: fuller.artful at gmail.com (Arthur Fuller) Date: Fri, 8 Jul 2011 16:35:40 -0400 Subject: [AccessD] xyz* faster than *asd In-Reply-To: <001401cc3d98$10e777b0$32b66710$@gmail.com> References: <4E173D6B.4060709@colbyconsulting.com> <001401cc3d98$10e777b0$32b66710$@gmail.com> Message-ID: I think that is true, and I have just tested and verified my conjecture. A. On Fri, Jul 8, 2011 at 1:54 PM, William Benson (VBACreations.Com) < vbacreations at gmail.com> wrote: > I don't think that is true Arthur. > > If testing Like XYZ* you are saying ONLY THINGS THAT begin with XYZ, and if > testing LIKE *XYZ you are saying only things which end with XYZ > > From john at winhaven.net Fri Jul 8 16:38:35 2011 From: john at winhaven.net (John Bartow) Date: Fri, 8 Jul 2011 16:38:35 -0500 Subject: [AccessD] xyz* faster than *asd In-Reply-To: <4E173D6B.4060709@colbyconsulting.com> References: <4E173D6B.4060709@colbyconsulting.com> Message-ID: <000901cc3db7$642445b0$2c6cd110$@winhaven.net> I remember asking a similar question in an SQL queries class about 20 years ago. I believe the answer was "because". Its Friday ;o) -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Friday, July 08, 2011 12:25 PM To: Access Developers discussion and problem solving Subject: [AccessD] xyz* faster than *asd Does anyone know of a reason that LIKE is faster with the * in back instead of the front of a string to search by in the where clause? -- John W. Colby www.ColbyConsulting.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From ab-mi at post3.tele.dk Fri Jul 8 17:19:30 2011 From: ab-mi at post3.tele.dk (Asger Blond) Date: Sat, 9 Jul 2011 00:19:30 +0200 Subject: [AccessD] xyz* faster than *asd References: <4E173D6B.4060709@colbyconsulting.com> <000901cc3db7$642445b0$2c6cd110$@winhaven.net> Message-ID: Too bad you got this silly answer in your way back SQL class. Because it's quite obvious why a LIKE xyz* will be faster than LIKE *xyz on an indexed field. For a LIKE *xyz the query engine have to investigate each and every record, because it just doesn't know what leading characters to seach - and this traversing all records is what's called a "table scan". For LIKE xyz* the query engine can use the index, because it know that the leading characters are "xyz". So having an index on the search field will allways make a LIKE *xyz query by far faster than a LIKE xyz* query. Asger ----- Original meddelelse ----- > Fra: John Bartow > Til: 'Access Developers discussion and problem solving' > > Dato: Fre, 08. jul 2011 23:38 > Emne: Re: [AccessD] xyz* faster than *asd > > I remember asking a similar question in an SQL queries class about 20 > years > ago. I believe the answer was "because". > > Its Friday ;o) > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby > Sent: Friday, July 08, 2011 12:25 PM > To: Access Developers discussion and problem solving > Subject: [AccessD] xyz* faster than *asd > > Does anyone know of a reason that LIKE is faster with the * in back > instead > of the front of a string to search by in the where clause? > > -- > John W. Colby > www.ColbyConsulting.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 ab-mi at post3.tele.dk Fri Jul 8 17:32:18 2011 From: ab-mi at post3.tele.dk (Asger Blond) Date: Sat, 9 Jul 2011 00:32:18 +0200 Subject: [AccessD] xyz* faster than *asd References: <4E173D6B.4060709@colbyconsulting.com> <000901cc3db7$642445b0$2c6cd110$@winhaven.net> Message-ID: And making a fast answer is not the wise... The last line of my answer should be: So having an index on the search field will allways make a LIKE xyz* query by far faster than a LIKE *xyz query. Asger ----- Original meddelelse ----- > Fra: Asger Blond > Til: Access Developers discussion and problem solving > > Dato: L?r, 09. jul 2011 00:19 > Emne: Re: [AccessD] xyz* faster than *asd > > Too bad you got this silly answer in your way back SQL class. Because > it's quite obvious why a LIKE xyz* will be faster than LIKE *xyz on > an > indexed field. For a LIKE *xyz the query engine have to investigate > each > and every record, because it just doesn't know what leading > characters to > seach - and this traversing all records is what's called a "table > scan". > For LIKE xyz* the query engine can use the index, because it know > that > the leading characters are "xyz". So having an index on the search > field > will allways make a LIKE *xyz query by far faster than a LIKE xyz* > query. > Asger > > ----- Original meddelelse ----- > > > Fra: John Bartow > > Til: 'Access Developers discussion and problem solving' > > > > Dato: Fre, 08. jul 2011 23:38 > > Emne: Re: [AccessD] xyz* faster than *asd > > > > I remember asking a similar question in an SQL queries class about > 20 > > years > > ago. I believe the answer was "because". > > > > Its Friday ;o) > > -----Original Message----- > > From: accessd-bounces at databaseadvisors.com > > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby > > Sent: Friday, July 08, 2011 12:25 PM > > To: Access Developers discussion and problem solving > > Subject: [AccessD] xyz* faster than *asd > > > > Does anyone know of a reason that LIKE is faster with the * in back > > instead > > of the front of a string to search by in the where clause? > > > > -- > > John W. Colby > > www.ColbyConsulting.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 Fri Jul 8 17:37:59 2011 From: stuart at lexacorp.com.pg (Stuart McLachlan) Date: Sat, 09 Jul 2011 08:37:59 +1000 Subject: [AccessD] xyz* faster than *asd In-Reply-To: <4E173D6B.4060709@colbyconsulting.com> References: <4E173D6B.4060709@colbyconsulting.com> Message-ID: <4E1786C7.4212.49B944B@stuart.lexacorp.com.pg> "some*" can use indexes. "*omething" can't On 8 Jul 2011 at 13:24, jwcolby wrote: > Does anyone know of a reason that LIKE is faster with the * in back > instead of the front of a string to search by in the where clause? > > -- > John W. Colby > www.ColbyConsulting.com > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > From jwcolby at colbyconsulting.com Sat Jul 9 09:09:03 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Sat, 09 Jul 2011 10:09:03 -0400 Subject: [AccessD] List box as a status box Message-ID: <4E1860FF.1050407@colbyconsulting.com> I want to put up a control to display a running status, display then last N events that occurred. I have never really liked text boxes for this purpose as the last thing displayed as I always seem to end up with scrolling issues and so forth. I am thinking about using a list control. This has the advantage (for my purposes) of allowing me to have neat columns for the date / time and the status to be displayed. Does anyone do this and want to comment on how they make it work? -- John W. Colby www.ColbyConsulting.com From vbacreations at gmail.com Sat Jul 9 10:34:35 2011 From: vbacreations at gmail.com (William Benson (VBACreations.Com)) Date: Sat, 9 Jul 2011 11:34:35 -0400 Subject: [AccessD] List box as a status box In-Reply-To: <4E1860FF.1050407@colbyconsulting.com> References: <4E1860FF.1050407@colbyconsulting.com> Message-ID: <000001cc3e4d$b5fb7020$21f25060$@gmail.com> John, What kind of events ... and how are they trapped? Bill -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Saturday, July 09, 2011 10:09 AM To: Access Developers discussion and problem solving Subject: [AccessD] List box as a status box I want to put up a control to display a running status, display then last N events that occurred. I have never really liked text boxes for this purpose as the last thing displayed as I always seem to end up with scrolling issues and so forth. I am thinking about using a list control. This has the advantage (for my purposes) of allowing me to have neat columns for the date / time and the status to be displayed. Does anyone do this and want to comment on how they make it work? -- John W. Colby www.ColbyConsulting.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From jwcolby at colbyconsulting.com Sat Jul 9 12:17:13 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Sat, 09 Jul 2011 13:17:13 -0400 Subject: [AccessD] List box as a status box In-Reply-To: <000001cc3e4d$b5fb7020$21f25060$@gmail.com> References: <4E1860FF.1050407@colbyconsulting.com> <000001cc3e4d$b5fb7020$21f25060$@gmail.com> Message-ID: <4E188D19.1060700@colbyconsulting.com> I'm actually talking about "things that happen" events rather than control / form events. I am carving out a piece of my Inmate Checkout program which goes out to the internet and pulls the inmate info for the specific inmates that are already in my database, looking for changes relevant to my ability to check the inmate out. For example they are moved to another camp or their security level goes up (or down) etc. I had a very simple text box on the form which I simply updated with a text string when I discovered a change to the inmate status. However when the next change came along I lost the last. If I did a txt.value = txt.value & vbcrlf & "new status stuff" I ended up with scrolling in the text box which is difficult to control. In this specific case, I was storing these status changes in a table and I ended up just pulling the TOP 50 changes out and displaying them in a list control directly, but doing something like that where I programmatically stuff them into the list columns would also work nicely. John W. Colby www.ColbyConsulting.com On 7/9/2011 11:34 AM, William Benson (VBACreations.Com) wrote: > John, > > What kind of events ... and how are they trapped? > > Bill > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby > Sent: Saturday, July 09, 2011 10:09 AM > To: Access Developers discussion and problem solving > Subject: [AccessD] List box as a status box > > I want to put up a control to display a running status, display then last N > events that occurred. I > have never really liked text boxes for this purpose as the last thing > displayed as I always seem to > end up with scrolling issues and so forth. > > I am thinking about using a list control. This has the advantage (for my > purposes) of allowing me > to have neat columns for the date / time and the status to be displayed. > > Does anyone do this and want to comment on how they make it work? > From vbacreations at gmail.com Sat Jul 9 13:53:06 2011 From: vbacreations at gmail.com (William Benson (VBACreations.Com)) Date: Sat, 9 Jul 2011 14:53:06 -0400 Subject: [AccessD] List box as a status box In-Reply-To: <4E188D19.1060700@colbyconsulting.com> References: <4E1860FF.1050407@colbyconsulting.com> <000001cc3e4d$b5fb7020$21f25060$@gmail.com> <4E188D19.1060700@colbyconsulting.com> Message-ID: <000101cc3e69$715b0360$54110a20$@gmail.com> I am not sure I would use the listbox because they are limited in terms of how much can be displayed. I would probably go with a datasheet subform at a minimum, if you *really* do give up textboxes. But I like textboxes for this use. I use a memo field and only a single record in the textbox. Set enter key behavior to add new line, and scroll to vertical. Note I trim off the entries I don't want to retain... In this implementation I have two textboxes... one holds the accumulated events (last 15 items only) and one holds new event I want to add Option Compare Database Option Explicit 'For module Private Sub cmdAddEvent_Click() If Nz(Me.txtNewEvent, "") <> "" Then RecordLogEntry CurrentDb, Me.txtEvents, Me.txtNewEvent End If End Sub Private Sub Form_Load() Dim R As DAO.Recordset txtEvents = "" Set R = CurrentDb.OpenRecordset("Select First(EventField) as EventToShow >From TblEventLog Group by EventField") If Not R.EOF Then txtEvents = R!EventToshow End If End Sub 'Then this goes in standard module... works pretty well. Function RecordLogEntry(MyDB As DAO.Database, Ctrl As Control, sWhateverEventStringIs As String) Dim bStoreLocked As Boolean Dim strEVENTBREAK As String Const iMaxEntries = 15 Dim RstEventLog As DAO.Recordset Dim sEntry As String Dim sCurrentLog As String Const sLogStart As String = "<============== " Const sLogEnd As String = " ==============>" strEVENTBREAK = sLogStart & Format(Now(), "m/d/yyyy h:mm AM/PM") & sLogEnd & vbCrLf Set RstEventLog = MyDB.OpenRecordset("Select EventField From TblEventLog") sEntry = strEVENTBREAK & sWhateverEventStringIs On Error Resume Next RstEventLog.MoveFirst On Error GoTo Err_Handler If Not RstEventLog.EOF Then sCurrentLog = KeepMostRecent(RstEventLog.Fields(0), iMaxEntries, sLogStart) RstEventLog.Edit RstEventLog.Fields(0) = sEntry & vbCrLf & sCurrentLog 'Newest first RstEventLog.Update Else RstEventLog.AddNew RstEventLog.Fields(0) = sEntry RstEventLog.Update End If If TypeOf Ctrl Is Access.TextBox Then bStoreLocked = Ctrl.Locked Ctrl.Locked = False RstEventLog.Requery Ctrl.Value = RstEventLog.Fields(0) Ctrl.Locked = bStoreLocked End If Exit Function Err_Handler: MsgBox Err.Number & " - " & Err.Description End Function Function KeepMostRecent(ByVal str As String, ByVal iMax As Long, ByVal sLogStart As String) As String Dim iOccurrences As Long iOccurrences = (Len(str) - Len(Replace$(str, sLogStart, ""))) / Len(sLogStart) If iOccurrences >= iMax Then 'Remove last one KeepMostRecent = Left(str, InStrRev(str, sLogStart) - 1) Else KeepMostRecent = str End If End Function From stuart at lexacorp.com.pg Sat Jul 9 16:24:43 2011 From: stuart at lexacorp.com.pg (Stuart McLachlan) Date: Sun, 10 Jul 2011 07:24:43 +1000 Subject: [AccessD] List box as a status box In-Reply-To: <4E1860FF.1050407@colbyconsulting.com> References: <4E1860FF.1050407@colbyconsulting.com> Message-ID: <4E18C71B.3561.97EDB91@stuart.lexacorp.com.pg> I do this quite frequently. It works very well for me. If you just wan to log events that occuring while the application is running, make the listbox source an empty value list and then use something like: Const cLongMaxListItems Function Logitem(ev As String) as long If lstLog.ListCount > clngMaxLogItems Then lstLog.RemoveItem 0 End If lstLog.AddItem Format$(Now(), "d mmm yy h:nn:ss am/pm") & ";" & ev End Function By embedding semicolons in the string "ev", you can use as many columns as you want in your list. If you want the last ten events on record regardless of when they happened, create a query qryEventLog: "Select Top 10 * from tblEvents order by evDate DESC", and make the rowsource a query "Select * from qryLogEvent order by evDate" Then you just need a lstLog.Requery whenever a new record is added. -- Stuart On 9 Jul 2011 at 10:09, jwcolby wrote: > I want to put up a control to display a running status, display then > last N events that occurred. I have never really liked text boxes for > this purpose as the last thing displayed as I always seem to end up > with scrolling issues and so forth. > > I am thinking about using a list control. This has the advantage (for > my purposes) of allowing me to have neat columns for the date / time > and the status to be displayed. > > Does anyone do this and want to comment on how they make it work? > > -- > John W. Colby > www.ColbyConsulting.com > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > From charlotte.foust at gmail.com Sat Jul 9 22:09:35 2011 From: charlotte.foust at gmail.com (Charlotte Foust) Date: Sat, 09 Jul 2011 20:09:35 -0700 Subject: [AccessD] List box as a status box In-Reply-To: <4E188D19.1060700@colbyconsulting.com> References: <4E1860FF.1050407@colbyconsulting.com> <000001cc3e4d$b5fb7020$21f25060$@gmail.com> <4E188D19.1060700@colbyconsulting.com> Message-ID: <4ad3aeb0-2ad1-473e-89e5-e77b736598f2@email.android.com> I've done this but years ago. I added a string for each event to the rowsource for the listbox. -- Sent from my Android phone with K-9 Mail. Please excuse my brevity. jwcolby wrote: I'm actually talking about "things that happen" events rather than control / form events. I am carving out a piece of my Inmate Checkout program which goes out to the internet and pulls the inmate info for the specific inmates that are already in my database, looking for changes relevant to my ability to check the inmate out. For example they are moved to another camp or their security level goes up (or down) etc. I had a very simple text box on the form which I simply updated with a text string when I discovered a change to the inmate status. However when the next change came along I lost the last. If I did a txt.value = txt.value & vbcrlf & "new status stuff" I ended up with scrolling in the text box which is difficult to control. In this specific case, I was storing these status changes in a table and I ended up just pulling the TOP 50 changes out and displaying them in a list control directly, but doing something like that where I programmatically stuff them into the list columns would also work nicely. John W. Colby www.ColbyConsulting.com On 7/9/2011 11:34 AM, William Benson (VBACreations.Com) wrote: > John, > > What kind of events ... and how are they trapped? > > Bill > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby > Sent: Saturday, July 09, 2011 10:09 AM > To: Access Developers discussion and problem solving > Subject: [AccessD] List box as a status box > > I want to put up a control to display a running status, display then last N > events that occurred. I > have never really liked text boxes for this purpose as the last thing > displayed as I always seem to > end up with scrolling issues and so forth. > > I am thinking about using a list control. This has the advantage (for my > purposes) of allowing me > to have neat columns for the date / time and the status to be displayed. > > Does anyone do this and want to comment on how they make it work? > -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From charlotte.foust at gmail.com Sat Jul 9 22:16:17 2011 From: charlotte.foust at gmail.com (Charlotte Foust) Date: Sat, 09 Jul 2011 20:16:17 -0700 Subject: [AccessD] xyz* faster than *asd In-Reply-To: <4E173D6B.4060709@colbyconsulting.com> References: <4E173D6B.4060709@colbyconsulting.com> Message-ID: Because an ampersand at the front means the entire recordset has to be examined. The ampersand at the back means the records that don't match the initial letters don't need to be examined at all. Charlotte Foust -- Sent from my Android phone with K-9 Mail. Please excuse my brevity. jwcolby wrote: Does anyone know of a reason that LIKE is faster with the * in back instead of the front of a string to search by in the where clause? -- John W. Colby www.ColbyConsulting.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From jwcolby at colbyconsulting.com Sun Jul 10 07:13:48 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Sun, 10 Jul 2011 08:13:48 -0400 Subject: [AccessD] Access runtime Message-ID: <4E19977C.2070406@colbyconsulting.com> I am loving Access 2007 runtime! Installs easy and just runs my programs! So far! -- John W. Colby www.ColbyConsulting.com From dhb at flsi.com Mon Jul 11 13:20:09 2011 From: dhb at flsi.com (Darrell Burns) Date: Mon, 11 Jul 2011 11:20:09 -0700 Subject: [AccessD] Cannot Open Anymore Databases In-Reply-To: References: Message-ID: <000001cc3ff7$2b854cd0$828fe670$@com> I had the same problem with a form that had 5 subforms, each with multiple queries. I submitted the question to every forum and discovered that there's no easy cure. The connections limit is 256 but there's no function to tell you how many you've used up. Connections to a back-end database count double. After spending lots of time re-engineering my recordset actions and being very meticulous about closing connections, the final solution was to bind the subforms to temp tables and fill the tables as each tab is clicked. So, your solution is the correct one. - Darrell -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Tony Septav Sent: Thursday, July 07, 2011 6:00 AM To: accessd at databaseadvisors.com Subject: [AccessD] Cannot Open Anymore Databases Hey All Just curious. I was working on a report, I would view it and when I returned to the design mode I would get the error message "Cannot open anymore databases". The report is based on a union query, which is made up of 6 subqueries. each of these subqueries is based on the results from about 3 or 4 other querys. If I manually run the union query I don't get any error messages, as I mentioned I only get the error message when working with the report. Am I correct in assuming that the results of each of these queries results in 1 instant of the database being opened and I have exceeded the 84 (whatever) limit to the number of databases instances that can be open at one time?? I solved the problem by appending the results of each of the 6 queries to a temp table and using the table for the report. T. Septav Nanaimo, BC Canada -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From BradM at blackforestltd.com Mon Jul 11 13:39:37 2011 From: BradM at blackforestltd.com (Brad Marks) Date: Mon, 11 Jul 2011 13:39:37 -0500 Subject: [AccessD] Access and Excel Integration - Resources? References: , <002e01cc3bcf$d2959830$77c0c890$@gmail.com>, <4E145CF1.1188.D6EFDE@stuart.lexacorp.com.pg> Message-ID: I am doing some R&D work involving Access/Excel integration (Windows Automation). I just finished reading a book titled "Excel and Access Integration". It is a well-written book, but it does not get into a great deal of depth with regards to the "Automation" realm. I was wondering if there is a resource (book or website) that covers this area in more depth. In a nutshell, I would like to be able to do anything that a person can do in "native Excel" via commands in Access 2007 which control Excel. Thanks for your help. Brad From rls at WeBeDb.com Mon Jul 11 14:23:09 2011 From: rls at WeBeDb.com (Robert Stewart) Date: Mon, 11 Jul 2011 14:23:09 -0500 Subject: [AccessD] "Modern" replacement for CommonDlg Message-ID: Arthur, This is a different way of doing the same thing using the Office Library. You have to include which ever version of the Office dll that you are using in the references. You will need to comment out the line that contains "udf_WriteErrorToLog" See if the following helps you out: 1 of 2 Public Function udf_SelectFileDialogBox(Optional varDescOfFile As String = "All Files", Optional varExtensions As String = "*.*") As String '**************************************************************************** '* Purpose: : '* (1) Shows the user a dialog box allowing selection of a file. '* Arguments: '* (1) varDescOfFile: The description of the file type to be selected. '* For example: SAP Extract File in TXT format '* (2) varExtensions: The file filter to be used when the user is '* provided a view of the files. For example: *.TXT '* Returns: '* (1) If the user selected the CANCEL button on the dialog box, a '* zero-length string is returned. '* (2) If the user selected a file, the fully-qualified path and file '* name is returned. '* Calls subroutines: None '* Creates Arrays: None '* Uses Arrays: None '* Uses Tools->References: '* (1) Microsoft Office 10.0 Object Library ... or ... '* (2) Microsoft Office 12.0 Object Library ... etc ... '**************************************************************************** 'On Error GoTo Err_udf_SelectFileDialogBox Dim fDialog As FileDialog Dim varFile As Variant Dim strProc As String Dim strCodeLocn As String Dim strMsg As String Dim strRetVal As String '************************************************************************ strCodeLocn = "Initialize values." '************************************************************************ strProc = "udf_SelectFileDialogBox(); " strRetVal = "" '************************************************************************ strCodeLocn = "Set up the File Dialog." '************************************************************************ Set fDialog = Application.FileDialog(msoFileDialogFilePicker) With fDialog .AllowMultiSelect = False 'Disable multiple selections. .Title = varDescOfFile 'Set the title of the dialog box. .Filters.Clear 'Clear out the current filters. .Filters.Add "", varExtensions '.Filters.Add ".TXT file from SAP", "*.TXT" 'assign file filters '.Filters.Add "Access Databases", "*.MDB" '.Filters.Add "All Files", "*.*" '******************************************************************** strCodeLocn = "Show the dialog box." '******************************************************************** 'If the .Show method returns True, the user picked at least one file. 'If the .Show method returns False, the user clicked Cancel. If .Show = True Then strRetVal = .SelectedItems.Item(1) End If End With udf_SelectFileDialogBox = strRetVal Exit_udf_SelectFileDialogBox: Exit Function Err_udf_SelectFileDialogBox: '************************************************************************ '* Write the error message to the log table and display it to the user. '************************************************************************ strMsg = udf_WriteErrorToLog(strModule, strProc, strCodeLocn, Erl, Err.Number, Err.Description) MsgBox (strMsg) GoTo Exit_udf_SelectFileDialogBox End Function At 10:16 PM 7/9/2011, you wrote: > >>>> fuller.artful at gmail.com 06-07-2011 14:39>>> > > Thanks for this. It does appear to work nicely for selecting a > file, but I'm > > not sure how to modify it to return the selected directory rather than a > > file in it. > > > > A. > Robert L. Stewart www.WeBeDb.com www.DBGUIDesign.com www.RLStewartPhotography.com From rls at WeBeDb.com Mon Jul 11 14:23:35 2011 From: rls at WeBeDb.com (Robert Stewart) Date: Mon, 11 Jul 2011 14:23:35 -0500 Subject: [AccessD] "Modern" replacement for CommonDlg Message-ID: <0ADEA7BB-633A-45DC-AE87-102A08B6C00E@holly.arvixe.com> Arthur, This is a different way of doing the same thing using the Office Library. You have to include which ever version of the Office dll that you are using in the references. You will need to comment out the line that contains "udf_WriteErrorToLog" See if the following helps you out: 2 of 2 Public Function udf_SelectFolderDialogBox() As String '**************************************************************************** '* Purpose: : '* (1) Shows the user a dialog box allowing selection of a folder. '* Arguments: None '* Returns: '* (1) If the user selected the CANCEL button on the dialog box, a '* zero-length string is returned. '* (2) If the user selected a file, the fully-qualified path is returned. '* Calls subroutines: None '* Creates Arrays: None '* Uses Arrays: None '* Uses Tools->References: '* (1) Microsoft Office 10.0 Object Library ... or ... '* (2) Microsoft Office 12.0 Object Library ... etc ... '**************************************************************************** 'On Error GoTo Err_udf_SelectFolderDialogBox Dim fDialog As Office.FileDialog Dim varFile As Variant Dim strProc As String Dim strCodeLocn As String Dim strMsg As String Dim strRetVal As String Dim varDescOfFile As Variant '************************************************************************ strCodeLocn = "Initialize values." '************************************************************************ strProc = "udf_SelectFolderDialogBox" strRetVal = "" '************************************************************************ strCodeLocn = "Set up the File Dialog." '************************************************************************ Set fDialog = Application.FileDialog(msoFileDialogFolderPicker) ' Options are: ' msoFileDialogFilePicker 'OK for Access and Excel ' msoFileDialogFolderPicker 'OK for Access and Excel ' msoFileDialogOpen 'Not OK for Access ' msoFileDialogSaveAs 'Not OK for Access ' Note: instead of the option: ' msoFileDialogFilePicker to select a file ' you could also use the option: ' msoFileDialogFolderPicker to select a folder With fDialog .AllowMultiSelect = False 'Disable multiple selections. .Title = varDescOfFile 'Set the title of the dialog box. .Filters.Clear 'Clear out the current filters. '.Filters.Add "", varExtensions '.Filters.Add ".TXT file from SAP", "*.TXT" 'assign file filters '.Filters.Add "Access Databases", "*.MDB" '.Filters.Add "All Files", "*.*" '******************************************************************** strCodeLocn = "Show the dialog box." '******************************************************************** 'If the .Show method returns True, the user picked at least one file. 'If the .Show method returns False, the user clicked Cancel. If .Show = True Then strRetVal = .SelectedItems.Item(1) End If End With Exit_udf_SelectFolderDialogBox: udf_SelectFolderDialogBox = strRetVal Exit Function Err_udf_SelectFolderDialogBox: '************************************************************************ '* Write the error message to the log table and display it to the user. '************************************************************************ strMsg = udf_WriteErrorToLog(strModule, strProc, strCodeLocn, Erl, Err.Number, Err.Description) MsgBox (strMsg) GoTo Exit_udf_SelectFolderDialogBox End Function At 10:16 PM 7/9/2011, you wrote: > >>>> fuller.artful at gmail.com 06-07-2011 14:39>>> > > Thanks for this. It does appear to work nicely for selecting a > file, but I'm > > not sure how to modify it to return the selected directory rather than a > > file in it. > > > > A. > Robert L. Stewart www.WeBeDb.com www.DBGUIDesign.com www.RLStewartPhotography.com From charlotte.foust at gmail.com Mon Jul 11 14:58:23 2011 From: charlotte.foust at gmail.com (Charlotte Foust) Date: Mon, 11 Jul 2011 12:58:23 -0700 Subject: [AccessD] Cannot Open Anymore Databases In-Reply-To: <000001cc3ff7$2b854cd0$828fe670$@com> References: <000001cc3ff7$2b854cd0$828fe670$@com> Message-ID: With reports, it's even worse, because a report when you open it creates "shadow" queries so you are effectively doubling the connections you designed into it. Charlotte Foust On Mon, Jul 11, 2011 at 11:20 AM, Darrell Burns wrote: > I had the same problem with a form that had 5 subforms, each with multiple > queries. I submitted the question to every forum and discovered that > there's > no easy cure. The connections limit is 256 but there's no function to tell > you how many you've used up. Connections to a back-end database count > double. After spending lots of time re-engineering my recordset actions and > being very meticulous about closing connections, the final solution was to > bind the subforms to temp tables and fill the tables as each tab is > clicked. > So, your solution is the correct one. > - Darrell > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Tony Septav > Sent: Thursday, July 07, 2011 6:00 AM > To: accessd at databaseadvisors.com > Subject: [AccessD] Cannot Open Anymore Databases > > Hey All > Just curious. I was working on a report, I would view it and when I > returned > to the design mode I would get the error message "Cannot open anymore > databases". The report is based on a union query, which is made up of 6 > subqueries. each of these subqueries is based on the results from about 3 > or > 4 other querys. If I manually run the union query I don't get any error > messages, as I mentioned I only get the error message when working with the > report. Am I correct in assuming that the results of each of these queries > results in 1 instant of the database being opened and I have exceeded the > 84 > (whatever) limit to the number of databases instances that can be open at > one time?? I solved the problem by appending the results of each of the 6 > queries to a temp table and using the table for the report. > > T. Septav > Nanaimo, BC > Canada > -- > 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 jwcolby at colbyconsulting.com Mon Jul 11 15:14:21 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Mon, 11 Jul 2011 16:14:21 -0400 Subject: [AccessD] Access and Excel Integration - Resources? In-Reply-To: References: , <002e01cc3bcf$d2959830$77c0c890$@gmail.com>, <4E145CF1.1188.D6EFDE@stuart.lexacorp.com.pg> Message-ID: <4E1B599D.1010702@colbyconsulting.com> One of the things we used to do was to use the macro recorder to record keystrokes doing whatever you want to do. Then go look at the macro which is vbE. Now you know the syntax for whatever it was you did you can do that same thing from Access, or alternatively, you can just run the macro from Access. Both methods have their uses. John W. Colby www.ColbyConsulting.com On 7/11/2011 2:39 PM, Brad Marks wrote: > I am doing some R&D work involving Access/Excel integration (Windows > Automation). > > I just finished reading a book titled "Excel and Access Integration". > It is a well-written book, but it does not get into a great deal of > depth with regards to the "Automation" realm. > > I was wondering if there is a resource (book or website) that covers > this area in more depth. > > In a nutshell, I would like to be able to do anything that a person can > do in "native Excel" via commands in Access 2007 which control Excel. > > Thanks for your help. > Brad > From vbacreations at gmail.com Mon Jul 11 15:49:08 2011 From: vbacreations at gmail.com (William Benson (VBACreations.Com)) Date: Mon, 11 Jul 2011 16:49:08 -0400 Subject: [AccessD] Access and Excel Integration - Resources? In-Reply-To: References: , <002e01cc3bcf$d2959830$77c0c890$@gmail.com>, <4E145CF1.1188.D6EFDE@stuart.lexacorp.com.pg> Message-ID: <000001cc400b$fc00a3a0$f401eae0$@gmail.com> Brad, I like john's approach and sometimes use it... but don't like how the macro recorder works in Excel 2007+. My suggestion is to get comfortable with the basics of the Excel object model (easier said...) and in all your access projects, in the beginning at least, add a reference to Excel's object library. Stay away from all late binding in the early period (before you go to production with your application) - so you get the benefit of intellisense. Later you can change declarations to Objects, remove the reference to Excel, and Access will be happy to tell you where you need to substitute numbers for intrinsic constants. You can also join this list http://catalist.lsoft.com/scripts/wl.exe?SL1=EXCEL-L&H=PEACH.EASE.LSOFT.COM. Most seasoned Listers are experienced Access programmers too. Good luck. Bill -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Brad Marks Sent: Monday, July 11, 2011 2:40 PM To: Access Developers discussion and problem solving Subject: [AccessD] Access and Excel Integration - Resources? I am doing some R&D work involving Access/Excel integration (Windows Automation). I just finished reading a book titled "Excel and Access Integration". It is a well-written book, but it does not get into a great deal of depth with regards to the "Automation" realm. I was wondering if there is a resource (book or website) that covers this area in more depth. In a nutshell, I would like to be able to do anything that a person can do in "native Excel" via commands in Access 2007 which control Excel. Thanks for your help. Brad -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From gustav at cactus.dk Mon Jul 11 15:52:58 2011 From: gustav at cactus.dk (Gustav Brock) Date: Mon, 11 Jul 2011 22:52:58 +0200 Subject: [AccessD] Access and Excel Integration - Resources? Message-ID: Hi Brad Here is how (as I learned from Mr. Colby) to run a series of Excel macros from Access: It works very reliably: Function RunExcelMacros( _ ByVal strFileName As String, _ ParamArray avarMacros()) As Boolean Debug.Print "xl ini", Time On Error GoTo Err_RunExcelMacros Static xlApp As Excel.Application Dim xlWkb As Excel.Workbook Dim varMacro As Variant Dim booSuccess As Boolean Dim booTerminate As Boolean If Len(strFileName) = 0 Then ' Excel shall be closed. booTerminate = True End If If xlApp Is Nothing Then If booTerminate = False Then Set xlApp = New Excel.Application End If ElseIf booTerminate = True Then xlApp.Quit Set xlApp = Nothing End If If booTerminate = False Then Set xlWkb = xlApp.Workbooks.Open(FileName:=strFileName, UpdateLinks:=0, ReadOnly:=True) ' Make Excel visible (for troubleshooting only) or not. xlApp.Visible = False 'True For Each varMacro In avarMacros() If Not Len(varMacro) = 0 Then Debug.Print "xl run", Time, varMacro booSuccess = xlApp.Run(varMacro) End If Next varMacro Else booSuccess = True End If RunExcelMacros = booSuccess Exit_RunExcelMacros: On Error Resume Next If booTerminate = False Then xlWkb.Close SaveChanges:=False Set xlWkb = Nothing End If Debug.Print "xl end", Time Exit Function Err_RunExcelMacros: Select Case Err Case 0 'insert Errors you wish to ignore here Resume Next Case Else 'All other errors will trap Beep MsgBox "Error: " & Err & ". " & Err.Description, vbCritical + vbOKOnly, "Error, macro " & varMacro Resume Exit_RunExcelMacros End Select End Function /gustav >>> BradM at blackforestltd.com 11-07-2011 20:39 >>> I am doing some R&D work involving Access/Excel integration (Windows Automation). I just finished reading a book titled "Excel and Access Integration". It is a well-written book, but it does not get into a great deal of depth with regards to the "Automation" realm. I was wondering if there is a resource (book or website) that covers this area in more depth. In a nutshell, I would like to be able to do anything that a person can do in "native Excel" via commands in Access 2007 which control Excel. Thanks for your help. Brad From vbacreations at gmail.com Mon Jul 11 16:10:46 2011 From: vbacreations at gmail.com (William Benson (VBACreations.Com)) Date: Mon, 11 Jul 2011 17:10:46 -0400 Subject: [AccessD] Select Distinct not working on union query - due to MEMO field? Message-ID: <000101cc400f$015a6450$040f2cf0$@gmail.com> I was using Select distinct on records from a subquery which itself was the result of a union query. To my mind, Select distinct should produce the same result in such a situation as a group by query using the same fields. The Group By query condensed the records, however, and the select distinct query did not. I chased down the reason to this: One of the fields was a memo field. I don't know if the takeaway here is (1) Use Group By queries instead of Select Distinct, whenever possible (2) Don't use MEMO fields whenever possible (3) I have not really discerned the real reason for the difference and am fooling myself. ' METHOD 1 - SURPRISE, TOO MANY RECORDS Select Distinct Field1, Field2, ... FieldN From ( Select Field1, Field2, ... FieldN From Tbl1 Union All Select Field1, Field2, ... FieldN From Tbl2 ) 'METHOD 2 - You can trust this result Select Field1, Field2, ... FieldN From ( Select Field1, Field2, ... FieldN From Tbl1 Union All Select Field1, Field2, ... FieldN From Tbl2 ) Group By Field1, Field2, ... FieldN From ssharkins at gmail.com Mon Jul 11 16:43:28 2011 From: ssharkins at gmail.com (Susan Harkins) Date: Mon, 11 Jul 2011 17:43:28 -0400 Subject: [AccessD] Select Distinct not working on union query - due to MEMOfield? References: <000101cc400f$015a6450$040f2cf0$@gmail.com> Message-ID: <11D73F4487694BA2BBE4323F109F64FD@SusanHarkins> DISTINCT considers every field in your query. Susan H. >I was using Select distinct on records from a subquery which itself was the > result of a union query. To my mind, Select distinct should produce the > same > result in such a situation as a group by query using the same fields. The > Group By query condensed the records, however, and the select distinct > query > did not. I chased down the reason to this: One of the fields was a memo > field. > > I don't know if the takeaway here is > > (1) Use Group By queries instead of Select Distinct, whenever possible > (2) Don't use MEMO fields whenever possible > (3) I have not really discerned the real reason for the difference and am > fooling myself. > From vbacreations at gmail.com Mon Jul 11 17:43:30 2011 From: vbacreations at gmail.com (William Benson (VBACreations.Com)) Date: Mon, 11 Jul 2011 18:43:30 -0400 Subject: [AccessD] Select Distinct not working on union query - due to MEMO field? Message-ID: <000201cc401b$f5bd99c0$e138cd40$@gmail.com> Hi Sue, I don't understand what you mean, sorry - please explain deeper if possible. Does it have anything at all to do with the Memo field? - because changing that to TEXT cured the duplication in the DISTINCT query. Also, do you mind commenting (or anyone...) I am trying to write complex SQL queries in VBA, in partial steps so I can evaluate the intermediary SQL for syntax errors. The below expression will not work unless I remove inner parentheses. I would like to understand why that is. Select * from ( (Select * from Tbl1) Union All (Select * from Tbl2) ) Access is happy with Select * from ( Select * from Tbl1 Union All Select * from Tbl2 ) From ssharkins at gmail.com Mon Jul 11 18:02:20 2011 From: ssharkins at gmail.com (Susan Harkins) Date: Mon, 11 Jul 2011 19:02:20 -0400 Subject: [AccessD] Select Distinct not working on union query - dueto MEMO field? References: <000201cc401b$f5bd99c0$e138cd40$@gmail.com> Message-ID: <13934C5C16A249C0AEB922A97A422A1C@SusanHarkins> 1.) You can't group on a MEMO field, but that doesn't seem to be your problem 2.) DISTINCT considers all the fields in your query -- all the fields in the query combined create a unique record. I don't believe DISTINCT is supported by a MEMO field. I know SQL Server doesn't, Fox Pro doesn't -- but Jet and T-SQL have many differences, this could be one of them. Susan H. > > I don't understand what you mean, sorry - please explain deeper if > possible. > Does it have anything at all to do with the Memo field? - because changing > that to TEXT cured the duplication in the DISTINCT query. > > > Also, do you mind commenting (or anyone...) > I am trying to write complex SQL queries in VBA, in partial steps so I can > evaluate the intermediary SQL for syntax errors. The below expression will > not work unless I remove inner parentheses. I would like to understand why > that is. > > Select * from > ( > (Select * from Tbl1) > Union All > (Select * from Tbl2) > ) > > > > Access is happy with > > Select * from > ( > Select * from Tbl1 > Union All > Select * from Tbl2 > ) > > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com From vbacreations at gmail.com Mon Jul 11 19:16:14 2011 From: vbacreations at gmail.com (William Benson (VBACreations.Com)) Date: Mon, 11 Jul 2011 20:16:14 -0400 Subject: [AccessD] Select Distinct not working on union query - dueto MEMO field? In-Reply-To: <13934C5C16A249C0AEB922A97A422A1C@SusanHarkins> References: <000201cc401b$f5bd99c0$e138cd40$@gmail.com> <13934C5C16A249C0AEB922A97A422A1C@SusanHarkins> Message-ID: <000401cc4028$ea6c3010$bf449030$@gmail.com> Sue, I think then (2) reassures me I did the right thing to switch to a Group By query... since Ac2010 appears to be cutting me some slack despite my bucking a convention. Thank you so much for the explanation. -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Susan Harkins Sent: Monday, July 11, 2011 7:02 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Select Distinct not working on union query - dueto MEMO field? 1.) You can't group on a MEMO field, but that doesn't seem to be your problem 2.) DISTINCT considers all the fields in your query -- all the fields in the query combined create a unique record. I don't believe DISTINCT is supported by a MEMO field. I know SQL Server doesn't, Fox Pro doesn't -- but Jet and T-SQL have many differences, this could be one of them. Susan H. > > I don't understand what you mean, sorry - please explain deeper if > possible. > Does it have anything at all to do with the Memo field? - because changing > that to TEXT cured the duplication in the DISTINCT query. > > > Also, do you mind commenting (or anyone...) > I am trying to write complex SQL queries in VBA, in partial steps so I can > evaluate the intermediary SQL for syntax errors. The below expression will > not work unless I remove inner parentheses. I would like to understand why > that is. > > Select * from > ( > (Select * from Tbl1) > Union All > (Select * from Tbl2) > ) > > > > Access is happy with > > Select * from > ( > Select * from Tbl1 > Union All > Select * from Tbl2 > ) > > > > -- > 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 ssharkins at gmail.com Mon Jul 11 19:33:47 2011 From: ssharkins at gmail.com (Susan Harkins) Date: Mon, 11 Jul 2011 20:33:47 -0400 Subject: [AccessD] Select Distinct not working on union query- dueto MEMO field? References: <000201cc401b$f5bd99c0$e138cd40$@gmail.com><13934C5C16A249C0AEB922A97A422A1C@SusanHarkins> <000401cc4028$ea6c3010$bf449030$@gmail.com> Message-ID: I'd be surprised if DISTINCT worked against a MEMO -- although the link only mentions dBase, I'd still be surprised. I'm not sure I understand why a MEMO field would need to be part of a GROUP BY or a DISTINCT, but as long as it works. :) Susan H. > > I think then (2) reassures me I did the right thing to switch to a Group > By > query... since Ac2010 appears to be cutting me some slack despite my > bucking > a convention. Thank you so much for the explanation. > > > 1.) You can't group on a MEMO field, but that doesn't seem to be your > problem > 2.) DISTINCT considers all the fields in your query -- all the fields in > the > > query combined create a unique record. > > I don't believe DISTINCT is supported by a MEMO field. I know SQL Server > doesn't, Fox Pro doesn't -- but Jet and T-SQL have many differences, this > could be one of them. > > > > Susan H. From vbacreations at gmail.com Mon Jul 11 20:59:18 2011 From: vbacreations at gmail.com (William Benson (VBACreations.Com)) Date: Mon, 11 Jul 2011 21:59:18 -0400 Subject: [AccessD] Select Distinct not working on union query- dueto MEMO field? In-Reply-To: References: <000201cc401b$f5bd99c0$e138cd40$@gmail.com><13934C5C16A249C0AEB922A97A422A1C@SusanHarkins> <000401cc4028$ea6c3010$bf449030$@gmail.com> Message-ID: <000b01cc4037$512b1a60$f3814f20$@gmail.com> When I changed the field type from MEMO to TEXT and found Distinct started working again... I was pretty sure the MEMO field was the reason. I know MEMO causes problems with soe other areas of SQL... however, I appreciate you confirming it. What I meant about bucking convention was based on you writing: >> You can't group on a MEMO field I appear to be able to group on a memo field without a problem in my current application. Thanks again, Bill -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Susan Harkins Sent: Monday, July 11, 2011 8:34 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Select Distinct not working on union query- dueto MEMO field? I'd be surprised if DISTINCT worked against a MEMO -- although the link only mentions dBase, I'd still be surprised. I'm not sure I understand why a MEMO field would need to be part of a GROUP BY or a DISTINCT, but as long as it works. :) Susan H. > > I think then (2) reassures me I did the right thing to switch to a Group > By > query... since Ac2010 appears to be cutting me some slack despite my > bucking > a convention. Thank you so much for the explanation. > > > 1.) You can't group on a MEMO field, but that doesn't seem to be your > problem > 2.) DISTINCT considers all the fields in your query -- all the fields in > the > > query combined create a unique record. > > I don't believe DISTINCT is supported by a MEMO field. I know SQL Server > doesn't, Fox Pro doesn't -- but Jet and T-SQL have many differences, this > could be one of them. > > > > Susan H. -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From Gustav at cactus.dk Tue Jul 12 07:01:59 2011 From: Gustav at cactus.dk (Gustav Brock) Date: Tue, 12 Jul 2011 14:01:59 +0200 Subject: [AccessD] Select Distinct not working on union query- due to MEMO field? Message-ID: Hi Bill But you are missing the obvious - the DISTINCT is not needed if you use UNION and not UNION ALL. If you don't need memo fields, certainly don't use them. If you have the need (for holding text beyond 256 chars) you may in your UNION or DISTINCT query use: LEFT(YourMemoField, 256) /gustav From vbacreations at gmail.com Tue Jul 12 07:51:11 2011 From: vbacreations at gmail.com (William Benson (VBACreations.Com)) Date: Tue, 12 Jul 2011 08:51:11 -0400 Subject: [AccessD] Select Distinct not working on union query- due to MEMO field? In-Reply-To: References: Message-ID: <001601cc4092$617ff380$247fda80$@gmail.com> Oh that is good to know! Yes, that will cut out a step or two now and in future. I appreciate the follow up on this! -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: Tuesday, July 12, 2011 8:02 AM To: accessd at databaseadvisors.com Subject: Re: [AccessD] Select Distinct not working on union query- due to MEMO field? Hi Bill But you are missing the obvious - the DISTINCT is not needed if you use UNION and not UNION ALL. If you don't need memo fields, certainly don't use them. If you have the need (for holding text beyond 256 chars) you may in your UNION or DISTINCT query use: LEFT(YourMemoField, 256) /gustav -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From jwcolby at colbyconsulting.com Tue Jul 12 08:43:08 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Tue, 12 Jul 2011 09:43:08 -0400 Subject: [AccessD] Select Distinct not working on union query- due to MEMO field? In-Reply-To: <001601cc4092$617ff380$247fda80$@gmail.com> References: <001601cc4092$617ff380$247fda80$@gmail.com> Message-ID: <4E1C4F6C.30505@colbyconsulting.com> It never occurred to me to use left(MemoField,255) when I needed to do something like that. The obvious is sometimes easy to miss. John W. Colby www.ColbyConsulting.com On 7/12/2011 8:51 AM, William Benson (VBACreations.Com) wrote: > Oh that is good to know! Yes, that will cut out a step or two now and in > future. > > I appreciate the follow up on this! > > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Gustav Brock > Sent: Tuesday, July 12, 2011 8:02 AM > To: accessd at databaseadvisors.com > Subject: Re: [AccessD] Select Distinct not working on union query- due to > MEMO field? > > Hi Bill > > But you are missing the obvious - the DISTINCT is not needed if you use > UNION and not UNION ALL. > > If you don't need memo fields, certainly don't use them. If you have the > need (for holding text beyond 256 chars) you may in your UNION or DISTINCT > query use: > > LEFT(YourMemoField, 256) > > /gustav > > From Gustav at cactus.dk Tue Jul 12 09:09:35 2011 From: Gustav at cactus.dk (Gustav Brock) Date: Tue, 12 Jul 2011 16:09:35 +0200 Subject: [AccessD] Select Distinct not working on union query - due to MEMO field? Message-ID: Hi Bill and JC Right, 255 chars it is. Further, using a second query you may even look up the full memo should you need it. This I posted in 2003 but I haven't used it since so it is still not tested in versions later than A97: Someone (JC?) mentioned this issue recently and I have experienced it too for Access 97 - even if you directly can fill a memo field to 64 K, a query will only retrieve 32 K. Even worse, if you fill a memo field with, say, the Rich Text Box control you can reach megabyte field content sizes while still only the first 32 K are retrieved. To circumvent this you may use DLookup to fetch the full content. Now, when the content is smaller than 32 K it is waste of time to pass DLookup; thus DLookup should only be used when necessary. Here is a method to do that. It is not tested in Access 2000+. /gustav Public Function LookupMemo( _ ByVal strSource As String, _ ByVal strFieldID As String, _ ByVal strFieldMemo As String, _ ByRef lngID As Long, _ ByRef varMemo As Variant) _ As String ' Extracts without truncation to 32768 characters the ' content of a memo field in a query. ' ' Assumes proper wrapping of table/field names containing spaces ' like "[My field name]" and a single field unique numeric key. ' ' Typical usage (SQL): ' ' SELECT ' ID, ' LookupMemo("Table1", "ID", "MemoField", [ID], [MemoField]) AS FullMemo ' FROM ' Table1; ' ' 2003-12-29. Cactus Data ApS, CPH. ' Maximum length of string from memo field when retrieved in a query. Const clngStrLen As Long = &H8000& Dim strExpr As String Dim strDomain As String Dim strCriteria As String Dim strMemo As String Dim lngLen As Long On Error GoTo Exit_LookupMemo If Not IsNull(varMemo) Then lngLen = Len(varMemo) If lngLen < clngStrLen Then ' The memo field is not truncated. strMemo = varMemo ElseIf Len(strSource) > 0 And Len(strFieldID) > 0 And Len(strFieldMemo) > 0 Then ' The memo is probably truncated by the query. ' Lookup the full memo in strSource. strExpr = strFieldMemo strDomain = strSource strCriteria = strFieldID & " = " & lngID & "" strMemo = vbNullString & DLookup(strExpr, strDomain, strCriteria) End If Else ' Return empty string. End If LookupMemo = strMemo Exit_LookupMemo: Exit Function Err_LookupMemo: ' Return empty string. Resume Exit_LookupMemo End Function /gustav >>> jwcolby at colbyconsulting.com 12-07-2011 15:43 >>> It never occurred to me to use left(MemoField,255) when I needed to do something like that. The obvious is sometimes easy to miss. John W. Colby www.ColbyConsulting.com On 7/12/2011 8:51 AM, William Benson (VBACreations.Com) wrote: > Oh that is good to know! Yes, that will cut out a step or two now and in > future. > > I appreciate the follow up on this! > > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Gustav Brock > Sent: Tuesday, July 12, 2011 8:02 AM > To: accessd at databaseadvisors.com > Subject: Re: [AccessD] Select Distinct not working on union query- due to > MEMO field? > > Hi Bill > > But you are missing the obvious - the DISTINCT is not needed if you use > UNION and not UNION ALL. > > If you don't need memo fields, certainly don't use them. If you have the > need (for holding text beyond 256 chars) you may in your UNION or DISTINCT > query use: > > LEFT(YourMemoField, 256) > > /gustav From Gustav at cactus.dk Tue Jul 12 09:16:02 2011 From: Gustav at cactus.dk (Gustav Brock) Date: Tue, 12 Jul 2011 16:16:02 +0200 Subject: [AccessD] The 25000 mark Message-ID: Hi all I noticed that may AccessD folder now holds 25000 postings - and I heavily delete OT and duplicate-type postings (like: Thanks! Much appreciated. -Joe"). No other folder comes near this volume. /gustav From DWUTKA at Marlow.com Tue Jul 12 09:32:06 2011 From: DWUTKA at Marlow.com (Drew Wutka) Date: Tue, 12 Jul 2011 09:32:06 -0500 Subject: [AccessD] The 25000 mark In-Reply-To: References: Message-ID: Should sign up for OT. ;) Drew -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: Tuesday, July 12, 2011 9:16 AM To: accessd at databaseadvisors.com Subject: [AccessD] The 25000 mark Hi all I noticed that may AccessD folder now holds 25000 postings - and I heavily delete OT and duplicate-type postings (like: Thanks! Much appreciated. -Joe"). No other folder comes near this volume. /gustav -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com The information contained in this transmission is intended only for the person or entity to which it is addressed and may contain II-VI Proprietary and/or II-VI Business Sensitive material. If you are not the intended recipient, please contact the sender immediately and destroy the material in its entirety, whether electronic or hard copy. You are notified that any review, retransmission, copying, disclosure, dissemination, or other use of, or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. From df.waters at comcast.net Tue Jul 12 14:34:20 2011 From: df.waters at comcast.net (Dan Waters) Date: Tue, 12 Jul 2011 14:34:20 -0500 Subject: [AccessD] More in Queries and Memo Fields Message-ID: <002501cc40ca$b30a2620$191e7260$@comcast.net> >From Allen Browne?s site: (http://allenbrowne.com/QueryPerfIssue.html) ------------------- This makes a major difference with?Memo?fields. If you GROUP BY a memo (Notes?in the example), Access compares only the first 255 characters, and the rest are?truncated! By choosing?First?instead of?Group By, JET is free to return the entire memo field from the first match. So not only is it more efficient; it actually solves the the problem of memo fields being chopped off. (A downside of using?First?is that the fields are aliased, e.g.?FirstOfNotes.) ------------------- Dan From df.waters at comcast.net Tue Jul 12 14:39:25 2011 From: df.waters at comcast.net (Dan Waters) Date: Tue, 12 Jul 2011 14:39:25 -0500 Subject: [AccessD] More in Queries and Memo Fields In-Reply-To: <002501cc40ca$b30a2620$191e7260$@comcast.net> References: <002501cc40ca$b30a2620$191e7260$@comcast.net> Message-ID: <002601cc40cb$68b89dd0$3a29d970$@comcast.net> This is the complete paragraph: ------------------ FIRST versus GROUP BY SELECT EmployeeID, LastName, Notes FROM Employees GROUP BY EmployeeID, LastName, Notes; SELECT EmployeeID, First(LastName) AS FirstOfLastName, First(Notes) AS FirstOfNotes FROM Employees GROUP BY EmployeeID; When you add a field to a Totals query, Access offers Group By in the Total row. The default behavior, therefore, is that Access must group on all these fields. A primary key is unique. So, if you group by the primary key field, there is no need to group by other fields in that table. You can optimize the query by choosing First instead of Group By in the Total row under the other fields. First allows JET to return the value from the first matching record, without needing to group by the field. This makes a major difference with Memo fields. If you GROUP BY a memo (Notes in the example), Access compares only the first 255 characters, and the rest are truncated! By choosing First instead of Group By, JET is free to return the entire memo field from the first match. So not only is it more efficient; it actually solves the the problem of memo fields being chopped off. (A downside of using First is that the fields are aliased, e.g. FirstOfNotes.) ------------------ From gustav at cactus.dk Tue Jul 12 15:19:53 2011 From: gustav at cactus.dk (Gustav Brock) Date: Tue, 12 Jul 2011 22:19:53 +0200 Subject: [AccessD] More in Queries and Memo Fields Message-ID: Hi Dan But First just returns the value from "one of the first rows", thus it isn't of much use. Actually, I have _never_ found a situation where First was of any use. /gustav >>> df.waters at comcast.net 12-07-2011 21:39 >>> This is the complete paragraph: ------------------ FIRST versus GROUP BY SELECT EmployeeID, LastName, Notes FROM Employees GROUP BY EmployeeID, LastName, Notes; SELECT EmployeeID, First(LastName) AS FirstOfLastName, First(Notes) AS FirstOfNotes FROM Employees GROUP BY EmployeeID; When you add a field to a Totals query, Access offers Group By in the Total row. The default behavior, therefore, is that Access must group on all these fields. A primary key is unique. So, if you group by the primary key field, there is no need to group by other fields in that table. You can optimize the query by choosing First instead of Group By in the Total row under the other fields. First allows JET to return the value from the first matching record, without needing to group by the field. This makes a major difference with Memo fields. If you GROUP BY a memo (Notes in the example), Access compares only the first 255 characters, and the rest are truncated! By choosing First instead of Group By, JET is free to return the entire memo field from the first match. So not only is it more efficient; it actually solves the the problem of memo fields being chopped off. (A downside of using First is that the fields are aliased, e.g. FirstOfNotes.) ------------------ From vbacreations at gmail.com Tue Jul 12 15:28:54 2011 From: vbacreations at gmail.com (William Benson (VBACreations.Com)) Date: Tue, 12 Jul 2011 16:28:54 -0400 Subject: [AccessD] More in Queries and Memo Fields In-Reply-To: <002501cc40ca$b30a2620$191e7260$@comcast.net> References: <002501cc40ca$b30a2620$191e7260$@comcast.net> Message-ID: <003201cc40d2$52999b10$f7ccd130$@gmail.com> At first blush my thought was like Dan's... If the whole point of NOT truncating the field is because you want to two records which have different comments to appear as separate records - then taking First() doesn't seem to get you further ahead. But it is VERY GOOD to be warned that I will never get what I need from a MEMO field, and that I am fooling myself in using it in a Group By. BTW ... the memo field was changed to text a long, long time ago ;-) -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Dan Waters Sent: Tuesday, July 12, 2011 3:34 PM To: 'Access Developers discussion and problem solving' Subject: [AccessD] More in Queries and Memo Fields >From Allen Browne?s site: (http://allenbrowne.com/QueryPerfIssue.html) ------------------- This makes a major difference with?Memo?fields. If you GROUP BY a memo (Notes?in the example), Access compares only the first 255 characters, and the rest are?truncated! By choosing?First?instead of?Group By, JET is free to return the entire memo field from the first match. So not only is it more efficient; it actually solves the the problem of memo fields being chopped off. (A downside of using?First?is that the fields are aliased, e.g.?FirstOfNotes.) ------------------- Dan -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From df.waters at comcast.net Tue Jul 12 16:30:36 2011 From: df.waters at comcast.net (Dan Waters) Date: Tue, 12 Jul 2011 16:30:36 -0500 Subject: [AccessD] More in Queries and Memo Fields In-Reply-To: References: Message-ID: <003801cc40da$f0ca74f0$d25f5ed0$@comcast.net> Well - I haven't tried what Allen was suggesting - just thought it was something to add to the discussion. -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: Tuesday, July 12, 2011 3:20 PM To: accessd at databaseadvisors.com Subject: Re: [AccessD] More in Queries and Memo Fields Hi Dan But First just returns the value from "one of the first rows", thus it isn't of much use. Actually, I have _never_ found a situation where First was of any use. /gustav >>> df.waters at comcast.net 12-07-2011 21:39 >>> This is the complete paragraph: ------------------ FIRST versus GROUP BY SELECT EmployeeID, LastName, Notes FROM Employees GROUP BY EmployeeID, LastName, Notes; SELECT EmployeeID, First(LastName) AS FirstOfLastName, First(Notes) AS FirstOfNotes FROM Employees GROUP BY EmployeeID; When you add a field to a Totals query, Access offers Group By in the Total row. The default behavior, therefore, is that Access must group on all these fields. A primary key is unique. So, if you group by the primary key field, there is no need to group by other fields in that table. You can optimize the query by choosing First instead of Group By in the Total row under the other fields. First allows JET to return the value from the first matching record, without needing to group by the field. This makes a major difference with Memo fields. If you GROUP BY a memo (Notes in the example), Access compares only the first 255 characters, and the rest are truncated! By choosing First instead of Group By, JET is free to return the entire memo field from the first match. So not only is it more efficient; it actually solves the the problem of memo fields being chopped off. (A downside of using First is that the fields are aliased, e.g. FirstOfNotes.) ------------------ -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From vbacreations at gmail.com Tue Jul 12 17:03:08 2011 From: vbacreations at gmail.com (William Benson (VBACreations.Com)) Date: Tue, 12 Jul 2011 18:03:08 -0400 Subject: [AccessD] More in Queries and Memo Fields In-Reply-To: References: Message-ID: <004101cc40df$7c6a2ec0$753e8c40$@gmail.com> Gustav, I think it can be useful. If the fields you are about are being forced to duplicate in the query because of some other field which you don't need to see in all its variations. If you're comfortable taking a representative example of that field, you can use First to show one of its members. FIRST and LAST offer us something that we can do in the Designer rather than resorting to the SQL window. -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: Tuesday, July 12, 2011 4:20 PM To: accessd at databaseadvisors.com Subject: Re: [AccessD] More in Queries and Memo Fields Hi Dan But First just returns the value from "one of the first rows", thus it isn't of much use. Actually, I have _never_ found a situation where First was of any use. /gustav >>> df.waters at comcast.net 12-07-2011 21:39 >>> This is the complete paragraph: ------------------ FIRST versus GROUP BY SELECT EmployeeID, LastName, Notes FROM Employees GROUP BY EmployeeID, LastName, Notes; SELECT EmployeeID, First(LastName) AS FirstOfLastName, First(Notes) AS FirstOfNotes FROM Employees GROUP BY EmployeeID; When you add a field to a Totals query, Access offers Group By in the Total row. The default behavior, therefore, is that Access must group on all these fields. A primary key is unique. So, if you group by the primary key field, there is no need to group by other fields in that table. You can optimize the query by choosing First instead of Group By in the Total row under the other fields. First allows JET to return the value from the first matching record, without needing to group by the field. This makes a major difference with Memo fields. If you GROUP BY a memo (Notes in the example), Access compares only the first 255 characters, and the rest are truncated! By choosing First instead of Group By, JET is free to return the entire memo field from the first match. So not only is it more efficient; it actually solves the the problem of memo fields being chopped off. (A downside of using First is that the fields are aliased, e.g. FirstOfNotes.) ------------------ -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From rls at WeBeDb.com Wed Jul 13 07:49:22 2011 From: rls at WeBeDb.com (Robert Stewart) Date: Wed, 13 Jul 2011 07:49:22 -0500 Subject: [AccessD] Access and Excel Integration - Resources? In-Reply-To: References: Message-ID: Everything is available to MS Access if you include the Excel library. For actual automation, you will have to write functions in MS Access that use the ones in Excel. I have an application (commercial) that allows the user to define the Excel workbook in MS Access via a set of tables and will built the Excel workbook dynamically based on that definition from data in the database. I wrote my own based on the needs of the application. At 03:29 PM 7/12/2011, you wrote: >Date: Mon, 11 Jul 2011 13:39:37 -0500 >From: "Brad Marks" >To: "Access Developers discussion and problem solving" > >Subject: [AccessD] Access and Excel Integration - Resources? >Message-ID: > >Content-Type: text/plain; charset="us-ascii" > >I am doing some R&D work involving Access/Excel integration (Windows >Automation). > >I just finished reading a book titled "Excel and Access Integration". >It is a well-written book, but it does not get into a great deal of >depth with regards to the "Automation" realm. > >I was wondering if there is a resource (book or website) that covers >this area in more depth. > >In a nutshell, I would like to be able to do anything that a person can >do in "native Excel" via commands in Access 2007 which control Excel. > >Thanks for your help. >Brad > Robert L. Stewart www.WeBeDb.com www.DBGUIDesign.com www.RLStewartPhotography.com From jwcolby at colbyconsulting.com Wed Jul 13 08:00:44 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Wed, 13 Jul 2011 09:00:44 -0400 Subject: [AccessD] Good price on 5400 rpm 1.5 tb disks Message-ID: <4E1D96FC.4070801@colbyconsulting.com> http://www.newegg.com/Special/ShellShocker.aspx?Tpk=shellshocker -- John W. Colby www.ColbyConsulting.com From rockysmolin at bchacc.com Wed Jul 13 18:25:24 2011 From: rockysmolin at bchacc.com (Rocky Smolin) Date: Wed, 13 Jul 2011 16:25:24 -0700 Subject: [AccessD] VBA run-time error 3170: Could not find installable ISAM Message-ID: <2B7A375995D24727A5D8506CB9413AF8@HAL9007> A prospect is getting this error: VBA run-time error 3170: Could not find installable ISAM When I do TransferSpreadsheet. Does anyone know offhand what the likeliest cause of this is? MTIA Rocky From BradM at blackforestltd.com Thu Jul 14 07:27:54 2011 From: BradM at blackforestltd.com (Brad Marks) Date: Thu, 14 Jul 2011 07:27:54 -0500 Subject: [AccessD] Generating an Excel Pivot Table from Access - Problem with Second Execution References: Message-ID: All, I am just starting to experiment with Access/Excel Automation Through a process of trial and error I have developed a small test Access application that is able to build a simple Excel Pivot Table. Building and viewing the Pivot Table works nicely the first time I execute the Access VBA code. If I exit Access and get back in again, things work nicely. However, when I try to execute the code more than one time (without getting out of Access), I receive Error 91 - "Object Variable or With block variable Not Set". I have tried many things but I cannot figure out how to prevent this error. I must be missing something. Below is the code that I am using. Thanks for your help with this. Brad ~~~~~~~~~~~~~ Dim XLApp As Excel.Application Dim XLWorkbook As Excel.Workbook Dim XLSheet As Excel.Worksheet Set XLApp = CreateObject("Excel.Application") XLApp.Visible = True Set XLWorkbook = XLApp.Workbooks.Add Set XLSheet = XLWorkbook.Sheets(1) XLSheet.Cells(1, 1).Value = "State" XLSheet.Cells(2, 1).Value = "MN" XLSheet.Cells(3, 1).Value = "WI" XLSheet.Cells(4, 1).Value = "SD" XLSheet.Cells(5, 1).Value = "ND" XLSheet.Cells(1, 2).Value = "Sales_Amt" XLSheet.Cells(2, 2).Value = "200" XLSheet.Cells(3, 2).Value = "300" XLSheet.Cells(4, 2).Value = "400" XLSheet.Cells(5, 2).Value = "500" ActiveWorkbook.PivotCaches.Create(SourceType:=xlDatabase, SourceData:= _ "Sheet1!R1C1:R5C2", Version:=xlPivotTableVersion12).CreatePivotTable _ TableDestination:="Sheet1!R9C1", TableName:="PivotTable3", DefaultVersion _ :=xlPivotTableVersion12 Sheets("Sheet1").Select Cells(9, 1).Select ActiveSheet.PivotTables("PivotTable3").PivotFields("State").Orientation = xlRowField ActiveSheet.PivotTables("PivotTable3").PivotFields("State").Position = 1 ActiveSheet.PivotTables("PivotTable3").AddDataField ActiveSheet.PivotTables( _ "PivotTable3").PivotFields("Sales_Amt"), "Sum of Sales_Amt", xlSum Set XLApp = Nothing Set XLWorkbook = Nothing Set XLSheet = Nothing ~~~~~~~~~~~~~ End of Code ~ ~~~~~~~~~ The Error 91 is issued on this statement on the "Second Execution" ActiveWorkbook.PivotCaches.Create(SourceType:=xlDatabase, SourceData:= _ "Sheet1!R1C1:R5C2", Version:=xlPivotTableVersion12).CreatePivotTable _ TableDestination:="Sheet1!R9C1", TableName:="PivotTable3", DefaultVersion _ :=xlPivotTableVersion12 ~~~~~~~~~~~~ From Gustav at cactus.dk Thu Jul 14 07:51:20 2011 From: Gustav at cactus.dk (Gustav Brock) Date: Thu, 14 Jul 2011 14:51:20 +0200 Subject: [AccessD] Generating an Excel Pivot Table from Access - Problem with Second Execution Message-ID: Hi Brad Without going deeper into your code, in Excel always be extremely careful and strict with properties, methods, and objects. Here you mix Sheet for Worksheet which is a no-no, and you use Select where you could use the much faster Activate. Also, objects should be closed if possible before setting them to Nothing. /gustav >>> BradM at blackforestltd.com 14-07-2011 14:27 >>> All, I am just starting to experiment with Access/Excel Automation Through a process of trial and error I have developed a small test Access application that is able to build a simple Excel Pivot Table. Building and viewing the Pivot Table works nicely the first time I execute the Access VBA code. If I exit Access and get back in again, things work nicely. However, when I try to execute the code more than one time (without getting out of Access), I receive Error 91 - "Object Variable or With block variable Not Set". I have tried many things but I cannot figure out how to prevent this error. I must be missing something. Below is the code that I am using. Thanks for your help with this. Brad ~~~~~~~~~~~~~ Dim XLApp As Excel.Application Dim XLWorkbook As Excel.Workbook Dim XLSheet As Excel.Worksheet Set XLApp = CreateObject("Excel.Application") XLApp.Visible = True Set XLWorkbook = XLApp.Workbooks.Add Set XLSheet = XLWorkbook.Sheets(1) XLSheet.Cells(1, 1).Value = "State" XLSheet.Cells(2, 1).Value = "MN" XLSheet.Cells(3, 1).Value = "WI" XLSheet.Cells(4, 1).Value = "SD" XLSheet.Cells(5, 1).Value = "ND" XLSheet.Cells(1, 2).Value = "Sales_Amt" XLSheet.Cells(2, 2).Value = "200" XLSheet.Cells(3, 2).Value = "300" XLSheet.Cells(4, 2).Value = "400" XLSheet.Cells(5, 2).Value = "500" ActiveWorkbook.PivotCaches.Create(SourceType:=xlDatabase, SourceData:= _ "Sheet1!R1C1:R5C2", Version:=xlPivotTableVersion12).CreatePivotTable _ TableDestination:="Sheet1!R9C1", TableName:="PivotTable3", DefaultVersion _ :=xlPivotTableVersion12 Sheets("Sheet1").Select Cells(9, 1).Select ActiveSheet.PivotTables("PivotTable3").PivotFields("State").Orientation = xlRowField ActiveSheet.PivotTables("PivotTable3").PivotFields("State").Position = 1 ActiveSheet.PivotTables("PivotTable3").AddDataField ActiveSheet.PivotTables( _ "PivotTable3").PivotFields("Sales_Amt"), "Sum of Sales_Amt", xlSum Set XLApp = Nothing Set XLWorkbook = Nothing Set XLSheet = Nothing ~~~~~~~~~~~~~ End of Code ~ ~~~~~~~~~ The Error 91 is issued on this statement on the "Second Execution" ActiveWorkbook.PivotCaches.Create(SourceType:=xlDatabase, SourceData:= _ "Sheet1!R1C1:R5C2", Version:=xlPivotTableVersion12).CreatePivotTable _ TableDestination:="Sheet1!R9C1", TableName:="PivotTable3", DefaultVersion _ :=xlPivotTableVersion12 ~~~~~~~~~~~~ From fuller.artful at gmail.com Thu Jul 14 08:36:36 2011 From: fuller.artful at gmail.com (Arthur Fuller) Date: Thu, 14 Jul 2011 09:36:36 -0400 Subject: [AccessD] Generating an Excel Pivot Table from Access - Problem with Second Execution In-Reply-To: References: Message-ID: I copied your code to a test MDB and interestingly, received an error on a different line than you, and with a different error message. I've played around a bit (e.g. changed "Sheets" to "WorkSheets", etc.) but the error persists. The offending line is: ActiveSheet.PivotTables("PivotTable3").AddDataField And the error message is: RunTime error 450: Wrong number of arguments or invalid property assignment. I'm running Office 2007. Very puzzling. Arthur From jwcolby at colbyconsulting.com Thu Jul 14 09:58:34 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Thu, 14 Jul 2011 10:58:34 -0400 Subject: [AccessD] Cannot Open Anymore Databases In-Reply-To: <000001cc3ff7$2b854cd0$828fe670$@com> References: <000001cc3ff7$2b854cd0$828fe670$@com> Message-ID: <4E1F041A.9030302@colbyconsulting.com> One of the things that helps is to use JIT subforms as well. JIT subforms only load subforms when the tab is clicked on. Since every combo and subform uses a recordset, loading subforms JIT really cuts down the number of recordsets used. It also speeds up loading the main form, sometimes drastically. John W. Colby www.ColbyConsulting.com On 7/11/2011 2:20 PM, Darrell Burns wrote: > I had the same problem with a form that had 5 subforms, each with multiple > queries. I submitted the question to every forum and discovered that there's > no easy cure. The connections limit is 256 but there's no function to tell > you how many you've used up. Connections to a back-end database count > double. After spending lots of time re-engineering my recordset actions and > being very meticulous about closing connections, the final solution was to > bind the subforms to temp tables and fill the tables as each tab is clicked. > So, your solution is the correct one. > - Darrell > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Tony Septav > Sent: Thursday, July 07, 2011 6:00 AM > To: accessd at databaseadvisors.com > Subject: [AccessD] Cannot Open Anymore Databases > > Hey All > Just curious. I was working on a report, I would view it and when I returned > to the design mode I would get the error message "Cannot open anymore > databases". The report is based on a union query, which is made up of 6 > subqueries. each of these subqueries is based on the results from about 3 or > 4 other querys. If I manually run the union query I don't get any error > messages, as I mentioned I only get the error message when working with the > report. Am I correct in assuming that the results of each of these queries > results in 1 instant of the database being opened and I have exceeded the 84 > (whatever) limit to the number of databases instances that can be open at > one time?? I solved the problem by appending the results of each of the 6 > queries to a temp table and using the table for the report. > > T. Septav > Nanaimo, BC > Canada From BradM at blackforestltd.com Thu Jul 14 11:12:15 2011 From: BradM at blackforestltd.com (Brad Marks) Date: Thu, 14 Jul 2011 11:12:15 -0500 Subject: [AccessD] Generating an Excel Pivot Table from Access - Problemwith Second Execution References: Message-ID: Arthur and Gustav, Thanks for the help, I appreciate it. I made the refinements that Gustav suggested, but I am still receiving the "91" Error. I also tried many other things but have not had success. Perhaps someone has an simple example of how to create an Excel Pivot table using "Automation" via Access VBA code. (and be able to execute the logic more than once without getting the 91 error.) Again, if I get out of Access and then back in again, everything works nicely. Thanks, Brad -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Brad Marks Sent: Thursday, July 14, 2011 7:28 AM To: Access Developers discussion and problem solving Subject: [AccessD] Generating an Excel Pivot Table from Access - Problemwith Second Execution All, I am just starting to experiment with Access/Excel Automation Through a process of trial and error I have developed a small test Access application that is able to build a simple Excel Pivot Table. Building and viewing the Pivot Table works nicely the first time I execute the Access VBA code. If I exit Access and get back in again, things work nicely. However, when I try to execute the code more than one time (without getting out of Access), I receive Error 91 - "Object Variable or With block variable Not Set". I have tried many things but I cannot figure out how to prevent this error. I must be missing something. Below is the code that I am using. Thanks for your help with this. Brad ~~~~~~~~~~~~~ Dim XLApp As Excel.Application Dim XLWorkbook As Excel.Workbook Dim XLSheet As Excel.Worksheet Set XLApp = CreateObject("Excel.Application") XLApp.Visible = True Set XLWorkbook = XLApp.Workbooks.Add Set XLSheet = XLWorkbook.Sheets(1) XLSheet.Cells(1, 1).Value = "State" XLSheet.Cells(2, 1).Value = "MN" XLSheet.Cells(3, 1).Value = "WI" XLSheet.Cells(4, 1).Value = "SD" XLSheet.Cells(5, 1).Value = "ND" XLSheet.Cells(1, 2).Value = "Sales_Amt" XLSheet.Cells(2, 2).Value = "200" XLSheet.Cells(3, 2).Value = "300" XLSheet.Cells(4, 2).Value = "400" XLSheet.Cells(5, 2).Value = "500" ActiveWorkbook.PivotCaches.Create(SourceType:=xlDatabase, SourceData:= _ "Sheet1!R1C1:R5C2", Version:=xlPivotTableVersion12).CreatePivotTable _ TableDestination:="Sheet1!R9C1", TableName:="PivotTable3", DefaultVersion _ :=xlPivotTableVersion12 Sheets("Sheet1").Select Cells(9, 1).Select ActiveSheet.PivotTables("PivotTable3").PivotFields("State").Orientation = xlRowField ActiveSheet.PivotTables("PivotTable3").PivotFields("State").Position = 1 ActiveSheet.PivotTables("PivotTable3").AddDataField ActiveSheet.PivotTables( _ "PivotTable3").PivotFields("Sales_Amt"), "Sum of Sales_Amt", xlSum Set XLApp = Nothing Set XLWorkbook = Nothing Set XLSheet = Nothing ~~~~~~~~~~~~~ End of Code ~ ~~~~~~~~~ The Error 91 is issued on this statement on the "Second Execution" ActiveWorkbook.PivotCaches.Create(SourceType:=xlDatabase, SourceData:= _ "Sheet1!R1C1:R5C2", Version:=xlPivotTableVersion12).CreatePivotTable _ TableDestination:="Sheet1!R9C1", TableName:="PivotTable3", DefaultVersion _ :=xlPivotTableVersion12 ~~~~~~~~~~~~ -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. From charlotte.foust at gmail.com Thu Jul 14 11:42:31 2011 From: charlotte.foust at gmail.com (Charlotte Foust) Date: Thu, 14 Jul 2011 09:42:31 -0700 Subject: [AccessD] Cannot Open Anymore Databases In-Reply-To: <4E1F041A.9030302@colbyconsulting.com> References: <000001cc3ff7$2b854cd0$828fe670$@com> <4E1F041A.9030302@colbyconsulting.com> Message-ID: And couple JIT with a tab control and you eliminate a lot of your issues immediately. Charlotte Foust On Thu, Jul 14, 2011 at 7:58 AM, jwcolby wrote: > One of the things that helps is to use JIT subforms as well. JIT subforms > only load subforms when the tab is clicked on. Since every combo and > subform uses a recordset, loading subforms JIT really cuts down the number > of recordsets used. It also speeds up loading the main form, sometimes > drastically. > > John W. Colby > www.ColbyConsulting.com > > > > On 7/11/2011 2:20 PM, Darrell Burns wrote: > >> I had the same problem with a form that had 5 subforms, each with multiple >> queries. I submitted the question to every forum and discovered that >> there's >> no easy cure. The connections limit is 256 but there's no function to tell >> you how many you've used up. Connections to a back-end database count >> double. After spending lots of time re-engineering my recordset actions >> and >> being very meticulous about closing connections, the final solution was to >> bind the subforms to temp tables and fill the tables as each tab is >> clicked. >> So, your solution is the correct one. >> - Darrell >> >> -----Original Message----- >> From: accessd-bounces@**databaseadvisors.com >> [mailto:accessd-bounces@**databaseadvisors.com] >> On Behalf Of Tony Septav >> Sent: Thursday, July 07, 2011 6:00 AM >> To: accessd at databaseadvisors.com >> Subject: [AccessD] Cannot Open Anymore Databases >> >> Hey All >> Just curious. I was working on a report, I would view it and when I >> returned >> to the design mode I would get the error message "Cannot open anymore >> databases". The report is based on a union query, which is made up of 6 >> subqueries. each of these subqueries is based on the results from about 3 >> or >> 4 other querys. If I manually run the union query I don't get any error >> messages, as I mentioned I only get the error message when working with >> the >> report. Am I correct in assuming that the results of each of these queries >> results in 1 instant of the database being opened and I have exceeded the >> 84 >> (whatever) limit to the number of databases instances that can be open at >> one time?? I solved the problem by appending the results of each of the 6 >> queries to a temp table and using the table for the report. >> >> T. Septav >> Nanaimo, BC >> Canada >> > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/**mailman/listinfo/accessd > > > Website: http://www.databaseadvisors.**com > > > From stuart at lexacorp.com.pg Thu Jul 14 15:16:58 2011 From: stuart at lexacorp.com.pg (Stuart McLachlan) Date: Fri, 15 Jul 2011 06:16:58 +1000 Subject: [AccessD] Generating an Excel Pivot Table from Access - Problemwith Second Execution In-Reply-To: References: , Message-ID: <4E1F4EBA.29684.83DCD28@stuart.lexacorp.com.pg> Search the archives for "unquailfied reference" I must have posted the same answer about half a dozen times. The old "unqualified reference" strikes again. See http://support.microsoft.com/kb/319832 When you write code to use an Excel object, method, or property, you should always precede the call with the appropriate object variable. If you do not, Visual Basic establishes its own reference to Excel... These lines for a start are unqualfied: Sheets("Sheet1").Select Cells(9, 1).Select -- Stuart > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Brad Marks > Sent: Thursday, July 14, 2011 7:28 AM To: Access Developers discussion > and problem solving Subject: [AccessD] Generating an Excel Pivot Table > from Access - Problemwith Second Execution > > All, > > I am just starting to experiment with Access/Excel Automation > > Through a process of trial and error I have developed a small test > Access application that is able to build a simple Excel Pivot Table. > Building and viewing the Pivot Table works nicely the first time I > execute the Access VBA code. If I exit Access and get back in again, > things work nicely. > > However, when I try to execute the code more than one time (without > getting out of Access), I receive Error 91 - "Object Variable or With > block variable Not Set". > > I have tried many things but I cannot figure out how to prevent this > error. I must be missing something. > > Below is the code that I am using. Thanks for your help with this. > > Brad > > ~~~~~~~~~~~~~ > Dim XLApp As Excel.Application > Dim XLWorkbook As Excel.Workbook > Dim XLSheet As Excel.Worksheet > > Set XLApp = CreateObject("Excel.Application") > > XLApp.Visible = True > > Set XLWorkbook = XLApp.Workbooks.Add > > Set XLSheet = XLWorkbook.Sheets(1) > > XLSheet.Cells(1, 1).Value = "State" > XLSheet.Cells(2, 1).Value = "MN" > XLSheet.Cells(3, 1).Value = "WI" > XLSheet.Cells(4, 1).Value = "SD" > XLSheet.Cells(5, 1).Value = "ND" > > XLSheet.Cells(1, 2).Value = "Sales_Amt" > XLSheet.Cells(2, 2).Value = "200" > XLSheet.Cells(3, 2).Value = "300" > XLSheet.Cells(4, 2).Value = "400" > XLSheet.Cells(5, 2).Value = "500" > > ActiveWorkbook.PivotCaches.Create(SourceType:=xlDatabase, SourceData:= > _ > "Sheet1!R1C1:R5C2", > Version:=xlPivotTableVersion12).CreatePivotTable _ > TableDestination:="Sheet1!R9C1", TableName:="PivotTable3", > DefaultVersion _ > :=xlPivotTableVersion12 > > Sheets("Sheet1").Select > > Cells(9, 1).Select > From BradM at blackforestltd.com Thu Jul 14 16:01:42 2011 From: BradM at blackforestltd.com (Brad Marks) Date: Thu, 14 Jul 2011 16:01:42 -0500 Subject: [AccessD] Generating an Excel Pivot Table from Access -Problemwith Second Execution References: , <4E1F4EBA.29684.83DCD28@stuart.lexacorp.com.pg> Message-ID: Stuart, Thank You! Thank You! Thank You! I owe you a beer! The Unqualified References were the problem. I am just starting to dabble with Access/Excel Automation. I am learning by trial and error (mostly error). I really appreciate the help. I have spent most of the day wrestling with this problem. Sincerely, Brad Marks ---Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Stuart McLachlan Sent: Thursday, July 14, 2011 3:17 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Generating an Excel Pivot Table from Access -Problemwith Second Execution Search the archives for "unquailfied reference" I must have posted the same answer about half a dozen times. The old "unqualified reference" strikes again. See http://support.microsoft.com/kb/319832 When you write code to use an Excel object, method, or property, you should always precede the call with the appropriate object variable. If you do not, Visual Basic establishes its own reference to Excel... These lines for a start are unqualfied: Sheets("Sheet1").Select Cells(9, 1).Select -- Stuart > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Brad Marks > Sent: Thursday, July 14, 2011 7:28 AM To: Access Developers discussion > and problem solving Subject: [AccessD] Generating an Excel Pivot Table > from Access - Problemwith Second Execution > > All, > > I am just starting to experiment with Access/Excel Automation > > Through a process of trial and error I have developed a small test > Access application that is able to build a simple Excel Pivot Table. > Building and viewing the Pivot Table works nicely the first time I > execute the Access VBA code. If I exit Access and get back in again, > things work nicely. > > However, when I try to execute the code more than one time (without > getting out of Access), I receive Error 91 - "Object Variable or With > block variable Not Set". > > I have tried many things but I cannot figure out how to prevent this > error. I must be missing something. > > Below is the code that I am using. Thanks for your help with this. > > Brad > > ~~~~~~~~~~~~~ > Dim XLApp As Excel.Application > Dim XLWorkbook As Excel.Workbook > Dim XLSheet As Excel.Worksheet > > Set XLApp = CreateObject("Excel.Application") > > XLApp.Visible = True > > Set XLWorkbook = XLApp.Workbooks.Add > > Set XLSheet = XLWorkbook.Sheets(1) > > XLSheet.Cells(1, 1).Value = "State" > XLSheet.Cells(2, 1).Value = "MN" > XLSheet.Cells(3, 1).Value = "WI" > XLSheet.Cells(4, 1).Value = "SD" > XLSheet.Cells(5, 1).Value = "ND" > > XLSheet.Cells(1, 2).Value = "Sales_Amt" > XLSheet.Cells(2, 2).Value = "200" > XLSheet.Cells(3, 2).Value = "300" > XLSheet.Cells(4, 2).Value = "400" > XLSheet.Cells(5, 2).Value = "500" > > ActiveWorkbook.PivotCaches.Create(SourceType:=xlDatabase, SourceData:= > _ > "Sheet1!R1C1:R5C2", > Version:=xlPivotTableVersion12).CreatePivotTable _ > TableDestination:="Sheet1!R9C1", TableName:="PivotTable3", > DefaultVersion _ > :=xlPivotTableVersion12 > > Sheets("Sheet1").Select > > Cells(9, 1).Select > -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. From vbacreations at gmail.com Fri Jul 15 00:34:04 2011 From: vbacreations at gmail.com (William Benson (VBACreations.Com)) Date: Fri, 15 Jul 2011 01:34:04 -0400 Subject: [AccessD] ScreenUpdating coming back on when controlling Excel via automation Message-ID: <000001cc42b0$d0591c80$710b5580$@gmail.com> Brad, here is more for you to geal with! I have googled this and seen it has affected more than me... but no one has a solution. When I am in Excel, I do not find Workbooks.Open causes screenupdating to toggle back on. However, when using an instance of Excel controlled through automation (from Access) it does turn screenupdating back on (and the visible property of the application instance as well). It is a bit frustrating. So far I cannot do anything about it except use code to turn it off again. It is creating visuals that I do not want my client to endure. Anyone have a solution to keep Excel really in the silent and invisible background when using automation? From vbacreations at gmail.com Fri Jul 15 00:34:42 2011 From: vbacreations at gmail.com (William Benson (VBACreations.Com)) Date: Fri, 15 Jul 2011 01:34:42 -0400 Subject: [AccessD] ScreenUpdating coming back on when controlling Excel via automation Message-ID: <000101cc42b0$e6c047a0$b440d6e0$@gmail.com> Deal... -----Original Message----- From: William Benson (VBACreations.Com) [mailto:vbacreations at gmail.com] Sent: Friday, July 15, 2011 1:34 AM To: Access Developers discussion and problem solving Subject: ScreenUpdating coming back on when controlling Excel via automation Brad, here is more for you to geal with! I have googled this and seen it has affected more than me... but no one has a solution. When I am in Excel, I do not find Workbooks.Open causes screenupdating to toggle back on. However, when using an instance of Excel controlled through automation (from Access) it does turn screenupdating back on (and the visible property of the application instance as well). It is a bit frustrating. So far I cannot do anything about it except use code to turn it off again. It is creating visuals that I do not want my client to endure. Anyone have a solution to keep Excel really in the silent and invisible background when using automation? From accessd at shaw.ca Fri Jul 15 16:31:23 2011 From: accessd at shaw.ca (Jim Lawrence) Date: Fri, 15 Jul 2011 14:31:23 -0700 Subject: [AccessD] Migrating Microsoft Access Databases to SQL Server 2008 In-Reply-To: <4E1F4EBA.29684.83DCD28@stuart.lexacorp.com.pg> References: <4E1F4EBA.29684.83DCD28@stuart.lexacorp.com.pg> Message-ID: <21F07958DF334582B074EA55D510209B@creativesystemdesigns.com> For all you who have not done a migration before or are a little rusty here is a link to a very nice article on migrating from a Microsoft Access Databases to SQL Server 2008 Database. http://www.databasejournal.com/features/msaccess/migrating-access-databases- to-sql-server.html Jim From vbacreations at gmail.com Fri Jul 15 20:44:05 2011 From: vbacreations at gmail.com (William Benson) Date: Fri, 15 Jul 2011 21:44:05 -0400 Subject: [AccessD] VBA run-time error 3170: Could not find installable ISAM In-Reply-To: <2B7A375995D24727A5D8506CB9413AF8@HAL9007> References: <2B7A375995D24727A5D8506CB9413AF8@HAL9007> Message-ID: Could it be they have excel set to ignore requests from other applications? (DDE). On Jul 13, 2011 7:27 PM, "Rocky Smolin" wrote: > A prospect is getting this error: > > VBA run-time error 3170: Could not find installable ISAM > > When I do TransferSpreadsheet. > > Does anyone know offhand what the likeliest cause of this is? > > MTIA > > Rocky > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com From gustav at cactus.dk Sat Jul 16 02:53:45 2011 From: gustav at cactus.dk (Gustav Brock) Date: Sat, 16 Jul 2011 09:53:45 +0200 Subject: [AccessD] VBA run-time error 3170: Could not find installable ISAM Message-ID: Hi Rocky Or, when installing Access, you forgot to mark the driver for Excel? /gustav >>> vbacreations at gmail.com 16-07-2011 03:44 >>> Could it be they have excel set to ignore requests from other applications? (DDE). On Jul 13, 2011 7:27 PM, "Rocky Smolin" wrote: > A prospect is getting this error: > > VBA run-time error 3170: Could not find installable ISAM > > When I do TransferSpreadsheet. > > Does anyone know offhand what the likeliest cause of this is? > > MTIA > > Rocky From jwcolby at colbyconsulting.com Sat Jul 16 08:35:28 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Sat, 16 Jul 2011 09:35:28 -0400 Subject: [AccessD] Elapsed time class - Stuart please ignore... Message-ID: <4E2193A0.1000509@colbyconsulting.com> I'm building a little database to time / log my son's computer time. I have a form which he uses to select a game which opens the game for him, creates a record in the table and starts the timer, leaving this form up in the background behind the game. As he closes the game the form becomes visible and he clicks a button to update the stop time in the table and stops the elapsed time timer. Not yet done, I will be causing the form to beep at him as he goes over the allotted time to play the game. Nothing special here, just wrapping the code / date I needed to measure elapsed time into a class. Obviously the point of putting it in a class is that it can be used in one or a hundred forms to perform elapsed time calcs, and it carves out all of that data / logic into a single place. To use it in any form just dimension a variable and set it to a new instance of the variable: Dim mcElapsedTime As clsElapsedTime Private Sub Form_Open(Cancel As Integer) Set mcElapsedTime = New clsElapsedTime Me.TimerInterval = 1000 - set up the timer for one second timer ticks End Sub Private Sub Form_Timer() mcElapsedTime.UpdateElapsedTime txtElapsedTime = mcElapsedTime.pElapsedTime End Sub The elapsed time class: Option Compare Database Option Explicit Private mlngSeconds As Long Private mlngMinutes As Long Private mlngHours As Long Private mstrElapsedTime Property Get pElapsedTime() As String pElapsedTime = mstrElapsedTime End Property Property Get pSeconds() As Long pSeconds = mlngSeconds End Property Property Get pMinutes() As Long pMinutes = mlngMinutes End Property Property Get pHours() As Long pHours = mlngHours End Property Private Function CalcElapsedTime() mstrElapsedTime = mlngHours & ":" & mlngMinutes & ":" & mlngSeconds End Function Function mResetElapsedTime() mlngSeconds = 0 mlngMinutes = 0 mlngHours = 0 End Function Function UpdateElapsedTime() mlngSeconds = mlngSeconds + 1 If mlngSeconds >= 60 Then mlngSeconds = 0 mlngMinutes = mlngMinutes + 1 End If If mlngMinutes >= 60 Then mlngMinutes = 0 mlngHours = mlngHours + 1 End If CalcElapsedTime End Function -- John W. Colby www.ColbyConsulting.com From rockysmolin at bchacc.com Sat Jul 16 09:02:09 2011 From: rockysmolin at bchacc.com (Rocky Smolin) Date: Sat, 16 Jul 2011 07:02:09 -0700 Subject: [AccessD] VBA run-time error 3170: Could not find installableISAM In-Reply-To: References: Message-ID: <2A696EF71D4743F79FE709F132029C5A@HAL9007> Possible. I'll forward to the client. Thanks Rocky -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: Saturday, July 16, 2011 12:54 AM To: accessd at databaseadvisors.com Subject: Re: [AccessD] VBA run-time error 3170: Could not find installableISAM Hi Rocky Or, when installing Access, you forgot to mark the driver for Excel? /gustav >>> vbacreations at gmail.com 16-07-2011 03:44 >>> Could it be they have excel set to ignore requests from other applications? (DDE). On Jul 13, 2011 7:27 PM, "Rocky Smolin" wrote: > A prospect is getting this error: > > VBA run-time error 3170: Could not find installable ISAM > > When I do TransferSpreadsheet. > > Does anyone know offhand what the likeliest cause of this is? > > MTIA > > Rocky -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From rockysmolin at bchacc.com Sat Jul 16 09:10:25 2011 From: rockysmolin at bchacc.com (Rocky Smolin) Date: Sat, 16 Jul 2011 07:10:25 -0700 Subject: [AccessD] Elapsed time class - Stuart please ignore... In-Reply-To: <4E2193A0.1000509@colbyconsulting.com> References: <4E2193A0.1000509@colbyconsulting.com> Message-ID: Ooh, I could that. Can I get a copy when it's ready? Sign me, Living With a StarCraft Addict (Rocky) -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Saturday, July 16, 2011 6:35 AM To: Access Developers discussion and problem solving Subject: [AccessD] Elapsed time class - Stuart please ignore... I'm building a little database to time / log my son's computer time. I have a form which he uses to select a game which opens the game for him, creates a record in the table and starts the timer, leaving this form up in the background behind the game. As he closes the game the form becomes visible and he clicks a button to update the stop time in the table and stops the elapsed time timer. Not yet done, I will be causing the form to beep at him as he goes over the allotted time to play the game. Nothing special here, just wrapping the code / date I needed to measure elapsed time into a class. Obviously the point of putting it in a class is that it can be used in one or a hundred forms to perform elapsed time calcs, and it carves out all of that data / logic into a single place. To use it in any form just dimension a variable and set it to a new instance of the variable: Dim mcElapsedTime As clsElapsedTime Private Sub Form_Open(Cancel As Integer) Set mcElapsedTime = New clsElapsedTime Me.TimerInterval = 1000 - set up the timer for one second timer ticks End Sub Private Sub Form_Timer() mcElapsedTime.UpdateElapsedTime txtElapsedTime = mcElapsedTime.pElapsedTime End Sub The elapsed time class: Option Compare Database Option Explicit Private mlngSeconds As Long Private mlngMinutes As Long Private mlngHours As Long Private mstrElapsedTime Property Get pElapsedTime() As String pElapsedTime = mstrElapsedTime End Property Property Get pSeconds() As Long pSeconds = mlngSeconds End Property Property Get pMinutes() As Long pMinutes = mlngMinutes End Property Property Get pHours() As Long pHours = mlngHours End Property Private Function CalcElapsedTime() mstrElapsedTime = mlngHours & ":" & mlngMinutes & ":" & mlngSeconds End Function Function mResetElapsedTime() mlngSeconds = 0 mlngMinutes = 0 mlngHours = 0 End Function Function UpdateElapsedTime() mlngSeconds = mlngSeconds + 1 If mlngSeconds >= 60 Then mlngSeconds = 0 mlngMinutes = mlngMinutes + 1 End If If mlngMinutes >= 60 Then mlngMinutes = 0 mlngHours = mlngHours + 1 End If CalcElapsedTime End Function -- John W. Colby www.ColbyConsulting.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From jimdettman at verizon.net Sat Jul 16 09:33:56 2011 From: jimdettman at verizon.net (Jim Dettman) Date: Sat, 16 Jul 2011 10:33:56 -0400 Subject: [AccessD] VBA run-time error 3170: Could not find installable ISAM In-Reply-To: <2B7A375995D24727A5D8506CB9413AF8@HAL9007> References: <2B7A375995D24727A5D8506CB9413AF8@HAL9007> Message-ID: <242976E451CD4C82AB1CB0124621F85D@XPS> Rocky, Depends on version, but in the past, corrupt registry entries was usually the cause (assuming this was working already). See: When you import files, export files, or link files in Access 2002 or in Access 2003, some file types are missing, or you may receive a "Could not find installable ISAM" error message http://support.microsoft.com/kb/283881 This type of problem was the same all the way back through A97 (different registry keys though). Jim. -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Rocky Smolin Sent: Wednesday, July 13, 2011 07:25 PM To: accessd at databaseadvisors.com Subject: [AccessD] VBA run-time error 3170: Could not find installable ISAM A prospect is getting this error: VBA run-time error 3170: Could not find installable ISAM When I do TransferSpreadsheet. Does anyone know offhand what the likeliest cause of this is? MTIA Rocky -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From fuller.artful at gmail.com Sat Jul 16 09:48:36 2011 From: fuller.artful at gmail.com (Arthur Fuller) Date: Sat, 16 Jul 2011 10:48:36 -0400 Subject: [AccessD] Elapsed time class - Stuart please ignore... In-Reply-To: <4E2193A0.1000509@colbyconsulting.com> References: <4E2193A0.1000509@colbyconsulting.com> Message-ID: Nice and clean. How do you stop the timer? A. From jwcolby at colbyconsulting.com Sat Jul 16 10:01:25 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Sat, 16 Jul 2011 11:01:25 -0400 Subject: [AccessD] Elapsed time class - Stuart please ignore... In-Reply-To: References: <4E2193A0.1000509@colbyconsulting.com> Message-ID: <4E21A7C5.1000200@colbyconsulting.com> Set the form's TimerInterval to 0. The class with a pad function for the display and changing longs to int. Option Compare Database Option Explicit Private mintSeconds As Integer Private mintMinutes As Integer Private mintHours As Integer Private mstrElapsedTime Property Get pElapsedTime() As String pElapsedTime = mstrElapsedTime End Property Property Get pSeconds() As Integer pSeconds = mintSeconds End Property Property Get pMinutes() As Integer pMinutes = mintMinutes End Property Property Get pHours() As Integer pHours = mintHours End Property Function mPad(intToPad As Integer) As String Dim strToPad strToPad = intToPad If Len(strToPad < 2) Then strToPad = "0" & strToPad End If mPad = strToPad End Function Private Function CalcElapsedTime() Dim strPad As String mstrElapsedTime = mPad(mintHours) & ":" & mPad(mintMinutes) & ":" & mPad(mintSeconds) End Function Function mResetElapsedTime() mintSeconds = 0 mintMinutes = 0 mintHours = 0 End Function Function UpdateElapsedTime() mintSeconds = mintSeconds + 1 If mintSeconds >= 60 Then mintSeconds = 0 mintMinutes = mintMinutes + 1 End If If mintMinutes >= 60 Then mintMinutes = 0 mintHours = mintHours + 1 End If CalcElapsedTime End Function John W. Colby www.ColbyConsulting.com On 7/16/2011 10:48 AM, Arthur Fuller wrote: > Nice and clean. How do you stop the timer? > > A. From rockysmolin at bchacc.com Sat Jul 16 10:11:26 2011 From: rockysmolin at bchacc.com (Rocky Smolin) Date: Sat, 16 Jul 2011 08:11:26 -0700 Subject: [AccessD] VBA run-time error 3170: Could not find installableISAM In-Reply-To: <242976E451CD4C82AB1CB0124621F85D@XPS> References: <2B7A375995D24727A5D8506CB9413AF8@HAL9007> <242976E451CD4C82AB1CB0124621F85D@XPS> Message-ID: Thanks - will forward. BTW, I worked around the problem by using transfertext to a CSV file which opens just fine in Excel. :) Rocky -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Jim Dettman Sent: Saturday, July 16, 2011 7:34 AM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] VBA run-time error 3170: Could not find installableISAM Rocky, Depends on version, but in the past, corrupt registry entries was usually the cause (assuming this was working already). See: When you import files, export files, or link files in Access 2002 or in Access 2003, some file types are missing, or you may receive a "Could not find installable ISAM" error message http://support.microsoft.com/kb/283881 This type of problem was the same all the way back through A97 (different registry keys though). Jim. -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Rocky Smolin Sent: Wednesday, July 13, 2011 07:25 PM To: accessd at databaseadvisors.com Subject: [AccessD] VBA run-time error 3170: Could not find installable ISAM A prospect is getting this error: VBA run-time error 3170: Could not find installable ISAM When I do TransferSpreadsheet. Does anyone know offhand what the likeliest cause of this is? MTIA Rocky -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From rockysmolin at bchacc.com Sat Jul 16 10:18:09 2011 From: rockysmolin at bchacc.com (Rocky Smolin) Date: Sat, 16 Jul 2011 08:18:09 -0700 Subject: [AccessD] VBA run-time error 3170: Could not find installableISAM In-Reply-To: References: <2B7A375995D24727A5D8506CB9413AF8@HAL9007> Message-ID: William: Where do you set that DDE parameter? Thanks, Rocky -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of William Benson Sent: Friday, July 15, 2011 6:44 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] VBA run-time error 3170: Could not find installableISAM Could it be they have excel set to ignore requests from other applications? (DDE). On Jul 13, 2011 7:27 PM, "Rocky Smolin" wrote: > A prospect is getting this error: > > VBA run-time error 3170: Could not find installable ISAM > > When I do TransferSpreadsheet. > > Does anyone know offhand what the likeliest cause of this is? > > MTIA > > Rocky > > > -- > 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 jwcolby at colbyconsulting.com Sat Jul 16 13:46:59 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Sat, 16 Jul 2011 14:46:59 -0400 Subject: [AccessD] BE builder Message-ID: <4E21DCA3.6010105@colbyconsulting.com> I need an ultra simple BE builder. I have built my little game play logger for my son. It logs the time he starts and stops and plays a wave file - more and more often - to remind and encourage him to get off when his time is up. It only has a couple of simple tables, but it would be nice to split FE/BE so that if I fix a problem or add a feature I can update the FE. Ya know! It would be nice to have the program open and check if the BE exists, creating it if not. Placing the BE in the same dir as the FE would be fine. I can of course write that but if anyone has such a thing already that would be better. I did it long ago but it is lost in the deep shadows of the last century. Anyone? -- John W. Colby www.ColbyConsulting.com From stuart at lexacorp.com.pg Sat Jul 16 15:20:20 2011 From: stuart at lexacorp.com.pg (Stuart McLachlan) Date: Sun, 17 Jul 2011 06:20:20 +1000 Subject: [AccessD] BE builder In-Reply-To: <4E21DCA3.6010105@colbyconsulting.com> References: <4E21DCA3.6010105@colbyconsulting.com> Message-ID: <4E21F284.17638.9E6E218@stuart.lexacorp.com.pg> Quick one of the top of my head: Obviously you need would probably want to add indexes and do some error checking as well. Option Compare Database Option Explicit Const BEName As String = "GameTimer.mdb" Function CheckBE() If Dir$(CurrentProject.Path & "\" & BEName) = "" Then CreateBE End Function Function CreateBE() As Long Dim wrkDefault As Workspace Dim dbsNew As Database Dim tdfNew As TableDef Set wrkDefault = DBEngine.Workspaces(0) Set dbsNew = wrkDefault.CreateDatabase(CurrentProject.Path & "\" & BEName, dbLangGeneral) Set tdfNew = dbsNew.CreateTableDef("tblGameTimes") With tdfNew .Fields.Append .CreateField("StartDateTime", dbDate) .Fields.Append .CreateField("ElapsedTime", dbLong) .Fields.Append .CreateField("Game", dbText) End With dbsNew.TableDefs.Append tdfNew dbsNew.Close End Function On 16 Jul 2011 at 14:46, jwcolby wrote: > I need an ultra simple BE builder. I have built my little game play > logger for my son. It logs the time he starts and stops and plays a > wave file - more and more often - to remind and encourage him to get > off when his time is up. > > It only has a couple of simple tables, but it would be nice to split > FE/BE so that if I fix a problem or add a feature I can update the FE. > Ya know! > > It would be nice to have the program open and check if the BE exists, > creating it if not. Placing the BE in the same dir as the FE would be > fine. > > I can of course write that but if anyone has such a thing already that > would be better. I did it long ago but it is lost in the deep shadows > of the last century. > > Anyone? > -- > John W. Colby > www.ColbyConsulting.com > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > From jwcolby at colbyconsulting.com Sat Jul 16 15:38:49 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Sat, 16 Jul 2011 16:38:49 -0400 Subject: [AccessD] BE builder In-Reply-To: <4E21F284.17638.9E6E218@stuart.lexacorp.com.pg> References: <4E21DCA3.6010105@colbyconsulting.com> <4E21F284.17638.9E6E218@stuart.lexacorp.com.pg> Message-ID: <4E21F6D9.1000406@colbyconsulting.com> Thanks Stuart! John W. Colby www.ColbyConsulting.com On 7/16/2011 4:20 PM, Stuart McLachlan wrote: > Quick one of the top of my head: Obviously you need would probably want to add indexes > and do some error checking as well. > > Option Compare Database > Option Explicit > > Const BEName As String = "GameTimer.mdb" > > Function CheckBE() > If Dir$(CurrentProject.Path& "\"& BEName) = "" Then CreateBE > End Function > > Function CreateBE() As Long > Dim wrkDefault As Workspace > Dim dbsNew As Database > Dim tdfNew As TableDef > > Set wrkDefault = DBEngine.Workspaces(0) > Set dbsNew = wrkDefault.CreateDatabase(CurrentProject.Path& "\"& BEName, > dbLangGeneral) > Set tdfNew = dbsNew.CreateTableDef("tblGameTimes") > With tdfNew > .Fields.Append .CreateField("StartDateTime", dbDate) > .Fields.Append .CreateField("ElapsedTime", dbLong) > .Fields.Append .CreateField("Game", dbText) > End With > dbsNew.TableDefs.Append tdfNew > dbsNew.Close > End Function > > > On 16 Jul 2011 at 14:46, jwcolby wrote: > >> I need an ultra simple BE builder. I have built my little game play >> logger for my son. It logs the time he starts and stops and plays a >> wave file - more and more often - to remind and encourage him to get >> off when his time is up. >> >> It only has a couple of simple tables, but it would be nice to split >> FE/BE so that if I fix a problem or add a feature I can update the FE. >> Ya know! >> >> It would be nice to have the program open and check if the BE exists, >> creating it if not. Placing the BE in the same dir as the FE would be >> fine. >> >> I can of course write that but if anyone has such a thing already that >> would be better. I did it long ago but it is lost in the deep shadows >> of the last century. >> >> Anyone? >> -- >> John W. Colby >> www.ColbyConsulting.com >> -- >> AccessD mailing list >> AccessD at databaseadvisors.com >> http://databaseadvisors.com/mailman/listinfo/accessd >> Website: http://www.databaseadvisors.com >> > > > From jwcolby at colbyconsulting.com Sat Jul 16 16:09:35 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Sat, 16 Jul 2011 17:09:35 -0400 Subject: [AccessD] where is OpenOffice data store Message-ID: <4E21FE0F.3090606@colbyconsulting.com> I installed OpenOffice on a computer I am giving away. I just happened to create a table in their database app and the data store looks rather robust, perhaps mysql? I have not managed to Google what data store open office uses. Does anyone know? -- John W. Colby www.ColbyConsulting.com From stuart at lexacorp.com.pg Sat Jul 16 16:49:52 2011 From: stuart at lexacorp.com.pg (Stuart McLachlan) Date: Sun, 17 Jul 2011 07:49:52 +1000 Subject: [AccessD] where is OpenOffice data store In-Reply-To: <4E21FE0F.3090606@colbyconsulting.com> References: <4E21FE0F.3090606@colbyconsulting.com> Message-ID: <4E220780.30775.A38D934@stuart.lexacorp.com.pg> HyperSQL http://hsqldb.org/ -- Stuart On 16 Jul 2011 at 17:09, jwcolby wrote: > I installed OpenOffice on a computer I am giving away. I just > happened to create a table in their database app and the data store > looks rather robust, perhaps mysql? I have not managed to Google what > data store open office uses. > > Does anyone know? > > -- > John W. Colby > www.ColbyConsulting.com > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > From jwcolby at colbyconsulting.com Sun Jul 17 13:22:34 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Sun, 17 Jul 2011 14:22:34 -0400 Subject: [AccessD] Child computer Game timer Message-ID: <4E23286A.8030301@colbyconsulting.com> I have designed a game timer for my son which I am making available to list members if they want it. This timer is designed for children who are old enough to play "unsupervised" and I want them to have a set time that they can play per session. I want to record when they start and stop and have a display of how long they have been playing. I used to have Robbie "write it down" and set a timer on the stove. Both of which he "forgot" more often than not. This is not a "dishonest teenager" control mechanism, I am not getting into trying to outsmart a teenager here. It is merely meant to allow me to see how much time my son is playing. I removed all of the shortcuts from the desktop etc so that the way he opens his games is through this database. I actually copied one of the shortcuts into the startup directory for one game that required a shortcut. I then informed him that there are consequences if he is playing without going through the timer. The timer is an Access form which has a game combo and a child id combo. In my case only my son uses it at the moment, though I will probably have my daughter use it as well. It is FE/BE. The form consists of: 1) A game combo 2) A child combo 3) A start time 4) A stop time 5) The minutes they are allowed to play, fixed ATM though it could be included in the child record. Status controls are: 1) Last Play elapsed time 2) Last play time stopped At the very bottom of the form is an elapsed time. So the child selects the game they will play. The game has the stuff required to actually open the game, usually the filespec for the game (path and file name) but it can also use a shortcut file if the game requires starting directory etc. Selecting the game starts a timer which shows up on the "Elapsed time" at the bottom, and records the start time. There is a button which enters the stopped time and moves to a new record. Once a record is "stopped" it can no longer be edited. No records can be deleted (through the form). When the time is up, my son often does the "I need to do this one small thing before I quit" routine. In order to allow that but still encourage him to get off, i built in an annoyance timer. The database does not (yet) shut down the game automatically (though I might go there) but it does beep a series of beeps when time is up, and then starts beeping at him every N seconds. N decreases over time until it is beeping every second. This is truly annoying (to anyone in the room) and encourages him to finish up and get off. It also alerts any adult near by that "time is up". In fact it is so annoying that he was turning down the speaker when it beeped. I had to inform him that there would be consequences for that. ;) The system is working fine so far. I am finally getting his times logged regularly and getting him off when his time is up. We shall have to see how it works long term. Adolescents can be sneaky. Total loss of gaming privileges for breaking the rules is the consequence of being sneaky. Possible enhancements: 1) Times of day allowed to play 2) Total time allowed to play 3) Play time allowed per child etc. -- John W. Colby www.ColbyConsulting.com From mwp.reid at qub.ac.uk Sun Jul 17 13:38:07 2011 From: mwp.reid at qub.ac.uk (Martin Reid) Date: Sun, 17 Jul 2011 19:38:07 +0100 Subject: [AccessD] Child computer Game timer Message-ID: <631CF83223105545BF43EFB52CB08295492AF7C9ED@EX2K7-VIRT-2.ads.qub.ac.uk> I use the low tech approach walk over and turn it of. Martin Sent from my Windows Phone -----Original Message----- From: jwcolby Sent: 17 July 2011 19:26 To: Access Developers discussion and problem solving Subject: [AccessD] Child computer Game timer I have designed a game timer for my son which I am making available to list members if they want it. This timer is designed for children who are old enough to play "unsupervised" and I want them to have a set time that they can play per session. I want to record when they start and stop and have a display of how long they have been playing. I used to have Robbie "write it down" and set a timer on the stove. Both of which he "forgot" more often than not. This is not a "dishonest teenager" control mechanism, I am not getting into trying to outsmart a teenager here. It is merely meant to allow me to see how much time my son is playing. I removed all of the shortcuts from the desktop etc so that the way he opens his games is through this database. I actually copied one of the shortcuts into the startup directory for one game that required a shortcut. I then informed him that there are consequences if he is playing without going through the timer. The timer is an Access form which has a game combo and a child id combo. In my case only my son uses it at the moment, though I will probably have my daughter use it as well. It is FE/BE. The form consists of: 1) A game combo 2) A child combo 3) A start time 4) A stop time 5) The minutes they are allowed to play, fixed ATM though it could be included in the child record. Status controls are: 1) Last Play elapsed time 2) Last play time stopped At the very bottom of the form is an elapsed time. So the child selects the game they will play. The game has the stuff required to actually open the game, usually the filespec for the game (path and file name) but it can also use a shortcut file if the game requires starting directory etc. Selecting the game starts a timer which shows up on the "Elapsed time" at the bottom, and records the start time. There is a button which enters the stopped time and moves to a new record. Once a record is "stopped" it can no longer be edited. No records can be deleted (through the form). When the time is up, my son often does the "I need to do this one small thing before I quit" routine. In order to allow that but still encourage him to get off, i built in an annoyance timer. The database does not (yet) shut down the game automatically (though I might go there) but it does beep a series of beeps when time is up, and then starts beeping at him every N seconds. N decreases over time until it is beeping every second. This is truly annoying (to anyone in the room) and encourages him to finish up and get off. It also alerts any adult near by that "time is up". In fact it is so annoying that he was turning down the speaker when it beeped. I had to inform him that there would be consequences for that. ;) The system is working fine so far. I am finally getting his times logged regularly and getting him off when his time is up. We shall have to see how it works long term. Adolescents can be sneaky. Total loss of gaming privileges for breaking the rules is the consequence of being sneaky. Possible enhancements: 1) Times of day allowed to play 2) Total time allowed to play 3) Play time allowed per child etc. -- John W. Colby www.ColbyConsulting.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 Jul 17 14:19:38 2011 From: accessd at shaw.ca (Jim Lawrence) Date: Sun, 17 Jul 2011 12:19:38 -0700 Subject: [AccessD] where is OpenOffice data store In-Reply-To: <4E220780.30775.A38D934@stuart.lexacorp.com.pg> References: <4E21FE0F.3090606@colbyconsulting.com> <4E220780.30775.A38D934@stuart.lexacorp.com.pg> Message-ID: <4467AEDCF3B74D77926B9BDB54F72737@creativesystemdesigns.com> Hi John, Stuart... Alternatively, MySQL/PHPAdmin, is so standard and there is thousands of web sites dedicated that DB and Admin FE. For a give away it is the best as you do not really want the client coming back having to ask all sorts of questions...;-) Jim -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Stuart McLachlan Sent: Saturday, July 16, 2011 2:50 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] where is OpenOffice data store HyperSQL http://hsqldb.org/ -- Stuart On 16 Jul 2011 at 17:09, jwcolby wrote: > I installed OpenOffice on a computer I am giving away. I just > happened to create a table in their database app and the data store > looks rather robust, perhaps mysql? I have not managed to Google what > data store open office uses. > > Does anyone know? > > -- > John W. Colby > www.ColbyConsulting.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 Jul 17 14:24:09 2011 From: accessd at shaw.ca (Jim Lawrence) Date: Sun, 17 Jul 2011 12:24:09 -0700 Subject: [AccessD] Child computer Game timer In-Reply-To: <4E23286A.8030301@colbyconsulting.com> References: <4E23286A.8030301@colbyconsulting.com> Message-ID: Hi John: You could just get something like the KidLogger. http://kidlogger.net/download.html Jim -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Sunday, July 17, 2011 11:23 AM To: Access Developers discussion and problem solving Subject: [AccessD] Child computer Game timer I have designed a game timer for my son which I am making available to list members if they want it. This timer is designed for children who are old enough to play "unsupervised" and I want them to have a set time that they can play per session. I want to record when they start and stop and have a display of how long they have been playing. I used to have Robbie "write it down" and set a timer on the stove. Both of which he "forgot" more often than not. This is not a "dishonest teenager" control mechanism, I am not getting into trying to outsmart a teenager here. It is merely meant to allow me to see how much time my son is playing. I removed all of the shortcuts from the desktop etc so that the way he opens his games is through this database. I actually copied one of the shortcuts into the startup directory for one game that required a shortcut. I then informed him that there are consequences if he is playing without going through the timer. The timer is an Access form which has a game combo and a child id combo. In my case only my son uses it at the moment, though I will probably have my daughter use it as well. It is FE/BE. The form consists of: 1) A game combo 2) A child combo 3) A start time 4) A stop time 5) The minutes they are allowed to play, fixed ATM though it could be included in the child record. Status controls are: 1) Last Play elapsed time 2) Last play time stopped At the very bottom of the form is an elapsed time. So the child selects the game they will play. The game has the stuff required to actually open the game, usually the filespec for the game (path and file name) but it can also use a shortcut file if the game requires starting directory etc. Selecting the game starts a timer which shows up on the "Elapsed time" at the bottom, and records the start time. There is a button which enters the stopped time and moves to a new record. Once a record is "stopped" it can no longer be edited. No records can be deleted (through the form). When the time is up, my son often does the "I need to do this one small thing before I quit" routine. In order to allow that but still encourage him to get off, i built in an annoyance timer. The database does not (yet) shut down the game automatically (though I might go there) but it does beep a series of beeps when time is up, and then starts beeping at him every N seconds. N decreases over time until it is beeping every second. This is truly annoying (to anyone in the room) and encourages him to finish up and get off. It also alerts any adult near by that "time is up". In fact it is so annoying that he was turning down the speaker when it beeped. I had to inform him that there would be consequences for that. ;) The system is working fine so far. I am finally getting his times logged regularly and getting him off when his time is up. We shall have to see how it works long term. Adolescents can be sneaky. Total loss of gaming privileges for breaking the rules is the consequence of being sneaky. Possible enhancements: 1) Times of day allowed to play 2) Total time allowed to play 3) Play time allowed per child etc. -- John W. Colby www.ColbyConsulting.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 Sun Jul 17 16:36:45 2011 From: stuart at lexacorp.com.pg (Stuart McLachlan) Date: Mon, 18 Jul 2011 07:36:45 +1000 Subject: [AccessD] where is OpenOffice data store In-Reply-To: <4467AEDCF3B74D77926B9BDB54F72737@creativesystemdesigns.com> References: <4E21FE0F.3090606@colbyconsulting.com>, <4E220780.30775.A38D934@stuart.lexacorp.com.pg>, <4467AEDCF3B74D77926B9BDB54F72737@creativesystemdesigns.com> Message-ID: <4E2355ED.23197.F5337D2@stuart.lexacorp.com.pg> Jim, John wasn't asking for suggestions, he was asking for a fact - what engine does Open Office use, -- Stuart On 17 Jul 2011 at 12:19, Jim Lawrence wrote: > Hi John, Stuart... > > Alternatively, MySQL/PHPAdmin, is so standard and there is thousands > of web sites dedicated that DB and Admin FE. For a give away it is the > best as you do not really want the client coming back having to ask > all sorts of questions...;-) > > Jim > > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Stuart > McLachlan Sent: Saturday, July 16, 2011 2:50 PM To: Access Developers > discussion and problem solving Subject: Re: [AccessD] where is > OpenOffice data store > > HyperSQL http://hsqldb.org/ > > -- > Stuart > > On 16 Jul 2011 at 17:09, jwcolby wrote: > > > I installed OpenOffice on a computer I am giving away. I just > > happened to create a table in their database app and the data store > > looks rather robust, perhaps mysql? I have not managed to Google > > what data store open office uses. > > > > Does anyone know? > > > > -- > > John W. Colby > > www.ColbyConsulting.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 Jul 17 19:00:34 2011 From: accessd at shaw.ca (Jim Lawrence) Date: Sun, 17 Jul 2011 17:00:34 -0700 Subject: [AccessD] where is OpenOffice data store In-Reply-To: <4E2355ED.23197.F5337D2@stuart.lexacorp.com.pg> References: <4E21FE0F.3090606@colbyconsulting.com> <4E220780.30775.A38D934@stuart.lexacorp.com.pg> <4467AEDCF3B74D77926B9BDB54F72737@creativesystemdesigns.com> <4E2355ED.23197.F5337D2@stuart.lexacorp.com.pg> Message-ID: <876882B1D75F40B68C0F13C95949AAAE@creativesystemdesigns.com> Right you are, Stuart... Jim -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Stuart McLachlan Sent: Sunday, July 17, 2011 2:37 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] where is OpenOffice data store Jim, John wasn't asking for suggestions, he was asking for a fact - what engine does Open Office use, -- Stuart On 17 Jul 2011 at 12:19, Jim Lawrence wrote: > Hi John, Stuart... > > Alternatively, MySQL/PHPAdmin, is so standard and there is thousands > of web sites dedicated that DB and Admin FE. For a give away it is the > best as you do not really want the client coming back having to ask > all sorts of questions...;-) > > Jim > > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Stuart > McLachlan Sent: Saturday, July 16, 2011 2:50 PM To: Access Developers > discussion and problem solving Subject: Re: [AccessD] where is > OpenOffice data store > > HyperSQL http://hsqldb.org/ > > -- > Stuart > > On 16 Jul 2011 at 17:09, jwcolby wrote: > > > I installed OpenOffice on a computer I am giving away. I just > > happened to create a table in their database app and the data store > > looks rather robust, perhaps mysql? I have not managed to Google > > what data store open office uses. > > > > Does anyone know? > > > > -- > > John W. Colby > > www.ColbyConsulting.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 jimdettman at verizon.net Sun Jul 17 20:09:10 2011 From: jimdettman at verizon.net (Jim Dettman) Date: Sun, 17 Jul 2011 21:09:10 -0400 Subject: [AccessD] Child computer Game timer In-Reply-To: References: <4E23286A.8030301@colbyconsulting.com> Message-ID: Check your router too...a lot of routers know have bandwidth monitoring, parental controls, and the ability to filter (by Mac address) based on a schedule. I've got mine set to cut out all internet access from 2:00 - 6:00 am. Jim. -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Jim Lawrence Sent: Sunday, July 17, 2011 03:24 PM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Child computer Game timer Hi John: You could just get something like the KidLogger. http://kidlogger.net/download.html Jim -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Sunday, July 17, 2011 11:23 AM To: Access Developers discussion and problem solving Subject: [AccessD] Child computer Game timer I have designed a game timer for my son which I am making available to list members if they want it. This timer is designed for children who are old enough to play "unsupervised" and I want them to have a set time that they can play per session. I want to record when they start and stop and have a display of how long they have been playing. I used to have Robbie "write it down" and set a timer on the stove. Both of which he "forgot" more often than not. This is not a "dishonest teenager" control mechanism, I am not getting into trying to outsmart a teenager here. It is merely meant to allow me to see how much time my son is playing. I removed all of the shortcuts from the desktop etc so that the way he opens his games is through this database. I actually copied one of the shortcuts into the startup directory for one game that required a shortcut. I then informed him that there are consequences if he is playing without going through the timer. The timer is an Access form which has a game combo and a child id combo. In my case only my son uses it at the moment, though I will probably have my daughter use it as well. It is FE/BE. The form consists of: 1) A game combo 2) A child combo 3) A start time 4) A stop time 5) The minutes they are allowed to play, fixed ATM though it could be included in the child record. Status controls are: 1) Last Play elapsed time 2) Last play time stopped At the very bottom of the form is an elapsed time. So the child selects the game they will play. The game has the stuff required to actually open the game, usually the filespec for the game (path and file name) but it can also use a shortcut file if the game requires starting directory etc. Selecting the game starts a timer which shows up on the "Elapsed time" at the bottom, and records the start time. There is a button which enters the stopped time and moves to a new record. Once a record is "stopped" it can no longer be edited. No records can be deleted (through the form). When the time is up, my son often does the "I need to do this one small thing before I quit" routine. In order to allow that but still encourage him to get off, i built in an annoyance timer. The database does not (yet) shut down the game automatically (though I might go there) but it does beep a series of beeps when time is up, and then starts beeping at him every N seconds. N decreases over time until it is beeping every second. This is truly annoying (to anyone in the room) and encourages him to finish up and get off. It also alerts any adult near by that "time is up". In fact it is so annoying that he was turning down the speaker when it beeped. I had to inform him that there would be consequences for that. ;) The system is working fine so far. I am finally getting his times logged regularly and getting him off when his time is up. We shall have to see how it works long term. Adolescents can be sneaky. Total loss of gaming privileges for breaking the rules is the consequence of being sneaky. Possible enhancements: 1) Times of day allowed to play 2) Total time allowed to play 3) Play time allowed per child etc. -- John W. Colby www.ColbyConsulting.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 dbdoug at gmail.com Sun Jul 17 21:31:16 2011 From: dbdoug at gmail.com (Doug Steele) Date: Sun, 17 Jul 2011 19:31:16 -0700 Subject: [AccessD] Child computer Game timer In-Reply-To: References: <4E23286A.8030301@colbyconsulting.com> Message-ID: John's doing it right, in my opinion. If Robbie wants more time, he's going to be forced to learn to hack John's program. Then, before he knows it, no more computer games, just huge SQL databases to maintain while John enjoys his retirement... Doug On Sun, Jul 17, 2011 at 6:09 PM, Jim Dettman wrote: > > ?Check your router too...a lot of routers know have bandwidth monitoring, > parental controls, and the ability to filter (by Mac address) based on a > schedule. > > ?I've got mine set to cut out all internet access from 2:00 - 6:00 am. > > Jim. > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Jim Lawrence > Sent: Sunday, July 17, 2011 03:24 PM > To: 'Access Developers discussion and problem solving' > Subject: Re: [AccessD] Child computer Game timer > > Hi John: > > You could just get something like the KidLogger. > > http://kidlogger.net/download.html > > Jim > > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby > Sent: Sunday, July 17, 2011 11:23 AM > To: Access Developers discussion and problem solving > Subject: [AccessD] Child computer Game timer > > I have designed a game timer for my son which I am making available to list > members if they want it. > > This timer is designed for children who are old enough to play > "unsupervised" and I want them to > have a set time that they can play per session. ?I want to record when they > start and stop and have > a display of how long they have been playing. ?I used to have Robbie "write > it down" and set a timer > on the stove. ?Both of which he "forgot" more often than not. > > This is not a "dishonest teenager" control mechanism, I am not getting into > trying to outsmart a > teenager here. ?It is merely meant to allow me to see how much time my son > is playing. ?I removed > all of the shortcuts from the desktop etc so that the way he opens his games > is through this > database. ?I actually copied one of the shortcuts into the startup directory > for one game that > required a shortcut. > > I then informed him that there are consequences if he is playing without > going through the timer. > > The timer is an Access form which has a game combo and a child id combo. ?In > my case only my son > uses it at the moment, though I will probably have my daughter use it as > well. ?It is FE/BE. > > The form consists of: > > 1) A game combo > 2) A child combo > 3) A start time > 4) A stop time > 5) The minutes they are allowed to play, fixed ATM though it could be > included in the child record. > > Status controls are: > > 1) Last Play elapsed time > 2) Last play time stopped > > At the very bottom of the form is an elapsed time. > > So the child selects the game they will play. ?The game has the stuff > required to actually open the > game, usually the filespec for the game (path and file name) but it can also > use a shortcut file if > the game requires starting directory etc. > > Selecting the game starts a timer which shows up on the "Elapsed time" at > the bottom, and records > the start time. ?There is a button which enters the stopped time and moves > to a new record. ?Once a > record is "stopped" it can no longer be edited. ?No records can be deleted > (through the form). > > When the time is up, my son often does the "I need to do this one small > thing before I quit" > routine. ?In order to allow that but still encourage him to get off, i built > in an annoyance timer. > ?The database does not (yet) shut down the game automatically (though I > might go there) but it does > beep a series of beeps when time is up, and then starts beeping at him every > N seconds. ?N decreases > over time until it is beeping every second. ?This is truly annoying (to > anyone in the room) and > encourages him to finish up and get off. ?It also alerts any adult near by > that "time is up". ?In > fact it is so annoying that he was turning down the speaker when it beeped. > I had to inform him > that there would be consequences for that. ?;) > > The system is working fine so far. ?I am finally getting his times logged > regularly and getting him > off when his time is up. ?We shall have to see how it works long term. > Adolescents can be sneaky. > Total loss of gaming privileges for breaking the rules is the consequence of > being sneaky. > > Possible enhancements: > > 1) Times of day allowed to play > 2) Total time allowed to play > 3) Play time allowed per child > etc. > > -- > John W. Colby > www.ColbyConsulting.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 vbacreations at gmail.com Sun Jul 17 21:46:16 2011 From: vbacreations at gmail.com (William Benson (VBACreations.Com)) Date: Sun, 17 Jul 2011 22:46:16 -0400 Subject: [AccessD] where is OpenOffice data store In-Reply-To: <4E21FE0F.3090606@colbyconsulting.com> References: <4E21FE0F.3090606@colbyconsulting.com> Message-ID: <000101cc44f4$ddf6f4c0$99e4de40$@gmail.com> Since you didn't get to Google at the time, I did some searching. Here were some references I found, but no succinct answer: http://en.wikipedia.org/wiki/OpenOffice.org A database management program similar to Microsoft Access. Base allows the creation and manipulation of databases, and the building of forms and reports to provide easy access to data for end-users. As with MS Access, Base can function as a front-end to a number of different database systems, including Access databases (JET), ODBC data sources and MySQL/PostgreSQL. Base became part of the suite starting with version 2.0. Native to the OpenOffice.org suite is an adaptation of HSQL. While Base can be a front-end for any of the databases listed, there is no need to install any of them. Raw SQL code can be entered by those who prefer it, or graphical user interfaces can be used. Here are two really good links in terms of understanding and usability of ooBase http://sheepdogguides.com/fdb/fdb1main.htm http://www.pitonyak.org/database/AndrewBase.odt Can we get back to MS Access now? ;-) -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Saturday, July 16, 2011 5:10 PM To: Access Developers discussion and problem solving Subject: [AccessD] where is OpenOffice data store I installed OpenOffice on a computer I am giving away. I just happened to create a table in their database app and the data store looks rather robust, perhaps mysql? I have not managed to Google what data store open office uses. Does anyone know? -- John W. Colby www.ColbyConsulting.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From vbacreations at gmail.com Sun Jul 17 22:18:09 2011 From: vbacreations at gmail.com (William Benson (VBACreations.Com)) Date: Sun, 17 Jul 2011 23:18:09 -0400 Subject: [AccessD] Child computer Game timer In-Reply-To: References: <4E23286A.8030301@colbyconsulting.com> Message-ID: <000201cc44f9$527fbb70$f77f3250$@gmail.com> OMG that is soooo funny..... I needed a laugh Doug. -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Doug Steele Sent: Sunday, July 17, 2011 10:31 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Child computer Game timer John's doing it right, in my opinion. If Robbie wants more time, he's going to be forced to learn to hack John's program. Then, before he knows it, no more computer games, just huge SQL databases to maintain while John enjoys his retirement... Doug On Sun, Jul 17, 2011 at 6:09 PM, Jim Dettman wrote: > > ?Check your router too...a lot of routers know have bandwidth monitoring, > parental controls, and the ability to filter (by Mac address) based on a > schedule. > > ?I've got mine set to cut out all internet access from 2:00 - 6:00 am. > > Jim. > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Jim Lawrence > Sent: Sunday, July 17, 2011 03:24 PM > To: 'Access Developers discussion and problem solving' > Subject: Re: [AccessD] Child computer Game timer > > Hi John: > > You could just get something like the KidLogger. > > http://kidlogger.net/download.html > > Jim > > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby > Sent: Sunday, July 17, 2011 11:23 AM > To: Access Developers discussion and problem solving > Subject: [AccessD] Child computer Game timer > > I have designed a game timer for my son which I am making available to list > members if they want it. > > This timer is designed for children who are old enough to play > "unsupervised" and I want them to > have a set time that they can play per session. ?I want to record when they > start and stop and have > a display of how long they have been playing. ?I used to have Robbie "write > it down" and set a timer > on the stove. ?Both of which he "forgot" more often than not. > > This is not a "dishonest teenager" control mechanism, I am not getting into > trying to outsmart a > teenager here. ?It is merely meant to allow me to see how much time my son > is playing. ?I removed > all of the shortcuts from the desktop etc so that the way he opens his games > is through this > database. ?I actually copied one of the shortcuts into the startup directory > for one game that > required a shortcut. > > I then informed him that there are consequences if he is playing without > going through the timer. > > The timer is an Access form which has a game combo and a child id combo. ?In > my case only my son > uses it at the moment, though I will probably have my daughter use it as > well. ?It is FE/BE. > > The form consists of: > > 1) A game combo > 2) A child combo > 3) A start time > 4) A stop time > 5) The minutes they are allowed to play, fixed ATM though it could be > included in the child record. > > Status controls are: > > 1) Last Play elapsed time > 2) Last play time stopped > > At the very bottom of the form is an elapsed time. > > So the child selects the game they will play. ?The game has the stuff > required to actually open the > game, usually the filespec for the game (path and file name) but it can also > use a shortcut file if > the game requires starting directory etc. > > Selecting the game starts a timer which shows up on the "Elapsed time" at > the bottom, and records > the start time. ?There is a button which enters the stopped time and moves > to a new record. ?Once a > record is "stopped" it can no longer be edited. ?No records can be deleted > (through the form). > > When the time is up, my son often does the "I need to do this one small > thing before I quit" > routine. ?In order to allow that but still encourage him to get off, i built > in an annoyance timer. > ?The database does not (yet) shut down the game automatically (though I > might go there) but it does > beep a series of beeps when time is up, and then starts beeping at him every > N seconds. ?N decreases > over time until it is beeping every second. ?This is truly annoying (to > anyone in the room) and > encourages him to finish up and get off. ?It also alerts any adult near by > that "time is up". ?In > fact it is so annoying that he was turning down the speaker when it beeped. > I had to inform him > that there would be consequences for that. ?;) > > The system is working fine so far. ?I am finally getting his times logged > regularly and getting him > off when his time is up. ?We shall have to see how it works long term. > Adolescents can be sneaky. > Total loss of gaming privileges for breaking the rules is the consequence of > being sneaky. > > Possible enhancements: > > 1) Times of day allowed to play > 2) Total time allowed to play > 3) Play time allowed per child > etc. > > -- > John W. Colby > www.ColbyConsulting.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 jwcolby at colbyconsulting.com Mon Jul 18 05:52:37 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Mon, 18 Jul 2011 06:52:37 -0400 Subject: [AccessD] Child computer Game timer In-Reply-To: References: <4E23286A.8030301@colbyconsulting.com> Message-ID: <4E241075.3040204@colbyconsulting.com> I already have him learning Access! He loves learning what dad does. John W. Colby www.ColbyConsulting.com On 7/17/2011 10:31 PM, Doug Steele wrote: > John's doing it right, in my opinion. If Robbie wants more time, he's > going to be forced to learn to hack John's program. Then, before he > knows it, no more computer games, just huge SQL databases to maintain > while John enjoys his retirement... > > Doug > > On Sun, Jul 17, 2011 at 6:09 PM, Jim Dettman wrote: >> >> Check your router too...a lot of routers know have bandwidth monitoring, >> parental controls, and the ability to filter (by Mac address) based on a >> schedule. >> >> I've got mine set to cut out all internet access from 2:00 - 6:00 am. >> >> Jim. >> >> -----Original Message----- >> From: accessd-bounces at databaseadvisors.com >> [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Jim Lawrence >> Sent: Sunday, July 17, 2011 03:24 PM >> To: 'Access Developers discussion and problem solving' >> Subject: Re: [AccessD] Child computer Game timer >> >> Hi John: >> >> You could just get something like the KidLogger. >> >> http://kidlogger.net/download.html >> >> Jim >> >> >> -----Original Message----- >> From: accessd-bounces at databaseadvisors.com >> [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby >> Sent: Sunday, July 17, 2011 11:23 AM >> To: Access Developers discussion and problem solving >> Subject: [AccessD] Child computer Game timer >> >> I have designed a game timer for my son which I am making available to list >> members if they want it. >> >> This timer is designed for children who are old enough to play >> "unsupervised" and I want them to >> have a set time that they can play per session. I want to record when they >> start and stop and have >> a display of how long they have been playing. I used to have Robbie "write >> it down" and set a timer >> on the stove. Both of which he "forgot" more often than not. >> >> This is not a "dishonest teenager" control mechanism, I am not getting into >> trying to outsmart a >> teenager here. It is merely meant to allow me to see how much time my son >> is playing. I removed >> all of the shortcuts from the desktop etc so that the way he opens his games >> is through this >> database. I actually copied one of the shortcuts into the startup directory >> for one game that >> required a shortcut. >> >> I then informed him that there are consequences if he is playing without >> going through the timer. >> >> The timer is an Access form which has a game combo and a child id combo. In >> my case only my son >> uses it at the moment, though I will probably have my daughter use it as >> well. It is FE/BE. >> >> The form consists of: >> >> 1) A game combo >> 2) A child combo >> 3) A start time >> 4) A stop time >> 5) The minutes they are allowed to play, fixed ATM though it could be >> included in the child record. >> >> Status controls are: >> >> 1) Last Play elapsed time >> 2) Last play time stopped >> >> At the very bottom of the form is an elapsed time. >> >> So the child selects the game they will play. The game has the stuff >> required to actually open the >> game, usually the filespec for the game (path and file name) but it can also >> use a shortcut file if >> the game requires starting directory etc. >> >> Selecting the game starts a timer which shows up on the "Elapsed time" at >> the bottom, and records >> the start time. There is a button which enters the stopped time and moves >> to a new record. Once a >> record is "stopped" it can no longer be edited. No records can be deleted >> (through the form). >> >> When the time is up, my son often does the "I need to do this one small >> thing before I quit" >> routine. In order to allow that but still encourage him to get off, i built >> in an annoyance timer. >> The database does not (yet) shut down the game automatically (though I >> might go there) but it does >> beep a series of beeps when time is up, and then starts beeping at him every >> N seconds. N decreases >> over time until it is beeping every second. This is truly annoying (to >> anyone in the room) and >> encourages him to finish up and get off. It also alerts any adult near by >> that "time is up". In >> fact it is so annoying that he was turning down the speaker when it beeped. >> I had to inform him >> that there would be consequences for that. ;) >> >> The system is working fine so far. I am finally getting his times logged >> regularly and getting him >> off when his time is up. We shall have to see how it works long term. >> Adolescents can be sneaky. >> Total loss of gaming privileges for breaking the rules is the consequence of >> being sneaky. >> >> Possible enhancements: >> >> 1) Times of day allowed to play >> 2) Total time allowed to play >> 3) Play time allowed per child >> etc. >> >> -- >> John W. Colby >> www.ColbyConsulting.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 DWUTKA at Marlow.com Mon Jul 18 09:12:29 2011 From: DWUTKA at Marlow.com (Drew Wutka) Date: Mon, 18 Jul 2011 09:12:29 -0500 Subject: [AccessD] Child computer Game timer In-Reply-To: <4E23286A.8030301@colbyconsulting.com> References: <4E23286A.8030301@colbyconsulting.com> Message-ID: Why not just detect the game he is playing based upon the window's that are running? Each game should have a window that should be easy to identify. Drew -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Sunday, July 17, 2011 1:23 PM To: Access Developers discussion and problem solving Subject: [AccessD] Child computer Game timer I have designed a game timer for my son which I am making available to list members if they want it. This timer is designed for children who are old enough to play "unsupervised" and I want them to have a set time that they can play per session. I want to record when they start and stop and have a display of how long they have been playing. I used to have Robbie "write it down" and set a timer on the stove. Both of which he "forgot" more often than not. This is not a "dishonest teenager" control mechanism, I am not getting into trying to outsmart a teenager here. It is merely meant to allow me to see how much time my son is playing. I removed all of the shortcuts from the desktop etc so that the way he opens his games is through this database. I actually copied one of the shortcuts into the startup directory for one game that required a shortcut. I then informed him that there are consequences if he is playing without going through the timer. The timer is an Access form which has a game combo and a child id combo. In my case only my son uses it at the moment, though I will probably have my daughter use it as well. It is FE/BE. The form consists of: 1) A game combo 2) A child combo 3) A start time 4) A stop time 5) The minutes they are allowed to play, fixed ATM though it could be included in the child record. Status controls are: 1) Last Play elapsed time 2) Last play time stopped At the very bottom of the form is an elapsed time. So the child selects the game they will play. The game has the stuff required to actually open the game, usually the filespec for the game (path and file name) but it can also use a shortcut file if the game requires starting directory etc. Selecting the game starts a timer which shows up on the "Elapsed time" at the bottom, and records the start time. There is a button which enters the stopped time and moves to a new record. Once a record is "stopped" it can no longer be edited. No records can be deleted (through the form). When the time is up, my son often does the "I need to do this one small thing before I quit" routine. In order to allow that but still encourage him to get off, i built in an annoyance timer. The database does not (yet) shut down the game automatically (though I might go there) but it does beep a series of beeps when time is up, and then starts beeping at him every N seconds. N decreases over time until it is beeping every second. This is truly annoying (to anyone in the room) and encourages him to finish up and get off. It also alerts any adult near by that "time is up". In fact it is so annoying that he was turning down the speaker when it beeped. I had to inform him that there would be consequences for that. ;) The system is working fine so far. I am finally getting his times logged regularly and getting him off when his time is up. We shall have to see how it works long term. Adolescents can be sneaky. Total loss of gaming privileges for breaking the rules is the consequence of being sneaky. Possible enhancements: 1) Times of day allowed to play 2) Total time allowed to play 3) Play time allowed per child etc. -- John W. Colby www.ColbyConsulting.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com The information contained in this transmission is intended only for the person or entity to which it is addressed and may contain II-VI Proprietary and/or II-VI Business Sensitive material. If you are not the intended recipient, please contact the sender immediately and destroy the material in its entirety, whether electronic or hard copy. You are notified that any review, retransmission, copying, disclosure, dissemination, or other use of, or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. From rockysmolin at bchacc.com Mon Jul 18 10:57:23 2011 From: rockysmolin at bchacc.com (Rocky Smolin) Date: Mon, 18 Jul 2011 08:57:23 -0700 Subject: [AccessD] Referring to a function in a subform Message-ID: <49EBA6DA69794EF88740050C7D84F12A@HAL9007> Dear List: Gets me every time. I want to call a private function in a subform on my main form. Subform name is subfrmAccount, main form is frmEditAccounts, function name is MakeShippingLabelEditAccounts. I've tried a lot of variations like: Me.fldShippingLabel = Forms!frmEditAccounts.subfrmAccount.Form.MakeShippingLabelEditAccounts with ! and . in various places and nothing works. The function works fine when I use it in the subform. Help! MTIA Rocky Smolin Beach Access Software 858-259-4334 www.bchacc.com www.e-z-mrp.com From bill_patten at embarqmail.com Mon Jul 18 11:03:48 2011 From: bill_patten at embarqmail.com (Bill Patten) Date: Mon, 18 Jul 2011 09:03:48 -0700 Subject: [AccessD] Referring to a function in a subform In-Reply-To: <49EBA6DA69794EF88740050C7D84F12A@HAL9007> References: <49EBA6DA69794EF88740050C7D84F12A@HAL9007> Message-ID: Hi Rocky, I think I'd just make it public. Bill -------------------------------------------------- From: "Rocky Smolin" Sent: Monday, July 18, 2011 8:57 AM To: Subject: [AccessD] Referring to a function in a subform Dear List: Gets me every time. I want to call a private function in a subform on my main form. Subform name is subfrmAccount, main form is frmEditAccounts, function name is MakeShippingLabelEditAccounts. I've tried a lot of variations like: Me.fldShippingLabel = Forms!frmEditAccounts.subfrmAccount.Form.MakeShippingLabelEditAccounts with ! and . in various places and nothing works. The function works fine when I use it in the subform. Help! MTIA Rocky Smolin Beach Access Software 858-259-4334 www.bchacc.com www.e-z-mrp.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From charlotte.foust at gmail.com Mon Jul 18 11:13:28 2011 From: charlotte.foust at gmail.com (Charlotte Foust) Date: Mon, 18 Jul 2011 09:13:28 -0700 Subject: [AccessD] Referring to a function in a subform In-Reply-To: <49EBA6DA69794EF88740050C7D84F12A@HAL9007> References: <49EBA6DA69794EF88740050C7D84F12A@HAL9007> Message-ID: Bill has it right. If the scope of the routine isn't public, it is visible as a method only within the subform itself. Charlotte Foust On Mon, Jul 18, 2011 at 8:57 AM, Rocky Smolin wrote: > Dear List: > > Gets me every time. > > I want to call a private function in a subform on my main form. Subform > name is subfrmAccount, main form is frmEditAccounts, function name is > MakeShippingLabelEditAccounts. > > I've tried a lot of variations like: > > Me.fldShippingLabel = > Forms!frmEditAccounts.subfrmAccount.Form.MakeShippingLabelEditAccounts > > with ! and . in various places and nothing works. > > The function works fine when I use it in the subform. > > Help! > > MTIA > > Rocky Smolin > Beach Access Software > 858-259-4334 > www.bchacc.com > > > > > www.e-z-mrp.com > > > > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > > > Website: http://www.databaseadvisors.com > > > From rockysmolin at bchacc.com Mon Jul 18 11:16:07 2011 From: rockysmolin at bchacc.com (Rocky Smolin) Date: Mon, 18 Jul 2011 09:16:07 -0700 Subject: [AccessD] Referring to a function in a subform In-Reply-To: References: <49EBA6DA69794EF88740050C7D84F12A@HAL9007> Message-ID: <7D937294F929402698129D0C7BE01E58@HAL9007> Tried public but no soap. Moving it to a module now. R -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Charlotte Foust Sent: Monday, July 18, 2011 9:13 AM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Referring to a function in a subform Bill has it right. If the scope of the routine isn't public, it is visible as a method only within the subform itself. Charlotte Foust On Mon, Jul 18, 2011 at 8:57 AM, Rocky Smolin wrote: > Dear List: > > Gets me every time. > > I want to call a private function in a subform on my main form. > Subform name is subfrmAccount, main form is frmEditAccounts, function > name is MakeShippingLabelEditAccounts. > > I've tried a lot of variations like: > > Me.fldShippingLabel = > Forms!frmEditAccounts.subfrmAccount.Form.MakeShippingLabelEditAccounts > > with ! and . in various places and nothing works. > > The function works fine when I use it in the subform. > > Help! > > MTIA > > Rocky Smolin > Beach Access Software > 858-259-4334 > www.bchacc.com > > > > > www.e-z-mrp.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 dhb at flsi.com Mon Jul 18 13:06:20 2011 From: dhb at flsi.com (Darrell Burns) Date: Mon, 18 Jul 2011 11:06:20 -0700 Subject: [AccessD] Referring to a function in a subform In-Reply-To: <7D937294F929402698129D0C7BE01E58@HAL9007> References: <49EBA6DA69794EF88740050C7D84F12A@HAL9007> <7D937294F929402698129D0C7BE01E58@HAL9007> Message-ID: <00b101cc4575$6805c300$38114900$@flsi.com> Hey Rocky. Here's how I do it... In MasterForm: Set fSub = Me.Form(SubformName) fSub.Form.GoToID Nz(MoveToID, 0) In SubForm: Public Sub GoToID(Optional optMoveToID) HTH, DB -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Rocky Smolin Sent: Monday, July 18, 2011 9:16 AM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Referring to a function in a subform Tried public but no soap. Moving it to a module now. R -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Charlotte Foust Sent: Monday, July 18, 2011 9:13 AM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Referring to a function in a subform Bill has it right. If the scope of the routine isn't public, it is visible as a method only within the subform itself. Charlotte Foust On Mon, Jul 18, 2011 at 8:57 AM, Rocky Smolin wrote: > Dear List: > > Gets me every time. > > I want to call a private function in a subform on my main form. > Subform name is subfrmAccount, main form is frmEditAccounts, function > name is MakeShippingLabelEditAccounts. > > I've tried a lot of variations like: > > Me.fldShippingLabel = > Forms!frmEditAccounts.subfrmAccount.Form.MakeShippingLabelEditAccounts > > with ! and . in various places and nothing works. > > The function works fine when I use it in the subform. > > Help! > > MTIA > > Rocky Smolin > Beach Access Software > 858-259-4334 > www.bchacc.com > > > > > www.e-z-mrp.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 dhb at flsi.com Mon Jul 18 13:24:48 2011 From: dhb at flsi.com (Darrell Burns) Date: Mon, 18 Jul 2011 11:24:48 -0700 Subject: [AccessD] Access2010 vs Access2007 Message-ID: <00b201cc4577$fa709a10$ef51ce30$@flsi.com> Hi folks. I bought a new dev machine with Win7 and Office2010 32-bit. It installed the Access 14.0 Object Library. The "default file format" in Settings is Access 2007. My app runs on my client's Win2008 R2 Server and all the workstations run Win7. However, their Access references point to the Access 12.0 Object Library. As a result, when I upload my app to their server and open it up I get a warning message that "some of the features may be incompatible", even though I haven't used any of those features. Do I need to scale back to 12.0 on my side or upgrade the client to 14.0? And how would I do that? Thanx, Darrell From vbacreations at gmail.com Mon Jul 18 14:16:26 2011 From: vbacreations at gmail.com (William Benson) Date: Mon, 18 Jul 2011 15:16:26 -0400 Subject: [AccessD] Access2010 vs Access2007 In-Reply-To: <00b201cc4577$fa709a10$ef51ce30$@flsi.com> References: <00b201cc4577$fa709a10$ef51ce30$@flsi.com> Message-ID: I wouldn't worry about it. After all how ya gonna learn the differences if you don't let them bite you? Just kidding, hope you get a less smart-arse answer soon. On Jul 18, 2011 2:26 PM, "Darrell Burns" wrote: > Hi folks. > I bought a new dev machine with Win7 and Office2010 32-bit. It installed the > Access 14.0 Object Library. The "default file format" in Settings is Access > 2007. > My app runs on my client's Win2008 R2 Server and all the workstations run > Win7. However, their Access references point to the Access 12.0 Object > Library. As a result, when I upload my app to their server and open it up I > get a warning message that "some of the features may be incompatible", even > though I haven't used any of those features. > Do I need to scale back to 12.0 on my side or upgrade the client to 14.0? > And how would I do that? > Thanx, > Darrell > > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com From rockysmolin at bchacc.com Mon Jul 18 15:16:14 2011 From: rockysmolin at bchacc.com (Rocky Smolin) Date: Mon, 18 Jul 2011 13:16:14 -0700 Subject: [AccessD] Referring to a function in a subform In-Reply-To: <00b101cc4575$6805c300$38114900$@flsi.com> References: <49EBA6DA69794EF88740050C7D84F12A@HAL9007> <7D937294F929402698129D0C7BE01E58@HAL9007> <00b101cc4575$6805c300$38114900$@flsi.com> Message-ID: <5F0603DB08D74800B92076ADC69B82A1@HAL9007> That's the way it SHOULD work. But it didn't for me. So I moved it to a public function and it works now. Rocky -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Darrell Burns Sent: Monday, July 18, 2011 11:06 AM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Referring to a function in a subform Hey Rocky. Here's how I do it... In MasterForm: Set fSub = Me.Form(SubformName) fSub.Form.GoToID Nz(MoveToID, 0) In SubForm: Public Sub GoToID(Optional optMoveToID) HTH, DB -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Rocky Smolin Sent: Monday, July 18, 2011 9:16 AM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Referring to a function in a subform Tried public but no soap. Moving it to a module now. R -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Charlotte Foust Sent: Monday, July 18, 2011 9:13 AM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Referring to a function in a subform Bill has it right. If the scope of the routine isn't public, it is visible as a method only within the subform itself. Charlotte Foust On Mon, Jul 18, 2011 at 8:57 AM, Rocky Smolin wrote: > Dear List: > > Gets me every time. > > I want to call a private function in a subform on my main form. > Subform name is subfrmAccount, main form is frmEditAccounts, function > name is MakeShippingLabelEditAccounts. > > I've tried a lot of variations like: > > Me.fldShippingLabel = > Forms!frmEditAccounts.subfrmAccount.Form.MakeShippingLabelEditAccounts > > with ! and . in various places and nothing works. > > The function works fine when I use it in the subform. > > Help! > > MTIA > > Rocky Smolin > Beach Access Software > 858-259-4334 > www.bchacc.com > > > > > www.e-z-mrp.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 dhb at flsi.com Mon Jul 18 16:08:23 2011 From: dhb at flsi.com (Darrell Burns) Date: Mon, 18 Jul 2011 14:08:23 -0700 Subject: [AccessD] Access2010 vs Access2007 In-Reply-To: References: <00b201cc4577$fa709a10$ef51ce30$@flsi.com> Message-ID: <00c201cc458e$d5146d20$7f3d4760$@flsi.com> I have to worry about it...I don't want the users seeing warning messages or getting "bitten". -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of William Benson Sent: Monday, July 18, 2011 12:16 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Access2010 vs Access2007 I wouldn't worry about it. After all how ya gonna learn the differences if you don't let them bite you? Just kidding, hope you get a less smart-arse answer soon. On Jul 18, 2011 2:26 PM, "Darrell Burns" wrote: > Hi folks. > I bought a new dev machine with Win7 and Office2010 32-bit. It > installed the > Access 14.0 Object Library. The "default file format" in Settings is Access > 2007. > My app runs on my client's Win2008 R2 Server and all the workstations > run Win7. However, their Access references point to the Access 12.0 > Object Library. As a result, when I upload my app to their server and > open it up I > get a warning message that "some of the features may be incompatible", even > though I haven't used any of those features. > Do I need to scale back to 12.0 on my side or upgrade the client to 14.0? > And how would I do that? > Thanx, > Darrell > > > > -- > 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 ssharkins at gmail.com Mon Jul 18 19:13:16 2011 From: ssharkins at gmail.com (Susan Harkins) Date: Mon, 18 Jul 2011 20:13:16 -0400 Subject: [AccessD] update wouldn't run Message-ID: I ran into a really weird, and a bit humiliating situation this afternoon. I volunteer at our county fair and someone asked me to help them update some entry numbers in an Access table. It was a simple update query -- make all 20's 21. It was a text field. I created the query, ran it... it wouldn't run. It did nothing. The text field was part of a natural key primary key, but she was able to change the values manually. That query should've run and changed all those values in a second -- fortunately, there were only a few dozen, but I was still... deflated. :( Any ideas what might have been the problem? Susan H. From df.waters at comcast.net Mon Jul 18 20:08:28 2011 From: df.waters at comcast.net (Dan Waters) Date: Mon, 18 Jul 2011 20:08:28 -0500 Subject: [AccessD] update wouldn't run In-Reply-To: References: Message-ID: <004c01cc45b0$5fa68150$1ef383f0$@comcast.net> Hi Susan, Your query may have tried to update a text 20 to a numeric 21, which would have been the wrong type and should not have worked. Just a guess ... Dan PS - Don't ever tell anyone you're an expert. As soon as I said it - I wasn't! :-( -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Susan Harkins Sent: Monday, July 18, 2011 7:13 PM To: Access Developers discussion and problem solving Subject: [AccessD] update wouldn't run I ran into a really weird, and a bit humiliating situation this afternoon. I volunteer at our county fair and someone asked me to help them update some entry numbers in an Access table. It was a simple update query -- make all 20's 21. It was a text field. I created the query, ran it... it wouldn't run. It did nothing. The text field was part of a natural key primary key, but she was able to change the values manually. That query should've run and changed all those values in a second -- fortunately, there were only a few dozen, but I was still... deflated. :( Any ideas what might have been the problem? Susan H. -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From jwcolby at colbyconsulting.com Mon Jul 18 20:41:48 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Mon, 18 Jul 2011 21:41:48 -0400 Subject: [AccessD] Child computer Game timer In-Reply-To: References: <4E23286A.8030301@colbyconsulting.com> Message-ID: <4E24E0DC.9080209@colbyconsulting.com> Because I won't know what games your child is playing. John W. Colby www.ColbyConsulting.com On 7/18/2011 10:12 AM, Drew Wutka wrote: > Why not just detect the game he is playing based upon the window's that > are running? Each game should have a window that should be easy to > identify. > > Drew > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby > Sent: Sunday, July 17, 2011 1:23 PM > To: Access Developers discussion and problem solving > Subject: [AccessD] Child computer Game timer > > I have designed a game timer for my son which I am making available to > list members if they want it. > > This timer is designed for children who are old enough to play > "unsupervised" and I want them to > have a set time that they can play per session. I want to record when > they start and stop and have > a display of how long they have been playing. I used to have Robbie > "write it down" and set a timer > on the stove. Both of which he "forgot" more often than not. > > This is not a "dishonest teenager" control mechanism, I am not getting > into trying to outsmart a > teenager here. It is merely meant to allow me to see how much time my > son is playing. I removed > all of the shortcuts from the desktop etc so that the way he opens his > games is through this > database. I actually copied one of the shortcuts into the startup > directory for one game that > required a shortcut. > > I then informed him that there are consequences if he is playing without > going through the timer. > > The timer is an Access form which has a game combo and a child id combo. > In my case only my son > uses it at the moment, though I will probably have my daughter use it as > well. It is FE/BE. > > The form consists of: > > 1) A game combo > 2) A child combo > 3) A start time > 4) A stop time > 5) The minutes they are allowed to play, fixed ATM though it could be > included in the child record. > > Status controls are: > > 1) Last Play elapsed time > 2) Last play time stopped > > At the very bottom of the form is an elapsed time. > > So the child selects the game they will play. The game has the stuff > required to actually open the > game, usually the filespec for the game (path and file name) but it can > also use a shortcut file if > the game requires starting directory etc. > > Selecting the game starts a timer which shows up on the "Elapsed time" > at the bottom, and records > the start time. There is a button which enters the stopped time and > moves to a new record. Once a > record is "stopped" it can no longer be edited. No records can be > deleted (through the form). > > When the time is up, my son often does the "I need to do this one small > thing before I quit" > routine. In order to allow that but still encourage him to get off, i > built in an annoyance timer. > The database does not (yet) shut down the game automatically (though I > might go there) but it does > beep a series of beeps when time is up, and then starts beeping at him > every N seconds. N decreases > over time until it is beeping every second. This is truly annoying (to > anyone in the room) and > encourages him to finish up and get off. It also alerts any adult near > by that "time is up". In > fact it is so annoying that he was turning down the speaker when it > beeped. I had to inform him > that there would be consequences for that. ;) > > The system is working fine so far. I am finally getting his times > logged regularly and getting him > off when his time is up. We shall have to see how it works long term. > Adolescents can be sneaky. > Total loss of gaming privileges for breaking the rules is the > consequence of being sneaky. > > Possible enhancements: > > 1) Times of day allowed to play > 2) Total time allowed to play > 3) Play time allowed per child > etc. > From vbacreations at gmail.com Mon Jul 18 21:30:52 2011 From: vbacreations at gmail.com (William Benson (VBACreations.Com)) Date: Mon, 18 Jul 2011 22:30:52 -0400 Subject: [AccessD] Access2010 vs Access2007 In-Reply-To: <00c201cc458e$d5146d20$7f3d4760$@flsi.com> References: <00b201cc4577$fa709a10$ef51ce30$@flsi.com> <00c201cc458e$d5146d20$7f3d4760$@flsi.com> Message-ID: <004f01cc45bb$e2972960$a7c57c20$@gmail.com> There might not be so many folk who have bothered to move to Ac2007 formatted databases, let alone to Ac2010 platform. While others are still quiet on the topic, I will put forth my half-penny advice. I did it to have strange bugginess stop showing up when my database got too big and I didn't know it -- only to find that I still seemed to have a 2 GB limitation even after it became an accdb file. Goodness knows why, and it is quite frustrating. One thing I would recommend but it is because I am an Excel programmer and may not know the difference in how Access works versus Excel... is to call every function somehow, in debugging mode, at least once - just in case there are things which the compiler only checks at runtime, and only when the code in that particular routine executes. This can be a real chore. Things that lie on the other side of IF conditions which almost never happen are especially burdensome to check, and error handling for very off-chance exceptions. But if you are needing to be that sure about things, you have to force every condition so it gets tested at least once (and even then you will only have feedback on the conditions you thought to check). There are some controls which if you have used them in an Ac2007 database you might not find them there any more, like Calendar control. Data Access pages were minimally supported in 2007 (could not create but could still run) and in 2010 will not function. Anyway, I would just be parroting what I read here, were I to go on. http://technet.microsoft.com/en-us/library/cc179181.aspx -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Darrell Burns Sent: Monday, July 18, 2011 5:08 PM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Access2010 vs Access2007 I have to worry about it...I don't want the users seeing warning messages or getting "bitten". -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of William Benson Sent: Monday, July 18, 2011 12:16 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Access2010 vs Access2007 I wouldn't worry about it. After all how ya gonna learn the differences if you don't let them bite you? Just kidding, hope you get a less smart-arse answer soon. On Jul 18, 2011 2:26 PM, "Darrell Burns" wrote: > Hi folks. > I bought a new dev machine with Win7 and Office2010 32-bit. It > installed the > Access 14.0 Object Library. The "default file format" in Settings is Access > 2007. > My app runs on my client's Win2008 R2 Server and all the workstations > run Win7. However, their Access references point to the Access 12.0 > Object Library. As a result, when I upload my app to their server and > open it up I > get a warning message that "some of the features may be incompatible", even > though I haven't used any of those features. > Do I need to scale back to 12.0 on my side or upgrade the client to 14.0? > And how would I do that? > Thanx, > Darrell > > > > -- > 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 ssharkins at gmail.com Tue Jul 19 05:46:36 2011 From: ssharkins at gmail.com (Susan Harkins) Date: Tue, 19 Jul 2011 06:46:36 -0400 Subject: [AccessD] update wouldn't run References: <004c01cc45b0$5fa68150$1ef383f0$@comcast.net> Message-ID: No, they were both text -- I checked that and Access automatically knew that the field was text and took care of it for me. I never call myself an expert. :) Susan H. > > Your query may have tried to update a text 20 to a numeric 21, which would > have been the wrong type and should not have worked. > > Just a guess ... > > Dan > > PS - Don't ever tell anyone you're an expert. As soon as I said it - I > wasn't! :-( From charlotte.foust at gmail.com Tue Jul 19 10:00:29 2011 From: charlotte.foust at gmail.com (Charlotte Foust) Date: Tue, 19 Jul 2011 08:00:29 -0700 Subject: [AccessD] update wouldn't run In-Reply-To: References: <004c01cc45b0$5fa68150$1ef383f0$@comcast.net> Message-ID: I'll never forget the time a developer who worked for me decided to update all of a certain numeric string to a text number in an address field. The query ran and worked...sort of. He had forgotten to provide for spaces around numeric string. I had to go through thousands of records and find every instance of "two" in a longer number and replace it with "2"! Charlotte Foust On Tue, Jul 19, 2011 at 3:46 AM, Susan Harkins wrote: > No, they were both text -- I checked that and Access automatically knew > that the field was text and took care of it for me. I never call myself an > expert. :) > > Susan H. > >> >> Your query may have tried to update a text 20 to a numeric 21, which would >> have been the wrong type and should not have worked. >> >> Just a guess ... >> >> Dan >> >> PS - Don't ever tell anyone you're an expert. As soon as I said it - I >> wasn't! :-( >> > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/**mailman/listinfo/accessd > > > Website: http://www.databaseadvisors.**com > > > From dnod at aol.com Tue Jul 19 10:13:19 2011 From: dnod at aol.com (Dean Davids) Date: Tue, 19 Jul 2011 11:13:19 -0400 Subject: [AccessD] update wouldn't run In-Reply-To: References: <004c01cc45b0$5fa68150$1ef383f0$@comcast.net> Message-ID: If you do that kind of thing in a QBE window, you can preview the results before committing the results. I do that always. Still, it is a bit scary when you push that action button and then look for unexpected issues. Dean S. Davids www.cmbscorp.com 954-868-4421 On Jul 19, 2011, at 11:00 AM, Charlotte Foust wrote: > I'll never forget the time a developer who worked for me decided to update > all of a certain numeric string to a text number in an address field. The > query ran and worked...sort of. He had forgotten to provide for spaces > around numeric string. I had to go through thousands of records and find > every instance of "two" in a longer number and replace it with "2"! > > Charlotte Foust > > On Tue, Jul 19, 2011 at 3:46 AM, Susan Harkins wrote: > >> No, they were both text -- I checked that and Access automatically knew >> that the field was text and took care of it for me. I never call myself an >> expert. :) >> >> Susan H. >> >>> >>> Your query may have tried to update a text 20 to a numeric 21, which would >>> have been the wrong type and should not have worked. >>> >>> Just a guess ... >>> >>> Dan >>> >>> PS - Don't ever tell anyone you're an expert. As soon as I said it - I >>> wasn't! :-( >>> >> >> -- >> 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 ssharkins at gmail.com Tue Jul 19 10:21:31 2011 From: ssharkins at gmail.com (Susan Harkins) Date: Tue, 19 Jul 2011 11:21:31 -0400 Subject: [AccessD] update wouldn't run References: <004c01cc45b0$5fa68150$1ef383f0$@comcast.net> Message-ID: <1B38E9446F80476EB23735A7899241DF@SusanHarkins> When I used Datasheet view to see the uncommitted results, I saw only the original values. Susan H. > If you do that kind of thing in a QBE window, you can preview the results > before committing the results. I do that always. Still, it is a bit scary > when you push that action button and then look for unexpected issues. > > > >> I'll never forget the time a developer who worked for me decided to >> update >> all of a certain numeric string to a text number in an address field. >> The >> query ran and worked...sort of. He had forgotten to provide for spaces >> around numeric string. I had to go through thousands of records and find >> every instance of "two" in a longer number and replace it with "2"! >> >> Charlotte Foust >> >> On Tue, Jul 19, 2011 at 3:46 AM, Susan Harkins >> wrote: >> >>> No, they were both text -- I checked that and Access automatically knew >>> that the field was text and took care of it for me. I never call myself >>> an >>> expert. :) >>> >>> Susan H. >>> >>>> >>>> Your query may have tried to update a text 20 to a numeric 21, which >>>> would >>>> have been the wrong type and should not have worked. >>>> >>>> Just a guess ... From garykjos at gmail.com Tue Jul 19 10:52:52 2011 From: garykjos at gmail.com (Gary Kjos) Date: Tue, 19 Jul 2011 10:52:52 -0500 Subject: [AccessD] update wouldn't run In-Reply-To: <1B38E9446F80476EB23735A7899241DF@SusanHarkins> References: <004c01cc45b0$5fa68150$1ef383f0$@comcast.net> <1B38E9446F80476EB23735A7899241DF@SusanHarkins> Message-ID: I wonder if you dropped the key and then ran it if it would work. then you could reset the key after. Multi-field keys might have different rules. Doing one record at a time in a table view might have different rules than a mass change in a query. Hope you made a copy of the db or at least the table before you touched anything though. Always want to have a way to return to the before state, especially when you are working with other peoples databases. Stuff happens. ;-) GK On Tue, Jul 19, 2011 at 10:21 AM, Susan Harkins wrote: > When I used Datasheet view to see the uncommitted results, I saw only the > original values. > > Susan H. > > >> If you do that kind of thing in a QBE window, you can preview the results >> before committing the results. I do that always. Still, it is a bit scary >> when you push that action button and then look for unexpected issues. >> >> >> >>> I'll never forget the time a developer who worked for me decided to >>> update >>> all of a certain numeric string to a text number in an address field. The >>> query ran and worked...sort of. ?He had forgotten to provide for spaces >>> around numeric string. I had to go through thousands of records and find >>> every instance of "two" in a longer number and replace it with "2"! >>> >>> Charlotte Foust >>> >>> On Tue, Jul 19, 2011 at 3:46 AM, Susan Harkins >>> wrote: >>> >>>> No, they were both text -- I checked that and Access automatically knew >>>> that the field was text and took care of it for me. I never call myself >>>> an >>>> expert. :) >>>> >>>> Susan H. >>>> >>>>> >>>>> Your query may have tried to update a text 20 to a numeric 21, which >>>>> would >>>>> have been the wrong type and should not have worked. >>>>> >>>>> Just a guess ... > > -- > 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 ssharkins at gmail.com Tue Jul 19 11:07:51 2011 From: ssharkins at gmail.com (Susan Harkins) Date: Tue, 19 Jul 2011 12:07:51 -0400 Subject: [AccessD] update wouldn't run References: <004c01cc45b0$5fa68150$1ef383f0$@comcast.net><1B38E9446F80476EB23735A7899241DF@SusanHarkins> Message-ID: Well... I thought about doing that, but couldn't think of a reason why it should've mattered, but you know, you might be right -- I might experiment later. Susan H. I wonder if you dropped the key and then ran it if it would work. then you could reset the key after. Multi-field keys might have different rules. Doing one record at a time in a table view might have different rules than a mass change in a query. Hope you made a copy of the db or at least the table before you touched anything though. Always want to have a way to return to the before state, especially when you are working with other peoples databases. Stuff happens. ;-) From gustav at cactus.dk Tue Jul 19 16:07:39 2011 From: gustav at cactus.dk (Gustav Brock) Date: Tue, 19 Jul 2011 23:07:39 +0200 Subject: [AccessD] DatePart "WW" (C#: Extension of DateTime) Message-ID: Hi all Now, would you believe this _old_ bug has survived A2010 and .Net 4 / Visual Studio 2010! So - as someone brought up a long-winded solution - I had to post my version of the extension method for DateTime of C# at CodeProject: http://www.codeproject.com/Tips/227801/DateTime-extension-method-to-give-Week-number /gustav >>> Gustav at cactus.dk 24-05-2007 16:44 >>> Hi Mark If you are looking for ISO week numbers, use these constants: bytWeek = DatePart("ww", datDate, vbMonday, vbFirstFourDays) However, DatePart has always - since Access 1.0 - been buggy for week number 53. Thus, for serious business use, use a function like this which I have posted many times: Public Function ISO_WeekNumber( _ ByVal datDate As Date) _ As Byte ' Calculates and returns week number for date datDate according to the ISO 8601:1988 standard. ' 1998-2000, Gustav Brock, Cactus Data ApS, CPH. ' May be freely used and distributed. Const cbytFirstWeekOfAnyYear As Byte = 1 Const cbytLastWeekOfLeapYear As Byte = 53 Dim bytWeek As Byte Dim bytISOThursday As Byte Dim datLastDayOfYear As Date bytWeek = DatePart("ww", datDate, vbMonday, vbFirstFourDays) If bytWeek = cbytLastWeekOfLeapYear Then bytISOThursday = WeekDay(vbThursday, vbMonday) datLastDayOfYear = DateSerial(Year(datDate), 12, 31) If WeekDay(datLastDayOfYear, vbMonday) >= bytISOThursday Then ' OK, week count of 53 is caused by leap year. Else ' Correct for Access97/2000 bug. bytWeek = cbytFirstWeekOfAnyYear End If End If ISO_WeekNumber = bytWeek End Function /gustav >>> markamatte at hotmail.com 24-05-2007 16:14 >>> Hello All, I'm using datepart to get the week. 12/31/2006 I am having an issue...No matter what optional constant I use or change...I get Day1 of week 53... and 1/1/2007 shows as Day2 of week 1. How do I get Day1 of Week1? Thanks, Mark A. Matte From vbacreations at gmail.com Tue Jul 19 19:11:51 2011 From: vbacreations at gmail.com (William Benson) Date: Tue, 19 Jul 2011 20:11:51 -0400 Subject: [AccessD] update wouldn't run In-Reply-To: References: <004c01cc45b0$5fa68150$1ef383f0$@comcast.net> <1B38E9446F80476EB23735A7899241DF@SusanHarkins> Message-ID: The first thing I would try would be to update to some strange 2-car string to rule out the key and numeric aspects. If that world you would have a partial info. On Jul 19, 2011 12:09 PM, "Susan Harkins" wrote: > Well... I thought about doing that, but couldn't think of a reason why it > should've mattered, but you know, you might be right -- I might experiment > later. > > Susan H. > > > I wonder if you dropped the key and then ran it if it would work. then > you could reset the key after. Multi-field keys might have different > rules. Doing one record at a time in a table view might have different > rules than a mass change in a query. > > Hope you made a copy of the db or at least the table before you > touched anything though. Always want to have a way to return to the > before state, especially when you are working with other peoples > databases. > > Stuff happens. ;-) > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com From fuller.artful at gmail.com Tue Jul 19 21:09:00 2011 From: fuller.artful at gmail.com (Arthur Fuller) Date: Tue, 19 Jul 2011 22:09:00 -0400 Subject: [AccessD] update wouldn't run In-Reply-To: References: <004c01cc45b0$5fa68150$1ef383f0$@comcast.net> <1B38E9446F80476EB23735A7899241DF@SusanHarkins> Message-ID: Do n this in two parts. According to my personal nomenclature, the queries would be _ On Tue, Jul 19, 2011 at 12:07 PM, Susan Harkins wrote: > Well... I thought about doing that, but couldn't think of a reason why it > should've mattered, but you know, you might be right -- I might experiment > later. > > Susan H. > > > > I wonder if you dropped the key and then ran it if it would work. then > you could reset the key after. Multi-field keys might have different > rules. Doing one record at a time in a table view might have different > rules than a mass change in a query. > > Hope you made a copy of the db or at least the table before you > touched anything though. Always want to have a way to return to the > before state, especially when you are working with other peoples > databases. > > Stuff happens. ;-) > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/**mailman/listinfo/accessd > Website: http://www.databaseadvisors.**com > From dhb at flsi.com Wed Jul 20 16:04:02 2011 From: dhb at flsi.com (Darrell Burns) Date: Wed, 20 Jul 2011 14:04:02 -0700 Subject: [AccessD] Access 2010 -- The database cannot be opened because the VBA project contained in it cannot be read. Message-ID: <024501cc4720$8d8aef40$a8a0cdc0$@flsi.com> I just lost all of my code! I'm running 32-bit Access 2010 in 64-bit Windows7 (Access 14.0 Object library and Office Access database engine 14.0)..the 32-bit version of Office2010. My application was developed in Access2007. My default file format says Access 2007 (there is no A2010 option). I was trying to import a form from one database into another when I got a "Microsoft Access has stopped working" message, then both databases were hosed. I tried opening a blank database and importing a form but I get "Name conflicts with existing module...." and it won't import. Of course, I have a live demo in 3 hours! Help! Is there any way of salvaging the code I had written behind my forms? How do I prevent this from happening again? From vbacreations at gmail.com Wed Jul 20 16:26:55 2011 From: vbacreations at gmail.com (William Benson (VBACreations.Com)) Date: Wed, 20 Jul 2011 17:26:55 -0400 Subject: [AccessD] Access 2010 -- The database cannot be opened because the VBA project contained in it cannot be read. In-Reply-To: <024501cc4720$8d8aef40$a8a0cdc0$@flsi.com> References: <024501cc4720$8d8aef40$a8a0cdc0$@flsi.com> Message-ID: <004301cc4723$c0c316a0$424943e0$@gmail.com> I don't think so. If you cannot import them into a blank (or any) database and you cannot open the one in which they were originally contained. If you could do either of those things, you could then export the form as text and read the text file. I have posted others' code for how to do all of this in the recent past ... but again, if you cannot get access to a database containing the objects, then I don't think you have any shot. :-( Been there. From rockysmolin at bchacc.com Wed Jul 20 16:48:27 2011 From: rockysmolin at bchacc.com (Rocky Smolin) Date: Wed, 20 Jul 2011 14:48:27 -0700 Subject: [AccessD] Access 2010 -- The database cannot be opened because theVBA project contained in it cannot be read. In-Reply-To: <024501cc4720$8d8aef40$a8a0cdc0$@flsi.com> References: <024501cc4720$8d8aef40$a8a0cdc0$@flsi.com> Message-ID: No backup? Tsk-tsk. I've had the problem before and you might try decompile, but IME, it usually doesn't recover the code. Rocky -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Darrell Burns Sent: Wednesday, July 20, 2011 2:04 PM To: 'Access Developers discussion and problem solving' Subject: [AccessD] Access 2010 -- The database cannot be opened because theVBA project contained in it cannot be read. I just lost all of my code! I'm running 32-bit Access 2010 in 64-bit Windows7 (Access 14.0 Object library and Office Access database engine 14.0)..the 32-bit version of Office2010. My application was developed in Access2007. My default file format says Access 2007 (there is no A2010 option). I was trying to import a form from one database into another when I got a "Microsoft Access has stopped working" message, then both databases were hosed. I tried opening a blank database and importing a form but I get "Name conflicts with existing module...." and it won't import. Of course, I have a live demo in 3 hours! Help! Is there any way of salvaging the code I had written behind my forms? How do I prevent this from happening again? -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From dhb at flsi.com Wed Jul 20 17:45:22 2011 From: dhb at flsi.com (Darrell Burns) Date: Wed, 20 Jul 2011 15:45:22 -0700 Subject: [AccessD] Access 2010 -- The database cannot be opened because theVBA project contained in it cannot be read. In-Reply-To: References: <024501cc4720$8d8aef40$a8a0cdc0$@flsi.com> Message-ID: <026001cc472e$b5ddc720$21995560$@flsi.com> Yes, backed up yesterday. Lost today's work. -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Rocky Smolin Sent: Wednesday, July 20, 2011 2:48 PM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Access 2010 -- The database cannot be opened because theVBA project contained in it cannot be read. No backup? Tsk-tsk. I've had the problem before and you might try decompile, but IME, it usually doesn't recover the code. Rocky -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Darrell Burns Sent: Wednesday, July 20, 2011 2:04 PM To: 'Access Developers discussion and problem solving' Subject: [AccessD] Access 2010 -- The database cannot be opened because theVBA project contained in it cannot be read. I just lost all of my code! I'm running 32-bit Access 2010 in 64-bit Windows7 (Access 14.0 Object library and Office Access database engine 14.0)..the 32-bit version of Office2010. My application was developed in Access2007. My default file format says Access 2007 (there is no A2010 option). I was trying to import a form from one database into another when I got a "Microsoft Access has stopped working" message, then both databases were hosed. I tried opening a blank database and importing a form but I get "Name conflicts with existing module...." and it won't import. Of course, I have a live demo in 3 hours! Help! Is there any way of salvaging the code I had written behind my forms? How do I prevent this from happening again? -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From fuller.artful at gmail.com Wed Jul 20 19:45:12 2011 From: fuller.artful at gmail.com (Arthur Fuller) Date: Wed, 20 Jul 2011 20:45:12 -0400 Subject: [AccessD] Access 2010 -- The database cannot be opened because theVBA project contained in it cannot be read. In-Reply-To: <026001cc472e$b5ddc720$21995560$@flsi.com> References: <024501cc4720$8d8aef40$a8a0cdc0$@flsi.com> <026001cc472e$b5ddc720$21995560$@flsi.com> Message-ID: So you only lost one day's work. Take this as a sign from the gods in Redmond. Back up several times a day. It's not difficult. Click the Orb and then Manage and then Backup. It takes about 3 seconds and your ass is saved. I do it several times per session and don't have to recover more than an hour or so's work. A. On Wed, Jul 20, 2011 at 6:45 PM, Darrell Burns wrote: > Yes, backed up yesterday. Lost today's work. > > From vbacreations at gmail.com Wed Jul 20 21:44:00 2011 From: vbacreations at gmail.com (William Benson (VBACreations.Com)) Date: Wed, 20 Jul 2011 22:44:00 -0400 Subject: [AccessD] Access 2010 -- The database cannot be opened because theVBA project contained in it cannot be read. In-Reply-To: References: <024501cc4720$8d8aef40$a8a0cdc0$@flsi.com> <026001cc472e$b5ddc720$21995560$@flsi.com> Message-ID: <004801cc4750$0c961560$25c24020$@gmail.com> What is the orb? This link seems to have some code for backing up and zipping a database. http://developpers.blogspot.com/2008/03/how-to-backup-access-file-using-vba. html as well as a link to software that might repair a database. -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Arthur Fuller Sent: Wednesday, July 20, 2011 8:45 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Access 2010 -- The database cannot be opened because theVBA project contained in it cannot be read. So you only lost one day's work. Take this as a sign from the gods in Redmond. Back up several times a day. It's not difficult. Click the Orb and then Manage and then Backup. It takes about 3 seconds and your ass is saved. I do it several times per session and don't have to recover more than an hour or so's work. A. On Wed, Jul 20, 2011 at 6:45 PM, Darrell Burns wrote: > Yes, backed up yesterday. Lost today's work. > > -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From stuart at lexacorp.com.pg Wed Jul 20 22:53:17 2011 From: stuart at lexacorp.com.pg (Stuart McLachlan) Date: Thu, 21 Jul 2011 13:53:17 +1000 Subject: [AccessD] Access 2010 -- The database cannot be opened because theVBA project contained in it cannot be read. In-Reply-To: <004801cc4750$0c961560$25c24020$@gmail.com> References: <024501cc4720$8d8aef40$a8a0cdc0$@flsi.com>, , <004801cc4750$0c961560$25c24020$@gmail.com> Message-ID: <4E27A2AD.17124.201F10AB@stuart.lexacorp.com.pg> Access 2007 and 2010. The big "Office Button" ball on the left hand side of the menu bar. On 20 Jul 2011 at 22:44, William Benson (VBACreations. wrote: > What is the orb? > > This link seems to have some code for backing up and zipping a > database. > > http://developpers.blogspot.com/2008/03/how-to-backup-access-file-usin > g-vba. html > > as well as a link to software that might repair a database. > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Arthur > Fuller Sent: Wednesday, July 20, 2011 8:45 PM To: Access Developers > discussion and problem solving Subject: Re: [AccessD] Access 2010 -- > The database cannot be opened because theVBA project contained in it > cannot be read. > > So you only lost one day's work. Take this as a sign from the gods in > Redmond. Back up several times a day. It's not difficult. Click the > Orb and then Manage and then Backup. It takes about 3 seconds and your > ass is saved. I do it several times per session and don't have to > recover more than an hour or so's work. > > A. > > On Wed, Jul 20, 2011 at 6:45 PM, Darrell Burns wrote: > > > Yes, backed up yesterday. Lost today's work. > > > > > -- > 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 vbacreations at gmail.com Wed Jul 20 23:43:29 2011 From: vbacreations at gmail.com (William Benson (VBACreations.Com)) Date: Thu, 21 Jul 2011 00:43:29 -0400 Subject: [AccessD] Access 2010 -- The database cannot be opened because theVBA project contained in it cannot be read. In-Reply-To: <4E27A2AD.17124.201F10AB@stuart.lexacorp.com.pg> References: <024501cc4720$8d8aef40$a8a0cdc0$@flsi.com>, , <004801cc4750$0c961560$25c24020$@gmail.com> <4E27A2AD.17124.201F10AB@stuart.lexacorp.com.pg> Message-ID: <005001cc4760$bd07cfa0$37176ee0$@gmail.com> 2010 (which I am using) does not seem to have this... And I cannot see a Manage function. -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Stuart McLachlan Sent: Wednesday, July 20, 2011 11:53 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Access 2010 -- The database cannot be opened because theVBA project contained in it cannot be read. Access 2007 and 2010. The big "Office Button" ball on the left hand side of the menu bar. On 20 Jul 2011 at 22:44, William Benson (VBACreations. wrote: > What is the orb? > > This link seems to have some code for backing up and zipping a > database. > > http://developpers.blogspot.com/2008/03/how-to-backup-access-file-usin > g-vba. html > > as well as a link to software that might repair a database. > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Arthur > Fuller Sent: Wednesday, July 20, 2011 8:45 PM To: Access Developers > discussion and problem solving Subject: Re: [AccessD] Access 2010 -- > The database cannot be opened because theVBA project contained in it > cannot be read. > > So you only lost one day's work. Take this as a sign from the gods in > Redmond. Back up several times a day. It's not difficult. Click the > Orb and then Manage and then Backup. It takes about 3 seconds and your > ass is saved. I do it several times per session and don't have to > recover more than an hour or so's work. > > A. > > On Wed, Jul 20, 2011 at 6:45 PM, Darrell Burns wrote: > > > Yes, backed up yesterday. Lost today's work. > > > > > -- > 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 Wed Jul 20 23:53:21 2011 From: stuart at lexacorp.com.pg (Stuart McLachlan) Date: Thu, 21 Jul 2011 14:53:21 +1000 Subject: [AccessD] Access 2010 -- The database cannot be opened because theVBA project contained in it cannot be read. In-Reply-To: <005001cc4760$bd07cfa0$37176ee0$@gmail.com> References: <024501cc4720$8d8aef40$a8a0cdc0$@flsi.com>, <4E27A2AD.17124.201F10AB@stuart.lexacorp.com.pg>, <005001cc4760$bd07cfa0$37176ee0$@gmail.com> Message-ID: <4E27B0C1.26772.20560F93@stuart.lexacorp.com.pg> You're right, that is only in 2007. I do wish they couldn't keep changing the interface every few years. :( No idea where it is (if it exists at all ) in 2010. I can't find it. -- Stuart On 21 Jul 2011 at 0:43, William Benson (VBACreations. wrote: > 2010 (which I am using) does not seem to have this... And I cannot see > a Manage function. > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Stuart > McLachlan Sent: Wednesday, July 20, 2011 11:53 PM To: Access > Developers discussion and problem solving Subject: Re: [AccessD] > Access 2010 -- The database cannot be opened because theVBA project > contained in it cannot be read. > > Access 2007 and 2010. The big "Office Button" ball on the left hand > side of the menu bar. > > On 20 Jul 2011 at 22:44, William Benson (VBACreations. wrote: > > > What is the orb? > > > > This link seems to have some code for backing up and zipping a > > database. > > > > http://developpers.blogspot.com/2008/03/how-to-backup-access-file-us > > in g-vba. html > > > > as well as a link to software that might repair a database. > > > > -----Original Message----- > > From: accessd-bounces at databaseadvisors.com > > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Arthur > > Fuller Sent: Wednesday, July 20, 2011 8:45 PM To: Access Developers > > discussion and problem solving Subject: Re: [AccessD] Access 2010 -- > > The database cannot be opened because theVBA project contained in it > > cannot be read. > > > > So you only lost one day's work. Take this as a sign from the gods > > in Redmond. Back up several times a day. It's not difficult. Click > > the Orb and then Manage and then Backup. It takes about 3 seconds > > and your ass is saved. I do it several times per session and don't > > have to recover more than an hour or so's work. > > > > A. > > > > On Wed, Jul 20, 2011 at 6:45 PM, Darrell Burns wrote: > > > > > Yes, backed up yesterday. Lost today's work. > > > > > > > > -- > > 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 charlotte.foust at gmail.com Wed Jul 20 23:57:12 2011 From: charlotte.foust at gmail.com (Charlotte Foust) Date: Wed, 20 Jul 2011 21:57:12 -0700 Subject: [AccessD] Access 2010 -- The database cannot be opened because theVBA project contained in it cannot be read. In-Reply-To: <005001cc4760$bd07cfa0$37176ee0$@gmail.com> References: <024501cc4720$8d8aef40$a8a0cdc0$@flsi.com> <004801cc4750$0c961560$25c24020$@gmail.com> <4E27A2AD.17124.201F10AB@stuart.lexacorp.com.pg> <005001cc4760$bd07cfa0$37176ee0$@gmail.com> Message-ID: They did away with the ugly office button in 2010, The file menu in 2010 gives you a Save Database As option. There's also a Save & Publish selection on the file menu that offers a backup database option. Charlotte Foust On Wed, Jul 20, 2011 at 9:43 PM, William Benson (VBACreations.Com) < vbacreations at gmail.com> wrote: > 2010 (which I am using) does not seem to have this... And I cannot see a > Manage function. > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Stuart > McLachlan > Sent: Wednesday, July 20, 2011 11:53 PM > To: Access Developers discussion and problem solving > Subject: Re: [AccessD] Access 2010 -- The database cannot be opened because > theVBA project contained in it cannot be read. > > Access 2007 and 2010. The big "Office Button" ball on the left hand side > of the menu bar. > From davidmcafee at gmail.com Thu Jul 21 14:17:53 2011 From: davidmcafee at gmail.com (David McAfee) Date: Thu, 21 Jul 2011 12:17:53 -0700 Subject: [AccessD] Access 2010 SP1 issue Message-ID: I have an ADP with a form that gets bound at run-time. This has worked flawlessly for several years until this morning. The user is complaining that the form opens up with all of the fields displaying #NAME? I haven't touched this form, or even the ADP in the longest time so I new it wasn't anything I've done. :) It works as it is supposed to on my computer and all the other employees in his department. We had him go to another user's computer and log in as himself. It worked. So I figured it was tied to his machine. I then realized his is on Win7, using Acess2010SP1. I found out SP1 was just released internally this week. A-HA! I ended up getting it working by doing this quick fix as shown below: I added the "If (SysCmd(acSysCmdAccessVer) = 14) Then" statement. Private Sub Form_Open(Cancel As Integer) On Error GoTo Form_Open_Error Me.RecordSource = "" If Nz(Me.OpenArgs, "") <> "" Then ' Is Not Null Then If IsNumeric(Me.OpenArgs) Then Me.InputParameters = "@IncStatJunctID = " & CInt(Me.OpenArgs) If (SysCmd(acSysCmdAccessVer) = 14) Then Me.RecordSource = "EXEC dbo.stpItemDetHist " & Me.InputParameters Else Me.RecordSourceQualifier = "dbo" Me.RecordSource = "stpItemDetHist" End If 'Do a bunch of stuff here Else Cancel = True End If Else Cancel = True End If This works, but technically isn't correct. I need to check for A2010 SP1, not just A2010 (Ver14) Does anyone know how I can check for SP1? Exit Sub From dc8 at btinternet.com Thu Jul 21 16:20:15 2011 From: dc8 at btinternet.com (Chris Swann) Date: Thu, 21 Jul 2011 22:20:15 +0100 Subject: [AccessD] Transpose from columns to rows Message-ID: <4E28980F.1060401@btinternet.com> Hi all, Once again my skills need a little help. I have a table which contains data in rows. I need to be able to take the values for each record and, where there is more than one value per record, put it into separate columns. Here is what the data looks like (there are other fields but these are the ones I need to move) ID CODE 1 A1 1 B1 1 C1 2 3 A1 4 Z1 4 etc etc what I need is this ID CODE1 CODE2 CODE3 1 A1 B1 C1 2 3 A1 4 Z1 If anyone can point me in the right direction I would be really grateful. Chris Swann From rockysmolin at bchacc.com Thu Jul 21 16:41:44 2011 From: rockysmolin at bchacc.com (Rocky Smolin) Date: Thu, 21 Jul 2011 14:41:44 -0700 Subject: [AccessD] Format During Edit Message-ID: <380200D6F70246DC9332CF6BD6DF470B@HAL9007> Dear List: I have a text box formatted to Currency - 2 decimal places. The text box is editable and since some decimal numbers do not have an exact equivalent in binary, when I click into the box to edit it, I get a long string of decimal numbers. For example, if the box has $3.25, when I click into it to edit it it displays 3.24999992735684. The user would like it not to do this for obvious reasons but I can't seem to force the behavior I want which would be to display 3.25 for editing. Tried the input mask but no cigar. What trick am I missing? MTIA Rocky Smolin Beach Access Software 858-259-4334 www.bchacc.com www.e-z-mrp.com From stuart at lexacorp.com.pg Thu Jul 21 16:47:44 2011 From: stuart at lexacorp.com.pg (Stuart McLachlan) Date: Fri, 22 Jul 2011 07:47:44 +1000 Subject: [AccessD] Format During Edit In-Reply-To: <380200D6F70246DC9332CF6BD6DF470B@HAL9007> References: <380200D6F70246DC9332CF6BD6DF470B@HAL9007> Message-ID: <4E289E80.8450.23F6C31C@stuart.lexacorp.com.pg> Can you change the type of the underlying field to Currency rather than Double? -- Stuart On 21 Jul 2011 at 14:41, Rocky Smolin wrote: > Dear List: > > I have a text box formatted to Currency - 2 decimal places. The text > box is editable and since some decimal numbers do not have an exact > equivalent in binary, when I click into the box to edit it, I get a > long string of decimal numbers. > > For example, if the box has $3.25, when I click into it to edit it it > displays 3.24999992735684. > > The user would like it not to do this for obvious reasons but I can't > seem to force the behavior I want which would be to display 3.25 for > editing. Tried the input mask but no cigar. > > What trick am I missing? > > MTIA > > Rocky Smolin > Beach Access Software > 858-259-4334 > www.bchacc.com > www.e-z-mrp.com > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > From rockysmolin at bchacc.com Thu Jul 21 17:09:23 2011 From: rockysmolin at bchacc.com (Rocky Smolin) Date: Thu, 21 Jul 2011 15:09:23 -0700 Subject: [AccessD] Format During Edit In-Reply-To: <4E289E80.8450.23F6C31C@stuart.lexacorp.com.pg> References: <380200D6F70246DC9332CF6BD6DF470B@HAL9007> <4E289E80.8450.23F6C31C@stuart.lexacorp.com.pg> Message-ID: <88CFAB5D8A8C4D36B3936D4BAFF59E56@HAL9007> That worked. Thanks, Stuart. Rocky -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Stuart McLachlan Sent: Thursday, July 21, 2011 2:48 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Format During Edit Can you change the type of the underlying field to Currency rather than Double? -- Stuart On 21 Jul 2011 at 14:41, Rocky Smolin wrote: > Dear List: > > I have a text box formatted to Currency - 2 decimal places. The text > box is editable and since some decimal numbers do not have an exact > equivalent in binary, when I click into the box to edit it, I get a > long string of decimal numbers. > > For example, if the box has $3.25, when I click into it to edit it it > displays 3.24999992735684. > > The user would like it not to do this for obvious reasons but I can't > seem to force the behavior I want which would be to display 3.25 for > editing. Tried the input mask but no cigar. > > What trick am I missing? > > MTIA > > Rocky Smolin > Beach Access Software > 858-259-4334 > www.bchacc.com www.e-z-mrp.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 Thu Jul 21 17:20:04 2011 From: accessd at shaw.ca (Jim Lawrence) Date: Thu, 21 Jul 2011 15:20:04 -0700 Subject: [AccessD] Format During Edit In-Reply-To: <4E289E80.8450.23F6C31C@stuart.lexacorp.com.pg> References: <380200D6F70246DC9332CF6BD6DF470B@HAL9007> <4E289E80.8450.23F6C31C@stuart.lexacorp.com.pg> Message-ID: <91295BD047274B88A7DC842F5C16F12F@creativesystemdesigns.com> ...Or you could put the display format to ######.##. Jim -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Stuart McLachlan Sent: Thursday, July 21, 2011 2:48 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Format During Edit Can you change the type of the underlying field to Currency rather than Double? -- Stuart On 21 Jul 2011 at 14:41, Rocky Smolin wrote: > Dear List: > > I have a text box formatted to Currency - 2 decimal places. The text > box is editable and since some decimal numbers do not have an exact > equivalent in binary, when I click into the box to edit it, I get a > long string of decimal numbers. > > For example, if the box has $3.25, when I click into it to edit it it > displays 3.24999992735684. > > The user would like it not to do this for obvious reasons but I can't > seem to force the behavior I want which would be to display 3.25 for > editing. Tried the input mask but no cigar. > > What trick am I missing? > > MTIA > > Rocky Smolin > Beach Access Software > 858-259-4334 > www.bchacc.com > www.e-z-mrp.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 Thu Jul 21 17:37:21 2011 From: stuart at lexacorp.com.pg (Stuart McLachlan) Date: Fri, 22 Jul 2011 08:37:21 +1000 Subject: [AccessD] Format During Edit In-Reply-To: <91295BD047274B88A7DC842F5C16F12F@creativesystemdesigns.com> References: <380200D6F70246DC9332CF6BD6DF470B@HAL9007>, <4E289E80.8450.23F6C31C@stuart.lexacorp.com.pg>, <91295BD047274B88A7DC842F5C16F12F@creativesystemdesigns.com> Message-ID: <4E28AA21.2454.24242E00@stuart.lexacorp.com.pg> That doesn't help when you are actually in the textbox. The full value is shown, regardless of the display fromat. On 21 Jul 2011 at 15:20, Jim Lawrence wrote: > ...Or you could put the display format to ######.##. > > Jim > > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Stuart > McLachlan Sent: Thursday, July 21, 2011 2:48 PM To: Access Developers > discussion and problem solving Subject: Re: [AccessD] Format During > Edit > > Can you change the type of the underlying field to Currency rather > than Double? > > -- > Stuart > > On 21 Jul 2011 at 14:41, Rocky Smolin wrote: > > > Dear List: > > > > I have a text box formatted to Currency - 2 decimal places. The > > text box is editable and since some decimal numbers do not have an > > exact equivalent in binary, when I click into the box to edit it, I > > get a long string of decimal numbers. > > > > For example, if the box has $3.25, when I click into it to edit it > > it displays 3.24999992735684. > > > > The user would like it not to do this for obvious reasons but I > > can't seem to force the behavior I want which would be to display > > 3.25 for editing. Tried the input mask but no cigar. > > > > What trick am I missing? > > > > MTIA > > > > Rocky Smolin > > Beach Access Software > > 858-259-4334 > > www.bchacc.com > > www.e-z-mrp.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 adtp at airtelmail.in Fri Jul 22 06:46:23 2011 From: adtp at airtelmail.in (A.D. Tejpal) Date: Fri, 22 Jul 2011 17:16:23 +0530 Subject: [AccessD] Transpose from columns to rows References: <4E28980F.1060401@btinternet.com> Message-ID: <6C18FCC4C4B74F73B88454EAE286B3E1@personal4a8ede> Chris, Sample query Q_Codes as given below, should get you the desired output. Q_Codes (Crosstab Query) ============================= TRANSFORM First(T_Codes.Code) AS FirstOfCode SELECT T_Codes.ID FROM T_Codes GROUP BY T_Codes.ID PIVOT "Code" & Format(DCount("*","T_Codes","ID = " & [ID] & " AND Code <= '" & [Code] & "'"),"00"); ============================= Note: Table T_Codes has fields ID (number type) and Code (text type). Best wishes, A.D. Tejpal ------------ ----- Original Message ----- From: Chris Swann To: Access Developers discussion and problem solving Sent: Friday, July 22, 2011 02:50 Subject: [AccessD] Transpose from columns to rows Hi all, Once again my skills need a little help. I have a table which contains data in rows. I need to be able to take the values for each record and, where there is more than one value per record, put it into separate columns. Here is what the data looks like (there are other fields but these are the ones I need to move) ID CODE 1 A1 1 B1 1 C1 2 3 A1 4 Z1 4 etc etc what I need is this ID CODE1 CODE2 CODE3 1 A1 B1 C1 2 3 A1 4 Z1 If anyone can point me in the right direction I would be really grateful. Chris Swann From jimdettman at verizon.net Fri Jul 22 07:50:50 2011 From: jimdettman at verizon.net (Jim Dettman) Date: Fri, 22 Jul 2011 08:50:50 -0400 Subject: [AccessD] Access 2010 SP1 issue In-Reply-To: References: Message-ID: <9194940DCB064CFFAB1C278BC0F711FB@XPS> David, Use the GetAccessVersion() code here: http://allenbrowne.com/ser-53code.html To determine the build number of the MSACCESS.EXE. These will be different for the 2010 vs 2010 SP1. The standard 2010 build is 14.0.4750.1000. I don't know what the SP1 version is because I have not installed it yet. Note that both MSKB fixes and SP's will increase the build number so your best bet is not to check for a specific level. Jim. -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of David McAfee Sent: Thursday, July 21, 2011 03:18 PM To: Access Developers discussion and problem solving Subject: [AccessD] Access 2010 SP1 issue I have an ADP with a form that gets bound at run-time. This has worked flawlessly for several years until this morning. The user is complaining that the form opens up with all of the fields displaying #NAME? I haven't touched this form, or even the ADP in the longest time so I new it wasn't anything I've done. :) It works as it is supposed to on my computer and all the other employees in his department. We had him go to another user's computer and log in as himself. It worked. So I figured it was tied to his machine. I then realized his is on Win7, using Acess2010SP1. I found out SP1 was just released internally this week. A-HA! I ended up getting it working by doing this quick fix as shown below: I added the "If (SysCmd(acSysCmdAccessVer) = 14) Then" statement. Private Sub Form_Open(Cancel As Integer) On Error GoTo Form_Open_Error Me.RecordSource = "" If Nz(Me.OpenArgs, "") <> "" Then ' Is Not Null Then If IsNumeric(Me.OpenArgs) Then Me.InputParameters = "@IncStatJunctID = " & CInt(Me.OpenArgs) If (SysCmd(acSysCmdAccessVer) = 14) Then Me.RecordSource = "EXEC dbo.stpItemDetHist " & Me.InputParameters Else Me.RecordSourceQualifier = "dbo" Me.RecordSource = "stpItemDetHist" End If 'Do a bunch of stuff here Else Cancel = True End If Else Cancel = True End If This works, but technically isn't correct. I need to check for A2010 SP1, not just A2010 (Ver14) Does anyone know how I can check for SP1? Exit Sub -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From jimdettman at verizon.net Fri Jul 22 07:54:08 2011 From: jimdettman at verizon.net (Jim Dettman) Date: Fri, 22 Jul 2011 08:54:08 -0400 Subject: [AccessD] Access 2010 SP1 issue In-Reply-To: References: Message-ID: <863C452D91EA4261AB37E2440CEF1110@XPS> BTW, I should have added that your not alone; the bug has already been reported to Microsoft. Jim. -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of David McAfee Sent: Thursday, July 21, 2011 03:18 PM To: Access Developers discussion and problem solving Subject: [AccessD] Access 2010 SP1 issue I have an ADP with a form that gets bound at run-time. This has worked flawlessly for several years until this morning. The user is complaining that the form opens up with all of the fields displaying #NAME? I haven't touched this form, or even the ADP in the longest time so I new it wasn't anything I've done. :) It works as it is supposed to on my computer and all the other employees in his department. We had him go to another user's computer and log in as himself. It worked. So I figured it was tied to his machine. I then realized his is on Win7, using Acess2010SP1. I found out SP1 was just released internally this week. A-HA! I ended up getting it working by doing this quick fix as shown below: I added the "If (SysCmd(acSysCmdAccessVer) = 14) Then" statement. Private Sub Form_Open(Cancel As Integer) On Error GoTo Form_Open_Error Me.RecordSource = "" If Nz(Me.OpenArgs, "") <> "" Then ' Is Not Null Then If IsNumeric(Me.OpenArgs) Then Me.InputParameters = "@IncStatJunctID = " & CInt(Me.OpenArgs) If (SysCmd(acSysCmdAccessVer) = 14) Then Me.RecordSource = "EXEC dbo.stpItemDetHist " & Me.InputParameters Else Me.RecordSourceQualifier = "dbo" Me.RecordSource = "stpItemDetHist" End If 'Do a bunch of stuff here Else Cancel = True End If Else Cancel = True End If This works, but technically isn't correct. I need to check for A2010 SP1, not just A2010 (Ver14) Does anyone know how I can check for SP1? Exit Sub -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From dc8 at btinternet.com Fri Jul 22 15:29:34 2011 From: dc8 at btinternet.com (Chris Swann) Date: Fri, 22 Jul 2011 21:29:34 +0100 Subject: [AccessD] Transpose from columns to rows In-Reply-To: <6C18FCC4C4B74F73B88454EAE286B3E1@personal4a8ede> References: <4E28980F.1060401@btinternet.com> <6C18FCC4C4B74F73B88454EAE286B3E1@personal4a8ede> Message-ID: <4E29DDAE.4060902@btinternet.com> Many, many thanks for that code. I've added it to the database and I now have exactly the output I need. All I have to do now is to find out how to get hold of some other data I need but that's a WHOLE different problem !! Chris On 22/07/2011 12:46, A.D. Tejpal wrote: > Chris, > > Sample query Q_Codes as given below, should get you the desired output. > > Q_Codes (Crosstab Query) > ============================= > TRANSFORM First(T_Codes.Code) AS FirstOfCode > SELECT T_Codes.ID > FROM T_Codes > GROUP BY T_Codes.ID > PIVOT "Code"& Format(DCount("*","T_Codes","ID = "& [ID]& " AND Code<= '"& [Code]& "'"),"00"); > ============================= > > Note: Table T_Codes has fields ID (number type) and Code (text type). > > Best wishes, > A.D. Tejpal > ------------ > > ----- Original Message ----- > From: Chris Swann > To: Access Developers discussion and problem solving > Sent: Friday, July 22, 2011 02:50 > Subject: [AccessD] Transpose from columns to rows > > > Hi all, > > Once again my skills need a little help. > > I have a table which contains data in rows. I need to be able to take > the values for each record and, where there is more than one value per > record, put it into separate columns. > > Here is what the data looks like (there are other fields but these are > the ones I need to move) > > ID CODE > 1 A1 > 1 B1 > 1 C1 > 2 > 3 A1 > 4 Z1 > 4 > > etc etc > > what I need is this > > ID CODE1 CODE2 CODE3 > 1 A1 B1 C1 > 2 > 3 A1 > 4 Z1 > > If anyone can point me in the right direction I would be really grateful. > > Chris Swann From newsgrps at dalyn.co.nz Fri Jul 22 16:54:54 2011 From: newsgrps at dalyn.co.nz (newsgrps) Date: Sat, 23 Jul 2011 09:54:54 +1200 Subject: [AccessD] Access 2010 SP1 issue In-Reply-To: <863C452D91EA4261AB37E2440CEF1110@XPS> References: <863C452D91EA4261AB37E2440CEF1110@XPS> Message-ID: <20110722215605.XVUV4056.mta02.xtra.co.nz@David-PC.dalyn.co.nz> Jim, How do we find out when Microsoft have solved the problem? Is there a website for these things? Regards David Emerson Dalyn Software Ltd New Zealand At 23/07/2011, Jim Dettman wrote: > BTW, I should have added that your not alone; the bug has already been >reported to Microsoft. > >Jim. > >-----Original Message----- >From: accessd-bounces at databaseadvisors.com >[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of David McAfee >Sent: Thursday, July 21, 2011 03:18 PM >To: Access Developers discussion and problem solving >Subject: [AccessD] Access 2010 SP1 issue > >I have an ADP with a form that gets bound at run-time. >This has worked flawlessly for several years until this morning. > >The user is complaining that the form opens up with all of the fields >displaying #NAME? > >I haven't touched this form, or even the ADP in the longest time so I new it >wasn't anything I've done. :) > >It works as it is supposed to on my computer and all the other employees in >his department. > >We had him go to another user's computer and log in as himself. It worked. > >So I figured it was tied to his machine. I then realized his is on Win7, >using Acess2010SP1. > >I found out SP1 was just released internally this week. A-HA! > >I ended up getting it working by doing this quick fix as shown below: >I added the "If (SysCmd(acSysCmdAccessVer) = 14) Then" statement. > >Private Sub Form_Open(Cancel As Integer) > On Error GoTo Form_Open_Error >Me.RecordSource = "" >If Nz(Me.OpenArgs, "") <> "" Then ' Is Not Null Then > If IsNumeric(Me.OpenArgs) Then > Me.InputParameters = "@IncStatJunctID = " & CInt(Me.OpenArgs) > If (SysCmd(acSysCmdAccessVer) = 14) Then > Me.RecordSource = "EXEC dbo.stpItemDetHist " & >Me.InputParameters > Else > Me.RecordSourceQualifier = "dbo" > Me.RecordSource = "stpItemDetHist" > End If > > 'Do a bunch of stuff here > > Else > Cancel = True > End If >Else > Cancel = True >End If > > >This works, but technically isn't correct. I need to check for A2010 SP1, >not just A2010 (Ver14) > >Does anyone know how I can check for SP1? >Exit Sub >-- >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 Sat Jul 23 07:03:09 2011 From: jimdettman at verizon.net (Jim Dettman) Date: Sat, 23 Jul 2011 08:03:09 -0400 Subject: [AccessD] Access 2010 SP1 issue In-Reply-To: <20110722215605.XVUV4056.mta02.xtra.co.nz@David-PC.dalyn.co.nz> References: <863C452D91EA4261AB37E2440CEF1110@XPS> <20110722215605.XVUV4056.mta02.xtra.co.nz@David-PC.dalyn.co.nz> Message-ID: David, Depending on the severity of the bug and the scope of it, and based on past experience, a couple of things might happen: 1. They will issue a KB and a hot patch for an immediate fix. 2. They will issue a KB with a work around and include it in the next SP. 3. They will simply include it in the next SP. 4. They will issue a KB with a work around and not bother to fix it. All I can say definitely is that we are still in the very initial stages with this. SP1 became available not too long ago and in many places is just starting to be rolled out. If I hear of anything I can pass along, I will. But in the meantime, it looks like simply adding EXEC takes care of the problem with the input parameters. Jim. -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of newsgrps Sent: Friday, July 22, 2011 05:55 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Access 2010 SP1 issue Jim, How do we find out when Microsoft have solved the problem? Is there a website for these things? Regards David Emerson Dalyn Software Ltd New Zealand At 23/07/2011, Jim Dettman wrote: > BTW, I should have added that your not alone; the bug has already been >reported to Microsoft. > >Jim. > >-----Original Message----- >From: accessd-bounces at databaseadvisors.com >[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of David McAfee >Sent: Thursday, July 21, 2011 03:18 PM >To: Access Developers discussion and problem solving >Subject: [AccessD] Access 2010 SP1 issue > >I have an ADP with a form that gets bound at run-time. >This has worked flawlessly for several years until this morning. > >The user is complaining that the form opens up with all of the fields >displaying #NAME? > >I haven't touched this form, or even the ADP in the longest time so I new it >wasn't anything I've done. :) > >It works as it is supposed to on my computer and all the other employees in >his department. > >We had him go to another user's computer and log in as himself. It worked. > >So I figured it was tied to his machine. I then realized his is on Win7, >using Acess2010SP1. > >I found out SP1 was just released internally this week. A-HA! > >I ended up getting it working by doing this quick fix as shown below: >I added the "If (SysCmd(acSysCmdAccessVer) = 14) Then" statement. > >Private Sub Form_Open(Cancel As Integer) > On Error GoTo Form_Open_Error >Me.RecordSource = "" >If Nz(Me.OpenArgs, "") <> "" Then ' Is Not Null Then > If IsNumeric(Me.OpenArgs) Then > Me.InputParameters = "@IncStatJunctID = " & CInt(Me.OpenArgs) > If (SysCmd(acSysCmdAccessVer) = 14) Then > Me.RecordSource = "EXEC dbo.stpItemDetHist " & >Me.InputParameters > Else > Me.RecordSourceQualifier = "dbo" > Me.RecordSource = "stpItemDetHist" > End If > > 'Do a bunch of stuff here > > Else > Cancel = True > End If >Else > Cancel = True >End If > > >This works, but technically isn't correct. I need to check for A2010 SP1, >not just A2010 (Ver14) > >Does anyone know how I can check for SP1? >Exit Sub >-- >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 fuller.artful at gmail.com Sat Jul 23 07:54:01 2011 From: fuller.artful at gmail.com (Arthur Fuller) Date: Sat, 23 Jul 2011 08:54:01 -0400 Subject: [AccessD] Max of 20 values Message-ID: I have a form into which the user enters up to 20 values (measurements in time). They all default to zero. I'm trying to think of an elegant way to find the max value among the 20. Create an array and bubble sort it? I want to call this code on the AfterUpdate of each of these 20 controls so the control called MaxReading gets a new value if any of the 20 controls goes higher than the current MaxReading value. TIA, Arthur From rockysmolin at bchacc.com Sat Jul 23 08:15:34 2011 From: rockysmolin at bchacc.com (Rocky Smolin) Date: Sat, 23 Jul 2011 06:15:34 -0700 Subject: [AccessD] Max of 20 values In-Reply-To: References: Message-ID: Crude as it sounds, twenty IF statements might be the fastest, easiest, cheapest way. Easy to read, easy to maintain in the future. If the text boxes all have consistent names list txtValuenn where nn is a number from 01 to 20, then you could do it in a loop, creating the name of the text box in a string and checking to see if the value in that box is greater than the currently highest value -- If Me(strtxtBoxName) > dblCurrentHIgh then dblCurrentHigh = Me(strtxtBoxName). That would be clever, harder to maintain 5 years form now, and take....almost 20 lines of code. You coud write the twenty values to a temp table and to a Dmax on the table. That would take about 20 lines of code and would be even longer and more fun to create. Or bind the twenty values to a table and put them in a continuous subform. Then the Dmax would be easy. Or 20 If statements... R -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Arthur Fuller Sent: Saturday, July 23, 2011 5:54 AM To: Access Developers discussion and problem solving Subject: [AccessD] Max of 20 values I have a form into which the user enters up to 20 values (measurements in time). They all default to zero. I'm trying to think of an elegant way to find the max value among the 20. Create an array and bubble sort it? I want to call this code on the AfterUpdate of each of these 20 controls so the control called MaxReading gets a new value if any of the 20 controls goes higher than the current MaxReading value. TIA, Arthur -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From df.waters at comcast.net Sat Jul 23 08:42:00 2011 From: df.waters at comcast.net (Dan Waters) Date: Sat, 23 Jul 2011 08:42:00 -0500 Subject: [AccessD] Max of 20 values In-Reply-To: References: Message-ID: <001701cc493e$4ca62a60$e5f27f20$@comcast.net> Hi Arthur, I found this function in my library file. This uses a parameter array and just loops through looking for the highest one. HTH! Dan '--------------------- Private Sub textMaxOfVars() MsgBox MaxOfVars(20, 30, Null, -7, 8, 87.23, "top") End Sub Public Function MaxOfVars(ParamArray varValues() As Variant) On Error GoTo EH '-- Purpose: Return a max of variants. Note that any string will be larger than any numeric value. Dim lvarVal As Variant Dim lvarMax As Variant lvarMax = varValues(0) For Each lvarVal In varValues If lvarVal > lvarMax Then lvarMax = lvarVal End If Next lvarVal MaxOfVars = lvarMax XH: Exit Function EH: Select Case Err.Number Case 9 '-- Subscript out of range - probably due to no values supplied Application.Echo True MaxOfVars = Null GoTo XH End Select End Function '--------------------- -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Arthur Fuller Sent: Saturday, July 23, 2011 7:54 AM To: Access Developers discussion and problem solving Subject: [AccessD] Max of 20 values I have a form into which the user enters up to 20 values (measurements in time). They all default to zero. I'm trying to think of an elegant way to find the max value among the 20. Create an array and bubble sort it? I want to call this code on the AfterUpdate of each of these 20 controls so the control called MaxReading gets a new value if any of the 20 controls goes higher than the current MaxReading value. TIA, Arthur -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From jwcolby at colbyconsulting.com Sat Jul 23 08:46:49 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Sat, 23 Jul 2011 09:46:49 -0400 Subject: [AccessD] Max of 20 values In-Reply-To: References: Message-ID: <4E2AD0C9.2090307@colbyconsulting.com> Bubble sort? Arthur!!! I think a set of classes... ;) Actually a simple function where you pass the control with the data just entered and the MaxReading control. The function compares the value just entered with max reading and sets maxreading to the new value if the new value is bigger. function SetMaxReading(ctlJustEntered as control, ctlMaxReading as control) if ctlJustEntered.Value > ctlMaxReading.value then ctlMaxReading.value = ctlJustEntered.Value endif end function If you need to set dirty false then pass in the form as well. John W. Colby www.ColbyConsulting.com On 7/23/2011 8:54 AM, Arthur Fuller wrote: > I have a form into which the user enters up to 20 values (measurements in > time). They all default to zero. I'm trying to think of an elegant way to > find the max value among the 20. Create an array and bubble sort it? I want > to call this code on the AfterUpdate of each of these 20 controls so the > control called MaxReading gets a new value if any of the 20 controls goes > higher than the current MaxReading value. > > TIA, > Arthur From fuller.artful at gmail.com Sat Jul 23 09:12:04 2011 From: fuller.artful at gmail.com (Arthur Fuller) Date: Sat, 23 Jul 2011 10:12:04 -0400 Subject: [AccessD] Max of 20 values In-Reply-To: <4E2AD0C9.2090307@colbyconsulting.com> References: <4E2AD0C9.2090307@colbyconsulting.com> Message-ID: 1. Pls forgive me my senior moments, JC. 2. You're such a classy guy, I just knew you'd come up with a set of classes. The problem is perhaps in the UI rather than the logic. So far, there is no prevention upon the user entering M1 then M3 then M20 and leaving all the others out. Granted, this style of data-entry doesn't make sense, but given user-sensibilities (the newly politically correct way to phrase Dumbass MoFo), I need to guard against such ostensibly intelligent responses to my form. I suppose that one possibility is in each AfterUpdate, force the Focus to the next in sequence. All that said, I shall work on implementing your approach. I just imported your code and aside from a couple of vbcrlfs if worked fine. The part I don't like is the specific reference to the active control. I have looked at ActiveControl and maybe that's the path I should follow. I want to compress this into one clean function that receives the currently active control and the currently defined maximum, and then reset the MaxGroupReading to the greater of these two values, so I can copy+paste said "=ComputeMax()" into all 20 of the AfterUpdate events and be done with it. Your last comment (about passing in the form) has immediate potential. In the real case, I have to do this four times, with fields numbered M1..M20, M21..M40, M41...M60 and M61...M80. Each of these lives on a separate tab's subform, but the algorithm remains the same throughout. There may or may not be data on everything beyond M20, as defined by the Parent form. If a WorkStation has only two LightCurtains, then LC1 and LC3 are defined with measures, and the others are not. (Please don't ask me why the sequence goes LC1, LC3, LC2 and LC4 -- I'm just a grunt programmer in the trenches, not a certified P.Eng). I just do what I'm told... which argument didn't work at Nuremberg and perhaps won't pass in Toronto, but that's my argument and I'm sticking to it. A. On Sat, Jul 23, 2011 at 9:46 AM, jwcolby wrote: > Bubble sort? > > Arthur!!! > > I think a set of classes... ;) > > Actually a simple function where you pass the control with the data just > entered and the MaxReading control. The function compares the value just > entered with max reading and sets maxreading to the new value if the new > value is bigger. > > function SetMaxReading(ctlJustEntered as control, ctlMaxReading as control) > > if ctlJustEntered.Value > ctlMaxReading.value then > ctlMaxReading.value = ctlJustEntered.Value > endif > end function > > If you need to set dirty false then pass in the form as well. > > John W. Colby > www.ColbyConsulting.com > > > From jwcolby at colbyconsulting.com Sat Jul 23 09:19:14 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Sat, 23 Jul 2011 10:19:14 -0400 Subject: [AccessD] Max of 20 values In-Reply-To: References: <4E2AD0C9.2090307@colbyconsulting.com> Message-ID: <4E2AD862.9060109@colbyconsulting.com> So you are saying that every single control needs data entered into it? John W. Colby www.ColbyConsulting.com On 7/23/2011 10:12 AM, Arthur Fuller wrote: > 1. Pls forgive me my senior moments, JC. > 2. You're such a classy guy, I just knew you'd come up with a set of > classes. > > The problem is perhaps in the UI rather than the logic. So far, there is no > prevention upon the user entering M1 then M3 then M20 and leaving all the > others out. Granted, this style of data-entry doesn't make sense, but given > user-sensibilities (the newly politically correct way to phrase Dumbass > MoFo), I need to guard against such ostensibly intelligent responses to my > form. I suppose that one possibility is in each AfterUpdate, force the Focus > to the next in sequence. > > All that said, I shall work on implementing your approach. I just imported > your code and aside from a couple of vbcrlfs if worked fine. The part I > don't like is the specific reference to the active control. I have looked at > ActiveControl and maybe that's the path I should follow. I want to compress > this into one clean function that receives the currently active control and > the currently defined maximum, and then reset the MaxGroupReading to the > greater of these two values, so I can copy+paste said "=ComputeMax()" into > all 20 of the AfterUpdate events and be done with it. > > Your last comment (about passing in the form) has immediate potential. In > the real case, I have to do this four times, with fields numbered M1..M20, > M21..M40, M41...M60 and M61...M80. Each of these lives on a separate tab's > subform, but the algorithm remains the same throughout. There may or may not > be data on everything beyond M20, as defined by the Parent form. If a > WorkStation has only two LightCurtains, then LC1 and LC3 are defined with > measures, and the others are not. (Please don't ask me why the sequence goes > LC1, LC3, LC2 and LC4 -- I'm just a grunt programmer in the trenches, not a > certified P.Eng). I just do what I'm told... which argument didn't work at > Nuremberg and perhaps won't pass in Toronto, but that's my argument and I'm > sticking to it. > > A. > > On Sat, Jul 23, 2011 at 9:46 AM, jwcolbywrote: > >> Bubble sort? >> >> Arthur!!! >> >> I think a set of classes... ;) >> >> Actually a simple function where you pass the control with the data just >> entered and the MaxReading control. The function compares the value just >> entered with max reading and sets maxreading to the new value if the new >> value is bigger. >> >> function SetMaxReading(ctlJustEntered as control, ctlMaxReading as control) >> >> if ctlJustEntered.Value> ctlMaxReading.value then >> ctlMaxReading.value = ctlJustEntered.Value >> endif >> end function >> >> If you need to set dirty false then pass in the form as well. >> >> John W. Colby >> www.ColbyConsulting.com >> >> >> From jwcolby at colbyconsulting.com Sat Jul 23 09:21:19 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Sat, 23 Jul 2011 10:21:19 -0400 Subject: [AccessD] Max of 20 values In-Reply-To: References: <4E2AD0C9.2090307@colbyconsulting.com> Message-ID: <4E2AD8DF.3020202@colbyconsulting.com> And further, given that you are working with such numbers of controls I would start leaning towards a class solution. Does this need to go into multiple forms? If so leaning further toward a class solution. Are the controls following a naming convention? Leaning further... From you original email I got that the user just entered any controls they wished, not every control. And you said nothing about multiple forms or tabs. John W. Colby www.ColbyConsulting.com On 7/23/2011 10:12 AM, Arthur Fuller wrote: > 1. Pls forgive me my senior moments, JC. > 2. You're such a classy guy, I just knew you'd come up with a set of > classes. > > The problem is perhaps in the UI rather than the logic. So far, there is no > prevention upon the user entering M1 then M3 then M20 and leaving all the > others out. Granted, this style of data-entry doesn't make sense, but given > user-sensibilities (the newly politically correct way to phrase Dumbass > MoFo), I need to guard against such ostensibly intelligent responses to my > form. I suppose that one possibility is in each AfterUpdate, force the Focus > to the next in sequence. > > All that said, I shall work on implementing your approach. I just imported > your code and aside from a couple of vbcrlfs if worked fine. The part I > don't like is the specific reference to the active control. I have looked at > ActiveControl and maybe that's the path I should follow. I want to compress > this into one clean function that receives the currently active control and > the currently defined maximum, and then reset the MaxGroupReading to the > greater of these two values, so I can copy+paste said "=ComputeMax()" into > all 20 of the AfterUpdate events and be done with it. > > Your last comment (about passing in the form) has immediate potential. In > the real case, I have to do this four times, with fields numbered M1..M20, > M21..M40, M41...M60 and M61...M80. Each of these lives on a separate tab's > subform, but the algorithm remains the same throughout. There may or may not > be data on everything beyond M20, as defined by the Parent form. If a > WorkStation has only two LightCurtains, then LC1 and LC3 are defined with > measures, and the others are not. (Please don't ask me why the sequence goes > LC1, LC3, LC2 and LC4 -- I'm just a grunt programmer in the trenches, not a > certified P.Eng). I just do what I'm told... which argument didn't work at > Nuremberg and perhaps won't pass in Toronto, but that's my argument and I'm > sticking to it. > > A. > > On Sat, Jul 23, 2011 at 9:46 AM, jwcolbywrote: > >> Bubble sort? >> >> Arthur!!! >> >> I think a set of classes... ;) >> >> Actually a simple function where you pass the control with the data just >> entered and the MaxReading control. The function compares the value just >> entered with max reading and sets maxreading to the new value if the new >> value is bigger. >> >> function SetMaxReading(ctlJustEntered as control, ctlMaxReading as control) >> >> if ctlJustEntered.Value> ctlMaxReading.value then >> ctlMaxReading.value = ctlJustEntered.Value >> endif >> end function >> >> If you need to set dirty false then pass in the form as well. >> >> John W. Colby >> www.ColbyConsulting.com >> >> >> From fuller.artful at gmail.com Sat Jul 23 09:40:19 2011 From: fuller.artful at gmail.com (Arthur Fuller) Date: Sat, 23 Jul 2011 10:40:19 -0400 Subject: [AccessD] Max of 20 values In-Reply-To: <4E2AD8DF.3020202@colbyconsulting.com> References: <4E2AD0C9.2090307@colbyconsulting.com> <4E2AD8DF.3020202@colbyconsulting.com> Message-ID: Excellent questions, all. Here, as briefly as I can make it, is the scenario. There is an object called a workstation. It may have up to 4 LightCurtains (these devices shoot beams of light from Right to Left and detect the interruption of said beam by any object, typically an operator's hand. Upon detection, the machine must shut down within several milliseconds; a typical measurement would be 220. The Safety Engineer tests this by inserting his hand into the gap between sender and receiver, then measures the Shutdown Time. He does this 20 times. Although one would have to be an idiot to record M1 then M17 then M2 then M20, the current implementation does not prevent this idiocy. The measures are taken on a subform. The MaxReading exists on the parent form. That part I've got already. I'm not even sure what I'm looking for here; perhaps basically a defense against entering M1 then M10 then M11 then M20. Chances are that the user would not do this, but I feel the need to protect against it. Further, there are a maximum of 4 LCs (call them N, S, W, E) and in addition 4 Two-Handed-Controls (THCs, in the lingo), each of which has up to 20 Measurements. So I'm looking for a clean and elegant way to: a) prevent you entering Measure 3 without having entered Measure 2. b) to grab the value of the most recently entered Measurement and compare it against the MaxReading so far recorded. I have b) solved. a) is another matter, and I have no idea how to handle it, except perhaps by forcing the focus to the next M# in the AfterUpdate event. There has got to be something slicker than that, I just know it. A. On Sat, Jul 23, 2011 at 10:21 AM, jwcolby wrote: > And further, given that you are working with such numbers of controls I > would start leaning towards a class solution. Does this need to go into > multiple forms? If so leaning further toward a class solution. Are the > controls following a naming convention? Leaning further... > > From you original email I got that the user just entered any controls they > wished, not every control. And you said nothing about multiple forms or > tabs. > > > John W. Colby > www.ColbyConsulting.com > > On 7/23/2011 10:12 AM, Arthur Fuller wrote: > >> 1. Pls forgive me my senior moments, JC. >> 2. You're such a classy guy, I just knew you'd come up with a set of >> classes. >> >> The problem is perhaps in the UI rather than the logic. So far, there is >> no >> prevention upon the user entering M1 then M3 then M20 and leaving all the >> others out. Granted, this style of data-entry doesn't make sense, but >> given >> user-sensibilities (the newly politically correct way to phrase Dumbass >> MoFo), I need to guard against such ostensibly intelligent responses to my >> form. I suppose that one possibility is in each AfterUpdate, force the >> Focus >> to the next in sequence. >> >> All that said, I shall work on implementing your approach. I just imported >> your code and aside from a couple of vbcrlfs if worked fine. The part I >> don't like is the specific reference to the active control. I have looked >> at >> ActiveControl and maybe that's the path I should follow. I want to >> compress >> this into one clean function that receives the currently active control >> and >> the currently defined maximum, and then reset the MaxGroupReading to the >> greater of these two values, so I can copy+paste said "=ComputeMax()" into >> all 20 of the AfterUpdate events and be done with it. >> >> Your last comment (about passing in the form) has immediate potential. In >> the real case, I have to do this four times, with fields numbered M1..M20, >> M21..M40, M41...M60 and M61...M80. Each of these lives on a separate tab's >> subform, but the algorithm remains the same throughout. There may or may >> not >> be data on everything beyond M20, as defined by the Parent form. If a >> WorkStation has only two LightCurtains, then LC1 and LC3 are defined with >> measures, and the others are not. (Please don't ask me why the sequence >> goes >> LC1, LC3, LC2 and LC4 -- I'm just a grunt programmer in the trenches, not >> a >> certified P.Eng). I just do what I'm told... which argument didn't work at >> Nuremberg and perhaps won't pass in Toronto, but that's my argument and >> I'm >> sticking to it. >> >> A. >> >> On Sat, Jul 23, 2011 at 9:46 AM, jwcolby >> >wrote: >> >> Bubble sort? >>> >>> Arthur!!! >>> >>> I think a set of classes... ;) >>> >>> Actually a simple function where you pass the control with the data just >>> entered and the MaxReading control. The function compares the value just >>> entered with max reading and sets maxreading to the new value if the new >>> value is bigger. >>> >>> function SetMaxReading(ctlJustEntered as control, ctlMaxReading as >>> control) >>> >>> if ctlJustEntered.Value> ctlMaxReading.value then >>> ctlMaxReading.value = ctlJustEntered.Value >>> endif >>> end function >>> >>> If you need to set dirty false then pass in the form as well. >>> >>> John W. Colby >>> www.ColbyConsulting.com >>> >>> >>> >>> -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/**mailman/listinfo/accessd > Website: http://www.databaseadvisors.**com > From jwcolby at colbyconsulting.com Sat Jul 23 10:05:27 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Sat, 23 Jul 2011 11:05:27 -0400 Subject: [AccessD] Max of 20 values In-Reply-To: References: <4E2AD0C9.2090307@colbyconsulting.com> <4E2AD8DF.3020202@colbyconsulting.com> Message-ID: <4E2AE337.3050705@colbyconsulting.com> So IOW the readings the engineer takes when he sticks his hand in the light curtain need to be entered in sequential order in the controls? I am way leaning towards a class solution now. I would probably go with a class to hold the control and sink it's events and a parent class with 20 control class variables to hold instances of the control class (assuming that the number of controls (readings) will never change). Each control class raises an event to tell the parent to "step" the sequence. The parent has the stepping code, the control class has the locking / unlocking code. I might even turn the background a different color to visually cue the user. That would also be in the control class. The class would have a method of setting the control enable property. The parent class would load every one of the controls in the (sub) form into a class instance and as they load set all but the first Enable to false. As the Engineer enters the first reading and AfterUpdate fires, the next sequential control (class instance) is enabled, the focus set to that and the current control disabled. Voila, "stepping" enabled controls. Or perhaps instead of enable / disable, use the Locked property. This would allow the user to do something like a double click in the previous control if they made a data entry error, but only immediately. IOW before entering data into the next control Classes would make this whole thing much simpler because all of the code for the manipulation of the control itself would be kept in the control class instead of the form. Further the whole thing "replicates" in each subform simply by instantiating the parent class. The parent class could even load the control classes into the collection. If the order of entering the readings into the controls does not matter, IOW if it is not critical to have reading one entered into control one, then don't worry about it. Just lock the control and allow the user to click in another. But I think the "stepping" paradigm is the cleanest. And of course, as Stuart will point out, you don't have to use classes at all. You could just stuff all of the code in each subform. And enter the nightmare of fixing code in every subform if you find an issue or add a feature. If you are interested I can code this in under an hour. John W. Colby www.ColbyConsulting.com On 7/23/2011 10:40 AM, Arthur Fuller wrote: > Excellent questions, all. > > Here, as briefly as I can make it, is the scenario. There is an object > called a workstation. It may have up to 4 LightCurtains (these devices shoot > beams of light from Right to Left and detect the interruption of said beam > by any object, typically an operator's hand. Upon detection, the machine > must shut down within several milliseconds; a typical measurement would be > 220. The Safety Engineer tests this by inserting his hand into the gap > between sender and receiver, then measures the Shutdown Time. He does this > 20 times. > > Although one would have to be an idiot to record M1 then M17 then M2 then > M20, the current implementation does not prevent this idiocy. > > The measures are taken on a subform. The MaxReading exists on the parent > form. That part I've got already. > > I'm not even sure what I'm looking for here; perhaps basically a defense > against entering M1 then M10 then M11 then M20. Chances are that the user > would not do this, but I feel the need to protect against it. > > Further, there are a maximum of 4 LCs (call them N, S, W, E) and in addition > 4 Two-Handed-Controls (THCs, in the lingo), each of which has up to 20 > Measurements. > > So I'm looking for a clean and elegant way to: > > a) prevent you entering Measure 3 without having entered Measure 2. > b) to grab the value of the most recently entered Measurement and compare it > against the MaxReading so far recorded. > > I have b) solved. a) is another matter, and I have no idea how to handle it, > except perhaps by forcing the focus to the next M# in the AfterUpdate event. > There has got to be something slicker than that, I just know it. > > A. > > On Sat, Jul 23, 2011 at 10:21 AM, jwcolbywrote: > >> And further, given that you are working with such numbers of controls I >> would start leaning towards a class solution. Does this need to go into >> multiple forms? If so leaning further toward a class solution. Are the >> controls following a naming convention? Leaning further... >> >> From you original email I got that the user just entered any controls they >> wished, not every control. And you said nothing about multiple forms or >> tabs. >> >> >> John W. Colby >> www.ColbyConsulting.com >> >> On 7/23/2011 10:12 AM, Arthur Fuller wrote: >> >>> 1. Pls forgive me my senior moments, JC. >>> 2. You're such a classy guy, I just knew you'd come up with a set of >>> classes. >>> >>> The problem is perhaps in the UI rather than the logic. So far, there is >>> no >>> prevention upon the user entering M1 then M3 then M20 and leaving all the >>> others out. Granted, this style of data-entry doesn't make sense, but >>> given >>> user-sensibilities (the newly politically correct way to phrase Dumbass >>> MoFo), I need to guard against such ostensibly intelligent responses to my >>> form. I suppose that one possibility is in each AfterUpdate, force the >>> Focus >>> to the next in sequence. >>> >>> All that said, I shall work on implementing your approach. I just imported >>> your code and aside from a couple of vbcrlfs if worked fine. The part I >>> don't like is the specific reference to the active control. I have looked >>> at >>> ActiveControl and maybe that's the path I should follow. I want to >>> compress >>> this into one clean function that receives the currently active control >>> and >>> the currently defined maximum, and then reset the MaxGroupReading to the >>> greater of these two values, so I can copy+paste said "=ComputeMax()" into >>> all 20 of the AfterUpdate events and be done with it. >>> >>> Your last comment (about passing in the form) has immediate potential. In >>> the real case, I have to do this four times, with fields numbered M1..M20, >>> M21..M40, M41...M60 and M61...M80. Each of these lives on a separate tab's >>> subform, but the algorithm remains the same throughout. There may or may >>> not >>> be data on everything beyond M20, as defined by the Parent form. If a >>> WorkStation has only two LightCurtains, then LC1 and LC3 are defined with >>> measures, and the others are not. (Please don't ask me why the sequence >>> goes >>> LC1, LC3, LC2 and LC4 -- I'm just a grunt programmer in the trenches, not >>> a >>> certified P.Eng). I just do what I'm told... which argument didn't work at >>> Nuremberg and perhaps won't pass in Toronto, but that's my argument and >>> I'm >>> sticking to it. >>> >>> A. >>> >>> On Sat, Jul 23, 2011 at 9:46 AM, jwcolby >>>> wrote: >>> >>> Bubble sort? >>>> >>>> Arthur!!! >>>> >>>> I think a set of classes... ;) >>>> >>>> Actually a simple function where you pass the control with the data just >>>> entered and the MaxReading control. The function compares the value just >>>> entered with max reading and sets maxreading to the new value if the new >>>> value is bigger. >>>> >>>> function SetMaxReading(ctlJustEntered as control, ctlMaxReading as >>>> control) >>>> >>>> if ctlJustEntered.Value> ctlMaxReading.value then >>>> ctlMaxReading.value = ctlJustEntered.Value >>>> endif >>>> end function >>>> >>>> If you need to set dirty false then pass in the form as well. >>>> >>>> John W. Colby >>>> www.ColbyConsulting.com >>>> >>>> >>>> >>>> -- >> AccessD mailing list >> AccessD at databaseadvisors.com >> http://databaseadvisors.com/**mailman/listinfo/accessd >> Website: http://www.databaseadvisors.**com >> From fuller.artful at gmail.com Sat Jul 23 10:28:52 2011 From: fuller.artful at gmail.com (Arthur Fuller) Date: Sat, 23 Jul 2011 11:28:52 -0400 Subject: [AccessD] Max of 20 values In-Reply-To: <4E2AE337.3050705@colbyconsulting.com> References: <4E2AD0C9.2090307@colbyconsulting.com> <4E2AD8DF.3020202@colbyconsulting.com> <4E2AE337.3050705@colbyconsulting.com> Message-ID: Ok, I won't pay you a penny but go ahead and code it. There are four subforms, call them LC#_fsub, each tied to a parent whose values derive from the subform. I have this working for subform1 and can clone the sub proc for each of them, but this strikes me as seriously inelegant. This topic raises an ancillory question: supposing a number of fields named M1...M20, how can one code a loop that grabs their names and walks the loop and obtains these controls' values? Perhaps Eval? I am seriously unsure upon this turf. A. From jwcolby at colbyconsulting.com Sat Jul 23 10:36:01 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Sat, 23 Jul 2011 11:36:01 -0400 Subject: [AccessD] Max of 20 values In-Reply-To: References: <4E2AD0C9.2090307@colbyconsulting.com> <4E2AD8DF.3020202@colbyconsulting.com> <4E2AE337.3050705@colbyconsulting.com> Message-ID: <4E2AEA61.2060809@colbyconsulting.com> > This topic raises an ancillory question: supposing a number of fields named M1...M20, how can one code a loop that grabs their names and walks the loop and obtains these controls' values? Each form has a controls collection dim ctl as control for each ctl in me.controls 'now look at the control name next ctl Having a nice neat naming convention helps. M01, M02 etc allows you to simply do if left(ctl.name,1) = "m" then debug.print ctl.value endif John W. Colby www.ColbyConsulting.com On 7/23/2011 11:28 AM, Arthur Fuller wrote: > Ok, I won't pay you a penny but go ahead and code it. There are four > subforms, call them LC#_fsub, each tied to a parent whose values derive from > the subform. I have this working for subform1 and can clone the sub proc for > each of them, but this strikes me as seriously inelegant. > > This topic raises an ancillory question: supposing a number of fields named > M1...M20, how can one code a loop that grabs their names and walks the loop > and obtains these controls' values? Perhaps Eval? I am seriously unsure upon > this turf. > > A. From df.waters at comcast.net Sat Jul 23 10:35:08 2011 From: df.waters at comcast.net (Dan Waters) Date: Sat, 23 Jul 2011 10:35:08 -0500 Subject: [AccessD] Re Max of 20 values Message-ID: <001b01cc494e$1af91530$50eb3f90$@comcast.net> Hi Arthur, I found this function in my library file. This uses a parameter array and just loops through looking for the highest one. HTH! Dan '--------------------- Private Sub textMaxOfVars() MsgBox MaxOfVars(20, 30, Null, -7, 8, 87.23, "top") End Sub Public Function MaxOfVars(ParamArray varValues() As Variant) On Error GoTo EH '-- Purpose: Return a max of variants. Note that any string will be larger than any numeric value. Dim lvarVal As Variant Dim lvarMax As Variant lvarMax = varValues(0) For Each lvarVal In varValues If lvarVal > lvarMax Then lvarMax = lvarVal End If Next lvarVal MaxOfVars = lvarMax XH: Exit Function EH: Select Case Err.Number Case 9 '-- Subscript out of range - probably due to no values supplied Application.Echo True MaxOfVars = Null GoTo XH End Select End Function '--------------------- -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Arthur Fuller Sent: Saturday, July 23, 2011 7:54 AM To: Access Developers discussion and problem solving Subject: [AccessD] Max of 20 values I have a form into which the user enters up to 20 values (measurements in time). They all default to zero. I'm trying to think of an elegant way to find the max value among the 20. Create an array and bubble sort it? I want to call this code on the AfterUpdate of each of these 20 controls so the control called MaxReading gets a new value if any of the 20 controls goes higher than the current MaxReading value. TIA, Arthur -- 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 jwcolby at colbyconsulting.com Sat Jul 23 10:39:38 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Sat, 23 Jul 2011 11:39:38 -0400 Subject: [AccessD] Max of 20 values In-Reply-To: References: <4E2AD0C9.2090307@colbyconsulting.com> <4E2AD8DF.3020202@colbyconsulting.com> <4E2AE337.3050705@colbyconsulting.com> Message-ID: <4E2AEB3A.8010008@colbyconsulting.com> How many subforms is irrelevant once you have a parent class. You instantiate the parent in the form and pass in the controls and off you go. John W. Colby www.ColbyConsulting.com On 7/23/2011 11:28 AM, Arthur Fuller wrote: > Ok, I won't pay you a penny but go ahead and code it. There are four > subforms, call them LC#_fsub, each tied to a parent whose values derive from > the subform. I have this working for subform1 and can clone the sub proc for > each of them, but this strikes me as seriously inelegant. > > This topic raises an ancillory question: supposing a number of fields named > M1...M20, how can one code a loop that grabs their names and walks the loop > and obtains these controls' values? Perhaps Eval? I am seriously unsure upon > this turf. > > A. From fuller.artful at gmail.com Sat Jul 23 10:41:29 2011 From: fuller.artful at gmail.com (Arthur Fuller) Date: Sat, 23 Jul 2011 11:41:29 -0400 Subject: [AccessD] Max of 20 values In-Reply-To: <4E2AEA61.2060809@colbyconsulting.com> References: <4E2AD0C9.2090307@colbyconsulting.com> <4E2AD8DF.3020202@colbyconsulting.com> <4E2AE337.3050705@colbyconsulting.com> <4E2AEA61.2060809@colbyconsulting.com> Message-ID: I see what you're getting at but the part I don't like about this approach is its need to visit all the controls, when I'm concerned only about the ones that begin with "M" followed by a number. In this case, isn't it better to create a collection based on this naming scheme? This is just a question; you're the class guy. A. From fuller.artful at gmail.com Sat Jul 23 10:45:08 2011 From: fuller.artful at gmail.com (Arthur Fuller) Date: Sat, 23 Jul 2011 11:45:08 -0400 Subject: [AccessD] Re Max of 20 values In-Reply-To: <001b01cc494e$1af91530$50eb3f90$@comcast.net> References: <001b01cc494e$1af91530$50eb3f90$@comcast.net> Message-ID: If I understand what you are saying, I ought to create an array consisting of M1...M29 and pass it to said function, and let the function walk through the array to determine the max value. Is that right? Thx. Arthur On Sat, Jul 23, 2011 at 11:35 AM, Dan Waters wrote: > Hi Arthur, > > I found this function in my library file. This uses a parameter array and > just loops through looking for the highest one. > > From john at winhaven.net Sat Jul 23 11:09:16 2011 From: john at winhaven.net (John Bartow) Date: Sat, 23 Jul 2011 11:09:16 -0500 Subject: [AccessD] report detail - conditional formatting Message-ID: <068301cc4952$df49e690$9dddb3b0$@winhaven.net> Is it possible to create conditional formatting per detail line in an Access report? I would like to have certain items print in bold. TIA John B From jwcolby at colbyconsulting.com Sat Jul 23 11:11:19 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Sat, 23 Jul 2011 12:11:19 -0400 Subject: [AccessD] Max of 20 values In-Reply-To: References: <4E2AD0C9.2090307@colbyconsulting.com> <4E2AD8DF.3020202@colbyconsulting.com> <4E2AE337.3050705@colbyconsulting.com> <4E2AEA61.2060809@colbyconsulting.com> Message-ID: <4E2AF2A7.70401@colbyconsulting.com> I am just addressing how to find the controls not what you do with them when you find them. You could walk the collection once adding the control into a collection when it matches the name. Once you do that then you walk your collection instead of the form's. John W. Colby www.ColbyConsulting.com On 7/23/2011 11:41 AM, Arthur Fuller wrote: > I see what you're getting at but the part I don't like about this approach > is its need to visit all the controls, when I'm concerned only about the > ones that begin with "M" followed by a number. In this case, isn't it better > to create a collection based on this naming scheme? This is just a question; > you're the class guy. > > A. From gustav at cactus.dk Sat Jul 23 11:31:51 2011 From: gustav at cactus.dk (Gustav Brock) Date: Sat, 23 Jul 2011 18:31:51 +0200 Subject: [AccessD] Max of 20 values Message-ID: Hi John and Arthur You also could loop exactly the controls in question: Set frm = Me.Form 'or a subform. For intControlM = 1 To 20 Set ctl = frm.Controls("M" & CStr(intControlM)) ' Do stuff. Next /gustav >>> jwcolby at colbyconsulting.com 23-07-2011 18:11:19 >>> I am just addressing how to find the controls not what you do with them when you find them. You could walk the collection once adding the control into a collection when it matches the name. Once you do that then you walk your collection instead of the form's. John W. Colby www.ColbyConsulting.com On 7/23/2011 11:41 AM, Arthur Fuller wrote: > I see what you're getting at but the part I don't like about this approach > is its need to visit all the controls, when I'm concerned only about the > ones that begin with "M" followed by a number. In this case, isn't it better > to create a collection based on this naming scheme? This is just a question; > you're the class guy. > > A. From fuller.artful at gmail.com Sat Jul 23 11:50:49 2011 From: fuller.artful at gmail.com (Arthur Fuller) Date: Sat, 23 Jul 2011 12:50:49 -0400 Subject: [AccessD] Max of 20 values In-Reply-To: References: Message-ID: Hmmm. I didn't know you could do that. Kewl I'll just scamper off and write a little looper thing and see if it works! Thx, A. On Sat, Jul 23, 2011 at 12:31 PM, Gustav Brock wrote: > Hi John and Arthur > > You also could loop exactly the controls in question: > > Set frm = Me.Form 'or a subform. > For intControlM = 1 To 20 > Set ctl = frm.Controls("M" & CStr(intControlM)) > ' Do stuff. > Next > > /gustav > > > From fuller.artful at gmail.com Sat Jul 23 11:55:18 2011 From: fuller.artful at gmail.com (Arthur Fuller) Date: Sat, 23 Jul 2011 12:55:18 -0400 Subject: [AccessD] report detail - conditional formatting In-Reply-To: <068301cc4952$df49e690$9dddb3b0$@winhaven.net> References: <068301cc4952$df49e690$9dddb3b0$@winhaven.net> Message-ID: I'm not sure why the conditions would apply per detail line, or even what you mean by the question, but just supposing that you are listing, say Categories, then CategoryID would define the CategoryPrice field and say it's Red if Category = 1 or Green if CategoryID = 2, and so on. I fail to see the problem here; forgive me my stupidity here. Bold should not be more difficult than colours. A, On Sat, Jul 23, 2011 at 12:09 PM, John Bartow wrote: > Is it possible to create conditional formatting per detail line in an > Access > report? > > I would like to have certain items print in bold. > > TIA > John B > > From jwcolby at colbyconsulting.com Sat Jul 23 12:32:52 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Sat, 23 Jul 2011 13:32:52 -0400 Subject: [AccessD] Max of 20 values In-Reply-To: References: Message-ID: <4E2B05C4.50903@colbyconsulting.com> Arthur, I sent you a class solution offline. The assumption was that you wanted to lock all but the currently available control and then walk through the controls allowing just the next control to become enabled. I did a little coloring since it is free. It would be possible to unlock the previous for editing if necessary. That adds additional logic and I didn't want to obscure what I am doing with that code until the specs call for it. ;) John W. Colby www.ColbyConsulting.com From BradM at blackforestltd.com Sat Jul 23 13:58:25 2011 From: BradM at blackforestltd.com (Brad Marks) Date: Sat, 23 Jul 2011 13:58:25 -0500 Subject: [AccessD] Exporting from an Access 2007 Query to Excel - DoCmd.OutputTo Versus DoCmd.TransferSpreadsheet References: <4E2AD0C9.2090307@colbyconsulting.com><4E2AD8DF.3020202@colbyconsulting.com><4E2AE337.3050705@colbyconsulting.com><4E2AEA61.2060809@colbyconsulting.com> Message-ID: All, I am curious if there are significant differences between using "DoCmd.OutputTo" Versus "DoCmd.TransferSpreadsheet" when exporting an Access 2007 Query to Excel. As I understand it, TransferSpreadsheet can handle more rows, but I was wondering if there are any other differences that should be kept in mind when choosing between these two approaches. Thanks, Brad From df.waters at comcast.net Sat Jul 23 16:22:13 2011 From: df.waters at comcast.net (Dan Waters) Date: Sat, 23 Jul 2011 16:22:13 -0500 Subject: [AccessD] Re Max of 20 values In-Reply-To: References: <001b01cc494e$1af91530$50eb3f90$@comcast.net> Message-ID: <002801cc497e$98b29890$ca17c9b0$@comcast.net> Exactly! Since you have a fixed set of controls it's write once and walk away. And you have a MaxOfVars function for future use. Null values are ignored. Good Luck! Dan -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Arthur Fuller Sent: Saturday, July 23, 2011 10:45 AM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Re Max of 20 values If I understand what you are saying, I ought to create an array consisting of M1...M29 and pass it to said function, and let the function walk through the array to determine the max value. Is that right? Thx. Arthur On Sat, Jul 23, 2011 at 11:35 AM, Dan Waters wrote: > Hi Arthur, > > I found this function in my library file. This uses a parameter array > and just loops through looking for the highest one. > > -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From rockysmolin at bchacc.com Sat Jul 23 16:30:52 2011 From: rockysmolin at bchacc.com (Rocky Smolin) Date: Sat, 23 Jul 2011 14:30:52 -0700 Subject: [AccessD] report detail - conditional formatting In-Reply-To: <068301cc4952$df49e690$9dddb3b0$@winhaven.net> References: <068301cc4952$df49e690$9dddb3b0$@winhaven.net> Message-ID: <53C8E31E1BFA4ACC8FD459D6E099DE09@HAL9007> John: I use the Detail Format event to do this. Will that work? R -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of John Bartow Sent: Saturday, July 23, 2011 9:09 AM To: DBA-Access Subject: [AccessD] report detail - conditional formatting Is it possible to create conditional formatting per detail line in an Access report? I would like to have certain items print in bold. TIA John B -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From vbacreations at gmail.com Sat Jul 23 20:27:08 2011 From: vbacreations at gmail.com (William Benson (VBACreations.Com)) Date: Sat, 23 Jul 2011 21:27:08 -0400 Subject: [AccessD] Re Max of 20 values In-Reply-To: References: <001b01cc494e$1af91530$50eb3f90$@comcast.net> Message-ID: <000d01cc49a0$ce8242a0$6b86c7e0$@gmail.com> Going back to the original inquiry. John's right, class modules are the way to go. Assumptions: Tag property on all controls which can contain a time value = "Time Values" I have an additional textbox on my form with controlsource = "= HighestValue()" -- that is a public function -- see below 'IN THE FORM'S CODE MODULE Option Compare Database Option Explicit Dim colTimeValueControls As New Collection Dim MyclsSeriesItem As clsTimeSeriesItem Private Sub Form_Load() Dim Ctrl As Control Glob_Dbl_What_Is_Current_Max = 0 Glob_Str_Which_Control_Has_Max = "" For Each Ctrl In Me.Controls If ControlIsTimeValue(Ctrl, TimeValueTag) Then Set MyclsSeriesItem = New clsTimeSeriesItem Set MyclsSeriesItem.Txt = Ctrl MyclsSeriesItem.Txt.AfterUpdate = "[Event Procedure]" colTimeValueControls.Add MyclsSeriesItem End If Next End Sub 'IN A Class Module named clsTimeSeriesItem Option Compare Database Option Explicit Public WithEvents aTxt As Access.TextBox Private Sub aTxt_AfterUpdate() Dim bTestAllControls As Boolean Dim Ctrl As Control bTestAllControls = False If IsNumeric(aTxt.Value) Then If CDbl(Nz(aTxt.Value, 0)) >= Glob_Dbl_What_Is_Current_Max Then Glob_Dbl_What_Is_Current_Max = CDbl(aTxt.Value) Glob_Str_Which_Control_Has_Max = aTxt.Name ElseIf Glob_Str_Which_Control_Has_Max <> aTxt.Name Then 'DO NOTHING, some other control has the max value anyway Else 'It is numeric, it was the max, and it no longer is as high as the max was bTestAllControls = True End If ElseIf Glob_Str_Which_Control_Has_Max = aTxt.Name Then bTestAllControls = True Else 'We don't care if it went non-numeric, it didn't hold the max value prior to now End If If bTestAllControls Then Glob_Str_Which_Control_Has_Max = "" Glob_Dbl_What_Is_Current_Max = 0 For Each Ctrl In aTxt.Parent.Controls If ControlIsTimeValue(Ctrl, TimeValueTag) Then If IsNumeric(Nz(Ctrl.Value, "")) Then If CDbl(Nz(Ctrl.Value, 0)) > Glob_Dbl_What_Is_Current_Max Then Glob_Dbl_What_Is_Current_Max = CDbl(Nz(Ctrl.Value, 0)) Glob_Str_Which_Control_Has_Max = Ctrl.Name End If End If End If Next End If For Each Ctrl In aTxt.Parent.Controls If TypeOf Ctrl Is Access.TextBox Then If Ctrl.Tag = "Max Time Value" Then Ctrl.Requery Exit For End If End If Next End Sub Public Property Set Txt(ByVal ControlThatChanged As Control) If TypeOf ControlThatChanged Is Access.TextBox Then Set aTxt = ControlThatChanged End If End Property Public Property Get Txt() As Access.TextBox If Not aTxt Is Nothing Then Set Txt = aTxt End If End Property 'IN A STANDARD MODULE Public Glob_Str_Which_Control_Has_Max As String Public Glob_Dbl_What_Is_Current_Max As Double Public Function TimeValueTag() As String TimeValueTag = "Time Values" End Function Public Function ControlIsTimeValue(Ctrl As Control, strTagToLookFor As String) As Boolean If TypeOf Ctrl Is Access.TextBox Then ControlIsTimeValue = (Ctrl.Tag = strTagToLookFor) End If End Function Public Function HighestValue() HighestValue = Glob_Dbl_What_Is_Current_Max End Function From rbgajewski at roadrunner.com Sat Jul 23 22:32:50 2011 From: rbgajewski at roadrunner.com (Bob Gajewski) Date: Sat, 23 Jul 2011 23:32:50 -0400 Subject: [AccessD] report detail - conditional formatting In-Reply-To: <068301cc4952$df49e690$9dddb3b0$@winhaven.net> References: <068301cc4952$df49e690$9dddb3b0$@winhaven.net> Message-ID: Hi John You can do just about anything with formatting in the Detail section ... Here are some examples: The "Detail_Print" code makes every other line grey ... Kind of a green-bar paper effect. The "Detail_Format" section checks the value of a field, and if it matches a set value, then a colored textbox become visible behind the other fields ... Else is remains hidden. You can control font formatting the same way ... Bold, italic, underline, etc. Regards, Bob Gajewski Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer) Const conLtGray = 13816530 If Detail.BackColor = conLtGray Then Detail.BackColor = vbWhite Else Detail.BackColor = conLtGray End If End Sub Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer) If Me.CardexStreetSide = "(intersection)" Then If Me.CardexIntersectingStreetID = 327 Then Me.txtIntersectionHighlight = "" Me.txtIntersectionHighlight.Visible = False Me.txtBridgeOverCreekHighlight = " " Me.txtBridgeOverCreekHighlight.Visible = True Else Me.txtIntersectionHighlight = " " Me.txtIntersectionHighlight.Visible = True Me.txtBridgeOverCreekHighlight = "" Me.txtBridgeOverCreekHighlight.Visible = False End If Me.SectorNumber.Visible = False Me.txtCoordinates.Visible = True Else Me.Occupant = Me.Occupant Me.txtIntersectionHighlight = "" Me.txtIntersectionHighlight.Visible = False Me.txtBridgeOverCreekHighlight = "" Me.txtBridgeOverCreekHighlight.Visible = False Me.SectorNumber.Visible = True Me.txtCoordinates.Visible = False End If End Sub -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of John Bartow Sent: Saturday, July 23, 2011 12:09 PM To: DBA-Access Subject: [AccessD] report detail - conditional formatting Is it possible to create conditional formatting per detail line in an Access report? I would like to have certain items print in bold. TIA John B -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From fuller.artful at gmail.com Sun Jul 24 01:41:21 2011 From: fuller.artful at gmail.com (Arthur Fuller) Date: Sun, 24 Jul 2011 02:41:21 -0400 Subject: [AccessD] Re Max of 20 values In-Reply-To: <000d01cc49a0$ce8242a0$6b86c7e0$@gmail.com> References: <001b01cc494e$1af91530$50eb3f90$@comcast.net> <000d01cc49a0$ce8242a0$6b86c7e0$@gmail.com> Message-ID: Thanks! A. On Sat, Jul 23, 2011 at 9:27 PM, William Benson (VBACreations.Com) < vbacreations at gmail.com> wrote: > Going back to the original inquiry. John's right, class modules are the way > to go. > > From phpons at gmail.com Sun Jul 24 03:29:30 2011 From: phpons at gmail.com (philippe pons) Date: Sun, 24 Jul 2011 10:29:30 +0200 Subject: [AccessD] 97 to 2007 Performance issue Message-ID: Dear all, I need your advice re performance issue. I recently migrated an Access 1997 application to Access 2007. It has not been possible to put the app in production at the moment. My customer put it in production the last days, and he reports a heavy reduction in terms of reactivity. Back end on a server, front end on user desktop. Did you ever run into such problems? What would be the possible causes? I get to the customer tomorrow. Thanks in advance for any help, Philippe Pons From vbacreations at gmail.com Sun Jul 24 07:16:05 2011 From: vbacreations at gmail.com (William Benson) Date: Sun, 24 Jul 2011 08:16:05 -0400 Subject: [AccessD] Re Max of 20 values In-Reply-To: References: <001b01cc494e$1af91530$50eb3f90$@comcast.net> <000d01cc49a0$ce8242a0$6b86c7e0$@gmail.com> Message-ID: Arthur... if you do try it out ... maybe you will see-- as I do-- that the textbox holding the highest value at all times seems to take about 200 or300 milliseconds to update. Though it's the same whether 5 or 100 controls (textboxes.) I feel this is slow. Too slow. I assume the Requery is taking the time... because the value in the result box goes blank for entire 200 mil. So maybe there is a better way than the function I bound it to or a faster alternative to requery. On Jul 24, 2011 2:42 AM, "Arthur Fuller" wrote: > Thanks! > > A. > > On Sat, Jul 23, 2011 at 9:27 PM, William Benson (VBACreations.Com) < > vbacreations at gmail.com> wrote: > >> Going back to the original inquiry. John's right, class modules are the way >> to go. >> >> > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com From rockysmolin at bchacc.com Sun Jul 24 09:59:52 2011 From: rockysmolin at bchacc.com (Rocky Smolin) Date: Sun, 24 Jul 2011 07:59:52 -0700 Subject: [AccessD] 97 to 2007 Performance issue In-Reply-To: References: Message-ID: I find that 2007 runs MUCH slower than 97 or 2003. That's why I still develop in 2003 - the awkward IDE aside. Why this is I don't know. I've got 2010 but haven't benchmarked it yet to see if it's any faster than 2007. Has anyone done this? Rocky -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of philippe pons Sent: Sunday, July 24, 2011 1:30 AM To: Access Developers discussion and problem solving Subject: [AccessD] 97 to 2007 Performance issue Dear all, I need your advice re performance issue. I recently migrated an Access 1997 application to Access 2007. It has not been possible to put the app in production at the moment. My customer put it in production the last days, and he reports a heavy reduction in terms of reactivity. Back end on a server, front end on user desktop. Did you ever run into such problems? What would be the possible causes? I get to the customer tomorrow. Thanks in advance for any help, Philippe Pons -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From john at winhaven.net Sun Jul 24 11:08:34 2011 From: john at winhaven.net (John Bartow) Date: Sun, 24 Jul 2011 11:08:34 -0500 Subject: [AccessD] report detail - conditional formatting In-Reply-To: References: <068301cc4952$df49e690$9dddb3b0$@winhaven.net> Message-ID: <07e201cc4a1b$f0bbbe70$d2333b50$@winhaven.net> Thanks all. I'll follow these suggestions and post back if I have any follow ups. (I've been formatting with PhP lately so I needed a thought refresher on Access Report formatting.) -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Bob Gajewski Sent: Saturday, July 23, 2011 10:33 PM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] report detail - conditional formatting Hi John You can do just about anything with formatting in the Detail section ... Here are some examples: The "Detail_Print" code makes every other line grey ... Kind of a green-bar paper effect. The "Detail_Format" section checks the value of a field, and if it matches a set value, then a colored textbox become visible behind the other fields ... Else is remains hidden. You can control font formatting the same way ... Bold, italic, underline, etc. Regards, Bob Gajewski Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer) Const conLtGray = 13816530 If Detail.BackColor = conLtGray Then Detail.BackColor = vbWhite Else Detail.BackColor = conLtGray End If End Sub Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer) If Me.CardexStreetSide = "(intersection)" Then If Me.CardexIntersectingStreetID = 327 Then Me.txtIntersectionHighlight = "" Me.txtIntersectionHighlight.Visible = False Me.txtBridgeOverCreekHighlight = " " Me.txtBridgeOverCreekHighlight.Visible = True Else Me.txtIntersectionHighlight = " " Me.txtIntersectionHighlight.Visible = True Me.txtBridgeOverCreekHighlight = "" Me.txtBridgeOverCreekHighlight.Visible = False End If Me.SectorNumber.Visible = False Me.txtCoordinates.Visible = True Else Me.Occupant = Me.Occupant Me.txtIntersectionHighlight = "" Me.txtIntersectionHighlight.Visible = False Me.txtBridgeOverCreekHighlight = "" Me.txtBridgeOverCreekHighlight.Visible = False Me.SectorNumber.Visible = True Me.txtCoordinates.Visible = False End If End Sub -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of John Bartow Sent: Saturday, July 23, 2011 12:09 PM To: DBA-Access Subject: [AccessD] report detail - conditional formatting Is it possible to create conditional formatting per detail line in an Access report? I would like to have certain items print in bold. TIA John B -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From BradM at blackforestltd.com Sun Jul 24 15:39:58 2011 From: BradM at blackforestltd.com (Brad Marks) Date: Sun, 24 Jul 2011 15:39:58 -0500 Subject: [AccessD] How to Obtain Access Report Filter information References: <068301cc4952$df49e690$9dddb3b0$@winhaven.net> <07e201cc4a1b$f0bbbe70$d2333b50$@winhaven.net> Message-ID: I am trying to build a VBA routine to obtain report filter info. The following line works nicely to obtain the filter for Report1 and store it in a variable called str_Report_Filter str_Report_Filter = Reports.Report1.Filter What I would like to do is make this "Generic" so that I can plug in a variable instead of the hardcoded "Report1" Something along these lines... Dim str_Report_Name str_Report_Name = "Report2" Is there a way to use a variable in a situation such as this? str_Report_Filter = Reports.str_report_name.Filter (I know that this doesn't work. This is just an example of what I am trying to do) I have tried many variations and tried to find an example on the internet, but have not had any luck. A simple example of how to do this would be most appreciated. Thanks for your help/advice. Brad From rlister at actuarial-files.com Sun Jul 24 15:48:16 2011 From: rlister at actuarial-files.com (Ralf Lister) Date: Sun, 24 Jul 2011 16:48:16 -0400 Subject: [AccessD] OT- Max Row Number in Excel Message-ID: <000301cc4a43$0517eca0$0f47c5e0$@com> Hello all, The max. row number of Excel 2007 is 65000 and something. Does Excel 2010 allow more rows? Saludos Ralf Lister From stuart at lexacorp.com.pg Sun Jul 24 16:10:08 2011 From: stuart at lexacorp.com.pg (Stuart McLachlan) Date: Mon, 25 Jul 2011 07:10:08 +1000 Subject: [AccessD] OT- Max Row Number in Excel In-Reply-To: <000301cc4a43$0517eca0$0f47c5e0$@com> References: <000301cc4a43$0517eca0$0f47c5e0$@com> Message-ID: <4E2C8A30.23940.33476F14@stuart.lexacorp.com.pg> No that was the maximum in 2003. Actually 65 536 ( 2^16). In 2007 they changed that to 1 048 576 (2^20). 2010 is the same. -- Stuart On 24 Jul 2011 at 16:48, Ralf Lister wrote: > Hello all, > > The max. row number of Excel 2007 is 65000 and something. > > Does Excel 2010 allow more rows? > > Saludos > Ralf Lister > > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > From stuart at lexacorp.com.pg Sun Jul 24 16:21:17 2011 From: stuart at lexacorp.com.pg (Stuart McLachlan) Date: Mon, 25 Jul 2011 07:21:17 +1000 Subject: [AccessD] How to Obtain Access Report Filter information In-Reply-To: References: <068301cc4952$df49e690$9dddb3b0$@winhaven.net>, Message-ID: <4E2C8CCD.13750.3351A37C@stuart.lexacorp.com.pg> str_Report_name = "rpt" & "1" str_Report_Filter = Reports(str_report_name).Filter But you will get an Error 2451 if the report is not open at the time. -- Stuart On 24 Jul 2011 at 15:39, Brad Marks wrote: > I am trying to build a VBA routine to obtain report filter info. > > > The following line works nicely to obtain the filter for Report1 and > store it in a variable called str_Report_Filter > > str_Report_Filter = Reports.Report1.Filter > > > > What I would like to do is make this "Generic" so that I can plug in a > variable instead of the hardcoded "Report1" > > > > Something along these lines... > > > > Dim str_Report_Name > > str_Report_Name = "Report2" > > Is there a way to use a variable in a situation such as this? > > str_Report_Filter = Reports.str_report_name.Filter > > (I know that this doesn't work. This is just an example of what I am > trying to do) > > > > I have tried many variations and tried to find an example on the > internet, but have not had any luck. > > A simple example of how to do this would be most appreciated. > > Thanks for your help/advice. > > Brad > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > From rlister at actuarial-files.com Sun Jul 24 16:26:04 2011 From: rlister at actuarial-files.com (Ralf Lister) Date: Sun, 24 Jul 2011 17:26:04 -0400 Subject: [AccessD] OT- Max Row Number in Excel In-Reply-To: <4E2C8A30.23940.33476F14@stuart.lexacorp.com.pg> References: <000301cc4a43$0517eca0$0f47c5e0$@com> <4E2C8A30.23940.33476F14@stuart.lexacorp.com.pg> Message-ID: <000401cc4a48$4cb40a30$e61c1e90$@com> Many thanks, Stuart Saludos Ralf Lister -----Mensaje original----- De: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] En nombre de Stuart McLachlan Enviado el: Domingo, 24 de Julio de 2011 05:10 p.m. Para: Access Developers discussion and problem solving Asunto: Re: [AccessD] OT- Max Row Number in Excel No that was the maximum in 2003. Actually 65 536 ( 2^16). In 2007 they changed that to 1 048 576 (2^20). 2010 is the same. -- Stuart On 24 Jul 2011 at 16:48, Ralf Lister wrote: > Hello all, > > The max. row number of Excel 2007 is 65000 and something. > > Does Excel 2010 allow more rows? > > Saludos > Ralf Lister > > > > -- > 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 ----- No virus found in this message. Checked by AVG - www.avg.com Version: 10.0.1390 / Virus Database: 1518/3785 - Release Date: 07/24/11 From BradM at blackforestltd.com Sun Jul 24 16:52:43 2011 From: BradM at blackforestltd.com (Brad Marks) Date: Sun, 24 Jul 2011 16:52:43 -0500 Subject: [AccessD] How to Obtain Access Report Filter information References: <068301cc4952$df49e690$9dddb3b0$@winhaven.net>, <4E2C8CCD.13750.3351A37C@stuart.lexacorp.com.pg> Message-ID: Stuart, Thank you for the help, I really appreciate it. Your example works nicely for what I am trying to accomplish. Brad -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Stuart McLachlan Sent: Sunday, July 24, 2011 4:21 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] How to Obtain Access Report Filter information str_Report_name = "rpt" & "1" str_Report_Filter = Reports(str_report_name).Filter But you will get an Error 2451 if the report is not open at the time. -- Stuart On 24 Jul 2011 at 15:39, Brad Marks wrote: > I am trying to build a VBA routine to obtain report filter info. > > > The following line works nicely to obtain the filter for Report1 and > store it in a variable called str_Report_Filter > > str_Report_Filter = Reports.Report1.Filter > > > > What I would like to do is make this "Generic" so that I can plug in a > variable instead of the hardcoded "Report1" > > > > Something along these lines... > > > > Dim str_Report_Name > > str_Report_Name = "Report2" > > Is there a way to use a variable in a situation such as this? > > str_Report_Filter = Reports.str_report_name.Filter > > (I know that this doesn't work. This is just an example of what I am > trying to do) > > > > I have tried many variations and tried to find an example on the > internet, but have not had any luck. > > A simple example of how to do this would be most appreciated. > > Thanks for your help/advice. > > Brad > > -- > 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 has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. From darren at activebilling.com.au Sun Jul 24 18:47:09 2011 From: darren at activebilling.com.au (Darren - Active Billing) Date: Mon, 25 Jul 2011 09:47:09 +1000 Subject: [AccessD] Max of 20 values In-Reply-To: References: Message-ID: <016f01cc4a5c$01c92d70$055b8850$@activebilling.com.au> Hi Arthur Coming in late to this so you may have already have implemented a solution. (And to be honest haven't read all the threads so I may have missed something in the posts) :-) Couple of assumptions: 1 Assuming your '20' recorded time measurements all sit in one table 2 Assuming they all have a relevant PK/Surrogate key to group each test batch of 20...eg TestBatchNo etc. Can't you just use a Domain lookup? DMAX? E.g. Have some display field bound to the following after the update of each table DMax("TimeTakenToForceShutOffField","InSomeTable","SomePK/SurrogateKeyForThi sTestBatchof20 = " & intSomeTestBatchIdenfifier & ")" Many thanks Darren -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Arthur Fuller Sent: Saturday, 23 July 2011 10:54 PM To: Access Developers discussion and problem solving Subject: [AccessD] Max of 20 values I have a form into which the user enters up to 20 values (measurements in time). They all default to zero. I'm trying to think of an elegant way to find the max value among the 20. Create an array and bubble sort it? I want to call this code on the AfterUpdate of each of these 20 controls so the control called MaxReading gets a new value if any of the 20 controls goes higher than the current MaxReading value. TIA, Arthur -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From vbacreations at gmail.com Sun Jul 24 19:50:26 2011 From: vbacreations at gmail.com (William Benson (VBACreations.Com)) Date: Sun, 24 Jul 2011 20:50:26 -0400 Subject: [AccessD] OT- Max Row Number in Excel In-Reply-To: <000301cc4a43$0517eca0$0f47c5e0$@com> References: <000301cc4a43$0517eca0$0f47c5e0$@com> Message-ID: <000c01cc4a64$d8b41f90$8a1c5eb0$@gmail.com> Excel 2003 had 65536. Excel 2007 and 2010 both allow 1,048,576. If you have opened a Excel 2007 file and see only 65,536 rows you are probably in compatibility mode, which you can turn off in the File Options (Under Save ... if you have default File Save format as .xls, then you will always be seeing 65,536 rows in a new workbook. Change that to .xlsx). -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Ralf Lister Sent: Sunday, July 24, 2011 4:48 PM To: 'Access Developers discussion and problem solving' Subject: [AccessD] OT- Max Row Number in Excel Hello all, The max. row number of Excel 2007 is 65000 and something. Does Excel 2010 allow more rows? Saludos Ralf Lister -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From vbacreations at gmail.com Sun Jul 24 21:19:46 2011 From: vbacreations at gmail.com (William Benson) Date: Sun, 24 Jul 2011 22:19:46 -0400 Subject: [AccessD] 97 to 2007 Performance issue In-Reply-To: References: Message-ID: I will add my plea for information and a means of understanding. .. I totally agree it is slower and would like to know why. Data sheet form filtering, refreshing forms, requeryng controls in particular. From stuart at lexacorp.com.pg Sun Jul 24 21:27:27 2011 From: stuart at lexacorp.com.pg (Stuart McLachlan) Date: Mon, 25 Jul 2011 12:27:27 +1000 Subject: [AccessD] 97 to 2007 Performance issue In-Reply-To: References: , , Message-ID: <4E2CD48F.17611.3469F318@stuart.lexacorp.com.pg> Short answer. It's a Microsoft product. Every new version of everything they have ever released uses more resources and takes longer to do the same thing (with the possible except of Win 7 over Vista) :-) -- Stuart On 24 Jul 2011 at 22:19, William Benson wrote: > I will add my plea for information and a means of understanding. .. I > totally agree it is slower and would like to know why. > > Data sheet form filtering, refreshing forms, requeryng controls in > particular. -- AccessD mailing list AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd Website: > http://www.databaseadvisors.com > From charlotte.foust at gmail.com Sun Jul 24 22:00:08 2011 From: charlotte.foust at gmail.com (Charlotte Foust) Date: Sun, 24 Jul 2011 20:00:08 -0700 Subject: [AccessD] 97 to 2007 Performance issue In-Reply-To: <4E2CD48F.17611.3469F318@stuart.lexacorp.com.pg> References: <4E2CD48F.17611.3469F318@stuart.lexacorp.com.pg> Message-ID: Because 2007 is fat with "end user" features for all the developer wannabes MS is aiming at. A97 was still mostly restricted on the bells and whistles to the stuff developers would want to use ... and knew how to! VBA alone has increased to a huge size in anything later than 2002. Charlotte Foust On Sun, Jul 24, 2011 at 7:27 PM, Stuart McLachlan wrote: > Short answer. It's a Microsoft product. Every new version of everything > they have ever > released uses more resources and takes longer to do the same thing (with > the possible > except of Win 7 over Vista) :-) > > -- > Stuart > > > On 24 Jul 2011 at 22:19, William Benson wrote: > > > I will add my plea for information and a means of understanding. .. I > > totally agree it is slower and would like to know why. > > > > Data sheet form filtering, refreshing forms, requeryng controls in > > particular. -- 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 phpons at gmail.com Mon Jul 25 00:56:36 2011 From: phpons at gmail.com (philippe pons) Date: Mon, 25 Jul 2011 07:56:36 +0200 Subject: [AccessD] 97 to 2007 Performance issue In-Reply-To: References: <4E2CD48F.17611.3469F318@stuart.lexacorp.com.pg> Message-ID: Charlotte, I'm not sure that new features will slow Access. The perf issue comes when the front end requires data from the back end. And to my knowledge, ODBC is the piece of software that do this data transfer. If a new version of ODBC is used by A2007, and don't see why it would be slower than any previous one. Do you think that there are any tuning options that would affect performance? Philippe Pons 2011/7/25 Charlotte Foust > Because 2007 is fat with "end user" features for all the developer wannabes > MS is aiming at. A97 was still mostly restricted on the bells and whistles > to the stuff developers would want to use ... and knew how to! VBA alone > has increased to a huge size in anything later than 2002. > > Charlotte Foust > > On Sun, Jul 24, 2011 at 7:27 PM, Stuart McLachlan >wrote: > > > Short answer. It's a Microsoft product. Every new version of everything > > they have ever > > released uses more resources and takes longer to do the same thing (with > > the possible > > except of Win 7 over Vista) :-) > > > > -- > > Stuart > > > > > > On 24 Jul 2011 at 22:19, William Benson wrote: > > > > > I will add my plea for information and a means of understanding. .. I > > > totally agree it is slower and would like to know why. > > > > > > Data sheet form filtering, refreshing forms, requeryng controls in > > > particular. -- 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 Mon Jul 25 01:33:31 2011 From: stuart at lexacorp.com.pg (Stuart McLachlan) Date: Mon, 25 Jul 2011 16:33:31 +1000 Subject: [AccessD] 97 to 2007 Performance issue In-Reply-To: References: , , Message-ID: <4E2D0E3B.11824.354B3B52@stuart.lexacorp.com.pg> Access to Access links don't use ODBC, AFAIK, they use DAO for linked tables. -- Stuart On 25 Jul 2011 at 7:56, philippe pons wrote: > Charlotte, > > I'm not sure that new features will slow Access. > The perf issue comes when the front end requires > data from the back end. > And to my knowledge, ODBC is the piece of software that > do this data transfer. > If a new version of ODBC is used by A2007, and don't see why it would > be slower than any previous one. Do you think that there are any > tuning options that would affect performance? > > Philippe Pons > > 2011/7/25 Charlotte Foust > > > Because 2007 is fat with "end user" features for all the developer > > wannabes MS is aiming at. A97 was still mostly restricted on the > > bells and whistles to the stuff developers would want to use ... and > > knew how to! VBA alone has increased to a huge size in anything > > later than 2002. > > > > Charlotte Foust > > > > On Sun, Jul 24, 2011 at 7:27 PM, Stuart McLachlan > > > >wrote: > > > > > Short answer. It's a Microsoft product. Every new version of > > > everything they have ever released uses more resources and takes > > > longer to do the same thing (with the possible except of Win 7 > > > over Vista) :-) > > > > > > -- > > > Stuart > > > > > > > > > On 24 Jul 2011 at 22:19, William Benson wrote: > > > > > > > I will add my plea for information and a means of understanding. > > > > .. I totally agree it is slower and would like to know why. > > > > > > > > Data sheet form filtering, refreshing forms, requeryng controls > > > > in particular. -- 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 phpons at gmail.com Mon Jul 25 02:22:42 2011 From: phpons at gmail.com (philippe pons) Date: Mon, 25 Jul 2011 09:22:42 +0200 Subject: [AccessD] 97 to 2007 Performance issue In-Reply-To: <4E2D0E3B.11824.354B3B52@stuart.lexacorp.com.pg> References: <4E2D0E3B.11824.354B3B52@stuart.lexacorp.com.pg> Message-ID: Stuart, You are probably right, and as DAO is optimized for Access, performance should be better than with ODBC. Philippe 2011/7/25 Stuart McLachlan > Access to Access links don't use ODBC, AFAIK, they use DAO for linked > tables. > > -- > Stuart > > On 25 Jul 2011 at 7:56, philippe pons wrote: > > > Charlotte, > > > > I'm not sure that new features will slow Access. > > The perf issue comes when the front end requires > > data from the back end. > > And to my knowledge, ODBC is the piece of software that > > do this data transfer. > > If a new version of ODBC is used by A2007, and don't see why it would > > be slower than any previous one. Do you think that there are any > > tuning options that would affect performance? > > > > Philippe Pons > > > > 2011/7/25 Charlotte Foust > > > > > Because 2007 is fat with "end user" features for all the developer > > > wannabes MS is aiming at. A97 was still mostly restricted on the > > > bells and whistles to the stuff developers would want to use ... and > > > knew how to! VBA alone has increased to a huge size in anything > > > later than 2002. > > > > > > Charlotte Foust > > > > > > On Sun, Jul 24, 2011 at 7:27 PM, Stuart McLachlan > > > > > >wrote: > > > > > > > Short answer. It's a Microsoft product. Every new version of > > > > everything they have ever released uses more resources and takes > > > > longer to do the same thing (with the possible except of Win 7 > > > > over Vista) :-) > > > > > > > > -- > > > > Stuart > > > > > > > > > > > > On 24 Jul 2011 at 22:19, William Benson wrote: > > > > > > > > > I will add my plea for information and a means of understanding. > > > > > .. I totally agree it is slower and would like to know why. > > > > > > > > > > Data sheet form filtering, refreshing forms, requeryng controls > > > > > in particular. -- 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 phpons at gmail.com Mon Jul 25 02:54:54 2011 From: phpons at gmail.com (philippe pons) Date: Mon, 25 Jul 2011 09:54:54 +0200 Subject: [AccessD] 97 to 2007 Performance issue In-Reply-To: References: <4E2D0E3B.11824.354B3B52@stuart.lexacorp.com.pg> Message-ID: I remember that some guys recommended to keep an open connection to the back end, to reduce acces time. But I guess this does not apply to linked tables, as they will use a different connection, won't they? 2011/7/25 philippe pons > Stuart, > > You are probably right, and as DAO is optimized for Access, performance > should be better than > with ODBC. > > Philippe > > > 2011/7/25 Stuart McLachlan > >> Access to Access links don't use ODBC, AFAIK, they use DAO for linked >> tables. >> >> -- >> Stuart >> >> On 25 Jul 2011 at 7:56, philippe pons wrote: >> >> > Charlotte, >> > >> > I'm not sure that new features will slow Access. >> > The perf issue comes when the front end requires >> > data from the back end. >> > And to my knowledge, ODBC is the piece of software that >> > do this data transfer. >> > If a new version of ODBC is used by A2007, and don't see why it would >> > be slower than any previous one. Do you think that there are any >> > tuning options that would affect performance? >> > >> > Philippe Pons >> > >> > 2011/7/25 Charlotte Foust >> > >> > > Because 2007 is fat with "end user" features for all the developer >> > > wannabes MS is aiming at. A97 was still mostly restricted on the >> > > bells and whistles to the stuff developers would want to use ... and >> > > knew how to! VBA alone has increased to a huge size in anything >> > > later than 2002. >> > > >> > > Charlotte Foust >> > > >> > > On Sun, Jul 24, 2011 at 7:27 PM, Stuart McLachlan >> > > > > > >wrote: >> > > >> > > > Short answer. It's a Microsoft product. Every new version of >> > > > everything they have ever released uses more resources and takes >> > > > longer to do the same thing (with the possible except of Win 7 >> > > > over Vista) :-) >> > > > >> > > > -- >> > > > Stuart >> > > > >> > > > >> > > > On 24 Jul 2011 at 22:19, William Benson wrote: >> > > > >> > > > > I will add my plea for information and a means of understanding. >> > > > > .. I totally agree it is slower and would like to know why. >> > > > > >> > > > > Data sheet form filtering, refreshing forms, requeryng controls >> > > > > in particular. -- 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 vbacreations at gmail.com Mon Jul 25 10:08:37 2011 From: vbacreations at gmail.com (William Benson (VBACreations.Com)) Date: Mon, 25 Jul 2011 11:08:37 -0400 Subject: [AccessD] Re Max of 20 values References: <001b01cc494e$1af91530$50eb3f90$@comcast.net> Message-ID: <001501cc4adc$bc17d200$34477600$@gmail.com> The below works much (MUCH) faster by not binding the max-time display textbox to a function (after looping to find it) and using requery. If you know the control's name, just put the variable's value there directly. So For Each Ctrl In aTxt.Parent.Controls If TypeOf Ctrl Is Access.TextBox Then If Ctrl.Tag = "Max Time Value" Then Ctrl.Requery Exit For End If End If Next Becomes aTxt.Parent.Controls("ShowMaxValueHere") = Glob_Dbl_What_Is_Current_Max -----Original Message----- From: William Benson (VBACreations.Com) [mailto:vbacreations at gmail.com] Sent: Saturday, July 23, 2011 9:27 PM To: Access Developers discussion and problem solving Subject: RE: [AccessD] Re Max of 20 values Going back to the original inquiry. John's right, class modules are the way to go. Assumptions: Tag property on all controls which can contain a time value = "Time Values" I have an additional textbox on my form with controlsource = "= HighestValue()" -- that is a public function -- see below 'IN THE FORM'S CODE MODULE Option Compare Database Option Explicit Dim colTimeValueControls As New Collection Dim MyclsSeriesItem As clsTimeSeriesItem Private Sub Form_Load() Dim Ctrl As Control Glob_Dbl_What_Is_Current_Max = 0 Glob_Str_Which_Control_Has_Max = "" For Each Ctrl In Me.Controls If ControlIsTimeValue(Ctrl, TimeValueTag) Then Set MyclsSeriesItem = New clsTimeSeriesItem Set MyclsSeriesItem.Txt = Ctrl MyclsSeriesItem.Txt.AfterUpdate = "[Event Procedure]" colTimeValueControls.Add MyclsSeriesItem End If Next End Sub 'IN A Class Module named clsTimeSeriesItem Option Compare Database Option Explicit Public WithEvents aTxt As Access.TextBox Private Sub aTxt_AfterUpdate() Dim bTestAllControls As Boolean Dim Ctrl As Control bTestAllControls = False If IsNumeric(aTxt.Value) Then If CDbl(Nz(aTxt.Value, 0)) >= Glob_Dbl_What_Is_Current_Max Then Glob_Dbl_What_Is_Current_Max = CDbl(aTxt.Value) Glob_Str_Which_Control_Has_Max = aTxt.Name ElseIf Glob_Str_Which_Control_Has_Max <> aTxt.Name Then 'DO NOTHING, some other control has the max value anyway Else 'It is numeric, it was the max, and it no longer is as high as the max was bTestAllControls = True End If ElseIf Glob_Str_Which_Control_Has_Max = aTxt.Name Then bTestAllControls = True Else 'We don't care if it went non-numeric, it didn't hold the max value prior to now End If If bTestAllControls Then Glob_Str_Which_Control_Has_Max = "" Glob_Dbl_What_Is_Current_Max = 0 For Each Ctrl In aTxt.Parent.Controls If ControlIsTimeValue(Ctrl, TimeValueTag) Then If IsNumeric(Nz(Ctrl.Value, "")) Then If CDbl(Nz(Ctrl.Value, 0)) > Glob_Dbl_What_Is_Current_Max Then Glob_Dbl_What_Is_Current_Max = CDbl(Nz(Ctrl.Value, 0)) Glob_Str_Which_Control_Has_Max = Ctrl.Name End If End If End If Next End If For Each Ctrl In aTxt.Parent.Controls If TypeOf Ctrl Is Access.TextBox Then If Ctrl.Tag = "Max Time Value" Then Ctrl.Requery Exit For End If End If Next End Sub Public Property Set Txt(ByVal ControlThatChanged As Control) If TypeOf ControlThatChanged Is Access.TextBox Then Set aTxt = ControlThatChanged End If End Property Public Property Get Txt() As Access.TextBox If Not aTxt Is Nothing Then Set Txt = aTxt End If End Property 'IN A STANDARD MODULE Public Glob_Str_Which_Control_Has_Max As String Public Glob_Dbl_What_Is_Current_Max As Double Public Function TimeValueTag() As String TimeValueTag = "Time Values" End Function Public Function ControlIsTimeValue(Ctrl As Control, strTagToLookFor As String) As Boolean If TypeOf Ctrl Is Access.TextBox Then ControlIsTimeValue = (Ctrl.Tag = strTagToLookFor) End If End Function Public Function HighestValue() HighestValue = Glob_Dbl_What_Is_Current_Max End Function From BradM at blackforestltd.com Mon Jul 25 12:53:42 2011 From: BradM at blackforestltd.com (Brad Marks) Date: Mon, 25 Jul 2011 12:53:42 -0500 Subject: [AccessD] Exporting Access to Excel - How to "SUM" a column with a variable number of rows? References: <001b01cc494e$1af91530$50eb3f90$@comcast.net> <001501cc4adc$bc17d200$34477600$@gmail.com> Message-ID: I am starting to do some experiments involving the creation of Excel files from Access. Let's say that I have an Access Recordset that can contain anywhere from 100 to 1,000 records. I have a little Access application that currently pushes this data into Excel. This all works nicely. What is the best way to "Sum" a column in Excel after the last record, when the number of records can vary? Thanks, Brad From Lambert.Heenan at chartisinsurance.com Mon Jul 25 13:31:06 2011 From: Lambert.Heenan at chartisinsurance.com (Heenan, Lambert) Date: Mon, 25 Jul 2011 14:31:06 -0400 Subject: [AccessD] Exporting Access to Excel - How to "SUM" a column with a variable number of rows? In-Reply-To: References: <001b01cc494e$1af91530$50eb3f90$@comcast.net> <001501cc4adc$bc17d200$34477600$@gmail.com> Message-ID: The way I do this is after exporting the results of a query to Excel I then run a Dcount() against the same query to discover how many rows were in the output data.... nRows = DCount("*", "Some_Query_Name") Then I open the Excel file with Access (i.e. I set an Excell.Application and Excel.Worksheet object) so that I can then add the formulas that I need to the row under the last row of exported data. Essentially you build the formula in a text variable like this... strFormula = "=Sum(" & Excel_Column(nCol) & nRowOffest - nRowsToSum & ":" & Excel_Column(nCol) & nRowOffest - 1 & ")" Where nRowOffest is the row number to start summing (or averaging or counting, whatever) and nRowsToSum is the number of row in the output. The function Excel_Column is used to get the right alpha prefix in the cells address... Function Excel_Column(nCol As Long) As String ' given a valid column number return the Alpha name for it ' else return an empty string If nCol > 256 Then ' Pre Excel 2007 Excel_Column = "" Else If nCol <= 26 Then Excel_Column = Chr(Asc("A") + nCol - 1) Else Dim sSecond As String sSecond = Excel_Column(nCol Mod 26) Excel_Column = Excel_Column(nCol \ 26) & sSecond End If End If End Function Then, after building the text string with the formula just plug it into the relevant cell in the workbook. After setting the Excel.Application object you then need a reference to the worksheet that needs to be update... Set Ws = xlApp.Sheets(nSheet) With Ws strCellAddress = Excel_Column(nCol) & nRowOffest strFormula = "=Sum(" & Excel_Column(nCol) & nRowOffest - nRowsToSum & ":" & Excel_Column(nCol) & nRowOffest - 1 & ")" .Cells(nRowOffest, nCol) = strFormula End With HTH Lambert -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Brad Marks Sent: Monday, July 25, 2011 1:54 PM To: Access Developers discussion and problem solving Subject: [AccessD] Exporting Access to Excel - How to "SUM" a column with a variable number of rows? I am starting to do some experiments involving the creation of Excel files from Access. Let's say that I have an Access Recordset that can contain anywhere from 100 to 1,000 records. I have a little Access application that currently pushes this data into Excel. This all works nicely. What is the best way to "Sum" a column in Excel after the last record, when the number of records can vary? Thanks, Brad -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From rlister at actuarial-files.com Mon Jul 25 13:43:00 2011 From: rlister at actuarial-files.com (Ralf Lister) Date: Mon, 25 Jul 2011 14:43:00 -0400 Subject: [AccessD] OT- Max Row Number in Excel In-Reply-To: <000c01cc4a64$d8b41f90$8a1c5eb0$@gmail.com> References: <000301cc4a43$0517eca0$0f47c5e0$@com> <000c01cc4a64$d8b41f90$8a1c5eb0$@gmail.com> Message-ID: <000601cc4afa$affc03b0$0ff40b10$@com> Thanks, William. Saludos Ralf Lister -----Mensaje original----- De: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] En nombre de William Benson (VBACreations.Com) Enviado el: Domingo, 24 de Julio de 2011 08:50 p.m. Para: 'Access Developers discussion and problem solving' Asunto: Re: [AccessD] OT- Max Row Number in Excel Excel 2003 had 65536. Excel 2007 and 2010 both allow 1,048,576. If you have opened a Excel 2007 file and see only 65,536 rows you are probably in compatibility mode, which you can turn off in the File Options (Under Save ... if you have default File Save format as .xls, then you will always be seeing 65,536 rows in a new workbook. Change that to .xlsx). -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Ralf Lister Sent: Sunday, July 24, 2011 4:48 PM To: 'Access Developers discussion and problem solving' Subject: [AccessD] OT- Max Row Number in Excel Hello all, The max. row number of Excel 2007 is 65000 and something. Does Excel 2010 allow more rows? Saludos Ralf Lister -- 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 ----- No virus found in this message. Checked by AVG - www.avg.com Version: 10.0.1390 / Virus Database: 1518/3786 - Release Date: 07/24/11 From vbacreations at gmail.com Mon Jul 25 13:50:36 2011 From: vbacreations at gmail.com (William Benson (VBACreations.Com)) Date: Mon, 25 Jul 2011 14:50:36 -0400 Subject: [AccessD] Exporting Access to Excel - How to "SUM" a column with a variable number of rows? In-Reply-To: References: <001b01cc494e$1af91530$50eb3f90$@comcast.net> <001501cc4adc$bc17d200$34477600$@gmail.com> Message-ID: <002001cc4afb$be7a3af0$3b6eb0d0$@gmail.com> Brad, Excel is VERY powerful, and VERY fast. So whenever possible, use what Excel already has, when automating. To sum all the values in a column in Excel, assuming you have hooks to the xl application object and a worksheet: Function TestFunction () Dim xl As Excel.Application Set xl = GetXL With GetXL MsgBox .Sum(.ActiveWorkbook.ActiveSheet.Columns(1)) End With End TestFunction Function GetXL() As Excel.Application On Error Resume Next Set GetXL = GetObject(, "Excel.Application") If GetXL Is Nothing Then Set GetXL = CreateObject("Excel.Application") GetXL.Visible = True End If exit_me: End Function -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Brad Marks Sent: Monday, July 25, 2011 1:54 PM To: Access Developers discussion and problem solving Subject: [AccessD] Exporting Access to Excel - How to "SUM" a column with a variable number of rows? I am starting to do some experiments involving the creation of Excel files from Access. Let's say that I have an Access Recordset that can contain anywhere from 100 to 1,000 records. I have a little Access application that currently pushes this data into Excel. This all works nicely. What is the best way to "Sum" a column in Excel after the last record, when the number of records can vary? Thanks, Brad -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From vbacreations at gmail.com Mon Jul 25 13:52:04 2011 From: vbacreations at gmail.com (William Benson (VBACreations.Com)) Date: Mon, 25 Jul 2011 14:52:04 -0400 Subject: [AccessD] Exporting Access to Excel - How to "SUM" a column with a variable number of rows? References: <001b01cc494e$1af91530$50eb3f90$@comcast.net> <001501cc4adc$bc17d200$34477600$@gmail.com> Message-ID: <002101cc4afb$f2e7dc70$d8b79550$@gmail.com> Oops, I threw the function GetXL in as a bonus without removing xl variable. Function TestFunction () With GetXL MsgBox .Sum(.ActiveWorkbook.ActiveSheet.Columns(1)) End With End TestFunction Function GetXL() As Excel.Application On Error Resume Next Set GetXL = GetObject(, "Excel.Application") If GetXL Is Nothing Then Set GetXL = CreateObject("Excel.Application") GetXL.Visible = True End If exit_me: End Function From jwcolby at colbyconsulting.com Mon Jul 25 13:57:36 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Mon, 25 Jul 2011 14:57:36 -0400 Subject: [AccessD] Link odbc tables in Access Message-ID: <4E2DBCA0.6050603@colbyconsulting.com> When I link to SQL Server from Access using a DSN file, I end up with my tables displayed but also about a billion (sorry, I didn't count) tables that start with INFORMATION_SCHEMA_.xyz. At this time I have no use for those tables and would like to filter them out so that I cannot see them. Does anyone know how to do that? -- John W. Colby www.ColbyConsulting.com From BradM at blackforestltd.com Mon Jul 25 15:51:59 2011 From: BradM at blackforestltd.com (Brad Marks) Date: Mon, 25 Jul 2011 15:51:59 -0500 Subject: [AccessD] Exporting Access to Excel - How to "SUM" a column with a variable number of rows? References: <001b01cc494e$1af91530$50eb3f90$@comcast.net><001501cc4adc$bc17d200$34477600$@gmail.com> Message-ID: William and Lambert, Thanks for the help, I appreciate it. One of the things that I often struggle with is that there is often more than one way to accomplish a task. Before I start to build something big, I like to understand the options and also understand the "Best" way to get something done. Thanks Again, Brad -----Original Message----- From: accessd-bounces at databaseadvisors.com on behalf of Heenan, Lambert Sent: Mon 7/25/2011 1:31 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Exporting Access to Excel - How to "SUM" a column with a variable number of rows? The way I do this is after exporting the results of a query to Excel I then run a Dcount() against the same query to discover how many rows were in the output data.... nRows = DCount("*", "Some_Query_Name") Then I open the Excel file with Access (i.e. I set an Excell.Application and Excel.Worksheet object) so that I can then add the formulas that I need to the row under the last row of exported data. Essentially you build the formula in a text variable like this... strFormula = "=Sum(" & Excel_Column(nCol) & nRowOffest - nRowsToSum & ":" & Excel_Column(nCol) & nRowOffest - 1 & ")" Where nRowOffest is the row number to start summing (or averaging or counting, whatever) and nRowsToSum is the number of row in the output. The function Excel_Column is used to get the right alpha prefix in the cells address... Function Excel_Column(nCol As Long) As String ' given a valid column number return the Alpha name for it ' else return an empty string If nCol > 256 Then ' Pre Excel 2007 Excel_Column = "" Else If nCol <= 26 Then Excel_Column = Chr(Asc("A") + nCol - 1) Else Dim sSecond As String sSecond = Excel_Column(nCol Mod 26) Excel_Column = Excel_Column(nCol \ 26) & sSecond End If End If End Function Then, after building the text string with the formula just plug it into the relevant cell in the workbook. After setting the Excel.Application object you then need a reference to the worksheet that needs to be update... Set Ws = xlApp.Sheets(nSheet) With Ws strCellAddress = Excel_Column(nCol) & nRowOffest strFormula = "=Sum(" & Excel_Column(nCol) & nRowOffest - nRowsToSum & ":" & Excel_Column(nCol) & nRowOffest - 1 & ")" .Cells(nRowOffest, nCol) = strFormula End With HTH Lambert -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Brad Marks Sent: Monday, July 25, 2011 1:54 PM To: Access Developers discussion and problem solving Subject: [AccessD] Exporting Access to Excel - How to "SUM" a column with a variable number of rows? I am starting to do some experiments involving the creation of Excel files from Access. Let's say that I have an Access Recordset that can contain anywhere from 100 to 1,000 records. I have a little Access application that currently pushes this data into Excel. This all works nicely. What is the best way to "Sum" a column in Excel after the last record, when the number of records can vary? Thanks, Brad -- 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 has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. From marksimms at verizon.net Mon Jul 25 19:02:42 2011 From: marksimms at verizon.net (Mark Simms) Date: Mon, 25 Jul 2011 20:02:42 -0400 Subject: [AccessD] Exporting Access to Excel - How to "SUM" a column with a variable number of rows? In-Reply-To: References: <001b01cc494e$1af91530$50eb3f90$@comcast.net><001501cc4adc$bc17d200$34477600$@gmail.com> Message-ID: <016b01cc4b27$57c8ffe0$075affa0$@net> What you need to decide is: dynamic vs. static. If the data is not going to change, then try this: Sub AddTotals Dim rngCol as Range With Activesheet.UsedRange For Each rngCol in .Columns rngCol.Cells(.rows.Count+1) = Application.Sum(rngCol) Next End With End Sub Of course this assumes the starting row is #1. > -----Original Message----- > From: accessd-bounces at databaseadvisors.com [mailto:accessd- > bounces at databaseadvisors.com] On Behalf Of Brad Marks > Sent: Monday, July 25, 2011 4:52 PM > To: Access Developers discussion and problem solving > Subject: Re: [AccessD] Exporting Access to Excel - How to "SUM" a > column with a variable number of rows? > > William and Lambert, > > Thanks for the help, I appreciate it. > > One of the things that I often struggle with is that there is often > more than one way to accomplish a task. Before I start to build > something big, I like to understand the options and also understand the > "Best" way to get something done. > > Thanks Again, > Brad > > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com on behalf of Heenan, Lambert > Sent: Mon 7/25/2011 1:31 PM > To: Access Developers discussion and problem solving > Subject: Re: [AccessD] Exporting Access to Excel - How to "SUM" a > column with a variable number of rows? > > The way I do this is after exporting the results of a query to Excel I > then run a Dcount() against the same query to discover how many rows > were in the output data.... > > nRows = DCount("*", "Some_Query_Name") > > Then I open the Excel file with Access (i.e. I set an > Excell.Application and Excel.Worksheet object) so that I can then add > the formulas that I need to the row under the last row of exported > data. > > Essentially you build the formula in a text variable like this... > > strFormula = "=Sum(" & Excel_Column(nCol) & nRowOffest - nRowsToSum & > ":" & Excel_Column(nCol) & nRowOffest - 1 & ")" > > Where nRowOffest is the row number to start summing (or averaging or > counting, whatever) and nRowsToSum is the number of row in the output. > The function Excel_Column is used to get the right alpha prefix in the > cells address... > > Function Excel_Column(nCol As Long) As String ' given a valid column > number return the Alpha name for it ' else return an empty string > If nCol > 256 Then ' Pre Excel 2007 > Excel_Column = "" > Else > If nCol <= 26 Then > Excel_Column = Chr(Asc("A") + nCol - 1) > Else > Dim sSecond As String > sSecond = Excel_Column(nCol Mod 26) > Excel_Column = Excel_Column(nCol \ 26) & sSecond > End If > End If > End Function > > Then, after building the text string with the formula just plug it into > the relevant cell in the workbook. > > After setting the Excel.Application object you then need a reference to > the worksheet that needs to be update... > > Set Ws = xlApp.Sheets(nSheet) > With Ws > strCellAddress = Excel_Column(nCol) & nRowOffest > strFormula = "=Sum(" & Excel_Column(nCol) & nRowOffest - > nRowsToSum & ":" & Excel_Column(nCol) & nRowOffest - 1 & ")" > .Cells(nRowOffest, nCol) = strFormula > End With > > > HTH > > Lambert > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com [mailto:accessd- > bounces at databaseadvisors.com] On Behalf Of Brad Marks > Sent: Monday, July 25, 2011 1:54 PM > To: Access Developers discussion and problem solving > Subject: [AccessD] Exporting Access to Excel - How to "SUM" a column > with a variable number of rows? > > I am starting to do some experiments involving the creation of Excel > files from Access. > > Let's say that I have an Access Recordset that can contain anywhere > from 100 to 1,000 records. > > I have a little Access application that currently pushes this data into > Excel. This all works nicely. > > What is the best way to "Sum" a column in Excel after the last record, > when the number of records can vary? > > Thanks, > Brad > > -- > 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 has been scanned for viruses and dangerous content by > MailScanner, and is believed to be clean. > > From jeff.developer at gmail.com Tue Jul 26 10:10:45 2011 From: jeff.developer at gmail.com (Jeff B) Date: Tue, 26 Jul 2011 10:10:45 -0500 Subject: [AccessD] Recall: [cross posted] SharePoint 2010 question(s) Message-ID: Jeff B would like to recall the message, "[cross posted] SharePoint 2010 question(s)". From jeff.developer at gmail.com Tue Jul 26 10:11:13 2011 From: jeff.developer at gmail.com (Jeff B) Date: Tue, 26 Jul 2011 10:11:13 -0500 Subject: [AccessD] [cross posted] SharePoint 2010 question(s) Message-ID: I really need to know what you all suggest as the BEST book(s) for learning SharePoint 2010, Access Services, and publishing Access databases to SharePoint. Jeff Barrows MCP, MCAD, MCSD ? Outbak Technologies, LLC Racine, WI jeff.developer at gmail.com From marksimms at verizon.net Tue Jul 26 10:20:21 2011 From: marksimms at verizon.net (Mark Simms) Date: Tue, 26 Jul 2011 11:20:21 -0400 Subject: [AccessD] Exporting Access to Excel - How to "SUM" a column with a variable number of rows? In-Reply-To: <000001cc4b2f$c64b1fe0$52e15fa0$@gmail.com> References: <001b01cc494e$1af91530$50eb3f90$@comcast.net><001501cc4adc$bc17d200$34477600$@gmail.com> <016b01cc4b27$57c8ffe0$075affa0$@net> <000001cc4b2f$c64b1fe0$52e15fa0$@gmail.com> Message-ID: <026e01cc4ba7$8a000320$9e000960$@net> Bill - look again. I am only looping thru EACH COLUMN...and I AM using Application.SUM. I just came from an investment bank where some workbooks would take 20 to 40 MINUTES to complete. Reason: formula-based SUMS, VLOOKUPS, and SUMIFS. VLOOKUPs themselves were horribly inefficient. Even MATCH replacements did not improve performance. When replaced with VBA "static" counterparts, the calc time would decrease 90% in many cases. > -----Original Message----- > From: William Benson (VBACreations.Com) [mailto:vbacreations at gmail.com] > Sent: Monday, July 25, 2011 9:03 PM > To: 'Mark Simms' > Subject: FW: [AccessD] Exporting Access to Excel - How to "SUM" a > column with a variable number of rows? > > Mark, > > I have programmed in Excel for about 8 years and would not recommend > this > approach, but did not want to say so on the ListServ. Perhaps there is > a > reason you would loop through each cell to build a sum instead of using > Excel's marvelous (and instantaneous!) SUM worksheetfunction -- > available to > the application object? > > If you are looping through cells for the purpose of examining them > prior to > adding them, I don't say that is a bad idea - but for a standard > summation, > you would want to use Application.SUM. > > Warm regards, > > Bill > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Mark Simms > Sent: Monday, July 25, 2011 8:03 PM > To: 'Access Developers discussion and problem solving' > Subject: Re: [AccessD] Exporting Access to Excel - How to "SUM" a > column > with a variable number of rows? > > What you need to decide is: dynamic vs. static. > If the data is not going to change, then try this: > > Sub AddTotals > > Dim rngCol as Range > > With Activesheet.UsedRange > > For Each rngCol in .Columns > rngCol.Cells(.rows.Count+1) = Application.Sum(rngCol) > Next > > End With > > End Sub > > Of course this assumes the starting row is #1. > > > -----Original Message----- > > From: accessd-bounces at databaseadvisors.com [mailto:accessd- > > bounces at databaseadvisors.com] On Behalf Of Brad Marks > > Sent: Monday, July 25, 2011 4:52 PM > > To: Access Developers discussion and problem solving > > Subject: Re: [AccessD] Exporting Access to Excel - How to "SUM" a > > column with a variable number of rows? > > > > William and Lambert, > > > > Thanks for the help, I appreciate it. > > > > One of the things that I often struggle with is that there is often > > more than one way to accomplish a task. Before I start to build > > something big, I like to understand the options and also understand > the > > "Best" way to get something done. > > > > Thanks Again, > > Brad > > > > > > -----Original Message----- > > From: accessd-bounces at databaseadvisors.com on behalf of Heenan, > Lambert > > Sent: Mon 7/25/2011 1:31 PM > > To: Access Developers discussion and problem solving > > Subject: Re: [AccessD] Exporting Access to Excel - How to "SUM" a > > column with a variable number of rows? > > > > The way I do this is after exporting the results of a query to Excel > I > > then run a Dcount() against the same query to discover how many rows > > were in the output data.... > > > > nRows = DCount("*", "Some_Query_Name") > > > > Then I open the Excel file with Access (i.e. I set an > > Excell.Application and Excel.Worksheet object) so that I can then add > > the formulas that I need to the row under the last row of exported > > data. > > > > Essentially you build the formula in a text variable like this... > > > > strFormula = "=Sum(" & Excel_Column(nCol) & nRowOffest - nRowsToSum & > > ":" & Excel_Column(nCol) & nRowOffest - 1 & ")" > > > > Where nRowOffest is the row number to start summing (or averaging or > > counting, whatever) and nRowsToSum is the number of row in the > output. > > The function Excel_Column is used to get the right alpha prefix in > the > > cells address... > > > > Function Excel_Column(nCol As Long) As String ' given a valid column > > number return the Alpha name for it ' else return an empty string > > If nCol > 256 Then ' Pre Excel 2007 > > Excel_Column = "" > > Else > > If nCol <= 26 Then > > Excel_Column = Chr(Asc("A") + nCol - 1) > > Else > > Dim sSecond As String > > sSecond = Excel_Column(nCol Mod 26) > > Excel_Column = Excel_Column(nCol \ 26) & sSecond > > End If > > End If > > End Function > > > > Then, after building the text string with the formula just plug it > into > > the relevant cell in the workbook. > > > > After setting the Excel.Application object you then need a reference > to > > the worksheet that needs to be update... > > > > Set Ws = xlApp.Sheets(nSheet) > > With Ws > > strCellAddress = Excel_Column(nCol) & nRowOffest > > strFormula = "=Sum(" & Excel_Column(nCol) & nRowOffest - > > nRowsToSum & ":" & Excel_Column(nCol) & nRowOffest - 1 & ")" > > .Cells(nRowOffest, nCol) = strFormula > > End With > > > > > > HTH > > > > Lambert > > > > -----Original Message----- > > From: accessd-bounces at databaseadvisors.com [mailto:accessd- > > bounces at databaseadvisors.com] On Behalf Of Brad Marks > > Sent: Monday, July 25, 2011 1:54 PM > > To: Access Developers discussion and problem solving > > Subject: [AccessD] Exporting Access to Excel - How to "SUM" a column > > with a variable number of rows? > > > > I am starting to do some experiments involving the creation of Excel > > files from Access. > > > > Let's say that I have an Access Recordset that can contain anywhere > > from 100 to 1,000 records. > > > > I have a little Access application that currently pushes this data > into > > Excel. This all works nicely. > > > > What is the best way to "Sum" a column in Excel after the last > record, > > when the number of records can vary? > > > > Thanks, > > Brad > > > > -- > > 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 has been scanned for viruses and dangerous content by > > MailScanner, and is believed to be clean. > > > > > > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com From BradM at blackforestltd.com Tue Jul 26 15:39:32 2011 From: BradM at blackforestltd.com (Brad Marks) Date: Tue, 26 Jul 2011 15:39:32 -0500 Subject: [AccessD] Exporting Access to Excel - How to "SUM" a column with a variable number of rows? References: <001b01cc494e$1af91530$50eb3f90$@comcast.net><001501cc4adc$bc17d200$34477600$@gmail.com> <016b01cc4b27$57c8ffe0$075affa0$@net> Message-ID: Mark, Thanks for the help, I appreciate it. The sample code that you posted works nicely. Each column is summed. I do have one question, however. How can I prevent select columns from being summed in case they contain data that should not be summed? Thanks, Brad -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Mark Simms Sent: Monday, July 25, 2011 7:03 PM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Exporting Access to Excel - How to "SUM" acolumn with a variable number of rows? What you need to decide is: dynamic vs. static. If the data is not going to change, then try this: Sub AddTotals Dim rngCol as Range With Activesheet.UsedRange For Each rngCol in .Columns rngCol.Cells(.rows.Count+1) = Application.Sum(rngCol) Next End With End Sub Of course this assumes the starting row is #1. > -----Original Message----- > From: accessd-bounces at databaseadvisors.com [mailto:accessd- > bounces at databaseadvisors.com] On Behalf Of Brad Marks > Sent: Monday, July 25, 2011 4:52 PM > To: Access Developers discussion and problem solving > Subject: Re: [AccessD] Exporting Access to Excel - How to "SUM" a > column with a variable number of rows? > > William and Lambert, > > Thanks for the help, I appreciate it. > > One of the things that I often struggle with is that there is often > more than one way to accomplish a task. Before I start to build > something big, I like to understand the options and also understand the > "Best" way to get something done. > > Thanks Again, > Brad > > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com on behalf of Heenan, Lambert > Sent: Mon 7/25/2011 1:31 PM > To: Access Developers discussion and problem solving > Subject: Re: [AccessD] Exporting Access to Excel - How to "SUM" a > column with a variable number of rows? > > The way I do this is after exporting the results of a query to Excel I > then run a Dcount() against the same query to discover how many rows > were in the output data.... > > nRows = DCount("*", "Some_Query_Name") > > Then I open the Excel file with Access (i.e. I set an > Excell.Application and Excel.Worksheet object) so that I can then add > the formulas that I need to the row under the last row of exported > data. > > Essentially you build the formula in a text variable like this... > > strFormula = "=Sum(" & Excel_Column(nCol) & nRowOffest - nRowsToSum & > ":" & Excel_Column(nCol) & nRowOffest - 1 & ")" > > Where nRowOffest is the row number to start summing (or averaging or > counting, whatever) and nRowsToSum is the number of row in the output. > The function Excel_Column is used to get the right alpha prefix in the > cells address... > > Function Excel_Column(nCol As Long) As String ' given a valid column > number return the Alpha name for it ' else return an empty string > If nCol > 256 Then ' Pre Excel 2007 > Excel_Column = "" > Else > If nCol <= 26 Then > Excel_Column = Chr(Asc("A") + nCol - 1) > Else > Dim sSecond As String > sSecond = Excel_Column(nCol Mod 26) > Excel_Column = Excel_Column(nCol \ 26) & sSecond > End If > End If > End Function > > Then, after building the text string with the formula just plug it into > the relevant cell in the workbook. > > After setting the Excel.Application object you then need a reference to > the worksheet that needs to be update... > > Set Ws = xlApp.Sheets(nSheet) > With Ws > strCellAddress = Excel_Column(nCol) & nRowOffest > strFormula = "=Sum(" & Excel_Column(nCol) & nRowOffest - > nRowsToSum & ":" & Excel_Column(nCol) & nRowOffest - 1 & ")" > .Cells(nRowOffest, nCol) = strFormula > End With > > > HTH > > Lambert > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com [mailto:accessd- > bounces at databaseadvisors.com] On Behalf Of Brad Marks > Sent: Monday, July 25, 2011 1:54 PM > To: Access Developers discussion and problem solving > Subject: [AccessD] Exporting Access to Excel - How to "SUM" a column > with a variable number of rows? > > I am starting to do some experiments involving the creation of Excel > files from Access. > > Let's say that I have an Access Recordset that can contain anywhere > from 100 to 1,000 records. > > I have a little Access application that currently pushes this data into > Excel. This all works nicely. > > What is the best way to "Sum" a column in Excel after the last record, > when the number of records can vary? > > Thanks, > Brad > > -- > 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 has been scanned for viruses and dangerous content by > MailScanner, and is believed to be clean. > > -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. From rockysmolin at bchacc.com Tue Jul 26 16:55:13 2011 From: rockysmolin at bchacc.com (Rocky Smolin) Date: Tue, 26 Jul 2011 14:55:13 -0700 Subject: [AccessD] A2003 stops working Message-ID: <8FDCFF410EE948FCAECD101A7CBAE855@HAL9007> Dear List: Running Access 2003 SP3 on a 64bit W7 OS machine. From time to time it stops with a message "Access has stopped working." I am getting it now consistently on one form on an app when deleting a record (DoCmd.RunCommand acCmdDeleteRecord). I have Office 2010 loaded on this machine as well. Anyone have this happen? Any cure? MTIA Rocky Smolin Beach Access Software 858-259-4334 www.bchacc.com www.e-z-mrp.com From rockysmolin at bchacc.com Tue Jul 26 17:02:27 2011 From: rockysmolin at bchacc.com (Rocky Smolin) Date: Tue, 26 Jul 2011 15:02:27 -0700 Subject: [AccessD] A2003 stops working In-Reply-To: <8FDCFF410EE948FCAECD101A7CBAE855@HAL9007> References: <8FDCFF410EE948FCAECD101A7CBAE855@HAL9007> Message-ID: <814A51A1F63345E980C150E6E55B65EA@HAL9007> I just uninstalled O2010 - no effect - still craps out on the delete. R -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Rocky Smolin Sent: Tuesday, July 26, 2011 2:55 PM To: accessd at databaseadvisors.com Subject: [AccessD] A2003 stops working Dear List: Running Access 2003 SP3 on a 64bit W7 OS machine. From time to time it stops with a message "Access has stopped working." I am getting it now consistently on one form on an app when deleting a record (DoCmd.RunCommand acCmdDeleteRecord). I have Office 2010 loaded on this machine as well. Anyone have this happen? Any cure? MTIA Rocky Smolin Beach Access Software 858-259-4334 www.bchacc.com www.e-z-mrp.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From dbdoug at gmail.com Tue Jul 26 18:21:47 2011 From: dbdoug at gmail.com (Doug Steele) Date: Tue, 26 Jul 2011 16:21:47 -0700 Subject: [AccessD] A2003 stops working In-Reply-To: <814A51A1F63345E980C150E6E55B65EA@HAL9007> References: <8FDCFF410EE948FCAECD101A7CBAE855@HAL9007> <814A51A1F63345E980C150E6E55B65EA@HAL9007> Message-ID: Have you tried swinging a lizard around your head three times? I have had these mystery fails, and my general approach (stopping if/when I have success) is: 1. Force a compile. 2. Decompile/recompile. 3. Build an empty database and import all objects from the old database. 4. Delete the form and rebuild it from scratch. 5. Rework the code. In this case, open a dao recordset, find the record and delete it with Recordset.Delete. 6. Tear my hair out. I'm quite bald now. Doug On Tue, Jul 26, 2011 at 3:02 PM, Rocky Smolin wrote: > I just uninstalled O2010 ?- no effect - still craps out on the delete. > > > R > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Rocky Smolin > Sent: Tuesday, July 26, 2011 2:55 PM > To: accessd at databaseadvisors.com > Subject: [AccessD] A2003 stops working > > Dear List: > > Running Access 2003 SP3 on a 64bit W7 OS machine. ?From time to time it > stops with a message "Access has stopped working." > > I am getting it now consistently on one form on an app when deleting a > record (DoCmd.RunCommand acCmdDeleteRecord). > > I have Office 2010 loaded on this machine as well. > > Anyone have this happen? ?Any cure? > > MTIA > > Rocky Smolin > Beach Access Software > 858-259-4334 > www.bchacc.com www.e-z-mrp.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 bill_patten at embarqmail.com Tue Jul 26 19:03:26 2011 From: bill_patten at embarqmail.com (Bill Patten) Date: Tue, 26 Jul 2011 17:03:26 -0700 Subject: [AccessD] A2003 stops working In-Reply-To: <8FDCFF410EE948FCAECD101A7CBAE855@HAL9007> References: <8FDCFF410EE948FCAECD101A7CBAE855@HAL9007> Message-ID: <85943A5EECAC45039D1BAD282EB2A938@BPCS> Rocky, I had a similar problem back in 2009 when I would try to add a control to a form, it would crash. If it maters I had the problem in 2 applications and they were both ADP's In my case if I exported the form to text and opened it in notepad I found a ton of "UnknownProp(## ending in END" If you export the subject form to text and open it up and see the "UnknownProp items then you are experiencing the same problem I had. I wrote a routine to remove the bad lines and all was well. I had lots of them in the project so used a routine that exported each form to text, opened it removed all the lines and put it back. I always believed the problem was caused by opening it in 2007 then reopening it in 2003. I try not to do that anymore. HTH Bill -------------------------------------------------- From: "Rocky Smolin" Sent: Tuesday, July 26, 2011 2:55 PM To: Subject: [AccessD] A2003 stops working Dear List: Running Access 2003 SP3 on a 64bit W7 OS machine. From time to time it stops with a message "Access has stopped working." I am getting it now consistently on one form on an app when deleting a record (DoCmd.RunCommand acCmdDeleteRecord). I have Office 2010 loaded on this machine as well. Anyone have this happen? Any cure? MTIA Rocky Smolin Beach Access Software 858-259-4334 www.bchacc.com www.e-z-mrp.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From marksimms at verizon.net Tue Jul 26 19:16:35 2011 From: marksimms at verizon.net (Mark Simms) Date: Tue, 26 Jul 2011 20:16:35 -0400 Subject: [AccessD] [cross posted] SharePoint 2010 question(s) In-Reply-To: References: Message-ID: <00ab01cc4bf2$72da9c00$588fd400$@net> Jeff - there is a special website devoted to that topic......and it's not Microsoft's....natch. Access Services remains fairly cloaked in secrecy.... > -----Original Message----- > From: accessd-bounces at databaseadvisors.com [mailto:accessd- > bounces at databaseadvisors.com] On Behalf Of Jeff B > Sent: Tuesday, July 26, 2011 11:11 AM > To: Dba-Tech; dba-OT; AccessD > Subject: [AccessD] [cross posted] SharePoint 2010 question(s) > > I really need to know what you all suggest as the BEST book(s) for > learning > SharePoint 2010, Access Services, and publishing Access databases to > SharePoint. > > > Jeff Barrows > MCP, MCAD, MCSD > > Outbak Technologies, LLC > Racine, WI > jeff.developer at gmail.com > > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com From marksimms at verizon.net Tue Jul 26 19:39:40 2011 From: marksimms at verizon.net (Mark Simms) Date: Tue, 26 Jul 2011 20:39:40 -0400 Subject: [AccessD] Exporting Access to Excel - How to "SUM" a column with a variable number of rows? In-Reply-To: References: <001b01cc494e$1af91530$50eb3f90$@comcast.net><001501cc4adc$bc17d200$34477600$@gmail.com> <016b01cc4b27$57c8ffe0$075affa0$@net> Message-ID: <00ac01cc4bf5$ae236e10$0a6a4a30$@net> Simple. Add a paramarray variant parameter to the procedure and pass it the column numbers or column letters that should be ignored. The only other way is to first test the column using Application.Sum. If the result is non-zero, then it is LIKELY a numeric column. Caveat: all zeros in a column will fail the test ! > -----Original Message----- > From: accessd-bounces at databaseadvisors.com [mailto:accessd- > bounces at databaseadvisors.com] On Behalf Of Brad Marks > Sent: Tuesday, July 26, 2011 4:40 PM > To: Access Developers discussion and problem solving > Subject: Re: [AccessD] Exporting Access to Excel - How to "SUM" a > column with a variable number of rows? > > Mark, > > Thanks for the help, I appreciate it. > > The sample code that you posted works nicely. Each column is summed. > > I do have one question, however. > > How can I prevent select columns from being summed in case they contain > data that should not be summed? > > Thanks, > Brad > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Mark Simms > Sent: Monday, July 25, 2011 7:03 PM > To: 'Access Developers discussion and problem solving' > Subject: Re: [AccessD] Exporting Access to Excel - How to "SUM" acolumn > with a variable number of rows? > > What you need to decide is: dynamic vs. static. > If the data is not going to change, then try this: > > Sub AddTotals > > Dim rngCol as Range > > With Activesheet.UsedRange > > For Each rngCol in .Columns > rngCol.Cells(.rows.Count+1) = Application.Sum(rngCol) > Next > > End With > > End Sub > > Of course this assumes the starting row is #1. > > > -----Original Message----- > > From: accessd-bounces at databaseadvisors.com [mailto:accessd- > > bounces at databaseadvisors.com] On Behalf Of Brad Marks > > Sent: Monday, July 25, 2011 4:52 PM > > To: Access Developers discussion and problem solving > > Subject: Re: [AccessD] Exporting Access to Excel - How to "SUM" a > > column with a variable number of rows? > > > > William and Lambert, > > > > Thanks for the help, I appreciate it. > > > > One of the things that I often struggle with is that there is often > > more than one way to accomplish a task. Before I start to build > > something big, I like to understand the options and also understand > the > > "Best" way to get something done. > > > > Thanks Again, > > Brad > > > > > > -----Original Message----- > > From: accessd-bounces at databaseadvisors.com on behalf of Heenan, > Lambert > > Sent: Mon 7/25/2011 1:31 PM > > To: Access Developers discussion and problem solving > > Subject: Re: [AccessD] Exporting Access to Excel - How to "SUM" a > > column with a variable number of rows? > > > > The way I do this is after exporting the results of a query to Excel > I > > then run a Dcount() against the same query to discover how many rows > > were in the output data.... > > > > nRows = DCount("*", "Some_Query_Name") > > > > Then I open the Excel file with Access (i.e. I set an > > Excell.Application and Excel.Worksheet object) so that I can then add > > the formulas that I need to the row under the last row of exported > > data. > > > > Essentially you build the formula in a text variable like this... > > > > strFormula = "=Sum(" & Excel_Column(nCol) & nRowOffest - nRowsToSum & > > ":" & Excel_Column(nCol) & nRowOffest - 1 & ")" > > > > Where nRowOffest is the row number to start summing (or averaging or > > counting, whatever) and nRowsToSum is the number of row in the > output. > > The function Excel_Column is used to get the right alpha prefix in > the > > cells address... > > > > Function Excel_Column(nCol As Long) As String ' given a valid column > > number return the Alpha name for it ' else return an empty string > > If nCol > 256 Then ' Pre Excel 2007 > > Excel_Column = "" > > Else > > If nCol <= 26 Then > > Excel_Column = Chr(Asc("A") + nCol - 1) > > Else > > Dim sSecond As String > > sSecond = Excel_Column(nCol Mod 26) > > Excel_Column = Excel_Column(nCol \ 26) & sSecond > > End If > > End If > > End Function > > > > Then, after building the text string with the formula just plug it > into > > the relevant cell in the workbook. > > > > After setting the Excel.Application object you then need a reference > to > > the worksheet that needs to be update... > > > > Set Ws = xlApp.Sheets(nSheet) > > With Ws > > strCellAddress = Excel_Column(nCol) & nRowOffest > > strFormula = "=Sum(" & Excel_Column(nCol) & nRowOffest - > > nRowsToSum & ":" & Excel_Column(nCol) & nRowOffest - 1 & ")" > > .Cells(nRowOffest, nCol) = strFormula > > End With > > > > > > HTH > > > > Lambert > > > > -----Original Message----- > > From: accessd-bounces at databaseadvisors.com [mailto:accessd- > > bounces at databaseadvisors.com] On Behalf Of Brad Marks > > Sent: Monday, July 25, 2011 1:54 PM > > To: Access Developers discussion and problem solving > > Subject: [AccessD] Exporting Access to Excel - How to "SUM" a column > > with a variable number of rows? > > > > I am starting to do some experiments involving the creation of Excel > > files from Access. > > > > Let's say that I have an Access Recordset that can contain anywhere > > from 100 to 1,000 records. > > > > I have a little Access application that currently pushes this data > into > > Excel. This all works nicely. > > > > What is the best way to "Sum" a column in Excel after the last > record, > > when the number of records can vary? > > > > Thanks, > > Brad > > > > -- > > 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 has been scanned for viruses and dangerous content by > > MailScanner, and is believed to be clean. > > > > > > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > > -- > This message has been scanned for viruses and > dangerous content by MailScanner, and is > believed to be clean. > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com From vbacreations at gmail.com Tue Jul 26 20:46:51 2011 From: vbacreations at gmail.com (William Benson) Date: Tue, 26 Jul 2011 21:46:51 -0400 Subject: [AccessD] Exporting Access to Excel - How to "SUM" a column with a variable number of rows? In-Reply-To: References: <001b01cc494e$1af91530$50eb3f90$@comcast.net> <001501cc4adc$bc17d200$34477600$@gmail.com> <016b01cc4b27$57c8ffe0$075affa0$@net> Message-ID: Brad, When you mention data that should not be summed are you talking about a mixture of text and numbers? Dates ? What? Do you plan to test on sheet? EXCEL =CountA(range ) = Count(range) is one test for mixture of text and numeric in bulk. Can also be tested with Evaluate ... as in if xl.EVALUATE ("=counta(" & Rng.address & ") = Count (" & rng.address & ")") = True then... On Jul 26, 2011 4:43 PM, "Brad Marks" wrote: From BradM at blackforestltd.com Tue Jul 26 21:33:11 2011 From: BradM at blackforestltd.com (Brad Marks) Date: Tue, 26 Jul 2011 21:33:11 -0500 Subject: [AccessD] Exporting Access to Excel - How to "SUM" a column with a variable number of rows? References: <001b01cc494e$1af91530$50eb3f90$@comcast.net><001501cc4adc$bc17d200$34477600$@gmail.com><016b01cc4b27$57c8ffe0$075affa0$@net> <00ac01cc4bf5$ae236e10$0a6a4a30$@net> Message-ID: Mark, Thanks, Brad -----Original Message----- From: accessd-bounces at databaseadvisors.com on behalf of Mark Simms Sent: Tue 7/26/2011 7:39 PM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Exporting Access to Excel - How to "SUM" a column with a variable number of rows? Simple. Add a paramarray variant parameter to the procedure and pass it the column numbers or column letters that should be ignored. The only other way is to first test the column using Application.Sum. If the result is non-zero, then it is LIKELY a numeric column. Caveat: all zeros in a column will fail the test ! > -----Original Message----- > From: accessd-bounces at databaseadvisors.com [mailto:accessd- > bounces at databaseadvisors.com] On Behalf Of Brad Marks > Sent: Tuesday, July 26, 2011 4:40 PM > To: Access Developers discussion and problem solving > Subject: Re: [AccessD] Exporting Access to Excel - How to "SUM" a > column with a variable number of rows? > > Mark, > > Thanks for the help, I appreciate it. > > The sample code that you posted works nicely. Each column is summed. > > I do have one question, however. > > How can I prevent select columns from being summed in case they contain > data that should not be summed? > > Thanks, > Brad > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Mark Simms > Sent: Monday, July 25, 2011 7:03 PM > To: 'Access Developers discussion and problem solving' > Subject: Re: [AccessD] Exporting Access to Excel - How to "SUM" acolumn > with a variable number of rows? > > What you need to decide is: dynamic vs. static. > If the data is not going to change, then try this: > > Sub AddTotals > > Dim rngCol as Range > > With Activesheet.UsedRange > > For Each rngCol in .Columns > rngCol.Cells(.rows.Count+1) = Application.Sum(rngCol) > Next > > End With > > End Sub > > Of course this assumes the starting row is #1. > > > -----Original Message----- > > From: accessd-bounces at databaseadvisors.com [mailto:accessd- > > bounces at databaseadvisors.com] On Behalf Of Brad Marks > > Sent: Monday, July 25, 2011 4:52 PM > > To: Access Developers discussion and problem solving > > Subject: Re: [AccessD] Exporting Access to Excel - How to "SUM" a > > column with a variable number of rows? > > > > William and Lambert, > > > > Thanks for the help, I appreciate it. > > > > One of the things that I often struggle with is that there is often > > more than one way to accomplish a task. Before I start to build > > something big, I like to understand the options and also understand > the > > "Best" way to get something done. > > > > Thanks Again, > > Brad > > > > > > -----Original Message----- > > From: accessd-bounces at databaseadvisors.com on behalf of Heenan, > Lambert > > Sent: Mon 7/25/2011 1:31 PM > > To: Access Developers discussion and problem solving > > Subject: Re: [AccessD] Exporting Access to Excel - How to "SUM" a > > column with a variable number of rows? > > > > The way I do this is after exporting the results of a query to Excel > I > > then run a Dcount() against the same query to discover how many rows > > were in the output data.... > > > > nRows = DCount("*", "Some_Query_Name") > > > > Then I open the Excel file with Access (i.e. I set an > > Excell.Application and Excel.Worksheet object) so that I can then add > > the formulas that I need to the row under the last row of exported > > data. > > > > Essentially you build the formula in a text variable like this... > > > > strFormula = "=Sum(" & Excel_Column(nCol) & nRowOffest - nRowsToSum & > > ":" & Excel_Column(nCol) & nRowOffest - 1 & ")" > > > > Where nRowOffest is the row number to start summing (or averaging or > > counting, whatever) and nRowsToSum is the number of row in the > output. > > The function Excel_Column is used to get the right alpha prefix in > the > > cells address... > > > > Function Excel_Column(nCol As Long) As String ' given a valid column > > number return the Alpha name for it ' else return an empty string > > If nCol > 256 Then ' Pre Excel 2007 > > Excel_Column = "" > > Else > > If nCol <= 26 Then > > Excel_Column = Chr(Asc("A") + nCol - 1) > > Else > > Dim sSecond As String > > sSecond = Excel_Column(nCol Mod 26) > > Excel_Column = Excel_Column(nCol \ 26) & sSecond > > End If > > End If > > End Function > > > > Then, after building the text string with the formula just plug it > into > > the relevant cell in the workbook. > > > > After setting the Excel.Application object you then need a reference > to > > the worksheet that needs to be update... > > > > Set Ws = xlApp.Sheets(nSheet) > > With Ws > > strCellAddress = Excel_Column(nCol) & nRowOffest > > strFormula = "=Sum(" & Excel_Column(nCol) & nRowOffest - > > nRowsToSum & ":" & Excel_Column(nCol) & nRowOffest - 1 & ")" > > .Cells(nRowOffest, nCol) = strFormula > > End With > > > > > > HTH > > > > Lambert > > > > -----Original Message----- > > From: accessd-bounces at databaseadvisors.com [mailto:accessd- > > bounces at databaseadvisors.com] On Behalf Of Brad Marks > > Sent: Monday, July 25, 2011 1:54 PM > > To: Access Developers discussion and problem solving > > Subject: [AccessD] Exporting Access to Excel - How to "SUM" a column > > with a variable number of rows? > > > > I am starting to do some experiments involving the creation of Excel > > files from Access. > > > > Let's say that I have an Access Recordset that can contain anywhere > > from 100 to 1,000 records. > > > > I have a little Access application that currently pushes this data > into > > Excel. This all works nicely. > > > > What is the best way to "Sum" a column in Excel after the last > record, > > when the number of records can vary? > > > > Thanks, > > Brad > > > > -- > > 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 has been scanned for viruses and dangerous content by > > MailScanner, and is believed to be clean. > > > > > > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > > -- > This message has been scanned for viruses and > dangerous content by MailScanner, and is > believed to be clean. > > > -- > 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 has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. From BradM at blackforestltd.com Tue Jul 26 21:41:56 2011 From: BradM at blackforestltd.com (Brad Marks) Date: Tue, 26 Jul 2011 21:41:56 -0500 Subject: [AccessD] Exporting Access to Excel - How to "SUM" a column with a variable number of rows? References: <001b01cc494e$1af91530$50eb3f90$@comcast.net><001501cc4adc$bc17d200$34477600$@gmail.com><016b01cc4b27$57c8ffe0$075affa0$@net> Message-ID: William, I am just doing some R&D work with "Windows Automation" (Access controlling Excel). I can see several uses for this approach down the road with a couple of projects that I am working on (SQL Server and Access Data - reporting and analysis). Some of the fields are numeric fields that will need to be summed in Excel (total sales, etc.). Other fields will not need to be summed (date fields, etc.) Thanks for your ideas. I have worked with Access for a couple years, but my knowledge of Excel is very limited. I am just starting to experiment with Windows Automation. Brad -----Original Message----- From: accessd-bounces at databaseadvisors.com on behalf of William Benson Sent: Tue 7/26/2011 8:46 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Exporting Access to Excel - How to "SUM" a column with a variable number of rows? Brad, When you mention data that should not be summed are you talking about a mixture of text and numbers? Dates ? What? Do you plan to test on sheet? EXCEL =CountA(range ) = Count(range) is one test for mixture of text and numeric in bulk. Can also be tested with Evaluate ... as in if xl.EVALUATE ("=counta(" & Rng.address & ") = Count (" & rng.address & ")") = True then... On Jul 26, 2011 4:43 PM, "Brad Marks" wrote: -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. From rockysmolin at bchacc.com Wed Jul 27 00:03:48 2011 From: rockysmolin at bchacc.com (Rocky Smolin) Date: Tue, 26 Jul 2011 22:03:48 -0700 Subject: [AccessD] A2003 stops working In-Reply-To: References: <8FDCFF410EE948FCAECD101A7CBAE855@HAL9007><814A51A1F63345E980C150E6E55B65EA@HAL9007> Message-ID: <5A5BEB7491F9430FAEDF2AC529F15E18@HAL9007> 1. Done - no joy. 2. Done - no cigar. 3. Gotta try that - it's quick and easy. 4. Or, given the complexity (several tabs with subforms - lots of code) I could resign from the client. As an alternative to sticking my head in the oven. 5. I think it's not that particular record - it's the delete. However, you're right in that I could permanently switch to DAO to do the delete. Could be the fastest solution. 6. Impractical - as this alternative was used multiple times many years ago. There's a limit. I'm pretty much there. 7. Although you did not suggest this - go away for two days and don't think about it. Which is what I'm doing tomorrow. Thanks for the ideas. I'll post what works, eventually. Rocky -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Doug Steele Sent: Tuesday, July 26, 2011 4:22 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] A2003 stops working Have you tried swinging a lizard around your head three times? I have had these mystery fails, and my general approach (stopping if/when I have success) is: 1. Force a compile. 2. Decompile/recompile. 3. Build an empty database and import all objects from the old database. 4. Delete the form and rebuild it from scratch. 5. Rework the code. In this case, open a dao recordset, find the record and delete it with Recordset.Delete. 6. Tear my hair out. I'm quite bald now. Doug On Tue, Jul 26, 2011 at 3:02 PM, Rocky Smolin wrote: > I just uninstalled O2010 ?- no effect - still craps out on the delete. > > > R > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Rocky > Smolin > Sent: Tuesday, July 26, 2011 2:55 PM > To: accessd at databaseadvisors.com > Subject: [AccessD] A2003 stops working > > Dear List: > > Running Access 2003 SP3 on a 64bit W7 OS machine. ?From time to time > it stops with a message "Access has stopped working." > > I am getting it now consistently on one form on an app when deleting a > record (DoCmd.RunCommand acCmdDeleteRecord). > > I have Office 2010 loaded on this machine as well. > > Anyone have this happen? ?Any cure? > > MTIA > > Rocky Smolin > Beach Access Software > 858-259-4334 > www.bchacc.com www.e-z-mrp.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 fuller.artful at gmail.com Wed Jul 27 01:29:12 2011 From: fuller.artful at gmail.com (Arthur Fuller) Date: Wed, 27 Jul 2011 02:29:12 -0400 Subject: [AccessD] A2003 stops working In-Reply-To: <5A5BEB7491F9430FAEDF2AC529F15E18@HAL9007> References: <8FDCFF410EE948FCAECD101A7CBAE855@HAL9007> <814A51A1F63345E980C150E6E55B65EA@HAL9007> <5A5BEB7491F9430FAEDF2AC529F15E18@HAL9007> Message-ID: Sometimes things foul up due to bad References. Before doing the oven thing, you might want to do Tools|References and see wha 'appnin' there. A. On Wed, Jul 27, 2011 at 1:03 AM, Rocky Smolin wrote: > 1. Done - no joy. > 2. Done - no cigar. > 3. Gotta try that - it's quick and easy. > 4. Or, given the complexity (several tabs with subforms - lots of code) I > could resign from the client. As an alternative to sticking my head in the > oven. > 5. I think it's not that particular record - it's the delete. However, > you're right in that I could permanently switch to DAO to do the delete. > Could be the fastest solution. > 6. Impractical - as this alternative was used multiple times many years > ago. > There's a limit. I'm pretty much there. > > 7. Although you did not suggest this - go away for two days and don't think > about it. Which is what I'm doing tomorrow. > > Thanks for the ideas. > > I'll post what works, eventually. > > Rocky > From vbacreations at gmail.com Wed Jul 27 15:35:50 2011 From: vbacreations at gmail.com (William Benson (VBACreations.Com)) Date: Wed, 27 Jul 2011 16:35:50 -0400 Subject: [AccessD] Trouble creating a memo field Message-ID: <001601cc4c9c$c7aa2ed0$56fe8c70$@gmail.com> I sometimes try to create new tables using SQL but not using CREATETABLE. Example: Select 'Test' as Field1 Into Tbl1 One problem I had recently was, how can one make a MEMO field this way? (I can't find a way, not even with MyDB.Execute ("Select '" & string(257,"a") & "' as Field1 Into Tbl1"),DBFailonError When I do that I get only 255 characters and the field is Text. Another problem is that I often like the table to be created without a first row in it. So I might write something like Select 'Test' as Field1 Into Tbl1 From Tbl2 WHERE 1 = 2 Trouble is, What if there is no table named Tbl2? (Obviously it fails). But I can't seem to get the WHERE clause to be acceptable when I do not specify a valid table in the FROM clause, unlike the first example. Now, I might be able to solve the latter problem by specifying a system table as the FROM table, something I know will always be present... such as: Select 'Test' as Field1 Into Tbl1 From MSysObjects WHERE 1 = 2 But then that code probably would not work in other (non-MSAccess) databases. In fact, I am not sure this process of using Select Into works in non-Access databases anyway (does it?) So... I am now leaning towards using CREATE TABLE always and forever as my choice for the best performing method of creating a table using inline SQL. Does anyone beg to differ with this and/or have a way to resolve the issues I have found? From jackandpat.d at gmail.com Wed Jul 27 16:01:44 2011 From: jackandpat.d at gmail.com (jack drawbridge) Date: Wed, 27 Jul 2011 17:01:44 -0400 Subject: [AccessD] Trouble creating a memo field In-Reply-To: <001601cc4c9c$c7aa2ed0$56fe8c70$@gmail.com> References: <001601cc4c9c$c7aa2ed0$56fe8c70$@gmail.com> Message-ID: William, Allen Browne has samples of various DDL statements here. http://allenbrowne.com/func-DDL.html jack On Wed, Jul 27, 2011 at 4:35 PM, William Benson (VBACreations.Com) < vbacreations at gmail.com> wrote: > I sometimes try to create new tables using SQL but not using CREATETABLE. > Example: Select 'Test' as Field1 Into Tbl1 > > One problem I had recently was, how can one make a MEMO field this way? (I > can't find a way, not even with > MyDB.Execute ("Select '" & string(257,"a") & "' as Field1 Into > Tbl1"),DBFailonError > When I do that I get only 255 characters and the field is Text. > > Another problem is that I often like the table to be created without a > first > row in it. So I might write something like > Select 'Test' as Field1 Into Tbl1 From Tbl2 WHERE 1 = 2 > Trouble is, What if there is no table named Tbl2? (Obviously it fails). But > I can't seem to get the WHERE clause to be acceptable when I do not specify > a valid table in the FROM clause, unlike the first example. > > Now, I might be able to solve the latter problem by specifying a system > table as the FROM table, something I know will always be present... such > as: > Select 'Test' as Field1 Into Tbl1 From MSysObjects WHERE 1 = 2 > > But then that code probably would not work in other (non-MSAccess) > databases. In fact, I am not sure this process of using Select Into works > in > non-Access databases anyway (does it?) > > So... I am now leaning towards using CREATE TABLE always and forever as my > choice for the best performing method of creating a table using inline SQL. > > Does anyone beg to differ with this and/or have a way to resolve the issues > I have found? > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > From stuart at lexacorp.com.pg Wed Jul 27 16:13:50 2011 From: stuart at lexacorp.com.pg (Stuart McLachlan) Date: Thu, 28 Jul 2011 07:13:50 +1000 Subject: [AccessD] Trouble creating a memo field In-Reply-To: <001601cc4c9c$c7aa2ed0$56fe8c70$@gmail.com> References: <001601cc4c9c$c7aa2ed0$56fe8c70$@gmail.com> Message-ID: <4E307F8E.27155.42BDF2F4@stuart.lexacorp.com.pg> Select ...Into doesn't allow you to set PKs, indexes or constraints(if avaiable in the destination) and doesn't let you specify the destination datatype. It is a quick and dirty solution in a limited set of cases. I'd stick with Create table if I were you, -- Stuart On 27 Jul 2011 at 16:35, William Benson (VBACreations. wrote: > I sometimes try to create new tables using SQL but not using > CREATETABLE. Example: Select 'Test' as Field1 Into Tbl1 > > One problem I had recently was, how can one make a MEMO field this > way? (I can't find a way, not even with > MyDB.Execute ("Select '" & string(257,"a") & "' as Field1 Into > Tbl1"),DBFailonError When I do that I get only 255 characters and the > field is Text. > > Another problem is that I often like the table to be created without a > first row in it. So I might write something like > Select 'Test' as Field1 Into Tbl1 From Tbl2 WHERE 1 = 2 > Trouble is, What if there is no table named Tbl2? (Obviously it > fails). But I can't seem to get the WHERE clause to be acceptable when > I do not specify a valid table in the FROM clause, unlike the first > example. > > Now, I might be able to solve the latter problem by specifying a > system table as the FROM table, something I know will always be > present... such as: > Select 'Test' as Field1 Into Tbl1 From MSysObjects WHERE 1 = 2 > > But then that code probably would not work in other (non-MSAccess) > databases. In fact, I am not sure this process of using Select Into > works in non-Access databases anyway (does it?) > > So... I am now leaning towards using CREATE TABLE always and forever > as my choice for the best performing method of creating a table using > inline SQL. > > Does anyone beg to differ with this and/or have a way to resolve the > issues I have found? > From ssharkins at gmail.com Wed Jul 27 16:16:24 2011 From: ssharkins at gmail.com (Susan Harkins) Date: Wed, 27 Jul 2011 17:16:24 -0400 Subject: [AccessD] Trouble creating a memo field References: <001601cc4c9c$c7aa2ed0$56fe8c70$@gmail.com> <4E307F8E.27155.42BDF2F4@stuart.lexacorp.com.pg> Message-ID: <83E2A738E65F4CB1B88AB407020C8059@SusanHarkins> Or create the table and go back alter it by adding a Memo field. Susan H. > Select ...Into doesn't allow you to set PKs, indexes or constraints(if > avaiable in the > destination) and doesn't let you specify the destination datatype. It > is a quick and dirty > solution in a limited set of cases. > > I'd stick with Create table if I were you, > > -- From gustav at cactus.dk Wed Jul 27 17:06:24 2011 From: gustav at cactus.dk (Gustav Brock) Date: Thu, 28 Jul 2011 00:06:24 +0200 Subject: [AccessD] Trouble creating a memo field Message-ID: Hi William Use DAO to create tables and fields (and indexes and relations, even databases) and all your trouble will end. Seriously. That way you will be in control of the finest details including all properties of the objects. Example: Public Function SetTableProperties() As Boolean Dim dbs As DAO.Database Dim tdf As DAO.TableDef Dim fld As DAO.Field Dim prp As DAO.Property Dim strPropertyName As String Set dbs = CurrentDb() Set tdf = dbs.TableDefs("tblTest") Set fld = tdf.Fields(0) ' On Error GoTo Err_Prop strPropertyName = "Description" Set prp = tdf.CreateProperty() prp.Name = strPropertyName prp.Type = dbText prp.Value = "Table Description" tdf.Properties.Append prp strPropertyName = "Caption" Set prp = fld.CreateProperty(strPropertyName, dbText, "Field Caption") fld.Properties.Append prp SetTableProperties = True Exit_Prop: Exit Function Err_Prop: If Err.Number = 3265 Then ' Item not found in this collection. Resume Next Else Debug.Print Err.Number, Err.Description Resume Exit_Prop End If End Function /gustav >>> vbacreations at gmail.com 27-07-2011 22:35:50 >>> I sometimes try to create new tables using SQL but not using CREATETABLE. Example: Select 'Test' as Field1 Into Tbl1 One problem I had recently was, how can one make a MEMO field this way? (I can't find a way, not even with MyDB.Execute ("Select '" & string(257,"a") & "' as Field1 Into Tbl1"),DBFailonError When I do that I get only 255 characters and the field is Text. Another problem is that I often like the table to be created without a first row in it. So I might write something like Select 'Test' as Field1 Into Tbl1 From Tbl2 WHERE 1 = 2 Trouble is, What if there is no table named Tbl2? (Obviously it fails). But I can't seem to get the WHERE clause to be acceptable when I do not specify a valid table in the FROM clause, unlike the first example. Now, I might be able to solve the latter problem by specifying a system table as the FROM table, something I know will always be present... such as: Select 'Test' as Field1 Into Tbl1 From MSysObjects WHERE 1 = 2 But then that code probably would not work in other (non-MSAccess) databases. In fact, I am not sure this process of using Select Into works in non-Access databases anyway (does it?) So... I am now leaning towards using CREATE TABLE always and forever as my choice for the best performing method of creating a table using inline SQL. Does anyone beg to differ with this and/or have a way to resolve the issues I have found? From jimdettman at verizon.net Thu Jul 28 05:22:06 2011 From: jimdettman at verizon.net (Jim Dettman) Date: Thu, 28 Jul 2011 06:22:06 -0400 Subject: [AccessD] Trouble creating a memo field In-Reply-To: References: <001601cc4c9c$c7aa2ed0$56fe8c70$@gmail.com> Message-ID: <94E7A40574FF46DA9A1AB75A711F12CC@XPS> Not sure what Allan has posted, so this might be duplication, but there is a series of three MSKB articles that shows what you can do with JET 4.0 and SQL. This one: http://msdn.microsoft.com/en-us/library/aa140015(v=office.10).aspx#acintsql_ intddl Has a section on DDL statements. Good series of articles (links to the others are at the bottom). Jim. -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jack drawbridge Sent: Wednesday, July 27, 2011 05:02 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Trouble creating a memo field William, Allen Browne has samples of various DDL statements here. http://allenbrowne.com/func-DDL.html jack On Wed, Jul 27, 2011 at 4:35 PM, William Benson (VBACreations.Com) < vbacreations at gmail.com> wrote: > I sometimes try to create new tables using SQL but not using CREATETABLE. > Example: Select 'Test' as Field1 Into Tbl1 > > One problem I had recently was, how can one make a MEMO field this way? (I > can't find a way, not even with > MyDB.Execute ("Select '" & string(257,"a") & "' as Field1 Into > Tbl1"),DBFailonError > When I do that I get only 255 characters and the field is Text. > > Another problem is that I often like the table to be created without a > first > row in it. So I might write something like > Select 'Test' as Field1 Into Tbl1 From Tbl2 WHERE 1 = 2 > Trouble is, What if there is no table named Tbl2? (Obviously it fails). But > I can't seem to get the WHERE clause to be acceptable when I do not specify > a valid table in the FROM clause, unlike the first example. > > Now, I might be able to solve the latter problem by specifying a system > table as the FROM table, something I know will always be present... such > as: > Select 'Test' as Field1 Into Tbl1 From MSysObjects WHERE 1 = 2 > > But then that code probably would not work in other (non-MSAccess) > databases. In fact, I am not sure this process of using Select Into works > in > non-Access databases anyway (does it?) > > So... I am now leaning towards using CREATE TABLE always and forever as my > choice for the best performing method of creating a table using inline SQL. > > Does anyone beg to differ with this and/or have a way to resolve the issues > I have found? > > -- > 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 rls at WeBeDb.com Thu Jul 28 10:29:59 2011 From: rls at WeBeDb.com (Robert Stewart) Date: Thu, 28 Jul 2011 10:29:59 -0500 Subject: [AccessD] SharePoint 2010 question(s) In-Reply-To: References: Message-ID: And what would that magic web site be? At 05:05 PM 7/27/2011, you wrote: >Date: Tue, 26 Jul 2011 20:16:35 -0400 >From: "Mark Simms" >To: "'Access Developers discussion and problem solving'" > >Subject: Re: [AccessD] [cross posted] SharePoint 2010 question(s) >Message-ID: <00ab01cc4bf2$72da9c00$588fd400$@net> > >Jeff - there is a special website devoted to that topic......and it's not >Microsoft's....natch. >Access Services remains fairly cloaked in secrecy.... > > > -----Original Message----- > > From: accessd-bounces at databaseadvisors.com [mailto:accessd- > > bounces at databaseadvisors.com] On Behalf Of Jeff B > > Sent: Tuesday, July 26, 2011 11:11 AM > > To: Dba-Tech; dba-OT; AccessD > > Subject: [AccessD] [cross posted] SharePoint 2010 question(s) > > > > I really need to know what you all suggest as the BEST book(s) for > > learning > > SharePoint 2010, Access Services, and publishing Access databases to > > SharePoint. > > > > > > Jeff Barrows > > MCP, MCAD, MCSD > > Robert L. Stewart www.WeBeDb.com www.DBGUIDesign.com www.RLStewartPhotography.com From ssharkins at gmail.com Thu Jul 28 11:54:58 2011 From: ssharkins at gmail.com (Susan Harkins) Date: Thu, 28 Jul 2011 12:54:58 -0400 Subject: [AccessD] Article on upgrading Message-ID: <65F646A7C57044C1B8659201D3378B55@SusanHarkins> I'll be writing about upgrading to SQL Server and I'd like to include as many of you in it as possible -- you'll get credit and a link -- it's a nice thing to show the boss and clients. The angle is -- questions you should ask when deciding whether to upgrade an Access database to SQL Server (Express is Okay too) -- specific to the decision-making process. Anything you think someone considering the move should evaluate before doing so -- but I'll be writing it from a "questions you should ask" perspective. It'll be interesting reading for the list too I think, so if nobody objects -- I see no reason to ask for these responses off list. Thanks! Susan H. From fuller.artful at gmail.com Thu Jul 28 13:08:53 2011 From: fuller.artful at gmail.com (Arthur Fuller) Date: Thu, 28 Jul 2011 14:08:53 -0400 Subject: [AccessD] Article on upgrading In-Reply-To: <65F646A7C57044C1B8659201D3378B55@SusanHarkins> References: <65F646A7C57044C1B8659201D3378B55@SusanHarkins> Message-ID: I would lend this to your proposed article. 1. Find any occurrences of "Select" plus anything, either in RecordSources or DataSources. Revise said code to refer to a named query. 2. Make sure that all date-fields are not null, giving them instead a default value of Date() at worst, but supplying some value at least. 3. Make sure that all FKs hold true; no orphans whatever, else the whole migration will fail. 4. Strictly a matter of opinion, but MO is that 3NF is insufficient for serious dbs; 4- and 5-NF are mandatory. A. On Thu, Jul 28, 2011 at 12:54 PM, Susan Harkins wrote: > I'll be writing about upgrading to SQL Server and I'd like to include as > many of you in it as possible -- you'll get credit and a link -- it's a nice > thing to show the boss and clients. > > The angle is -- questions you should ask when deciding whether to upgrade > an Access database to SQL Server (Express is Okay too) -- specific to the > decision-making process. Anything you think someone considering the move > should evaluate before doing so -- but I'll be writing it from a "questions > you should ask" perspective. > > It'll be interesting reading for the list too I think, so if nobody objects > -- I see no reason to ask for these responses off list. > > Thanks! > Susan H. > > From ssharkins at gmail.com Thu Jul 28 13:13:43 2011 From: ssharkins at gmail.com (Susan Harkins) Date: Thu, 28 Jul 2011 14:13:43 -0400 Subject: [AccessD] Article on upgrading References: <65F646A7C57044C1B8659201D3378B55@SusanHarkins> Message-ID: <2C78D5CF79B043E5A94FC45422B4A5C3@SusanHarkins> This is good advice for actually performing an upgrade, but I'm looking for questions you might ask when deciding whether you actually should or want to upgrade -- see the difference? What kind of questions do you ask your clients before you actually get there -- what kinds of questions do they ask you when they begin to think about upgrading? Thanks Arthur! Please feel free to play again! ;) Susan H. >I would lend this to your proposed article. > > 1. Find any occurrences of "Select" plus anything, either in RecordSources > or DataSources. Revise said code to refer to a named query. > 2. Make sure that all date-fields are not null, giving them instead a > default value of Date() at worst, but supplying some value at least. > 3. Make sure that all FKs hold true; no orphans whatever, else the whole > migration will fail. > 4. Strictly a matter of opinion, but MO is that 3NF is insufficient for > serious dbs; 4- and 5-NF are mandatory. > From gustav at cactus.dk Thu Jul 28 13:29:26 2011 From: gustav at cactus.dk (Gustav Brock) Date: Thu, 28 Jul 2011 20:29:26 +0200 Subject: [AccessD] Article on upgrading Message-ID: Hi Susan Nice to see back doing tech writing! We've never had a client asking why, they all follow my advice(!) So our reasons to suggest and upgrade: 1. Extreme reliability is requested. I have yet to see an SQL Server break down. 2. Remote access (across a WAN) is needed. 3. Easy, daily, and reliable backup is requested even when clients are on-line. 4. Database size can be expected to outgrow Access' capability. 5. Controlled and secure user access is requested. Note the non-tech level of these parameters. /gustav >>> ssharkins at gmail.com 28-07-2011 18:54:58 >>> I'll be writing about upgrading to SQL Server and I'd like to include as many of you in it as possible -- you'll get credit and a link -- it's a nice thing to show the boss and clients. The angle is -- questions you should ask when deciding whether to upgrade an Access database to SQL Server (Express is Okay too) -- specific to the decision-making process. Anything you think someone considering the move should evaluate before doing so -- but I'll be writing it from a "questions you should ask" perspective. It'll be interesting reading for the list too I think, so if nobody objects -- I see no reason to ask for these responses off list. Thanks! Susan H. From jimdettman at verizon.net Thu Jul 28 13:29:38 2011 From: jimdettman at verizon.net (Jim Dettman) Date: Thu, 28 Jul 2011 14:29:38 -0400 Subject: [AccessD] Article on upgrading In-Reply-To: <65F646A7C57044C1B8659201D3378B55@SusanHarkins> References: <65F646A7C57044C1B8659201D3378B55@SusanHarkins> Message-ID: Susan, 1. Does your database need to be available at all times? If so, then online backups are required and JET is not your answer. 2. How many hours worth of data can you afford to loose? If none or only an hour or two, then look to something other then JET. 3. How much data do you have? If tables with anything more then hundreds of thousands of rows, then be looking to something other then JET. 4. How many users do you have? Generally if more then 15-20, you want to be on something other then JET because if your DB corrupts, that many people not working is costly. For some of the above, they are not hard and fast rules. There are many of apps out there that go further in terms or user or records and work quite well. The above should be considered the starting point of where you should start becoming uncomfortable with using JET. Jim. -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Susan Harkins Sent: Thursday, July 28, 2011 12:55 PM To: Access Developers discussion and problem solving Subject: [AccessD] Article on upgrading I'll be writing about upgrading to SQL Server and I'd like to include as many of you in it as possible -- you'll get credit and a link -- it's a nice thing to show the boss and clients. The angle is -- questions you should ask when deciding whether to upgrade an Access database to SQL Server (Express is Okay too) -- specific to the decision-making process. Anything you think someone considering the move should evaluate before doing so -- but I'll be writing it from a "questions you should ask" perspective. It'll be interesting reading for the list too I think, so if nobody objects -- I see no reason to ask for these responses off list. Thanks! Susan H. -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From ssharkins at gmail.com Thu Jul 28 13:32:32 2011 From: ssharkins at gmail.com (Susan Harkins) Date: Thu, 28 Jul 2011 14:32:32 -0400 Subject: [AccessD] Article on upgrading References: Message-ID: These are reasons why you'd want to upgrade and could possibly be turned into decision-type questions. Thank you! Susan H. > Hi Susan > > Nice to see back doing tech writing! > > We've never had a client asking why, they all follow my advice(!) > So our reasons to suggest and upgrade: > > 1. Extreme reliability is requested. I have yet to see an SQL Server break > down. > 2. Remote access (across a WAN) is needed. > 3. Easy, daily, and reliable backup is requested even when clients are > on-line. > 4. Database size can be expected to outgrow Access' capability. > 5. Controlled and secure user access is requested. > > Note the non-tech level of these parameters. > > /gustav From dw-murphy at cox.net Thu Jul 28 13:33:56 2011 From: dw-murphy at cox.net (Doug Murphy) Date: Thu, 28 Jul 2011 11:33:56 -0700 Subject: [AccessD] Article on upgrading In-Reply-To: <65F646A7C57044C1B8659201D3378B55@SusanHarkins> References: <65F646A7C57044C1B8659201D3378B55@SusanHarkins> Message-ID: <006201cc4d54$e9283620$bb78a260$@cox.net> If you are moving from Access 2007 or 2010 and are using the attachment field type it will not upsize. I had a client who required this type of functionality and had to create similar functionality in SQL Server. As an aside we were having issues with the form with the attachment field being very slow in opening and updating. After getting rid of the attachment field and moving to a SQL server back end there was a significant increase in responsiveness. -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Susan Harkins Sent: Thursday, July 28, 2011 9:55 AM To: Access Developers discussion and problem solving Subject: [AccessD] Article on upgrading I'll be writing about upgrading to SQL Server and I'd like to include as many of you in it as possible -- you'll get credit and a link -- it's a nice thing to show the boss and clients. The angle is -- questions you should ask when deciding whether to upgrade an Access database to SQL Server (Express is Okay too) -- specific to the decision-making process. Anything you think someone considering the move should evaluate before doing so -- but I'll be writing it from a "questions you should ask" perspective. It'll be interesting reading for the list too I think, so if nobody objects -- I see no reason to ask for these responses off list. Thanks! Susan H. -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From ssharkins at gmail.com Thu Jul 28 13:35:44 2011 From: ssharkins at gmail.com (Susan Harkins) Date: Thu, 28 Jul 2011 14:35:44 -0400 Subject: [AccessD] Article on upgrading References: <65F646A7C57044C1B8659201D3378B55@SusanHarkins> Message-ID: <1E8BF7CA21694B89829105EA3573E2AB@SusanHarkins> Thank you Jim -- these are great! Susan H. > Susan, > > 1. Does your database need to be available at all times? If so, then > online > backups are required and JET is not your answer. > > 2. How many hours worth of data can you afford to loose? If none or only > an hour or two, then look to something other then JET. > > 3. How much data do you have? If tables with anything more then hundreds > of > thousands of rows, then be looking to something other then JET. > > 4. How many users do you have? Generally if more then 15-20, you want to > be > on something other then JET because if your DB corrupts, that many people > not working is costly. > > > For some of the above, they are not hard and fast rules. There are many > of apps out there that go further in terms or user or records and work > quite > well. The above should be considered the starting point of where you > should > start becoming uncomfortable with using JET. > > Jim. > > > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Susan Harkins > Sent: Thursday, July 28, 2011 12:55 PM > To: Access Developers discussion and problem solving > Subject: [AccessD] Article on upgrading > > I'll be writing about upgrading to SQL Server and I'd like to include as > many of you in it as possible -- you'll get credit and a link -- it's a > nice > thing to show the boss and clients. > > The angle is -- questions you should ask when deciding whether to upgrade > an > Access database to SQL Server (Express is Okay too) -- specific to the > decision-making process. Anything you think someone considering the move > should evaluate before doing so -- but I'll be writing it from a > "questions > you should ask" perspective. > > It'll be interesting reading for the list too I think, so if nobody > objects > -- I see no reason to ask for these responses off list. > > Thanks! > Susan H. > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com From rusty.hammond at cpiqpc.com Thu Jul 28 13:52:45 2011 From: rusty.hammond at cpiqpc.com (Rusty Hammond) Date: Thu, 28 Jul 2011 13:52:45 -0500 Subject: [AccessD] Article on upgrading In-Reply-To: <65F646A7C57044C1B8659201D3378B55@SusanHarkins> References: <65F646A7C57044C1B8659201D3378B55@SusanHarkins> Message-ID: <49A286ABF515E94A8505CD14DEB721701744A02B@CPIEMAIL-EVS1.CPIQPC.NET> Just off the top of my head: - Do they have network stability issues (ie computers losing connections, slow internet connection speeds, etc...) If so, if they think they need to go to SQL because the database is slow or the backend keeps getting corrupt, it may be they need to invest in the network and moving to SQL won't be required. - What kind of machine is the backend hosted on currently? Maybe an upgrade to that machine, or putting the backend on a more robust machine will take care of any issues. - Are they running a frontend/backend setup currently? Splitting up the database to a frontend and backend and putting copies of the frontend on each user computer may alleviate issues they may currently be having. - Is user level security becoming a requirement? Access security is easy to break and, if I remember correctly, non-existent in Access 2007 and 2010 - Using multiple versions of Access on your network to run your frontend? I've seen issues pop-up when different versions are hitting a backend and causing slowness and corruption in the backend. Moving to a SQL backend took care of the issues. - If they move to SQL, do they have a server? If not, a robust pc on a peer-to-peer network (Express only)? If not, are they willing to invest in one? - Are they hesitant to move to SQL because of cost? SQL Express is free. - Are they anticipating a lot of growth? Might be wise to make the move to SQL now so they aren't having to scramble to upgrade later. Rusty -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Susan Harkins Sent: Thursday, July 28, 2011 11:55 AM To: Access Developers discussion and problem solving Subject: [AccessD] Article on upgrading I'll be writing about upgrading to SQL Server and I'd like to include as many of you in it as possible -- you'll get credit and a link -- it's a nice thing to show the boss and clients. The angle is -- questions you should ask when deciding whether to upgrade an Access database to SQL Server (Express is Okay too) -- specific to the decision-making process. Anything you think someone considering the move should evaluate before doing so -- but I'll be writing it from a "questions you should ask" perspective. It'll be interesting reading for the list too I think, so if nobody objects -- I see no reason to ask for these responses off list. Thanks! Susan H. -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com ********************************************************************** WARNING: All e-mail sent to and from this address will be received, scanned or otherwise recorded by the CPI Qualified Plan Consultants, Inc. corporate e-mail system and is subject to archival, monitoring or review by, and/or disclosure to, someone other than the recipient. ********************************************************************** From jm.hwsn at gmail.com Thu Jul 28 14:06:00 2011 From: jm.hwsn at gmail.com (jm.hwsn) Date: Thu, 28 Jul 2011 14:06:00 -0500 Subject: [AccessD] Article on upgrading In-Reply-To: <49A286ABF515E94A8505CD14DEB721701744A02B@CPIEMAIL-EVS1.CPIQPC.NET> References: <65F646A7C57044C1B8659201D3378B55@SusanHarkins> <49A286ABF515E94A8505CD14DEB721701744A02B@CPIEMAIL-EVS1.CPIQPC.NET> Message-ID: <4e31b319.8188ec0a.391e.4fa3@mx.google.com> All the ideas presented so far are great... some I never considered. I would be concerned about cost. As Rusty stated below, do they have a server is a major consideration. The cost of a server, the cost of the software and possibly the cost of an SQL Server Administrator if they don't have one on staff. - How many users are currently using the system and how many will use it once converted? - What is the time-line for conversion? 2-months, 6 months or longer - Do the PCs currently being used need to be upgraded/replaced once the conversion is completed? If the conversion is six months away, is the current plan to replace the user machines adequate? - If the major consideration is performance, then upgrading to Express is a viable option if all things are static. Express has a 4GB data limit so that might also be a consideration. Jim H. -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Rusty Hammond Sent: Thursday, July 28, 2011 1:53 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Article on upgrading Just off the top of my head: - Do they have network stability issues (ie computers losing connections, slow internet connection speeds, etc...) If so, if they think they need to go to SQL because the database is slow or the backend keeps getting corrupt, it may be they need to invest in the network and moving to SQL won't be required. - What kind of machine is the backend hosted on currently? Maybe an upgrade to that machine, or putting the backend on a more robust machine will take care of any issues. - Are they running a frontend/backend setup currently? Splitting up the database to a frontend and backend and putting copies of the frontend on each user computer may alleviate issues they may currently be having. - Is user level security becoming a requirement? Access security is easy to break and, if I remember correctly, non-existent in Access 2007 and 2010 - Using multiple versions of Access on your network to run your frontend? I've seen issues pop-up when different versions are hitting a backend and causing slowness and corruption in the backend. Moving to a SQL backend took care of the issues. - If they move to SQL, do they have a server? If not, a robust pc on a peer-to-peer network (Express only)? If not, are they willing to invest in one? - Are they hesitant to move to SQL because of cost? SQL Express is free. - Are they anticipating a lot of growth? Might be wise to make the move to SQL now so they aren't having to scramble to upgrade later. Rusty -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Susan Harkins Sent: Thursday, July 28, 2011 11:55 AM To: Access Developers discussion and problem solving Subject: [AccessD] Article on upgrading I'll be writing about upgrading to SQL Server and I'd like to include as many of you in it as possible -- you'll get credit and a link -- it's a nice thing to show the boss and clients. The angle is -- questions you should ask when deciding whether to upgrade an Access database to SQL Server (Express is Okay too) -- specific to the decision-making process. Anything you think someone considering the move should evaluate before doing so -- but I'll be writing it from a "questions you should ask" perspective. It'll be interesting reading for the list too I think, so if nobody objects -- I see no reason to ask for these responses off list. Thanks! Susan H. -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com ********************************************************************** WARNING: All e-mail sent to and from this address will be received, scanned or otherwise recorded by the CPI Qualified Plan Consultants, Inc. corporate e-mail system and is subject to archival, monitoring or review by, and/or disclosure to, someone other than the recipient. ********************************************************************** -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From fuller.artful at gmail.com Thu Jul 28 14:08:49 2011 From: fuller.artful at gmail.com (Arthur Fuller) Date: Thu, 28 Jul 2011 15:08:49 -0400 Subject: [AccessD] Article on upgrading In-Reply-To: <2C78D5CF79B043E5A94FC45422B4A5C3@SusanHarkins> References: <65F646A7C57044C1B8659201D3378B55@SusanHarkins> <2C78D5CF79B043E5A94FC45422B4A5C3@SusanHarkins> Message-ID: First, why bother with the upgrade? Two potential answers: 1, Because the DB size limit is going to be a problem. In many cases this is not an issue, but my philosophy is, Plan For Success, according to which maxim what you originally thought were going to be 1K users turns out to be 1M users. 2, Deploy the initial virgin in MDB or AAcdb format, and hope that it works for the short-term. 3. Be prepared to go to SQL Server if you should be so lucky as to achieve success. (Fuller's fifth law: only successful apps require upgrades; the rest die on the vine). And these numbers remind me of the old joke: How many kinds of programmers are there? Three: those who can count and those who can't. A. On Thu, Jul 28, 2011 at 2:13 PM, Susan Harkins wrote: > This is good advice for actually performing an upgrade, but I'm looking for > questions you might ask when deciding whether you actually should or want to > upgrade -- see the difference? What kind of questions do you ask your > clients before you actually get there -- what kinds of questions do they ask > you when they begin to think about upgrading? > > Thanks Arthur! Please feel free to play again! ;) > Susan H. > > From ssharkins at gmail.com Thu Jul 28 14:17:15 2011 From: ssharkins at gmail.com (Susan Harkins) Date: Thu, 28 Jul 2011 15:17:15 -0400 Subject: [AccessD] Article on upgrading References: <65F646A7C57044C1B8659201D3378B55@SusanHarkins> <006201cc4d54$e9283620$bb78a260$@cox.net> Message-ID: Thanks for mentioning these issue Doug -- I wonder how many other folks are being snagged? Susan H. > If you are moving from Access 2007 or 2010 and are using the attachment > field type it will not upsize. I had a client who required this type of > functionality and had to create similar functionality in SQL Server. As an > aside we were having issues with the form with the attachment field being > very slow in opening and updating. After getting rid of the attachment > field > and moving to a SQL server back end there was a significant increase in > responsiveness. > > > I'll be writing about upgrading to SQL Server and I'd like to include as > many of you in it as possible -- you'll get credit and a link -- it's a > nice > thing to show the boss and clients. > From ssharkins at gmail.com Thu Jul 28 14:18:17 2011 From: ssharkins at gmail.com (Susan Harkins) Date: Thu, 28 Jul 2011 15:18:17 -0400 Subject: [AccessD] Article on upgrading References: <65F646A7C57044C1B8659201D3378B55@SusanHarkins> <49A286ABF515E94A8505CD14DEB721701744A02B@CPIEMAIL-EVS1.CPIQPC.NET> Message-ID: Well Rusty... are you trying to steal my job????????? ;) Thank you! Susan H. > Just off the top of my head: > > - Do they have network stability issues (ie computers losing > connections, slow internet connection speeds, etc...) If so, if they > think they need to go to SQL because the database is slow or the backend > keeps getting corrupt, it may be they need to invest in the network and > moving to SQL won't be required. > > - What kind of machine is the backend hosted on currently? Maybe an > upgrade to that machine, or putting the backend on a more robust machine > will take care of any issues. > > - Are they running a frontend/backend setup currently? Splitting up the > database to a frontend and backend and putting copies of the frontend on > each user computer may alleviate issues they may currently be having. > > - Is user level security becoming a requirement? Access security is > easy to break and, if I remember correctly, non-existent in Access 2007 > and 2010 > > - Using multiple versions of Access on your network to run your > frontend? I've seen issues pop-up when different versions are hitting a > backend and causing slowness and corruption in the backend. Moving to a > SQL backend took care of the issues. > > - If they move to SQL, do they have a server? If not, a robust pc on a > peer-to-peer network (Express only)? If not, are they willing to invest > in one? > > - Are they hesitant to move to SQL because of cost? SQL Express is > free. > > - Are they anticipating a lot of growth? Might be wise to make the move > to SQL now so they aren't having to scramble to upgrade later. > > > Rusty > > > I'll be writing about upgrading to SQL Server and I'd like to include as > many of you in it as possible -- you'll get credit and a link -- it's a > nice thing to show the boss and clients. From ssharkins at gmail.com Thu Jul 28 14:16:38 2011 From: ssharkins at gmail.com (Susan Harkins) Date: Thu, 28 Jul 2011 15:16:38 -0400 Subject: [AccessD] Article on upgrading References: <65F646A7C57044C1B8659201D3378B55@SusanHarkins><2C78D5CF79B043E5A94FC45422B4A5C3@SusanHarkins> Message-ID: <467DB63A6DBA4FBAA3D30C3E4A9E4637@SusanHarkins> Thanks Arthur -- these are good -- :) Love your counting logic. :) Susan H. > First, why bother with the upgrade? Two potential answers: > 1, Because the DB size limit is going to be a problem. In many cases this > is > not an issue, but my philosophy is, Plan For Success, according to which > maxim what you originally thought were going to be 1K users turns out to > be > 1M users. > 2, Deploy the initial virgin in MDB or AAcdb format, and hope that it > works > for the short-term. > 3. Be prepared to go to SQL Server if you should be so lucky as to achieve > success. (Fuller's fifth law: only successful apps require upgrades; the > rest die on the vine). > > And these numbers remind me of the old joke: How many kinds of programmers > are there? Three: those who can count and those who can't. > > A. > > On Thu, Jul 28, 2011 at 2:13 PM, Susan Harkins > wrote: > >> This is good advice for actually performing an upgrade, but I'm looking >> for >> questions you might ask when deciding whether you actually should or want >> to >> upgrade -- see the difference? What kind of questions do you ask your >> clients before you actually get there -- what kinds of questions do they >> ask >> you when they begin to think about upgrading? >> >> Thanks Arthur! Please feel free to play again! ;) >> Susan H. >> >> > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com From ssharkins at gmail.com Thu Jul 28 14:19:06 2011 From: ssharkins at gmail.com (Susan Harkins) Date: Thu, 28 Jul 2011 15:19:06 -0400 Subject: [AccessD] Article on upgrading References: <65F646A7C57044C1B8659201D3378B55@SusanHarkins><49A286ABF515E94A8505CD14DEB721701744A02B@CPIEMAIL-EVS1.CPIQPC.NET> <4e31b319.8188ec0a.391e.4fa3@mx.google.com> Message-ID: <5FC2F1EA8EC84688A0D905A9EDF4C3EF@SusanHarkins> Thanks Jim -- you guys have provided some terrific thinking points! Susan H. > All the ideas presented so far are great... some I never considered. > > I would be concerned about cost. > > As Rusty stated below, do they have a server is a major consideration. > The cost of a server, the cost of the software and possibly the cost of an > SQL Server Administrator if they don't have one on staff. > > - How many users are currently using the system and how many will use it > once converted? > - What is the time-line for conversion? 2-months, 6 months or longer > - Do the PCs currently being used need to be upgraded/replaced once the > conversion is completed? If the conversion is six months away, is the > current plan to replace the user machines adequate? > - If the major consideration is performance, then upgrading to Express is > a > viable option if all things are static. Express has a 4GB data limit so > that might also be a consideration. > > From DWUTKA at Marlow.com Thu Jul 28 16:29:30 2011 From: DWUTKA at Marlow.com (Drew Wutka) Date: Thu, 28 Jul 2011 16:29:30 -0500 Subject: [AccessD] Article on upgrading In-Reply-To: References: Message-ID: I completely agree with Gustav's points, with one addition (that I can think of right now), and that would be database driven business logic. Ie, a record is put into table 1, then a record in table 2 is modified. Triggers. Drew -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: Thursday, July 28, 2011 1:29 PM To: accessd at databaseadvisors.com Subject: Re: [AccessD] Article on upgrading Hi Susan Nice to see back doing tech writing! We've never had a client asking why, they all follow my advice(!) So our reasons to suggest and upgrade: 1. Extreme reliability is requested. I have yet to see an SQL Server break down. 2. Remote access (across a WAN) is needed. 3. Easy, daily, and reliable backup is requested even when clients are on-line. 4. Database size can be expected to outgrow Access' capability. 5. Controlled and secure user access is requested. Note the non-tech level of these parameters. /gustav >>> ssharkins at gmail.com 28-07-2011 18:54:58 >>> I'll be writing about upgrading to SQL Server and I'd like to include as many of you in it as possible -- you'll get credit and a link -- it's a nice thing to show the boss and clients. The angle is -- questions you should ask when deciding whether to upgrade an Access database to SQL Server (Express is Okay too) -- specific to the decision-making process. Anything you think someone considering the move should evaluate before doing so -- but I'll be writing it from a "questions you should ask" perspective. It'll be interesting reading for the list too I think, so if nobody objects -- I see no reason to ask for these responses off list. Thanks! Susan H. -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com The information contained in this transmission is intended only for the person or entity to which it is addressed and may contain II-VI Proprietary and/or II-VI Business Sensitive material. If you are not the intended recipient, please contact the sender immediately and destroy the material in its entirety, whether electronic or hard copy. You are notified that any review, retransmission, copying, disclosure, dissemination, or other use of, or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. From darryl at whittleconsulting.com.au Thu Jul 28 18:38:16 2011 From: darryl at whittleconsulting.com.au (Darryl Collins) Date: Fri, 29 Jul 2011 09:38:16 +1000 Subject: [AccessD] Article on upgrading In-Reply-To: <65F646A7C57044C1B8659201D3378B55@SusanHarkins> References: <65F646A7C57044C1B8659201D3378B55@SusanHarkins> Message-ID: <000301cc4d7f$6cf62dc0$46e28940$@com.au> Hi Susan, For people starting out: I downloaded the brand new Denali CTP3 SQL Server Express yesterday. It is a good place to start for new users as it is fairly light and simple (as express used to be) and was totally painless to install (and that hasn't been the case in the past with SQL server installations. Only been a day so haven't had much time to play, but it has been great so far, at least on a Windows 7 PC. <> Happy. Cheers Darryl. -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Susan Harkins Sent: Friday, 29 July 2011 2:55 AM To: Access Developers discussion and problem solving Subject: [AccessD] Article on upgrading I'll be writing about upgrading to SQL Server and I'd like to include as many of you in it as possible -- you'll get credit and a link -- it's a nice thing to show the boss and clients. The angle is -- questions you should ask when deciding whether to upgrade an Access database to SQL Server (Express is Okay too) -- specific to the decision-making process. Anything you think someone considering the move should evaluate before doing so -- but I'll be writing it from a "questions you should ask" perspective. It'll be interesting reading for the list too I think, so if nobody objects -- I see no reason to ask for these responses off list. Thanks! Susan H. -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From darryl at whittleconsulting.com.au Thu Jul 28 18:40:58 2011 From: darryl at whittleconsulting.com.au (Darryl Collins) Date: Fri, 29 Jul 2011 09:40:58 +1000 Subject: [AccessD] Article on upgrading In-Reply-To: References: Message-ID: <000401cc4d7f$cd6c1660$68444320$@com.au> Triggers, Hell Yeah -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Drew Wutka Sent: Friday, 29 July 2011 7:30 AM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Article on upgrading I completely agree with Gustav's points, with one addition (that I can think of right now), and that would be database driven business logic. Ie, a record is put into table 1, then a record in table 2 is modified. Triggers. Drew -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: Thursday, July 28, 2011 1:29 PM To: accessd at databaseadvisors.com Subject: Re: [AccessD] Article on upgrading Hi Susan Nice to see back doing tech writing! We've never had a client asking why, they all follow my advice(!) So our reasons to suggest and upgrade: 1. Extreme reliability is requested. I have yet to see an SQL Server break down. 2. Remote access (across a WAN) is needed. 3. Easy, daily, and reliable backup is requested even when clients are on-line. 4. Database size can be expected to outgrow Access' capability. 5. Controlled and secure user access is requested. Note the non-tech level of these parameters. /gustav >>> ssharkins at gmail.com 28-07-2011 18:54:58 >>> I'll be writing about upgrading to SQL Server and I'd like to include as many of you in it as possible -- you'll get credit and a link -- it's a nice thing to show the boss and clients. The angle is -- questions you should ask when deciding whether to upgrade an Access database to SQL Server (Express is Okay too) -- specific to the decision-making process. Anything you think someone considering the move should evaluate before doing so -- but I'll be writing it from a "questions you should ask" perspective. It'll be interesting reading for the list too I think, so if nobody objects -- I see no reason to ask for these responses off list. Thanks! Susan H. -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com The information contained in this transmission is intended only for the person or entity to which it is addressed and may contain II-VI Proprietary and/or II-VI Business Sensitive material. If you are not the intended recipient, please contact the sender immediately and destroy the material in its entirety, whether electronic or hard copy. You are notified that any review, retransmission, copying, disclosure, dissemination, or other use of, or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From marksimms at verizon.net Fri Jul 29 09:27:54 2011 From: marksimms at verizon.net (Mark Simms) Date: Fri, 29 Jul 2011 10:27:54 -0400 Subject: [AccessD] SharePoint 2010 question(s) In-Reply-To: References: Message-ID: <000001cc4dfb$b5afa920$210efb60$@net> http://dmoffat.wordpress.com/2009/11/06/access-2010-and-sharepoint-welcome-t o-the-hybrid-access-application/ > > And what would that magic web site be? > From davidmcafee at gmail.com Fri Jul 29 11:30:55 2011 From: davidmcafee at gmail.com (David McAfee) Date: Fri, 29 Jul 2011 09:30:55 -0700 Subject: [AccessD] Article on upgrading In-Reply-To: <000401cc4d7f$cd6c1660$68444320$@com.au> References: <000401cc4d7f$cd6c1660$68444320$@com.au> Message-ID: 1. The ability to write comments in the SQL 2. The ability to do changes to data in the back end, without requiring a FE change. I know most will say that you can do this in Access too, but the FE should be for presentation of the data and a place to enter the data. Need to change a view or sproc? Change it, and as long as input parameters haven't changes, to tweaking is needed in the FE. 3. Speed 4. Ability to use UDF's 5. Stored Procedures! 6. Triggers, even though I try not to use them. I feel if the system is designed correctly, there is no reason for a trigger. Now if a system, such as an ERP, has stored procedures which are not allowed to be modified, then I can see a reason to use a trigger for a table that gets updated. 7. The ability to run scheduled jobs and back ups each night 8. The ability to email from the BE if certain conditions are found (new record found during a job ran at midnight) 9. Case statements in SQL I'm sure I can think of more reasons to use SQL :) On Thu, Jul 28, 2011 at 4:40 PM, Darryl Collins < darryl at whittleconsulting.com.au> wrote: > Triggers, Hell Yeah > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Drew Wutka > Sent: Friday, 29 July 2011 7:30 AM > To: Access Developers discussion and problem solving > Subject: Re: [AccessD] Article on upgrading > > I completely agree with Gustav's points, with one addition (that I can > think of right now), and that would be database driven business logic. > > Ie, a record is put into table 1, then a record in table 2 is modified. > Triggers. > > Drew > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Gustav Brock > Sent: Thursday, July 28, 2011 1:29 PM > To: accessd at databaseadvisors.com > Subject: Re: [AccessD] Article on upgrading > > Hi Susan > > Nice to see back doing tech writing! > > We've never had a client asking why, they all follow my advice(!) > So our reasons to suggest and upgrade: > > 1. Extreme reliability is requested. I have yet to see an SQL Server > break down. > 2. Remote access (across a WAN) is needed. > 3. Easy, daily, and reliable backup is requested even when clients are > on-line. > 4. Database size can be expected to outgrow Access' capability. > 5. Controlled and secure user access is requested. > > Note the non-tech level of these parameters. > > /gustav > > > >>> ssharkins at gmail.com 28-07-2011 18:54:58 >>> > I'll be writing about upgrading to SQL Server and I'd like to include as > many of you in it as possible -- you'll get credit and a link -- it's a > nice thing to show the boss and clients. > > The angle is -- questions you should ask when deciding whether to > upgrade an Access database to SQL Server (Express is Okay too) -- > specific to the decision-making process. Anything you think someone > considering the move should evaluate before doing so -- but I'll be > writing it from a "questions you should ask" perspective. > > It'll be interesting reading for the list too I think, so if nobody > objects -- I see no reason to ask for these responses off list. > > Thanks! > Susan H. > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > The information contained in this transmission is intended only for the > person or entity > to which it is addressed and may contain II-VI Proprietary and/or II-VI > Business > Sensitive material. If you are not the intended recipient, please contact > the sender > immediately and destroy the material in its entirety, whether electronic or > hard copy. > You are notified that any review, retransmission, copying, disclosure, > dissemination, > or other use of, or taking of any action in reliance upon this information > by persons > or entities other than the intended recipient is prohibited. > > > -- > 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 Fri Jul 29 12:40:12 2011 From: stuart at lexacorp.com.pg (Stuart McLachlan) Date: Sat, 30 Jul 2011 03:40:12 +1000 Subject: [AccessD] Article on upgrading In-Reply-To: References: , <000401cc4d7f$cd6c1660$68444320$@com.au>, Message-ID: <4E32F07C.16127.4C46D394@stuart.lexacorp.com.pg> Just to play Devil's Advocate :) - See comments in line -- Stuart On 29 Jul 2011 at 9:30, David McAfee wrote: > 1. The ability to write comments in the SQL > Access queries have a Description property which lets you store comments about the query. > 2. The ability to do changes to data in the back end, without > requiring a FE change. I know most will say that you can do this in > Access too, but the FE should be for presentation of the data and a > place to enter the data. Need to change a view or sproc? Change it, > and as long as input parameters haven't changes, to tweaking is needed > in the FE. Changes in an Access BE table are seen automatically by an Access FE. Changes in an SQL Server table are NOT seen automatically in an Access FE. You need to relink the FE to see the changes. > > 3. Speed > Sometimes. > 4. Ability to use UDF's > You can use Access functions in queries to an Access BE > 5. Stored Procedures! > VBA > 6. Triggers, even though I try not to use them. I feel if the system > is designed correctly, > there is no reason for a trigger. Now if a system, such as an ERP, > has > stored procedures > which are not allowed to be modified, then I can see a reason to > use a > trigger for a table > that gets updated. > Access 2010 has table macros/triggers. > 7. The ability to run scheduled jobs and back ups each night > I've been running scheduled jobs and backups with Access BEs since ver 97. Task Scheduler and command line arguments are your friend. > 8. The ability to email from the BE if certain conditions are found > (new record found during a job ran at midnight) > I've been writing functions to automatically email from Access based on various conditiions since ver 97. > 9. Case statements in SQL > Access queries can use IIF() and Access functions containing SELECT CASE and other more complex/powerful conditionals. > I'm sure I can think of more reasons to use SQL :) > From jwcolby at colbyconsulting.com Fri Jul 29 13:07:11 2011 From: jwcolby at colbyconsulting.com (jwcolby) Date: Fri, 29 Jul 2011 14:07:11 -0400 Subject: [AccessD] Article on upgrading In-Reply-To: <65F646A7C57044C1B8659201D3378B55@SusanHarkins> References: <65F646A7C57044C1B8659201D3378B55@SusanHarkins> Message-ID: <4E32F6CF.5050207@colbyconsulting.com> What is the server that will host SQL Server. This needs to be asked particularly if you are installing SQL Server onto the server. Windows Server 2000 cannot support SQL Server 2008 or beyond. This has to do with not supporting the .Net frameworks required. So for Windows 2000 and below, SQL Server 2005 is a good as it gets. Know that SQL Server 2008 Express is actually the 2008 R2. This matters IF any other SQL Server 2008 instances are running that are not 2008 R2 because the two versions are *not* compatible. 2008R2 can handle the non-R2 files (and backups) but 2008 cannot handle R2 files and backups. Expect to learn SQL Server security! John W. Colby www.ColbyConsulting.com On 7/28/2011 12:54 PM, Susan Harkins wrote: > I'll be writing about upgrading to SQL Server and I'd like to include as many of you in it as possible -- you'll get credit and a link -- it's a nice thing to show the boss and clients. > > The angle is -- questions you should ask when deciding whether to upgrade an Access database to SQL Server (Express is Okay too) -- specific to the decision-making process. Anything you think someone considering the move should evaluate before doing so -- but I'll be writing it from a "questions you should ask" perspective. > > It'll be interesting reading for the list too I think, so if nobody objects -- I see no reason to ask for these responses off list. > > Thanks! > Susan H. From ssharkins at gmail.com Fri Jul 29 13:33:35 2011 From: ssharkins at gmail.com (Susan Harkins) Date: Fri, 29 Jul 2011 14:33:35 -0400 Subject: [AccessD] Article on upgrading References: <65F646A7C57044C1B8659201D3378B55@SusanHarkins> <4E32F6CF.5050207@colbyconsulting.com> Message-ID: Thanks John! Susan H. > What is the server that will host SQL Server. This needs to be asked > particularly if you are installing SQL Server onto the server. Windows > Server 2000 cannot support SQL Server 2008 or beyond. This has to do with > not supporting the .Net frameworks required. So for Windows 2000 and > below, SQL Server 2005 is a good as it gets. > > Know that SQL Server 2008 Express is actually the 2008 R2. This matters > IF any other SQL Server 2008 instances are running that are not 2008 R2 > because the two versions are *not* compatible. 2008R2 can handle the > non-R2 files (and backups) but 2008 cannot handle R2 files and backups. > > Expect to learn SQL Server security! > From davidmcafee at gmail.com Fri Jul 29 13:37:52 2011 From: davidmcafee at gmail.com (David McAfee) Date: Fri, 29 Jul 2011 11:37:52 -0700 Subject: [AccessD] Article on upgrading In-Reply-To: <4E32F07C.16127.4C46D394@stuart.lexacorp.com.pg> References: <000401cc4d7f$cd6c1660$68444320$@com.au> <4E32F07C.16127.4C46D394@stuart.lexacorp.com.pg> Message-ID: Stuart I agree with you on all topics. I've done things with Access that some people don't even know it's even possible to do, which is why those same people consider it a toy. in regards to #1, I meant inline comments as is done in VBA: INSERT INTO tblSomeTable (field1, field2...) SELECT field1, field2 FROM tblSomeWhereElse WHERE Something =1 AND HireDate > @SomeDate --Added on 1/1/2011 for some stupid reason AND SomeOtherReason = @TheCriteria --Added 7/1/2011 because someone decided this is now needed Another reason I love the inline comments is I've had some accountants have me add criteria, then question it 6 months later so I tend to put stuff in the stored procedure (used for a report) that reminds me so. --AND Status Flag IN ('A','R')-- old criteria prior to 6/9/2009 AND Status Flag IN ('A','R','V')--Added on 6/9/2009 as per chuck's email asking for this I love emailing them their original email asking for it to be changed. #2, I guess I'm used to dealing more with ADPs than MDBs. But this too, was worded badly. A stored procedure needs to be changed because a new table needs to be added or criteria changed in WHERE clause. If this was a non split mdb or if the user was creating the dynamic sql in the FE (not just access but VB/C# FE's too), the FE would have to be changed. SQL using ADPs or C#,VB.NET, Web FE's see the change instantly. #3 When have you seen access return a resultset faster than SQL? #4 Yes, you can use functions in the FE, but once again, if it can be done in the BE and does not slow it down, and allows changes without affecting the FE, I prefer doing it back there. #5 :) #6 They're still triggers. Bleh! :P #7 I do this too, but it is nice to have a built in feature that does this. #8 me too, but like I said above, it's nice to have something built in do this. #9 true, but it gets ugly when you have to do a lot of case statements. SELECT CASE WHEN X=0 THEN 'You are Royally Fd today!' CASE WHEN x=1 and Sky=blue and StarsInTheSky =0 THEN 'Its a perfect world' CASE WHEN x=1 and Sky = gray and StarsInTheSky=0 THEN 'MustBeMonday' CASE WHEN X=1 and Sky = black and StartsInTheSky =1 THEN 'Enjoy the night!' --Many more cases here ELSE 'Just a normal day' END AS TypeOfDay #10, Oh, I remember now, restore back in time!!!! I've never had to use this for reasons of my own but I've had other developers yell out "OH SHIT" when testing something on a live system and not use a transaction/rollback. no prob, restore to a point back in time, like 10 minutes. done. :) On Fri, Jul 29, 2011 at 10:40 AM, Stuart McLachlan wrote: > Just to play Devil's Advocate :) > - See comments in line > > -- > Stuart > > On 29 Jul 2011 at 9:30, David McAfee wrote: > > > 1. The ability to write comments in the SQL > > > > Access queries have a Description property which lets you store comments > about the query. > > > 2. The ability to do changes to data in the back end, without > > requiring a FE change. I know most will say that you can do this in > > Access too, but the FE should be for presentation of the data and a > > place to enter the data. Need to change a view or sproc? Change it, > > and as long as input parameters haven't changes, to tweaking is needed > > in the FE. > > Changes in an Access BE table are seen automatically by an Access FE. > Changes in an > SQL Server table are NOT seen automatically in an Access FE. You need to > relink the FE to > see the changes. > > > > > 3. Speed > > > > Sometimes. > > > 4. Ability to use UDF's > > > > You can use Access functions in queries to an Access BE > > > 5. Stored Procedures! > > > > VBA > > > 6. Triggers, even though I try not to use them. I feel if the system > > is designed correctly, > > there is no reason for a trigger. Now if a system, such as an ERP, > > has > > stored procedures > > which are not allowed to be modified, then I can see a reason to > > use a > > trigger for a table > > that gets updated. > > > > Access 2010 has table macros/triggers. > > > 7. The ability to run scheduled jobs and back ups each night > > > > I've been running scheduled jobs and backups with Access BEs since ver 97. > Task > Scheduler and command line arguments are your friend. > > > 8. The ability to email from the BE if certain conditions are found > > (new record found during a job ran at midnight) > > > > I've been writing functions to automatically email from Access based on > various conditiions > since ver 97. > > > 9. Case statements in SQL > > > > Access queries can use IIF() and Access functions containing SELECT CASE > and other > more complex/powerful conditionals. > > > > I'm sure I can think of more reasons to use SQL :) > > > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > From darryl at whittleconsulting.com.au Sun Jul 31 22:28:26 2011 From: darryl at whittleconsulting.com.au (Darryl Collins) Date: Mon, 1 Aug 2011 13:28:26 +1000 Subject: [AccessD] rsR("order") vs rsR!Order In-Reply-To: References: <000401cc4d7f$cd6c1660$68444320$@com.au> <4E32F07C.16127.4C46D394@stuart.lexacorp.com.pg> Message-ID: <000a01cc4ffb$149ef890$3ddce9b0$@com.au> Hi guys & Gals, Slower day at work today so I was poking around some code they use here in my new role and found this syntax when dealing with recordsets in Access VBA rsR.AddNew rsR("order") = rsM("order") rsR("sheetname") = rsM("sheetname") rsR("sheetnumber") = rsM("sheetnumber") rsR.Update It is very, ummm, MS Excel in style, but it does work ok and update the recordset(s) correctly. However I would have written it like: With rsR .AddNew !order = rsM!order !sheetname = rsM!sheetname !sheetnumber = rsM!sheetnumber !Update End with Not withstanding then with / end with bit. What is the advantage (if any) of one syntax over the other? Is one method faster? Actually, Why does the first syntax even work? I would have though you would have had to use the ! method, but very clearly I am totally wrong on that count. I had not seen code used like that before for MS Access recordsets. Maybe I need to get out more? Your thoughts? Cheers Darryl