From Darryl.Collins at anz.com Thu Oct 1 00:06:31 2009 From: Darryl.Collins at anz.com (Collins, Darryl) Date: Thu, 1 Oct 2009 15:06:31 +1000 Subject: [AccessD] treeview control In-Reply-To: <008301ca41ca$578ae4c0$bc5fa27a@personald6374f> Message-ID: <6DC4725FDCDD72428D6114F1B6CC6E81C7951E@EXUAU020HWT110.oceania.corp.anz.com> Nice... I can see how this would be useful in the right app. Cheers Darryl -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of A.D.Tejpal Sent: Wednesday, 30 September 2009 10:31 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] treeview control Dale, My sample db named Form_Treeview might be of interest to you. It is available at Rogers Access Library. Link - http://www.rogersaccesslibrary.com/forum/forum_topics.asp?FID=45 This sample is in Access 2000 file format and works on Access 2007 as well. It demonstrates two styles of treeview, one represents employees organization chart, while the other facilitates marking of student grades in a convenient manner. In both cases, there is two way synchronization between the treeview and adjacent subform, for navigation and editing. An interesting feature has been incorporated in employees version. Whichever happens to be the current employee, complete chain of command is highlighted. The employee and his top boss are shown in two different colors while all intermediate supervisors in direct chain of command are shown in another color. This highlighting gets implemented on the treeview as well as subform in identical style. If an employee node is dragged over to another employee or department, the resulting modified structure gets displayed on the treeview as well as subform, duly highlighting the revised chain of command in the manner described in previous para. Note: This is a fresh sample db and as mentioned at the end of explanatory notes accompanying the sample, Drew's wonderful series of posts on treeview control, and Arthur's excellent article on the subject (in DatabaseAdvisors) have been of great help. Best wishes, A.D. Tejpal ------------ ----- Original Message ----- From: Dale Kalsow To: Access Developers discussion and problem solving Sent: Wednesday, September 23, 2009 01:14 Subject: [AccessD] treeview control Good Afternoon, Does anyone have a simple treeview example for Access 2007, they are willing to share? Thanks! Dale -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com "This e-mail and any attachments to it (the "Communication") is, unless otherwise stated, confidential, may contain copyright material and is for the use only of the intended recipient. If you receive the Communication in error, please notify the sender immediately by return e-mail, delete the Communication and the return e-mail, and do not read, copy, retransmit or otherwise deal with it. Any views expressed in the Communication are those of the individual sender only, unless expressly stated to be those of Australia and New Zealand Banking Group Limited ABN 11 005 357 522, or any of its related entities including ANZ National Bank Limited (together "ANZ"). ANZ does not accept liability in connection with the integrity of or errors in the Communication, computer virus, data corruption, interference or delay arising from or in respect of the Communication." From Gustav at cactus.dk Thu Oct 1 01:04:16 2009 From: Gustav at cactus.dk (Gustav Brock) Date: Thu, 01 Oct 2009 08:04:16 +0200 Subject: [AccessD] Filtering an SQL based OpenRecordset Message-ID: Hi John Only testing can reveal what to choose. For "normal" recordsets I don't think you can tell the difference. /gustav >>> john at winhaven.net 30-09-2009 23:09 >>> Thanks Gustav, Since these recordsets are only used for printing reports should I use the constant dbOpenSnapshot? From jimdettman at verizon.net Thu Oct 1 07:09:58 2009 From: jimdettman at verizon.net (Jim Dettman) Date: Thu, 01 Oct 2009 08:09:58 -0400 Subject: [AccessD] Table size In-Reply-To: <4ac3f442.1818d00a.41d2.4f2e@mx.google.com> References: <4AC3AFB4.5010103@colbyconsulting.com> <4ac3d7f0.0a04d00a.6dec.00fc@mx.google.com> <4ac3dfcb.0702d00a.74c0.2ddd@mx.google.com> <4AC3F265.5050404@colbyconsulting.com> <4ac3f442.1818d00a.41d2.4f2e@mx.google.com> Message-ID: <9957602AFA27466299E4FB041C1CB53C@XPS> Max, <> Been there many times. Sometime I feel like I live in the stone age when I see a lot of the stuff on EE. <> Not here and I hope the reverse is true as well. I really was just trying to point out that it's a thornier problem then it first appears. To really do it right, you'd need to scan every page in the DB assigned to the table or do a compact and then just add up all the pages assigned to the table. And while the data page layouts for Jet 3.0 and 4.0 are pretty well known, what's known about the index pages and page usage maps are fuzzy at best. And then there are details such as page padding (leaving free space for new data); does JET do it or not? So even scanning all the pages and getting a very accurate storage count of the data still might not tell you how much space a table would occupy. If the fill factor was 50%, you could be off by quite a bit. The best approach I guess would be a compact, then just count the pages assigned to the tables and indexes. Without going through all that, the only realistic approach I've found is to import a single table into a fresh MDB and then check the size. That is accurate, but it's a lot of manual work. And now that I say that, I think between all of us we could come up with some code to do that automatically fairly quickly for a given DB. In fact I'll see if I can squeeze out some time latter today to do that. Would not be all that hard; read the tabledefs, create a scratch DB, transfer the table, get the on disk size of the scratch DB, save info into a table, delete scratch DB, and repeat till done. In fact I'm left wondering why someone hasn't done that already... Jim. -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Max Wanadoo Sent: Wednesday, September 30, 2009 8:13 PM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Table size Oh no, I didn't mean it that way. What I meant was the guys (and gals) on this site are amazing with their knowledge and skills. Impossible to keep up with. I think I have done something "clever" and the say "yeah, watch this bud". Hope I didn't offend anybody. Emails sometimes can be difficult. Anyway, John. Hope you got something out of it all - LOL. But, hey, tell you what, this might develop into a useful item. I never even considered Indexes. What about Reference overheads. Tons of stuff. Max -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: 01 October 2009 01:06 To: Access Developers discussion and problem solving Subject: Re: [AccessD] Table size ROTFL. Don't worry about it Max. If it was easy MS would hand it off to the same summer interns that design North Wind DB and they would screw it up. John W. Colby www.ColbyConsulting.com Max Wanadoo wrote: > Sometime, you guys are just impossible... > > Max > > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Jim Dettman > Sent: 30 September 2009 23:36 > To: 'Access Developers discussion and problem solving' > Subject: Re: [AccessD] Table size > > > Below is some code that may come a bit closer, but even so field size > measures characters, not storage space. Plus your not taking into account > variable length fields, any of the database overhead (page and DB), or > indexes associated with a table. > > So even at best, all this will be off by quite a bit. > > Jim. > > Public Sub showSizes() > Dim sql As String > Dim td As TableDef > Dim recordSize As Long > Dim numRecords As Long > Dim inMemos As Long > Dim CurrentDb As Database > > Set CurrentDb = gTL1DB > > ' Create a temporary table for results: > > ' delete the table first, in case it's still there > On Error Resume Next > CurrentDb.Execute "DROP TABLE T___tmp" > On Error GoTo 0 > > sql = "CREATE TABLE T___tmp(name TEXT (100), size INTEGER," > sql = sql & " recordSize INTEGER, numRecords INTEGER, inMemos INTEGER)" > CurrentDb.Execute sql > > Dim rs As Recordset > > Set rs = CurrentDb.OpenRecordset("T___tmp") > > ' for each table, add a record in T___tmp with its size info. > > For Each td In CurrentDb.TableDefs > recordSize = 0 > numRecords = 0 > inMemos = 0 > > rs.AddNew > rs!name = td.name > rs!size = sizeEstimate(td.name, recordSize, numRecords, inMemos) > rs!recordSize = recordSize > rs!numRecords = numRecords > rs!inMemos = inMemos > rs.Update > Next td > rs.Close > > ' print table size info in decreasing order of size > Set rs = CurrentDb.OpenRecordset("SELECT * FROM T___tmp ORDER BY size DESC") > Do Until rs.EOF > If rs!size > 0 Then > Debug.Print rs!name; Tab(20); rs!size; Tab(30); " = "; rs!inMemos; > Debug.Print Tab(45); "+ ("; rs!recordSize; Tab(55); " * "; > rs!numRecords; ")" > Else > Exit Do > End If > rs.MoveNext > Loop > rs.Close > > End Sub > > Public Function sizeEstimate(tableName As String, recordSize As Long, > numRecords As Long, inMemos As Long) As Long > Dim rs As Recordset > Dim fld As field > Dim msg As Integer > Dim CurrentDb As Database > Dim colMemos As New Collection > > > Set CurrentDb = gTL1DB > > On Error Resume Next > Set rs = CurrentDb.OpenRecordset(tableName) > If Err Then > sizeEstimate = 0 > Exit Function > End If > If rs.EOF Then > sizeEstimate = 0 > Exit Function > End If > rs.MoveLast > numRecords = rs.RecordCount > 'Debug.Print > 'Debug.Print tableName > ' get the size of the fixed-size fields > For Each fld In rs.Fields > recordSize = recordSize + fld.size > If fld.Type = dbMemo Or fld.Type = dbLongBinary Then > colMemos.Add fld.name > End If > ' Debug.Print fld.name; " size "; fld.size > Next fld > > sizeEstimate = (recordSize * numRecords) 'Bytes > > Dim ff As Variant > ' add up all the memo and long binary fields in > ' all the records. > If colMemos.count > 0 Then > rs.MoveFirst > Do Until rs.EOF > For Each ff In colMemos > inMemos = inMemos + rs.Fields(ff).FieldSize > Next ff > rs.MoveNext > Loop > End If > > sizeEstimate = sizeEstimate + inMemos > > 'If SizeEstimate > 1073741824 Then '1073741824 Bytes per GigaByte > ' msg = MsgBox("This view may still be larger than 1 GB. Do you wish to > continue?", vbOKCancel + vbCritical, "View Size Warning") > ' If msg = 2 Then GoTo SizeEstimate_Exit > 'End If > > sizeEstimate_Exit: > rs.Close > End Function > > > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Max Wanadoo > Sent: Wednesday, September 30, 2009 6:13 PM > To: 'Access Developers discussion and problem solving' > Subject: Re: [AccessD] Table size > > You could try something like this (below). > Knowing how many records you deal with, I have made the variable DOUBLES > > Not entirely sure it is accurate as I have only just written it and never > tested it in real life, but it may help. > > Max > > Sub sGetTableSizes() > Dim dbs As DAO.Database, tbl As DAO.TableDef > Dim sql As String, fld As Field, dblTotSize As Double > Dim dblFldSize As Double, dblRecCount As Double, dblTableSize As Double > Set dbs = CurrentDb > For Each tbl In CurrentDb.TableDefs > If Not Left(tbl.Name, 1) = "~" And Not Left(tbl.Name, 4) = "Msys" Then > dblRecCount = DCount("*", tbl.Name) > dblFldSize = 0 > For Each fld In tbl.Fields > dblFldSize = dblFldSize + fld.Size > Next fld > dblTableSize = dblFldSize * dblRecCount > Debug.Print tbl.Name, dblTableSize > End If > dblTotSize = dblTotSize + dblTableSize > Next tbl > MsgBox "Total Size: " & Format(dblTotSize, "##,##") > exithere: > Set dbs = Nothing: Set tbl = Nothing > Exit Sub > End Sub > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby > Sent: 30 September 2009 20:21 > To: Access Developers discussion and problem solving > Subject: [AccessD] Table size > > Is there any direct way to obtain the total storage used for each table. A > client is approaching > the 2 gb limit and needs to split the BE. > -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From max.wanadoo at gmail.com Thu Oct 1 07:20:41 2009 From: max.wanadoo at gmail.com (Max Wanadoo) Date: Thu, 1 Oct 2009 13:20:41 +0100 Subject: [AccessD] Table size In-Reply-To: <9957602AFA27466299E4FB041C1CB53C@XPS> References: <4AC3AFB4.5010103@colbyconsulting.com> <4ac3d7f0.0a04d00a.6dec.00fc@mx.google.com> <4ac3dfcb.0702d00a.74c0.2ddd@mx.google.com> <4AC3F265.5050404@colbyconsulting.com> <4ac3f442.1818d00a.41d2.4f2e@mx.google.com> <9957602AFA27466299E4FB041C1CB53C@XPS> Message-ID: <4ac49ebc.0707d00a.7b2e.2154@mx.google.com> >>In fact I'm left wondering why someone hasn't done that already Well, if anybody is going to ask a question which has never been asked/answered before, you can bet it will be JC. Might try that approach myself...hmmm..create a temp mdb, copy stuff to it and check the disk size. That might work. Max -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Jim Dettman Sent: 01 October 2009 13:10 To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Table size Max, <> Been there many times. Sometime I feel like I live in the stone age when I see a lot of the stuff on EE. <> Not here and I hope the reverse is true as well. I really was just trying to point out that it's a thornier problem then it first appears. To really do it right, you'd need to scan every page in the DB assigned to the table or do a compact and then just add up all the pages assigned to the table. And while the data page layouts for Jet 3.0 and 4.0 are pretty well known, what's known about the index pages and page usage maps are fuzzy at best. And then there are details such as page padding (leaving free space for new data); does JET do it or not? So even scanning all the pages and getting a very accurate storage count of the data still might not tell you how much space a table would occupy. If the fill factor was 50%, you could be off by quite a bit. The best approach I guess would be a compact, then just count the pages assigned to the tables and indexes. Without going through all that, the only realistic approach I've found is to import a single table into a fresh MDB and then check the size. That is accurate, but it's a lot of manual work. And now that I say that, I think between all of us we could come up with some code to do that automatically fairly quickly for a given DB. In fact I'll see if I can squeeze out some time latter today to do that. Would not be all that hard; read the tabledefs, create a scratch DB, transfer the table, get the on disk size of the scratch DB, save info into a table, delete scratch DB, and repeat till done. In fact I'm left wondering why someone hasn't done that already... Jim. -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Max Wanadoo Sent: Wednesday, September 30, 2009 8:13 PM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Table size Oh no, I didn't mean it that way. What I meant was the guys (and gals) on this site are amazing with their knowledge and skills. Impossible to keep up with. I think I have done something "clever" and the say "yeah, watch this bud". Hope I didn't offend anybody. Emails sometimes can be difficult. Anyway, John. Hope you got something out of it all - LOL. But, hey, tell you what, this might develop into a useful item. I never even considered Indexes. What about Reference overheads. Tons of stuff. Max -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: 01 October 2009 01:06 To: Access Developers discussion and problem solving Subject: Re: [AccessD] Table size ROTFL. Don't worry about it Max. If it was easy MS would hand it off to the same summer interns that design North Wind DB and they would screw it up. John W. Colby www.ColbyConsulting.com Max Wanadoo wrote: > Sometime, you guys are just impossible... > > Max > > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Jim Dettman > Sent: 30 September 2009 23:36 > To: 'Access Developers discussion and problem solving' > Subject: Re: [AccessD] Table size > > > Below is some code that may come a bit closer, but even so field size > measures characters, not storage space. Plus your not taking into account > variable length fields, any of the database overhead (page and DB), or > indexes associated with a table. > > So even at best, all this will be off by quite a bit. > > Jim. > > Public Sub showSizes() > Dim sql As String > Dim td As TableDef > Dim recordSize As Long > Dim numRecords As Long > Dim inMemos As Long > Dim CurrentDb As Database > > Set CurrentDb = gTL1DB > > ' Create a temporary table for results: > > ' delete the table first, in case it's still there > On Error Resume Next > CurrentDb.Execute "DROP TABLE T___tmp" > On Error GoTo 0 > > sql = "CREATE TABLE T___tmp(name TEXT (100), size INTEGER," > sql = sql & " recordSize INTEGER, numRecords INTEGER, inMemos INTEGER)" > CurrentDb.Execute sql > > Dim rs As Recordset > > Set rs = CurrentDb.OpenRecordset("T___tmp") > > ' for each table, add a record in T___tmp with its size info. > > For Each td In CurrentDb.TableDefs > recordSize = 0 > numRecords = 0 > inMemos = 0 > > rs.AddNew > rs!name = td.name > rs!size = sizeEstimate(td.name, recordSize, numRecords, inMemos) > rs!recordSize = recordSize > rs!numRecords = numRecords > rs!inMemos = inMemos > rs.Update > Next td > rs.Close > > ' print table size info in decreasing order of size > Set rs = CurrentDb.OpenRecordset("SELECT * FROM T___tmp ORDER BY size DESC") > Do Until rs.EOF > If rs!size > 0 Then > Debug.Print rs!name; Tab(20); rs!size; Tab(30); " = "; rs!inMemos; > Debug.Print Tab(45); "+ ("; rs!recordSize; Tab(55); " * "; > rs!numRecords; ")" > Else > Exit Do > End If > rs.MoveNext > Loop > rs.Close > > End Sub > > Public Function sizeEstimate(tableName As String, recordSize As Long, > numRecords As Long, inMemos As Long) As Long > Dim rs As Recordset > Dim fld As field > Dim msg As Integer > Dim CurrentDb As Database > Dim colMemos As New Collection > > > Set CurrentDb = gTL1DB > > On Error Resume Next > Set rs = CurrentDb.OpenRecordset(tableName) > If Err Then > sizeEstimate = 0 > Exit Function > End If > If rs.EOF Then > sizeEstimate = 0 > Exit Function > End If > rs.MoveLast > numRecords = rs.RecordCount > 'Debug.Print > 'Debug.Print tableName > ' get the size of the fixed-size fields > For Each fld In rs.Fields > recordSize = recordSize + fld.size > If fld.Type = dbMemo Or fld.Type = dbLongBinary Then > colMemos.Add fld.name > End If > ' Debug.Print fld.name; " size "; fld.size > Next fld > > sizeEstimate = (recordSize * numRecords) 'Bytes > > Dim ff As Variant > ' add up all the memo and long binary fields in > ' all the records. > If colMemos.count > 0 Then > rs.MoveFirst > Do Until rs.EOF > For Each ff In colMemos > inMemos = inMemos + rs.Fields(ff).FieldSize > Next ff > rs.MoveNext > Loop > End If > > sizeEstimate = sizeEstimate + inMemos > > 'If SizeEstimate > 1073741824 Then '1073741824 Bytes per GigaByte > ' msg = MsgBox("This view may still be larger than 1 GB. Do you wish to > continue?", vbOKCancel + vbCritical, "View Size Warning") > ' If msg = 2 Then GoTo SizeEstimate_Exit > 'End If > > sizeEstimate_Exit: > rs.Close > End Function > > > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Max Wanadoo > Sent: Wednesday, September 30, 2009 6:13 PM > To: 'Access Developers discussion and problem solving' > Subject: Re: [AccessD] Table size > > You could try something like this (below). > Knowing how many records you deal with, I have made the variable DOUBLES > > Not entirely sure it is accurate as I have only just written it and never > tested it in real life, but it may help. > > Max > > Sub sGetTableSizes() > Dim dbs As DAO.Database, tbl As DAO.TableDef > Dim sql As String, fld As Field, dblTotSize As Double > Dim dblFldSize As Double, dblRecCount As Double, dblTableSize As Double > Set dbs = CurrentDb > For Each tbl In CurrentDb.TableDefs > If Not Left(tbl.Name, 1) = "~" And Not Left(tbl.Name, 4) = "Msys" Then > dblRecCount = DCount("*", tbl.Name) > dblFldSize = 0 > For Each fld In tbl.Fields > dblFldSize = dblFldSize + fld.Size > Next fld > dblTableSize = dblFldSize * dblRecCount > Debug.Print tbl.Name, dblTableSize > End If > dblTotSize = dblTotSize + dblTableSize > Next tbl > MsgBox "Total Size: " & Format(dblTotSize, "##,##") > exithere: > Set dbs = Nothing: Set tbl = Nothing > Exit Sub > End Sub > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby > Sent: 30 September 2009 20:21 > To: Access Developers discussion and problem solving > Subject: [AccessD] Table size > > Is there any direct way to obtain the total storage used for each table. A > client is approaching > the 2 gb limit and needs to split the BE. > -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/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 Thu Oct 1 07:53:56 2009 From: jwcolby at colbyconsulting.com (jwcolby) Date: Thu, 01 Oct 2009 08:53:56 -0400 Subject: [AccessD] Table size In-Reply-To: <9957602AFA27466299E4FB041C1CB53C@XPS> References: <4AC3AFB4.5010103@colbyconsulting.com> <4ac3d7f0.0a04d00a.6dec.00fc@mx.google.com> <4ac3dfcb.0702d00a.74c0.2ddd@mx.google.com> <4AC3F265.5050404@colbyconsulting.com> <4ac3f442.1818d00a.41d2.4f2e@mx.google.com> <9957602AFA27466299E4FB041C1CB53C@XPS> Message-ID: <4AC4A664.6070409@colbyconsulting.com> Jim, > In fact I'm left wondering why someone hasn't done that already... Because we all work for a living and no one wants to pay us to develop that? ;) But you are correct, it wouldn't be that tough to do. John W. Colby www.ColbyConsulting.com Jim Dettman wrote: > Max, > > < this site are amazing with their knowledge and skills. Impossible to keep > up with. I think I have done something "clever" and the say "yeah, watch > this bud".>> > > Been there many times. Sometime I feel like I live in the stone age when > I see a lot of the stuff on EE. > > <> > > Not here and I hope the reverse is true as well. I really was just trying > to point out that it's a thornier problem then it first appears. To really > do it right, you'd need to scan every page in the DB assigned to the table > or do a compact and then just add up all the pages assigned to the table. > And while the data page layouts for Jet 3.0 and 4.0 are pretty well known, > what's known about the index pages and page usage maps are fuzzy at best. > > And then there are details such as page padding (leaving free space for > new data); does JET do it or not? So even scanning all the pages and > getting a very accurate storage count of the data still might not tell you > how much space a table would occupy. If the fill factor was 50%, you could > be off by quite a bit. The best approach I guess would be a compact, then > just count the pages assigned to the tables and indexes. > > Without going through all that, the only realistic approach I've found is > to import a single table into a fresh MDB and then check the size. That is > accurate, but it's a lot of manual work. And now that I say that, I think > between all of us we could come up with some code to do that automatically > fairly quickly for a given DB. In fact I'll see if I can squeeze out some > time latter today to do that. Would not be all that hard; read the > tabledefs, create a scratch DB, transfer the table, get the on disk size of > the scratch DB, save info into a table, delete scratch DB, and repeat till > done. > > In fact I'm left wondering why someone hasn't done that already... > > Jim. > > > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Max Wanadoo > Sent: Wednesday, September 30, 2009 8:13 PM > To: 'Access Developers discussion and problem solving' > Subject: Re: [AccessD] Table size > > Oh no, I didn't mean it that way. What I meant was the guys (and gals) on > this site are amazing with their knowledge and skills. Impossible to keep > up with. I think I have done something "clever" and the say "yeah, watch > this bud". > > Hope I didn't offend anybody. Emails sometimes can be difficult. > > Anyway, John. Hope you got something out of it all - LOL. > > > But, hey, tell you what, this might develop into a useful item. I never > even considered Indexes. What about Reference overheads. Tons of stuff. > > > Max > > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby > Sent: 01 October 2009 01:06 > To: Access Developers discussion and problem solving > Subject: Re: [AccessD] Table size > > ROTFL. Don't worry about it Max. If it was easy MS would hand it off to > the same summer interns > that design North Wind DB and they would screw it up. > > John W. Colby > www.ColbyConsulting.com > > > Max Wanadoo wrote: >> Sometime, you guys are just impossible... >> >> Max >> >> >> -----Original Message----- >> From: accessd-bounces at databaseadvisors.com >> [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Jim Dettman >> Sent: 30 September 2009 23:36 >> To: 'Access Developers discussion and problem solving' >> Subject: Re: [AccessD] Table size >> >> >> Below is some code that may come a bit closer, but even so field size >> measures characters, not storage space. Plus your not taking into account >> variable length fields, any of the database overhead (page and DB), or >> indexes associated with a table. >> >> So even at best, all this will be off by quite a bit. >> >> Jim. >> >> Public Sub showSizes() >> Dim sql As String >> Dim td As TableDef >> Dim recordSize As Long >> Dim numRecords As Long >> Dim inMemos As Long >> Dim CurrentDb As Database >> >> Set CurrentDb = gTL1DB >> >> ' Create a temporary table for results: >> >> ' delete the table first, in case it's still there >> On Error Resume Next >> CurrentDb.Execute "DROP TABLE T___tmp" >> On Error GoTo 0 >> >> sql = "CREATE TABLE T___tmp(name TEXT (100), size INTEGER," >> sql = sql & " recordSize INTEGER, numRecords INTEGER, inMemos INTEGER)" >> CurrentDb.Execute sql >> >> Dim rs As Recordset >> >> Set rs = CurrentDb.OpenRecordset("T___tmp") >> >> ' for each table, add a record in T___tmp with its size info. >> >> For Each td In CurrentDb.TableDefs >> recordSize = 0 >> numRecords = 0 >> inMemos = 0 >> >> rs.AddNew >> rs!name = td.name >> rs!size = sizeEstimate(td.name, recordSize, numRecords, inMemos) >> rs!recordSize = recordSize >> rs!numRecords = numRecords >> rs!inMemos = inMemos >> rs.Update >> Next td >> rs.Close >> >> ' print table size info in decreasing order of size >> Set rs = CurrentDb.OpenRecordset("SELECT * FROM T___tmp ORDER BY size > DESC") >> Do Until rs.EOF >> If rs!size > 0 Then >> Debug.Print rs!name; Tab(20); rs!size; Tab(30); " = "; rs!inMemos; >> Debug.Print Tab(45); "+ ("; rs!recordSize; Tab(55); " * "; >> rs!numRecords; ")" >> Else >> Exit Do >> End If >> rs.MoveNext >> Loop >> rs.Close >> >> End Sub >> >> Public Function sizeEstimate(tableName As String, recordSize As Long, >> numRecords As Long, inMemos As Long) As Long >> Dim rs As Recordset >> Dim fld As field >> Dim msg As Integer >> Dim CurrentDb As Database >> Dim colMemos As New Collection >> >> >> Set CurrentDb = gTL1DB >> >> On Error Resume Next >> Set rs = CurrentDb.OpenRecordset(tableName) >> If Err Then >> sizeEstimate = 0 >> Exit Function >> End If >> If rs.EOF Then >> sizeEstimate = 0 >> Exit Function >> End If >> rs.MoveLast >> numRecords = rs.RecordCount >> 'Debug.Print >> 'Debug.Print tableName >> ' get the size of the fixed-size fields >> For Each fld In rs.Fields >> recordSize = recordSize + fld.size >> If fld.Type = dbMemo Or fld.Type = dbLongBinary Then >> colMemos.Add fld.name >> End If >> ' Debug.Print fld.name; " size "; fld.size >> Next fld >> >> sizeEstimate = (recordSize * numRecords) 'Bytes >> >> Dim ff As Variant >> ' add up all the memo and long binary fields in >> ' all the records. >> If colMemos.count > 0 Then >> rs.MoveFirst >> Do Until rs.EOF >> For Each ff In colMemos >> inMemos = inMemos + rs.Fields(ff).FieldSize >> Next ff >> rs.MoveNext >> Loop >> End If >> >> sizeEstimate = sizeEstimate + inMemos >> >> 'If SizeEstimate > 1073741824 Then '1073741824 Bytes per GigaByte >> ' msg = MsgBox("This view may still be larger than 1 GB. Do you wish > to >> continue?", vbOKCancel + vbCritical, "View Size Warning") >> ' If msg = 2 Then GoTo SizeEstimate_Exit >> 'End If >> >> sizeEstimate_Exit: >> rs.Close >> End Function >> >> >> >> -----Original Message----- >> From: accessd-bounces at databaseadvisors.com >> [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Max Wanadoo >> Sent: Wednesday, September 30, 2009 6:13 PM >> To: 'Access Developers discussion and problem solving' >> Subject: Re: [AccessD] Table size >> >> You could try something like this (below). >> Knowing how many records you deal with, I have made the variable DOUBLES >> >> Not entirely sure it is accurate as I have only just written it and never >> tested it in real life, but it may help. >> >> Max >> >> Sub sGetTableSizes() >> Dim dbs As DAO.Database, tbl As DAO.TableDef >> Dim sql As String, fld As Field, dblTotSize As Double >> Dim dblFldSize As Double, dblRecCount As Double, dblTableSize As > Double >> Set dbs = CurrentDb >> For Each tbl In CurrentDb.TableDefs >> If Not Left(tbl.Name, 1) = "~" And Not Left(tbl.Name, 4) = "Msys" > Then >> dblRecCount = DCount("*", tbl.Name) >> dblFldSize = 0 >> For Each fld In tbl.Fields >> dblFldSize = dblFldSize + fld.Size >> Next fld >> dblTableSize = dblFldSize * dblRecCount >> Debug.Print tbl.Name, dblTableSize >> End If >> dblTotSize = dblTotSize + dblTableSize >> Next tbl >> MsgBox "Total Size: " & Format(dblTotSize, "##,##") >> exithere: >> Set dbs = Nothing: Set tbl = Nothing >> Exit Sub >> End Sub >> >> -----Original Message----- >> From: accessd-bounces at databaseadvisors.com >> [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby >> Sent: 30 September 2009 20:21 >> To: Access Developers discussion and problem solving >> Subject: [AccessD] Table size >> >> Is there any direct way to obtain the total storage used for each table. > A >> client is approaching >> the 2 gb limit and needs to split the BE. >> From dkalsow at yahoo.com Thu Oct 1 08:37:37 2009 From: dkalsow at yahoo.com (Dale Kalsow) Date: Thu, 1 Oct 2009 06:37:37 -0700 (PDT) Subject: [AccessD] Access 2007 - Report Detail On Format Event In-Reply-To: <6DC4725FDCDD72428D6114F1B6CC6E81C7951E@EXUAU020HWT110.oceania.corp.anz.com> Message-ID: <864695.19189.qm@web50410.mail.re2.yahoo.com> Good Morning Everyone, ? Has anyone see a problem in access 2007 with the report detail on format event?? I have some code I want to run in that section and it never fires.? I have put a break point into it and a debug.print and neither things happen.? Is this a bug in 2007?? Is there a work around? ? thanks! ? Dale From rockysmolin at bchacc.com Thu Oct 1 08:54:36 2009 From: rockysmolin at bchacc.com (Rocky Smolin) Date: Thu, 1 Oct 2009 06:54:36 -0700 Subject: [AccessD] Access 2007 - Report Detail On Format Event In-Reply-To: <864695.19189.qm@web50410.mail.re2.yahoo.com> References: <6DC4725FDCDD72428D6114F1B6CC6E81C7951E@EXUAU020HWT110.oceania.corp.anz.com> <864695.19189.qm@web50410.mail.re2.yahoo.com> Message-ID: <3DA87408F304479CB764697861ECDB24@HAL9005> I assume there's a bunch of records that show up in the detail section when you run the report? Rocky -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Dale Kalsow Sent: Thursday, October 01, 2009 6:38 AM To: Access Developers discussion and problem solving Subject: [AccessD] Access 2007 - Report Detail On Format Event Good Morning Everyone, ? Has anyone see a problem in access 2007 with the report detail on format event?? I have some code I want to run in that section and it never fires.? I have put a break point into it and a debug.print and neither things happen.? Is this a bug in 2007?? Is there a work around? ? thanks! ? Dale -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From rockysmolin at bchacc.com Thu Oct 1 08:56:24 2009 From: rockysmolin at bchacc.com (Rocky Smolin) Date: Thu, 1 Oct 2009 06:56:24 -0700 Subject: [AccessD] Access 2007 - Report Detail On Format Event In-Reply-To: <864695.19189.qm@web50410.mail.re2.yahoo.com> References: <6DC4725FDCDD72428D6114F1B6CC6E81C7951E@EXUAU020HWT110.oceania.corp.anz.com> <864695.19189.qm@web50410.mail.re2.yahoo.com> Message-ID: <64789B9888A041D3BCBD6A807C8A2757@HAL9005> Just for fun, try a breakpoint for a MsgBox in the OnPrint event - see if that's firing. Can you move the app to 2003 and test it there to see if it's related to 2007 or it's this particular report? Is there another report in the app that you could put a break point into the OnFormat event of that detail section to see if it's related to that particular report or the whole db? Rocky -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Dale Kalsow Sent: Thursday, October 01, 2009 6:38 AM To: Access Developers discussion and problem solving Subject: [AccessD] Access 2007 - Report Detail On Format Event Good Morning Everyone, ? Has anyone see a problem in access 2007 with the report detail on format event?? I have some code I want to run in that section and it never fires.? I have put a break point into it and a debug.print and neither things happen.? Is this a bug in 2007?? Is there a work around? ? thanks! ? Dale -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From dkalsow at yahoo.com Thu Oct 1 09:04:46 2009 From: dkalsow at yahoo.com (Dale Kalsow) Date: Thu, 1 Oct 2009 07:04:46 -0700 (PDT) Subject: [AccessD] Access 2007 - Report Detail On Format Event In-Reply-To: <3DA87408F304479CB764697861ECDB24@HAL9005> Message-ID: <928505.4820.qm@web50406.mail.re2.yahoo.com> Correct --- On Thu, 10/1/09, Rocky Smolin wrote: From: Rocky Smolin Subject: Re: [AccessD] Access 2007 - Report Detail On Format Event To: "'Access Developers discussion and problem solving'" Date: Thursday, October 1, 2009, 8:54 AM I assume there's a bunch of records that show up in the detail section when you run the report?? Rocky -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Dale Kalsow Sent: Thursday, October 01, 2009 6:38 AM To: Access Developers discussion and problem solving Subject: [AccessD] Access 2007 - Report Detail On Format Event Good Morning Everyone, ? Has anyone see a problem in access 2007 with the report detail on format event?? I have some code I want to run in that section and it never fires.? I have put a break point into it and a debug.print and neither things happen.? Is this a bug in 2007?? Is there a work around? ? thanks! ? Dale ? ? ? -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From dkalsow at yahoo.com Thu Oct 1 09:14:32 2009 From: dkalsow at yahoo.com (Dale Kalsow) Date: Thu, 1 Oct 2009 07:14:32 -0700 (PDT) Subject: [AccessD] Access 2007 - Report Detail On Format Event In-Reply-To: <64789B9888A041D3BCBD6A807C8A2757@HAL9005> Message-ID: <364811.45833.qm@web50408.mail.re2.yahoo.com> I have done as you suggest and the message box is not executed.? I also tried in a different report and it was not executed there either.? I do not have 2003 to try it there. ? Dale --- On Thu, 10/1/09, Rocky Smolin wrote: From: Rocky Smolin Subject: Re: [AccessD] Access 2007 - Report Detail On Format Event To: "'Access Developers discussion and problem solving'" Date: Thursday, October 1, 2009, 8:56 AM Just for fun, try a breakpoint for a MsgBox in the OnPrint event - see if that's firing.? Can you move the app to 2003 and test it there to see if it's related to 2007 or it's this particular report?? Is there another report in the app that you could put a break point into the OnFormat event of that detail section to see if it's related to that particular report or the whole db? Rocky -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Dale Kalsow Sent: Thursday, October 01, 2009 6:38 AM To: Access Developers discussion and problem solving Subject: [AccessD] Access 2007 - Report Detail On Format Event Good Morning Everyone, ? Has anyone see a problem in access 2007 with the report detail on format event?? I have some code I want to run in that section and it never fires.? I have put a break point into it and a debug.print and neither things happen.? Is this a bug in 2007?? Is there a work around? ? thanks! ? Dale ? ? ? -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From dkalsow at yahoo.com Thu Oct 1 09:20:41 2009 From: dkalsow at yahoo.com (Dale Kalsow) Date: Thu, 1 Oct 2009 07:20:41 -0700 (PDT) Subject: [AccessD] Access 2007 - Report Detail On Format Event In-Reply-To: <928505.4820.qm@web50406.mail.re2.yahoo.com> Message-ID: <213176.55846.qm@web50409.mail.re2.yahoo.com> After working with it some more the even will fire in print priview but not in report view.? Is this by design? --- On Thu, 10/1/09, Dale Kalsow wrote: From: Dale Kalsow Subject: Re: [AccessD] Access 2007 - Report Detail On Format Event To: "Access Developers discussion and problem solving" Date: Thursday, October 1, 2009, 9:04 AM Correct --- On Thu, 10/1/09, Rocky Smolin wrote: From: Rocky Smolin Subject: Re: [AccessD] Access 2007 - Report Detail On Format Event To: "'Access Developers discussion and problem solving'" Date: Thursday, October 1, 2009, 8:54 AM I assume there's a bunch of records that show up in the detail section when you run the report?? Rocky -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Dale Kalsow Sent: Thursday, October 01, 2009 6:38 AM To: Access Developers discussion and problem solving Subject: [AccessD] Access 2007 - Report Detail On Format Event Good Morning Everyone, ? Has anyone see a problem in access 2007 with the report detail on format event?? I have some code I want to run in that section and it never fires.? I have put a break point into it and a debug.print and neither things happen.? Is this a bug in 2007?? Is there a work around? ? thanks! ? Dale ? ? ? -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/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 Thu Oct 1 09:27:58 2009 From: fuller.artful at gmail.com (Arthur Fuller) Date: Thu, 1 Oct 2009 10:27:58 -0400 Subject: [AccessD] treeview control In-Reply-To: <008301ca41ca$578ae4c0$bc5fa27a@personald6374f> References: <110192.69137.qm@web50405.mail.re2.yahoo.com> <008301ca41ca$578ae4c0$bc5fa27a@personald6374f> Message-ID: <29f585dd0910010727v7c252585qb67987863f701abc@mail.gmail.com> Hi A.D. I've looked over your sample treeview app and it's definitely nicer than my own. I'm wondering how one might handle a slightly different requirement. Grandparent, parent and child are straightforward, but what if the Grandparent has more than one child? For example, suppose that the Grandparent is called Customers, and has two children, called Orders and Payments. Perhaps not the greatest example, but with luck you will get the general idea... GP: P1 P2 Pn Perhaps a better example would be a Customer who has several types of purchases, including Flight, EventTicket and HotelRoom. I would want each of these to be displayed in a separate node within the treeview. In all cases, there might be multiple entries. TIA, Arthur On Wed, Sep 30, 2009 at 8:31 AM, A.D.Tejpal wrote: > Dale, > > My sample db named Form_Treeview might be of interest to you. It is > available at Rogers Access Library. Link - > http://www.rogersaccesslibrary.com/forum/forum_topics.asp?FID=45 > > This sample is in Access 2000 file format and works on Access 2007 as > well. It demonstrates two styles of treeview, one represents employees > organization chart, while the other facilitates marking of student grades in > a convenient manner. > > In both cases, there is two way synchronization between the treeview and > adjacent subform, for navigation and editing. > > An interesting feature has been incorporated in employees version. > Whichever happens to be the current employee, complete chain of command is > highlighted. The employee and his top boss are shown in two different colors > while all intermediate supervisors in direct chain of command are shown in > another color. This highlighting gets implemented on the treeview as well as > subform in identical style. > > If an employee node is dragged over to another employee or department, > the resulting modified structure gets displayed on the treeview as well as > subform, duly highlighting the revised chain of command in the manner > described in previous para. > > Note: > This is a fresh sample db and as mentioned at the end of explanatory > notes accompanying the sample, Drew's wonderful series of posts on treeview > control, and Arthur's excellent article on the subject (in DatabaseAdvisors) > have been of great help. > > Best wishes, > A.D. Tejpal > ------------ > > ----- Original Message ----- > From: Dale Kalsow > To: Access Developers discussion and problem solving > Sent: Wednesday, September 23, 2009 01:14 > Subject: [AccessD] treeview control > > > Good Afternoon, > > Does anyone have a simple treeview example for Access 2007, they are > willing to share? > > Thanks! > > Dale > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > From rockysmolin at bchacc.com Thu Oct 1 09:34:10 2009 From: rockysmolin at bchacc.com (Rocky Smolin) Date: Thu, 1 Oct 2009 07:34:10 -0700 Subject: [AccessD] Access 2007 - Report Detail On Format Event In-Reply-To: <213176.55846.qm@web50409.mail.re2.yahoo.com> References: <928505.4820.qm@web50406.mail.re2.yahoo.com> <213176.55846.qm@web50409.mail.re2.yahoo.com> Message-ID: <3FB44E9587BE4F0A8EF10572F3D41DDE@HAL9005> Good question. Do you have access to another machine with O2K7 to test it on - see if you get the same result on another box? You could try a decompile but that's probably not gong to fix it. If one of the files of the O2K7 install got hosed a reinstall of Office might fix it. But I'd try it on a different machine first if possible. All this is assuming that the problem is not 'be design'. Rocky -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Dale Kalsow Sent: Thursday, October 01, 2009 7:21 AM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Access 2007 - Report Detail On Format Event After working with it some more the even will fire in print priview but not in report view.? Is this by design? --- On Thu, 10/1/09, Dale Kalsow wrote: From: Dale Kalsow Subject: Re: [AccessD] Access 2007 - Report Detail On Format Event To: "Access Developers discussion and problem solving" Date: Thursday, October 1, 2009, 9:04 AM Correct --- On Thu, 10/1/09, Rocky Smolin wrote: From: Rocky Smolin Subject: Re: [AccessD] Access 2007 - Report Detail On Format Event To: "'Access Developers discussion and problem solving'" Date: Thursday, October 1, 2009, 8:54 AM I assume there's a bunch of records that show up in the detail section when you run the report?? Rocky -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Dale Kalsow Sent: Thursday, October 01, 2009 6:38 AM To: Access Developers discussion and problem solving Subject: [AccessD] Access 2007 - Report Detail On Format Event Good Morning Everyone, ? Has anyone see a problem in access 2007 with the report detail on format event?? I have some code I want to run in that section and it never fires. I have put a break point into it and a debug.print and neither things happen.? Is this a bug in 2007?? Is there a work around? ? thanks! ? Dale ? ? ? -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/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 Lambert.Heenan at chartisinsurance.com Thu Oct 1 11:07:08 2009 From: Lambert.Heenan at chartisinsurance.com (Heenan, Lambert) Date: Thu, 1 Oct 2009 12:07:08 -0400 Subject: [AccessD] Access 2007 - Report Detail On Format Event In-Reply-To: <213176.55846.qm@web50409.mail.re2.yahoo.com> References: <928505.4820.qm@web50406.mail.re2.yahoo.com> <213176.55846.qm@web50409.mail.re2.yahoo.com> Message-ID: Educate me about 2007 please. In previous versions of Access you can open reports in Design, Normal, Preview, PivotTable and PivotChart modes. What is "Report View"? Lambert -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Dale Kalsow Sent: Thursday, October 01, 2009 10:21 AM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Access 2007 - Report Detail On Format Event After working with it some more the even will fire in print priview but not in report view.? Is this by design? --- On Thu, 10/1/09, Dale Kalsow wrote: From: Dale Kalsow Subject: Re: [AccessD] Access 2007 - Report Detail On Format Event To: "Access Developers discussion and problem solving" Date: Thursday, October 1, 2009, 9:04 AM Correct --- On Thu, 10/1/09, Rocky Smolin wrote: From: Rocky Smolin Subject: Re: [AccessD] Access 2007 - Report Detail On Format Event To: "'Access Developers discussion and problem solving'" Date: Thursday, October 1, 2009, 8:54 AM I assume there's a bunch of records that show up in the detail section when you run the report?? Rocky -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Dale Kalsow Sent: Thursday, October 01, 2009 6:38 AM To: Access Developers discussion and problem solving Subject: [AccessD] Access 2007 - Report Detail On Format Event Good Morning Everyone, ? Has anyone see a problem in access 2007 with the report detail on format event?? I have some code I want to run in that section and it never fires. I have put a break point into it and a debug.print and neither things happen.? Is this a bug in 2007?? Is there a work around? ? thanks! ? Dale ? ? ? -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com ? ? ? -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From Gustav at cactus.dk Thu Oct 1 11:37:08 2009 From: Gustav at cactus.dk (Gustav Brock) Date: Thu, 01 Oct 2009 18:37:08 +0200 Subject: [AccessD] Table size Message-ID: Hi Arthur So much talking, so little action ... Public Sub ListTableSize() Dim dbs As DAO.Database Dim tdf As DAO.TableDef Dim strName As String Dim strFile As String Dim strPath As String Set dbs = CurrentDb strName = dbs.Name strPath = Left(strName, Len(strName) - Len(Dir(strName))) For Each tdf In dbs.TableDefs strName = tdf.Name ' Apply some filtering. If Left(strName, 4) = "tblS" Then strFile = strPath & strName & ".mdt" Debug.Print strName, ; CreateDatabase strFile, dbLangGeneral DoCmd.TransferDatabase acExport, "Microsoft Access", strFile, acTable, strName, strName Debug.Print FileLen(strFile) Kill strFile End If Next Set tdf = Nothing Set dbs = Nothing End Sub >>> jwcolby at colbyconsulting.com 01-10-2009 14:53 >>> Jim, > In fact I'm left wondering why someone hasn't done that already... Because we all work for a living and no one wants to pay us to develop that? ;) But you are correct, it wouldn't be that tough to do. John W. Colby www.ColbyConsulting.com Jim Dettman wrote: > Max, > > < this site are amazing with their knowledge and skills. Impossible to keep > up with. I think I have done something "clever" and the say "yeah, watch > this bud".>> > > Been there many times. Sometime I feel like I live in the stone age when > I see a lot of the stuff on EE. > > <> > > Not here and I hope the reverse is true as well. I really was just trying > to point out that it's a thornier problem then it first appears. To really > do it right, you'd need to scan every page in the DB assigned to the table > or do a compact and then just add up all the pages assigned to the table. > And while the data page layouts for Jet 3.0 and 4.0 are pretty well known, > what's known about the index pages and page usage maps are fuzzy at best. > > And then there are details such as page padding (leaving free space for > new data); does JET do it or not? So even scanning all the pages and > getting a very accurate storage count of the data still might not tell you > how much space a table would occupy. If the fill factor was 50%, you could > be off by quite a bit. The best approach I guess would be a compact, then > just count the pages assigned to the tables and indexes. > > Without going through all that, the only realistic approach I've found is > to import a single table into a fresh MDB and then check the size. That is > accurate, but it's a lot of manual work. And now that I say that, I think > between all of us we could come up with some code to do that automatically > fairly quickly for a given DB. In fact I'll see if I can squeeze out some > time latter today to do that. Would not be all that hard; read the > tabledefs, create a scratch DB, transfer the table, get the on disk size of > the scratch DB, save info into a table, delete scratch DB, and repeat till > done. > > In fact I'm left wondering why someone hasn't done that already... > > Jim. > > > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Max Wanadoo > Sent: Wednesday, September 30, 2009 8:13 PM > To: 'Access Developers discussion and problem solving' > Subject: Re: [AccessD] Table size > > Oh no, I didn't mean it that way. What I meant was the guys (and gals) on > this site are amazing with their knowledge and skills. Impossible to keep > up with. I think I have done something "clever" and the say "yeah, watch > this bud". > > Hope I didn't offend anybody. Emails sometimes can be difficult. > > Anyway, John. Hope you got something out of it all - LOL. > > > But, hey, tell you what, this might develop into a useful item. I never > even considered Indexes. What about Reference overheads. Tons of stuff. > > > Max > > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby > Sent: 01 October 2009 01:06 > To: Access Developers discussion and problem solving > Subject: Re: [AccessD] Table size > > ROTFL. Don't worry about it Max. If it was easy MS would hand it off to > the same summer interns > that design North Wind DB and they would screw it up. > > John W. Colby > www.ColbyConsulting.com > > > Max Wanadoo wrote: >> Sometime, you guys are just impossible... >> >> Max >> >> >> -----Original Message----- >> From: accessd-bounces at databaseadvisors.com >> [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Jim Dettman >> Sent: 30 September 2009 23:36 >> To: 'Access Developers discussion and problem solving' >> Subject: Re: [AccessD] Table size >> >> >> Below is some code that may come a bit closer, but even so field size >> measures characters, not storage space. Plus your not taking into account >> variable length fields, any of the database overhead (page and DB), or >> indexes associated with a table. >> >> So even at best, all this will be off by quite a bit. >> >> Jim. >> >> Public Sub showSizes() >> Dim sql As String >> Dim td As TableDef >> Dim recordSize As Long >> Dim numRecords As Long >> Dim inMemos As Long >> Dim CurrentDb As Database >> >> Set CurrentDb = gTL1DB >> >> ' Create a temporary table for results: >> >> ' delete the table first, in case it's still there >> On Error Resume Next >> CurrentDb.Execute "DROP TABLE T___tmp" >> On Error GoTo 0 >> >> sql = "CREATE TABLE T___tmp(name TEXT (100), size INTEGER," >> sql = sql & " recordSize INTEGER, numRecords INTEGER, inMemos INTEGER)" >> CurrentDb.Execute sql >> >> Dim rs As Recordset >> >> Set rs = CurrentDb.OpenRecordset("T___tmp") >> >> ' for each table, add a record in T___tmp with its size info. >> >> For Each td In CurrentDb.TableDefs >> recordSize = 0 >> numRecords = 0 >> inMemos = 0 >> >> rs.AddNew >> rs!name = td.name >> rs!size = sizeEstimate(td.name, recordSize, numRecords, inMemos) >> rs!recordSize = recordSize >> rs!numRecords = numRecords >> rs!inMemos = inMemos >> rs.Update >> Next td >> rs.Close >> >> ' print table size info in decreasing order of size >> Set rs = CurrentDb.OpenRecordset("SELECT * FROM T___tmp ORDER BY size DESC") >> Do Until rs.EOF >> If rs!size > 0 Then >> Debug.Print rs!name; Tab(20); rs!size; Tab(30); " = "; rs!inMemos; >> Debug.Print Tab(45); "+ ("; rs!recordSize; Tab(55); " * "; >> rs!numRecords; ")" >> Else >> Exit Do >> End If >> rs.MoveNext >> Loop >> rs.Close >> >> End Sub >> >> Public Function sizeEstimate(tableName As String, recordSize As Long, >> numRecords As Long, inMemos As Long) As Long >> Dim rs As Recordset >> Dim fld As field >> Dim msg As Integer >> Dim CurrentDb As Database >> Dim colMemos As New Collection >> >> >> Set CurrentDb = gTL1DB >> >> On Error Resume Next >> Set rs = CurrentDb.OpenRecordset(tableName) >> If Err Then >> sizeEstimate = 0 >> Exit Function >> End If >> If rs.EOF Then >> sizeEstimate = 0 >> Exit Function >> End If >> rs.MoveLast >> numRecords = rs.RecordCount >> 'Debug.Print >> 'Debug.Print tableName >> ' get the size of the fixed-size fields >> For Each fld In rs.Fields >> recordSize = recordSize + fld.size >> If fld.Type = dbMemo Or fld.Type = dbLongBinary Then >> colMemos.Add fld.name >> End If >> ' Debug.Print fld.name; " size "; fld.size >> Next fld >> >> sizeEstimate = (recordSize * numRecords) 'Bytes >> >> Dim ff As Variant >> ' add up all the memo and long binary fields in >> ' all the records. >> If colMemos.count > 0 Then >> rs.MoveFirst >> Do Until rs.EOF >> For Each ff In colMemos >> inMemos = inMemos + rs.Fields(ff).FieldSize >> Next ff >> rs.MoveNext >> Loop >> End If >> >> sizeEstimate = sizeEstimate + inMemos >> >> 'If SizeEstimate > 1073741824 Then '1073741824 Bytes per GigaByte >> ' msg = MsgBox("This view may still be larger than 1 GB. Do you wish to >> continue?", vbOKCancel + vbCritical, "View Size Warning") >> ' If msg = 2 Then GoTo SizeEstimate_Exit >> 'End If >> >> sizeEstimate_Exit: >> rs.Close >> End Function >> >> >> >> -----Original Message----- >> From: accessd-bounces at databaseadvisors.com >> [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Max Wanadoo >> Sent: Wednesday, September 30, 2009 6:13 PM >> To: 'Access Developers discussion and problem solving' >> Subject: Re: [AccessD] Table size >> >> You could try something like this (below). >> Knowing how many records you deal with, I have made the variable DOUBLES >> >> Not entirely sure it is accurate as I have only just written it and never >> tested it in real life, but it may help. >> >> Max >> >> Sub sGetTableSizes() >> Dim dbs As DAO.Database, tbl As DAO.TableDef >> Dim sql As String, fld As Field, dblTotSize As Double >> Dim dblFldSize As Double, dblRecCount As Double, dblTableSize As Double >> Set dbs = CurrentDb >> For Each tbl In CurrentDb.TableDefs >> If Not Left(tbl.Name, 1) = "~" And Not Left(tbl.Name, 4) = "Msys" Then >> dblRecCount = DCount("*", tbl.Name) >> dblFldSize = 0 >> For Each fld In tbl.Fields >> dblFldSize = dblFldSize + fld.Size >> Next fld >> dblTableSize = dblFldSize * dblRecCount >> Debug.Print tbl.Name, dblTableSize >> End If >> dblTotSize = dblTotSize + dblTableSize >> Next tbl >> MsgBox "Total Size: " & Format(dblTotSize, "##,##") >> exithere: >> Set dbs = Nothing: Set tbl = Nothing >> Exit Sub >> End Sub >> >> -----Original Message----- >> From: accessd-bounces at databaseadvisors.com >> [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby >> Sent: 30 September 2009 20:21 >> To: Access Developers discussion and problem solving >> Subject: [AccessD] Table size >> >> Is there any direct way to obtain the total storage used for each table. > A >> client is approaching >> the 2 gb limit and needs to split the BE. From jimdettman at verizon.net Thu Oct 1 12:16:45 2009 From: jimdettman at verizon.net (Jim Dettman) Date: Thu, 01 Oct 2009 13:16:45 -0400 Subject: [AccessD] Table size In-Reply-To: References: Message-ID: <5FF08161290641D3B5EEC56F503AF560@XPS> That needs to be modified a tad; a blank DB needs to be created and the disk size needs to be subtracted after the table is exported into it. It would also be nice to have the tables sizes stored in a table. Jim. -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: Thursday, October 01, 2009 12:37 PM To: accessd at databaseadvisors.com Subject: Re: [AccessD] Table size Hi Arthur So much talking, so little action ... Public Sub ListTableSize() Dim dbs As DAO.Database Dim tdf As DAO.TableDef Dim strName As String Dim strFile As String Dim strPath As String Set dbs = CurrentDb strName = dbs.Name strPath = Left(strName, Len(strName) - Len(Dir(strName))) For Each tdf In dbs.TableDefs strName = tdf.Name ' Apply some filtering. If Left(strName, 4) = "tblS" Then strFile = strPath & strName & ".mdt" Debug.Print strName, ; CreateDatabase strFile, dbLangGeneral DoCmd.TransferDatabase acExport, "Microsoft Access", strFile, acTable, strName, strName Debug.Print FileLen(strFile) Kill strFile End If Next Set tdf = Nothing Set dbs = Nothing End Sub >>> jwcolby at colbyconsulting.com 01-10-2009 14:53 >>> Jim, > In fact I'm left wondering why someone hasn't done that already... Because we all work for a living and no one wants to pay us to develop that? ;) But you are correct, it wouldn't be that tough to do. John W. Colby www.ColbyConsulting.com Jim Dettman wrote: > Max, > > < this site are amazing with their knowledge and skills. Impossible to keep > up with. I think I have done something "clever" and the say "yeah, watch > this bud".>> > > Been there many times. Sometime I feel like I live in the stone age when > I see a lot of the stuff on EE. > > <> > > Not here and I hope the reverse is true as well. I really was just trying > to point out that it's a thornier problem then it first appears. To really > do it right, you'd need to scan every page in the DB assigned to the table > or do a compact and then just add up all the pages assigned to the table. > And while the data page layouts for Jet 3.0 and 4.0 are pretty well known, > what's known about the index pages and page usage maps are fuzzy at best. > > And then there are details such as page padding (leaving free space for > new data); does JET do it or not? So even scanning all the pages and > getting a very accurate storage count of the data still might not tell you > how much space a table would occupy. If the fill factor was 50%, you could > be off by quite a bit. The best approach I guess would be a compact, then > just count the pages assigned to the tables and indexes. > > Without going through all that, the only realistic approach I've found is > to import a single table into a fresh MDB and then check the size. That is > accurate, but it's a lot of manual work. And now that I say that, I think > between all of us we could come up with some code to do that automatically > fairly quickly for a given DB. In fact I'll see if I can squeeze out some > time latter today to do that. Would not be all that hard; read the > tabledefs, create a scratch DB, transfer the table, get the on disk size of > the scratch DB, save info into a table, delete scratch DB, and repeat till > done. > > In fact I'm left wondering why someone hasn't done that already... > > Jim. > > > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Max Wanadoo > Sent: Wednesday, September 30, 2009 8:13 PM > To: 'Access Developers discussion and problem solving' > Subject: Re: [AccessD] Table size > > Oh no, I didn't mean it that way. What I meant was the guys (and gals) on > this site are amazing with their knowledge and skills. Impossible to keep > up with. I think I have done something "clever" and the say "yeah, watch > this bud". > > Hope I didn't offend anybody. Emails sometimes can be difficult. > > Anyway, John. Hope you got something out of it all - LOL. > > > But, hey, tell you what, this might develop into a useful item. I never > even considered Indexes. What about Reference overheads. Tons of stuff. > > > Max > > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby > Sent: 01 October 2009 01:06 > To: Access Developers discussion and problem solving > Subject: Re: [AccessD] Table size > > ROTFL. Don't worry about it Max. If it was easy MS would hand it off to > the same summer interns > that design North Wind DB and they would screw it up. > > John W. Colby > www.ColbyConsulting.com > > > Max Wanadoo wrote: >> Sometime, you guys are just impossible... >> >> Max >> >> >> -----Original Message----- >> From: accessd-bounces at databaseadvisors.com >> [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Jim Dettman >> Sent: 30 September 2009 23:36 >> To: 'Access Developers discussion and problem solving' >> Subject: Re: [AccessD] Table size >> >> >> Below is some code that may come a bit closer, but even so field size >> measures characters, not storage space. Plus your not taking into account >> variable length fields, any of the database overhead (page and DB), or >> indexes associated with a table. >> >> So even at best, all this will be off by quite a bit. >> >> Jim. >> >> Public Sub showSizes() >> Dim sql As String >> Dim td As TableDef >> Dim recordSize As Long >> Dim numRecords As Long >> Dim inMemos As Long >> Dim CurrentDb As Database >> >> Set CurrentDb = gTL1DB >> >> ' Create a temporary table for results: >> >> ' delete the table first, in case it's still there >> On Error Resume Next >> CurrentDb.Execute "DROP TABLE T___tmp" >> On Error GoTo 0 >> >> sql = "CREATE TABLE T___tmp(name TEXT (100), size INTEGER," >> sql = sql & " recordSize INTEGER, numRecords INTEGER, inMemos INTEGER)" >> CurrentDb.Execute sql >> >> Dim rs As Recordset >> >> Set rs = CurrentDb.OpenRecordset("T___tmp") >> >> ' for each table, add a record in T___tmp with its size info. >> >> For Each td In CurrentDb.TableDefs >> recordSize = 0 >> numRecords = 0 >> inMemos = 0 >> >> rs.AddNew >> rs!name = td.name >> rs!size = sizeEstimate(td.name, recordSize, numRecords, inMemos) >> rs!recordSize = recordSize >> rs!numRecords = numRecords >> rs!inMemos = inMemos >> rs.Update >> Next td >> rs.Close >> >> ' print table size info in decreasing order of size >> Set rs = CurrentDb.OpenRecordset("SELECT * FROM T___tmp ORDER BY size DESC") >> Do Until rs.EOF >> If rs!size > 0 Then >> Debug.Print rs!name; Tab(20); rs!size; Tab(30); " = "; rs!inMemos; >> Debug.Print Tab(45); "+ ("; rs!recordSize; Tab(55); " * "; >> rs!numRecords; ")" >> Else >> Exit Do >> End If >> rs.MoveNext >> Loop >> rs.Close >> >> End Sub >> >> Public Function sizeEstimate(tableName As String, recordSize As Long, >> numRecords As Long, inMemos As Long) As Long >> Dim rs As Recordset >> Dim fld As field >> Dim msg As Integer >> Dim CurrentDb As Database >> Dim colMemos As New Collection >> >> >> Set CurrentDb = gTL1DB >> >> On Error Resume Next >> Set rs = CurrentDb.OpenRecordset(tableName) >> If Err Then >> sizeEstimate = 0 >> Exit Function >> End If >> If rs.EOF Then >> sizeEstimate = 0 >> Exit Function >> End If >> rs.MoveLast >> numRecords = rs.RecordCount >> 'Debug.Print >> 'Debug.Print tableName >> ' get the size of the fixed-size fields >> For Each fld In rs.Fields >> recordSize = recordSize + fld.size >> If fld.Type = dbMemo Or fld.Type = dbLongBinary Then >> colMemos.Add fld.name >> End If >> ' Debug.Print fld.name; " size "; fld.size >> Next fld >> >> sizeEstimate = (recordSize * numRecords) 'Bytes >> >> Dim ff As Variant >> ' add up all the memo and long binary fields in >> ' all the records. >> If colMemos.count > 0 Then >> rs.MoveFirst >> Do Until rs.EOF >> For Each ff In colMemos >> inMemos = inMemos + rs.Fields(ff).FieldSize >> Next ff >> rs.MoveNext >> Loop >> End If >> >> sizeEstimate = sizeEstimate + inMemos >> >> 'If SizeEstimate > 1073741824 Then '1073741824 Bytes per GigaByte >> ' msg = MsgBox("This view may still be larger than 1 GB. Do you wish to >> continue?", vbOKCancel + vbCritical, "View Size Warning") >> ' If msg = 2 Then GoTo SizeEstimate_Exit >> 'End If >> >> sizeEstimate_Exit: >> rs.Close >> End Function >> >> >> >> -----Original Message----- >> From: accessd-bounces at databaseadvisors.com >> [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Max Wanadoo >> Sent: Wednesday, September 30, 2009 6:13 PM >> To: 'Access Developers discussion and problem solving' >> Subject: Re: [AccessD] Table size >> >> You could try something like this (below). >> Knowing how many records you deal with, I have made the variable DOUBLES >> >> Not entirely sure it is accurate as I have only just written it and never >> tested it in real life, but it may help. >> >> Max >> >> Sub sGetTableSizes() >> Dim dbs As DAO.Database, tbl As DAO.TableDef >> Dim sql As String, fld As Field, dblTotSize As Double >> Dim dblFldSize As Double, dblRecCount As Double, dblTableSize As Double >> Set dbs = CurrentDb >> For Each tbl In CurrentDb.TableDefs >> If Not Left(tbl.Name, 1) = "~" And Not Left(tbl.Name, 4) = "Msys" Then >> dblRecCount = DCount("*", tbl.Name) >> dblFldSize = 0 >> For Each fld In tbl.Fields >> dblFldSize = dblFldSize + fld.Size >> Next fld >> dblTableSize = dblFldSize * dblRecCount >> Debug.Print tbl.Name, dblTableSize >> End If >> dblTotSize = dblTotSize + dblTableSize >> Next tbl >> MsgBox "Total Size: " & Format(dblTotSize, "##,##") >> exithere: >> Set dbs = Nothing: Set tbl = Nothing >> Exit Sub >> End Sub >> >> -----Original Message----- >> From: accessd-bounces at databaseadvisors.com >> [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby >> Sent: 30 September 2009 20:21 >> To: Access Developers discussion and problem solving >> Subject: [AccessD] Table size >> >> Is there any direct way to obtain the total storage used for each table. > A >> client is approaching >> the 2 gb limit and needs to split the BE. -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From max.wanadoo at gmail.com Thu Oct 1 13:10:04 2009 From: max.wanadoo at gmail.com (Max Wanadoo) Date: Thu, 1 Oct 2009 19:10:04 +0100 Subject: [AccessD] Table size In-Reply-To: References: Message-ID: <4ac4f098.0a04d00a.4885.148d@mx.google.com> Gustav, Remember, some of us have got pubs to go to....can't spend the day coding...LOL Max -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: 01 October 2009 17:37 To: accessd at databaseadvisors.com Subject: Re: [AccessD] Table size Hi Arthur So much talking, so little action ... Public Sub ListTableSize() Dim dbs As DAO.Database Dim tdf As DAO.TableDef Dim strName As String Dim strFile As String Dim strPath As String Set dbs = CurrentDb strName = dbs.Name strPath = Left(strName, Len(strName) - Len(Dir(strName))) For Each tdf In dbs.TableDefs strName = tdf.Name ' Apply some filtering. If Left(strName, 4) = "tblS" Then strFile = strPath & strName & ".mdt" Debug.Print strName, ; CreateDatabase strFile, dbLangGeneral DoCmd.TransferDatabase acExport, "Microsoft Access", strFile, acTable, strName, strName Debug.Print FileLen(strFile) Kill strFile End If Next Set tdf = Nothing Set dbs = Nothing End Sub >>> jwcolby at colbyconsulting.com 01-10-2009 14:53 >>> Jim, > In fact I'm left wondering why someone hasn't done that already... Because we all work for a living and no one wants to pay us to develop that? ;) But you are correct, it wouldn't be that tough to do. John W. Colby www.ColbyConsulting.com Jim Dettman wrote: > Max, > > < this site are amazing with their knowledge and skills. Impossible to keep > up with. I think I have done something "clever" and the say "yeah, watch > this bud".>> > > Been there many times. Sometime I feel like I live in the stone age when > I see a lot of the stuff on EE. > > <> > > Not here and I hope the reverse is true as well. I really was just trying > to point out that it's a thornier problem then it first appears. To really > do it right, you'd need to scan every page in the DB assigned to the table > or do a compact and then just add up all the pages assigned to the table. > And while the data page layouts for Jet 3.0 and 4.0 are pretty well known, > what's known about the index pages and page usage maps are fuzzy at best. > > And then there are details such as page padding (leaving free space for > new data); does JET do it or not? So even scanning all the pages and > getting a very accurate storage count of the data still might not tell you > how much space a table would occupy. If the fill factor was 50%, you could > be off by quite a bit. The best approach I guess would be a compact, then > just count the pages assigned to the tables and indexes. > > Without going through all that, the only realistic approach I've found is > to import a single table into a fresh MDB and then check the size. That is > accurate, but it's a lot of manual work. And now that I say that, I think > between all of us we could come up with some code to do that automatically > fairly quickly for a given DB. In fact I'll see if I can squeeze out some > time latter today to do that. Would not be all that hard; read the > tabledefs, create a scratch DB, transfer the table, get the on disk size of > the scratch DB, save info into a table, delete scratch DB, and repeat till > done. > > In fact I'm left wondering why someone hasn't done that already... > > Jim. > > > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Max Wanadoo > Sent: Wednesday, September 30, 2009 8:13 PM > To: 'Access Developers discussion and problem solving' > Subject: Re: [AccessD] Table size > > Oh no, I didn't mean it that way. What I meant was the guys (and gals) on > this site are amazing with their knowledge and skills. Impossible to keep > up with. I think I have done something "clever" and the say "yeah, watch > this bud". > > Hope I didn't offend anybody. Emails sometimes can be difficult. > > Anyway, John. Hope you got something out of it all - LOL. > > > But, hey, tell you what, this might develop into a useful item. I never > even considered Indexes. What about Reference overheads. Tons of stuff. > > > Max > > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby > Sent: 01 October 2009 01:06 > To: Access Developers discussion and problem solving > Subject: Re: [AccessD] Table size > > ROTFL. Don't worry about it Max. If it was easy MS would hand it off to > the same summer interns > that design North Wind DB and they would screw it up. > > John W. Colby > www.ColbyConsulting.com > > > Max Wanadoo wrote: >> Sometime, you guys are just impossible... >> >> Max >> >> >> -----Original Message----- >> From: accessd-bounces at databaseadvisors.com >> [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Jim Dettman >> Sent: 30 September 2009 23:36 >> To: 'Access Developers discussion and problem solving' >> Subject: Re: [AccessD] Table size >> >> >> Below is some code that may come a bit closer, but even so field size >> measures characters, not storage space. Plus your not taking into account >> variable length fields, any of the database overhead (page and DB), or >> indexes associated with a table. >> >> So even at best, all this will be off by quite a bit. >> >> Jim. >> >> Public Sub showSizes() >> Dim sql As String >> Dim td As TableDef >> Dim recordSize As Long >> Dim numRecords As Long >> Dim inMemos As Long >> Dim CurrentDb As Database >> >> Set CurrentDb = gTL1DB >> >> ' Create a temporary table for results: >> >> ' delete the table first, in case it's still there >> On Error Resume Next >> CurrentDb.Execute "DROP TABLE T___tmp" >> On Error GoTo 0 >> >> sql = "CREATE TABLE T___tmp(name TEXT (100), size INTEGER," >> sql = sql & " recordSize INTEGER, numRecords INTEGER, inMemos INTEGER)" >> CurrentDb.Execute sql >> >> Dim rs As Recordset >> >> Set rs = CurrentDb.OpenRecordset("T___tmp") >> >> ' for each table, add a record in T___tmp with its size info. >> >> For Each td In CurrentDb.TableDefs >> recordSize = 0 >> numRecords = 0 >> inMemos = 0 >> >> rs.AddNew >> rs!name = td.name >> rs!size = sizeEstimate(td.name, recordSize, numRecords, inMemos) >> rs!recordSize = recordSize >> rs!numRecords = numRecords >> rs!inMemos = inMemos >> rs.Update >> Next td >> rs.Close >> >> ' print table size info in decreasing order of size >> Set rs = CurrentDb.OpenRecordset("SELECT * FROM T___tmp ORDER BY size DESC") >> Do Until rs.EOF >> If rs!size > 0 Then >> Debug.Print rs!name; Tab(20); rs!size; Tab(30); " = "; rs!inMemos; >> Debug.Print Tab(45); "+ ("; rs!recordSize; Tab(55); " * "; >> rs!numRecords; ")" >> Else >> Exit Do >> End If >> rs.MoveNext >> Loop >> rs.Close >> >> End Sub >> >> Public Function sizeEstimate(tableName As String, recordSize As Long, >> numRecords As Long, inMemos As Long) As Long >> Dim rs As Recordset >> Dim fld As field >> Dim msg As Integer >> Dim CurrentDb As Database >> Dim colMemos As New Collection >> >> >> Set CurrentDb = gTL1DB >> >> On Error Resume Next >> Set rs = CurrentDb.OpenRecordset(tableName) >> If Err Then >> sizeEstimate = 0 >> Exit Function >> End If >> If rs.EOF Then >> sizeEstimate = 0 >> Exit Function >> End If >> rs.MoveLast >> numRecords = rs.RecordCount >> 'Debug.Print >> 'Debug.Print tableName >> ' get the size of the fixed-size fields >> For Each fld In rs.Fields >> recordSize = recordSize + fld.size >> If fld.Type = dbMemo Or fld.Type = dbLongBinary Then >> colMemos.Add fld.name >> End If >> ' Debug.Print fld.name; " size "; fld.size >> Next fld >> >> sizeEstimate = (recordSize * numRecords) 'Bytes >> >> Dim ff As Variant >> ' add up all the memo and long binary fields in >> ' all the records. >> If colMemos.count > 0 Then >> rs.MoveFirst >> Do Until rs.EOF >> For Each ff In colMemos >> inMemos = inMemos + rs.Fields(ff).FieldSize >> Next ff >> rs.MoveNext >> Loop >> End If >> >> sizeEstimate = sizeEstimate + inMemos >> >> 'If SizeEstimate > 1073741824 Then '1073741824 Bytes per GigaByte >> ' msg = MsgBox("This view may still be larger than 1 GB. Do you wish to >> continue?", vbOKCancel + vbCritical, "View Size Warning") >> ' If msg = 2 Then GoTo SizeEstimate_Exit >> 'End If >> >> sizeEstimate_Exit: >> rs.Close >> End Function >> >> >> >> -----Original Message----- >> From: accessd-bounces at databaseadvisors.com >> [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Max Wanadoo >> Sent: Wednesday, September 30, 2009 6:13 PM >> To: 'Access Developers discussion and problem solving' >> Subject: Re: [AccessD] Table size >> >> You could try something like this (below). >> Knowing how many records you deal with, I have made the variable DOUBLES >> >> Not entirely sure it is accurate as I have only just written it and never >> tested it in real life, but it may help. >> >> Max >> >> Sub sGetTableSizes() >> Dim dbs As DAO.Database, tbl As DAO.TableDef >> Dim sql As String, fld As Field, dblTotSize As Double >> Dim dblFldSize As Double, dblRecCount As Double, dblTableSize As Double >> Set dbs = CurrentDb >> For Each tbl In CurrentDb.TableDefs >> If Not Left(tbl.Name, 1) = "~" And Not Left(tbl.Name, 4) = "Msys" Then >> dblRecCount = DCount("*", tbl.Name) >> dblFldSize = 0 >> For Each fld In tbl.Fields >> dblFldSize = dblFldSize + fld.Size >> Next fld >> dblTableSize = dblFldSize * dblRecCount >> Debug.Print tbl.Name, dblTableSize >> End If >> dblTotSize = dblTotSize + dblTableSize >> Next tbl >> MsgBox "Total Size: " & Format(dblTotSize, "##,##") >> exithere: >> Set dbs = Nothing: Set tbl = Nothing >> Exit Sub >> End Sub >> >> -----Original Message----- >> From: accessd-bounces at databaseadvisors.com >> [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby >> Sent: 30 September 2009 20:21 >> To: Access Developers discussion and problem solving >> Subject: [AccessD] Table size >> >> Is there any direct way to obtain the total storage used for each table. > A >> client is approaching >> the 2 gb limit and needs to split the BE. -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From max.wanadoo at gmail.com Thu Oct 1 13:33:36 2009 From: max.wanadoo at gmail.com (Max Wanadoo) Date: Thu, 1 Oct 2009 19:33:36 +0100 Subject: [AccessD] Table size In-Reply-To: References: Message-ID: <4ac4f61c.0707d00a.4297.205d@mx.google.com> >>So much talking, so little action ... http://www.informationisbeautiful.net/visualizations/the-hierarchy-of-digita l-distractions/ No wonder I have no time to code... Max From Chester_Kaup at kindermorgan.com Thu Oct 1 13:43:28 2009 From: Chester_Kaup at kindermorgan.com (Kaup, Chester) Date: Thu, 1 Oct 2009 13:43:28 -0500 Subject: [AccessD] Query result problem In-Reply-To: <4AC3D1D7.6603.46CF2494@stuart.lexacorp.com.pg> References: <0B2BF8524B73A248A2F1B81BA751ED3C190BEC868C@houex1.kindermorgan.com> <4AC3D1D7.6603.46CF2494@stuart.lexacorp.com.pg> Message-ID: <0B2BF8524B73A248A2F1B81BA751ED3C190BEC88DB@houex1.kindermorgan.com> Problem solved. One of the source fields that was joined did not have any data before 5/1/2008. Thanks for looking at it. -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Stuart McLachlan Sent: Wednesday, September 30, 2009 4:47 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Query result problem I'd guess that's it's the Date resrtiction combined with the INNER JOIN. Are there any records with ProductionMonth values less than 4/1/2008 in [qry Injection Data for Oil and Gas Production Allocation] On 30 Sep 2009 at 10:56, Kaup, Chester wrote: > When I run the following query I only get results from 4/1/2008 forward. This worked fine in Access 2003. I am now using Access 2007. > Data from 1/1/1995 to 4/1/2008 is 0's if that makes a difference. > No I did not write these queries - an engineer did. ... > > SELECT [qry Injection Data for Oil and Gas Production Allocation].Well_In_CO2PAT, ... > FROM [qry Injection Data for Oil and Gas Production Allocation] > INNER JOIN [qry Injection Data for Oil and Gas Production Allocation] AS [qry Injection Data for Oil and Gas Production Allocation_1] > ON ([qry Injection Data for Oil and Gas Production Allocation].Well_in_CO2PAT_API = [qry Injection Data for Oil and Gas Production Allocation_1].Well_in_CO2PAT_API) > AND ([qry Injection Data for Oil and Gas Production Allocation].Other_Pattern_as_Well_API = [qry Injection Data for Oil and Gas Production Allocation_1].Other_Pattern_as_Well_API) ... >WHERE ... > AND (([qry Injection Data for Oil and Gas Production > Allocation_1].ProductionMonth)=DateAdd("m",-1, [qry Injection Data for > Oil and Gas Production Allocation]![ProductionMonth]))) -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From adtp at airtelmail.in Thu Oct 1 11:56:46 2009 From: adtp at airtelmail.in (A.D.Tejpal) Date: Thu, 1 Oct 2009 22:26:46 +0530 Subject: [AccessD] treeview control References: <6DC4725FDCDD72428D6114F1B6CC6E81C7951E@EXUAU020HWT110.oceania.corp.anz.com> Message-ID: <006001ca42c7$16fdfe30$f55ea27a@personald6374f> You are most welcome Darryl! Best wishes, A.D. Tejpal ------------ ----- Original Message ----- From: Collins, Darryl To: Access Developers discussion and problem solving Sent: Thursday, October 01, 2009 10:36 Subject: Re: [AccessD] treeview control Nice... I can see how this would be useful in the right app. Cheers Darryl -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of A.D.Tejpal Sent: Wednesday, 30 September 2009 10:31 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] treeview control Dale, My sample db named Form_Treeview might be of interest to you. It is available at Rogers Access Library. Link - http://www.rogersaccesslibrary.com/forum/forum_topics.asp?FID=45 This sample is in Access 2000 file format and works on Access 2007 as well. It demonstrates two styles of treeview, one represents employees organization chart, while the other facilitates marking of student grades in a convenient manner. In both cases, there is two way synchronization between the treeview and adjacent subform, for navigation and editing. An interesting feature has been incorporated in employees version. Whichever happens to be the current employee, complete chain of command is highlighted. The employee and his top boss are shown in two different colors while all intermediate supervisors in direct chain of command are shown in another color. This highlighting gets implemented on the treeview as well as subform in identical style. If an employee node is dragged over to another employee or department, the resulting modified structure gets displayed on the treeview as well as subform, duly highlighting the revised chain of command in the manner described in previous para. Note: This is a fresh sample db and as mentioned at the end of explanatory notes accompanying the sample, Drew's wonderful series of posts on treeview control, and Arthur's excellent article on the subject (in DatabaseAdvisors) have been of great help. Best wishes, A.D. Tejpal ------------ From adtp at airtelmail.in Thu Oct 1 13:42:47 2009 From: adtp at airtelmail.in (A.D.Tejpal) Date: Fri, 2 Oct 2009 00:12:47 +0530 Subject: [AccessD] treeview control References: <110192.69137.qm@web50405.mail.re2.yahoo.com><008301ca41ca$578ae4c0$bc5fa27a@personald6374f> <29f585dd0910010727v7c252585qb67987863f701abc@mail.gmail.com> Message-ID: <006101ca42c7$1969f520$f55ea27a@personald6374f> Arthur, My sincere thanks. So nice of you. Your article and Drew's posts have been of great help. If I understand it correctly, the functionality desired by you, i.e. depiction of more than one child under a given grand parent in treeview, is already available in the sample db. In employees treeview, department nodes (e.g Finance / Sales) are the root nodes (i.e. grand parents), each having one child as per existing sample data, acting as a departmental head. However, there is no problem in creating more than one department head (say Vice-President 1 & 2). It can be done in three alternative ways as follows: 1 - Drag the desired employee node to the department node. That employee will become direct child to the department node and become one of the top level heads in that department, at par with existing ones. As soon as such a drag / drop is completed, modified hierarchical set up gets displayed in treeview as well as adjacent subform, with the revised chain of command duly highlighted in both. 2 - In the subform, on the record pertaining to given employee, simply clear the existing entry in ReportsTo column. It will have the same effect as that outlined in para 1 above. 3 - Enter a new record, leaving the Reports to column blank and filling in the desired department. The freshly entered employee will become a direct child of pertinent department's node (which is a root node), in addition to any other such children - if existing. Note: (a) If desired an employee can be dragged over to a department other than to which he currently belongs. (b) If an employee is dragged to an empty space within the treeview, a new department will get created (the user will be prompted for the name of new department) and the said employee's node will become direct child of the new department node. (c) There is no limit to the nested levels of hierarchy that can be depicted on employees treeview. You might like to confirm whether the features outlined above are in line with what you had in mind. Best wishes, A.D. Tejpal ------------ ----- Original Message ----- From: Arthur Fuller To: Access Developers discussion and problem solving Sent: Thursday, October 01, 2009 19:57 Subject: Re: [AccessD] treeview control Hi A.D. I've looked over your sample treeview app and it's definitely nicer than my own. I'm wondering how one might handle a slightly different requirement. Grandparent, parent and child are straightforward, but what if the Grandparent has more than one child? For example, suppose that the Grandparent is called Customers, and has two children, called Orders and Payments. Perhaps not the greatest example, but with luck you will get the general idea... GP: P1 P2 Pn Perhaps a better example would be a Customer who has several types of purchases, including Flight, EventTicket and HotelRoom. I would want each of these to be displayed in a separate node within the treeview. In all cases, there might be multiple entries. TIA, Arthur On Wed, Sep 30, 2009 at 8:31 AM, A.D.Tejpal wrote: > Dale, > > My sample db named Form_Treeview might be of interest to you. It is > available at Rogers Access Library. Link - > http://www.rogersaccesslibrary.com/forum/forum_topics.asp?FID=45 > > This sample is in Access 2000 file format and works on Access 2007 as > well. It demonstrates two styles of treeview, one represents employees > organization chart, while the other facilitates marking of student grades in > a convenient manner. > > In both cases, there is two way synchronization between the treeview and > adjacent subform, for navigation and editing. > > An interesting feature has been incorporated in employees version. > Whichever happens to be the current employee, complete chain of command is > highlighted. The employee and his top boss are shown in two different colors > while all intermediate supervisors in direct chain of command are shown in > another color. This highlighting gets implemented on the treeview as well as > subform in identical style. > > If an employee node is dragged over to another employee or department, > the resulting modified structure gets displayed on the treeview as well as > subform, duly highlighting the revised chain of command in the manner > described in previous para. > > Note: > This is a fresh sample db and as mentioned at the end of explanatory > notes accompanying the sample, Drew's wonderful series of posts on treeview > control, and Arthur's excellent article on the subject (in DatabaseAdvisors) > have been of great help. > > Best wishes, > A.D. Tejpal > ------------ From jwcolby at colbyconsulting.com Thu Oct 1 14:47:08 2009 From: jwcolby at colbyconsulting.com (jwcolby) Date: Thu, 01 Oct 2009 15:47:08 -0400 Subject: [AccessD] MySQL Message-ID: <4AC5073C.5050102@colbyconsulting.com> I am thinking of installing MySQL on my development laptop (vista), specifically to interface using c#, but I am wondering if it is easy to get Access to connect to MySQL? Any words of wisdom on: 1) The install under Vista? 2) Interfacing to c# 3) Interfacing to Access. -- John W. Colby www.ColbyConsulting.com From jwcolby at colbyconsulting.com Thu Oct 1 14:49:20 2009 From: jwcolby at colbyconsulting.com (jwcolby) Date: Thu, 01 Oct 2009 15:49:20 -0400 Subject: [AccessD] Table size In-Reply-To: <4ac4f098.0a04d00a.4885.148d@mx.google.com> References: <4ac4f098.0a04d00a.4885.148d@mx.google.com> Message-ID: <4AC507C0.3040207@colbyconsulting.com> > Remember, some of us have got pubs to go to....can't spend the day coding...LOL Precisely right! John W. Colby www.ColbyConsulting.com Max Wanadoo wrote: > Gustav, > > Remember, some of us have got pubs to go to....can't spend the day > coding...LOL > > Max > > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Gustav Brock > Sent: 01 October 2009 17:37 > To: accessd at databaseadvisors.com > Subject: Re: [AccessD] Table size > > Hi Arthur > > So much talking, so little action ... > > > Public Sub ListTableSize() > > Dim dbs As DAO.Database > Dim tdf As DAO.TableDef > > Dim strName As String > Dim strFile As String > Dim strPath As String > > Set dbs = CurrentDb > strName = dbs.Name > strPath = Left(strName, Len(strName) - Len(Dir(strName))) > > For Each tdf In dbs.TableDefs > strName = tdf.Name > ' Apply some filtering. > If Left(strName, 4) = "tblS" Then > strFile = strPath & strName & ".mdt" > Debug.Print strName, ; > CreateDatabase strFile, dbLangGeneral > DoCmd.TransferDatabase acExport, "Microsoft Access", strFile, acTable, > strName, strName > Debug.Print FileLen(strFile) > Kill strFile > End If > Next > > Set tdf = Nothing > Set dbs = Nothing > > End Sub > > >>>> jwcolby at colbyconsulting.com 01-10-2009 14:53 >>> > Jim, > > > In fact I'm left wondering why someone hasn't done that already... > > Because we all work for a living and no one wants to pay us to develop that? > > ;) > > But you are correct, it wouldn't be that tough to do. > > John W. Colby > www.ColbyConsulting.com > > > Jim Dettman wrote: >> Max, >> >> < on >> this site are amazing with their knowledge and skills. Impossible to keep >> up with. I think I have done something "clever" and the say "yeah, watch >> this bud".>> >> >> Been there many times. Sometime I feel like I live in the stone age > when >> I see a lot of the stuff on EE. >> >> <> >> >> Not here and I hope the reverse is true as well. I really was just > trying >> to point out that it's a thornier problem then it first appears. To > really >> do it right, you'd need to scan every page in the DB assigned to the table >> or do a compact and then just add up all the pages assigned to the table. >> And while the data page layouts for Jet 3.0 and 4.0 are pretty well known, >> what's known about the index pages and page usage maps are fuzzy at best. >> >> And then there are details such as page padding (leaving free space for >> new data); does JET do it or not? So even scanning all the pages and >> getting a very accurate storage count of the data still might not tell you >> how much space a table would occupy. If the fill factor was 50%, you > could >> be off by quite a bit. The best approach I guess would be a compact, > then >> just count the pages assigned to the tables and indexes. >> >> Without going through all that, the only realistic approach I've found > is >> to import a single table into a fresh MDB and then check the size. That > is >> accurate, but it's a lot of manual work. And now that I say that, I > think >> between all of us we could come up with some code to do that automatically >> fairly quickly for a given DB. In fact I'll see if I can squeeze out > some >> time latter today to do that. Would not be all that hard; read the >> tabledefs, create a scratch DB, transfer the table, get the on disk size > of >> the scratch DB, save info into a table, delete scratch DB, and repeat till >> done. >> >> In fact I'm left wondering why someone hasn't done that already... >> >> Jim. >> >> >> >> -----Original Message----- >> From: accessd-bounces at databaseadvisors.com >> [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Max Wanadoo >> Sent: Wednesday, September 30, 2009 8:13 PM >> To: 'Access Developers discussion and problem solving' >> Subject: Re: [AccessD] Table size >> >> Oh no, I didn't mean it that way. What I meant was the guys (and gals) on >> this site are amazing with their knowledge and skills. Impossible to keep >> up with. I think I have done something "clever" and the say "yeah, watch >> this bud". >> >> Hope I didn't offend anybody. Emails sometimes can be difficult. >> >> Anyway, John. Hope you got something out of it all - LOL. >> >> >> But, hey, tell you what, this might develop into a useful item. I never >> even considered Indexes. What about Reference overheads. Tons of stuff. >> >> >> Max >> >> >> -----Original Message----- >> From: accessd-bounces at databaseadvisors.com >> [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby >> Sent: 01 October 2009 01:06 >> To: Access Developers discussion and problem solving >> Subject: Re: [AccessD] Table size >> >> ROTFL. Don't worry about it Max. If it was easy MS would hand it off to >> the same summer interns >> that design North Wind DB and they would screw it up. >> >> John W. Colby >> www.ColbyConsulting.com >> >> >> Max Wanadoo wrote: >>> Sometime, you guys are just impossible... >>> >>> Max >>> >>> >>> -----Original Message----- >>> From: accessd-bounces at databaseadvisors.com >>> [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Jim Dettman >>> Sent: 30 September 2009 23:36 >>> To: 'Access Developers discussion and problem solving' >>> Subject: Re: [AccessD] Table size >>> >>> >>> Below is some code that may come a bit closer, but even so field size >>> measures characters, not storage space. Plus your not taking into > account >>> variable length fields, any of the database overhead (page and DB), or >>> indexes associated with a table. >>> >>> So even at best, all this will be off by quite a bit. >>> >>> Jim. >>> >>> Public Sub showSizes() >>> Dim sql As String >>> Dim td As TableDef >>> Dim recordSize As Long >>> Dim numRecords As Long >>> Dim inMemos As Long >>> Dim CurrentDb As Database >>> >>> Set CurrentDb = gTL1DB >>> >>> ' Create a temporary table for results: >>> >>> ' delete the table first, in case it's still > there >>> On Error Resume Next >>> CurrentDb.Execute "DROP TABLE T___tmp" >>> On Error GoTo 0 >>> >>> sql = "CREATE TABLE T___tmp(name TEXT (100), size INTEGER," >>> sql = sql & " recordSize INTEGER, numRecords INTEGER, inMemos INTEGER)" >>> CurrentDb.Execute sql >>> >>> Dim rs As Recordset >>> >>> Set rs = CurrentDb.OpenRecordset("T___tmp") >>> >>> ' for each table, add a record in T___tmp with its size info. >>> >>> For Each td In CurrentDb.TableDefs >>> recordSize = 0 >>> numRecords = 0 >>> inMemos = 0 >>> >>> rs.AddNew >>> rs!name = td.name >>> rs!size = sizeEstimate(td.name, recordSize, numRecords, inMemos) >>> rs!recordSize = recordSize >>> rs!numRecords = numRecords >>> rs!inMemos = inMemos >>> rs.Update >>> Next td >>> rs.Close >>> >>> ' print table size info in decreasing order of size >>> Set rs = CurrentDb.OpenRecordset("SELECT * FROM T___tmp ORDER BY size > DESC") >>> Do Until rs.EOF >>> If rs!size > 0 Then >>> Debug.Print rs!name; Tab(20); rs!size; Tab(30); " = "; > rs!inMemos; >>> Debug.Print Tab(45); "+ ("; rs!recordSize; Tab(55); " * "; >>> rs!numRecords; ")" >>> Else >>> Exit Do >>> End If >>> rs.MoveNext >>> Loop >>> rs.Close >>> >>> End Sub >>> >>> Public Function sizeEstimate(tableName As String, recordSize As Long, >>> numRecords As Long, inMemos As Long) As Long >>> Dim rs As Recordset >>> Dim fld As field >>> Dim msg As Integer >>> Dim CurrentDb As Database >>> Dim colMemos As New Collection >>> >>> >>> Set CurrentDb = gTL1DB >>> >>> On Error Resume Next >>> Set rs = CurrentDb.OpenRecordset(tableName) >>> If Err Then >>> sizeEstimate = 0 >>> Exit Function >>> End If >>> If rs.EOF Then >>> sizeEstimate = 0 >>> Exit Function >>> End If >>> rs.MoveLast >>> numRecords = rs.RecordCount >>> 'Debug.Print >>> 'Debug.Print tableName >>> ' get the size of the fixed-size fields >>> For Each fld In rs.Fields >>> recordSize = recordSize + fld.size >>> If fld.Type = dbMemo Or fld.Type = dbLongBinary Then >>> colMemos.Add fld.name >>> End If >>> ' Debug.Print fld.name; " size "; fld.size >>> Next fld >>> >>> sizeEstimate = (recordSize * numRecords) 'Bytes >>> >>> Dim ff As Variant >>> ' add up all the memo and long binary fields in >>> ' all the records. >>> If colMemos.count > 0 Then >>> rs.MoveFirst >>> Do Until rs.EOF >>> For Each ff In colMemos >>> inMemos = inMemos + rs.Fields(ff).FieldSize >>> Next ff >>> rs.MoveNext >>> Loop >>> End If >>> >>> sizeEstimate = sizeEstimate + inMemos >>> >>> 'If SizeEstimate > 1073741824 Then '1073741824 Bytes per GigaByte >>> ' msg = MsgBox("This view may still be larger than 1 GB. Do you wish > to >>> continue?", vbOKCancel + vbCritical, "View Size Warning") >>> ' If msg = 2 Then GoTo SizeEstimate_Exit >>> 'End If >>> >>> sizeEstimate_Exit: >>> rs.Close >>> End Function >>> >>> >>> >>> -----Original Message----- >>> From: accessd-bounces at databaseadvisors.com >>> [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Max Wanadoo >>> Sent: Wednesday, September 30, 2009 6:13 PM >>> To: 'Access Developers discussion and problem solving' >>> Subject: Re: [AccessD] Table size >>> >>> You could try something like this (below). >>> Knowing how many records you deal with, I have made the variable DOUBLES >>> >>> Not entirely sure it is accurate as I have only just written it and never >>> tested it in real life, but it may help. >>> >>> Max >>> >>> Sub sGetTableSizes() >>> Dim dbs As DAO.Database, tbl As DAO.TableDef >>> Dim sql As String, fld As Field, dblTotSize As Double >>> Dim dblFldSize As Double, dblRecCount As Double, dblTableSize As > Double >>> Set dbs = CurrentDb >>> For Each tbl In CurrentDb.TableDefs >>> If Not Left(tbl.Name, 1) = "~" And Not Left(tbl.Name, 4) = "Msys" > Then >>> dblRecCount = DCount("*", tbl.Name) >>> dblFldSize = 0 >>> For Each fld In tbl.Fields >>> dblFldSize = dblFldSize + fld.Size >>> Next fld >>> dblTableSize = dblFldSize * dblRecCount >>> Debug.Print tbl.Name, dblTableSize >>> End If >>> dblTotSize = dblTotSize + dblTableSize >>> Next tbl >>> MsgBox "Total Size: " & Format(dblTotSize, "##,##") >>> exithere: >>> Set dbs = Nothing: Set tbl = Nothing >>> Exit Sub >>> End Sub >>> >>> -----Original Message----- >>> From: accessd-bounces at databaseadvisors.com >>> [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby >>> Sent: 30 September 2009 20:21 >>> To: Access Developers discussion and problem solving >>> Subject: [AccessD] Table size >>> >>> Is there any direct way to obtain the total storage used for each table. >> A >>> client is approaching >>> the 2 gb limit and needs to split the BE. > > From max.wanadoo at gmail.com Thu Oct 1 14:59:28 2009 From: max.wanadoo at gmail.com (Max Wanadoo) Date: Thu, 1 Oct 2009 20:59:28 +0100 Subject: [AccessD] MySQL In-Reply-To: <4AC5073C.5050102@colbyconsulting.com> References: <4AC5073C.5050102@colbyconsulting.com> Message-ID: <4ac50a3a.0707d00a.659c.2f57@mx.google.com> No, but you might want to do it with Virtual Box (free from Sun). Max -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: 01 October 2009 20:47 To: Access Developers discussion and problem solving; VBA Subject: [AccessD] MySQL I am thinking of installing MySQL on my development laptop (vista), specifically to interface using c#, but I am wondering if it is easy to get Access to connect to MySQL? Any words of wisdom on: 1) The install under Vista? 2) Interfacing to c# 3) Interfacing to Access. -- 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 Thu Oct 1 15:03:00 2009 From: jwcolby at colbyconsulting.com (jwcolby) Date: Thu, 01 Oct 2009 16:03:00 -0400 Subject: [AccessD] InformationIsBeautiful... In-Reply-To: <4ac4f61c.0707d00a.4297.205d@mx.google.com> References: <4ac4f61c.0707d00a.4297.205d@mx.google.com> Message-ID: <4AC50AF4.1070508@colbyconsulting.com> Which is why I: Don't have an iPhone Don't twitter Don't IM Don't have myspace Don't have Facebook Unsubscribed from most email Don't do TV (not even mentioned) Which is not to say I get much more done than anyone else. ;) John W. Colby www.ColbyConsulting.com Max Wanadoo wrote: >>> So much talking, so little action ... > > http://www.informationisbeautiful.net/visualizations/the-hierarchy-of-digita > l-distractions/ > > No wonder I have no time to code... > > Max > > From fuller.artful at gmail.com Thu Oct 1 15:09:10 2009 From: fuller.artful at gmail.com (Arthur Fuller) Date: Thu, 1 Oct 2009 16:09:10 -0400 Subject: [AccessD] treeview control In-Reply-To: <006001ca42c7$16fdfe30$f55ea27a@personald6374f> References: <6DC4725FDCDD72428D6114F1B6CC6E81C7951E@EXUAU020HWT110.oceania.corp.anz.com> <006001ca42c7$16fdfe30$f55ea27a@personald6374f> Message-ID: <29f585dd0910011309l68dfa6f2n1028d332e9df7cdd@mail.gmail.com> A.D. Your suggestions did not quite hit the point I was attempting to make, which was Multiple Children Per Parent, each Child residing in a unique table. Consider this example: Customers Locations Machines ContactPersons In the above sketch, both Locations and ContactPersons are children of Customers. I want these on separate nodes within the Customers node. I can (and already have) figured out the first part of the problem, i.e. Customers, Locations and Machines, but the second part still eludes me. How to create the Locations node and the ContactPersons node, both being children of the parent node Customers? That's the part I cannot figure out. TIA. Arthur On Thu, Oct 1, 2009 at 12:56 PM, A.D.Tejpal wrote: > You are most welcome Darryl! > > Best wishes, > A.D. Tejpal > ------------ > > ----- Original Message ----- > From: Collins, Darryl > To: Access Developers discussion and problem solving > Sent: Thursday, October 01, 2009 10:36 > Subject: Re: [AccessD] treeview control > > > Nice... I can see how this would be useful in the right app. > > Cheers > Darryl > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of A.D.Tejpal > Sent: Wednesday, 30 September 2009 10:31 PM > To: Access Developers discussion and problem solving > Subject: Re: [AccessD] treeview control > > Dale, > > My sample db named Form_Treeview might be of interest to you. It is > available at Rogers Access Library. Link - > http://www.rogersaccesslibrary.com/forum/forum_topics.asp?FID=45 > > This sample is in Access 2000 file format and works on Access 2007 > as well. It demonstrates two styles of treeview, one represents > employees organization chart, while the other facilitates marking of > student grades in a convenient manner. > > In both cases, there is two way synchronization between the treeview > and adjacent subform, for navigation and editing. > > An interesting feature has been incorporated in employees version. > Whichever happens to be the current employee, complete chain of command > is highlighted. The employee and his top boss are shown in two different > colors while all intermediate supervisors in direct chain of command are > shown in another color. This highlighting gets implemented on the > treeview as well as subform in identical style. > > If an employee node is dragged over to another employee or > department, the resulting modified structure gets displayed on the > treeview as well as subform, duly highlighting the revised chain of > command in the manner described in previous para. > > Note: > This is a fresh sample db and as mentioned at the end of explanatory > notes accompanying the sample, Drew's wonderful series of posts on > treeview control, and Arthur's excellent article on the subject (in > DatabaseAdvisors) have been of great help. > > Best wishes, > A.D. Tejpal > ------------ > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > From DWUTKA at Marlow.com Thu Oct 1 15:31:58 2009 From: DWUTKA at Marlow.com (Drew Wutka) Date: Thu, 1 Oct 2009 15:31:58 -0500 Subject: [AccessD] treeview control In-Reply-To: <110192.69137.qm@web50405.mail.re2.yahoo.com> References: <110192.69137.qm@web50405.mail.re2.yahoo.com> Message-ID: The example database I put together for Tina should work fine in Access 2007. (Is a treeview control standard in 2007?) Drew -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Dale Kalsow Sent: Tuesday, September 22, 2009 2:44 PM To: Access Developers discussion and problem solving Subject: [AccessD] treeview control Good Afternoon, ? Does anyone have a simple treeview example for Access 2007, they are willing to share? ? Thanks! ? Dale -- 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 stuart at lexacorp.com.pg Thu Oct 1 16:11:49 2009 From: stuart at lexacorp.com.pg (Stuart McLachlan) Date: Fri, 02 Oct 2009 07:11:49 +1000 Subject: [AccessD] MySQL In-Reply-To: <4AC5073C.5050102@colbyconsulting.com> References: <4AC5073C.5050102@colbyconsulting.com> Message-ID: <4AC51B15.24643.4BD5427A@stuart.lexacorp.com.pg> I'm running mySQL as part of WAMP on my Visa llaptop. It works perfectly. (Using it for development of websites which run on LAMP. I use the myODBC connector to interface to Access. I'ts real simple. There is also an OLEDB connector which you can use with c# See for example: http://www.aspfree.com/c/a/Database/Database-Programming-in-C-Sharp-with-MySQL- Using-OleDB/ You can get the connectors here: http://www.mysql.com/products/connector/ -- Stuart On 1 Oct 2009 at 15:47, jwcolby wrote: > I am thinking of installing MySQL on my development laptop (vista), specifically to interface using > c#, but I am wondering if it is easy to get Access to connect to MySQL? > > Any words of wisdom on: > > 1) The install under Vista? > 2) Interfacing to c# > 3) Interfacing to Access. > > -- > 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 Thu Oct 1 19:24:46 2009 From: jwcolby at colbyconsulting.com (jwcolby) Date: Thu, 01 Oct 2009 20:24:46 -0400 Subject: [AccessD] MySQL In-Reply-To: <4AC51B15.24643.4BD5427A@stuart.lexacorp.com.pg> References: <4AC5073C.5050102@colbyconsulting.com> <4AC51B15.24643.4BD5427A@stuart.lexacorp.com.pg> Message-ID: <4AC5484E.3040607@colbyconsulting.com> Thanks Stuart. John W. Colby www.ColbyConsulting.com Stuart McLachlan wrote: > I'm running mySQL as part of WAMP on my Visa llaptop. It works perfectly. > (Using it for development of websites which run on LAMP. > > I use the myODBC connector to interface to Access. I'ts real simple. > > There is also an OLEDB connector which you can use with c# > > See for example: > http://www.aspfree.com/c/a/Database/Database-Programming-in-C-Sharp-with-MySQL- > Using-OleDB/ > > > You can get the connectors here: > http://www.mysql.com/products/connector/ > From jwcolby at colbyconsulting.com Thu Oct 1 20:03:22 2009 From: jwcolby at colbyconsulting.com (jwcolby) Date: Thu, 01 Oct 2009 21:03:22 -0400 Subject: [AccessD] SQL Server not locking up Message-ID: <4AC5515A.3070008@colbyconsulting.com> I am hesitantly declaring victory in the SQL Server war. I am going to award Nancy Lytle the award for the correct solution, with the proviso that she has to give it back if it turns out that the wily server misbehaves again. Since setting Max Degree of Parallelism to 3 I have not been locked out again. Understand that about this same time I also changed processor I/O affinity to only use the same three CPUs that I set CPU affinity for. And I have had so many problems with this, where it went away and then came back that I am very hesitant to declare victory but I did want to report back that the "locking up" issue hasn't recurred lately. Thanks go to everyone who volunteered suggestions. -- John W. Colby www.ColbyConsulting.com From Gustav at cactus.dk Fri Oct 2 01:47:18 2009 From: Gustav at cactus.dk (Gustav Brock) Date: Fri, 02 Oct 2009 08:47:18 +0200 Subject: [AccessD] Table size Message-ID: Hi Jim Okay, okay, so everyone here have lost their arms! Anyway, skipping a sip at the pub, here is how - leaving the "nice" things to someone else. Public Sub ListTableSize() Dim dbs As DAO.Database Dim tdf As DAO.TableDef Dim strName As String Dim strFile As String Dim strPath As String Dim lngBase As Long Dim lngSize As Long Set dbs = CurrentDb strName = dbs.Name strPath = Left(strName, Len(strName) - Len(Dir(strName))) ' Create empty database for Jim to measure the base file size. strFile = strPath & "base" & ".mdt" CreateDatabase strFile, dbLangGeneral lngBase = FileLen(strFile) Kill strFile Debug.Print "Base size", lngBase For Each tdf In dbs.TableDefs strName = tdf.Name ' Apply some filtering. If Left(strName, 4) = "tblS" Then strFile = strPath & strName & ".mdt" Debug.Print strName, ; CreateDatabase strFile, dbLangGeneral DoCmd.TransferDatabase acExport, "Microsoft Access", strFile, acTable, strName, strName lngSize = FileLen(strFile) - lngBase Kill strFile Debug.Print lngSize End If Next Set tdf = Nothing Set dbs = Nothing End Sub Note that it will not measure linked tables; the function must be run from withing the backend or modified to use the backend database for dbs. /gustav >>> jimdettman at verizon.net 01-10-2009 19:16 >>> That needs to be modified a tad; a blank DB needs to be created and the disk size needs to be subtracted after the table is exported into it. It would also be nice to have the tables sizes stored in a table. Jim. -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: Thursday, October 01, 2009 12:37 PM To: accessd at databaseadvisors.com Subject: Re: [AccessD] Table size Hi Arthur So much talking, so little action ... Public Sub ListTableSize() Dim dbs As DAO.Database Dim tdf As DAO.TableDef Dim strName As String Dim strFile As String Dim strPath As String Set dbs = CurrentDb strName = dbs.Name strPath = Left(strName, Len(strName) - Len(Dir(strName))) For Each tdf In dbs.TableDefs strName = tdf.Name ' Apply some filtering. If Left(strName, 4) = "tblS" Then strFile = strPath & strName & ".mdt" Debug.Print strName, ; CreateDatabase strFile, dbLangGeneral DoCmd.TransferDatabase acExport, "Microsoft Access", strFile, acTable, strName, strName Debug.Print FileLen(strFile) Kill strFile End If Next Set tdf = Nothing Set dbs = Nothing End Sub From Gustav at cactus.dk Fri Oct 2 01:55:09 2009 From: Gustav at cactus.dk (Gustav Brock) Date: Fri, 02 Oct 2009 08:55:09 +0200 Subject: [AccessD] InformationIsBeautiful... Message-ID: Hi John But you once were at IM, right? As for the TV, my wife and I didn't install neither cable nor antenna when we moved a couple of years ago. Haven't looked back. Of course, "TV" is available form Internet sources and we watch that now and then - once a week or so for maybe 15 minutes. What is Facebook? /gustav >>> jwcolby at colbyconsulting.com 01-10-2009 22:03 >>> Which is why I: Don't have an iPhone Don't twitter Don't IM Don't have myspace Don't have Facebook Unsubscribed from most email Don't do TV (not even mentioned) Which is not to say I get much more done than anyone else. ;) John W. Colby www.ColbyConsulting.com Max Wanadoo wrote: >>> So much talking, so little action ... > > http://www.informationisbeautiful.net/visualizations/the-hierarchy-of-digital-distractions/ > > No wonder I have no time to code... > > Max From adtp at airtelmail.in Fri Oct 2 07:07:07 2009 From: adtp at airtelmail.in (A.D.Tejpal) Date: Fri, 2 Oct 2009 17:37:07 +0530 Subject: [AccessD] treeview control References: <6DC4725FDCDD72428D6114F1B6CC6E81C7951E@EXUAU020HWT110.oceania.corp.anz.com><006001ca42c7$16fdfe30$f55ea27a@personald6374f> <29f585dd0910011309l68dfa6f2n1028d332e9df7cdd@mail.gmail.com> Message-ID: <006301ca4359$1f4e0e80$205fa27a@personald6374f> Arthur, I get it. It would be great if you were in a position to send across a skeleton db with just the tables (including their relationship) having some sample data. I have something in mind that should work. My email address: adtp at airtelmail.in Best wishes, A.D. Tejpal ------------ ----- Original Message ----- From: Arthur Fuller To: Access Developers discussion and problem solving Sent: Friday, October 02, 2009 01:39 Subject: Re: [AccessD] treeview control A.D. Your suggestions did not quite hit the point I was attempting to make, which was Multiple Children Per Parent, each Child residing in a unique table. Consider this example: Customers Locations Machines ContactPersons In the above sketch, both Locations and ContactPersons are children of Customers. I want these on separate nodes within the Customers node. I can (and already have) figured out the first part of the problem, i.e. Customers, Locations and Machines, but the second part still eludes me. How to create the Locations node and the ContactPersons node, both being children of the parent node Customers? That's the part I cannot figure out. TIA. Arthur From jwcolby at colbyconsulting.com Fri Oct 2 07:10:05 2009 From: jwcolby at colbyconsulting.com (jwcolby) Date: Fri, 02 Oct 2009 08:10:05 -0400 Subject: [AccessD] SPAM-LOW: Re: InformationIsBeautiful... In-Reply-To: References: Message-ID: <4AC5ED9D.8070608@colbyconsulting.com> Gustav, We used IM for the DBA board meeting a long while ago. I haven't had IM for a couple of years now. John W. Colby www.ColbyConsulting.com Gustav Brock wrote: > Hi John > > But you once were at IM, right? > > As for the TV, my wife and I didn't install neither cable nor antenna when we moved a couple of years ago. Haven't looked back. > Of course, "TV" is available form Internet sources and we watch that now and then - once a week or so for maybe 15 minutes. > > What is Facebook? > > /gustav > >>>> jwcolby at colbyconsulting.com 01-10-2009 22:03 >>> > Which is why I: > > Don't have an iPhone > Don't twitter > Don't IM > Don't have myspace > Don't have Facebook > Unsubscribed from most email > Don't do TV (not even mentioned) > > Which is not to say I get much more done than anyone else. ;) > > John W. Colby > www.ColbyConsulting.com > > > Max Wanadoo wrote: >>>> So much talking, so little action ... >> http://www.informationisbeautiful.net/visualizations/the-hierarchy-of-digital-distractions/ >> >> No wonder I have no time to code... >> >> Max > > > From rockysmolin at bchacc.com Fri Oct 2 09:40:51 2009 From: rockysmolin at bchacc.com (Rocky Smolin) Date: Fri, 2 Oct 2009 07:40:51 -0700 Subject: [AccessD] Invalid Password Message-ID: Dear List: I have an app FE/BE with the BE password protected. I prompt for the password when the front end opens. Been running fine. Now the client asks to change the password every month or so, so I show him how to open the back end exclusive, unset the password, reset the password. That works. But when I open the front end, give the password, now trying to open one of the linked tables gives 'Invalid password' message. None of the queries which reference a linked table work - 'invalid password'. If I manually delete the links and manually relink it almost works. If, after the manual relink, I close and reopen, it works. What am I missing here? MTIA, Rocky From Gustav at cactus.dk Fri Oct 2 09:52:49 2009 From: Gustav at cactus.dk (Gustav Brock) Date: Fri, 02 Oct 2009 16:52:49 +0200 Subject: [AccessD] Invalid Password Message-ID: Hi Rocky That the password it saved with the link information. Try to open the backend using the last known password. If that fails, prompt for the new password and try again. When the new password is validated, run your code that relinks all tables. This should save the new password with the link information. /gustav >>> rockysmolin at bchacc.com 02-10-2009 16:40 >>> What am I missing here? From max.wanadoo at gmail.com Fri Oct 2 09:53:52 2009 From: max.wanadoo at gmail.com (Max Wanadoo) Date: Fri, 2 Oct 2009 15:53:52 +0100 Subject: [AccessD] Invalid Password In-Reply-To: References: Message-ID: <4ac61416.0702d00a.55bf.2e71@mx.google.com> Rocky, it sounds as if you have hardcoded the password somewhere in the coding or in a shortcut which launches the FE. Could you do a text search for the earlier password from any of the modules code windows.? Max -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Rocky Smolin Sent: 02 October 2009 15:41 To: 'Access Developers discussion and problem solving' Subject: [AccessD] Invalid Password Dear List: I have an app FE/BE with the BE password protected. I prompt for the password when the front end opens. Been running fine. Now the client asks to change the password every month or so, so I show him how to open the back end exclusive, unset the password, reset the password. That works. But when I open the front end, give the password, now trying to open one of the linked tables gives 'Invalid password' message. None of the queries which reference a linked table work - 'invalid password'. If I manually delete the links and manually relink it almost works. If, after the manual relink, I close and reopen, it works. What am I missing here? MTIA, Rocky From rockysmolin at bchacc.com Fri Oct 2 13:23:30 2009 From: rockysmolin at bchacc.com (Rocky Smolin) Date: Fri, 2 Oct 2009 11:23:30 -0700 Subject: [AccessD] Invalid Password In-Reply-To: <4ac61416.0702d00a.55bf.2e71@mx.google.com> References: <4ac61416.0702d00a.55bf.2e71@mx.google.com> Message-ID: Max: That was my first thought too but no - no hardcode. Password's carried in a global variable. Rocky -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Max Wanadoo Sent: Friday, October 02, 2009 7:54 AM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Invalid Password Rocky, it sounds as if you have hardcoded the password somewhere in the coding or in a shortcut which launches the FE. Could you do a text search for the earlier password from any of the modules code windows.? Max -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Rocky Smolin Sent: 02 October 2009 15:41 To: 'Access Developers discussion and problem solving' Subject: [AccessD] Invalid Password Dear List: I have an app FE/BE with the BE password protected. I prompt for the password when the front end opens. Been running fine. Now the client asks to change the password every month or so, so I show him how to open the back end exclusive, unset the password, reset the password. That works. But when I open the front end, give the password, now trying to open one of the linked tables gives 'Invalid password' message. None of the queries which reference a linked table work - 'invalid password'. If I manually delete the links and manually relink it almost works. If, after the manual relink, I close and reopen, it works. What am I missing here? 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 Fri Oct 2 13:24:24 2009 From: rockysmolin at bchacc.com (Rocky Smolin) Date: Fri, 2 Oct 2009 11:24:24 -0700 Subject: [AccessD] Invalid Password In-Reply-To: References: Message-ID: Gustav: Thanks. I'll try that. Rocky -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: Friday, October 02, 2009 7:53 AM To: accessd at databaseadvisors.com Subject: Re: [AccessD] Invalid Password Hi Rocky That the password it saved with the link information. Try to open the backend using the last known password. If that fails, prompt for the new password and try again. When the new password is validated, run your code that relinks all tables. This should save the new password with the link information. /gustav >>> rockysmolin at bchacc.com 02-10-2009 16:40 >>> What am I missing here? -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From max.wanadoo at gmail.com Fri Oct 2 13:53:14 2009 From: max.wanadoo at gmail.com (Max Wanadoo) Date: Fri, 2 Oct 2009 19:53:14 +0100 Subject: [AccessD] Invalid Password In-Reply-To: References: Message-ID: <4ac64c24.0508d00a.64c3.34a8@mx.google.com> Rocky, Just another thought if Gustav's idea doesn't do the trick and that is it is, of course, possible to declare the same public variable in more than one place. You might try doing a search for that. Max -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Rocky Smolin Sent: 02 October 2009 19:24 To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Invalid Password Gustav: Thanks. I'll try that. Rocky -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: Friday, October 02, 2009 7:53 AM To: accessd at databaseadvisors.com Subject: Re: [AccessD] Invalid Password Hi Rocky That the password it saved with the link information. Try to open the backend using the last known password. If that fails, prompt for the new password and try again. When the new password is validated, run your code that relinks all tables. This should save the new password with the link information. /gustav >>> rockysmolin at bchacc.com 02-10-2009 16:40 >>> What am I missing here? -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From Lambert.Heenan at chartisinsurance.com Fri Oct 2 14:27:02 2009 From: Lambert.Heenan at chartisinsurance.com (Heenan, Lambert) Date: Fri, 2 Oct 2009 15:27:02 -0400 Subject: [AccessD] Invalid Password In-Reply-To: <4ac64c24.0508d00a.64c3.34a8@mx.google.com> References: <4ac64c24.0508d00a.64c3.34a8@mx.google.com> Message-ID: ??? " is it is, of course, possible to declare the same public variable in more than one place" ??? Do that and you will get a compile error: "Ambiguous name detected: YourVariableName" Lambert -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Max Wanadoo Sent: Friday, October 02, 2009 2:53 PM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Invalid Password Rocky, Just another thought if Gustav's idea doesn't do the trick and that is it is, of course, possible to declare the same public variable in more than one place. You might try doing a search for that. Max From max.wanadoo at gmail.com Fri Oct 2 14:47:38 2009 From: max.wanadoo at gmail.com (Max Wanadoo) Date: Fri, 2 Oct 2009 20:47:38 +0100 Subject: [AccessD] Invalid Password In-Reply-To: References: <4ac64c24.0508d00a.64c3.34a8@mx.google.com> Message-ID: <4ac658e3.1c07d00a.4df8.0ef3@mx.google.com> Lambert, Hi, it will take it if they are both declared in modules and not CBF. No error given. Eg: Global xyz As String Max -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Heenan, Lambert Sent: 02 October 2009 20:27 To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Invalid Password ??? " is it is, of course, possible to declare the same public variable in more than one place" ??? Do that and you will get a compile error: "Ambiguous name detected: YourVariableName" Lambert -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Max Wanadoo Sent: Friday, October 02, 2009 2:53 PM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Invalid Password Rocky, Just another thought if Gustav's idea doesn't do the trick and that is it is, of course, possible to declare the same public variable in more than one place. You might try doing a search for that. Max -- 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 Oct 2 15:48:44 2009 From: Lambert.Heenan at chartisinsurance.com (Heenan, Lambert) Date: Fri, 2 Oct 2009 16:48:44 -0400 Subject: [AccessD] Invalid Password In-Reply-To: <4ac658e3.1c07d00a.4df8.0ef3@mx.google.com> References: <4ac64c24.0508d00a.64c3.34a8@mx.google.com> <4ac658e3.1c07d00a.4df8.0ef3@mx.google.com> Message-ID: Hi Max, Indeed you can *declare* a Global (or a Public) variable in more than one regular module. But as soon as you try to *use* the variable the code line that does so will generate the compile error: "Ambiguous name detected: YourVariableName" Interestingly 'Public' and 'Global' are not exactly the same thing, because if you try to declare a Global in the CBF then you will find that the IDE issues a compile error (as soon as you hit enter on the code line): Constants, fixed-length strings, arrays, user-define types and Declare statements not allowed as Public members of object modules" (as we know, form code modules are really Class (Object) modules.) Yet you *can* declare a variable as Public in the CBF. Why the difference? Well something declared Public in a class module is a *member* of the class exposed to the outside. So if you have Public strFrmVariable As String in a form named "MyForm", then the variable can be read and written to by code outside the form by fully referencing it... Forms![MyForm]![strFrmVariable] = "You can change this data" So even if two forms declare a Public variable with the same name, there is no ambiguity because the form names are different. With standard modules it makes no difference if you use Global or Public in declaring variables. You can declare a variable Public in one module and Global in another or Public in both or Global in both. The effect is the same. The code *will* compile as long as the variable is not actually used. Make use of it anywhere and you will get that Ambiguous name compile error. Lambert -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Max Wanadoo Sent: Friday, October 02, 2009 3:48 PM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Invalid Password Lambert, Hi, it will take it if they are both declared in modules and not CBF. No error given. Eg: Global xyz As String Max -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Heenan, Lambert Sent: 02 October 2009 20:27 To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Invalid Password ??? " is it is, of course, possible to declare the same public variable in more than one place" ??? Do that and you will get a compile error: "Ambiguous name detected: YourVariableName" Lambert From max.wanadoo at gmail.com Fri Oct 2 16:10:41 2009 From: max.wanadoo at gmail.com (Max Wanadoo) Date: Fri, 2 Oct 2009 22:10:41 +0100 Subject: [AccessD] Invalid Password In-Reply-To: References: <4ac64c24.0508d00a.64c3.34a8@mx.google.com> <4ac658e3.1c07d00a.4df8.0ef3@mx.google.com> Message-ID: <4ac66c55.1c07d00a.4df8.4166@mx.google.com> Lambert, hi. This is a bit weird. In the first mdb I tested, it compiled with error when placed in 2 modules but each value was different and kept difference when tested. So, I created a blank mdb and done same thing. This time it wouldn't compile without an error. Anyway, I don't use them any more..but that is obviously one less thing for Rocky to test. Max -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Heenan, Lambert Sent: 02 October 2009 21:49 To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Invalid Password Hi Max, Indeed you can *declare* a Global (or a Public) variable in more than one regular module. But as soon as you try to *use* the variable the code line that does so will generate the compile error: "Ambiguous name detected: YourVariableName" Interestingly 'Public' and 'Global' are not exactly the same thing, because if you try to declare a Global in the CBF then you will find that the IDE issues a compile error (as soon as you hit enter on the code line): Constants, fixed-length strings, arrays, user-define types and Declare statements not allowed as Public members of object modules" (as we know, form code modules are really Class (Object) modules.) Yet you *can* declare a variable as Public in the CBF. Why the difference? Well something declared Public in a class module is a *member* of the class exposed to the outside. So if you have Public strFrmVariable As String in a form named "MyForm", then the variable can be read and written to by code outside the form by fully referencing it... Forms![MyForm]![strFrmVariable] = "You can change this data" So even if two forms declare a Public variable with the same name, there is no ambiguity because the form names are different. With standard modules it makes no difference if you use Global or Public in declaring variables. You can declare a variable Public in one module and Global in another or Public in both or Global in both. The effect is the same. The code *will* compile as long as the variable is not actually used. Make use of it anywhere and you will get that Ambiguous name compile error. Lambert -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Max Wanadoo Sent: Friday, October 02, 2009 3:48 PM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Invalid Password Lambert, Hi, it will take it if they are both declared in modules and not CBF. No error given. Eg: Global xyz As String Max -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Heenan, Lambert Sent: 02 October 2009 20:27 To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Invalid Password ??? " is it is, of course, possible to declare the same public variable in more than one place" ??? Do that and you will get a compile error: "Ambiguous name detected: YourVariableName" Lambert -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From max.wanadoo at gmail.com Fri Oct 2 16:15:59 2009 From: max.wanadoo at gmail.com (Max Wanadoo) Date: Fri, 2 Oct 2009 22:15:59 +0100 Subject: [AccessD] Invalid Password In-Reply-To: References: <4ac64c24.0508d00a.64c3.34a8@mx.google.com> <4ac658e3.1c07d00a.4df8.0ef3@mx.google.com> Message-ID: <4ac66d93.0508d00a.752d.75ba@mx.google.com> Lambert, sorry meant to say, that nothing in what we have just said doesn't stop him using the ONE Global variable in multiple places. So, he may still have that problem. Max -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Heenan, Lambert Sent: 02 October 2009 21:49 To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Invalid Password Hi Max, Indeed you can *declare* a Global (or a Public) variable in more than one regular module. But as soon as you try to *use* the variable the code line that does so will generate the compile error: "Ambiguous name detected: YourVariableName" Interestingly 'Public' and 'Global' are not exactly the same thing, because if you try to declare a Global in the CBF then you will find that the IDE issues a compile error (as soon as you hit enter on the code line): Constants, fixed-length strings, arrays, user-define types and Declare statements not allowed as Public members of object modules" (as we know, form code modules are really Class (Object) modules.) Yet you *can* declare a variable as Public in the CBF. Why the difference? Well something declared Public in a class module is a *member* of the class exposed to the outside. So if you have Public strFrmVariable As String in a form named "MyForm", then the variable can be read and written to by code outside the form by fully referencing it... Forms![MyForm]![strFrmVariable] = "You can change this data" So even if two forms declare a Public variable with the same name, there is no ambiguity because the form names are different. With standard modules it makes no difference if you use Global or Public in declaring variables. You can declare a variable Public in one module and Global in another or Public in both or Global in both. The effect is the same. The code *will* compile as long as the variable is not actually used. Make use of it anywhere and you will get that Ambiguous name compile error. Lambert -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Max Wanadoo Sent: Friday, October 02, 2009 3:48 PM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Invalid Password Lambert, Hi, it will take it if they are both declared in modules and not CBF. No error given. Eg: Global xyz As String Max -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Heenan, Lambert Sent: 02 October 2009 20:27 To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Invalid Password ??? " is it is, of course, possible to declare the same public variable in more than one place" ??? Do that and you will get a compile error: "Ambiguous name detected: YourVariableName" Lambert -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From Johncliviger at aol.com Sat Oct 3 05:14:01 2009 From: Johncliviger at aol.com (Johncliviger at aol.com) Date: Sat, 3 Oct 2009 06:14:01 EDT Subject: [AccessD] Access 2002 SQL problem Message-ID: Hi all I have the following SQL code snippet and it produces the incorrect number of records when its run by Docmd.RunSQL strSQL, but the correct number when run thru Access query. No errors as raised. I've been looking at this problem for several days on/off now so can anyone offer a word of wisdom? TIA john cliviger Public Sub LetterHistory(R As String, SD As Date, ED As Date) ' R = report name, SD = Start Date, ED = End Date Dim strSQL As String On Error GoTo Flag1 strSQL = "INSERT INTO tbl_Letter_Specs ( Refnoc, DateLetterSent, LetterName ) " & _ "SELECT tbl_PatientDetails.REFNOC, Date() AS DateLetterSent, '" & R & "' AS LetterName " & _ "FROM tbl_PatientDetails INNER JOIN tbl_PatientSpecs ON tbl_PatientDetails.REFNOC = tbl_PatientSpecs.REFNOC " & _ "WHERE ((tbl_PatientSpecs.RP_DATE Between #" & Format(SD, "dd/mm/yyyy") & "# And #" & _ Format(ED, "dd/mm/yyyy") & "#)AND ((tbl_PatientDetails.RecallFlag) = 0));" From max.wanadoo at gmail.com Sat Oct 3 05:56:33 2009 From: max.wanadoo at gmail.com (Max Wanadoo) Date: Sat, 3 Oct 2009 11:56:33 +0100 Subject: [AccessD] Access 2002 SQL problem In-Reply-To: References: Message-ID: <4ac72de8.0a04d00a.40ba.ffffffcc@mx.google.com> Hi John, Hope you are keeping well. When you say " when its run by Docmd.RunSQL strSQL" do you mean the records are actually placed in the table AND when you say " number when run thru Access query " do you mean just VIEWING them in the QBE? If so, and the number in the table is less that the viewing total then it may be an index on the table which is limiting them and maybe not throwing the error or you code is trapping and ignoring it. How many are written to the table? How many are shown when viewed? Have you isolated the differing records? Some wild shots really. Max -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Johncliviger at aol.com Sent: 03 October 2009 11:14 To: AccessD at databaseadvisors.com Subject: [AccessD] Access 2002 SQL problem Hi all I have the following SQL code snippet and it produces the incorrect number of records when its run by Docmd.RunSQL strSQL, but the correct number when run thru Access query. No errors as raised. I've been looking at this problem for several days on/off now so can anyone offer a word of wisdom? TIA john cliviger Public Sub LetterHistory(R As String, SD As Date, ED As Date) ' R = report name, SD = Start Date, ED = End Date Dim strSQL As String On Error GoTo Flag1 strSQL = "INSERT INTO tbl_Letter_Specs ( Refnoc, DateLetterSent, LetterName ) " & _ "SELECT tbl_PatientDetails.REFNOC, Date() AS DateLetterSent, '" & R & "' AS LetterName " & _ "FROM tbl_PatientDetails INNER JOIN tbl_PatientSpecs ON tbl_PatientDetails.REFNOC = tbl_PatientSpecs.REFNOC " & _ "WHERE ((tbl_PatientSpecs.RP_DATE Between #" & Format(SD, "dd/mm/yyyy") & "# And #" & _ Format(ED, "dd/mm/yyyy") & "#)AND ((tbl_PatientDetails.RecallFlag) = 0));" -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From Johncliviger at aol.com Sat Oct 3 07:59:57 2009 From: Johncliviger at aol.com (Johncliviger at aol.com) Date: Sat, 3 Oct 2009 08:59:57 EDT Subject: [AccessD] Access 2002 SQL problem Message-ID: Hi Max Good to see your still on the ball. Hope your not flooded out down in the wet lands of Derby. When I run the Docmd.RunSQL the query produces 511 records when it should produce 48 records which it does thru QBE. It also works fine if I remove the 2nd AND ((tbl_PatientDetails.RecallFlag) = 0); I got to thinking that it must be the 2nd AND together with brackets in the wrong place. There is an Index on the table but its an Autonumber. Maybe I need format the SD and ED dates before they arrive in the Sub. To be continued...... regards johnc From Gustav at cactus.dk Sat Oct 3 08:11:46 2009 From: Gustav at cactus.dk (Gustav Brock) Date: Sat, 03 Oct 2009 15:11:46 +0200 Subject: [AccessD] Access 2002 SQL problem Message-ID: Hi John It's the date expressions in SQL. These must be formatted in the "reverse" US-format or (preferred) after the ISO standard: "WHERE ((tbl_PatientSpecs.RP_DATE Between #" & Format(SD, "yyyy\/mm\/dd") & "# And #" & _ Format(ED, "yyyy\/mm\/dd") & "#) AND (tbl_PatientDetails.RecallFlag = False));" /gustav >>> Johncliviger at aol.com 03-10-2009 12:14 >>> Hi all I have the following SQL code snippet and it produces the incorrect number of records when its run by Docmd.RunSQL strSQL, but the correct number when run thru Access query. No errors as raised. I've been looking at this problem for several days on/off now so can anyone offer a word of wisdom? TIA john cliviger Public Sub LetterHistory(R As String, SD As Date, ED As Date) ' R = report name, SD = Start Date, ED = End Date Dim strSQL As String On Error GoTo Flag1 strSQL = "INSERT INTO tbl_Letter_Specs ( Refnoc, DateLetterSent, LetterName ) " & _ "SELECT tbl_PatientDetails.REFNOC, Date() AS DateLetterSent, '" & R & "' AS LetterName " & _ "FROM tbl_PatientDetails INNER JOIN tbl_PatientSpecs ON tbl_PatientDetails.REFNOC = tbl_PatientSpecs.REFNOC " & _ "WHERE ((tbl_PatientSpecs.RP_DATE Between #" & Format(SD, "dd/mm/yyyy") & "# And #" & _ Format(ED, "dd/mm/yyyy") & "#)AND ((tbl_PatientDetails.RecallFlag) = 0));" From max.wanadoo at gmail.com Sat Oct 3 08:17:21 2009 From: max.wanadoo at gmail.com (Max Wanadoo) Date: Sat, 3 Oct 2009 14:17:21 +0100 Subject: [AccessD] Access 2002 SQL problem In-Reply-To: References: Message-ID: <4ac74ef5.1c07d00a.2626.45ec@mx.google.com> Hmm, you have confused me a bit here (easy done, eh?) When you run the sub are you putting the sql out to the IW with debug.print strSQL and then cut-n-pasting that into the QBE? Unless you do that you may find that you do not have EXACTLY the same query being run. Derby is fine, John. Up on the high grounds. We don't get much bad weather here really. All the rubbish that USA sends us via the Atlantic get dropped on Wales before it reaches us. All the rubbish that Scotland send us get dropped over YOUR area before it reaches us. The South only send good weather and nothing ever comes from the East. Well off, really. Max -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Johncliviger at aol.com Sent: 03 October 2009 14:00 To: accessd at databaseadvisors.com Subject: Re: [AccessD] Access 2002 SQL problem Hi Max Good to see your still on the ball. Hope your not flooded out down in the wet lands of Derby. When I run the Docmd.RunSQL the query produces 511 records when it should produce 48 records which it does thru QBE. It also works fine if I remove the 2nd AND ((tbl_PatientDetails.RecallFlag) = 0); I got to thinking that it must be the 2nd AND together with brackets in the wrong place. There is an Index on the table but its an Autonumber. Maybe I need format the SD and ED dates before they arrive in the Sub. To be continued...... regards johnc -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From max.wanadoo at gmail.com Sat Oct 3 08:19:07 2009 From: max.wanadoo at gmail.com (Max Wanadoo) Date: Sat, 3 Oct 2009 14:19:07 +0100 Subject: [AccessD] Access 2002 SQL problem In-Reply-To: References: Message-ID: <4ac74f57.0a04d00a.797a.02ef@mx.google.com> There we go John, I knew good old Gustav would have the answer. All this heartache because the yanks don't know that dates are always ddmmmyyyy. Max -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: 03 October 2009 14:12 To: accessd at databaseadvisors.com Subject: Re: [AccessD] Access 2002 SQL problem Hi John It's the date expressions in SQL. These must be formatted in the "reverse" US-format or (preferred) after the ISO standard: "WHERE ((tbl_PatientSpecs.RP_DATE Between #" & Format(SD, "yyyy\/mm\/dd") & "# And #" & _ Format(ED, "yyyy\/mm\/dd") & "#) AND (tbl_PatientDetails.RecallFlag = False));" /gustav >>> Johncliviger at aol.com 03-10-2009 12:14 >>> Hi all I have the following SQL code snippet and it produces the incorrect number of records when its run by Docmd.RunSQL strSQL, but the correct number when run thru Access query. No errors as raised. I've been looking at this problem for several days on/off now so can anyone offer a word of wisdom? TIA john cliviger Public Sub LetterHistory(R As String, SD As Date, ED As Date) ' R = report name, SD = Start Date, ED = End Date Dim strSQL As String On Error GoTo Flag1 strSQL = "INSERT INTO tbl_Letter_Specs ( Refnoc, DateLetterSent, LetterName ) " & _ "SELECT tbl_PatientDetails.REFNOC, Date() AS DateLetterSent, '" & R & "' AS LetterName " & _ "FROM tbl_PatientDetails INNER JOIN tbl_PatientSpecs ON tbl_PatientDetails.REFNOC = tbl_PatientSpecs.REFNOC " & _ "WHERE ((tbl_PatientSpecs.RP_DATE Between #" & Format(SD, "dd/mm/yyyy") & "# And #" & _ Format(ED, "dd/mm/yyyy") & "#)AND ((tbl_PatientDetails.RecallFlag) = 0));" -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From Johncliviger at aol.com Sat Oct 3 08:21:36 2009 From: Johncliviger at aol.com (Johncliviger at aol.com) Date: Sat, 3 Oct 2009 09:21:36 EDT Subject: [AccessD] Access 2002 SQL problem Message-ID: In a message dated 03-Oct-09 14:12:50 GMT Daylight Time, Gustav at cactus.dk writes: \/ Hallelujah!! Gustav That cracked it! It must Jet's manipulation of dates. Thanks Regards johnc From Johncliviger at aol.com Sat Oct 3 08:26:25 2009 From: Johncliviger at aol.com (Johncliviger at aol.com) Date: Sat, 3 Oct 2009 09:26:25 EDT Subject: [AccessD] Access 2002 SQL problem Message-ID: Max Can you go and have a word with Bill Gates and tell to sort it out. We were using dates before.......er maybe not. Thanks for the help johnc From Gustav at cactus.dk Sat Oct 3 08:29:02 2009 From: Gustav at cactus.dk (Gustav Brock) Date: Sat, 03 Oct 2009 15:29:02 +0200 Subject: [AccessD] Access 2002 SQL problem Message-ID: Hi John Great. But done blame JET. This is true for most if not all SQL. For SQL Server 2008 you'll see that the ISO format is the preferred, and for ADO it is a must if you wish to play safe. /gustav >>> Johncliviger at aol.com 03-10-2009 15:21 >>> In a message dated 03-Oct-09 14:12:50 GMT Daylight Time, Gustav at cactus.dk writes: \/ Hallelujah!! Gustav That cracked it! It must Jet's manipulation of dates. Thanks Regards johnc From Johncliviger at aol.com Sat Oct 3 08:33:42 2009 From: Johncliviger at aol.com (Johncliviger at aol.com) Date: Sat, 3 Oct 2009 09:33:42 EDT Subject: [AccessD] Access 2002 SQL problem Message-ID: Hi Gustav Thanks for the info. Bet where did you find this info. regards johnc From Johncliviger at aol.com Sat Oct 3 08:35:39 2009 From: Johncliviger at aol.com (Johncliviger at aol.com) Date: Sat, 3 Oct 2009 09:35:39 EDT Subject: [AccessD] Access 2002 SQL problem Message-ID: Gustav I've found it. _http://en.wikipedia.org/wiki/ISO_8601#Week_dates_ (http://en.wikipedia.org/wiki/ISO_8601#Week_dates) johnc From rockysmolin at bchacc.com Sat Oct 3 09:02:40 2009 From: rockysmolin at bchacc.com (Rocky Smolin) Date: Sat, 3 Oct 2009 07:02:40 -0700 Subject: [AccessD] Looking at another computer Message-ID: Dear List(s): Is there a way that I can run the task manager or equivalent on one computer on my local network to see what is running on another computer? MTIA Rocky From max.wanadoo at gmail.com Sat Oct 3 09:26:45 2009 From: max.wanadoo at gmail.com (Max Wanadoo) Date: Sat, 3 Oct 2009 15:26:45 +0100 Subject: [AccessD] [dba-Tech] Looking at another computer In-Reply-To: References: Message-ID: <4ac75f2b.0508d00a.40a5.04fc@mx.google.com> Team viewer works for me rocky (free) Max -----Original Message----- From: dba-tech-bounces at databaseadvisors.com [mailto:dba-tech-bounces at databaseadvisors.com] On Behalf Of Rocky Smolin Sent: 03 October 2009 15:03 To: 'Access Developers discussion and problem solving'; List Subject: [dba-Tech] Looking at another computer Dear List(s): Is there a way that I can run the task manager or equivalent on one computer on my local network to see what is running on another computer? MTIA Rocky From rockysmolin at bchacc.com Sat Oct 3 10:01:23 2009 From: rockysmolin at bchacc.com (Rocky Smolin) Date: Sat, 3 Oct 2009 08:01:23 -0700 Subject: [AccessD] [dba-Tech] Looking at another computer In-Reply-To: <4ac75f2b.0508d00a.40a5.04fc@mx.google.com> References: <4ac75f2b.0508d00a.40a5.04fc@mx.google.com> Message-ID: <3DE81C77C7E44B158E2C7A92C285DA22@HAL9005> Thanks. Will check it out. Rocky -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Max Wanadoo Sent: Saturday, October 03, 2009 7:27 AM To: 'Discussion of Hardware and Software issues'; 'Access Developers discussion and problem solving' Subject: Re: [AccessD] [dba-Tech] Looking at another computer Team viewer works for me rocky (free) Max -----Original Message----- From: dba-tech-bounces at databaseadvisors.com [mailto:dba-tech-bounces at databaseadvisors.com] On Behalf Of Rocky Smolin Sent: 03 October 2009 15:03 To: 'Access Developers discussion and problem solving'; List Subject: [dba-Tech] Looking at another computer Dear List(s): Is there a way that I can run the task manager or equivalent on one computer on my local network to see what is running on another computer? 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 Oct 3 10:07:46 2009 From: rockysmolin at bchacc.com (Rocky Smolin) Date: Sat, 3 Oct 2009 08:07:46 -0700 Subject: [AccessD] brain fart Message-ID: <2CAE0E05B7884831891CE8C5055FD81D@HAL9005> Dear List: I need to terminate an mdb if there has been no activity for a specified number of minutes. I remember there was a thread about this recently but can't remember the subject so I can search the archives. Does anyone remember that? MTIA Rocky From rockysmolin at bchacc.com Sat Oct 3 10:57:42 2009 From: rockysmolin at bchacc.com (Rocky Smolin) Date: Sat, 3 Oct 2009 08:57:42 -0700 Subject: [AccessD] Mysterious Data Problem Message-ID: Dear List: In the Containers Table a container that has a TruckID in the truck field indicates that that container is already in a shipment. So the list of containers available for shipping is based on a query which looks for containers in which the TruckID filed is null. When I ran that query 10 containers which were already in a shipment showed up in the query for unshipped containers anyway even though the field TruckID was obviously NOT null. I opened the back end did a compact and repair and that seems to have fixed the problem. But I don't know what caused it or why the compact fixed it. This has never happened to the user before and I've never seen it myself - a select query with a condition Is Null and it selects records in which that field is NOT null. Any ideas? MTIA Rocky Smolin Beach Access Software 858-259-4334 www.e-z-mrp.com www.bchacc.com From bill_patten at embarqmail.com Sat Oct 3 11:06:39 2009 From: bill_patten at embarqmail.com (Bill Patten) Date: Sat, 3 Oct 2009 09:06:39 -0700 Subject: [AccessD] Mysterious Data Problem In-Reply-To: References: Message-ID: Hi Rocky, Though I never heard of compact and repair removing empty string '' or a space, when you look at them they look like a null but are not so isNull(x) will show false but look true. HTH Bill -------------------------------------------------- From: "Rocky Smolin" Sent: Saturday, October 03, 2009 8:57 AM To: "'Access Developers discussion and problem solving'" Subject: [AccessD] Mysterious Data Problem Dear List: In the Containers Table a container that has a TruckID in the truck field indicates that that container is already in a shipment. So the list of containers available for shipping is based on a query which looks for containers in which the TruckID filed is null. When I ran that query 10 containers which were already in a shipment showed up in the query for unshipped containers anyway even though the field TruckID was obviously NOT null. I opened the back end did a compact and repair and that seems to have fixed the problem. But I don't know what caused it or why the compact fixed it. This has never happened to the user before and I've never seen it myself - a select query with a condition Is Null and it selects records in which that field is NOT null. Any ideas? MTIA Rocky Smolin Beach Access Software 858-259-4334 www.e-z-mrp.com www.bchacc.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From max.wanadoo at gmail.com Sat Oct 3 11:06:38 2009 From: max.wanadoo at gmail.com (Max Wanadoo) Date: Sat, 3 Oct 2009 17:06:38 +0100 Subject: [AccessD] Mysterious Data Problem In-Reply-To: References: Message-ID: <4ac77697.1818d00a.7d2c.ffffc1c9@mx.google.com> Top of head.. Are there other conditions in the select query and the Is Null is an OR? Max -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Rocky Smolin Sent: 03 October 2009 16:58 To: 'Access Developers discussion and problem solving' Subject: [AccessD] Mysterious Data Problem Dear List: In the Containers Table a container that has a TruckID in the truck field indicates that that container is already in a shipment. So the list of containers available for shipping is based on a query which looks for containers in which the TruckID filed is null. When I ran that query 10 containers which were already in a shipment showed up in the query for unshipped containers anyway even though the field TruckID was obviously NOT null. I opened the back end did a compact and repair and that seems to have fixed the problem. But I don't know what caused it or why the compact fixed it. This has never happened to the user before and I've never seen it myself - a select query with a condition Is Null and it selects records in which that field is NOT null. Any ideas? MTIA Rocky Smolin Beach Access Software 858-259-4334 www.e-z-mrp.com www.bchacc.com From rockysmolin at bchacc.com Sat Oct 3 12:08:59 2009 From: rockysmolin at bchacc.com (Rocky Smolin) Date: Sat, 3 Oct 2009 10:08:59 -0700 Subject: [AccessD] Mysterious Data Problem In-Reply-To: References: Message-ID: <3708900224794DA480B48BABB99D32F6@HAL9005> Opposite problem here, I think. The query specified Is Null as a criterion. When I ran the query these ten records (among others) showed up with a value in the field that should have only bee Null. The value in the TruckID field was valid and should have been there. After the C&R, the query correctly did not return those ten records. Rocky -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Bill Patten Sent: Saturday, October 03, 2009 9:07 AM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Mysterious Data Problem Hi Rocky, Though I never heard of compact and repair removing empty string '' or a space, when you look at them they look like a null but are not so isNull(x) will show false but look true. HTH Bill -------------------------------------------------- From: "Rocky Smolin" Sent: Saturday, October 03, 2009 8:57 AM To: "'Access Developers discussion and problem solving'" Subject: [AccessD] Mysterious Data Problem Dear List: In the Containers Table a container that has a TruckID in the truck field indicates that that container is already in a shipment. So the list of containers available for shipping is based on a query which looks for containers in which the TruckID filed is null. When I ran that query 10 containers which were already in a shipment showed up in the query for unshipped containers anyway even though the field TruckID was obviously NOT null. I opened the back end did a compact and repair and that seems to have fixed the problem. But I don't know what caused it or why the compact fixed it. This has never happened to the user before and I've never seen it myself - a select query with a condition Is Null and it selects records in which that field is NOT null. Any ideas? MTIA Rocky Smolin Beach Access Software 858-259-4334 www.e-z-mrp.com www.bchacc.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From rockysmolin at bchacc.com Sat Oct 3 12:09:16 2009 From: rockysmolin at bchacc.com (Rocky Smolin) Date: Sat, 3 Oct 2009 10:09:16 -0700 Subject: [AccessD] Mysterious Data Problem In-Reply-To: <4ac77697.1818d00a.7d2c.ffffc1c9@mx.google.com> References: <4ac77697.1818d00a.7d2c.ffffc1c9@mx.google.com> Message-ID: <1FB1CE7BD5B946699C605A365C3E30C5@HAL9005> No - no other criteria. R -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Max Wanadoo Sent: Saturday, October 03, 2009 9:07 AM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Mysterious Data Problem Top of head.. Are there other conditions in the select query and the Is Null is an OR? Max -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Rocky Smolin Sent: 03 October 2009 16:58 To: 'Access Developers discussion and problem solving' Subject: [AccessD] Mysterious Data Problem Dear List: In the Containers Table a container that has a TruckID in the truck field indicates that that container is already in a shipment. So the list of containers available for shipping is based on a query which looks for containers in which the TruckID filed is null. When I ran that query 10 containers which were already in a shipment showed up in the query for unshipped containers anyway even though the field TruckID was obviously NOT null. I opened the back end did a compact and repair and that seems to have fixed the problem. But I don't know what caused it or why the compact fixed it. This has never happened to the user before and I've never seen it myself - a select query with a condition Is Null and it selects records in which that field is NOT null. Any ideas? MTIA Rocky Smolin Beach Access Software 858-259-4334 www.e-z-mrp.com www.bchacc.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 Sat Oct 3 12:19:59 2009 From: bill_patten at embarqmail.com (Bill Patten) Date: Sat, 3 Oct 2009 10:19:59 -0700 Subject: [AccessD] Mysterious Data Problem In-Reply-To: <3708900224794DA480B48BABB99D32F6@HAL9005> References: <3708900224794DA480B48BABB99D32F6@HAL9005> Message-ID: <69639C8F7C0744AA9E5FD6D1AF75DF15@BPCS> Oops, guess I need to learn how to read. Sorry. B -------------------------------------------------- From: "Rocky Smolin" Sent: Saturday, October 03, 2009 10:08 AM To: "'Access Developers discussion and problem solving'" Subject: Re: [AccessD] Mysterious Data Problem Opposite problem here, I think. The query specified Is Null as a criterion. When I ran the query these ten records (among others) showed up with a value in the field that should have only bee Null. The value in the TruckID field was valid and should have been there. After the C&R, the query correctly did not return those ten records. Rocky -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Bill Patten Sent: Saturday, October 03, 2009 9:07 AM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Mysterious Data Problem Hi Rocky, Though I never heard of compact and repair removing empty string '' or a space, when you look at them they look like a null but are not so isNull(x) will show false but look true. HTH Bill -------------------------------------------------- From: "Rocky Smolin" Sent: Saturday, October 03, 2009 8:57 AM To: "'Access Developers discussion and problem solving'" Subject: [AccessD] Mysterious Data Problem Dear List: In the Containers Table a container that has a TruckID in the truck field indicates that that container is already in a shipment. So the list of containers available for shipping is based on a query which looks for containers in which the TruckID filed is null. When I ran that query 10 containers which were already in a shipment showed up in the query for unshipped containers anyway even though the field TruckID was obviously NOT null. I opened the back end did a compact and repair and that seems to have fixed the problem. But I don't know what caused it or why the compact fixed it. This has never happened to the user before and I've never seen it myself - a select query with a condition Is Null and it selects records in which that field is NOT null. Any ideas? MTIA Rocky Smolin Beach Access Software 858-259-4334 www.e-z-mrp.com www.bchacc.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/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 dbdoug at gmail.com Sat Oct 3 13:52:38 2009 From: dbdoug at gmail.com (Doug Steele) Date: Sat, 3 Oct 2009 11:52:38 -0700 Subject: [AccessD] SQL Server not found Message-ID: <4dd71a0c0910031152y720a74cco9d5073348a0b7773@mail.gmail.com> Hello all: I have an Access front end with a SQL Server express back end. Occasionally the SQL Server isn't available. I'd like the Access db to exit quickly and gracefully when this happens. However, it takes about two minutes for the initial query to SQL server to fail and it fails with a screen asking the user to fill in the Server name. Is there a quick way to find out if the server is available before I try to query it and to avoid getting the failure screens? Thanks, Doug Steele From wdhindman at dejpolsystems.com Sat Oct 3 14:49:19 2009 From: wdhindman at dejpolsystems.com (William Hindman) Date: Sat, 3 Oct 2009 15:49:19 -0400 Subject: [AccessD] brain fart In-Reply-To: <2CAE0E05B7884831891CE8C5055FD81D@HAL9005> References: <2CAE0E05B7884831891CE8C5055FD81D@HAL9005> Message-ID: <7766D521560B45C59977774B9986D243@jislaptopdev> http://www.rogersaccesslibrary.com/forum/forum_posts.asp?TID=327 William -------------------------------------------------- From: "Rocky Smolin" Sent: Saturday, October 03, 2009 11:07 AM To: "'Access Developers discussion and problem solving'" Subject: [AccessD] brain fart > Dear List: > > I need to terminate an mdb if there has been no activity for a specified > number of minutes. I remember there was a thread about this recently but > can't remember the subject so I can search the archives. Does anyone > remember that? > > 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 Oct 3 15:31:01 2009 From: rockysmolin at bchacc.com (Rocky Smolin) Date: Sat, 3 Oct 2009 13:31:01 -0700 Subject: [AccessD] brain fart In-Reply-To: <7766D521560B45C59977774B9986D243@jislaptopdev> References: <2CAE0E05B7884831891CE8C5055FD81D@HAL9005> <7766D521560B45C59977774B9986D243@jislaptopdev> Message-ID: <02DEE19A62AC4F098532493106C38E6C@HAL9005> Thanks Rocky -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of William Hindman Sent: Saturday, October 03, 2009 12:49 PM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] brain fart http://www.rogersaccesslibrary.com/forum/forum_posts.asp?TID=327 William -------------------------------------------------- From: "Rocky Smolin" Sent: Saturday, October 03, 2009 11:07 AM To: "'Access Developers discussion and problem solving'" Subject: [AccessD] brain fart > Dear List: > > I need to terminate an mdb if there has been no activity for a > specified number of minutes. I remember there was a thread about this > recently but can't remember the subject so I can search the archives. > Does anyone remember that? > > 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 marksimms at verizon.net Sat Oct 3 19:03:30 2009 From: marksimms at verizon.net (Mark Simms) Date: Sat, 03 Oct 2009 20:03:30 -0400 Subject: [AccessD] SQL Server not found In-Reply-To: <4dd71a0c0910031152y720a74cco9d5073348a0b7773@mail.gmail.com> References: <4dd71a0c0910031152y720a74cco9d5073348a0b7773@mail.gmail.com> Message-ID: <013401ca4486$1b7e2a00$0501a8c0@MSIMMSWS> http://www.sqlsecurity.com/Tools/FreeTools/tabid/65/Default.aspx SQLPing3 Command Line Doug - this tool may do the job for you....and hopefully respond much faster. Just shell out and call it from your Access start-up form. Then parse the output file. > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Doug Steele > Sent: Saturday, October 03, 2009 2:53 PM > To: accessd at databaseadvisors.com > Subject: [AccessD] SQL Server not found > > Hello all: > > I have an Access front end with a SQL Server express back > end. Occasionally the SQL Server isn't available. I'd like > the Access db to exit quickly and gracefully when this > happens. However, it takes about two minutes for the initial > query to SQL server to fail and it fails with a screen asking > the user to fill in the Server name. Is there a quick way to > find out if the server is available before I try to query it > and to avoid getting the failure screens? > > Thanks, > Doug Steele > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > From Gustav at cactus.dk Sun Oct 4 03:39:16 2009 From: Gustav at cactus.dk (Gustav Brock) Date: Sun, 04 Oct 2009 10:39:16 +0200 Subject: [AccessD] SQL Server not found Message-ID: Hi Doug You could try this simple method: Dim dbs As DAO.Database Dim qry As DAO.QueryDef On Error Resume Next Set dbs = CurrentDb Set qry = dbs.CreateQueryDef(vbNullString) qry.Connect = strConnect ' Your connect string for this SQL Server. qry.ReturnsRecords = False ' Execute some valid SQL statement. qry.SQL = "SELECT * FROM SomeTable" qry.Execute dbSeeChanges If Err <> 0 Then MsgBox "No connection to database server." End If /gustav > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Doug Steele > Sent: Saturday, October 03, 2009 2:53 PM > To: accessd at databaseadvisors.com > Subject: [AccessD] SQL Server not found > > Hello all: > > I have an Access front end with a SQL Server express back > end. Occasionally the SQL Server isn't available. I'd like > the Access db to exit quickly and gracefully when this > happens. However, it takes about two minutes for the initial > query to SQL server to fail and it fails with a screen asking > the user to fill in the Server name. Is there a quick way to > find out if the server is available before I try to query it > and to avoid getting the failure screens? > > Thanks, > Doug Steele From Darryl.Collins at anz.com Sun Oct 4 17:34:11 2009 From: Darryl.Collins at anz.com (Collins, Darryl) Date: Mon, 5 Oct 2009 09:34:11 +1100 Subject: [AccessD] SQL Server not found In-Reply-To: <4dd71a0c0910031152y720a74cco9d5073348a0b7773@mail.gmail.com> Message-ID: <6DC4725FDCDD72428D6114F1B6CC6E81C7953A@EXUAU020HWT110.oceania.corp.anz.com> Ping The server first to check? Ping(MySQLServerNameOrAlias) With the following code: '====================================== Option Compare Database Option Explicit Const SOCKET_ERROR = 0 Const MAX_IP = 10 Private Type WSAdata wVersion As Integer wHighVersion As Integer szDescription(0 To 255) As Byte szSystemStatus(0 To 128) As Byte iMaxSockets As Integer iMaxUdpDg As Integer lpVendorInfo As Long End Type Private Type Hostent h_name As Long h_aliases As Long h_addrtype As Integer h_length As Integer h_addr_list As Long End Type Private Type IP_OPTION_INFORMATION TTL As Byte Tos As Byte flags As Byte OptionsSize As Long OptionsData As String * 128 End Type Private Type IP_ECHO_REPLY Address(0 To 3) As Byte Status As Long RoundTripTime As Long DataSize As Integer Reserved As Integer Data As Long Options As IP_OPTION_INFORMATION End Type Private Declare Function GetHostByName Lib "wsock32.dll" Alias "gethostbyname" (ByVal HostName As String) As Long Private Declare Function WSAStartup Lib "wsock32.dll" (ByVal wVersionRequired&, lpWSAdata As WSAdata) As Long Private Declare Function WSACleanup Lib "wsock32.dll" () As Long Private Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" (hpvDest As Any, hpvSource As Any, ByVal cbCopy As Long) Private Declare Function IcmpCreateFile Lib "icmp.dll" () As Long Private Declare Function IcmpCloseHandle Lib "icmp.dll" (ByVal HANDLE As Long) As Boolean Private Declare Function IcmpSendEcho Lib "ICMP" (ByVal IcmpHandle As Long, ByVal DestAddress As Long, ByVal RequestData As String, ByVal RequestSize As Integer, RequestOptns As IP_OPTION_INFORMATION, ReplyBuffer As IP_ECHO_REPLY, ByVal ReplySize As Long, ByVal Timeout As Long) As Boolean Public Function Ping(sAddr As String, Optional Timeout As Integer = 2000) As Integer Dim hFile As Long, lpWSAdata As WSAdata Dim hHostent As Hostent, AddrList As Long Dim Address As Long, rIP As String Dim OptInfo As IP_OPTION_INFORMATION Dim EchoReply As IP_ECHO_REPLY Call WSAStartup(&H101, lpWSAdata) If GetHostByName(sAddr + String(64 - Len(sAddr), 0)) <> SOCKET_ERROR Then CopyMemory hHostent.h_name, ByVal GetHostByName(sAddr + String(64 - Len(sAddr), 0)), Len(hHostent) CopyMemory AddrList, ByVal hHostent.h_addr_list, 4 CopyMemory Address, ByVal AddrList, 4 End If hFile = IcmpCreateFile() If hFile = 0 Then Ping = -2 ' MsgBox "Unable to Create File Handle" Exit Function End If OptInfo.TTL = 255 If IcmpSendEcho(hFile, Address, String(32, "A"), 32, OptInfo, EchoReply, Len(EchoReply) + 8, Timeout) Then rIP = CStr(EchoReply.Address(0)) + "." + CStr(EchoReply.Address(1)) + "." + CStr(EchoReply.Address(2)) + "." + CStr(EchoReply.Address(3)) Else Ping = -1 ' MsgBox "Timeout" End If If EchoReply.Status = 0 Then Ping = EchoReply.RoundTripTime Else Ping = -3 End If IcmpCloseHandle hFile WSACleanup End Function '=================================================================== Cheers Darryl -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Doug Steele Sent: Sunday, 4 October 2009 5:53 AM To: accessd at databaseadvisors.com Subject: [AccessD] SQL Server not found Hello all: I have an Access front end with a SQL Server express back end. Occasionally the SQL Server isn't available. I'd like the Access db to exit quickly and gracefully when this happens. However, it takes about two minutes for the initial query to SQL server to fail and it fails with a screen asking the user to fill in the Server name. Is there a quick way to find out if the server is available before I try to query it and to avoid getting the failure screens? Thanks, Doug Steele -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com "This e-mail and any attachments to it (the "Communication") is, unless otherwise stated, confidential, may contain copyright material and is for the use only of the intended recipient. If you receive the Communication in error, please notify the sender immediately by return e-mail, delete the Communication and the return e-mail, and do not read, copy, retransmit or otherwise deal with it. Any views expressed in the Communication are those of the individual sender only, unless expressly stated to be those of Australia and New Zealand Banking Group Limited ABN 11 005 357 522, or any of its related entities including ANZ National Bank Limited (together "ANZ"). ANZ does not accept liability in connection with the integrity of or errors in the Communication, computer virus, data corruption, interference or delay arising from or in respect of the Communication." From adtp at airtelmail.in Sun Oct 4 22:29:23 2009 From: adtp at airtelmail.in (A.D.Tejpal) Date: Mon, 5 Oct 2009 08:59:23 +0530 Subject: [AccessD] Invalid Password References: <4ac64c24.0508d00a.64c3.34a8@mx.google.com> <4ac658e3.1c07d00a.4df8.0ef3@mx.google.com> <4ac66d93.0508d00a.752d.75ba@mx.google.com> Message-ID: <002201ca456c$6f04a3c0$fc5ea27a@personald6374f> Rocky, If your client needs to implement periodic change of BE password, it might be preferable to provide a convenient arrangement so that at the click of a command button in the front end, the BE password gets altered as desired, accompanied by re-linking of all linked tables, based upon new password. It is noticed that if the BE is password protected, conventional re-assignment of modified connect string (e.g. tdf.Connect = "<>") becomes ineffective (without causing any error). If this is followed by the usual tdf.RefreshLink statement, an error is encountered. One way around the above hurdle could be to delete existing linked tables and replace the same by freshly linked ones. If this approach is acceptable, a suitable solution could be devised so that the user has simply to enter the new password and click a button in FE for automated change of BE password accompanied by freshly linked tables. Best wishes, A.D. Tejpal ------------ ----- Original Message ----- From: Rocky Smolin To: 'Access Developers discussion and problem solving' Sent: Friday, October 02, 2009 20:10 Subject: [AccessD] Invalid Password Dear List: I have an app FE/BE with the BE password protected. I prompt for the password when the front end opens. Been running fine. Now the client asks to change the password every month or so, so I show him how to open the back end exclusive, unset the password, reset the password. That works. But when I open the front end, give the password, now trying to open one of the linked tables gives 'Invalid password' message. None of the queries which reference a linked table work - 'invalid password'. If I manually delete the links and manually relink it almost works. If, after the manual relink, I close and reopen, it works. What am I missing here? MTIA, Rocky From rockysmolin at bchacc.com Sun Oct 4 22:56:33 2009 From: rockysmolin at bchacc.com (Rocky Smolin) Date: Sun, 4 Oct 2009 20:56:33 -0700 Subject: [AccessD] Invalid Password In-Reply-To: <002201ca456c$6f04a3c0$fc5ea27a@personald6374f> References: <4ac64c24.0508d00a.64c3.34a8@mx.google.com> <4ac658e3.1c07d00a.4df8.0ef3@mx.google.com><4ac66d93.0508d00a.752d.75ba@mx.google.com> <002201ca456c$6f04a3c0$fc5ea27a@personald6374f> Message-ID: <5A72AEF4F7C143089AC896C70C6E530D@HAL9005> A.D.: I understand and that looks like a good solution - I prefer functions that work through the front end with a button click - keeps the user out of the OS. But to change the password on the back end I believe you need to open the BE exclusive. So how can you change the BE password through the front end? Thanks and regards, Rocky Smolin Beach Access Software 858-259-4334 www.e-z-mrp.com www.bchacc.com -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of A.D.Tejpal Sent: Sunday, October 04, 2009 8:29 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Invalid Password Rocky, If your client needs to implement periodic change of BE password, it might be preferable to provide a convenient arrangement so that at the click of a command button in the front end, the BE password gets altered as desired, accompanied by re-linking of all linked tables, based upon new password. It is noticed that if the BE is password protected, conventional re-assignment of modified connect string (e.g. tdf.Connect = "<>") becomes ineffective (without causing any error). If this is followed by the usual tdf.RefreshLink statement, an error is encountered. One way around the above hurdle could be to delete existing linked tables and replace the same by freshly linked ones. If this approach is acceptable, a suitable solution could be devised so that the user has simply to enter the new password and click a button in FE for automated change of BE password accompanied by freshly linked tables. Best wishes, A.D. Tejpal ------------ ----- Original Message ----- From: Rocky Smolin To: 'Access Developers discussion and problem solving' Sent: Friday, October 02, 2009 20:10 Subject: [AccessD] Invalid Password Dear List: I have an app FE/BE with the BE password protected. I prompt for the password when the front end opens. Been running fine. Now the client asks to change the password every month or so, so I show him how to open the back end exclusive, unset the password, reset the password. That works. But when I open the front end, give the password, now trying to open one of the linked tables gives 'Invalid password' message. None of the queries which reference a linked table work - 'invalid password'. If I manually delete the links and manually relink it almost works. If, after the manual relink, I close and reopen, it works. What am I missing here? MTIA, Rocky -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From Darryl.Collins at anz.com Sun Oct 4 23:10:47 2009 From: Darryl.Collins at anz.com (Collins, Darryl) Date: Mon, 5 Oct 2009 15:10:47 +1100 Subject: [AccessD] Refer to Forms as variables... In-Reply-To: <5A72AEF4F7C143089AC896C70C6E530D@HAL9005> Message-ID: <6DC4725FDCDD72428D6114F1B6CC6E81C79541@EXUAU020HWT110.oceania.corp.anz.com> Hi All, I know I have done this before, but now I can't seem to get it to work right now - not much joy on Google. Bah Humbug and Grrrr. Using A2003. This works [Forms]![ITPMO_frmMenu_ResourcesHumans]![ITPMO_frmResources_People_].[Fo rm].Requery But what I want to do is this: [Forms]![& gstrFormName & ]![ & gstrSubForm & ].[Form].Requery Where gstrFormName = "ITPMO_frmMenu_ResourcesHumans" And gstrSubForm ="ITPMO_frmResources_People_" Anyone got any pointers? Cheers Darryl. "This e-mail and any attachments to it (the "Communication") is, unless otherwise stated, confidential, may contain copyright material and is for the use only of the intended recipient. If you receive the Communication in error, please notify the sender immediately by return e-mail, delete the Communication and the return e-mail, and do not read, copy, retransmit or otherwise deal with it. Any views expressed in the Communication are those of the individual sender only, unless expressly stated to be those of Australia and New Zealand Banking Group Limited ABN 11 005 357 522, or any of its related entities including ANZ National Bank Limited (together "ANZ"). ANZ does not accept liability in connection with the integrity of or errors in the Communication, computer virus, data corruption, interference or delay arising from or in respect of the Communication." From stuart at lexacorp.com.pg Mon Oct 5 00:27:13 2009 From: stuart at lexacorp.com.pg (Stuart McLachlan) Date: Mon, 05 Oct 2009 15:27:13 +1000 Subject: [AccessD] Refer to Forms as variables... In-Reply-To: <6DC4725FDCDD72428D6114F1B6CC6E81C79541@EXUAU020HWT110.oceania.corp.anz.com> References: <5A72AEF4F7C143089AC896C70C6E530D@HAL9005>, <6DC4725FDCDD72428D6114F1B6CC6E81C79541@EXUAU020HWT110.oceania.corp.anz.com> Message-ID: <4AC983B1.11925.5D0DE5C5@stuart.lexacorp.com.pg> Lose the bangs. Use: Forms(gstrFormName)(gstrSubForm).Form.Requery -- Stuart > On 5 Oct 2009 at 15:10, Collins, Darryl wrote: > Hi All, > > I know I have done this before, but now I can't seem to get it to work > right now - not much joy on Google. Bah Humbug and Grrrr. Using A2003. > > This works > [Forms]![ITPMO_frmMenu_ResourcesHumans]![ITPMO_frmResources_People_].[Fo > rm].Requery > > But what I want to do is this: > [Forms]![& gstrFormName & ]![ & gstrSubForm & ].[Form].Requery > > Where gstrFormName = "ITPMO_frmMenu_ResourcesHumans" > And gstrSubForm ="ITPMO_frmResources_People_" > > Anyone got any pointers? > > Cheers > Darryl. > > "This e-mail and any attachments to it (the "Communication") is, unless otherwise stated, confidential, may contain copyright material and is for the use only of the intended recipient. If you receive the Communication in error, please notify the sender immediately by return e-mail, delete the Communication and the return e-mail, and do not read, copy, retransmit or otherwise deal with it. Any views expressed in the Communication are those of the individual sender only, unless expressly stated to be those of Australia and New Zealand Banking Group Limited ABN 11 005 357 522, or any of its related entities including ANZ National Bank Limited (together "ANZ"). ANZ does not accept liability in connection with the integrity of or errors in the Communication, computer virus, data corruption, interference or delay arising from or in respect of the Communication." > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com From shamil at smsconsulting.spb.ru Mon Oct 5 02:26:25 2009 From: shamil at smsconsulting.spb.ru (Shamil Salakhetdinov) Date: Mon, 5 Oct 2009 11:26:25 +0400 Subject: [AccessD] Refer to Forms as variables... In-Reply-To: <6DC4725FDCDD72428D6114F1B6CC6E81C79541@EXUAU020HWT110.oceania.corp.anz.com> References: <5A72AEF4F7C143089AC896C70C6E530D@HAL9005> <6DC4725FDCDD72428D6114F1B6CC6E81C79541@EXUAU020HWT110.oceania.corp.anz.com> Message-ID: <00ae01ca458d$26b7b780$74272680$@spb.ru> Hi Darryl, Forms(gstrFormName).Controls(gstrSubForm).Form.Requery should make "the trick" or just Forms(gstrFormName)(gstrSubForm).Form.Requery --Shamil -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Collins, Darryl Sent: Monday, October 05, 2009 8:11 AM To: Access Developers discussion and problem solving Subject: [AccessD] Refer to Forms as variables... Hi All, I know I have done this before, but now I can't seem to get it to work right now - not much joy on Google. Bah Humbug and Grrrr. Using A2003. This works [Forms]![ITPMO_frmMenu_ResourcesHumans]![ITPMO_frmResources_People_].[Fo rm].Requery But what I want to do is this: [Forms]![& gstrFormName & ]![ & gstrSubForm & ].[Form].Requery Where gstrFormName = "ITPMO_frmMenu_ResourcesHumans" And gstrSubForm ="ITPMO_frmResources_People_" Anyone got any pointers? Cheers Darryl. __________ Information from ESET NOD32 Antivirus, version of virus signature database 4479 (20091004) __________ The message was checked by ESET NOD32 Antivirus. http://www.esetnod32.ru From adtp at airtelmail.in Mon Oct 5 07:24:50 2009 From: adtp at airtelmail.in (A.D.Tejpal) Date: Mon, 5 Oct 2009 17:54:50 +0530 Subject: [AccessD] Invalid Password References: <4ac64c24.0508d00a.64c3.34a8@mx.google.com> <4ac658e3.1c07d00a.4df8.0ef3@mx.google.com><4ac66d93.0508d00a.752d.75ba@mx.google.com><002201ca456c$6f04a3c0$fc5ea27a@personald6374f> <5A72AEF4F7C143089AC896C70C6E530D@HAL9005> Message-ID: <009e01ca45b7$1c90bde0$065ea27a@personald6374f> Rocky, Subroutine P_ChangeBePwdAndRelink() as given below, will do the needful. Place two text boxes named TxtPwdNew and TxtPwdNewConfirm (with password as the input mask) on a form in the FE. The code in click event of command button on this form would be: ' Code in form's module '========================== Private Sub CmdSetNewPwd_Click() If Len(Me.TxtPwdNew) > 0 And _ Me.TxtPwdNewConfirm = _ Me.TxtPwdNew Then P_ChangeBePwdAndRelink Me.TxtPwdNew Else MsgBox "Discrepancy in entries" End If End Sub '========================== With the above arrangement, the user simply to enters the new password in the text boxes and clicks the command button for automated change of password in BE, accompanied by freshly linked tables in FE. Best wishes, A.D. Tejpal ------------ ' Code in general or form's module '==================================== Sub P_ChangeBePwdAndRelink(NewPwd As String) On Error GoTo ErrTrap ' Changes password of back end db, and ' replaces all existing linked tables by fresh ' ones, with revised connection string as per ' new password. Dim db As DAO.Database Dim dbBE As DAO.Database Dim rst As DAO.Recordset Dim BePath As String, ConnString As String Dim OldPwd As String, Qst As String Dim Cnt As Long, Rtv As Variant Dim Tnm As String Const BePrefix As String = "DATABASE=" Const PwdPrefix As String = "PWD=" Const TempTableName As String = "T_ZZZTemp" Set db = DBEngine(0)(0) ' Delete TempTable (T_ZZZTemp) - if existing. On Error Resume Next DoCmd.DeleteObject acTable, TempTableName On Error GoTo ErrTrap ' Make fresh temp table so as to reflect latest ' status of linked tables. Qst = "SELECT Connect, Database, " & _ " Name INTO " & TempTableName & _ " FROM MSysObjects " & _ " WHERE Type = 6;" db.Execute Qst, dbFailOnError Set rst = db.OpenRecordset(TempTableName) If rst.RecordCount > 0 Then ' Get existing BE path and connect string BePath = rst.Fields("Database") ConnString = rst.Fields("Connect") & BePath ' Extract existing password from conn string Rtv = Split(ConnString, ";") OldPwd = "" For Cnt = 0 To UBound(Rtv) If Rtv(Cnt) Like PwdPrefix & "*" Then OldPwd = Mid(Rtv(Cnt), _ Len(PwdPrefix) + 1) Exit For End If Next If NewPwd <> OldPwd Then ' Change BE password to new one. Set dbBE = OpenDatabase(BePath, True, _ False, ";" & PwdPrefix & OldPwd & ";") dbBE.NewPassword OldPwd, NewPwd ' Modify the connect string as per new password ConnString = Replace(ConnString, _ PwdPrefix & OldPwd, _ PwdPrefix & NewPwd) ' Delete existing linked tables and recreate them ' afresh as per new connect string. Do Until rst.EOF Tnm = rst.Fields("Name") DoCmd.DeleteObject acTable, Tnm DoCmd.TransferDatabase acLink, _ "Microsoft Access", BePath, _ acTable, Tnm, Tnm rst.MoveNext Loop db.TableDefs.Refresh MsgBox "New password as specified, has " & _ "been set for the BE" & vbCrLf & _ "Connect strings for all linked tables " & _ "have also been revised accordingly" Else MsgBox "Newly supplied password is " & _ "same as existing one" End If Else MsgBox "No Linked Tables Found" End If ' Note: ' If the back end db is password protected, ' assignment of a new connect string by using a ' statement like tdf.Connect = ConnString becomes ' ineffective The existing connect string continues ' to hold good). Also, statement like tdf.RefreshLink ' gives error. ExitPoint: rst.Close Set rst = Nothing Set dbBE = Nothing Set db = Nothing On Error GoTo 0 Exit Sub ErrTrap: MsgBox Err.Number & " - " & Err.DESCRIPTION Resume ExitPoint End Sub '===================================== ----- Original Message ----- From: Rocky Smolin To: 'Access Developers discussion and problem solving' Sent: Monday, October 05, 2009 09:26 Subject: Re: [AccessD] Invalid Password A.D.: I understand and that looks like a good solution - I prefer functions that work through the front end with a button click - keeps the user out of the OS. But to change the password on the back end I believe you need to open the BE exclusive. So how can you change the BE password through the front end? Thanks and regards, Rocky Smolin From jwelz at hotmail.com Mon Oct 5 10:48:35 2009 From: jwelz at hotmail.com (Jurgen Welz) Date: Mon, 5 Oct 2009 09:48:35 -0600 Subject: [AccessD] Refer to Forms as variables... In-Reply-To: <6DC4725FDCDD72428D6114F1B6CC6E81C79541@EXUAU020HWT110.oceania.corp.anz.com> References: <5A72AEF4F7C143089AC896C70C6E530D@HAL9005> Message-ID: Both of the following should work: Dim frm as Form Set frm = [Forms]![ITPMO_frmMenu_ResourcesHumans]![ITPMO_frmResources_People_].[Form] frm.Requery or dim strFormName as string dim strSubFormControlName as string strFormName = "ITPMO_frmMenu_ResourcesHumans" strSubFormControlName = "ITPMO_frmResources_People_" Forms(strFormName)(strSubFormControlName).Form.Requery Ciao J?rgen Welz Edmonton, Alberta jwelz at hotmail.com > Date: Mon, 5 Oct 2009 15:10:47 +1100 > From: Darryl.Collins at anz.com > To: accessd at databaseadvisors.com > Subject: [AccessD] Refer to Forms as variables... > > Hi All, > > I know I have done this before, but now I can't seem to get it to work > right now - not much joy on Google. Bah Humbug and Grrrr. Using A2003. > > This works > [Forms]![ITPMO_frmMenu_ResourcesHumans]![ITPMO_frmResources_People_].[Fo > rm].Requery > > But what I want to do is this: > [Forms]![& gstrFormName & ]![ & gstrSubForm & ].[Form].Requery > > Where gstrFormName = "ITPMO_frmMenu_ResourcesHumans" > And gstrSubForm ="ITPMO_frmResources_People_" > > Anyone got any pointers? > > Cheers > Darryl. > > "This e-mail and any attachments to it (the "Communication") is, unless otherwise stated, confidential, may contain copyright material and is for the use only of the intended recipient. If you receive the Communication in error, please notify the sender immediately by return e-mail, delete the Communication and the return e-mail, and do not read, copy, retransmit or otherwise deal with it. Any views expressed in the Communication are those of the individual sender only, unless expressly stated to be those of Australia and New Zealand Banking Group Limited ABN 11 005 357 522, or any of its related entities including ANZ National Bank Limited (together "ANZ"). ANZ does not accept liability in connection with the integrity of or errors in the Communication, computer virus, data corruption, interference or delay arising from or in respect of the Communication." > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com _________________________________________________________________ Click less, chat more: Messenger on MSN.ca http://go.microsoft.com/?linkid=9677404 From rockysmolin at bchacc.com Mon Oct 5 11:53:27 2009 From: rockysmolin at bchacc.com (Rocky Smolin) Date: Mon, 5 Oct 2009 09:53:27 -0700 Subject: [AccessD] Invalid Password In-Reply-To: <009e01ca45b7$1c90bde0$065ea27a@personald6374f> References: <4ac64c24.0508d00a.64c3.34a8@mx.google.com> <4ac658e3.1c07d00a.4df8.0ef3@mx.google.com><4ac66d93.0508d00a.752d.75ba@mx.google.com><002201ca456c$6f04a3c0$fc5ea27a@personald6374f><5A72AEF4F7C143089AC896C70C6E530D@HAL9005> <009e01ca45b7$1c90bde0$065ea27a@personald6374f> Message-ID: <5B4138F9EC0B4D4A9729EECD82760BF1@HAL9005> A.D.: Thank you for the code. I should send an invoice to the client in your favor. Best, Rocky -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of A.D.Tejpal Sent: Monday, October 05, 2009 5:25 AM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Invalid Password Rocky, Subroutine P_ChangeBePwdAndRelink() as given below, will do the needful. Place two text boxes named TxtPwdNew and TxtPwdNewConfirm (with password as the input mask) on a form in the FE. The code in click event of command button on this form would be: ' Code in form's module '========================== Private Sub CmdSetNewPwd_Click() If Len(Me.TxtPwdNew) > 0 And _ Me.TxtPwdNewConfirm = _ Me.TxtPwdNew Then P_ChangeBePwdAndRelink Me.TxtPwdNew Else MsgBox "Discrepancy in entries" End If End Sub '========================== With the above arrangement, the user simply to enters the new password in the text boxes and clicks the command button for automated change of password in BE, accompanied by freshly linked tables in FE. Best wishes, A.D. Tejpal ------------ ' Code in general or form's module '==================================== Sub P_ChangeBePwdAndRelink(NewPwd As String) On Error GoTo ErrTrap ' Changes password of back end db, and ' replaces all existing linked tables by fresh ' ones, with revised connection string as per ' new password. Dim db As DAO.Database Dim dbBE As DAO.Database Dim rst As DAO.Recordset Dim BePath As String, ConnString As String Dim OldPwd As String, Qst As String Dim Cnt As Long, Rtv As Variant Dim Tnm As String Const BePrefix As String = "DATABASE=" Const PwdPrefix As String = "PWD=" Const TempTableName As String = "T_ZZZTemp" Set db = DBEngine(0)(0) ' Delete TempTable (T_ZZZTemp) - if existing. On Error Resume Next DoCmd.DeleteObject acTable, TempTableName On Error GoTo ErrTrap ' Make fresh temp table so as to reflect latest ' status of linked tables. Qst = "SELECT Connect, Database, " & _ " Name INTO " & TempTableName & _ " FROM MSysObjects " & _ " WHERE Type = 6;" db.Execute Qst, dbFailOnError Set rst = db.OpenRecordset(TempTableName) If rst.RecordCount > 0 Then ' Get existing BE path and connect string BePath = rst.Fields("Database") ConnString = rst.Fields("Connect") & BePath ' Extract existing password from conn string Rtv = Split(ConnString, ";") OldPwd = "" For Cnt = 0 To UBound(Rtv) If Rtv(Cnt) Like PwdPrefix & "*" Then OldPwd = Mid(Rtv(Cnt), _ Len(PwdPrefix) + 1) Exit For End If Next If NewPwd <> OldPwd Then ' Change BE password to new one. Set dbBE = OpenDatabase(BePath, True, _ False, ";" & PwdPrefix & OldPwd & ";") dbBE.NewPassword OldPwd, NewPwd ' Modify the connect string as per new password ConnString = Replace(ConnString, _ PwdPrefix & OldPwd, _ PwdPrefix & NewPwd) ' Delete existing linked tables and recreate them ' afresh as per new connect string. Do Until rst.EOF Tnm = rst.Fields("Name") DoCmd.DeleteObject acTable, Tnm DoCmd.TransferDatabase acLink, _ "Microsoft Access", BePath, _ acTable, Tnm, Tnm rst.MoveNext Loop db.TableDefs.Refresh MsgBox "New password as specified, has " & _ "been set for the BE" & vbCrLf & _ "Connect strings for all linked tables " & _ "have also been revised accordingly" Else MsgBox "Newly supplied password is " & _ "same as existing one" End If Else MsgBox "No Linked Tables Found" End If ' Note: ' If the back end db is password protected, ' assignment of a new connect string by using a ' statement like tdf.Connect = ConnString becomes ' ineffective The existing connect string continues ' to hold good). Also, statement like tdf.RefreshLink ' gives error. ExitPoint: rst.Close Set rst = Nothing Set dbBE = Nothing Set db = Nothing On Error GoTo 0 Exit Sub ErrTrap: MsgBox Err.Number & " - " & Err.DESCRIPTION Resume ExitPoint End Sub '===================================== ----- Original Message ----- From: Rocky Smolin To: 'Access Developers discussion and problem solving' Sent: Monday, October 05, 2009 09:26 Subject: Re: [AccessD] Invalid Password A.D.: I understand and that looks like a good solution - I prefer functions that work through the front end with a button click - keeps the user out of the OS. But to change the password on the back end I believe you need to open the BE exclusive. So how can you change the BE password through the front end? Thanks and regards, Rocky Smolin -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From dkalsow at yahoo.com Mon Oct 5 12:07:52 2009 From: dkalsow at yahoo.com (Dale Kalsow) Date: Mon, 5 Oct 2009 10:07:52 -0700 (PDT) Subject: [AccessD] Select a node in a treeview In-Reply-To: <5B4138F9EC0B4D4A9729EECD82760BF1@HAL9005> Message-ID: <882519.60718.qm@web50401.mail.re2.yahoo.com> Good Afternoon, ? Can anyone tell me how to select a node in a treeview?? I want to select it based on a the value of the current record (not that it probably matters) :) ? thanks! ? Dale From Darryl.Collins at anz.com Mon Oct 5 17:50:11 2009 From: Darryl.Collins at anz.com (Collins, Darryl) Date: Tue, 6 Oct 2009 09:50:11 +1100 Subject: [AccessD] Refer to Forms as variables... In-Reply-To: <00ae01ca458d$26b7b780$74272680$@spb.ru> Message-ID: <6DC4725FDCDD72428D6114F1B6CC6E81C79546@EXUAU020HWT110.oceania.corp.anz.com> Thanks heaps Shamil and Stuart. I am sure there is a completely logical reason for the change in syntax. Coming from an Excel VBA background where you can pretty much stick a variable in anywhere in the code where a fixed value works, it seems odd to use Such different syntax, but hey... It works :) Cheers Darryl. -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Shamil Salakhetdinov Sent: Monday, 5 October 2009 6:26 PM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Refer to Forms as variables... Hi Darryl, Forms(gstrFormName).Controls(gstrSubForm).Form.Requery should make "the trick" or just Forms(gstrFormName)(gstrSubForm).Form.Requery --Shamil -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Collins, Darryl Sent: Monday, October 05, 2009 8:11 AM To: Access Developers discussion and problem solving Subject: [AccessD] Refer to Forms as variables... Hi All, I know I have done this before, but now I can't seem to get it to work right now - not much joy on Google. Bah Humbug and Grrrr. Using A2003. This works [Forms]![ITPMO_frmMenu_ResourcesHumans]![ITPMO_frmResources_People_].[Fo rm].Requery But what I want to do is this: [Forms]![& gstrFormName & ]![ & gstrSubForm & ].[Form].Requery Where gstrFormName = "ITPMO_frmMenu_ResourcesHumans" And gstrSubForm ="ITPMO_frmResources_People_" Anyone got any pointers? Cheers Darryl. __________ Information from ESET NOD32 Antivirus, version of virus signature database 4479 (20091004) __________ The message was checked by ESET NOD32 Antivirus. http://www.esetnod32.ru -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com "This e-mail and any attachments to it (the "Communication") is, unless otherwise stated, confidential, may contain copyright material and is for the use only of the intended recipient. If you receive the Communication in error, please notify the sender immediately by return e-mail, delete the Communication and the return e-mail, and do not read, copy, retransmit or otherwise deal with it. Any views expressed in the Communication are those of the individual sender only, unless expressly stated to be those of Australia and New Zealand Banking Group Limited ABN 11 005 357 522, or any of its related entities including ANZ National Bank Limited (together "ANZ"). ANZ does not accept liability in connection with the integrity of or errors in the Communication, computer virus, data corruption, interference or delay arising from or in respect of the Communication." From jwcolby at colbyconsulting.com Tue Oct 6 07:37:19 2009 From: jwcolby at colbyconsulting.com (jwcolby) Date: Tue, 06 Oct 2009 08:37:19 -0400 Subject: [AccessD] Top 25 most dangerous programming errors Message-ID: <4ACB39FF.5030302@colbyconsulting.com> I just stumbled across this today. I'll be reading through them to see what i can learn. http://cwe.mitre.org/top25/ -- John W. Colby www.ColbyConsulting.com From DWUTKA at Marlow.com Tue Oct 6 10:00:27 2009 From: DWUTKA at Marlow.com (Drew Wutka) Date: Tue, 6 Oct 2009 10:00:27 -0500 Subject: [AccessD] Invalid Password In-Reply-To: References: Message-ID: Sorry for the delay in replying Rocky, but the problem is you are using a database password. That information is being stored in the link information (in the table defs), not in the database itself. So if you change the password on the backend, you will have to delete the links, recreate them with a new password, and probably close and reopen the front end. That last part (closing and reopening the front end), is probably due to Access's habit of caching credentials. An example of this, is we use Oracle for our Production database. We have a few Access .mdb's that are used as reporting engines, that have linked tables to the Oracle database. If you open ONE table, and put in the correct credentials, you will not be prompted for any more tables while the Access database is open. Access is caching the credentials. (Or maintaining a link to the Oracle database). Probably something very similar is happening with your situation. A possibly better solution would be to use Access User Level security (which will not be an option if you are using the 2007 native format). If your goal is to prevent unauthorized access to the backend, there are a few ways to do this: Option 1: Implement ULS (User Level Security) on the back end. By default, the login name is Admin (with a blank password). IF YOU ARE NOT CONCERNED about accessing tables in the backend through a linked table, then simply create a new 'admin' user (with a different name) and a password. Leave the Admin account permissions the same, however, have some startup code that just closes the database when it is opened (If the current user is Admin). Disable the Bypass startup key. By doing this, anyone that tries to just open the back end will be dumped out immediately. However, access to the tables linked in the FE will not be affected (only users directly opening the back end). Then to open the backend for an admin user, provide them a shortcut, that uses your 'new' .mdw file, to open the backend as a different user. Now they can change the password on that user (which is really changing it in the .mdw) as much as they want, and the front end doesn't get affected at all. Option 2: Implement ULS on both the front end and the back end database. This would provide a higher level of security, but would be more involved. You could still prevent a non-admin user from directly opening the backend too. You can also protect various tables from editing, or even viewing to non-admin users. Drew -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Rocky Smolin Sent: Friday, October 02, 2009 9:41 AM To: 'Access Developers discussion and problem solving' Subject: [AccessD] Invalid Password Dear List: I have an app FE/BE with the BE password protected. I prompt for the password when the front end opens. Been running fine. Now the client asks to change the password every month or so, so I show him how to open the back end exclusive, unset the password, reset the password. That works. But when I open the front end, give the password, now trying to open one of the linked tables gives 'Invalid password' message. None of the queries which reference a linked table work - 'invalid password'. If I manually delete the links and manually relink it almost works. If, after the manual relink, I close and reopen, it works. What am I missing here? MTIA, Rocky 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 DWUTKA at Marlow.com Tue Oct 6 10:06:38 2009 From: DWUTKA at Marlow.com (Drew Wutka) Date: Tue, 6 Oct 2009 10:06:38 -0500 Subject: [AccessD] Access 2002 SQL problem In-Reply-To: References: Message-ID: It's probably the dates. When building, and using a SQL statement in code, 'formatting' the date is not necessary. So instead of 'WHERE SomeDateField=#" & Format(SomeDate,"somedateformat") & "# ..... more sql Use: 'WHERE SomeDateField=#" & SomeDate & "# .... more SQL This way, Access will use the actual date (as long as SomeDate is an actual Date variable type), and you don't have to worry about the various regional date formats. By using the Format statement, you are forcing the date data type into a string format, that then Access has to reverse (using the regional date format). Now, if your date is a string, just use DateSerial in your SQL string (like #" & DateSerial("2000","1","30") & "#) and again you're letting Access do the work for you. Drew -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Johncliviger at aol.com Sent: Saturday, October 03, 2009 5:14 AM To: AccessD at databaseadvisors.com Subject: [AccessD] Access 2002 SQL problem Hi all I have the following SQL code snippet and it produces the incorrect number of records when its run by Docmd.RunSQL strSQL, but the correct number when run thru Access query. No errors as raised. I've been looking at this problem for several days on/off now so can anyone offer a word of wisdom? TIA john cliviger Public Sub LetterHistory(R As String, SD As Date, ED As Date) ' R = report name, SD = Start Date, ED = End Date Dim strSQL As String On Error GoTo Flag1 strSQL = "INSERT INTO tbl_Letter_Specs ( Refnoc, DateLetterSent, LetterName ) " & _ "SELECT tbl_PatientDetails.REFNOC, Date() AS DateLetterSent, '" & R & "' AS LetterName " & _ "FROM tbl_PatientDetails INNER JOIN tbl_PatientSpecs ON tbl_PatientDetails.REFNOC = tbl_PatientSpecs.REFNOC " & _ "WHERE ((tbl_PatientSpecs.RP_DATE Between #" & Format(SD, "dd/mm/yyyy") & "# And #" & _ Format(ED, "dd/mm/yyyy") & "#)AND ((tbl_PatientDetails.RecallFlag) = 0));" -- 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 Tue Oct 6 10:22:48 2009 From: rockysmolin at bchacc.com (Rocky Smolin) Date: Tue, 6 Oct 2009 08:22:48 -0700 Subject: [AccessD] Invalid Password In-Reply-To: References: Message-ID: Drew: Thanks for the reply. Did you see A.D.'s solution. I think that will work. They're using 2003 and actually the primary machine is still on A2K which causes reference problems. He's on the IT list for an upgrade. Has been for about 2 years. R -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Drew Wutka Sent: Tuesday, October 06, 2009 8:00 AM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Invalid Password Sorry for the delay in replying Rocky, but the problem is you are using a database password. That information is being stored in the link information (in the table defs), not in the database itself. So if you change the password on the backend, you will have to delete the links, recreate them with a new password, and probably close and reopen the front end. That last part (closing and reopening the front end), is probably due to Access's habit of caching credentials. An example of this, is we use Oracle for our Production database. We have a few Access .mdb's that are used as reporting engines, that have linked tables to the Oracle database. If you open ONE table, and put in the correct credentials, you will not be prompted for any more tables while the Access database is open. Access is caching the credentials. (Or maintaining a link to the Oracle database). Probably something very similar is happening with your situation. A possibly better solution would be to use Access User Level security (which will not be an option if you are using the 2007 native format). If your goal is to prevent unauthorized access to the backend, there are a few ways to do this: Option 1: Implement ULS (User Level Security) on the back end. By default, the login name is Admin (with a blank password). IF YOU ARE NOT CONCERNED about accessing tables in the backend through a linked table, then simply create a new 'admin' user (with a different name) and a password. Leave the Admin account permissions the same, however, have some startup code that just closes the database when it is opened (If the current user is Admin). Disable the Bypass startup key. By doing this, anyone that tries to just open the back end will be dumped out immediately. However, access to the tables linked in the FE will not be affected (only users directly opening the back end). Then to open the backend for an admin user, provide them a shortcut, that uses your 'new' .mdw file, to open the backend as a different user. Now they can change the password on that user (which is really changing it in the .mdw) as much as they want, and the front end doesn't get affected at all. Option 2: Implement ULS on both the front end and the back end database. This would provide a higher level of security, but would be more involved. You could still prevent a non-admin user from directly opening the backend too. You can also protect various tables from editing, or even viewing to non-admin users. Drew -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Rocky Smolin Sent: Friday, October 02, 2009 9:41 AM To: 'Access Developers discussion and problem solving' Subject: [AccessD] Invalid Password Dear List: I have an app FE/BE with the BE password protected. I prompt for the password when the front end opens. Been running fine. Now the client asks to change the password every month or so, so I show him how to open the back end exclusive, unset the password, reset the password. That works. But when I open the front end, give the password, now trying to open one of the linked tables gives 'Invalid password' message. None of the queries which reference a linked table work - 'invalid password'. If I manually delete the links and manually relink it almost works. If, after the manual relink, I close and reopen, it works. What am I missing here? MTIA, Rocky 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 iggy at nanaimo.ark.com Tue Oct 6 10:28:01 2009 From: iggy at nanaimo.ark.com (Tony Septav) Date: Tue, 06 Oct 2009 08:28:01 -0700 Subject: [AccessD] Postion a Pop-up form Message-ID: <4ACB6201.3060502@nanaimo.ark.com> Hey All Does anyone have some code to position a pop-up in the same location above the main form, independent of the screen resolution. I had some some code I found years ago, but it is lost in the bowels of one of my computers. Thanks From DWUTKA at Marlow.com Tue Oct 6 10:36:21 2009 From: DWUTKA at Marlow.com (Drew Wutka) Date: Tue, 6 Oct 2009 10:36:21 -0500 Subject: [AccessD] brain fart In-Reply-To: <2CAE0E05B7884831891CE8C5055FD81D@HAL9005> References: <2CAE0E05B7884831891CE8C5055FD81D@HAL9005> Message-ID: I posted a solution a while back in Access 97. It'll work in Access 2000 and later, with one quirk. The solution William posts, requires a constant checking of the object with focus. That's all well and good, but what if someone is reading through a report....no focus would change. Or what if someone was entering a lot of data in one field? My solution hooks into the mouse and keyboard events of the OS, for the Access thread itself. So when something is done (mouse moves, keyboard typed), the 'last activity' date variable is reset. Callbacks are very low over head, so this shouldn't be any more or less of an overhead hit then a control timer. Here's how to do this: Create a module (modMouseAndKeyboardCallbacks) Paste the following code in there: Option Compare Database Option Explicit Public gblCurrentKBHookID As Long Public gblCurrentMouseHookID As Long Public gblLastActivityTime As Date Private Declare Function CallNextHookEx Lib "user32" (ByVal hHook As Long, ByVal ncode As Long, ByVal wParam As Long, lParam As Any) As Long Private Type POINTAPI x As Long y As Long End Type Private Type MOUSEHOOKSTRUCT pt As POINTAPI hwnd As Long wHitTestCode As Long dwExtraInfo As Long End Type Function MouseCallbackProc(ByVal intCode As Integer, ByVal wParam As Long, lParam As MOUSEHOOKSTRUCT) As Long MouseCallbackProc = CallNextHookEx(gblCurrentMouseHookID, intCode, wParam, lParam) gblLastActivityTime = Now End Function Function KeyboardCallbackProc(ByVal intCode As Integer, ByVal wParam As Long, lParam As Long) As Long KeyboardCallbackProc = CallNextHookEx(gblCurrentKBHookID, intCode, wParam, lParam) gblLastActivityTime = Now End Function Now you have your callback procedures. To use this, here's what is on my sample form (which uses a timer (firing every second, but you could change that to much higher for timeouts over a minute)) and a label (lblInactivity): Option Compare Database Option Explicit Private Const WH_KEYBOARD = 2 Private Const WH_MOUSE = 7 Private Declare Function UnhookWindowsHookEx Lib "user32" (ByVal hHook As Long) As Long Private Declare Function SetWindowsHookEx Lib "user32" Alias "SetWindowsHookExA" (ByVal idHook As Long, ByVal lpfn As Long, ByVal hmod As Long, ByVal dwThreadId As Long) As Long Private Declare Function GetCurrentThreadId Lib "kernel32" () As Long Private Sub Form_Load() gblCurrentMouseHookID = SetWindowsHookEx(WH_MOUSE, AddressOf MouseCallbackProc, 0, GetCurrentThreadId) gblCurrentKBHookID = SetWindowsHookEx(WH_KEYBOARD, AddressOf KeyboardCallbackProc, 0, GetCurrentThreadId) End Sub Private Sub Form_Timer() Me.lblInactivity.Caption = "Inactivity Timer: " & Format(Now - gblLastActivityTime, "HH:MM:SS") End Sub Private Sub Form_Unload(Cancel As Integer) UnhookWindowsHookEx gblCurrentMouseHookID UnhookWindowsHookEx gblCurrentKBHookID End Sub The form load events launch the 'hooks'. The unload events release the hooks. And the form's timer event simply displays the current time (gblLastActivityTime) variation from 'Now()'. So if you just sit and watch it, it will count up the seconds (and minutes). Move your mouse, or use your keyboard, and the timer resets to 0's. Just replace the timer event with the specified amount of time you want to allow for inactivity (with a docmd.Quit). Have this form launched (and hidden) when your database opens, and whalla, you're done. Now for the quirk. Callbacks require the 'AddressOf' command. In Access 97, there was no native command for this. Someone had come up with a module that performed the AddressOf function (I think it was Ken Getz...), so you could use callbacks in Access 97 with the help of this module. With the advent of Access 2000, however, it began using VBA 6 (subset of VB 6), which did have a native AddressOf function (this function returns a pointer to a public function, which an Operating System process could then use to 'call' a function in one of your programs (such as alerting your program to when a mouse or keyboard event occurred). The quirk is, that since VBA is an interpreted language, IF you have opened the VBE, and the callback is running, Access will lock up. So as long as you don't try to view, or edit code, it will work fine. (Since users shouldn't be doing this, callbacks can be used in a production database, they just need to be disabled when developing the database, to prevent them from locking up Access). So I would just put something in, that allows you to prevent that Inactivity 'form' from opening when you need to go in and look at code. As long as you do that, the 'bug' won't affect you, and your end users get the benefits of callback functions! Drew -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Rocky Smolin Sent: Saturday, October 03, 2009 10:08 AM To: 'Access Developers discussion and problem solving' Subject: [AccessD] brain fart Dear List: I need to terminate an mdb if there has been no activity for a specified number of minutes. I remember there was a thread about this recently but can't remember the subject so I can search the archives. Does anyone remember that? MTIA Rocky 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 DWUTKA at Marlow.com Tue Oct 6 10:56:54 2009 From: DWUTKA at Marlow.com (Drew Wutka) Date: Tue, 6 Oct 2009 10:56:54 -0500 Subject: [AccessD] Invalid Password In-Reply-To: References: Message-ID: Just saw it. Looks like a good solution. Just as an FYI, if multiple people go into this Front end, when the password changes, it will lock the users out when one person goes in. (I'm about 90% certain, because this process will probably require exclusive access to the front end....) Drew -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Rocky Smolin Sent: Tuesday, October 06, 2009 10:23 AM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Invalid Password Drew: Thanks for the reply. Did you see A.D.'s solution. I think that will work. They're using 2003 and actually the primary machine is still on A2K which causes reference problems. He's on the IT list for an upgrade. Has been for about 2 years. R -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Drew Wutka Sent: Tuesday, October 06, 2009 8:00 AM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Invalid Password Sorry for the delay in replying Rocky, but the problem is you are using a database password. That information is being stored in the link information (in the table defs), not in the database itself. So if you change the password on the backend, you will have to delete the links, recreate them with a new password, and probably close and reopen the front end. That last part (closing and reopening the front end), is probably due to Access's habit of caching credentials. An example of this, is we use Oracle for our Production database. We have a few Access .mdb's that are used as reporting engines, that have linked tables to the Oracle database. If you open ONE table, and put in the correct credentials, you will not be prompted for any more tables while the Access database is open. Access is caching the credentials. (Or maintaining a link to the Oracle database). Probably something very similar is happening with your situation. A possibly better solution would be to use Access User Level security (which will not be an option if you are using the 2007 native format). If your goal is to prevent unauthorized access to the backend, there are a few ways to do this: Option 1: Implement ULS (User Level Security) on the back end. By default, the login name is Admin (with a blank password). IF YOU ARE NOT CONCERNED about accessing tables in the backend through a linked table, then simply create a new 'admin' user (with a different name) and a password. Leave the Admin account permissions the same, however, have some startup code that just closes the database when it is opened (If the current user is Admin). Disable the Bypass startup key. By doing this, anyone that tries to just open the back end will be dumped out immediately. However, access to the tables linked in the FE will not be affected (only users directly opening the back end). Then to open the backend for an admin user, provide them a shortcut, that uses your 'new' .mdw file, to open the backend as a different user. Now they can change the password on that user (which is really changing it in the .mdw) as much as they want, and the front end doesn't get affected at all. Option 2: Implement ULS on both the front end and the back end database. This would provide a higher level of security, but would be more involved. You could still prevent a non-admin user from directly opening the backend too. You can also protect various tables from editing, or even viewing to non-admin users. Drew -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Rocky Smolin Sent: Friday, October 02, 2009 9:41 AM To: 'Access Developers discussion and problem solving' Subject: [AccessD] Invalid Password Dear List: I have an app FE/BE with the BE password protected. I prompt for the password when the front end opens. Been running fine. Now the client asks to change the password every month or so, so I show him how to open the back end exclusive, unset the password, reset the password. That works. But when I open the front end, give the password, now trying to open one of the linked tables gives 'Invalid password' message. None of the queries which reference a linked table work - 'invalid password'. If I manually delete the links and manually relink it almost works. If, after the manual relink, I close and reopen, it works. What am I missing here? MTIA, Rocky 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 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 DWUTKA at Marlow.com Tue Oct 6 11:03:03 2009 From: DWUTKA at Marlow.com (Drew Wutka) Date: Tue, 6 Oct 2009 11:03:03 -0500 Subject: [AccessD] Select a node in a treeview In-Reply-To: <882519.60718.qm@web50401.mail.re2.yahoo.com> References: <5B4138F9EC0B4D4A9729EECD82760BF1@HAL9005> <882519.60718.qm@web50401.mail.re2.yahoo.com> Message-ID: This would be something you need to do based on the Key values. So let's say you have a simple treeview based on one table that has an 'ID' field. When you create the node, set the key to "ID:" & rs.fields("IDField").value Then to retrieve the node: tvwData.Nodes("ID:" & rs.fields("IDField").value) for more complex treeviews, with multiple sources, it's just a matter of extending the process. For example, I have a 'request' treeview, which will show user requests (tblRequests), along with Interim Reports, Final Reports, 'Punts', Purchase Requests, etc. All from different tables. Each of those other tables have a unique key, BUT, the keys COULD be the same from a request and an interim report(or any other sub 'object'). So, my requestNodes would be: "ID:1", "ID:2006", etc. My Interim Report nodes would be: "ID:1:INTRM:12" (so this key tells me it's request 1, with Interim 12). This way, when I ask for "ID:1", I get the request node. If I ask for "ID:1:INTRM:12" I get the interim node, and I never have a clash of IDs. I can also tell what the node represents from the key this way too. Drew -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Dale Kalsow Sent: Monday, October 05, 2009 12:08 PM To: Access Developers discussion and problem solving Subject: [AccessD] Select a node in a treeview Good Afternoon, ? Can anyone tell me how to select a node in a treeview?? I want to select it based on a the value of the current record (not that it probably matters) :) ? thanks! ? Dale -- 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 Tue Oct 6 11:54:52 2009 From: rockysmolin at bchacc.com (Rocky Smolin) Date: Tue, 6 Oct 2009 09:54:52 -0700 Subject: [AccessD] Invalid Password In-Reply-To: References: Message-ID: <3D6AC076D3C94876A3D4420CAAD929C8@HAL9005> Well, there's a potential procedural problem. Each user has their own copy of the FE. So the head guy should change the password and then, after relinking HIS FE, distribute that FE to the other users. I think. R -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Drew Wutka Sent: Tuesday, October 06, 2009 8:57 AM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Invalid Password Just saw it. Looks like a good solution. Just as an FYI, if multiple people go into this Front end, when the password changes, it will lock the users out when one person goes in. (I'm about 90% certain, because this process will probably require exclusive access to the front end....) Drew -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Rocky Smolin Sent: Tuesday, October 06, 2009 10:23 AM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Invalid Password Drew: Thanks for the reply. Did you see A.D.'s solution. I think that will work. They're using 2003 and actually the primary machine is still on A2K which causes reference problems. He's on the IT list for an upgrade. Has been for about 2 years. R -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Drew Wutka Sent: Tuesday, October 06, 2009 8:00 AM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Invalid Password Sorry for the delay in replying Rocky, but the problem is you are using a database password. That information is being stored in the link information (in the table defs), not in the database itself. So if you change the password on the backend, you will have to delete the links, recreate them with a new password, and probably close and reopen the front end. That last part (closing and reopening the front end), is probably due to Access's habit of caching credentials. An example of this, is we use Oracle for our Production database. We have a few Access .mdb's that are used as reporting engines, that have linked tables to the Oracle database. If you open ONE table, and put in the correct credentials, you will not be prompted for any more tables while the Access database is open. Access is caching the credentials. (Or maintaining a link to the Oracle database). Probably something very similar is happening with your situation. A possibly better solution would be to use Access User Level security (which will not be an option if you are using the 2007 native format). If your goal is to prevent unauthorized access to the backend, there are a few ways to do this: Option 1: Implement ULS (User Level Security) on the back end. By default, the login name is Admin (with a blank password). IF YOU ARE NOT CONCERNED about accessing tables in the backend through a linked table, then simply create a new 'admin' user (with a different name) and a password. Leave the Admin account permissions the same, however, have some startup code that just closes the database when it is opened (If the current user is Admin). Disable the Bypass startup key. By doing this, anyone that tries to just open the back end will be dumped out immediately. However, access to the tables linked in the FE will not be affected (only users directly opening the back end). Then to open the backend for an admin user, provide them a shortcut, that uses your 'new' .mdw file, to open the backend as a different user. Now they can change the password on that user (which is really changing it in the .mdw) as much as they want, and the front end doesn't get affected at all. Option 2: Implement ULS on both the front end and the back end database. This would provide a higher level of security, but would be more involved. You could still prevent a non-admin user from directly opening the backend too. You can also protect various tables from editing, or even viewing to non-admin users. Drew -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Rocky Smolin Sent: Friday, October 02, 2009 9:41 AM To: 'Access Developers discussion and problem solving' Subject: [AccessD] Invalid Password Dear List: I have an app FE/BE with the BE password protected. I prompt for the password when the front end opens. Been running fine. Now the client asks to change the password every month or so, so I show him how to open the back end exclusive, unset the password, reset the password. That works. But when I open the front end, give the password, now trying to open one of the linked tables gives 'Invalid password' message. None of the queries which reference a linked table work - 'invalid password'. If I manually delete the links and manually relink it almost works. If, after the manual relink, I close and reopen, it works. What am I missing here? MTIA, Rocky 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 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 dkalsow at yahoo.com Tue Oct 6 12:04:03 2009 From: dkalsow at yahoo.com (Dale Kalsow) Date: Tue, 6 Oct 2009 10:04:03 -0700 (PDT) Subject: [AccessD] Access 2007 Reports In-Reply-To: Message-ID: <948028.35822.qm@web50405.mail.re2.yahoo.com> I was wondering if anyone had any words of wisdom for me. ? I have an Access 2007 report with two sorts and then one Group Break.? Currently the groupbreak is not working - it is breaking on everything even though the data is correct (I have verifed it by printing it).? ? If I take out the second sort the groupbreaking works fine but as soon as I add it back in the report runs incorrect again. ? Does any one know what to look for?? When I exclude the second sort that data is on not sorted correctly so the only other option that I see would be bring the two sorts together into one field in the report query. ? thanks! ? Dale From DWUTKA at Marlow.com Tue Oct 6 12:04:06 2009 From: DWUTKA at Marlow.com (Drew Wutka) Date: Tue, 6 Oct 2009 12:04:06 -0500 Subject: [AccessD] Invalid Password In-Reply-To: <3D6AC076D3C94876A3D4420CAAD929C8@HAL9005> References: <3D6AC076D3C94876A3D4420CAAD929C8@HAL9005> Message-ID: There's that. My solution wouldn't bring up this issue, but then again, my solution would require more development time on your end. Drew -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Rocky Smolin Sent: Tuesday, October 06, 2009 11:55 AM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Invalid Password Well, there's a potential procedural problem. Each user has their own copy of the FE. So the head guy should change the password and then, after relinking HIS FE, distribute that FE to the other users. I think. R -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Drew Wutka Sent: Tuesday, October 06, 2009 8:57 AM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Invalid Password Just saw it. Looks like a good solution. Just as an FYI, if multiple people go into this Front end, when the password changes, it will lock the users out when one person goes in. (I'm about 90% certain, because this process will probably require exclusive access to the front end....) Drew -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Rocky Smolin Sent: Tuesday, October 06, 2009 10:23 AM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Invalid Password Drew: Thanks for the reply. Did you see A.D.'s solution. I think that will work. They're using 2003 and actually the primary machine is still on A2K which causes reference problems. He's on the IT list for an upgrade. Has been for about 2 years. R -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Drew Wutka Sent: Tuesday, October 06, 2009 8:00 AM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Invalid Password Sorry for the delay in replying Rocky, but the problem is you are using a database password. That information is being stored in the link information (in the table defs), not in the database itself. So if you change the password on the backend, you will have to delete the links, recreate them with a new password, and probably close and reopen the front end. That last part (closing and reopening the front end), is probably due to Access's habit of caching credentials. An example of this, is we use Oracle for our Production database. We have a few Access .mdb's that are used as reporting engines, that have linked tables to the Oracle database. If you open ONE table, and put in the correct credentials, you will not be prompted for any more tables while the Access database is open. Access is caching the credentials. (Or maintaining a link to the Oracle database). Probably something very similar is happening with your situation. A possibly better solution would be to use Access User Level security (which will not be an option if you are using the 2007 native format). If your goal is to prevent unauthorized access to the backend, there are a few ways to do this: Option 1: Implement ULS (User Level Security) on the back end. By default, the login name is Admin (with a blank password). IF YOU ARE NOT CONCERNED about accessing tables in the backend through a linked table, then simply create a new 'admin' user (with a different name) and a password. Leave the Admin account permissions the same, however, have some startup code that just closes the database when it is opened (If the current user is Admin). Disable the Bypass startup key. By doing this, anyone that tries to just open the back end will be dumped out immediately. However, access to the tables linked in the FE will not be affected (only users directly opening the back end). Then to open the backend for an admin user, provide them a shortcut, that uses your 'new' .mdw file, to open the backend as a different user. Now they can change the password on that user (which is really changing it in the .mdw) as much as they want, and the front end doesn't get affected at all. Option 2: Implement ULS on both the front end and the back end database. This would provide a higher level of security, but would be more involved. You could still prevent a non-admin user from directly opening the backend too. You can also protect various tables from editing, or even viewing to non-admin users. Drew -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Rocky Smolin Sent: Friday, October 02, 2009 9:41 AM To: 'Access Developers discussion and problem solving' Subject: [AccessD] Invalid Password Dear List: I have an app FE/BE with the BE password protected. I prompt for the password when the front end opens. Been running fine. Now the client asks to change the password every month or so, so I show him how to open the back end exclusive, unset the password, reset the password. That works. But when I open the front end, give the password, now trying to open one of the linked tables gives 'Invalid password' message. None of the queries which reference a linked table work - 'invalid password'. If I manually delete the links and manually relink it almost works. If, after the manual relink, I close and reopen, it works. What am I missing here? MTIA, Rocky 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 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 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 max.wanadoo at gmail.com Tue Oct 6 12:17:27 2009 From: max.wanadoo at gmail.com (Max Wanadoo) Date: Tue, 6 Oct 2009 18:17:27 +0100 Subject: [AccessD] Invalid Password In-Reply-To: <3D6AC076D3C94876A3D4420CAAD929C8@HAL9005> References: <3D6AC076D3C94876A3D4420CAAD929C8@HAL9005> Message-ID: <4acb7bbd.0a1ad00a.4da1.0aab@mx.google.com> All I do Rocky, is update a FE copy and place it on the Server. Links replaced, refreshed, whatever. New code, new this, new that. Each time the users boots up the batch file goes and gets a copy from the server and places it into their own PC area. There is also a shortcut icon on their desktop so that they can bring over the latest version whenever they want. Worked for years now. 2/3 times a day you hear me shouting "Latest version on the sever if anybody is waiting for a fix" - those interested come out of the FE and click on the "go fetch" icon and then click on the normal icon to enter the FE. Nobody every has to link anything. It is all done for them in the latest FE. Max -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Rocky Smolin Sent: 06 October 2009 17:55 To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Invalid Password Well, there's a potential procedural problem. Each user has their own copy of the FE. So the head guy should change the password and then, after relinking HIS FE, distribute that FE to the other users. I think. R -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Drew Wutka Sent: Tuesday, October 06, 2009 8:57 AM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Invalid Password Just saw it. Looks like a good solution. Just as an FYI, if multiple people go into this Front end, when the password changes, it will lock the users out when one person goes in. (I'm about 90% certain, because this process will probably require exclusive access to the front end....) Drew -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Rocky Smolin Sent: Tuesday, October 06, 2009 10:23 AM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Invalid Password Drew: Thanks for the reply. Did you see A.D.'s solution. I think that will work. They're using 2003 and actually the primary machine is still on A2K which causes reference problems. He's on the IT list for an upgrade. Has been for about 2 years. R -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Drew Wutka Sent: Tuesday, October 06, 2009 8:00 AM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Invalid Password Sorry for the delay in replying Rocky, but the problem is you are using a database password. That information is being stored in the link information (in the table defs), not in the database itself. So if you change the password on the backend, you will have to delete the links, recreate them with a new password, and probably close and reopen the front end. That last part (closing and reopening the front end), is probably due to Access's habit of caching credentials. An example of this, is we use Oracle for our Production database. We have a few Access .mdb's that are used as reporting engines, that have linked tables to the Oracle database. If you open ONE table, and put in the correct credentials, you will not be prompted for any more tables while the Access database is open. Access is caching the credentials. (Or maintaining a link to the Oracle database). Probably something very similar is happening with your situation. A possibly better solution would be to use Access User Level security (which will not be an option if you are using the 2007 native format). If your goal is to prevent unauthorized access to the backend, there are a few ways to do this: Option 1: Implement ULS (User Level Security) on the back end. By default, the login name is Admin (with a blank password). IF YOU ARE NOT CONCERNED about accessing tables in the backend through a linked table, then simply create a new 'admin' user (with a different name) and a password. Leave the Admin account permissions the same, however, have some startup code that just closes the database when it is opened (If the current user is Admin). Disable the Bypass startup key. By doing this, anyone that tries to just open the back end will be dumped out immediately. However, access to the tables linked in the FE will not be affected (only users directly opening the back end). Then to open the backend for an admin user, provide them a shortcut, that uses your 'new' .mdw file, to open the backend as a different user. Now they can change the password on that user (which is really changing it in the .mdw) as much as they want, and the front end doesn't get affected at all. Option 2: Implement ULS on both the front end and the back end database. This would provide a higher level of security, but would be more involved. You could still prevent a non-admin user from directly opening the backend too. You can also protect various tables from editing, or even viewing to non-admin users. Drew -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Rocky Smolin Sent: Friday, October 02, 2009 9:41 AM To: 'Access Developers discussion and problem solving' Subject: [AccessD] Invalid Password Dear List: I have an app FE/BE with the BE password protected. I prompt for the password when the front end opens. Been running fine. Now the client asks to change the password every month or so, so I show him how to open the back end exclusive, unset the password, reset the password. That works. But when I open the front end, give the password, now trying to open one of the linked tables gives 'Invalid password' message. None of the queries which reference a linked table work - 'invalid password'. If I manually delete the links and manually relink it almost works. If, after the manual relink, I close and reopen, it works. What am I missing here? MTIA, Rocky 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 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 adtp at airtelmail.in Tue Oct 6 14:08:09 2009 From: adtp at airtelmail.in (A.D.Tejpal) Date: Wed, 7 Oct 2009 00:38:09 +0530 Subject: [AccessD] Invalid Password References: <3D6AC076D3C94876A3D4420CAAD929C8@HAL9005> Message-ID: <003601ca46b8$86614990$ed5fa27a@personald6374f> Rocky, That too can be handled as part of the same automated process. Let the form for changing BE password be available only in the master FE handled by an authorized person. This FE can have a table T_FePaths holding the full paths of all other front ends in its field named FePath. Additional subroutine named P_ExportLinkedTablesToAllFrontEnds() in VBA module of master FE as given below, would export the freshly linked tables to all other front ends. Revised code in click event of the command button would be as follows: ' Code in form's module '========================== Private Sub CmdSetNewPwd_Click() If Len(Me.TxtPwdNew) > 0 And _ Me.TxtPwdNewConfirm = _ Me.TxtPwdNew Then P_ChangeBePwdAndRelink Me.TxtPwdNew P_ExportLinkedTablesToAllFrontEnds Else MsgBox "Discrepancy in entries" End If End Sub '========================== Note: (a) Using True as second argument in OpenDatabase method in subroutine named P_ChangeBePwdAndRelink() as given in my earlier post ensures that the back end db is handled in exclusive mode while changing the password. (b) TransferDatabase method has the advantage that while implementing export action, if an object with the given name already exists in the target db, it gets replaced by the exported one silently, without any warning message. (c) Moreover, TransferDatabase action is remarkably faster than the combination of actions represented by OpenDatabase > DeleteTable > CopyTable methods. Best wishes, A.D. Tejpal ------------ ' Code in general or form's module '============================== Sub P_ExportLinkedTablesToAllFrontEnds() On Error GoTo ErrTrap Dim db As DAO.Database Dim rst1 As DAO.Recordset Dim rst2 As DAO.Recordset Dim Qst As String, Tnm As String Set db = DBEngine(0)(0) ' Paths of all front ends other than the master FE ' (Table T_FePaths has paths of all FE's in field FePath) Qst = "SELECT FePath FROM T_FePaths;" Set rst1 = db.OpenRecordset(Qst) ' Names of all linked tables in master FE Qst = "SELECT Name FROM MSysObjects " & _ " WHERE Type = 6;" Set rst2 = db.OpenRecordset(Qst) ' Copy all linked tables from master FE to ' all other FE's Do Until rst1.EOF rst2.MoveFirst Do Until rst2.EOF ' Copy linked table from master FE ' to other FE Tnm = rst2.Fields(0) DoCmd.TransferDatabase acExport, _ "Microsoft Access", rst1.Fields(0), _ acTable, Tnm, Tnm rst2.MoveNext Loop rst1.MoveNext Loop ' Note: ' TransferDatabase method has the advantage ' that while implementing export action, if an ' object with given name, already exists in the ' target db, it gets replaced by the exported one, ' without any warning message. ' Moreover, TransferDatabase action is remarkably ' faster than the combination of actions represented by ' OpenDatabase > DeleteTable > CopyTable methods. ExitPoint: On Error Resume Next rst1.Close rst2.Close Set rst1 = Nothing Set rst2 = Nothing Set db = Nothing On Error GoTo 0 Exit Sub ErrTrap: MsgBox Err.Number & " - " & Err.DESCRIPTION Resume ExitPoint End Sub '===================================== ----- Original Message ----- From: Rocky Smolin To: 'Access Developers discussion and problem solving' Sent: Tuesday, October 06, 2009 22:24 Subject: Re: [AccessD] Invalid Password Well, there's a potential procedural problem. Each user has their own copy of the FE. So the head guy should change the password and then, after relinking HIS FE, distribute that FE to the other users. I think. R -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Drew Wutka Sent: Tuesday, October 06, 2009 8:57 AM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Invalid Password Just saw it. Looks like a good solution. Just as an FYI, if multiple people go into this Front end, when the password changes, it will lock the users out when one person goes in. (I'm about 90% certain, because this process will probably require exclusive access to the front end....) Drew -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Rocky Smolin Sent: Tuesday, October 06, 2009 10:23 AM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Invalid Password Drew: Thanks for the reply. Did you see A.D.'s solution. I think that will work. They're using 2003 and actually the primary machine is still on A2K which causes reference problems. He's on the IT list for an upgrade. Has been for about 2 years. R From stuart at lexacorp.com.pg Tue Oct 6 16:24:00 2009 From: stuart at lexacorp.com.pg (Stuart McLachlan) Date: Wed, 07 Oct 2009 07:24:00 +1000 Subject: [AccessD] Access 2002 SQL problem In-Reply-To: References: , Message-ID: <4ACBB570.17109.65A03B50@stuart.lexacorp.com.pg> Only if you are sure that every machine you run on is set up to use merkin dates. Not true for the rest of the world. -- Stuart On 6 Oct 2009 at 10:06, Drew Wutka wrote: > It's probably the dates. When building, and using a SQL statement in > code, 'formatting' the date is not necessary. > From max.wanadoo at gmail.com Tue Oct 6 16:26:21 2009 From: max.wanadoo at gmail.com (Max Wanadoo) Date: Tue, 6 Oct 2009 22:26:21 +0100 Subject: [AccessD] Select a node in a treeview In-Reply-To: References: <5B4138F9EC0B4D4A9729EECD82760BF1@HAL9005> <882519.60718.qm@web50401.mail.re2.yahoo.com> Message-ID: <4acbb60f.0702d00a.4dae.3934@mx.google.com> Drew, Hi, I tried to position as you describe below and I am getting error 438 (object doesn?t support property or method) This is what I am using to position Top, Middle, bottom Where top is Lv1:1 Middle is Lv2:1 Bottom is Lv3:1 Any clues? TreeView1.Nodes ("Lv1:1:Lv2:1:Lv3:1") Max -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Drew Wutka Sent: 06 October 2009 17:03 To: Access Developers discussion and problem solving Subject: Re: [AccessD] Select a node in a treeview This would be something you need to do based on the Key values. So let's say you have a simple treeview based on one table that has an 'ID' field. When you create the node, set the key to "ID:" & rs.fields("IDField").value Then to retrieve the node: tvwData.Nodes("ID:" & rs.fields("IDField").value) for more complex treeviews, with multiple sources, it's just a matter of extending the process. For example, I have a 'request' treeview, which will show user requests (tblRequests), along with Interim Reports, Final Reports, 'Punts', Purchase Requests, etc. All from different tables. Each of those other tables have a unique key, BUT, the keys COULD be the same from a request and an interim report(or any other sub 'object'). So, my requestNodes would be: "ID:1", "ID:2006", etc. My Interim Report nodes would be: "ID:1:INTRM:12" (so this key tells me it's request 1, with Interim 12). This way, when I ask for "ID:1", I get the request node. If I ask for "ID:1:INTRM:12" I get the interim node, and I never have a clash of IDs. I can also tell what the node represents from the key this way too. Drew -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Dale Kalsow Sent: Monday, October 05, 2009 12:08 PM To: Access Developers discussion and problem solving Subject: [AccessD] Select a node in a treeview Good Afternoon, ? Can anyone tell me how to select a node in a treeview?? I want to select it based on a the value of the current record (not that it probably matters) :) ? thanks! ? Dale -- 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 stuart at lexacorp.com.pg Tue Oct 6 16:28:29 2009 From: stuart at lexacorp.com.pg (Stuart McLachlan) Date: Wed, 07 Oct 2009 07:28:29 +1000 Subject: [AccessD] Access 2007 Reports In-Reply-To: <948028.35822.qm@web50405.mail.re2.yahoo.com> References: , <948028.35822.qm@web50405.mail.re2.yahoo.com> Message-ID: <4ACBB67D.10090.65A452C7@stuart.lexacorp.com.pg> Hard to tell. How about posting the recordsource and the names of the sort and group break fields? -- Stuart On 6 Oct 2009 at 10:04, Dale Kalsow wrote: > > I was wondering if anyone had any words of wisdom for me. ? I have an > Access 2007 report with two sorts and then one Group Break.? Currently > the groupbreak is not working - it is breaking on everything even > though the data is correct (I have verifed it by printing it).? ? If I > take out the second sort the groupbreaking works fine but as soon as I > add it back in the report runs incorrect again. ? Does any one know what > to look for?? When I exclude the second sort that data is on not > sorted correctly so the only other option that I see would be bring > the two sorts together into one field in the report query. ? thanks! ? > Dale > From max.wanadoo at gmail.com Tue Oct 6 16:29:46 2009 From: max.wanadoo at gmail.com (Max Wanadoo) Date: Tue, 6 Oct 2009 22:29:46 +0100 Subject: [AccessD] Access 2002 SQL problem In-Reply-To: <4ACBB570.17109.65A03B50@stuart.lexacorp.com.pg> References: , <4ACBB570.17109.65A03B50@stuart.lexacorp.com.pg> Message-ID: <4acbb6db.0702d00a.4d7c.39c6@mx.google.com> I typed in "merkin dates" into Chrome and got a link for "Betty Public Hair Dye" I doubt if Drew has a need for that. Never know though? Max -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Stuart McLachlan Sent: 06 October 2009 22:24 To: Access Developers discussion and problem solving Subject: Re: [AccessD] Access 2002 SQL problem Only if you are sure that every machine you run on is set up to use merkin dates. Not true for the rest of the world. -- Stuart On 6 Oct 2009 at 10:06, Drew Wutka wrote: > It's probably the dates. When building, and using a SQL statement in > code, 'formatting' the date is not necessary. > -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From max.wanadoo at gmail.com Tue Oct 6 16:32:18 2009 From: max.wanadoo at gmail.com (Max Wanadoo) Date: Tue, 6 Oct 2009 22:32:18 +0100 Subject: [AccessD] Select a node in a treeview In-Reply-To: References: <5B4138F9EC0B4D4A9729EECD82760BF1@HAL9005> <882519.60718.qm@web50401.mail.re2.yahoo.com> Message-ID: <4acbb774.1c07d00a.7c4c.49f1@mx.google.com> Is there any intelisense with treeview? Anybody? Max -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Drew Wutka Sent: 06 October 2009 17:03 To: Access Developers discussion and problem solving Subject: Re: [AccessD] Select a node in a treeview This would be something you need to do based on the Key values. So let's say you have a simple treeview based on one table that has an 'ID' field. When you create the node, set the key to "ID:" & rs.fields("IDField").value Then to retrieve the node: tvwData.Nodes("ID:" & rs.fields("IDField").value) for more complex treeviews, with multiple sources, it's just a matter of extending the process. For example, I have a 'request' treeview, which will show user requests (tblRequests), along with Interim Reports, Final Reports, 'Punts', Purchase Requests, etc. All from different tables. Each of those other tables have a unique key, BUT, the keys COULD be the same from a request and an interim report(or any other sub 'object'). So, my requestNodes would be: "ID:1", "ID:2006", etc. My Interim Report nodes would be: "ID:1:INTRM:12" (so this key tells me it's request 1, with Interim 12). This way, when I ask for "ID:1", I get the request node. If I ask for "ID:1:INTRM:12" I get the interim node, and I never have a clash of IDs. I can also tell what the node represents from the key this way too. Drew -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Dale Kalsow Sent: Monday, October 05, 2009 12:08 PM To: Access Developers discussion and problem solving Subject: [AccessD] Select a node in a treeview Good Afternoon, ? Can anyone tell me how to select a node in a treeview?? I want to select it based on a the value of the current record (not that it probably matters) :) ? thanks! ? Dale -- 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 rockysmolin at bchacc.com Tue Oct 6 16:37:41 2009 From: rockysmolin at bchacc.com (Rocky Smolin) Date: Tue, 6 Oct 2009 14:37:41 -0700 Subject: [AccessD] Access 2002 SQL problem In-Reply-To: <4ACBB570.17109.65A03B50@stuart.lexacorp.com.pg> References: , <4ACBB570.17109.65A03B50@stuart.lexacorp.com.pg> Message-ID: Merkin, eh? Well, you learn something new every day... http://en.wikipedia.org/wiki/Merkin Makes a lovely and thoughtful gift as well: http://www.merkinworld.com/ Rocky -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Stuart McLachlan Sent: Tuesday, October 06, 2009 2:24 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Access 2002 SQL problem Only if you are sure that every machine you run on is set up to use merkin dates. Not true for the rest of the world. -- Stuart On 6 Oct 2009 at 10:06, Drew Wutka wrote: > It's probably the dates. When building, and using a SQL statement in > code, 'formatting' the date is not necessary. > -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From max.wanadoo at gmail.com Tue Oct 6 16:46:04 2009 From: max.wanadoo at gmail.com (Max Wanadoo) Date: Tue, 6 Oct 2009 22:46:04 +0100 Subject: [AccessD] Access 2002 SQL problem In-Reply-To: References: , <4ACBB570.17109.65A03B50@stuart.lexacorp.com.pg> Message-ID: <4acbbaae.0508d00a.68bb.2d2c@mx.google.com> So, merkin dates are when you are going out on a date with somebody and you or him/her is wearing a merkin.... When you say "thoughtful", what thoughts did you have in mind? Max -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Rocky Smolin Sent: 06 October 2009 22:38 To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Access 2002 SQL problem Merkin, eh? Well, you learn something new every day... http://en.wikipedia.org/wiki/Merkin Makes a lovely and thoughtful gift as well: http://www.merkinworld.com/ Rocky -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Stuart McLachlan Sent: Tuesday, October 06, 2009 2:24 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Access 2002 SQL problem Only if you are sure that every machine you run on is set up to use merkin dates. Not true for the rest of the world. -- Stuart On 6 Oct 2009 at 10:06, Drew Wutka wrote: > It's probably the dates. When building, and using a SQL statement in > code, 'formatting' the date is not necessary. > -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From stuart at lexacorp.com.pg Tue Oct 6 16:49:57 2009 From: stuart at lexacorp.com.pg (Stuart McLachlan) Date: Wed, 07 Oct 2009 07:49:57 +1000 Subject: [AccessD] Access 2002 SQL problem In-Reply-To: References: , <4ACBB570.17109.65A03B50@stuart.lexacorp.com.pg>, Message-ID: <4ACBBB85.16195.65B7F9BF@stuart.lexacorp.com.pg> On the OT List on 25 Aug 2009 in the thread "Shuttle to deliver 'hot and cold'". The "terms of endearment" merkin and septic were both explained. :-) -- Stuart On 6 Oct 2009 at 14:37, Rocky Smolin wrote: > Merkin, eh? Well, you learn something new every day... > > http://en.wikipedia.org/wiki/Merkin > > Makes a lovely and thoughtful gift as well: > > http://www.merkinworld.com/ > > Rocky > > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Stuart McLachlan > Sent: Tuesday, October 06, 2009 2:24 PM > To: Access Developers discussion and problem solving > Subject: Re: [AccessD] Access 2002 SQL problem > > Only if you are sure that every machine you run on is set up to use merkin > dates. > > Not true for the rest of the world. > > -- > Stuart > > > On 6 Oct 2009 at 10:06, Drew Wutka wrote: > > > It's probably the dates. When building, and using a SQL statement in > > code, 'formatting' the date is not necessary. > > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com From rockysmolin at bchacc.com Tue Oct 6 17:13:29 2009 From: rockysmolin at bchacc.com (Rocky Smolin) Date: Tue, 6 Oct 2009 15:13:29 -0700 Subject: [AccessD] Access 2002 SQL problem In-Reply-To: <4acbbaae.0508d00a.68bb.2d2c@mx.google.com> References: , <4ACBB570.17109.65A03B50@stuart.lexacorp.com.pg> <4acbbaae.0508d00a.68bb.2d2c@mx.google.com> Message-ID: <716379330395415299F207C3F0CCC0F2@HAL9005> I hesitate to say. R -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Max Wanadoo Sent: Tuesday, October 06, 2009 2:46 PM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Access 2002 SQL problem So, merkin dates are when you are going out on a date with somebody and you or him/her is wearing a merkin.... When you say "thoughtful", what thoughts did you have in mind? Max -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Rocky Smolin Sent: 06 October 2009 22:38 To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Access 2002 SQL problem Merkin, eh? Well, you learn something new every day... http://en.wikipedia.org/wiki/Merkin Makes a lovely and thoughtful gift as well: http://www.merkinworld.com/ Rocky -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Stuart McLachlan Sent: Tuesday, October 06, 2009 2:24 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Access 2002 SQL problem Only if you are sure that every machine you run on is set up to use merkin dates. Not true for the rest of the world. -- Stuart On 6 Oct 2009 at 10:06, Drew Wutka wrote: > It's probably the dates. When building, and using a SQL statement in > code, 'formatting' the date is not necessary. > -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/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 max.wanadoo at gmail.com Tue Oct 6 17:21:10 2009 From: max.wanadoo at gmail.com (Max Wanadoo) Date: Tue, 6 Oct 2009 23:21:10 +0100 Subject: [AccessD] Access 2002 SQL problem In-Reply-To: <716379330395415299F207C3F0CCC0F2@HAL9005> References: , <4ACBB570.17109.65A03B50@stuart.lexacorp.com.pg> <4acbbaae.0508d00a.68bb.2d2c@mx.google.com> <716379330395415299F207C3F0CCC0F2@HAL9005> Message-ID: <4acbc2ea.0707d00a.77d0.4c2e@mx.google.com> And that says it all. Ps. Don't buy me one for Xmas. I am happy with my willie warmer! Max -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Rocky Smolin Sent: 06 October 2009 23:13 To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Access 2002 SQL problem I hesitate to say. R -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Max Wanadoo Sent: Tuesday, October 06, 2009 2:46 PM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Access 2002 SQL problem So, merkin dates are when you are going out on a date with somebody and you or him/her is wearing a merkin.... When you say "thoughtful", what thoughts did you have in mind? Max -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Rocky Smolin Sent: 06 October 2009 22:38 To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Access 2002 SQL problem Merkin, eh? Well, you learn something new every day... http://en.wikipedia.org/wiki/Merkin Makes a lovely and thoughtful gift as well: http://www.merkinworld.com/ Rocky -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Stuart McLachlan Sent: Tuesday, October 06, 2009 2:24 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Access 2002 SQL problem Only if you are sure that every machine you run on is set up to use merkin dates. Not true for the rest of the world. -- Stuart On 6 Oct 2009 at 10:06, Drew Wutka wrote: > It's probably the dates. When building, and using a SQL statement in > code, 'formatting' the date is not necessary. > -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/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 max.wanadoo at gmail.com Tue Oct 6 17:22:46 2009 From: max.wanadoo at gmail.com (Max Wanadoo) Date: Tue, 6 Oct 2009 23:22:46 +0100 Subject: [AccessD] Access 2002 SQL problem In-Reply-To: <4ACBBB85.16195.65B7F9BF@stuart.lexacorp.com.pg> References: , <4ACBB570.17109.65A03B50@stuart.lexacorp.com.pg>, <4ACBBB85.16195.65B7F9BF@stuart.lexacorp.com.pg> Message-ID: <4acbc348.0707d00a.71d9.50f0@mx.google.com> Right, So I am sitting here hoping that some kind soul will help with my treeview problem and you are cruising round the Indian ocean drinking warm beer and wearing merkins....sheesh! Max -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Stuart McLachlan Sent: 06 October 2009 22:50 To: Access Developers discussion and problem solving Subject: Re: [AccessD] Access 2002 SQL problem On the OT List on 25 Aug 2009 in the thread "Shuttle to deliver 'hot and cold'". The "terms of endearment" merkin and septic were both explained. :-) -- Stuart On 6 Oct 2009 at 14:37, Rocky Smolin wrote: > Merkin, eh? Well, you learn something new every day... > > http://en.wikipedia.org/wiki/Merkin > > Makes a lovely and thoughtful gift as well: > > http://www.merkinworld.com/ > > Rocky > > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Stuart McLachlan > Sent: Tuesday, October 06, 2009 2:24 PM > To: Access Developers discussion and problem solving > Subject: Re: [AccessD] Access 2002 SQL problem > > Only if you are sure that every machine you run on is set up to use merkin > dates. > > Not true for the rest of the world. > > -- > Stuart > > > On 6 Oct 2009 at 10:06, Drew Wutka wrote: > > > It's probably the dates. When building, and using a SQL statement in > > code, 'formatting' the date is not necessary. > > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From darren at activebilling.com.au Tue Oct 6 17:30:32 2009 From: darren at activebilling.com.au (Darren - Active Billing) Date: Wed, 7 Oct 2009 09:30:32 +1100 Subject: [AccessD] Postion a Pop-up form In-Reply-To: <4ACB6201.3060502@nanaimo.ark.com> References: <4ACB6201.3060502@nanaimo.ark.com> Message-ID: <013701ca46d4$9ef8b170$171b910a@denzilnote> Hi Tony Look to the "MoveSize" function I have used it in the past - I can't find that code (Much like you) but I found this on the net - It may be of use It opens the form just under the menu bar and just to the left of centre and changes the size a bit too ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Private Sub Form_Open(Cancel As Integer) Const conInchesToTwips = 1440 'enables you to specify dimensions in Inches Dim intRight As Integer, intDown As Integer, intWidth As Integer, intHeight As Integer DoCmd.Restore intRight = (3 * conInchesToTwips) intDown = 0 intWidth = (5 * conInchesToTwips) intHeight = (5.5 * conInchesToTwips) DoCmd.MoveSize intRight, intDown, intWidth, intHeight End Sub ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Many thanks Darren -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Tony Septav Sent: Wednesday, 07 October 2009 2:28 AM To: Access Developers discussion and problem solving Subject: [AccessD] Postion a Pop-up form Hey All Does anyone have some code to position a pop-up in the same location above the main form, independent of the screen resolution. I had some some code I found years ago, but it is lost in the bowels of one of my computers. Thanks -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From max.wanadoo at gmail.com Tue Oct 6 17:54:16 2009 From: max.wanadoo at gmail.com (Max Wanadoo) Date: Tue, 6 Oct 2009 23:54:16 +0100 Subject: [AccessD] Register OCX In-Reply-To: <013701ca46d4$9ef8b170$171b910a@denzilnote> References: <4ACB6201.3060502@nanaimo.ark.com> <013701ca46d4$9ef8b170$171b910a@denzilnote> Message-ID: <4acbcaaa.0702d00a.4d75.5426@mx.google.com> Anybody know how to register an OCX? Max From darren at activebilling.com.au Tue Oct 6 17:59:01 2009 From: darren at activebilling.com.au (Darren - Active Billing) Date: Wed, 7 Oct 2009 09:59:01 +1100 Subject: [AccessD] Register OCX In-Reply-To: <4acbcaaa.0702d00a.4d75.5426@mx.google.com> References: <4ACB6201.3060502@nanaimo.ark.com><013701ca46d4$9ef8b170$171b910a@denzilnote> <4acbcaaa.0702d00a.4d75.5426@mx.google.com> Message-ID: <013801ca46d8$9b303af0$171b910a@denzilnote> Manually (via the access screens) or via code? Many thanks Darren -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Max Wanadoo Sent: Wednesday, 07 October 2009 9:54 AM To: 'Access Developers discussion and problem solving' Subject: [AccessD] Register OCX Anybody know how to register an OCX? Max -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From max.wanadoo at gmail.com Tue Oct 6 18:02:24 2009 From: max.wanadoo at gmail.com (Max Wanadoo) Date: Wed, 7 Oct 2009 00:02:24 +0100 Subject: [AccessD] Register OCD In-Reply-To: References: Message-ID: <4acbcc91.1c07d00a.6e4b.78c7@mx.google.com> Ok, forget that. Done it. But why oh why does the object browser not give example of the code to use. So frustrating this Treeview. Max -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] Sent: 06 October 2009 23:55 To: max.wanadoo at gmail.com Subject: AccessD post acknowledgement Your message entitled Register OCX was successfully received by the AccessD mailing list. List info page: http://databaseadvisors.com/mailman/listinfo/accessd Your preferences: http://databaseadvisors.com/mailman/options/accessd/max.wanadoo%40gmail.com From max.wanadoo at gmail.com Tue Oct 6 18:04:48 2009 From: max.wanadoo at gmail.com (Max Wanadoo) Date: Wed, 7 Oct 2009 00:04:48 +0100 Subject: [AccessD] Register OCX In-Reply-To: <013801ca46d8$9b303af0$171b910a@denzilnote> References: <4ACB6201.3060502@nanaimo.ark.com><013701ca46d4$9ef8b170$171b910a@denzilnote> <4acbcaaa.0702d00a.4d75.5426@mx.google.com> <013801ca46d8$9b303af0$171b910a@denzilnote> Message-ID: <4acbcd23.0702d00a.4d7c.5c27@mx.google.com> No Darren, that is about as useful as the code I post!! What I was looking for was: Click Start, then run and enter regsvr32 C:\Windows\SysWOW64\MSCOMCTL.OCX BTW, forget doing that. I was hoping to get some Treeview help from it. Fat chance! Still struggling. Max -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Darren - Active Billing Sent: 06 October 2009 23:59 To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Register OCX Manually (via the access screens) or via code? Many thanks Darren -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Max Wanadoo Sent: Wednesday, 07 October 2009 9:54 AM To: 'Access Developers discussion and problem solving' Subject: [AccessD] Register OCX Anybody know how to register an OCX? Max -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From drawbridgej at sympatico.ca Tue Oct 6 18:42:36 2009 From: drawbridgej at sympatico.ca (Jack and Pat) Date: Tue, 6 Oct 2009 19:42:36 -0400 Subject: [AccessD] Select a node in a treeview In-Reply-To: <4acbb774.1c07d00a.7c4c.49f1@mx.google.com> References: <5B4138F9EC0B4D4A9729EECD82760BF1@HAL9005> <882519.60718.qm@web50401.mail.re2.yahoo.com> <4acbb774.1c07d00a.7c4c.49f1@mx.google.com> Message-ID: <8607AEB013F446FC926C3FA7E470BF62@AMDXP> Max, I haven't looked at Treeview since you and I were in contact back in the spring. I did find this reference material via google. Hope it might be useful. http://www.databasejournal.com/features/msaccess/article.php/3734331/Access- TreeView-ListView-Basics.htm Jack -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Max Wanadoo Sent: Tuesday, October 06, 2009 5:32 PM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Select a node in a treeview Is there any intelisense with treeview? Anybody? Max -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Drew Wutka Sent: 06 October 2009 17:03 To: Access Developers discussion and problem solving Subject: Re: [AccessD] Select a node in a treeview This would be something you need to do based on the Key values. So let's say you have a simple treeview based on one table that has an 'ID' field. When you create the node, set the key to "ID:" & rs.fields("IDField").value Then to retrieve the node: tvwData.Nodes("ID:" & rs.fields("IDField").value) for more complex treeviews, with multiple sources, it's just a matter of extending the process. For example, I have a 'request' treeview, which will show user requests (tblRequests), along with Interim Reports, Final Reports, 'Punts', Purchase Requests, etc. All from different tables. Each of those other tables have a unique key, BUT, the keys COULD be the same from a request and an interim report(or any other sub 'object'). So, my requestNodes would be: "ID:1", "ID:2006", etc. My Interim Report nodes would be: "ID:1:INTRM:12" (so this key tells me it's request 1, with Interim 12). This way, when I ask for "ID:1", I get the request node. If I ask for "ID:1:INTRM:12" I get the interim node, and I never have a clash of IDs. I can also tell what the node represents from the key this way too. Drew -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Dale Kalsow Sent: Monday, October 05, 2009 12:08 PM To: Access Developers discussion and problem solving Subject: [AccessD] Select a node in a treeview Good Afternoon, ? Can anyone tell me how to select a node in a treeview?? I want to select it based on a the value of the current record (not that it probably matters) :) ? thanks! ? Dale -- 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 dwaters at usinternet.com Tue Oct 6 20:10:07 2009 From: dwaters at usinternet.com (Dan Waters) Date: Tue, 6 Oct 2009 20:10:07 -0500 Subject: [AccessD] Register OCX In-Reply-To: <4acbcaaa.0702d00a.4d75.5426@mx.google.com> References: <4ACB6201.3060502@nanaimo.ark.com><013701ca46d4$9ef8b170$171b910a@denzilnote> <4acbcaaa.0702d00a.4d75.5426@mx.google.com> Message-ID: Hi Max - this is all you need: Private Declare Function Register_mswinsck Lib "mswinsck.ocx" Alias "DllRegisterServer" () As Long Private Declare Function UnRegister_mswinsck Lib "mswinsck.ocx" Alias "DllUnregisterServer" () As Long Public Function RegisterFiles() Dim retCode As Long retCode = Register_mswinsck() 'retCode = UnRegister_mswinsck() End Function Good Luck! Dan -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Max Wanadoo Sent: Tuesday, October 06, 2009 5:54 PM To: 'Access Developers discussion and problem solving' Subject: [AccessD] Register OCX Anybody know how to register an OCX? Max -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From wdhindman at dejpolsystems.com Tue Oct 6 20:36:12 2009 From: wdhindman at dejpolsystems.com (William Hindman) Date: Tue, 6 Oct 2009 21:36:12 -0400 Subject: [AccessD] Postion a Pop-up form In-Reply-To: <013701ca46d4$9ef8b170$171b910a@denzilnote> References: <4ACB6201.3060502@nanaimo.ark.com> <013701ca46d4$9ef8b170$171b910a@denzilnote> Message-ID: <426E1E483E7B4C05A6E0F97D3D742C43@jislaptopdev> http://www.peterssoftware.com/winmanip.htm ...it's a code module that includes, among other things, positioning a popup in relation to a form or control William -------------------------------------------------- From: "Darren - Active Billing" Sent: Tuesday, October 06, 2009 6:30 PM To: "'Access Developers discussion and problem solving'" Subject: Re: [AccessD] Postion a Pop-up form > Hi Tony > > Look to the "MoveSize" function > > I have used it in the past - I can't find that code (Much like you) but I > found > this on the net - It may be of use > > It opens the form just under the menu bar and just to the left of centre > and > changes the size a bit too > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > Private Sub Form_Open(Cancel As Integer) > Const conInchesToTwips = 1440 'enables you to specify dimensions in > Inches > Dim intRight As Integer, intDown As Integer, intWidth As Integer, > intHeight As > Integer > > DoCmd.Restore > > intRight = (3 * conInchesToTwips) > intDown = 0 > intWidth = (5 * conInchesToTwips) > intHeight = (5.5 * conInchesToTwips) > > DoCmd.MoveSize intRight, intDown, intWidth, intHeight > End Sub > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > Many thanks > > Darren > > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Tony Septav > Sent: Wednesday, 07 October 2009 2:28 AM > To: Access Developers discussion and problem solving > Subject: [AccessD] Postion a Pop-up form > > Hey All > Does anyone have some code to position a pop-up in the same location > above the main form, independent of the screen resolution. I had some > some code I found years ago, but it is lost in the bowels of one of my > computers. > > Thanks > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > From max.wanadoo at gmail.com Wed Oct 7 01:11:32 2009 From: max.wanadoo at gmail.com (Max Wanadoo) Date: Wed, 7 Oct 2009 07:11:32 +0100 Subject: [AccessD] Select a node in a treeview In-Reply-To: <8607AEB013F446FC926C3FA7E470BF62@AMDXP> References: <5B4138F9EC0B4D4A9729EECD82760BF1@HAL9005> <882519.60718.qm@web50401.mail.re2.yahoo.com> <4acbb774.1c07d00a.7c4c.49f1@mx.google.com> <8607AEB013F446FC926C3FA7E470BF62@AMDXP> Message-ID: <4acc315b.0707d00a.1bad.ffffcff3@mx.google.com> Thanks Jack, I also found this from Arthur Fuller. http://www.databaseadvisors.com/newsletters/newsletter092001/0109UsingTreeVi ews.asp Max -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Jack and Pat Sent: 07 October 2009 00:43 To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Select a node in a treeview Max, I haven't looked at Treeview since you and I were in contact back in the spring. I did find this reference material via google. Hope it might be useful. http://www.databasejournal.com/features/msaccess/article.php/3734331/Access- TreeView-ListView-Basics.htm Jack -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Max Wanadoo Sent: Tuesday, October 06, 2009 5:32 PM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Select a node in a treeview Is there any intelisense with treeview? Anybody? Max -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Drew Wutka Sent: 06 October 2009 17:03 To: Access Developers discussion and problem solving Subject: Re: [AccessD] Select a node in a treeview This would be something you need to do based on the Key values. So let's say you have a simple treeview based on one table that has an 'ID' field. When you create the node, set the key to "ID:" & rs.fields("IDField").value Then to retrieve the node: tvwData.Nodes("ID:" & rs.fields("IDField").value) for more complex treeviews, with multiple sources, it's just a matter of extending the process. For example, I have a 'request' treeview, which will show user requests (tblRequests), along with Interim Reports, Final Reports, 'Punts', Purchase Requests, etc. All from different tables. Each of those other tables have a unique key, BUT, the keys COULD be the same from a request and an interim report(or any other sub 'object'). So, my requestNodes would be: "ID:1", "ID:2006", etc. My Interim Report nodes would be: "ID:1:INTRM:12" (so this key tells me it's request 1, with Interim 12). This way, when I ask for "ID:1", I get the request node. If I ask for "ID:1:INTRM:12" I get the interim node, and I never have a clash of IDs. I can also tell what the node represents from the key this way too. Drew -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Dale Kalsow Sent: Monday, October 05, 2009 12:08 PM To: Access Developers discussion and problem solving Subject: [AccessD] Select a node in a treeview Good Afternoon, ? Can anyone tell me how to select a node in a treeview?? I want to select it based on a the value of the current record (not that it probably matters) :) ? thanks! ? Dale -- 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 -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From max.wanadoo at gmail.com Wed Oct 7 01:20:28 2009 From: max.wanadoo at gmail.com (Max Wanadoo) Date: Wed, 7 Oct 2009 07:20:28 +0100 Subject: [AccessD] Register OCX In-Reply-To: References: <4ACB6201.3060502@nanaimo.ark.com><013701ca46d4$9ef8b170$171b910a@denzilnote> <4acbcaaa.0702d00a.4d75.5426@mx.google.com> Message-ID: <4acc3341.0a1ad00a.1ad6.fffffade@mx.google.com> Thanks Dan Max -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Dan Waters Sent: 07 October 2009 02:10 To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Register OCX Hi Max - this is all you need: Private Declare Function Register_mswinsck Lib "mswinsck.ocx" Alias "DllRegisterServer" () As Long Private Declare Function UnRegister_mswinsck Lib "mswinsck.ocx" Alias "DllUnregisterServer" () As Long Public Function RegisterFiles() Dim retCode As Long retCode = Register_mswinsck() 'retCode = UnRegister_mswinsck() End Function Good Luck! Dan -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Max Wanadoo Sent: Tuesday, October 06, 2009 5:54 PM To: 'Access Developers discussion and problem solving' Subject: [AccessD] Register OCX Anybody know how to register an OCX? Max -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd 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 Oct 7 04:51:43 2009 From: fuller.artful at gmail.com (Arthur Fuller) Date: Wed, 7 Oct 2009 05:51:43 -0400 Subject: [AccessD] Access 2007 Reports In-Reply-To: <4ACBB67D.10090.65A452C7@stuart.lexacorp.com.pg> References: <948028.35822.qm@web50405.mail.re2.yahoo.com> <4ACBB67D.10090.65A452C7@stuart.lexacorp.com.pg> Message-ID: <29f585dd0910070251j68a80ce4i62a54803977a7ba9@mail.gmail.com> I haven't had the need to create such a report in Access 2007, but my initial suggestion would be to create a toy report with two sorts and a group break and if it doesn't work right, suspect a bug. If that is the case, then I would suggest adding a calculated column that concatenates your two sorts into one column, and then sort on that. Just a thought. Arthur On Tue, Oct 6, 2009 at 5:28 PM, Stuart McLachlan wrote: > Hard to tell. How about posting the recordsource and the names of the sort > and group break > fields? > > -- > Stuart > > > On 6 Oct 2009 at 10:04, Dale Kalsow wrote: > > > > > I was wondering if anyone had any words of wisdom for me. I have an > > Access 2007 report with two sorts and then one Group Break. Currently > > the groupbreak is not working - it is breaking on everything even > > though the data is correct (I have verifed it by printing it). If I > > take out the second sort the groupbreaking works fine but as soon as I > > add it back in the report runs incorrect again. Does any one know what > > to look for? When I exclude the second sort that data is on not > > sorted correctly so the only other option that I see would be bring > > the two sorts together into one field in the report query. thanks! > > Dale > > > > > -- > 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 Oct 7 05:34:32 2009 From: fuller.artful at gmail.com (Arthur Fuller) Date: Wed, 7 Oct 2009 06:34:32 -0400 Subject: [AccessD] Select a node in a treeview In-Reply-To: <4acc315b.0707d00a.1bad.ffffcff3@mx.google.com> References: <5B4138F9EC0B4D4A9729EECD82760BF1@HAL9005> <882519.60718.qm@web50401.mail.re2.yahoo.com> <4acbb774.1c07d00a.7c4c.49f1@mx.google.com> <8607AEB013F446FC926C3FA7E470BF62@AMDXP> <4acc315b.0707d00a.1bad.ffffcff3@mx.google.com> Message-ID: <29f585dd0910070334u523c45bcnbc3e025e6225f5b@mail.gmail.com> I was just about to chime in with that, Max. Thanks! Arthur On Wed, Oct 7, 2009 at 2:11 AM, Max Wanadoo wrote: > Thanks Jack, > > I also found this from Arthur Fuller. > > > http://www.databaseadvisors.com/newsletters/newsletter092001/0109UsingTreeVi > ews.asp > > Max > > > From robert at webedb.com Wed Oct 7 07:38:37 2009 From: robert at webedb.com (Robert Stewart) Date: Wed, 07 Oct 2009 07:38:37 -0500 Subject: [AccessD] Access 2007 Reports In-Reply-To: References: Message-ID: <200910071239.n97Cd0mh012159@databaseadvisors.com> Run the data into a temp table and use that for the reporting. Then, you can take the sorts off of it completely and only do the grouping. Delete the data out fo the temp table on close of the report. At 06:42 PM 10/6/2009, you wrote: >Date: Tue, 6 Oct 2009 10:04:03 -0700 (PDT) >From: Dale Kalsow >Subject: [AccessD] Access 2007 Reports >To: Access Developers discussion and problem solving > >Message-ID: <948028.35822.qm at web50405.mail.re2.yahoo.com> >Content-Type: text/plain; charset=iso-8859-1 > > >I was wondering if anyone had any words of wisdom for me. >? >I have an Access 2007 report with two sorts and then one Group >Break.? Currently the groupbreak is not working - it is breaking on >everything even though the data is correct (I have verifed it by printing it).? >? >If I take out the second sort the groupbreaking works fine but as >soon as I add it back in the report runs incorrect again. >? >Does any one know what to look for?? When I exclude the second sort >that data is on not sorted correctly so the only other option that I >see would be bring the two sorts together into one field in the report query. >? >thanks! >? >Dale From marksimms at verizon.net Wed Oct 7 07:57:54 2009 From: marksimms at verizon.net (Mark Simms) Date: Wed, 07 Oct 2009 08:57:54 -0400 Subject: [AccessD] Invalid Password In-Reply-To: <4acb7bbd.0a1ad00a.4da1.0aab@mx.google.com> References: <3D6AC076D3C94876A3D4420CAAD929C8@HAL9005> <4acb7bbd.0a1ad00a.4da1.0aab@mx.google.com> Message-ID: <00cb01ca474d$c945d010$0501a8c0@MSIMMSWS> Max - you're not using the AutoFEUpdate program written by Tony Toews ? http://www.autofeupdater.com/ It's really a great tool, and only creates a new local copy of the FE when the server version is newer. Check it out. > > Each time the users boots up the batch file goes and gets a > copy from the server and places it into their own PC area. > There is also a shortcut icon on their desktop so that they > can bring over the latest version whenever they want. > > Worked for years now. 2/3 times a day you hear me shouting > "Latest version on the sever if anybody is waiting for a fix" - those interested come out of the FE and click on the "go > fetch" icon and then click on the normal icon to enter the FE. > > Nobody every has to link anything. It is all done for them > in the latest FE. > > Max From fuller.artful at gmail.com Wed Oct 7 09:22:44 2009 From: fuller.artful at gmail.com (Arthur Fuller) Date: Wed, 7 Oct 2009 10:22:44 -0400 Subject: [AccessD] Table size In-Reply-To: References: Message-ID: <29f585dd0910070722v7b268727ybe6e76a04b940ff3@mail.gmail.com> JC, you could avoid the whole 2GB problem by moving the data to SQL Express and connecting via ODBC. Then you wouldn't have to change any code except the connection string. No? A. From DWUTKA at Marlow.com Wed Oct 7 09:52:23 2009 From: DWUTKA at Marlow.com (Drew Wutka) Date: Wed, 7 Oct 2009 09:52:23 -0500 Subject: [AccessD] Select a node in a treeview In-Reply-To: <4acbb60f.0702d00a.4dae.3934@mx.google.com> References: <5B4138F9EC0B4D4A9729EECD82760BF1@HAL9005> <882519.60718.qm@web50401.mail.re2.yahoo.com> <4acbb60f.0702d00a.4dae.3934@mx.google.com> Message-ID: Treeview.Nodes("SomeKey") value is going to return a single node that matches the key. Also, in Access (Sorry, forgot this part), you need to use the treeview's object: Dim tvw As TreeView Set tvw = Me.tvwSkills.Object Drew -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Max Wanadoo Sent: Tuesday, October 06, 2009 4:26 PM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Select a node in a treeview Drew, Hi, I tried to position as you describe below and I am getting error 438 (object doesn't support property or method) This is what I am using to position Top, Middle, bottom Where top is Lv1:1 Middle is Lv2:1 Bottom is Lv3:1 Any clues? TreeView1.Nodes ("Lv1:1:Lv2:1:Lv3:1") Max -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Drew Wutka Sent: 06 October 2009 17:03 To: Access Developers discussion and problem solving Subject: Re: [AccessD] Select a node in a treeview This would be something you need to do based on the Key values. So let's say you have a simple treeview based on one table that has an 'ID' field. When you create the node, set the key to "ID:" & rs.fields("IDField").value Then to retrieve the node: tvwData.Nodes("ID:" & rs.fields("IDField").value) for more complex treeviews, with multiple sources, it's just a matter of extending the process. For example, I have a 'request' treeview, which will show user requests (tblRequests), along with Interim Reports, Final Reports, 'Punts', Purchase Requests, etc. All from different tables. Each of those other tables have a unique key, BUT, the keys COULD be the same from a request and an interim report(or any other sub 'object'). So, my requestNodes would be: "ID:1", "ID:2006", etc. My Interim Report nodes would be: "ID:1:INTRM:12" (so this key tells me it's request 1, with Interim 12). This way, when I ask for "ID:1", I get the request node. If I ask for "ID:1:INTRM:12" I get the interim node, and I never have a clash of IDs. I can also tell what the node represents from the key this way too. Drew -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Dale Kalsow Sent: Monday, October 05, 2009 12:08 PM To: Access Developers discussion and problem solving Subject: [AccessD] Select a node in a treeview Good Afternoon, ? Can anyone tell me how to select a node in a treeview?? I want to select it based on a the value of the current record (not that it probably matters) :) ? thanks! ? Dale -- 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 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 max.wanadoo at gmail.com Wed Oct 7 10:53:18 2009 From: max.wanadoo at gmail.com (Max Wanadoo) Date: Wed, 7 Oct 2009 16:53:18 +0100 Subject: [AccessD] Invalid Password In-Reply-To: <00cb01ca474d$c945d010$0501a8c0@MSIMMSWS> References: <3D6AC076D3C94876A3D4420CAAD929C8@HAL9005> <4acb7bbd.0a1ad00a.4da1.0aab@mx.google.com> <00cb01ca474d$c945d010$0501a8c0@MSIMMSWS> Message-ID: <4accb98c.0c135e0a.2110.ffff9cd1@mx.google.com> Thanks Mark, but this doesn't do anything other than what I am doing now. I sit at the dev copy. I click a button on my desktop. The server version gets updated. What else would I want. Appreciate the thought though. Max -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Mark Simms Sent: 07 October 2009 13:58 To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Invalid Password Max - you're not using the AutoFEUpdate program written by Tony Toews ? http://www.autofeupdater.com/ It's really a great tool, and only creates a new local copy of the FE when the server version is newer. Check it out. > > Each time the users boots up the batch file goes and gets a > copy from the server and places it into their own PC area. > There is also a shortcut icon on their desktop so that they > can bring over the latest version whenever they want. > > Worked for years now. 2/3 times a day you hear me shouting > "Latest version on the sever if anybody is waiting for a fix" - those interested come out of the FE and click on the "go > fetch" icon and then click on the normal icon to enter the FE. > > Nobody every has to link anything. It is all done for them > in the latest FE. > > Max -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From iggy at nanaimo.ark.com Wed Oct 7 10:24:42 2009 From: iggy at nanaimo.ark.com (Tony Septav) Date: Wed, 07 Oct 2009 08:24:42 -0700 Subject: [AccessD] Postion a Pop-up form In-Reply-To: <426E1E483E7B4C05A6E0F97D3D742C43@jislaptopdev> References: <4ACB6201.3060502@nanaimo.ark.com> <013701ca46d4$9ef8b170$171b910a@denzilnote> <426E1E483E7B4C05A6E0F97D3D742C43@jislaptopdev> Message-ID: <4ACCB2BA.4020107@nanaimo.ark.com> Hey William and Darren Thank you for your responses. William's post directed me to exactly the code I was looking for. I have still got some tweaking to do, but I am back up and running again. Thanks again William Hindman wrote: >http://www.peterssoftware.com/winmanip.htm > >...it's a code module that includes, among other things, positioning a popup >in relation to a form or control > >William > >-------------------------------------------------- >From: "Darren - Active Billing" >Sent: Tuesday, October 06, 2009 6:30 PM >To: "'Access Developers discussion and problem solving'" > >Subject: Re: [AccessD] Postion a Pop-up form > > > >>Hi Tony >> >>Look to the "MoveSize" function >> >>I have used it in the past - I can't find that code (Much like you) but I >>found >>this on the net - It may be of use >> >>It opens the form just under the menu bar and just to the left of centre >>and >>changes the size a bit too >>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ >>Private Sub Form_Open(Cancel As Integer) >>Const conInchesToTwips = 1440 'enables you to specify dimensions in >>Inches >>Dim intRight As Integer, intDown As Integer, intWidth As Integer, >>intHeight As >>Integer >> >>DoCmd.Restore >> >>intRight = (3 * conInchesToTwips) >>intDown = 0 >>intWidth = (5 * conInchesToTwips) >>intHeight = (5.5 * conInchesToTwips) >> >>DoCmd.MoveSize intRight, intDown, intWidth, intHeight >>End Sub >>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ >>Many thanks >> >>Darren >> >> >>-----Original Message----- >>From: accessd-bounces at databaseadvisors.com >>[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Tony Septav >>Sent: Wednesday, 07 October 2009 2:28 AM >>To: Access Developers discussion and problem solving >>Subject: [AccessD] Postion a Pop-up form >> >>Hey All >>Does anyone have some code to position a pop-up in the same location >>above the main form, independent of the screen resolution. I had some >>some code I found years ago, but it is lost in the bowels of one of my >>computers. >> >>Thanks >> >> >>-- >>AccessD mailing list >>AccessD at databaseadvisors.com >>http://databaseadvisors.com/mailman/listinfo/accessd >>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 Wed Oct 7 12:14:44 2009 From: jwcolby at colbyconsulting.com (jwcolby) Date: Wed, 07 Oct 2009 13:14:44 -0400 Subject: [AccessD] Table size In-Reply-To: <29f585dd0910070722v7b268727ybe6e76a04b940ff3@mail.gmail.com> References: <29f585dd0910070722v7b268727ybe6e76a04b940ff3@mail.gmail.com> Message-ID: <4ACCCC84.9090000@colbyconsulting.com> Uhh... it isn't my database, it is the client's database. He asked me for a specific piece of information, which didn't include moving to SQL Server. In fact SQL Server Express also has file size limitations and they are fairly similar so moving to Express probably wouldn't directly solve the problem. John W. Colby www.ColbyConsulting.com Arthur Fuller wrote: > JC, you could avoid the whole 2GB problem by moving the data to SQL Express > and connecting via ODBC. Then you wouldn't have to change any code except > the connection string. No? > A. From max.wanadoo at gmail.com Wed Oct 7 12:40:51 2009 From: max.wanadoo at gmail.com (Max Wanadoo) Date: Wed, 7 Oct 2009 18:40:51 +0100 Subject: [AccessD] Select a node in a treeview In-Reply-To: References: <5B4138F9EC0B4D4A9729EECD82760BF1@HAL9005> <882519.60718.qm@web50401.mail.re2.yahoo.com> <4acbb60f.0702d00a.4dae.3934@mx.google.com> Message-ID: <4accd2b6.09cc660a.6eb2.0691@mx.google.com> Slowly making progress. I have now built the tree ok but when I try to position back on a node I get an error. This first bit is ok. Dim tvw As TreeView, nod As Node, strNod As String Set tvw = Me.TreeView1.Object Set nod = tvw.Nodes("Lv3:1") ' hard code the key nod.Selected = True ' select it as does this bit. strNod = nod.FullPath ' get the name (path) of the selected node. Debug.Print strNod ' works fine MsgBox strNod ' works fine 'the above works just fine but when I try to reverse it I get an error 35601Element not found Try to position on a key using the key's value Set nod = tvw.Nodes(strNod) nod.Selected = True ERROR I am looking for some way to get it to position on a key from the key's value. Any help appreciated. Max -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Drew Wutka Sent: 07 October 2009 15:52 To: Access Developers discussion and problem solving Subject: Re: [AccessD] Select a node in a treeview Treeview.Nodes("SomeKey") value is going to return a single node that matches the key. Also, in Access (Sorry, forgot this part), you need to use the treeview's object: Dim tvw As TreeView Set tvw = Me.tvwSkills.Object Drew /www.databaseadvisors.com From jwcolby at colbyconsulting.com Wed Oct 7 12:52:14 2009 From: jwcolby at colbyconsulting.com (jwcolby) Date: Wed, 07 Oct 2009 13:52:14 -0400 Subject: [AccessD] Google bar code Message-ID: <4ACCD54E.30501@colbyconsulting.com> Is it just me or am I being bar coded? Go to www.google.com and look for a big bar code. -- John W. Colby www.ColbyConsulting.com From krosenstiel at comcast.net Wed Oct 7 13:05:37 2009 From: krosenstiel at comcast.net (krosenstiel at comcast.net) Date: Wed, 7 Oct 2009 18:05:37 +0000 (UTC) Subject: [AccessD] Google bar code In-Reply-To: <4ACCD54E.30501@colbyconsulting.com> Message-ID: <1593016290.1136791254938737267.JavaMail.root@sz0037a.emeryville.ca.mail.comcast.net> Just one of their commemorative logos -- run your mouse over it and it will tell you it is the day the bar code was invented. Click on it and get a bunch of URLs about bar codes. A couple of days ago they had a particularly nice one -- the birth anniversary of Mahatma Gandhi. http://www.google.com/logos/ Karen Rosenstiel Seattle WA USA ----- Original Message ----- From: "jwcolby" To: "Access Developers discussion and problem solving" Sent: Wednesday, October 7, 2009 10:52:14 AM GMT -08:00 US/Canada Pacific Subject: [AccessD] Google bar code Is it just me or am I being bar coded? Go to www.google.com and look for a big bar code. -- 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 Wed Oct 7 14:42:24 2009 From: DWUTKA at Marlow.com (Drew Wutka) Date: Wed, 7 Oct 2009 14:42:24 -0500 Subject: [AccessD] Select a node in a treeview In-Reply-To: <4accd2b6.09cc660a.6eb2.0691@mx.google.com> References: <5B4138F9EC0B4D4A9729EECD82760BF1@HAL9005> <882519.60718.qm@web50401.mail.re2.yahoo.com> <4acbb60f.0702d00a.4dae.3934@mx.google.com> <4accd2b6.09cc660a.6eb2.0691@mx.google.com> Message-ID: Don't use full path, use 'key'. Drew -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Max Wanadoo Sent: Wednesday, October 07, 2009 12:41 PM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Select a node in a treeview Slowly making progress. I have now built the tree ok but when I try to position back on a node I get an error. This first bit is ok. Dim tvw As TreeView, nod As Node, strNod As String Set tvw = Me.TreeView1.Object Set nod = tvw.Nodes("Lv3:1") ' hard code the key nod.Selected = True ' select it as does this bit. strNod = nod.FullPath ' get the name (path) of the selected node. Debug.Print strNod ' works fine MsgBox strNod ' works fine 'the above works just fine but when I try to reverse it I get an error 35601Element not found Try to position on a key using the key's value Set nod = tvw.Nodes(strNod) nod.Selected = True ERROR I am looking for some way to get it to position on a key from the key's value. Any help appreciated. Max -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Drew Wutka Sent: 07 October 2009 15:52 To: Access Developers discussion and problem solving Subject: Re: [AccessD] Select a node in a treeview Treeview.Nodes("SomeKey") value is going to return a single node that matches the key. Also, in Access (Sorry, forgot this part), you need to use the treeview's object: Dim tvw As TreeView Set tvw = Me.tvwSkills.Object Drew /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 DWUTKA at Marlow.com Wed Oct 7 14:43:01 2009 From: DWUTKA at Marlow.com (Drew Wutka) Date: Wed, 7 Oct 2009 14:43:01 -0500 Subject: [AccessD] Google bar code In-Reply-To: <1593016290.1136791254938737267.JavaMail.root@sz0037a.emeryville.ca.mail.comcast.net> References: <4ACCD54E.30501@colbyconsulting.com> <1593016290.1136791254938737267.JavaMail.root@sz0037a.emeryville.ca.mail.comcast.net> Message-ID: Yep, actually, it's the day the first barcode was pantented. Drew -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of krosenstiel at comcast.net Sent: Wednesday, October 07, 2009 1:06 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Google bar code Just one of their commemorative logos -- run your mouse over it and it will tell you it is the day the bar code was invented. Click on it and get a bunch of URLs about bar codes. A couple of days ago they had a particularly nice one -- the birth anniversary of Mahatma Gandhi. http://www.google.com/logos/ Karen Rosenstiel Seattle WA USA ----- Original Message ----- From: "jwcolby" To: "Access Developers discussion and problem solving" Sent: Wednesday, October 7, 2009 10:52:14 AM GMT -08:00 US/Canada Pacific Subject: [AccessD] Google bar code Is it just me or am I being bar coded? Go to www.google.com and look for a big bar code. -- 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 max.wanadoo at gmail.com Wed Oct 7 15:15:48 2009 From: max.wanadoo at gmail.com (Max Wanadoo) Date: Wed, 7 Oct 2009 21:15:48 +0100 Subject: [AccessD] Select a node in a treeview In-Reply-To: References: <5B4138F9EC0B4D4A9729EECD82760BF1@HAL9005> <882519.60718.qm@web50401.mail.re2.yahoo.com> <4acbb60f.0702d00a.4dae.3934@mx.google.com> <4accd2b6.09cc660a.6eb2.0691@mx.google.com> Message-ID: <4accf707.0a1ad00a.42c0.3788@mx.google.com> Um, yes. But how do I get the key when all I know is the info from the recordset,ie I know what the top level record is and the middle level record and the bottom level record. EG. Dept, manager, employee. Do I have to traverse the tree looking for a match at each level, extracting and building the key as I go? Max -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Drew Wutka Sent: 07 October 2009 20:42 To: Access Developers discussion and problem solving Subject: Re: [AccessD] Select a node in a treeview Don't use full path, use 'key'. Drew -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Max Wanadoo Sent: Wednesday, October 07, 2009 12:41 PM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Select a node in a treeview Slowly making progress. I have now built the tree ok but when I try to position back on a node I get an error. This first bit is ok. Dim tvw As TreeView, nod As Node, strNod As String Set tvw = Me.TreeView1.Object Set nod = tvw.Nodes("Lv3:1") ' hard code the key nod.Selected = True ' select it as does this bit. strNod = nod.FullPath ' get the name (path) of the selected node. Debug.Print strNod ' works fine MsgBox strNod ' works fine 'the above works just fine but when I try to reverse it I get an error 35601Element not found Try to position on a key using the key's value Set nod = tvw.Nodes(strNod) nod.Selected = True ERROR I am looking for some way to get it to position on a key from the key's value. Any help appreciated. Max -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Drew Wutka Sent: 07 October 2009 15:52 To: Access Developers discussion and problem solving Subject: Re: [AccessD] Select a node in a treeview Treeview.Nodes("SomeKey") value is going to return a single node that matches the key. Also, in Access (Sorry, forgot this part), you need to use the treeview's object: Dim tvw As TreeView Set tvw = Me.tvwSkills.Object Drew /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. -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From DWUTKA at Marlow.com Wed Oct 7 15:44:54 2009 From: DWUTKA at Marlow.com (Drew Wutka) Date: Wed, 7 Oct 2009 15:44:54 -0500 Subject: [AccessD] Select a node in a treeview In-Reply-To: <4accf707.0a1ad00a.42c0.3788@mx.google.com> References: <5B4138F9EC0B4D4A9729EECD82760BF1@HAL9005> <882519.60718.qm@web50401.mail.re2.yahoo.com> <4acbb60f.0702d00a.4dae.3934@mx.google.com> <4accd2b6.09cc660a.6eb2.0691@mx.google.com> <4accf707.0a1ad00a.42c0.3788@mx.google.com> Message-ID: Hmmmm, I think you missed the point of my first post on this. The point was that you should design your key BASED on the data from the recordset. That way, when you are in the midst of a recordset, you can find the key (and if you are at a node, you can find the record in the recordset)..... Drew -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Max Wanadoo Sent: Wednesday, October 07, 2009 3:16 PM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Select a node in a treeview Um, yes. But how do I get the key when all I know is the info from the recordset,ie I know what the top level record is and the middle level record and the bottom level record. EG. Dept, manager, employee. Do I have to traverse the tree looking for a match at each level, extracting and building the key as I go? Max -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Drew Wutka Sent: 07 October 2009 20:42 To: Access Developers discussion and problem solving Subject: Re: [AccessD] Select a node in a treeview Don't use full path, use 'key'. Drew -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Max Wanadoo Sent: Wednesday, October 07, 2009 12:41 PM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Select a node in a treeview Slowly making progress. I have now built the tree ok but when I try to position back on a node I get an error. This first bit is ok. Dim tvw As TreeView, nod As Node, strNod As String Set tvw = Me.TreeView1.Object Set nod = tvw.Nodes("Lv3:1") ' hard code the key nod.Selected = True ' select it as does this bit. strNod = nod.FullPath ' get the name (path) of the selected node. Debug.Print strNod ' works fine MsgBox strNod ' works fine 'the above works just fine but when I try to reverse it I get an error 35601Element not found Try to position on a key using the key's value Set nod = tvw.Nodes(strNod) nod.Selected = True ERROR I am looking for some way to get it to position on a key from the key's value. Any help appreciated. Max -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Drew Wutka Sent: 07 October 2009 15:52 To: Access Developers discussion and problem solving Subject: Re: [AccessD] Select a node in a treeview Treeview.Nodes("SomeKey") value is going to return a single node that matches the key. Also, in Access (Sorry, forgot this part), you need to use the treeview's object: Dim tvw As TreeView Set tvw = Me.tvwSkills.Object Drew /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. -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/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 max.wanadoo at gmail.com Wed Oct 7 16:00:13 2009 From: max.wanadoo at gmail.com (Max Wanadoo) Date: Wed, 7 Oct 2009 22:00:13 +0100 Subject: [AccessD] Select a node in a treeview In-Reply-To: References: <5B4138F9EC0B4D4A9729EECD82760BF1@HAL9005> <882519.60718.qm@web50401.mail.re2.yahoo.com> <4acbb60f.0702d00a.4dae.3934@mx.google.com> <4accd2b6.09cc660a.6eb2.0691@mx.google.com> <4accf707.0a1ad00a.42c0.3788@mx.google.com> Message-ID: <4acd0172.0437560a.76e1.24ef@mx.google.com> Aha! Yes, got it. I was extracting the Titles that appeared on the treeview and then trying to backtrack from that. If I had of extracted the key, then I could have pulled the key components. Thanks Drew. Max -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Drew Wutka Sent: 07 October 2009 21:45 To: Access Developers discussion and problem solving Subject: Re: [AccessD] Select a node in a treeview Hmmmm, I think you missed the point of my first post on this. The point was that you should design your key BASED on the data from the recordset. That way, when you are in the midst of a recordset, you can find the key (and if you are at a node, you can find the record in the recordset)..... Drew -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Max Wanadoo Sent: Wednesday, October 07, 2009 3:16 PM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Select a node in a treeview Um, yes. But how do I get the key when all I know is the info from the recordset,ie I know what the top level record is and the middle level record and the bottom level record. EG. Dept, manager, employee. Do I have to traverse the tree looking for a match at each level, extracting and building the key as I go? Max -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Drew Wutka Sent: 07 October 2009 20:42 To: Access Developers discussion and problem solving Subject: Re: [AccessD] Select a node in a treeview Don't use full path, use 'key'. Drew -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Max Wanadoo Sent: Wednesday, October 07, 2009 12:41 PM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Select a node in a treeview Slowly making progress. I have now built the tree ok but when I try to position back on a node I get an error. This first bit is ok. Dim tvw As TreeView, nod As Node, strNod As String Set tvw = Me.TreeView1.Object Set nod = tvw.Nodes("Lv3:1") ' hard code the key nod.Selected = True ' select it as does this bit. strNod = nod.FullPath ' get the name (path) of the selected node. Debug.Print strNod ' works fine MsgBox strNod ' works fine 'the above works just fine but when I try to reverse it I get an error 35601Element not found Try to position on a key using the key's value Set nod = tvw.Nodes(strNod) nod.Selected = True ERROR I am looking for some way to get it to position on a key from the key's value. Any help appreciated. Max -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Drew Wutka Sent: 07 October 2009 15:52 To: Access Developers discussion and problem solving Subject: Re: [AccessD] Select a node in a treeview Treeview.Nodes("SomeKey") value is going to return a single node that matches the key. Also, in Access (Sorry, forgot this part), you need to use the treeview's object: Dim tvw As TreeView Set tvw = Me.tvwSkills.Object Drew /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. -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/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. -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From stuart at lexacorp.com.pg Wed Oct 7 16:43:06 2009 From: stuart at lexacorp.com.pg (Stuart McLachlan) Date: Thu, 08 Oct 2009 07:43:06 +1000 Subject: [AccessD] Google bar code In-Reply-To: <4ACCD54E.30501@colbyconsulting.com> References: <4ACCD54E.30501@colbyconsulting.com> Message-ID: <4ACD0B6A.18198.6AD81037@stuart.lexacorp.com.pg> Google occasionally change their logo on the page to recognise or commemorate various events. Today thet are celebrating the 57th anniversary of the first patent of the bar code. http://www.telegraph.co.uk/technology/google/6268827/Bar-code-invention-history-behind- new-Google-doodle.html -- Stuart On 7 Oct 2009 at 13:52, jwcolby wrote: > Is it just me or am I being bar coded? Go to www.google.com and look for a big bar code. > > -- > 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 marksimms at verizon.net Wed Oct 7 19:49:26 2009 From: marksimms at verizon.net (Mark Simms) Date: Wed, 07 Oct 2009 20:49:26 -0400 Subject: [AccessD] Invalid Password In-Reply-To: <4accb98c.0c135e0a.2110.ffff9cd1@mx.google.com> References: <3D6AC076D3C94876A3D4420CAAD929C8@HAL9005> <4acb7bbd.0a1ad00a.4da1.0aab@mx.google.com> <00cb01ca474d$c945d010$0501a8c0@MSIMMSWS> <4accb98c.0c135e0a.2110.ffff9cd1@mx.google.com> Message-ID: <000601ca47b1$3007ee10$0501a8c0@MSIMMSWS> You misunderstood. This tool is for the USERS and it prevents always making the sometimes slow copy from the network to their local drive. The copy is only made if the date/time stamps of the server version are newer than the local copy. > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Max Wanadoo > Sent: Wednesday, October 07, 2009 11:53 AM > To: 'Access Developers discussion and problem solving' > Subject: Re: [AccessD] Invalid Password > > Thanks Mark, but this doesn't do anything other than what I > am doing now. > > I sit at the dev copy. I click a button on my desktop. The > server version gets updated. What else would I want. > > Appreciate the thought though. > > Max > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Mark Simms > Sent: 07 October 2009 13:58 > To: 'Access Developers discussion and problem solving' > Subject: Re: [AccessD] Invalid Password > > Max - you're not using the AutoFEUpdate program written by > Tony Toews ? > http://www.autofeupdater.com/ > It's really a great tool, and only creates a new local copy > of the FE when the server version is newer. > Check it out. > > > > > Each time the users boots up the batch file goes and gets a > copy from > > the server and places it into their own PC area. > > There is also a shortcut icon on their desktop so that they > can bring > > over the latest version whenever they want. > > > > Worked for years now. 2/3 times a day you hear me shouting "Latest > > version on the sever if anybody is waiting for a fix" > - those interested come out of the FE and click on the "go > > fetch" icon and then click on the normal icon to enter the FE. > > > > Nobody every has to link anything. It is all done for them in the > > latest FE. > > > > Max > > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > From max.wanadoo at gmail.com Thu Oct 8 01:10:13 2009 From: max.wanadoo at gmail.com (Max Wanadoo) Date: Thu, 8 Oct 2009 07:10:13 +0100 Subject: [AccessD] Invalid Password In-Reply-To: <000601ca47b1$3007ee10$0501a8c0@MSIMMSWS> References: <3D6AC076D3C94876A3D4420CAAD929C8@HAL9005> <4acb7bbd.0a1ad00a.4da1.0aab@mx.google.com> <00cb01ca474d$c945d010$0501a8c0@MSIMMSWS> <4accb98c.0c135e0a.2110.ffff9cd1@mx.google.com> <000601ca47b1$3007ee10$0501a8c0@MSIMMSWS> Message-ID: <4acd825d.1c07d00a.7631.1978@mx.google.com> Yes, but Mark, if that was a problem I would merely test for the lastmodified flag using plain old params in the xcopy. But its not a problem. Everybody gets a fresh version at log on which takes, typically 15 seconds as part of the boot up - users don't even notice it. Horses for courses. This one is not for me, but thanks anyway. Max -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Mark Simms Sent: 08 October 2009 01:49 To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Invalid Password You misunderstood. This tool is for the USERS and it prevents always making the sometimes slow copy from the network to their local drive. The copy is only made if the date/time stamps of the server version are newer than the local copy. > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Max Wanadoo > Sent: Wednesday, October 07, 2009 11:53 AM > To: 'Access Developers discussion and problem solving' > Subject: Re: [AccessD] Invalid Password > > Thanks Mark, but this doesn't do anything other than what I > am doing now. > > I sit at the dev copy. I click a button on my desktop. The > server version gets updated. What else would I want. > > Appreciate the thought though. > > Max > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Mark Simms > Sent: 07 October 2009 13:58 > To: 'Access Developers discussion and problem solving' > Subject: Re: [AccessD] Invalid Password > > Max - you're not using the AutoFEUpdate program written by > Tony Toews ? > http://www.autofeupdater.com/ > It's really a great tool, and only creates a new local copy > of the FE when the server version is newer. > Check it out. > > > > > Each time the users boots up the batch file goes and gets a > copy from > > the server and places it into their own PC area. > > There is also a shortcut icon on their desktop so that they > can bring > > over the latest version whenever they want. > > > > Worked for years now. 2/3 times a day you hear me shouting "Latest > > version on the sever if anybody is waiting for a fix" > - those interested come out of the FE and click on the "go > > fetch" icon and then click on the normal icon to enter the FE. > > > > Nobody every has to link anything. It is all done for them in the > > latest FE. > > > > Max > > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/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 marksimms at verizon.net Thu Oct 8 08:22:37 2009 From: marksimms at verizon.net (Mark Simms) Date: Thu, 08 Oct 2009 09:22:37 -0400 Subject: [AccessD] Invalid Password In-Reply-To: <4acd825d.1c07d00a.7631.1978@mx.google.com> References: <3D6AC076D3C94876A3D4420CAAD929C8@HAL9005> <4acb7bbd.0a1ad00a.4da1.0aab@mx.google.com> <00cb01ca474d$c945d010$0501a8c0@MSIMMSWS> <4accb98c.0c135e0a.2110.ffff9cd1@mx.google.com> <000601ca47b1$3007ee10$0501a8c0@MSIMMSWS> <4acd825d.1c07d00a.7631.1978@mx.google.com> Message-ID: <007501ca481a$67cae460$0501a8c0@MSIMMSWS> 15 seconds delay ? Unacceptable for my demanding users. You're lucky ! > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Max Wanadoo > Sent: Thursday, October 08, 2009 2:10 AM > To: 'Access Developers discussion and problem solving' > Subject: Re: [AccessD] Invalid Password > > Yes, but Mark, if that was a problem I would merely test for > the lastmodified flag using plain old params in the xcopy. > But its not a problem. Everybody gets a fresh version at > log on which takes, typically > 15 seconds as part of the boot up - users don't even notice it. > > Horses for courses. This one is not for me, but thanks anyway. > > Max > > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Mark Simms > Sent: 08 October 2009 01:49 > To: 'Access Developers discussion and problem solving' > Subject: Re: [AccessD] Invalid Password > > You misunderstood. This tool is for the USERS and it prevents > always making the sometimes slow copy from the network to > their local drive. The copy is only made if the date/time > stamps of the server version are newer than the local copy. > > > -----Original Message----- > > From: accessd-bounces at databaseadvisors.com > > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of > Max Wanadoo > > Sent: Wednesday, October 07, 2009 11:53 AM > > To: 'Access Developers discussion and problem solving' > > Subject: Re: [AccessD] Invalid Password > > > > Thanks Mark, but this doesn't do anything other than what I > am doing > > now. > > > > I sit at the dev copy. I click a button on my desktop. The server > > version gets updated. What else would I want. > > > > Appreciate the thought though. > > > > Max > > > > -----Original Message----- > > From: accessd-bounces at databaseadvisors.com > > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of > Mark Simms > > Sent: 07 October 2009 13:58 > > To: 'Access Developers discussion and problem solving' > > Subject: Re: [AccessD] Invalid Password > > > > Max - you're not using the AutoFEUpdate program written by > Tony Toews > > ? > > http://www.autofeupdater.com/ > > It's really a great tool, and only creates a new local copy > of the FE > > when the server version is newer. > > Check it out. > > > > > > > > Each time the users boots up the batch file goes and gets a > > copy from > > > the server and places it into their own PC area. > > > There is also a shortcut icon on their desktop so that they > > can bring > > > over the latest version whenever they want. > > > > > > Worked for years now. 2/3 times a day you hear me > shouting "Latest > > > version on the sever if anybody is waiting for a fix" > > - those interested come out of the FE and click on the "go > fetch" > > icon and then click on the normal icon to enter the FE. > > > > > > Nobody every has to link anything. It is all done for > them in the > > > latest FE. > > > > > > Max > > > > > > > > -- > > AccessD mailing list > > AccessD at databaseadvisors.com > > http://databaseadvisors.com/mailman/listinfo/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 max.wanadoo at gmail.com Thu Oct 8 08:28:01 2009 From: max.wanadoo at gmail.com (Max Wanadoo) Date: Thu, 8 Oct 2009 14:28:01 +0100 Subject: [AccessD] Invalid Password In-Reply-To: <007501ca481a$67cae460$0501a8c0@MSIMMSWS> References: <3D6AC076D3C94876A3D4420CAAD929C8@HAL9005> <4acb7bbd.0a1ad00a.4da1.0aab@mx.google.com> <00cb01ca474d$c945d010$0501a8c0@MSIMMSWS> <4accb98c.0c135e0a.2110.ffff9cd1@mx.google.com> <000601ca47b1$3007ee10$0501a8c0@MSIMMSWS> <4acd825d.1c07d00a.7631.1978@mx.google.com> <007501ca481a$67cae460$0501a8c0@MSIMMSWS> Message-ID: <4acde8f6.0405560a.3b43.6068@mx.google.com> 1. train them! 2. It takes at least 5 minutes for them to get their coffee, check their mobiles for text messages, put lipstick on, have a wee, have a poo-doo and everything else they do in the morning before they even contemplate work...15 seconds - I could take 15 minutes and nobody would bat an eye. Max -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Mark Simms Sent: 08 October 2009 14:23 To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Invalid Password 15 seconds delay ? Unacceptable for my demanding users. You're lucky ! > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Max Wanadoo > Sent: Thursday, October 08, 2009 2:10 AM > To: 'Access Developers discussion and problem solving' > Subject: Re: [AccessD] Invalid Password > > Yes, but Mark, if that was a problem I would merely test for > the lastmodified flag using plain old params in the xcopy. > But its not a problem. Everybody gets a fresh version at > log on which takes, typically > 15 seconds as part of the boot up - users don't even notice it. > > Horses for courses. This one is not for me, but thanks anyway. > > Max > > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Mark Simms > Sent: 08 October 2009 01:49 > To: 'Access Developers discussion and problem solving' > Subject: Re: [AccessD] Invalid Password > > You misunderstood. This tool is for the USERS and it prevents > always making the sometimes slow copy from the network to > their local drive. The copy is only made if the date/time > stamps of the server version are newer than the local copy. > > > -----Original Message----- > > From: accessd-bounces at databaseadvisors.com > > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of > Max Wanadoo > > Sent: Wednesday, October 07, 2009 11:53 AM > > To: 'Access Developers discussion and problem solving' > > Subject: Re: [AccessD] Invalid Password > > > > Thanks Mark, but this doesn't do anything other than what I > am doing > > now. > > > > I sit at the dev copy. I click a button on my desktop. The server > > version gets updated. What else would I want. > > > > Appreciate the thought though. > > > > Max > > > > -----Original Message----- > > From: accessd-bounces at databaseadvisors.com > > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of > Mark Simms > > Sent: 07 October 2009 13:58 > > To: 'Access Developers discussion and problem solving' > > Subject: Re: [AccessD] Invalid Password > > > > Max - you're not using the AutoFEUpdate program written by > Tony Toews > > ? > > http://www.autofeupdater.com/ > > It's really a great tool, and only creates a new local copy > of the FE > > when the server version is newer. > > Check it out. > > > > > > > > Each time the users boots up the batch file goes and gets a > > copy from > > > the server and places it into their own PC area. > > > There is also a shortcut icon on their desktop so that they > > can bring > > > over the latest version whenever they want. > > > > > > Worked for years now. 2/3 times a day you hear me > shouting "Latest > > > version on the sever if anybody is waiting for a fix" > > - those interested come out of the FE and click on the "go > fetch" > > icon and then click on the normal icon to enter the FE. > > > > > > Nobody every has to link anything. It is all done for > them in the > > > latest FE. > > > > > > Max > > > > > > > > -- > > AccessD mailing list > > AccessD at databaseadvisors.com > > http://databaseadvisors.com/mailman/listinfo/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 jwcolby at colbyconsulting.com Thu Oct 8 09:13:12 2009 From: jwcolby at colbyconsulting.com (jwcolby) Date: Thu, 08 Oct 2009 10:13:12 -0400 Subject: [AccessD] Invalid Password In-Reply-To: <4acde8f6.0405560a.3b43.6068@mx.google.com> References: <3D6AC076D3C94876A3D4420CAAD929C8@HAL9005> <4acb7bbd.0a1ad00a.4da1.0aab@mx.google.com> <00cb01ca474d$c945d010$0501a8c0@MSIMMSWS> <4accb98c.0c135e0a.2110.ffff9cd1@mx.google.com> <000601ca47b1$3007ee10$0501a8c0@MSIMMSWS> <4acd825d.1c07d00a.7631.1978@mx.google.com> <007501ca481a$67cae460$0501a8c0@MSIMMSWS> <4acde8f6.0405560a.3b43.6068@mx.google.com> Message-ID: <4ACDF378.30009@colbyconsulting.com> I'm with ya on this one. The time to download a FE is minuscule. If it isn't, then deal with it but in general it is minuscule. John W. Colby www.ColbyConsulting.com Max Wanadoo wrote: > 1. train them! > 2. It takes at least 5 minutes for them to get their coffee, check their > mobiles for text messages, put lipstick on, have a wee, have a poo-doo > and everything else they do in the morning before they even contemplate > work...15 seconds - I could take 15 minutes and nobody would bat an eye. > > > Max > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Mark Simms > Sent: 08 October 2009 14:23 > To: 'Access Developers discussion and problem solving' > Subject: Re: [AccessD] Invalid Password > > 15 seconds delay ? > Unacceptable for my demanding users. > You're lucky ! > >> -----Original Message----- >> From: accessd-bounces at databaseadvisors.com >> [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Max Wanadoo >> Sent: Thursday, October 08, 2009 2:10 AM >> To: 'Access Developers discussion and problem solving' >> Subject: Re: [AccessD] Invalid Password >> >> Yes, but Mark, if that was a problem I would merely test for >> the lastmodified flag using plain old params in the xcopy. >> But its not a problem. Everybody gets a fresh version at >> log on which takes, typically >> 15 seconds as part of the boot up - users don't even notice it. >> >> Horses for courses. This one is not for me, but thanks anyway. >> >> Max >> >> >> -----Original Message----- >> From: accessd-bounces at databaseadvisors.com >> [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Mark Simms >> Sent: 08 October 2009 01:49 >> To: 'Access Developers discussion and problem solving' >> Subject: Re: [AccessD] Invalid Password >> >> You misunderstood. This tool is for the USERS and it prevents >> always making the sometimes slow copy from the network to >> their local drive. The copy is only made if the date/time >> stamps of the server version are newer than the local copy. >> >>> -----Original Message----- >>> From: accessd-bounces at databaseadvisors.com >>> [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of >> Max Wanadoo >>> Sent: Wednesday, October 07, 2009 11:53 AM >>> To: 'Access Developers discussion and problem solving' >>> Subject: Re: [AccessD] Invalid Password >>> >>> Thanks Mark, but this doesn't do anything other than what I >> am doing >>> now. >>> >>> I sit at the dev copy. I click a button on my desktop. The server >>> version gets updated. What else would I want. >>> >>> Appreciate the thought though. >>> >>> Max >>> >>> -----Original Message----- >>> From: accessd-bounces at databaseadvisors.com >>> [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of >> Mark Simms >>> Sent: 07 October 2009 13:58 >>> To: 'Access Developers discussion and problem solving' >>> Subject: Re: [AccessD] Invalid Password >>> >>> Max - you're not using the AutoFEUpdate program written by >> Tony Toews >>> ? >>> http://www.autofeupdater.com/ >>> It's really a great tool, and only creates a new local copy >> of the FE >>> when the server version is newer. >>> Check it out. >>> >>>> Each time the users boots up the batch file goes and gets a >>> copy from >>>> the server and places it into their own PC area. >>>> There is also a shortcut icon on their desktop so that they >>> can bring >>>> over the latest version whenever they want. >>>> >>>> Worked for years now. 2/3 times a day you hear me >> shouting "Latest >>>> version on the sever if anybody is waiting for a fix" >>> - those interested come out of the FE and click on the "go > fetch" >>> icon and then click on the normal icon to enter the FE. >>>> Nobody every has to link anything. It is all done for >> them in the >>>> latest FE. >>>> >>>> Max >>> >>> >>> -- >>> AccessD mailing list >>> AccessD at databaseadvisors.com >>> http://databaseadvisors.com/mailman/listinfo/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 cfoust at infostatsystems.com Thu Oct 8 10:30:36 2009 From: cfoust at infostatsystems.com (Charlotte Foust) Date: Thu, 8 Oct 2009 08:30:36 -0700 Subject: [AccessD] Invalid Password In-Reply-To: <4acde8f6.0405560a.3b43.6068@mx.google.com> References: <3D6AC076D3C94876A3D4420CAAD929C8@HAL9005> <4acb7bbd.0a1ad00a.4da1.0aab@mx.google.com> <00cb01ca474d$c945d010$0501a8c0@MSIMMSWS> <4accb98c.0c135e0a.2110.ffff9cd1@mx.google.com> <000601ca47b1$3007ee10$0501a8c0@MSIMMSWS> <4acd825d.1c07d00a.7631.1978@mx.google.com><007501ca481a$67cae460$0501a8c0@MSIMMSWS> <4acde8f6.0405560a.3b43.6068@mx.google.com> Message-ID: Then consider yourself extremely lucky. Out users start clicking and complaining after a couple of seconds. Training them when "them" are clients all over the world isn't an option. Charlotte Foust -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Max Wanadoo Sent: Thursday, October 08, 2009 6:28 AM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Invalid Password 1. train them! 2. It takes at least 5 minutes for them to get their coffee, check their mobiles for text messages, put lipstick on, have a wee, have a poo-doo and everything else they do in the morning before they even contemplate work...15 seconds - I could take 15 minutes and nobody would bat an eye. Max -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Mark Simms Sent: 08 October 2009 14:23 To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Invalid Password 15 seconds delay ? Unacceptable for my demanding users. You're lucky ! From stuart at lexacorp.com.pg Thu Oct 8 10:45:04 2009 From: stuart at lexacorp.com.pg (Stuart McLachlan) Date: Fri, 09 Oct 2009 01:45:04 +1000 Subject: [AccessD] Invalid Password In-Reply-To: References: , <4acde8f6.0405560a.3b43.6068@mx.google.com>, Message-ID: <4ACE0900.26877.6EB6A52A@stuart.lexacorp.com.pg> Max did say "15 seconds as part of the boot up". Not at program start! Users won't really notice a few more seconds when they fire up their PC. -- Stuart On 8 Oct 2009 at 8:30, Charlotte Foust wrote: > Then consider yourself extremely lucky. Out users start clicking and > complaining after a couple of seconds. Training them when "them" are > clients all over the world isn't an option. > > Charlotte Foust > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Max Wanadoo > Sent: Thursday, October 08, 2009 6:28 AM > To: 'Access Developers discussion and problem solving' > Subject: Re: [AccessD] Invalid Password > > 1. train them! > 2. It takes at least 5 minutes for them to get their coffee, check their > mobiles for text messages, put lipstick on, have a wee, have a > poo-doo and everything else they do in the morning before they even > contemplate > work...15 seconds - I could take 15 minutes and nobody would bat an eye. > > > Max > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Mark Simms > Sent: 08 October 2009 14:23 > To: 'Access Developers discussion and problem solving' > Subject: Re: [AccessD] Invalid Password > > 15 seconds delay ? > Unacceptable for my demanding users. > You're lucky ! > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com Stuart McLachlan From max.wanadoo at gmail.com Thu Oct 8 10:54:20 2009 From: max.wanadoo at gmail.com (Max Wanadoo) Date: Thu, 8 Oct 2009 16:54:20 +0100 Subject: [AccessD] Invalid Password In-Reply-To: References: <3D6AC076D3C94876A3D4420CAAD929C8@HAL9005> <4acb7bbd.0a1ad00a.4da1.0aab@mx.google.com> <00cb01ca474d$c945d010$0501a8c0@MSIMMSWS> <4accb98c.0c135e0a.2110.ffff9cd1@mx.google.com> <000601ca47b1$3007ee10$0501a8c0@MSIMMSWS> <4acd825d.1c07d00a.7631.1978@mx.google.com><007501ca481a$67cae460$0501a8c0@MSIMMSWS> <4acde8f6.0405560a.3b43.6068@mx.google.com> Message-ID: <4ace0b42.0e0f660a.197a.19f1@mx.google.com> Well, Charlotte, considering that it takes a good few minutes to boot the PC how would they even know what the boot-up process is doing. There is all sorts of stuff being loaded "under the hood", most of which few of us even know abut. My app is just part of this. Without my app on their desktop they would be lost. We are totally IT bound these days and if the app went down, they would be left with email and discussions on last night's TV. They have to wait and that is the end of it, regardless of where they are or who they are. My app has loaded before the other stuff even hits their eyes (Outlook, IE, etc). It is all part and parcel of "preparing their pc for their day's work" It is not optional and is also very essential. The only time they may be aware of it is if they have to bring over a version during the daytime and then, hey they have to wait 10-15 seconds. It takes longer than that to load Outlook and even longer to load IE/Firefox etc. Anyway, ymmv as we have often said. Max -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Charlotte Foust Sent: 08 October 2009 16:31 To: Access Developers discussion and problem solving Subject: Re: [AccessD] Invalid Password Then consider yourself extremely lucky. Out users start clicking and complaining after a couple of seconds. Training them when "them" are clients all over the world isn't an option. Charlotte Foust -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Max Wanadoo Sent: Thursday, October 08, 2009 6:28 AM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Invalid Password 1. train them! 2. It takes at least 5 minutes for them to get their coffee, check their mobiles for text messages, put lipstick on, have a wee, have a poo-doo and everything else they do in the morning before they even contemplate work...15 seconds - I could take 15 minutes and nobody would bat an eye. Max -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Mark Simms Sent: 08 October 2009 14:23 To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Invalid Password 15 seconds delay ? Unacceptable for my demanding users. You're lucky ! -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From jwcolby at colbyconsulting.com Thu Oct 8 12:08:24 2009 From: jwcolby at colbyconsulting.com (jwcolby) Date: Thu, 08 Oct 2009 13:08:24 -0400 Subject: [AccessD] Decompile Message-ID: <4ACE1C88.8040604@colbyconsulting.com> I received a question on decompile and just thought I'd forward the question and my response. My take on the question was "when access opens a database" rather than "do you specifically do this for us every time". Jump in if I missed or am off on anything. > Also - please remind me, but every time you open a db, you are running the compile/decompile routine - correct? No. In fact you have to have a special decompile switch in the hot link to tell Access to decompile the databases opened by that instance of Access. Once you have that you have to specifically open Access using that link in order to decompile the database. AFAICT that open instance will decompile every database it opens until you close that instance and open Access without the /Decompile switch. I usually set up a decompile link on my desktop, then drag and drop it to my quick launch toolbar. Do you have one or do you want me to help you set one up? This really only applies to a database with visual basic code in it, because that is what /decompile affects. /Decompile does not affect macros, queries, or tables. It affects forms, reports and modules. Once decompiled, the database needs to be compiled again or it will run slower as the user executes decompiled source code. Just a FYI, the English language Visual Basic "source code" statements in modules are compiled into what is known as P-Code. http://en.wikipedia.org/wiki/P-Code P-Code is an intermediate step between the English language VB and the actual machine instructions (AKA Machine Code) that the CPU can execute. So Access "compiles" the VB into P-Code and then an interpreter "interprets" the P-Code to turn it into machine code. Access has special buffers where it permanently stores the P-Code. When you /Decompile the database, those buffers are "flushed" or emptied out. If you specifically "Compile" the code, every single piece of the VB source code in every module, report and form is "compiled" to P-Code and stored in these buffers. If you do NOT specifically "compile" the VB source code, then the source is "compiled" the first time it is executed. So for example, when a form opens it would need to be "compiled" and the P-Code stored in the buffer before the form can open. After it is opened that first time, the P-Code is already there in the buffer and it is never "compiled" again. If code in a form calls code in a module, then ALL of the code in that module must be compiled (not just the specific function called by the form) because Access loads an entire module into memory, not just the called functions. If you do not specifically compile the entire database (Debug / compile) this compilation process takes a certain amount of time and can slow down the "first time" opening of a form or report. On modern (fast) computers it is certainly not a huge amount of time but it is there none the less. Just as a point of interest (and nothing we can do about it) an Interpreter does exactly that, it "interprets" the P-Code each and every time a line of code is executed. A true compiler takes the P-Code and turns it directly into Machine Code such that it never has to be interpreted again (until the source changes). Access (and the .Net languages as well BTW) uses a P-Code Interpreter, not a true compiler so a "Compiler" compiles (one time) the source code into P-Code, and then an Interpreter interprets the P-Code every time it sees the code. Each time a line of source code is executed, the P-Code interpreter is busily interpreting P-Code for us. Now it can happen that the P-Code in the buffers get corrupted somehow. The "somehow" is very nebulous, none of us know how, but it can happen. So the /Decompile tells Access "throw out the P-Code". It does NOT tell Access to recompile the code. Not sure why that is but it doesn't. Thus if you /decompile, you should manually recompile. Strictly speaking you so not have to, it just makes things speedier for the user. So there ya go, more than you ever wanted to know about Decompile. -- John W. Colby www.ColbyConsulting.com From max.wanadoo at gmail.com Thu Oct 8 13:16:38 2009 From: max.wanadoo at gmail.com (Max Wanadoo) Date: Thu, 8 Oct 2009 19:16:38 +0100 Subject: [AccessD] Decompile In-Reply-To: <4ACE1C88.8040604@colbyconsulting.com> References: <4ACE1C88.8040604@colbyconsulting.com> Message-ID: <4ace2c9c.0af6660a.2252.0537@mx.google.com> Very good John. Max -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: 08 October 2009 18:08 To: Access Developers discussion and problem solving Subject: [AccessD] Decompile I received a question on decompile and just thought I'd forward the question and my response. My take on the question was "when access opens a database" rather than "do you specifically do this for us every time". Jump in if I missed or am off on anything. > Also - please remind me, but every time you open a db, you are running the compile/decompile routine - correct? No. In fact you have to have a special decompile switch in the hot link to tell Access to decompile the databases opened by that instance of Access. Once you have that you have to specifically open Access using that link in order to decompile the database. AFAICT that open instance will decompile every database it opens until you close that instance and open Access without the /Decompile switch. I usually set up a decompile link on my desktop, then drag and drop it to my quick launch toolbar. Do you have one or do you want me to help you set one up? This really only applies to a database with visual basic code in it, because that is what /decompile affects. /Decompile does not affect macros, queries, or tables. It affects forms, reports and modules. Once decompiled, the database needs to be compiled again or it will run slower as the user executes decompiled source code. Just a FYI, the English language Visual Basic "source code" statements in modules are compiled into what is known as P-Code. http://en.wikipedia.org/wiki/P-Code P-Code is an intermediate step between the English language VB and the actual machine instructions (AKA Machine Code) that the CPU can execute. So Access "compiles" the VB into P-Code and then an interpreter "interprets" the P-Code to turn it into machine code. Access has special buffers where it permanently stores the P-Code. When you /Decompile the database, those buffers are "flushed" or emptied out. If you specifically "Compile" the code, every single piece of the VB source code in every module, report and form is "compiled" to P-Code and stored in these buffers. If you do NOT specifically "compile" the VB source code, then the source is "compiled" the first time it is executed. So for example, when a form opens it would need to be "compiled" and the P-Code stored in the buffer before the form can open. After it is opened that first time, the P-Code is already there in the buffer and it is never "compiled" again. If code in a form calls code in a module, then ALL of the code in that module must be compiled (not just the specific function called by the form) because Access loads an entire module into memory, not just the called functions. If you do not specifically compile the entire database (Debug / compile) this compilation process takes a certain amount of time and can slow down the "first time" opening of a form or report. On modern (fast) computers it is certainly not a huge amount of time but it is there none the less. Just as a point of interest (and nothing we can do about it) an Interpreter does exactly that, it "interprets" the P-Code each and every time a line of code is executed. A true compiler takes the P-Code and turns it directly into Machine Code such that it never has to be interpreted again (until the source changes). Access (and the .Net languages as well BTW) uses a P-Code Interpreter, not a true compiler so a "Compiler" compiles (one time) the source code into P-Code, and then an Interpreter interprets the P-Code every time it sees the code. Each time a line of source code is executed, the P-Code interpreter is busily interpreting P-Code for us. Now it can happen that the P-Code in the buffers get corrupted somehow. The "somehow" is very nebulous, none of us know how, but it can happen. So the /Decompile tells Access "throw out the P-Code". It does NOT tell Access to recompile the code. Not sure why that is but it doesn't. Thus if you /decompile, you should manually recompile. Strictly speaking you so not have to, it just makes things speedier for the user. So there ya go, more than you ever wanted to know about Decompile. -- 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 Thu Oct 8 14:53:30 2009 From: jwcolby at colbyconsulting.com (jwcolby) Date: Thu, 08 Oct 2009 15:53:30 -0400 Subject: [AccessD] SPAM-LOW: Re: Invalid Password In-Reply-To: <4ace0b42.0e0f660a.197a.19f1@mx.google.com> References: <3D6AC076D3C94876A3D4420CAAD929C8@HAL9005> <4acb7bbd.0a1ad00a.4da1.0aab@mx.google.com> <00cb01ca474d$c945d010$0501a8c0@MSIMMSWS> <4accb98c.0c135e0a.2110.ffff9cd1@mx.google.com> <000601ca47b1$3007ee10$0501a8c0@MSIMMSWS> <4acd825d.1c07d00a.7631.1978@mx.google.com><007501ca481a$67cae460$0501a8c0@MSIMMSWS> <4acde8f6.0405560a.3b43.6068@mx.google.com> <4ace0b42.0e0f660a.197a.19f1@mx.google.com> Message-ID: <4ACE433A.6020801@colbyconsulting.com> Again, I quite agree. This isn't generally something they are doing every five minutes. I have little sympathy if a user cannot wait 10-15 seconds for an app to open. That is certainly in line with every other app out there and is much more critical than 90% of the apps they running. I have even less sympathy when the wait is because the company decides that old PCs purchased off of EBAY are a good way to save money (yes, I have encountered this). John W. Colby www.ColbyConsulting.com Max Wanadoo wrote: > Well, Charlotte, considering that it takes a good few minutes to boot the PC > how would they even know what the boot-up process is doing. There is all > sorts of stuff being loaded "under the hood", most of which few of us even > know abut. My app is just part of this. > > > Without my app on their desktop they would be lost. We are totally IT bound > these days and if the app went down, they would be left with email and > discussions on last night's TV. > > They have to wait and that is the end of it, regardless of where they are > or who they are. > > My app has loaded before the other stuff even hits their eyes (Outlook, IE, > etc). > > It is all part and parcel of "preparing their pc for their day's work" It > is not optional and is also very essential. The only time they may be > aware of it is if they have to bring over a version during the daytime and > then, hey they have to wait 10-15 seconds. It takes longer than that to > load Outlook and even longer to load IE/Firefox etc. > > Anyway, ymmv as we have often said. > > > Max From jwcolby at colbyconsulting.com Thu Oct 8 14:54:06 2009 From: jwcolby at colbyconsulting.com (jwcolby) Date: Thu, 08 Oct 2009 15:54:06 -0400 Subject: [AccessD] SPAM-LOW: Re: Invalid Password In-Reply-To: <4ace0b42.0e0f660a.197a.19f1@mx.google.com> References: <3D6AC076D3C94876A3D4420CAAD929C8@HAL9005> <4acb7bbd.0a1ad00a.4da1.0aab@mx.google.com> <00cb01ca474d$c945d010$0501a8c0@MSIMMSWS> <4accb98c.0c135e0a.2110.ffff9cd1@mx.google.com> <000601ca47b1$3007ee10$0501a8c0@MSIMMSWS> <4acd825d.1c07d00a.7631.1978@mx.google.com><007501ca481a$67cae460$0501a8c0@MSIMMSWS> <4acde8f6.0405560a.3b43.6068@mx.google.com> <4ace0b42.0e0f660a.197a.19f1@mx.google.com> Message-ID: <4ACE435E.1000906@colbyconsulting.com> Again, I quite agree. This isn't generally something they are doing every five minutes. I have little sympathy if a user cannot wait 10-15 seconds for an app to open. That is certainly in line with every other app out there and my db is much more critical than 90% of the apps they are running. I have even less sympathy when the wait is because the company decides that old PCs purchased off of EBAY are a good way to save money (yes, I have encountered this). John W. Colby www.ColbyConsulting.com Max Wanadoo wrote: > Well, Charlotte, considering that it takes a good few minutes to boot the PC > how would they even know what the boot-up process is doing. There is all > sorts of stuff being loaded "under the hood", most of which few of us even > know abut. My app is just part of this. > > > Without my app on their desktop they would be lost. We are totally IT bound > these days and if the app went down, they would be left with email and > discussions on last night's TV. > > They have to wait and that is the end of it, regardless of where they are > or who they are. > > My app has loaded before the other stuff even hits their eyes (Outlook, IE, > etc). > > It is all part and parcel of "preparing their pc for their day's work" It > is not optional and is also very essential. The only time they may be > aware of it is if they have to bring over a version during the daytime and > then, hey they have to wait 10-15 seconds. It takes longer than that to > load Outlook and even longer to load IE/Firefox etc. > > Anyway, ymmv as we have often said. > > > Max From rockysmolin at bchacc.com Thu Oct 8 15:42:47 2009 From: rockysmolin at bchacc.com (Rocky Smolin) Date: Thu, 8 Oct 2009 13:42:47 -0700 Subject: [AccessD] It's About Time I Learned This Message-ID: <52AA4977E0DA4908A62767C6E15FD7B6@HAL9005> Dear List: When I have a query that is the source of a form, report or recordset that needs to have criteria of parameters, I always go to the SQL view of the query, copy out the code, paste it into the CBF, and add the parameters there - values from a text box or combo box, etc. Always done it that way. But I think there's a way to do modify a stored query in code using the querydef. Pretty basic Access stuff, I think, but I've never learned it. Can someone point me to a tutorial or primer or help screen explaining this? MTIA Rocky Smolin Beach Access Software 858-259-4334 www.e-z-mrp.com www.bchacc.com From DWUTKA at Marlow.com Thu Oct 8 15:46:02 2009 From: DWUTKA at Marlow.com (Drew Wutka) Date: Thu, 8 Oct 2009 15:46:02 -0500 Subject: [AccessD] SPAM-LOW: Re: Invalid Password In-Reply-To: <4ACE435E.1000906@colbyconsulting.com> References: <3D6AC076D3C94876A3D4420CAAD929C8@HAL9005> <4acb7bbd.0a1ad00a.4da1.0aab@mx.google.com> <00cb01ca474d$c945d010$0501a8c0@MSIMMSWS> <4accb98c.0c135e0a.2110.ffff9cd1@mx.google.com> <000601ca47b1$3007ee10$0501a8c0@MSIMMSWS> <4acd825d.1c07d00a.7631.1978@mx.google.com><007501ca481a$67cae460$0501a8c0@MSIMMSWS> <4acde8f6.0405560a.3b43.6068@mx.google.com> <4ace0b42.0e0f660a.197a.19f1@mx.google.com> <4ACE435E.1000906@colbyconsulting.com> Message-ID: LOL... I've been able to sneak in a few PC purchases with SATA RAID's (0 +1 configs)....those users are going to be VERY happy with how those machines perform! Drew -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Thursday, October 08, 2009 2:54 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] SPAM-LOW: Re: Invalid Password Again, I quite agree. This isn't generally something they are doing every five minutes. I have little sympathy if a user cannot wait 10-15 seconds for an app to open. That is certainly in line with every other app out there and my db is much more critical than 90% of the apps they are running. I have even less sympathy when the wait is because the company decides that old PCs purchased off of EBAY are a good way to save money (yes, I have encountered this). John W. Colby www.ColbyConsulting.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 cfoust at infostatsystems.com Thu Oct 8 15:56:15 2009 From: cfoust at infostatsystems.com (Charlotte Foust) Date: Thu, 8 Oct 2009 13:56:15 -0700 Subject: [AccessD] It's About Time I Learned This In-Reply-To: <52AA4977E0DA4908A62767C6E15FD7B6@HAL9005> References: <52AA4977E0DA4908A62767C6E15FD7B6@HAL9005> Message-ID: Are you talking about modifying the SQL property of the querydef in code? Charlotte Foust -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Rocky Smolin Sent: Thursday, October 08, 2009 1:43 PM To: 'Access Developers discussion and problem solving' Subject: [AccessD] It's About Time I Learned This Dear List: When I have a query that is the source of a form, report or recordset that needs to have criteria of parameters, I always go to the SQL view of the query, copy out the code, paste it into the CBF, and add the parameters there - values from a text box or combo box, etc. Always done it that way. But I think there's a way to do modify a stored query in code using the querydef. Pretty basic Access stuff, I think, but I've never learned it. Can someone point me to a tutorial or primer or help screen explaining this? MTIA Rocky Smolin Beach Access Software 858-259-4334 www.e-z-mrp.com www.bchacc.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 Oct 8 16:17:34 2009 From: rockysmolin at bchacc.com (Rocky Smolin) Date: Thu, 8 Oct 2009 14:17:34 -0700 Subject: [AccessD] It's About Time I Learned This In-Reply-To: References: <52AA4977E0DA4908A62767C6E15FD7B6@HAL9005> Message-ID: I think so. Suppose I have a report based no a fairly complex query. In the form which calls the report I have a customer ID, a reporting quarter, a reporting year, and a class of merchandise - all selectable by the user depending on what they want the contents of the report to be. So in the query I would have four criteria. Normally I would go to the SQL view of the query, paste that into the report's Open event as the Me.RecordSource, and modify it adding WHERE clauses or, in the case of a summation query HAVING clauses to get the filtered recordset the user wants on the report. But isn't there a way to modify that stored query in code adding those criteria and using the modified query as the record source of the report? R -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Charlotte Foust Sent: Thursday, October 08, 2009 1:56 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] It's About Time I Learned This Are you talking about modifying the SQL property of the querydef in code? Charlotte Foust -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Rocky Smolin Sent: Thursday, October 08, 2009 1:43 PM To: 'Access Developers discussion and problem solving' Subject: [AccessD] It's About Time I Learned This Dear List: When I have a query that is the source of a form, report or recordset that needs to have criteria of parameters, I always go to the SQL view of the query, copy out the code, paste it into the CBF, and add the parameters there - values from a text box or combo box, etc. Always done it that way. But I think there's a way to do modify a stored query in code using the querydef. Pretty basic Access stuff, I think, but I've never learned it. Can someone point me to a tutorial or primer or help screen explaining this? MTIA Rocky Smolin Beach Access Software 858-259-4334 www.e-z-mrp.com www.bchacc.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From stuart at lexacorp.com.pg Thu Oct 8 16:17:35 2009 From: stuart at lexacorp.com.pg (Stuart McLachlan) Date: Fri, 09 Oct 2009 07:17:35 +1000 Subject: [AccessD] It's About Time I Learned This In-Reply-To: <52AA4977E0DA4908A62767C6E15FD7B6@HAL9005> References: <52AA4977E0DA4908A62767C6E15FD7B6@HAL9005> Message-ID: <4ACE56EF.17402.6FE70FB5@stuart.lexacorp.com.pg> This was covered in the thread "Access 2000 - Filtering SQL Server records" on 17 Sep 2009. We were actaully talking about editing "pass through" queries, but the prinicple is the same. Here's what I posted then. To pass a parameter, you need to modify the querydef, so you need to do something like this before opening the query: Public Sub SetChequePKID(PKID As Long) Dim strSQL As String Dim qdf as DAO.QueryDef Dim rs as DAO.Recordset strSQL = "Select Cast(chequenum as int) from tblCheques where PKID" & PKID Set qdf = CurrentDb.QueryDefs("qryGetCheckNumber") qdf.SQL = strSQL qdf.Close End Sub On 8 Oct 2009 at 13:42, Rocky Smolin wrote: > Dear List: > > When I have a query that is the source of a form, report or recordset that > needs to have criteria of parameters, I always go to the SQL view of the > query, copy out the code, paste it into the CBF, and add the parameters > there - values from a text box or combo box, etc. Always done it that way. > > But I think there's a way to do modify a stored query in code using the > querydef. Pretty basic Access stuff, I think, but I've never learned it. > Can someone point me to a tutorial or primer or help screen explaining this? > > MTIA > > Rocky Smolin > Beach Access Software > 858-259-4334 > www.e-z-mrp.com > www.bchacc.com > > > > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com Stuart McLachlan From rockysmolin at bchacc.com Thu Oct 8 21:17:58 2009 From: rockysmolin at bchacc.com (Rocky Smolin) Date: Thu, 8 Oct 2009 19:17:58 -0700 Subject: [AccessD] It's About Time I Learned This In-Reply-To: <4ACE56EF.17402.6FE70FB5@stuart.lexacorp.com.pg> References: <52AA4977E0DA4908A62767C6E15FD7B6@HAL9005> <4ACE56EF.17402.6FE70FB5@stuart.lexacorp.com.pg> Message-ID: <0671643C86084A09972D5DCA0A71B047@HAL9005> Stuart: I'm not sure that buys me anything because you've got the SQL in the code and you're updating the stored query with that code, modified with the desired parameter. What I've got is SQL statements that run to 15 or 20 lines. I'm pretty fast at the copy and paste and merging the parameters into the SQL. Once the SQL is done, I can just set the RecordSource of the form or report to that. But fiddling with those lines and lines of SQL is what I'm trying to get around. Rocky -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Stuart McLachlan Sent: Thursday, October 08, 2009 2:18 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] It's About Time I Learned This This was covered in the thread "Access 2000 - Filtering SQL Server records" on 17 Sep 2009. We were actaully talking about editing "pass through" queries, but the prinicple is the same. Here's what I posted then. To pass a parameter, you need to modify the querydef, so you need to do something like this before opening the query: Public Sub SetChequePKID(PKID As Long) Dim strSQL As String Dim qdf as DAO.QueryDef Dim rs as DAO.Recordset strSQL = "Select Cast(chequenum as int) from tblCheques where PKID" & PKID Set qdf = CurrentDb.QueryDefs("qryGetCheckNumber") qdf.SQL = strSQL qdf.Close End Sub On 8 Oct 2009 at 13:42, Rocky Smolin wrote: > Dear List: > > When I have a query that is the source of a form, report or recordset > that needs to have criteria of parameters, I always go to the SQL view > of the query, copy out the code, paste it into the CBF, and add the > parameters there - values from a text box or combo box, etc. Always done it that way. > > But I think there's a way to do modify a stored query in code using > the querydef. Pretty basic Access stuff, I think, but I've never learned it. > Can someone point me to a tutorial or primer or help screen explaining this? > > MTIA > > Rocky Smolin > Beach Access Software > 858-259-4334 > www.e-z-mrp.com > www.bchacc.com > > > > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com Stuart McLachlan -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From Gustav at cactus.dk Tue Oct 6 06:50:21 2009 From: Gustav at cactus.dk (Gustav Brock) Date: Tue, 06 Oct 2009 13:50:21 +0200 Subject: [AccessD] OT: Friday Humour Message-ID: Hi all Time for a new haircut?? http://www.youtube.com/watch?v=Avx-Y9MMm3c&feature=player_embedded /gustav From max.wanadoo at gmail.com Fri Oct 9 01:31:12 2009 From: max.wanadoo at gmail.com (Max Wanadoo) Date: Fri, 9 Oct 2009 07:31:12 +0100 Subject: [AccessD] It's About Time I Learned This In-Reply-To: <0671643C86084A09972D5DCA0A71B047@HAL9005> References: <52AA4977E0DA4908A62767C6E15FD7B6@HAL9005> <4ACE56EF.17402.6FE70FB5@stuart.lexacorp.com.pg> <0671643C86084A09972D5DCA0A71B047@HAL9005> Message-ID: <4aced8d8.0508d00a.4fa9.3ed6@mx.google.com> > strSQL = "Select Cast(chequenum as int) from tblCheques where PKID" & PKID Rocky, I think you are missing the point here. The above line is where you would take YOUR parameters from your combo boxes, list selections, whatever and build the above line to suit your needs. The rest of the code before/after is what updates the query automatically for you. No need to cut-n-paste etc. I do similar things tons of times. Ie, grab the current sql from the query using QueryDef. Amend it based on the selection forms that my users are presented with (typically building a filter for viewing only the records they want to see), and then write it back to the query which the form is based on and requery the form. As a developer, this is all left to the user to change the underlying query from a simple selection form. Same for reports etc. Max -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Rocky Smolin Sent: 09 October 2009 03:18 To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] It's About Time I Learned This Stuart: I'm not sure that buys me anything because you've got the SQL in the code and you're updating the stored query with that code, modified with the desired parameter. What I've got is SQL statements that run to 15 or 20 lines. I'm pretty fast at the copy and paste and merging the parameters into the SQL. Once the SQL is done, I can just set the RecordSource of the form or report to that. But fiddling with those lines and lines of SQL is what I'm trying to get around. Rocky -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Stuart McLachlan Sent: Thursday, October 08, 2009 2:18 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] It's About Time I Learned This This was covered in the thread "Access 2000 - Filtering SQL Server records" on 17 Sep 2009. We were actaully talking about editing "pass through" queries, but the prinicple is the same. Here's what I posted then. To pass a parameter, you need to modify the querydef, so you need to do something like this before opening the query: Public Sub SetChequePKID(PKID As Long) Dim strSQL As String Dim qdf as DAO.QueryDef Dim rs as DAO.Recordset strSQL = "Select Cast(chequenum as int) from tblCheques where PKID" & PKID Set qdf = CurrentDb.QueryDefs("qryGetCheckNumber") qdf.SQL = strSQL qdf.Close End Sub On 8 Oct 2009 at 13:42, Rocky Smolin wrote: > Dear List: > > When I have a query that is the source of a form, report or recordset > that needs to have criteria of parameters, I always go to the SQL view > of the query, copy out the code, paste it into the CBF, and add the > parameters there - values from a text box or combo box, etc. Always done it that way. > > But I think there's a way to do modify a stored query in code using > the querydef. Pretty basic Access stuff, I think, but I've never learned it. > Can someone point me to a tutorial or primer or help screen explaining this? > > MTIA > > Rocky Smolin > Beach Access Software > 858-259-4334 > www.e-z-mrp.com > www.bchacc.com > > > > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com Stuart McLachlan -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From shamil at smsconsulting.spb.ru Fri Oct 9 07:43:26 2009 From: shamil at smsconsulting.spb.ru (Shamil Salakhetdinov) Date: Fri, 9 Oct 2009 16:43:26 +0400 Subject: [AccessD] Firday OT: What books do 8 years old kids reads and likes there? Message-ID: <001501ca48de$1b299510$517cbf30$@spb.ru> Hi All, I wanted to order some books in English from Amazon for my son. Well, I should note my son is awaiting for several "Bakugan Battle Brawlers Game Single LOOSE Figures" to come delivered from Amazon not books - the kids are "crazy" about Bakugans here now and the best choice of these toys is currently presented on Amazon. And I wanted to use this opportunity to buy some books together with Bakugans but not the very well known here books as e.g of the following classic authors Jack London, Mark Twain, Rudyard Kipling, Astrid Lindgren, Brothers Grimm, Charles Perrault, Hans Christian Andersen, Lewis Carroll, Frank Baum, Carlo Collodi, James Fennimore Cooper, Jules Verne, Arthur Conan Doyle . But some other more rare books your kids read there at age of 8. Could you please advise such books? Would "The Norton Anthology of Children's Literature: The Traditions in English" by Jack Zipes (Editor), Lissa Paul (Editor), Lynne Vallone (Editor), Peter Hunt (Editor), Gillian Avery (Editor) be a good choice now for me to read it with my son to get more informed about your children's' literature, and to purchase some more books in the future? Thank you. -- Shamil From Elizabeth.J.Doering at wellsfargo.com Fri Oct 9 08:27:20 2009 From: Elizabeth.J.Doering at wellsfargo.com (Elizabeth.J.Doering at wellsfargo.com) Date: Fri, 9 Oct 2009 08:27:20 -0500 Subject: [AccessD] Firday OT: What books do 8 years old kids reads and likes there? In-Reply-To: <001501ca48de$1b299510$517cbf30$@spb.ru> References: <001501ca48de$1b299510$517cbf30$@spb.ru> Message-ID: <4838EC790FF778449985FC3B8A47F8714324343050@MSGCMSV21011.ent.wfb.bank.corp> Shamil, This is a wonderful and ambitious list of authors; most 8 year olds here are not reading at this level yet! I'm sure my nephew-age 9-is more about Captain Underpants than about Jules Verne. My daughter-age 18-came home this week with a list of perhaps 75 classic novels and the assignment to pick one and write a 5 page critical essay. I, English major that I was, turned to our bookshelves and quickly pulled out 6 or 7 from the list that I could also recommend for her taste. She said, "why aren't you an English teacher?". I had to reply that it is because I don't like kids-they don't do as they are told! I will put together a longer list of suggestions and send to you off line. Liz -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Shamil Salakhetdinov Sent: Friday, October 09, 2009 7:43 AM To: 'Access Developers discussion and problem solving' Subject: [AccessD] Firday OT: What books do 8 years old kids reads and likes there? Hi All, I wanted to order some books in English from Amazon for my son. Well, I should note my son is awaiting for several "Bakugan Battle Brawlers Game Single LOOSE Figures" to come delivered from Amazon not books - the kids are "crazy" about Bakugans here now and the best choice of these toys is currently presented on Amazon. And I wanted to use this opportunity to buy some books together with Bakugans but not the very well known here books as e.g of the following classic authors Jack London, Mark Twain, Rudyard Kipling, Astrid Lindgren, Brothers Grimm, Charles Perrault, Hans Christian Andersen, Lewis Carroll, Frank Baum, Carlo Collodi, James Fennimore Cooper, Jules Verne, Arthur Conan Doyle . But some other more rare books your kids read there at age of 8. Could you please advise such books? Would "The Norton Anthology of Children's Literature: The Traditions in English" by Jack Zipes (Editor), Lissa Paul (Editor), Lynne Vallone (Editor), Peter Hunt (Editor), Gillian Avery (Editor) be a good choice now for me to read it with my son to get more informed about your children's' literature, and to purchase some more books in the future? Thank you. -- Shamil -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose, or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation. From susanj at sgmeet.com Fri Oct 9 09:12:34 2009 From: susanj at sgmeet.com (Susan Jones) Date: Fri, 09 Oct 2009 09:12:34 -0500 Subject: [AccessD] Firday OT: What books do 8 years old kids reads and likes there? In-Reply-To: <001501ca48de$1b299510$517cbf30$@spb.ru> References: <001501ca48de$1b299510$517cbf30$@spb.ru> Message-ID: <20091009083434.5DF53B20C03@mail.sgmeet.com> Here are some of the favorites in our house (8yr old son's and our's): Diary of a Wimpy Kid by Jeff Kinney Encyclopedia Brown by Donald J. Sobol Hank the Cowdog by John R. Erickson and Gerald L. Holmes Susan At 07:43 AM 10/9/09, you wrote: >Hi All, > > > >I wanted to order some books in English from Amazon for my son. > > > >Well, I should note my son is awaiting for several "Bakugan Battle Brawlers >Game Single LOOSE Figures" to come delivered from Amazon not books - the >kids are "crazy" about Bakugans here now and the best choice of these toys >is currently presented on Amazon. > > > >And I wanted to use this opportunity to buy some books together with >Bakugans but not the very well known here books as e.g of the following >classic authors > > > >Jack London, > >Mark Twain, > >Rudyard Kipling, > >Astrid Lindgren, > >Brothers Grimm, > >Charles Perrault, > >Hans Christian Andersen, > >Lewis Carroll, > >Frank Baum, > >Carlo Collodi, > >James Fennimore Cooper, > >Jules Verne, > >Arthur Conan Doyle > >. > > > >But some other more rare books your kids read there at age of 8. > > > >Could you please advise such books? > > > >Would "The Norton Anthology of Children's Literature: The Traditions in >English" by Jack Zipes (Editor), Lissa Paul (Editor), Lynne Vallone >(Editor), Peter Hunt (Editor), Gillian Avery (Editor) be a good choice now >for me to read it with my son to get more informed about your children's' >literature, and to purchase some more books in the future? > > > >Thank you. > > > >-- > >Shamil > >-- >AccessD mailing list >AccessD at databaseadvisors.com >http://databaseadvisors.com/mailman/listinfo/accessd >Website: http://www.databaseadvisors.com > > >__________ Information from ESET NOD32 Antivirus, version of virus >signature database 4493 (20091009) __________ > >The message was checked by ESET NOD32 Antivirus. > >http://www.eset.com From jwcolby at colbyconsulting.com Fri Oct 9 09:12:17 2009 From: jwcolby at colbyconsulting.com (jwcolby) Date: Fri, 09 Oct 2009 10:12:17 -0400 Subject: [AccessD] Firday OT: What books do 8 years old kids reads and likes there? In-Reply-To: <001501ca48de$1b299510$517cbf30$@spb.ru> References: <001501ca48de$1b299510$517cbf30$@spb.ru> Message-ID: <4ACF44C1.500@colbyconsulting.com> Shamil, The problem with recommended reading is that kids read at different levels, and perhaps even more so if they are reading in a foreign language. Are you discussing buying books in English for your son to read, or books from the classics that have been translated into Russian. I believe that part of my job as a parent is to select reading material that will keep Robbie's interest. Sure the classics are essential. I'm not sure why exactly but I am sure they are. ;) However equally important to me is simply that my child enjoys reading and does so. As long as it is not harmful material, just the fact that he is reading provides the practice and the vocabulary building that comes with reading. As a child I read a set of books that were widely available back in the day which were short stories from all around the world. The child craft series of which this is one of about 20 or so in the collection. http://cgi.ebay.com/Childcraft-Folk-Fairy-Tales-1949-GREAT_W0QQitemZ290356320868QQcmdZViewItemQQptZAntiquarian_Collectible?hash=item439a95da64 However I also read the "children's pulp fiction" such as The Hardy Boys, Nancy Drew and the like. I read short story collections by the famous authors such as Edgar Allen Poe, Jules Verne and so forth. And of course the encyclopedia. While it wasn't literature, when I was 8 years old the Hardy Boys was one of my favorite reads and kept me with my nose in a book for hundreds of hours. I just feel that to some extent it is the reading as much as the content itself which is important. As long as you provide a wide variety of material, the child can always select something that interests him that day. JMO of course. John W. Colby www.ColbyConsulting.com Shamil Salakhetdinov wrote: > Hi All, > > > > I wanted to order some books in English from Amazon for my son. > > > > Well, I should note my son is awaiting for several "Bakugan Battle Brawlers > Game Single LOOSE Figures" to come delivered from Amazon not books - the > kids are "crazy" about Bakugans here now and the best choice of these toys > is currently presented on Amazon. > > > > And I wanted to use this opportunity to buy some books together with > Bakugans but not the very well known here books as e.g of the following > classic authors > > > > Jack London, > > Mark Twain, > > Rudyard Kipling, > > Astrid Lindgren, > > Brothers Grimm, > > Charles Perrault, > > Hans Christian Andersen, > > Lewis Carroll, > > Frank Baum, > > Carlo Collodi, > > James Fennimore Cooper, > > Jules Verne, > > Arthur Conan Doyle > > . > > > > But some other more rare books your kids read there at age of 8. > > > > Could you please advise such books? > > > > Would "The Norton Anthology of Children's Literature: The Traditions in > English" by Jack Zipes (Editor), Lissa Paul (Editor), Lynne Vallone > (Editor), Peter Hunt (Editor), Gillian Avery (Editor) be a good choice now > for me to read it with my son to get more informed about your children's' > literature, and to purchase some more books in the future? > > > > Thank you. > > > > -- > > Shamil > From cfoust at infostatsystems.com Fri Oct 9 09:51:37 2009 From: cfoust at infostatsystems.com (Charlotte Foust) Date: Fri, 9 Oct 2009 07:51:37 -0700 Subject: [AccessD] It's About Time I Learned This In-Reply-To: <0671643C86084A09972D5DCA0A71B047@HAL9005> References: <52AA4977E0DA4908A62767C6E15FD7B6@HAL9005><4ACE56EF.17402.6FE70FB5@stuart.lexacorp.com.pg> <0671643C86084A09972D5DCA0A71B047@HAL9005> Message-ID: Does this help, Rocky? Can you adapt any of it to your uses? This is really old, as you can tell from the date, but it allows you to pass the parameters to a named query through the function. Charlotte Foust Public Function RunParamQuery(ByVal strQryNm As String, _ ParamArray varParamValues()) As Boolean 'Created by Charlotte Foust '12/9/99 On Error GoTo Proc_err Dim dbs As Database Dim wsp As Workspace Dim qdf As QueryDef Dim prm As Parameter Dim blnOK As Boolean Dim varPrmType As Variant Dim strName As String Dim blnPrmVal As Boolean Dim blnPrmSet As Boolean Dim intLoop As Integer Dim intNumParams As Integer Dim intQDFType As Integer Dim varParamValue As Variant Const DUPLICATE_KEY_OR_INDEX = 3022 blnOK = True Set dbs = CurrentDb() Set qdf = dbs.QueryDefs(strQryNm) intNumParams = qdf.Parameters.Count ' See how many parameters there are to pass If intNumParams = UBound(varParamValues) + 1 Then blnPrmVal = True Else blnOK = False End If If Not blnPrmVal Then ' Loop through the parameters and ' prompt user for values except for ' any passed in the call If intNumParams = 0 Then intNumParams = 1 End If For intLoop = 0 To intNumParams - 1 blnPrmSet = False Set prm = qdf.Parameters(intLoop) strName = prm.Name varPrmType = prm.Type On Error Resume Next prm = varParamValues(intLoop) If Err = 0 Then blnPrmSet = True End If On Error GoTo Proc_err If Not blnPrmSet Then varParamValue = InputBox(strName, "Enter value") Select Case varPrmType Case vbLong varParamValue = CLng(varParamValue) Case vbInteger varParamValue = CInt(varParamValue) Case vbDouble varParamValue = CDbl(varParamValue) Case vbDate varParamValue = CDate(varParamValue) Case Else varParamValue = varParamValue End Select prm = varParamValue End If Next intLoop End If If blnOK Then '<> intQDFType = qdf.Type Select Case intQDFType Case dbQMakeTable, dbQAppend, dbQDelete Set wsp = DBEngine(0) If intQDFType = dbQMakeTable Then ElseIf intQDFType = dbQAppend Then ElseIf intQDFType = dbQDelete Then End If wsp.BeginTrans qdf.Execute dbFailOnError wsp.CommitTrans Debug.Print qdf.RecordsAffected Case Else If intQDFType = dbQSelect Then ElseIf intQDFType = dbQCrosstab Then ElseIf intQDFType = dbQSetOperation Then ElseIf intQDFType = dbQCompound Then End If DoCmd.OpenQuery strQryNm End Select End If Proc_exit: On Error Resume Next Set qdf = Nothing Set dbs = Nothing Set wsp = Nothing RunParamQuery = blnOK Exit Function Proc_err: Select Case Err.Number Case DUPLICATE_KEY_OR_INDEX 'Ignore this one Case Else MsgBox "RunParamQuery error #" & Err & "--" & Err.Description blnOK = False End Select Resume Proc_exit End Function -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Rocky Smolin Sent: Thursday, October 08, 2009 7:18 PM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] It's About Time I Learned This Stuart: I'm not sure that buys me anything because you've got the SQL in the code and you're updating the stored query with that code, modified with the desired parameter. What I've got is SQL statements that run to 15 or 20 lines. I'm pretty fast at the copy and paste and merging the parameters into the SQL. Once the SQL is done, I can just set the RecordSource of the form or report to that. But fiddling with those lines and lines of SQL is what I'm trying to get around. Rocky -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Stuart McLachlan Sent: Thursday, October 08, 2009 2:18 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] It's About Time I Learned This This was covered in the thread "Access 2000 - Filtering SQL Server records" on 17 Sep 2009. We were actaully talking about editing "pass through" queries, but the prinicple is the same. Here's what I posted then. To pass a parameter, you need to modify the querydef, so you need to do something like this before opening the query: Public Sub SetChequePKID(PKID As Long) Dim strSQL As String Dim qdf as DAO.QueryDef Dim rs as DAO.Recordset strSQL = "Select Cast(chequenum as int) from tblCheques where PKID" & PKID Set qdf = CurrentDb.QueryDefs("qryGetCheckNumber") qdf.SQL = strSQL qdf.Close End Sub On 8 Oct 2009 at 13:42, Rocky Smolin wrote: > Dear List: > > When I have a query that is the source of a form, report or recordset > that needs to have criteria of parameters, I always go to the SQL view > of the query, copy out the code, paste it into the CBF, and add the > parameters there - values from a text box or combo box, etc. Always > done it that way. > > But I think there's a way to do modify a stored query in code using > the querydef. Pretty basic Access stuff, I think, but I've never > learned it. > Can someone point me to a tutorial or primer or help screen explaining this? > > MTIA > > Rocky Smolin > Beach Access Software > 858-259-4334 > www.e-z-mrp.com > www.bchacc.com > > > > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com Stuart McLachlan -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From cfoust at infostatsystems.com Fri Oct 9 09:56:43 2009 From: cfoust at infostatsystems.com (Charlotte Foust) Date: Fri, 9 Oct 2009 07:56:43 -0700 Subject: [AccessD] Firday OT: What books do 8 years old kids reads and likesthere? In-Reply-To: <001501ca48de$1b299510$517cbf30$@spb.ru> References: <001501ca48de$1b299510$517cbf30$@spb.ru> Message-ID: Definitely Kipling! Try the Puck of Pook's Hill books, Just So Stories and Jungle Book. I adored Lewis Carroll at that age but didn't care at all for Brothers Grimm or Hans Christian Andersen (boys might, but I wasn't bloodthirsty enough for those "fairy" tales!). My son adored Tolkien's The Hobbit at that age, and I highly recommend that. I didn't appreciate Twain until I was older, but boys probably would related to Tom and Huck better than I did. Charlotte Foust -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Shamil Salakhetdinov Sent: Friday, October 09, 2009 5:43 AM To: 'Access Developers discussion and problem solving' Subject: [AccessD] Firday OT: What books do 8 years old kids reads and likesthere? Hi All, I wanted to order some books in English from Amazon for my son. Well, I should note my son is awaiting for several "Bakugan Battle Brawlers Game Single LOOSE Figures" to come delivered from Amazon not books - the kids are "crazy" about Bakugans here now and the best choice of these toys is currently presented on Amazon. And I wanted to use this opportunity to buy some books together with Bakugans but not the very well known here books as e.g of the following classic authors Jack London, Mark Twain, Rudyard Kipling, Astrid Lindgren, Brothers Grimm, Charles Perrault, Hans Christian Andersen, Lewis Carroll, Frank Baum, Carlo Collodi, James Fennimore Cooper, Jules Verne, Arthur Conan Doyle . But some other more rare books your kids read there at age of 8. Could you please advise such books? Would "The Norton Anthology of Children's Literature: The Traditions in English" by Jack Zipes (Editor), Lissa Paul (Editor), Lynne Vallone (Editor), Peter Hunt (Editor), Gillian Avery (Editor) be a good choice now for me to read it with my son to get more informed about your children's' literature, and to purchase some more books in the future? Thank you. -- Shamil -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From rockysmolin at bchacc.com Fri Oct 9 11:15:00 2009 From: rockysmolin at bchacc.com (Rocky Smolin) Date: Fri, 9 Oct 2009 09:15:00 -0700 Subject: [AccessD] It's About Time I Learned This In-Reply-To: <4aced8d8.0508d00a.4fa9.3ed6@mx.google.com> References: <52AA4977E0DA4908A62767C6E15FD7B6@HAL9005> <4ACE56EF.17402.6FE70FB5@stuart.lexacorp.com.pg><0671643C86084A09972D5DCA0A71B047@HAL9005> <4aced8d8.0508d00a.4fa9.3ed6@mx.google.com> Message-ID: <5958658C02394FBBA4F770FE19F5C6FA@HAL9005> OK, here's a sample of the SQL that I create using this technique: strSQL = "SELECT tblUSRHeader.fldLicenseeID, tblUSRHeader.fldUSRHeaderReportingYear, " _ & "tblUSRHeader.fldUSRHeaderReportingQuarter, tblUSRHeader.fldUSRHeaderAdjustment, " _ & "tblUSRHeader.fldUSRHeaderShipmentQuarter, tblUSRHeader.fldUSRHeaderInvoiceNumber, " _ & "tblUSRHeader.fldUSRHeaderShipmentYear, Sum(tblUSRDetail.fldUSRDetailQuantity) AS " _ & "SumOffldUSRDetailQuantity, tblUSRHeader.fldUSRHeaderDeleteFlag, " _ & "tblUSRDetail.fldUSRDetailDeleteFlag, tblUSRDetail.fldUSRHeaderID, " _ & "tblUSRHeader.fldUSRHeaderInvoiceNumber FROM tblUSRHeader INNER JOIN tblUSRDetail ON " _ & "tblUSRHeader.fldUSRHeaderID = tblUSRDetail.fldUSRHeaderID GROUP BY " _ & "tblUSRHeader.fldLicenseeID, tblUSRHeader.fldUSRHeaderReportingYear, " _ & "tblUSRHeader.fldUSRHeaderReportingQuarter, tblUSRHeader.fldUSRHeaderAdjustment, " _ & "tblUSRHeader.fldUSRHeaderShipmentQuarter, tblUSRHeader.fldUSRHeaderInvoiceNumber, " _ & "tblUSRHeader.fldUSRHeaderShipmentYear, tblUSRHeader.fldUSRHeaderDeleteFlag, " _ & "tblUSRDetail.fldUSRDetailDeleteFlag, tblUSRDetail.fldUSRHeaderID, " _ & "tblUSRHeader.fldUSRHeaderInvoiceNumber HAVING (((tblUSRHeader.fldLicenseeID) = " _ & Me.cboInvoiceReportLicensee.Column(0) & " ) And ((tblUSRHeader.fldUSRHeaderShipmentQuarter) " _ & "<= " & Me.cboInvoiceReportQuarter & ") And ((tblUSRHeader.fldUSRHeaderShipmentYear) = " _ & Me.cboInvoiceReportYear & ") And ((tblUSRHeader.fldUSRHeaderDeleteFlag) = False) And " _ & "((tblUSRDetail.fldUSRDetailDeleteFlag) = False)) ORDER BY tblUSRHeader.fldLicenseeID, " _ & "tblUSRHeader.fldUSRHeaderShipmentQuarter, tblUSRHeader.fldUSRHeaderAdjustment DESC;" Set rsDetail = db.OpenRecordset(strSQL) Works really well, but it's not real convenient to work with - especially during development when the query needs tweaking. I thought there was some way to inject the parameteres right into a stored query. Maybe not. Rocky -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Max Wanadoo Sent: Thursday, October 08, 2009 11:31 PM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] It's About Time I Learned This > strSQL = "Select Cast(chequenum as int) from tblCheques where PKID" > & PKID Rocky, I think you are missing the point here. The above line is where you would take YOUR parameters from your combo boxes, list selections, whatever and build the above line to suit your needs. The rest of the code before/after is what updates the query automatically for you. No need to cut-n-paste etc. I do similar things tons of times. Ie, grab the current sql from the query using QueryDef. Amend it based on the selection forms that my users are presented with (typically building a filter for viewing only the records they want to see), and then write it back to the query which the form is based on and requery the form. As a developer, this is all left to the user to change the underlying query from a simple selection form. Same for reports etc. Max From rockysmolin at bchacc.com Fri Oct 9 11:15:00 2009 From: rockysmolin at bchacc.com (Rocky Smolin) Date: Fri, 9 Oct 2009 09:15:00 -0700 Subject: [AccessD] Firday OT: What books do 8 years old kids reads and likesthere? In-Reply-To: <001501ca48de$1b299510$517cbf30$@spb.ru> References: <001501ca48de$1b299510$517cbf30$@spb.ru> Message-ID: <623A21417BEE401C872AF6567953DA19@HAL9005> Twain "A Connecticut Yankee in King Arthur's Court" - kind of sci-fi - great for the imagination. Rocky -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Shamil Salakhetdinov Sent: Friday, October 09, 2009 5:43 AM To: 'Access Developers discussion and problem solving' Subject: [AccessD] Firday OT: What books do 8 years old kids reads and likesthere? Hi All, I wanted to order some books in English from Amazon for my son. Well, I should note my son is awaiting for several "Bakugan Battle Brawlers Game Single LOOSE Figures" to come delivered from Amazon not books - the kids are "crazy" about Bakugans here now and the best choice of these toys is currently presented on Amazon. And I wanted to use this opportunity to buy some books together with Bakugans but not the very well known here books as e.g of the following classic authors Jack London, Mark Twain, Rudyard Kipling, Astrid Lindgren, Brothers Grimm, Charles Perrault, Hans Christian Andersen, Lewis Carroll, Frank Baum, Carlo Collodi, James Fennimore Cooper, Jules Verne, Arthur Conan Doyle . But some other more rare books your kids read there at age of 8. Could you please advise such books? Would "The Norton Anthology of Children's Literature: The Traditions in English" by Jack Zipes (Editor), Lissa Paul (Editor), Lynne Vallone (Editor), Peter Hunt (Editor), Gillian Avery (Editor) be a good choice now for me to read it with my son to get more informed about your children's' literature, and to purchase some more books in the future? Thank you. -- Shamil -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From rockysmolin at bchacc.com Fri Oct 9 11:15:00 2009 From: rockysmolin at bchacc.com (Rocky Smolin) Date: Fri, 9 Oct 2009 09:15:00 -0700 Subject: [AccessD] It's About Time I Learned This In-Reply-To: References: <52AA4977E0DA4908A62767C6E15FD7B6@HAL9005><4ACE56EF.17402.6FE70FB5@stuart.lexacorp.com.pg><0671643C86084A09972D5DCA0A71B047@HAL9005> Message-ID: Charlotte: Thanks. That looks promising, although not the simple solution I had imagined (I have an active imagination). I'll give it a try. Rocky -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Charlotte Foust Sent: Friday, October 09, 2009 7:52 AM To: Access Developers discussion and problem solving Subject: Re: [AccessD] It's About Time I Learned This Does this help, Rocky? Can you adapt any of it to your uses? This is really old, as you can tell from the date, but it allows you to pass the parameters to a named query through the function. Charlotte Foust Public Function RunParamQuery(ByVal strQryNm As String, _ ParamArray varParamValues()) As Boolean 'Created by Charlotte Foust '12/9/99 On Error GoTo Proc_err Dim dbs As Database Dim wsp As Workspace Dim qdf As QueryDef Dim prm As Parameter Dim blnOK As Boolean Dim varPrmType As Variant Dim strName As String Dim blnPrmVal As Boolean Dim blnPrmSet As Boolean Dim intLoop As Integer Dim intNumParams As Integer Dim intQDFType As Integer Dim varParamValue As Variant Const DUPLICATE_KEY_OR_INDEX = 3022 blnOK = True Set dbs = CurrentDb() Set qdf = dbs.QueryDefs(strQryNm) intNumParams = qdf.Parameters.Count ' See how many parameters there are to pass If intNumParams = UBound(varParamValues) + 1 Then blnPrmVal = True Else blnOK = False End If If Not blnPrmVal Then ' Loop through the parameters and ' prompt user for values except for ' any passed in the call If intNumParams = 0 Then intNumParams = 1 End If For intLoop = 0 To intNumParams - 1 blnPrmSet = False Set prm = qdf.Parameters(intLoop) strName = prm.Name varPrmType = prm.Type On Error Resume Next prm = varParamValues(intLoop) If Err = 0 Then blnPrmSet = True End If On Error GoTo Proc_err If Not blnPrmSet Then varParamValue = InputBox(strName, "Enter value") Select Case varPrmType Case vbLong varParamValue = CLng(varParamValue) Case vbInteger varParamValue = CInt(varParamValue) Case vbDouble varParamValue = CDbl(varParamValue) Case vbDate varParamValue = CDate(varParamValue) Case Else varParamValue = varParamValue End Select prm = varParamValue End If Next intLoop End If If blnOK Then '<> intQDFType = qdf.Type Select Case intQDFType Case dbQMakeTable, dbQAppend, dbQDelete Set wsp = DBEngine(0) If intQDFType = dbQMakeTable Then ElseIf intQDFType = dbQAppend Then ElseIf intQDFType = dbQDelete Then End If wsp.BeginTrans qdf.Execute dbFailOnError wsp.CommitTrans Debug.Print qdf.RecordsAffected Case Else If intQDFType = dbQSelect Then ElseIf intQDFType = dbQCrosstab Then ElseIf intQDFType = dbQSetOperation Then ElseIf intQDFType = dbQCompound Then End If DoCmd.OpenQuery strQryNm End Select End If Proc_exit: On Error Resume Next Set qdf = Nothing Set dbs = Nothing Set wsp = Nothing RunParamQuery = blnOK Exit Function Proc_err: Select Case Err.Number Case DUPLICATE_KEY_OR_INDEX 'Ignore this one Case Else MsgBox "RunParamQuery error #" & Err & "--" & Err.Description blnOK = False End Select Resume Proc_exit End Function -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Rocky Smolin Sent: Thursday, October 08, 2009 7:18 PM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] It's About Time I Learned This Stuart: I'm not sure that buys me anything because you've got the SQL in the code and you're updating the stored query with that code, modified with the desired parameter. What I've got is SQL statements that run to 15 or 20 lines. I'm pretty fast at the copy and paste and merging the parameters into the SQL. Once the SQL is done, I can just set the RecordSource of the form or report to that. But fiddling with those lines and lines of SQL is what I'm trying to get around. Rocky -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Stuart McLachlan Sent: Thursday, October 08, 2009 2:18 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] It's About Time I Learned This This was covered in the thread "Access 2000 - Filtering SQL Server records" on 17 Sep 2009. We were actaully talking about editing "pass through" queries, but the prinicple is the same. Here's what I posted then. To pass a parameter, you need to modify the querydef, so you need to do something like this before opening the query: Public Sub SetChequePKID(PKID As Long) Dim strSQL As String Dim qdf as DAO.QueryDef Dim rs as DAO.Recordset strSQL = "Select Cast(chequenum as int) from tblCheques where PKID" & PKID Set qdf = CurrentDb.QueryDefs("qryGetCheckNumber") qdf.SQL = strSQL qdf.Close End Sub On 8 Oct 2009 at 13:42, Rocky Smolin wrote: > Dear List: > > When I have a query that is the source of a form, report or recordset > that needs to have criteria of parameters, I always go to the SQL view > of the query, copy out the code, paste it into the CBF, and add the > parameters there - values from a text box or combo box, etc. Always > done it that way. > > But I think there's a way to do modify a stored query in code using > the querydef. Pretty basic Access stuff, I think, but I've never > learned it. > Can someone point me to a tutorial or primer or help screen explaining this? > > MTIA > > Rocky Smolin > Beach Access Software > 858-259-4334 > www.e-z-mrp.com > www.bchacc.com > > > > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com Stuart McLachlan -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/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 doug at starntech.com Fri Oct 9 12:25:42 2009 From: doug at starntech.com (Doug Barnes) Date: Fri, 9 Oct 2009 13:25:42 -0400 Subject: [AccessD] It's About Time I Learned This In-Reply-To: <5958658C02394FBBA4F770FE19F5C6FA@HAL9005> Message-ID: Rocky, you could adapt from this. This is from a vb project that has queries in a Access database. Public Sub LoadCancelList(ByVal pBadgeNbr As Long, ByVal pVacationYear As Long, pCutoffDateSingleDays As Date, pCutOffDateWeeks) Dim mConn As ADODB.Connection Dim mCmd As ADODB.Command Set mCmd = New ADODB.Command With mCmd .CommandText = "vbEmployeeVacCancelList" .CommandType = adCmdStoredProc .Parameters.Append .CreateParameter("@BadgeNbr", adInteger, adParamInput, , pBadgeNbr) .Parameters.Append .CreateParameter("@Vacationyear", adInteger, adParamInput, , pVacationYear) .Parameters.Append .CreateParameter("@CutOffDateSingleDays", adDate, adParamInput, , pCutoffDateSingleDays) .Parameters.Append .CreateParameter("@CutOffDateWeeks", adDate, adParamInput, , pCutOffDateWeeks) SetConnection mConn, True, True, mpdbLocal Set .ActiveConnection = mConn End With ResetRST mrstCancelList With mrstCancelList .Open mCmd, , adOpenStatic, adLockReadOnly Set .ActiveConnection = Nothing End With mConn.Close Set mConn = Nothing Set mCmd = Nothing End Sub This is what the query looks like in Access: PARAMETERS [@BadgeNbr] Long, [@VacationYear] Long, [@CutoffDateSingleDays] DateTime, [@CutoffDateWeeks] DateTime; SELECT vacLog.VRID, vacLog.BadgeNbr, vacLog.VRType, vacLog.VRDate, vacLog.VROccCode, vacLog.VRCrew, vacLog.VRStatus, vacLog.VRComments, vacLog.VRDays, vacLog.vrYear, vacLog.vrModUserID, vacLog.vrModTimestamp, vacLog.RelatedVRID, vacLog_1.VRType AS [Related Type], vacLog_1.VRDate AS [Related Date] FROM LKUP_VRTypes INNER JOIN (LKUP_VRStatus INNER JOIN (vacLog LEFT JOIN vacLog AS vacLog_1 ON vacLog.RelatedVRID=vacLog_1.VRID) ON LKUP_VRStatus.VRStatus=vacLog.VRStatus) ON LKUP_VRTypes.VRType=vacLog.VRType WHERE (((vacLog.BadgeNbr)=[@BadgeNbr]) AND ((vacLog.VRDate)>[@CutOffDateSingleDays]) AND ((vacLog.vrYear)=[@VacationYear]) AND ((LKUP_VRStatus.VRAllowCancel)=True) AND ((LKUP_VRTypes.VRIndividualType)=True)) OR (((vacLog.BadgeNbr)=[@BadgeNbr]) AND ((vacLog.VRDate)>[@CutOffDateWeeks]) AND ((vacLog.vrYear)=[@VacationYear]) AND ((LKUP_VRStatus.VRAllowCancel)=True) AND ((LKUP_VRTypes.VRIndividualType)=False)) ORDER BY vacLog.VRDate; Douglas Barnes Starn Technical Services P.O. Box 1172 1057 French Street Meadville, PA 16335 P: 814.724.1045 F: 814.337.3460 From andy at minstersystems.co.uk Fri Oct 9 12:29:17 2009 From: andy at minstersystems.co.uk (Andy Lacey) Date: Fri, 9 Oct 2009 18:29:17 +0100 Subject: [AccessD] Firday OT: What books do 8 years old kids reads and likesthere? In-Reply-To: <001501ca48de$1b299510$517cbf30$@spb.ru> Message-ID: Hi Shamil I largely agree with JC that there are lots of great books for children today without necessarily going back to the classics, but if it's classics you want I'll throw in some suggestions from this side of the pond: I totally endorse Conan Doyle, I galloped through every Sherlock Holmes story when I was .... well probably a little older but if your son's a good reader.... I also loved: the Hornblower series by C S Forester - great naval adventure stories C S Lewis's Narnia books Hobbit and Lord Of The Rings (again a bit later though) Wind In The Willows (K Grahame) Robinson Crusoe (D Defoe) Treasure Island (R L Stevenson) Watership Down (R Adams) I agree with Alice In Wonderland and Jules Verne too. I (almost) guarantee that he'd adore the Winnie The Pooh stories. Not cool, and he might not want to tell his friends, but they are impossible not to love. My kids devoured Roald Dahl's children's books which have become modern classics. Terrific stories. Another thought (I'm having fun here) is Antoine De Saint Exupery's The Little Prince. Just wonderful. I could no doubt go on but that's probably enough of my rambling. Have fun Andy As regards The Norton Anthology of Children's Literature, I don't know it and -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Shamil Salakhetdinov Sent: 09 October 2009 13:43 To: 'Access Developers discussion and problem solving' Subject: [AccessD] Firday OT: What books do 8 years old kids reads and likesthere? Hi All, I wanted to order some books in English from Amazon for my son. Well, I should note my son is awaiting for several "Bakugan Battle Brawlers Game Single LOOSE Figures" to come delivered from Amazon not books - the kids are "crazy" about Bakugans here now and the best choice of these toys is currently presented on Amazon. And I wanted to use this opportunity to buy some books together with Bakugans but not the very well known here books as e.g of the following classic authors Jack London, Mark Twain, Rudyard Kipling, Astrid Lindgren, Brothers Grimm, Charles Perrault, Hans Christian Andersen, Lewis Carroll, Frank Baum, Carlo Collodi, James Fennimore Cooper, Jules Verne, Arthur Conan Doyle . But some other more rare books your kids read there at age of 8. Could you please advise such books? Would "The Norton Anthology of Children's Literature: The Traditions in English" by Jack Zipes (Editor), Lissa Paul (Editor), Lynne Vallone (Editor), Peter Hunt (Editor), Gillian Avery (Editor) be a good choice now for me to read it with my son to get more informed about your children's' literature, and to purchase some more books in the future? Thank you. -- Shamil -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From rockysmolin at bchacc.com Fri Oct 9 13:25:35 2009 From: rockysmolin at bchacc.com (Rocky Smolin) Date: Fri, 9 Oct 2009 11:25:35 -0700 Subject: [AccessD] It's About Time I Learned This In-Reply-To: References: <5958658C02394FBBA4F770FE19F5C6FA@HAL9005> Message-ID: <49D25C455CA24AA094A83B51918CF24A@HAL9005> Thanks. Although I'm a DAO guy not and ADO guy. Can it be done in DAO? What is the name of the stored query, then "vbEmployeeVacCancelList"? Rocky -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Doug Barnes Sent: Friday, October 09, 2009 10:26 AM To: Access Developers discussion and problem solving Subject: Re: [AccessD] It's About Time I Learned This Rocky, you could adapt from this. This is from a vb project that has queries in a Access database. Public Sub LoadCancelList(ByVal pBadgeNbr As Long, ByVal pVacationYear As Long, pCutoffDateSingleDays As Date, pCutOffDateWeeks) Dim mConn As ADODB.Connection Dim mCmd As ADODB.Command Set mCmd = New ADODB.Command With mCmd .CommandText = "vbEmployeeVacCancelList" .CommandType = adCmdStoredProc .Parameters.Append .CreateParameter("@BadgeNbr", adInteger, adParamInput, , pBadgeNbr) .Parameters.Append .CreateParameter("@Vacationyear", adInteger, adParamInput, , pVacationYear) .Parameters.Append .CreateParameter("@CutOffDateSingleDays", adDate, adParamInput, , pCutoffDateSingleDays) .Parameters.Append .CreateParameter("@CutOffDateWeeks", adDate, adParamInput, , pCutOffDateWeeks) SetConnection mConn, True, True, mpdbLocal Set .ActiveConnection = mConn End With ResetRST mrstCancelList With mrstCancelList .Open mCmd, , adOpenStatic, adLockReadOnly Set .ActiveConnection = Nothing End With mConn.Close Set mConn = Nothing Set mCmd = Nothing End Sub This is what the query looks like in Access: PARAMETERS [@BadgeNbr] Long, [@VacationYear] Long, [@CutoffDateSingleDays] DateTime, [@CutoffDateWeeks] DateTime; SELECT vacLog.VRID, vacLog.BadgeNbr, vacLog.VRType, vacLog.VRDate, vacLog.VROccCode, vacLog.VRCrew, vacLog.VRStatus, vacLog.VRComments, vacLog.VRDays, vacLog.vrYear, vacLog.vrModUserID, vacLog.vrModTimestamp, vacLog.RelatedVRID, vacLog_1.VRType AS [Related Type], vacLog_1.VRDate AS [Related Date] FROM LKUP_VRTypes INNER JOIN (LKUP_VRStatus INNER JOIN (vacLog LEFT JOIN vacLog AS vacLog_1 ON vacLog.RelatedVRID=vacLog_1.VRID) ON LKUP_VRStatus.VRStatus=vacLog.VRStatus) ON LKUP_VRTypes.VRType=vacLog.VRType WHERE (((vacLog.BadgeNbr)=[@BadgeNbr]) AND ((vacLog.VRDate)>[@CutOffDateSingleDays]) AND ((vacLog.vrYear)=[@VacationYear]) AND ((LKUP_VRStatus.VRAllowCancel)=True) AND ((LKUP_VRTypes.VRIndividualType)=True)) OR (((vacLog.BadgeNbr)=[@BadgeNbr]) AND ((vacLog.VRDate)>[@CutOffDateWeeks]) AND ((vacLog.vrYear)=[@VacationYear]) AND ((LKUP_VRStatus.VRAllowCancel)=True) AND ((LKUP_VRTypes.VRIndividualType)=False)) ORDER BY vacLog.VRDate; Douglas Barnes Starn Technical Services P.O. Box 1172 1057 French Street Meadville, PA 16335 P: 814.724.1045 F: 814.337.3460 -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From accessd at gfconsultants.com Fri Oct 9 13:30:57 2009 From: accessd at gfconsultants.com (Reuben Cummings) Date: Fri, 9 Oct 2009 14:30:57 -0400 Subject: [AccessD] Firday OT: What books do 8 years old kids reads andlikesthere? In-Reply-To: Message-ID: I have to add something... I suggest you start by only buying a few fiction and a few non-fiction. My son (10 now) is board after about 4 pages of fiction, but hand him some non-fiction and he'll destroy it. As a 2nd grader (when he was 7/8) he read every 2nd and 3rd grade non-fiction book that was in the school's reading program plus what he got from the library every week. My daughter (currently 8) leans toward non-fiction, but dabbles in both. My point is don't load up on fiction until you know the kid likes fiction. BTW, I'm the same way - fiction bores me. Reuben Cummings GFC, LLC 812.523.1017 > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Andy Lacey > Sent: Friday, October 09, 2009 1:29 PM > To: 'Access Developers discussion and problem solving' > Subject: Re: [AccessD] Firday OT: What books do 8 years old > kids reads andlikesthere? > > > Hi Shamil > I largely agree with JC that there are lots of great books > for children > today without necessarily going back to the classics, but if > it's classics > you want I'll throw in some suggestions from this side of the pond: > > I totally endorse Conan Doyle, I galloped through every > Sherlock Holmes > story when I was .... well probably a little older but if > your son's a good > reader.... > > I also loved: > the Hornblower series by C S Forester - great naval adventure stories > C S Lewis's Narnia books > Hobbit and Lord Of The Rings (again a bit later though) > Wind In The Willows (K Grahame) > Robinson Crusoe (D Defoe) > Treasure Island (R L Stevenson) > Watership Down (R Adams) > > I agree with Alice In Wonderland and Jules Verne too. > > I (almost) guarantee that he'd adore the Winnie The Pooh > stories. Not cool, > and he might not want to tell his friends, but they are > impossible not to > love. > > My kids devoured Roald Dahl's children's books which have > become modern > classics. Terrific stories. > > Another thought (I'm having fun here) is Antoine De Saint > Exupery's The > Little Prince. Just wonderful. > > I could no doubt go on but that's probably enough of my rambling. > > Have fun > > Andy > > > > > As regards The Norton Anthology of Children's Literature, I > don't know it > and > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Shamil > Salakhetdinov > Sent: 09 October 2009 13:43 > To: 'Access Developers discussion and problem solving' > Subject: [AccessD] Firday OT: What books do 8 years old kids reads and > likesthere? > > > Hi All, > > > > I wanted to order some books in English from Amazon for my son. > > > > Well, I should note my son is awaiting for several "Bakugan > Battle Brawlers > Game Single LOOSE Figures" to come delivered from Amazon not > books - the > kids are "crazy" about Bakugans here now and the best choice > of these toys > is currently presented on Amazon. > > > > And I wanted to use this opportunity to buy some books together with > Bakugans but not the very well known here books as e.g of the > following > classic authors > > > > Jack London, > > Mark Twain, > > Rudyard Kipling, > > Astrid Lindgren, > > Brothers Grimm, > > Charles Perrault, > > Hans Christian Andersen, > > Lewis Carroll, > > Frank Baum, > > Carlo Collodi, > > James Fennimore Cooper, > > Jules Verne, > > Arthur Conan Doyle > > . > > > > But some other more rare books your kids read there at age of 8. > > > > Could you please advise such books? > > > > Would "The Norton Anthology of Children's Literature: The > Traditions in > English" by Jack Zipes (Editor), Lissa Paul (Editor), Lynne Vallone > (Editor), Peter Hunt (Editor), Gillian Avery (Editor) be a > good choice now > for me to read it with my son to get more informed about your > children's' > literature, and to purchase some more books in the future? > > > > Thank you. > > > > -- > > Shamil > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > From doug at starntech.com Fri Oct 9 13:40:52 2009 From: doug at starntech.com (Doug Barnes) Date: Fri, 9 Oct 2009 14:40:52 -0400 Subject: [AccessD] It's About Time I Learned This In-Reply-To: <49D25C455CA24AA094A83B51918CF24A@HAL9005> Message-ID: Should be able to do DAO, although I'm not that keen on the DAO. Yes stored query is called vbEmployeeVacCancelList Douglas Barnes Starn Technical Services P.O. Box 1172 1057 French Street Meadville, PA 16335 P: 814.724.1045 F: 814.337.3460 -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com]On Behalf Of Rocky Smolin Sent: Friday, October 09, 2009 2:26 PM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] It's About Time I Learned This Thanks. Although I'm a DAO guy not and ADO guy. Can it be done in DAO? What is the name of the stored query, then "vbEmployeeVacCancelList"? Rocky -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Doug Barnes Sent: Friday, October 09, 2009 10:26 AM To: Access Developers discussion and problem solving Subject: Re: [AccessD] It's About Time I Learned This Rocky, you could adapt from this. This is from a vb project that has queries in a Access database. Public Sub LoadCancelList(ByVal pBadgeNbr As Long, ByVal pVacationYear As Long, pCutoffDateSingleDays As Date, pCutOffDateWeeks) Dim mConn As ADODB.Connection Dim mCmd As ADODB.Command Set mCmd = New ADODB.Command With mCmd .CommandText = "vbEmployeeVacCancelList" .CommandType = adCmdStoredProc .Parameters.Append .CreateParameter("@BadgeNbr", adInteger, adParamInput, , pBadgeNbr) .Parameters.Append .CreateParameter("@Vacationyear", adInteger, adParamInput, , pVacationYear) .Parameters.Append .CreateParameter("@CutOffDateSingleDays", adDate, adParamInput, , pCutoffDateSingleDays) .Parameters.Append .CreateParameter("@CutOffDateWeeks", adDate, adParamInput, , pCutOffDateWeeks) SetConnection mConn, True, True, mpdbLocal Set .ActiveConnection = mConn End With ResetRST mrstCancelList With mrstCancelList .Open mCmd, , adOpenStatic, adLockReadOnly Set .ActiveConnection = Nothing End With mConn.Close Set mConn = Nothing Set mCmd = Nothing End Sub This is what the query looks like in Access: PARAMETERS [@BadgeNbr] Long, [@VacationYear] Long, [@CutoffDateSingleDays] DateTime, [@CutoffDateWeeks] DateTime; SELECT vacLog.VRID, vacLog.BadgeNbr, vacLog.VRType, vacLog.VRDate, vacLog.VROccCode, vacLog.VRCrew, vacLog.VRStatus, vacLog.VRComments, vacLog.VRDays, vacLog.vrYear, vacLog.vrModUserID, vacLog.vrModTimestamp, vacLog.RelatedVRID, vacLog_1.VRType AS [Related Type], vacLog_1.VRDate AS [Related Date] FROM LKUP_VRTypes INNER JOIN (LKUP_VRStatus INNER JOIN (vacLog LEFT JOIN vacLog AS vacLog_1 ON vacLog.RelatedVRID=vacLog_1.VRID) ON LKUP_VRStatus.VRStatus=vacLog.VRStatus) ON LKUP_VRTypes.VRType=vacLog.VRType WHERE (((vacLog.BadgeNbr)=[@BadgeNbr]) AND ((vacLog.VRDate)>[@CutOffDateSingleDays]) AND ((vacLog.vrYear)=[@VacationYear]) AND ((LKUP_VRStatus.VRAllowCancel)=True) AND ((LKUP_VRTypes.VRIndividualType)=True)) OR (((vacLog.BadgeNbr)=[@BadgeNbr]) AND ((vacLog.VRDate)>[@CutOffDateWeeks]) AND ((vacLog.vrYear)=[@VacationYear]) AND ((LKUP_VRStatus.VRAllowCancel)=True) AND ((LKUP_VRTypes.VRIndividualType)=False)) ORDER BY vacLog.VRDate; Douglas Barnes Starn Technical Services P.O. Box 1172 1057 French Street Meadville, PA 16335 P: 814.724.1045 F: 814.337.3460 -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From kismert at gmail.com Fri Oct 9 13:52:05 2009 From: kismert at gmail.com (Kenneth Ismert) Date: Fri, 9 Oct 2009 13:52:05 -0500 Subject: [AccessD] It's About Time I Learned This Message-ID: <7c7841600910091152lab57189hbd038a3614ac192@mail.gmail.com> Rocky: > Works really well, but it's not real convenient to work with - especially > during development when the query needs tweaking. I thought there was some > way to inject the parameteres right into a stored query. Maybe not. > Susan Harkins and I wrote an article on a technique that does just that for Access Advisor some time back. In summary, you build a fixed query with a fixed where clause that ANDs all of your form conditional parameters together, using expressions like: ((nz([Table].[Field]=[Forms]![MyForm]![cboField],True))=True) The idea is when a value is selected in cboField, the expression returns true only when Table.Field has a matching value. But, when cboField is null, the inner comparison always evaluates to null, and the nz() always returns true, in effect taking the comparison out of the where clause. This might sound inefficient, but in practice it works very well. The more complex the underlying query, the more benefit it gives. This technique avoids: * Constructing custom SQL in code with custom WHERE clauses, and all the accompanying code * The (sometimes considerable) delay that accompanies parsing complex SQL for every new query. -Ken From miscellany at mvps.org Fri Oct 9 17:54:40 2009 From: miscellany at mvps.org (Steve Schapel) Date: Sat, 10 Oct 2009 11:54:40 +1300 Subject: [AccessD] Firday OT: What books do 8 years old kids reads and likesthere? In-Reply-To: <001501ca48de$1b299510$517cbf30$@spb.ru> References: <001501ca48de$1b299510$517cbf30$@spb.ru> Message-ID: Shamil, My daughter is 8. She loves Enid Blyton, especially the Famous Five series. Also Roald Dahl. Regards Steve -------------------------------------------------- From: "Shamil Salakhetdinov" Sent: Saturday, October 10, 2009 1:43 AM To: "'Access Developers discussion and problem solving'" Subject: [AccessD] Firday OT: What books do 8 years old kids reads and likesthere? > Hi All, > > I wanted to order some books in English from Amazon for my son. > > Well, I should note my son is awaiting for several "Bakugan Battle > Brawlers > Game Single LOOSE Figures" to come delivered from Amazon not books - the > kids are "crazy" about Bakugans here now and the best choice of these toys > is currently presented on Amazon. > > And I wanted to use this opportunity to buy some books together with > Bakugans but not the very well known here books as e.g of the following > classic authors From max.wanadoo at gmail.com Sat Oct 10 10:56:09 2009 From: max.wanadoo at gmail.com (Max Wanadoo) Date: Sat, 10 Oct 2009 16:56:09 +0100 Subject: [AccessD] Firday OT: What books do 8 years old kids reads and likes there? In-Reply-To: <001501ca48de$1b299510$517cbf30$@spb.ru> References: <001501ca48de$1b299510$517cbf30$@spb.ru> Message-ID: <4ad0aea5.0a04d00a.6403.09a0@mx.google.com> Hi Shamil, I loved the stories from 1001 Arabian Nights and also Aesop Fables. The latter always has a moral to the story. Here are some links. In particular the Aesop Fables enables your son to LISTEN to the story as well as read it. http://www.arabiantales.org/ http://aesopfables.com/ Max -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Shamil Salakhetdinov Sent: 09 October 2009 13:43 To: 'Access Developers discussion and problem solving' Subject: [AccessD] Firday OT: What books do 8 years old kids reads and likes there? Hi All, I wanted to order some books in English from Amazon for my son. Well, I should note my son is awaiting for several "Bakugan Battle Brawlers Game Single LOOSE Figures" to come delivered from Amazon not books - the kids are "crazy" about Bakugans here now and the best choice of these toys is currently presented on Amazon. And I wanted to use this opportunity to buy some books together with Bakugans but not the very well known here books as e.g of the following classic authors Jack London, Mark Twain, Rudyard Kipling, Astrid Lindgren, Brothers Grimm, Charles Perrault, Hans Christian Andersen, Lewis Carroll, Frank Baum, Carlo Collodi, James Fennimore Cooper, Jules Verne, Arthur Conan Doyle . But some other more rare books your kids read there at age of 8. Could you please advise such books? Would "The Norton Anthology of Children's Literature: The Traditions in English" by Jack Zipes (Editor), Lissa Paul (Editor), Lynne Vallone (Editor), Peter Hunt (Editor), Gillian Avery (Editor) be a good choice now for me to read it with my son to get more informed about your children's' literature, and to purchase some more books in the future? Thank you. -- Shamil -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From krosenstiel at comcast.net Sat Oct 10 13:04:10 2009 From: krosenstiel at comcast.net (Karen Rosenstiel) Date: Sat, 10 Oct 2009 11:04:10 -0700 Subject: [AccessD] Firday OT: What books do 8 years old kids reads andlikes there? In-Reply-To: <4ad0aea5.0a04d00a.6403.09a0@mx.google.com> References: <001501ca48de$1b299510$517cbf30$@spb.ru> <4ad0aea5.0a04d00a.6403.09a0@mx.google.com> Message-ID: Be careful of the arabiantales.org site. The original tales have a great deal of sexual content. Pretty mature for an 8 year old. Burton's translation was extremely shocking to the Victorians. Regards, Karen Rosenstiel Seattle WA USA -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Max Wanadoo Sent: Saturday, October 10, 2009 8:56 AM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Firday OT: What books do 8 years old kids reads andlikes there? Hi Shamil, I loved the stories from 1001 Arabian Nights and also Aesop Fables. The latter always has a moral to the story. Here are some links. In particular the Aesop Fables enables your son to LISTEN to the story as well as read it. http://www.arabiantales.org/ http://aesopfables.com/ Max -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Shamil Salakhetdinov Sent: 09 October 2009 13:43 To: 'Access Developers discussion and problem solving' Subject: [AccessD] Firday OT: What books do 8 years old kids reads and likes there? Hi All, I wanted to order some books in English from Amazon for my son. Well, I should note my son is awaiting for several "Bakugan Battle Brawlers Game Single LOOSE Figures" to come delivered from Amazon not books - the kids are "crazy" about Bakugans here now and the best choice of these toys is currently presented on Amazon. And I wanted to use this opportunity to buy some books together with Bakugans but not the very well known here books as e.g of the following classic authors Jack London, Mark Twain, Rudyard Kipling, Astrid Lindgren, Brothers Grimm, Charles Perrault, Hans Christian Andersen, Lewis Carroll, Frank Baum, Carlo Collodi, James Fennimore Cooper, Jules Verne, Arthur Conan Doyle . But some other more rare books your kids read there at age of 8. Could you please advise such books? Would "The Norton Anthology of Children's Literature: The Traditions in English" by Jack Zipes (Editor), Lissa Paul (Editor), Lynne Vallone (Editor), Peter Hunt (Editor), Gillian Avery (Editor) be a good choice now for me to read it with my son to get more informed about your children's' literature, and to purchase some more books in the future? Thank you. -- Shamil -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From max.wanadoo at gmail.com Sat Oct 10 13:18:23 2009 From: max.wanadoo at gmail.com (Max Wanadoo) Date: Sat, 10 Oct 2009 19:18:23 +0100 Subject: [AccessD] Firday OT: What books do 8 years old kids reads andlikes there? In-Reply-To: References: <001501ca48de$1b299510$517cbf30$@spb.ru> <4ad0aea5.0a04d00a.6403.09a0@mx.google.com> Message-ID: <4ad0cff9.0508d00a.6068.5826@mx.google.com> Good point Karen, many years since I read them but I do remember them being very exciting and of course, many have been made into films over the years. Max -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Karen Rosenstiel Sent: 10 October 2009 19:04 To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Firday OT: What books do 8 years old kids reads andlikes there? Be careful of the arabiantales.org site. The original tales have a great deal of sexual content. Pretty mature for an 8 year old. Burton's translation was extremely shocking to the Victorians. Regards, Karen Rosenstiel Seattle WA USA -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Max Wanadoo Sent: Saturday, October 10, 2009 8:56 AM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Firday OT: What books do 8 years old kids reads andlikes there? Hi Shamil, I loved the stories from 1001 Arabian Nights and also Aesop Fables. The latter always has a moral to the story. Here are some links. In particular the Aesop Fables enables your son to LISTEN to the story as well as read it. http://www.arabiantales.org/ http://aesopfables.com/ Max -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Shamil Salakhetdinov Sent: 09 October 2009 13:43 To: 'Access Developers discussion and problem solving' Subject: [AccessD] Firday OT: What books do 8 years old kids reads and likes there? Hi All, I wanted to order some books in English from Amazon for my son. Well, I should note my son is awaiting for several "Bakugan Battle Brawlers Game Single LOOSE Figures" to come delivered from Amazon not books - the kids are "crazy" about Bakugans here now and the best choice of these toys is currently presented on Amazon. And I wanted to use this opportunity to buy some books together with Bakugans but not the very well known here books as e.g of the following classic authors Jack London, Mark Twain, Rudyard Kipling, Astrid Lindgren, Brothers Grimm, Charles Perrault, Hans Christian Andersen, Lewis Carroll, Frank Baum, Carlo Collodi, James Fennimore Cooper, Jules Verne, Arthur Conan Doyle . But some other more rare books your kids read there at age of 8. Could you please advise such books? Would "The Norton Anthology of Children's Literature: The Traditions in English" by Jack Zipes (Editor), Lissa Paul (Editor), Lynne Vallone (Editor), Peter Hunt (Editor), Gillian Avery (Editor) be a good choice now for me to read it with my son to get more informed about your children's' literature, and to purchase some more books in the future? Thank you. -- Shamil -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/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 shamil at smsconsulting.spb.ru Sat Oct 10 17:25:17 2009 From: shamil at smsconsulting.spb.ru (Shamil Salakhetdinov) Date: Sun, 11 Oct 2009 02:25:17 +0400 Subject: [AccessD] Firday OT: What books do 8 years old kids reads andlikes there? In-Reply-To: <4ad0cff9.0508d00a.6068.5826@mx.google.com> References: <001501ca48de$1b299510$517cbf30$@spb.ru> <4ad0aea5.0a04d00a.6403.09a0@mx.google.com> <4ad0cff9.0508d00a.6068.5826@mx.google.com> Message-ID: <000a01ca49f8$8d5cd9b0$a8168d10$@spb.ru> Hi All, Thank you for all your advises, I have got collected them and I will use then as a guide my books purchases on Amazon for my son. Unfortunately I have limited resources and I can't buy all the books recommended by you. My current purchase list is in P.S. of this message. The next purchase list (somewhere next year) starts with the following title: "The Wind in the Willows" by Kenneth Grahame I must note my son likes making LEGO constructions and developing animation movies therefore my list have some titles on that subjects. As for classic books JC joked about he doesn't know why they are called classics - of course they are called classic books because they talk about eternal matters... if only we were able to understand that when we were young... Let me also note that my original message's list of classic authors is what is available here in Russian (and sometimes in English) (and was available in ex-USSRs times - and I did read all that authors that time) - so my "quest" was for the classic (and not only classic) books for kids, which are not known here - and I have got that long list from you - thank you a lot! Let's have this thread closed now. Thank you all again for your help. Have nice weekend. -- Shamil P.S. 1) The Little Engine That Could (Original Classic Edition) 2) Watership Down: A Novel, by Richard Adams 3) How the Heather Looks: A Joyous Journey to the British Sources of Children's Books 5) The Norton Anthology of Children's Literature: The Traditions in English 6) LEGO Star Wars: The Visual Dictionary 7) The Unofficial LEGO Builder's Guide 8) LEGO MINDSTORMS NXT One-Kit Wonders: Ten Inventions to Spark Your Imagination 9) Gardner's Guide to Animation Scriptwriting: The Writer's Road Map (Gardner's Guide series) -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Max Wanadoo Sent: Saturday, October 10, 2009 10:18 PM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Firday OT: What books do 8 years old kids reads andlikes there? Good point Karen, many years since I read them but I do remember them being very exciting and of course, many have been made into films over the years. Max -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Karen Rosenstiel Sent: 10 October 2009 19:04 To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Firday OT: What books do 8 years old kids reads andlikes there? Be careful of the arabiantales.org site. The original tales have a great deal of sexual content. Pretty mature for an 8 year old. Burton's translation was extremely shocking to the Victorians. Regards, Karen Rosenstiel Seattle WA USA -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Max Wanadoo Sent: Saturday, October 10, 2009 8:56 AM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Firday OT: What books do 8 years old kids reads andlikes there? Hi Shamil, I loved the stories from 1001 Arabian Nights and also Aesop Fables. The latter always has a moral to the story. Here are some links. In particular the Aesop Fables enables your son to LISTEN to the story as well as read it. http://www.arabiantales.org/ http://aesopfables.com/ Max -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Shamil Salakhetdinov Sent: 09 October 2009 13:43 To: 'Access Developers discussion and problem solving' Subject: [AccessD] Firday OT: What books do 8 years old kids reads and likes there? Hi All, I wanted to order some books in English from Amazon for my son. Well, I should note my son is awaiting for several "Bakugan Battle Brawlers Game Single LOOSE Figures" to come delivered from Amazon not books - the kids are "crazy" about Bakugans here now and the best choice of these toys is currently presented on Amazon. And I wanted to use this opportunity to buy some books together with Bakugans but not the very well known here books as e.g of the following classic authors Jack London, Mark Twain, Rudyard Kipling, Astrid Lindgren, Brothers Grimm, Charles Perrault, Hans Christian Andersen, Lewis Carroll, Frank Baum, Carlo Collodi, James Fennimore Cooper, Jules Verne, Arthur Conan Doyle . But some other more rare books your kids read there at age of 8. Could you please advise such books? Would "The Norton Anthology of Children's Literature: The Traditions in English" by Jack Zipes (Editor), Lissa Paul (Editor), Lynne Vallone (Editor), Peter Hunt (Editor), Gillian Avery (Editor) be a good choice now for me to read it with my son to get more informed about your children's' literature, and to purchase some more books in the future? Thank you. -- Shamil -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/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 __________ Information from ESET NOD32 Antivirus, version of virus signature database 4496 (20091010) __________ The message was checked by ESET NOD32 Antivirus. http://www.esetnod32.ru __________ Information from ESET NOD32 Antivirus, version of virus signature database 4496 (20091010) __________ The message was checked by ESET NOD32 Antivirus. http://www.esetnod32.ru From fuller.artful at gmail.com Sun Oct 11 09:37:04 2009 From: fuller.artful at gmail.com (Arthur Fuller) Date: Sun, 11 Oct 2009 10:37:04 -0400 Subject: [AccessD] Query Puzzler Message-ID: <29f585dd0910110737o50852d80y2908c07b05d9f6de@mail.gmail.com> I have a named delete query which seems to perform as expected when executed from the database window (well, I haven't actually executed it, but only displayed the result grid) but when I try to run said query from code I get the following error message: Error #3709-The search key was not found in any record. I have gone through the usual suspects (compact and repair, recompile, etc.) with no solution yet. It's driving me nuts (a short drive to be sure). Any ideas, anyone? TIA, Arthur From rockysmolin at bchacc.com Sun Oct 11 09:48:03 2009 From: rockysmolin at bchacc.com (Rocky Smolin) Date: Sun, 11 Oct 2009 07:48:03 -0700 Subject: [AccessD] Query Puzzler In-Reply-To: <29f585dd0910110737o50852d80y2908c07b05d9f6de@mail.gmail.com> References: <29f585dd0910110737o50852d80y2908c07b05d9f6de@mail.gmail.com> Message-ID: <79F06D0F191844A699DCBA7325B4CE5B@HAL9005> Can you post the SQL? Rocky -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Arthur Fuller Sent: Sunday, October 11, 2009 7:37 AM To: Access Developers discussion and problem solving Subject: [AccessD] Query Puzzler I have a named delete query which seems to perform as expected when executed from the database window (well, I haven't actually executed it, but only displayed the result grid) but when I try to run said query from code I get the following error message: Error #3709-The search key was not found in any record. I have gone through the usual suspects (compact and repair, recompile, etc.) with no solution yet. It's driving me nuts (a short drive to be sure). Any ideas, anyone? TIA, Arthur -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From fuller.artful at gmail.com Sun Oct 11 09:59:20 2009 From: fuller.artful at gmail.com (Arthur Fuller) Date: Sun, 11 Oct 2009 10:59:20 -0400 Subject: [AccessD] Query Puzzler In-Reply-To: <79F06D0F191844A699DCBA7325B4CE5B@HAL9005> References: <29f585dd0910110737o50852d80y2908c07b05d9f6de@mail.gmail.com> <79F06D0F191844A699DCBA7325B4CE5B@HAL9005> Message-ID: <29f585dd0910110759v5e1db44k5493e1d5e1c0d371@mail.gmail.com> The SQL couldn't be more straightforward, Rocky. It just says "Delete * From myTable Where AssessID = 1574". There are 25 matching rows. But since my original post I've been Googling and Allan Browne suggests that this error 3709 may indicate a corrupt index. I've created a new BE and imported the data into it. Just checking now to see if that makes the problem go away. Arthur On Sun, Oct 11, 2009 at 10:48 AM, Rocky Smolin wrote: > Can you post the SQL? > > Rocky > > From rockysmolin at bchacc.com Sun Oct 11 10:24:42 2009 From: rockysmolin at bchacc.com (Rocky Smolin) Date: Sun, 11 Oct 2009 08:24:42 -0700 Subject: [AccessD] Query Puzzler In-Reply-To: <29f585dd0910110759v5e1db44k5493e1d5e1c0d371@mail.gmail.com> References: <29f585dd0910110737o50852d80y2908c07b05d9f6de@mail.gmail.com><79F06D0F191844A699DCBA7325B4CE5B@HAL9005> <29f585dd0910110759v5e1db44k5493e1d5e1c0d371@mail.gmail.com> Message-ID: <192E27E7ACA74E7B83AC68A8BFE7CDE0@HAL9005> I'd be curious to know what would happen if you deleted the indexes from the table and then re-created them. R -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Arthur Fuller Sent: Sunday, October 11, 2009 7:59 AM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Query Puzzler The SQL couldn't be more straightforward, Rocky. It just says "Delete * From myTable Where AssessID = 1574". There are 25 matching rows. But since my original post I've been Googling and Allan Browne suggests that this error 3709 may indicate a corrupt index. I've created a new BE and imported the data into it. Just checking now to see if that makes the problem go away. Arthur On Sun, Oct 11, 2009 at 10:48 AM, Rocky Smolin wrote: > Can you post the SQL? > > 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 Sun Oct 11 12:32:26 2009 From: fuller.artful at gmail.com (Arthur Fuller) Date: Sun, 11 Oct 2009 13:32:26 -0400 Subject: [AccessD] Query Puzzler In-Reply-To: <192E27E7ACA74E7B83AC68A8BFE7CDE0@HAL9005> References: <29f585dd0910110737o50852d80y2908c07b05d9f6de@mail.gmail.com> <79F06D0F191844A699DCBA7325B4CE5B@HAL9005> <29f585dd0910110759v5e1db44k5493e1d5e1c0d371@mail.gmail.com> <192E27E7ACA74E7B83AC68A8BFE7CDE0@HAL9005> Message-ID: <29f585dd0910111032w2c945ef9pdbb001f3c3452d81@mail.gmail.com> That may have been a simpler approach, but instead I created a new BE and imported the old data. (Aside: interestingly, despite the fact that I did a compact&repair before doing the import, the target db was 2MB smaller than the source DB. No idea why.) (Aside #2: I'm currently thinking that Bing is way better than Google.) In this particular case, the client knows enough about Access to shoot himself in the foot. How he managed to corrupt the BE while horsing around eludes me, but he managed. I fixed the corruption and now all is relatively well. However, fixing the corruption caused a new problem to emerge: Later in the same procedure I attempt to run a report, and suddenly I'm getting the error message: "You canceled the previous operation." Does anyone know what inspires this message? TIA, Arthur On Sun, Oct 11, 2009 at 11:24 AM, Rocky Smolin wrote: > I'd be curious to know what would happen if you deleted the indexes from > the > table and then re-created them. > R > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Arthur Fuller > Sent: Sunday, October 11, 2009 7:59 AM > To: Access Developers discussion and problem solving > Subject: Re: [AccessD] Query Puzzler > > The SQL couldn't be more straightforward, Rocky. It just says "Delete * > From > myTable Where AssessID = 1574". There are 25 matching rows. But since my > original post I've been Googling and Allan Browne suggests that this error > 3709 may indicate a corrupt index. I've created a new BE and imported the > data into it. Just checking now to see if that makes the problem go away. > Arthur > > On Sun, Oct 11, 2009 at 10:48 AM, Rocky Smolin > wrote: > > > Can you post the SQL? > > > > 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 Sun Oct 11 12:54:43 2009 From: rockysmolin at bchacc.com (Rocky Smolin) Date: Sun, 11 Oct 2009 10:54:43 -0700 Subject: [AccessD] Query Puzzler In-Reply-To: <29f585dd0910111032w2c945ef9pdbb001f3c3452d81@mail.gmail.com> References: <29f585dd0910110737o50852d80y2908c07b05d9f6de@mail.gmail.com><79F06D0F191844A699DCBA7325B4CE5B@HAL9005><29f585dd0910110759v5e1db44k5493e1d5e1c0d371@mail.gmail.com><192E27E7ACA74E7B83AC68A8BFE7CDE0@HAL9005> <29f585dd0910111032w2c945ef9pdbb001f3c3452d81@mail.gmail.com> Message-ID: <36818E9AE6134351850F3FE29EA91620@HAL9005> That is one of Microsoft's most cryptic messages. It actually means, IME, the current operation. And usually has indicated to me a problem with the record source of the form or report. Or the SQL in a db.Execute. Rocky -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Arthur Fuller Sent: Sunday, October 11, 2009 10:32 AM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Query Puzzler That may have been a simpler approach, but instead I created a new BE and imported the old data. (Aside: interestingly, despite the fact that I did a compact&repair before doing the import, the target db was 2MB smaller than the source DB. No idea why.) (Aside #2: I'm currently thinking that Bing is way better than Google.) In this particular case, the client knows enough about Access to shoot himself in the foot. How he managed to corrupt the BE while horsing around eludes me, but he managed. I fixed the corruption and now all is relatively well. However, fixing the corruption caused a new problem to emerge: Later in the same procedure I attempt to run a report, and suddenly I'm getting the error message: "You canceled the previous operation." Does anyone know what inspires this message? TIA, Arthur On Sun, Oct 11, 2009 at 11:24 AM, Rocky Smolin wrote: > I'd be curious to know what would happen if you deleted the indexes > from the table and then re-created them. > R > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Arthur > Fuller > Sent: Sunday, October 11, 2009 7:59 AM > To: Access Developers discussion and problem solving > Subject: Re: [AccessD] Query Puzzler > > The SQL couldn't be more straightforward, Rocky. It just says "Delete > * From myTable Where AssessID = 1574". There are 25 matching rows. But > since my original post I've been Googling and Allan Browne suggests > that this error > 3709 may indicate a corrupt index. I've created a new BE and imported > the data into it. Just checking now to see if that makes the problem go away. > Arthur > > On Sun, Oct 11, 2009 at 10:48 AM, Rocky Smolin > wrote: > > > Can you post the SQL? > > > > 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 > -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From rockysmolin at bchacc.com Sun Oct 11 12:59:37 2009 From: rockysmolin at bchacc.com (Rocky Smolin) Date: Sun, 11 Oct 2009 10:59:37 -0700 Subject: [AccessD] Query Puzzler In-Reply-To: <36818E9AE6134351850F3FE29EA91620@HAL9005> References: <29f585dd0910110737o50852d80y2908c07b05d9f6de@mail.gmail.com><79F06D0F191844A699DCBA7325B4CE5B@HAL9005><29f585dd0910110759v5e1db44k5493e1d5e1c0d371@mail.gmail.com><192E27E7ACA74E7B83AC68A8BFE7CDE0@HAL9005><29f585dd0910111032w2c945ef9pdbb001f3c3452d81@mail.gmail.com> <36818E9AE6134351850F3FE29EA91620@HAL9005> Message-ID: P.S. Just got it myself in a Dlookup. So I guess you can add Domain functions to the list of stuff that generates this error. Rocky -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Rocky Smolin Sent: Sunday, October 11, 2009 10:55 AM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Query Puzzler That is one of Microsoft's most cryptic messages. It actually means, IME, the current operation. And usually has indicated to me a problem with the record source of the form or report. Or the SQL in a db.Execute. Rocky -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Arthur Fuller Sent: Sunday, October 11, 2009 10:32 AM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Query Puzzler That may have been a simpler approach, but instead I created a new BE and imported the old data. (Aside: interestingly, despite the fact that I did a compact&repair before doing the import, the target db was 2MB smaller than the source DB. No idea why.) (Aside #2: I'm currently thinking that Bing is way better than Google.) In this particular case, the client knows enough about Access to shoot himself in the foot. How he managed to corrupt the BE while horsing around eludes me, but he managed. I fixed the corruption and now all is relatively well. However, fixing the corruption caused a new problem to emerge: Later in the same procedure I attempt to run a report, and suddenly I'm getting the error message: "You canceled the previous operation." Does anyone know what inspires this message? TIA, Arthur On Sun, Oct 11, 2009 at 11:24 AM, Rocky Smolin wrote: > I'd be curious to know what would happen if you deleted the indexes > from the table and then re-created them. > R > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Arthur > Fuller > Sent: Sunday, October 11, 2009 7:59 AM > To: Access Developers discussion and problem solving > Subject: Re: [AccessD] Query Puzzler > > The SQL couldn't be more straightforward, Rocky. It just says "Delete > * From myTable Where AssessID = 1574". There are 25 matching rows. But > since my original post I've been Googling and Allan Browne suggests > that this error > 3709 may indicate a corrupt index. I've created a new BE and imported > the data into it. Just checking now to see if that makes the problem > go away. > Arthur > > On Sun, Oct 11, 2009 at 10:48 AM, Rocky Smolin > wrote: > > > Can you post the SQL? > > > > 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 > -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From max.wanadoo at gmail.com Sun Oct 11 13:04:56 2009 From: max.wanadoo at gmail.com (Max Wanadoo) Date: Sun, 11 Oct 2009 19:04:56 +0100 Subject: [AccessD] Query Puzzler In-Reply-To: References: <29f585dd0910110737o50852d80y2908c07b05d9f6de@mail.gmail.com><79F06D0F191844A699DCBA7325B4CE5B@HAL9005><29f585dd0910110759v5e1db44k5493e1d5e1c0d371@mail.gmail.com><192E27E7ACA74E7B83AC68A8BFE7CDE0@HAL9005><29f585dd0910111032w2c945ef9pdbb001f3c3452d81@mail.gmail.com> <36818E9AE6134351850F3FE29EA91620@HAL9005> Message-ID: <4ad21e55.1701d00a.28c4.2dcc@mx.google.com> R, In a dlookup you have probably entered an incorrect value in one or more of the criterion. Similarly for a sql statement. In code, it can mean that you tried to do something which it could resolve, ie. Run a line saying me.dirty=false when in the background it has something open which is updating the form's recordset. As you say, a very nebulous error message and covers a raft of reasons, but generally they can be found by "looking around". Max -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Rocky Smolin Sent: 11 October 2009 19:00 To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Query Puzzler P.S. Just got it myself in a Dlookup. So I guess you can add Domain functions to the list of stuff that generates this error. Rocky -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Rocky Smolin Sent: Sunday, October 11, 2009 10:55 AM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Query Puzzler That is one of Microsoft's most cryptic messages. It actually means, IME, the current operation. And usually has indicated to me a problem with the record source of the form or report. Or the SQL in a db.Execute. Rocky -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Arthur Fuller Sent: Sunday, October 11, 2009 10:32 AM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Query Puzzler That may have been a simpler approach, but instead I created a new BE and imported the old data. (Aside: interestingly, despite the fact that I did a compact&repair before doing the import, the target db was 2MB smaller than the source DB. No idea why.) (Aside #2: I'm currently thinking that Bing is way better than Google.) In this particular case, the client knows enough about Access to shoot himself in the foot. How he managed to corrupt the BE while horsing around eludes me, but he managed. I fixed the corruption and now all is relatively well. However, fixing the corruption caused a new problem to emerge: Later in the same procedure I attempt to run a report, and suddenly I'm getting the error message: "You canceled the previous operation." Does anyone know what inspires this message? TIA, Arthur On Sun, Oct 11, 2009 at 11:24 AM, Rocky Smolin wrote: > I'd be curious to know what would happen if you deleted the indexes > from the table and then re-created them. > R > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Arthur > Fuller > Sent: Sunday, October 11, 2009 7:59 AM > To: Access Developers discussion and problem solving > Subject: Re: [AccessD] Query Puzzler > > The SQL couldn't be more straightforward, Rocky. It just says "Delete > * From myTable Where AssessID = 1574". There are 25 matching rows. But > since my original post I've been Googling and Allan Browne suggests > that this error > 3709 may indicate a corrupt index. I've created a new BE and imported > the data into it. Just checking now to see if that makes the problem > go away. > Arthur > > On Sun, Oct 11, 2009 at 10:48 AM, Rocky Smolin > wrote: > > > Can you post the SQL? > > > > 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 > -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/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 dbdoug at gmail.com Sun Oct 11 13:09:53 2009 From: dbdoug at gmail.com (Doug Steele) Date: Sun, 11 Oct 2009 11:09:53 -0700 Subject: [AccessD] Query Puzzler In-Reply-To: References: <29f585dd0910110737o50852d80y2908c07b05d9f6de@mail.gmail.com> <79F06D0F191844A699DCBA7325B4CE5B@HAL9005> <29f585dd0910110759v5e1db44k5493e1d5e1c0d371@mail.gmail.com> <192E27E7ACA74E7B83AC68A8BFE7CDE0@HAL9005> <29f585dd0910111032w2c945ef9pdbb001f3c3452d81@mail.gmail.com> <36818E9AE6134351850F3FE29EA91620@HAL9005> Message-ID: <4dd71a0c0910111109r7dbe915frb6ed023d4e37ea53@mail.gmail.com> Whenever I've run into that 'Search key not found' message, it has been a corrupt table. You can sometimes see the bad record if you look at the table - a bunch of # signs in a field. I've always been able to get out of that with a compact and repair, though. With one caveat - occasionally in repairing a table, Access will remove the primary key property of the key fields! The first time that happened, it took me two days to track down the problem. Doug Steele From Darryl.Collins at anz.com Sun Oct 11 21:54:42 2009 From: Darryl.Collins at anz.com (Collins, Darryl) Date: Mon, 12 Oct 2009 13:54:42 +1100 Subject: [AccessD] Insert Into 101 In-Reply-To: <4dd71a0c0910111109r7dbe915frb6ed023d4e37ea53@mail.gmail.com> Message-ID: <6DC4725FDCDD72428D6114F1B6CC6E81C7956F@EXUAU020HWT110.oceania.corp.anz.com> Hi Folks, I know I can do this INSERT INTO tblMyTable SELECT * FROM tblMyOtherTable Is there any way of using SQL to select a recordset and then using that RS in the insert statement? cnn.Open DbADOConStr Set rst = New ADODB.Recordset rst.CursorLocation = adUseClient rst.Open gstrSQL, cnn, adOpenForwardOnly, adLockReadOnly INSERT INTO tblMyTable SELECT * FROM " & rst I have a work-around for this already, but it involves looping and cloning recordsets and jumping thru other hoops. Frankly it seems very inelegant and inefficent (even though it is fast enough for my purposes). I am sure there must be a way of getting a recordset for the backend and just dumping the whole thing into a local table (assuming all the fields line up ofcourse). Cheers Darryl "This e-mail and any attachments to it (the "Communication") is, unless otherwise stated, confidential, may contain copyright material and is for the use only of the intended recipient. If you receive the Communication in error, please notify the sender immediately by return e-mail, delete the Communication and the return e-mail, and do not read, copy, retransmit or otherwise deal with it. Any views expressed in the Communication are those of the individual sender only, unless expressly stated to be those of Australia and New Zealand Banking Group Limited ABN 11 005 357 522, or any of its related entities including ANZ National Bank Limited (together "ANZ"). ANZ does not accept liability in connection with the integrity of or errors in the Communication, computer virus, data corruption, interference or delay arising from or in respect of the Communication." From darren at activebilling.com.au Mon Oct 12 00:01:12 2009 From: darren at activebilling.com.au (Darren - Active Billing) Date: Mon, 12 Oct 2009 16:01:12 +1100 Subject: [AccessD] Insert Into 101 In-Reply-To: <6DC4725FDCDD72428D6114F1B6CC6E81C7956F@EXUAU020HWT110.oceania.corp.anz.com> References: <4dd71a0c0910111109r7dbe915frb6ed023d4e37ea53@mail.gmail.com> <6DC4725FDCDD72428D6114F1B6CC6E81C7956F@EXUAU020HWT110.oceania.corp.anz.com> Message-ID: <00c001ca4af9$07bd0260$05000100@denzilnote> Hi Daz I've just grabbed something I use to populate a local table in my access App called "tblAccounts" with data from an SQLServer table called "Accounts" I've removed some bits here in the email editor so I hope it still works I also run a small function called "f_ SetSQLSVRConnection" to connect to the SQL Server - It's included here at the bottom - makes it easier than typing that crap all the time Hope this is useful See ya DD ~~~~~~~~~~~~~~~~~~~~~~~~~ Dim conn1 As New ADODB.Connection Dim conn2 As Object Dim rs1 As New ADODB.Recordset Dim rs2 As Object Dim selSQL1 As String Dim selSQL2 As String Dim delSQL1 As String 'get all account records from the SQL Server table "Accounts" selSQL1 = "select * from Accounts order By AccountNo" 'Get a recordset happening for the local Access table "tblAccounts" selSQL2 = "SELECT * from tblAccount" 'get a recordset ready to clear previous entries in our local temp table delSQL1 = "Delete * from tblAccount" conn1 = f_SetSQLSVRConnection 'All the Connection string stuff in this function conn1.Open rs1.Open selSQL1, conn1, adOpenStatic DoCmd.RunSQL delSQL1 ' Clear previous entries Set rs2 = CreateObject("ADODB.Recordset") Set conn2 = Application.CurrentProject.Connection rs2.Open selSQL2, conn2, 1, 3 Do Until rs1.EOF With rs2 .AddNew !AccountNo = rs1!AccountNo !CompanyName = rs1!CompanyName !DateCreated = rs1!DateCreated !DateCancelled = rs1!DateCancelled .Update End With rs1.MoveNext Loop End If rs1.Close conn1.Close Set rs1 = Nothing Set conn1 = Nothing ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Function f_SetSQLSVRConnection() On Error GoTo Err_ Dim strdB As String Dim strServerName As String Dim strConnect As String Dim strUserID As String Dim strPassword As String strdB = DLookup("[DatabaseName]", "tblClients", "ClientID = " & Forms!xfrmBeast!txtClientID) strServerName = DLookup("[DefaultServer]", "tblClients", "ClientID = " & Forms!xfrmBeast!txtClientID) strConnect = Application.CurrentProject.Connection strUserID = DLookup("[ActiveUserName]", "tblOptions_LOCAL") strPassword = DLookup("[ActivePassword]", "tblOptions_LOCAL") f_SetSQLSVRConnection = "Provider=SQLOLEDB.1;Persist Security Info=True;User ID=" & strUserID & ";Initial Catalog=" & strdB & ";Data Source= " & strServerName & ";Password=" & strPassword 'Debug.Print f_SetSQLSVRConnection Exit_: Exit Function Err_: DoCmd.Hourglass False MsgBox Err.Number & " " & Err.Description, vbCritical, "Error in f_SetSQLSVRConnection Routine" Resume Exit_ End Function ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Many thanks Darren - Active Billing -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Collins, Darryl Sent: Monday, 12 October 2009 1:55 PM To: Access Developers discussion and problem solving Subject: [AccessD] Insert Into 101 Hi Folks, I know I can do this INSERT INTO tblMyTable SELECT * FROM tblMyOtherTable Is there any way of using SQL to select a recordset and then using that RS in the insert statement? cnn.Open DbADOConStr Set rst = New ADODB.Recordset rst.CursorLocation = adUseClient rst.Open gstrSQL, cnn, adOpenForwardOnly, adLockReadOnly INSERT INTO tblMyTable SELECT * FROM " & rst I have a work-around for this already, but it involves looping and cloning recordsets and jumping thru other hoops. Frankly it seems very inelegant and inefficent (even though it is fast enough for my purposes). I am sure there must be a way of getting a recordset for the backend and just dumping the whole thing into a local table (assuming all the fields line up ofcourse). Cheers Darryl "This e-mail and any attachments to it (the "Communication") is, unless otherwise stated, confidential, may contain copyright material and is for the use only of the intended recipient. If you receive the Communication in error, please notify the sender immediately by return e-mail, delete the Communication and the return e-mail, and do not read, copy, retransmit or otherwise deal with it. Any views expressed in the Communication are those of the individual sender only, unless expressly stated to be those of Australia and New Zealand Banking Group Limited ABN 11 005 357 522, or any of its related entities including ANZ National Bank Limited (together "ANZ"). ANZ does not accept liability in connection with the integrity of or errors in the Communication, computer virus, data corruption, interference or delay arising from or in respect of the Communication." -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From darren at activebilling.com.au Mon Oct 12 00:08:04 2009 From: darren at activebilling.com.au (Darren - Active Billing) Date: Mon, 12 Oct 2009 16:08:04 +1100 Subject: [AccessD] Insert Into 101 In-Reply-To: <00c001ca4af9$07bd0260$05000100@denzilnote> References: <4dd71a0c0910111109r7dbe915frb6ed023d4e37ea53@mail.gmail.com><6DC4725FDCDD72428D6114F1B6CC6E81C7956F@EXUAU020HWT110.oceania.corp.anz.com> <00c001ca4af9$07bd0260$05000100@denzilnote> Message-ID: <00c401ca4af9$fbab9a80$05000100@denzilnote> Dazza I forgot to mention - This method takes ~20 secs or so to load 50K records from the SQL Server table to my Access dB - That's quick enough for me. I am sure there are quicker ways though. JC's numbers about update and processing speeds the other day were a zillion times faster but this is very basic Server (1 HDD and not a lot of ram) doing quite a few things apart from hosting the SQL Server sessions But of course Your Mileage May Vary Also don't forget to 'empty' temp tables like this one if you too are going to have many many thousands of records. Bloat goes through the roof if you don't. See ya DD -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Darren - Active Billing Sent: Monday, 12 October 2009 4:01 PM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Insert Into 101 Hi Daz I've just grabbed something I use to populate a local table in my access App called "tblAccounts" with data from an SQLServer table called "Accounts" I've removed some bits here in the email editor so I hope it still works I also run a small function called "f_ SetSQLSVRConnection" to connect to the SQL Server - It's included here at the bottom - makes it easier than typing that crap all the time Hope this is useful See ya DD ~~~~~~~~~~~~~~~~~~~~~~~~~ Dim conn1 As New ADODB.Connection Dim conn2 As Object Dim rs1 As New ADODB.Recordset Dim rs2 As Object Dim selSQL1 As String Dim selSQL2 As String Dim delSQL1 As String 'get all account records from the SQL Server table "Accounts" selSQL1 = "select * from Accounts order By AccountNo" 'Get a recordset happening for the local Access table "tblAccounts" selSQL2 = "SELECT * from tblAccount" 'get a recordset ready to clear previous entries in our local temp table delSQL1 = "Delete * from tblAccount" conn1 = f_SetSQLSVRConnection 'All the Connection string stuff in this function conn1.Open rs1.Open selSQL1, conn1, adOpenStatic DoCmd.RunSQL delSQL1 ' Clear previous entries Set rs2 = CreateObject("ADODB.Recordset") Set conn2 = Application.CurrentProject.Connection rs2.Open selSQL2, conn2, 1, 3 Do Until rs1.EOF With rs2 .AddNew !AccountNo = rs1!AccountNo !CompanyName = rs1!CompanyName !DateCreated = rs1!DateCreated !DateCancelled = rs1!DateCancelled .Update End With rs1.MoveNext Loop End If rs1.Close conn1.Close Set rs1 = Nothing Set conn1 = Nothing ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Function f_SetSQLSVRConnection() On Error GoTo Err_ Dim strdB As String Dim strServerName As String Dim strConnect As String Dim strUserID As String Dim strPassword As String strdB = DLookup("[DatabaseName]", "tblClients", "ClientID = " & Forms!xfrmBeast!txtClientID) strServerName = DLookup("[DefaultServer]", "tblClients", "ClientID = " & Forms!xfrmBeast!txtClientID) strConnect = Application.CurrentProject.Connection strUserID = DLookup("[ActiveUserName]", "tblOptions_LOCAL") strPassword = DLookup("[ActivePassword]", "tblOptions_LOCAL") f_SetSQLSVRConnection = "Provider=SQLOLEDB.1;Persist Security Info=True;User ID=" & strUserID & ";Initial Catalog=" & strdB & ";Data Source= " & strServerName & ";Password=" & strPassword 'Debug.Print f_SetSQLSVRConnection Exit_: Exit Function Err_: DoCmd.Hourglass False MsgBox Err.Number & " " & Err.Description, vbCritical, "Error in f_SetSQLSVRConnection Routine" Resume Exit_ End Function ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Many thanks Darren - Active Billing -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Collins, Darryl Sent: Monday, 12 October 2009 1:55 PM To: Access Developers discussion and problem solving Subject: [AccessD] Insert Into 101 Hi Folks, I know I can do this INSERT INTO tblMyTable SELECT * FROM tblMyOtherTable Is there any way of using SQL to select a recordset and then using that RS in the insert statement? cnn.Open DbADOConStr Set rst = New ADODB.Recordset rst.CursorLocation = adUseClient rst.Open gstrSQL, cnn, adOpenForwardOnly, adLockReadOnly INSERT INTO tblMyTable SELECT * FROM " & rst I have a work-around for this already, but it involves looping and cloning recordsets and jumping thru other hoops. Frankly it seems very inelegant and inefficent (even though it is fast enough for my purposes). I am sure there must be a way of getting a recordset for the backend and just dumping the whole thing into a local table (assuming all the fields line up ofcourse). Cheers Darryl "This e-mail and any attachments to it (the "Communication") is, unless otherwise stated, confidential, may contain copyright material and is for the use only of the intended recipient. If you receive the Communication in error, please notify the sender immediately by return e-mail, delete the Communication and the return e-mail, and do not read, copy, retransmit or otherwise deal with it. Any views expressed in the Communication are those of the individual sender only, unless expressly stated to be those of Australia and New Zealand Banking Group Limited ABN 11 005 357 522, or any of its related entities including ANZ National Bank Limited (together "ANZ"). ANZ does not accept liability in connection with the integrity of or errors in the Communication, computer virus, data corruption, interference or delay arising from or in respect of the Communication." -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From Darryl.Collins at anz.com Mon Oct 12 00:29:50 2009 From: Darryl.Collins at anz.com (Collins, Darryl) Date: Mon, 12 Oct 2009 16:29:50 +1100 Subject: [AccessD] Insert Into 101 In-Reply-To: <00c001ca4af9$07bd0260$05000100@denzilnote> Message-ID: <6DC4725FDCDD72428D6114F1B6CC6E81C79571@EXUAU020HWT110.oceania.corp.anz.com> Hah! Thanks Darren, This is the process I currently have in place right now :) I have even written a function to feed the parameters into the function so I can use this code on just about anything. Yeah, it works fine and fast enough (I am usually only moving a few dozen records) but it seems to be awfully cumbersome and over engineered. I was hoping for something a bit slimer and sexier... But hey, if that is the only way I will stick with it. :) Cheers Darryl. -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Darren - Active Billing Sent: Monday, 12 October 2009 4:01 PM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Insert Into 101 Hi Daz I've just grabbed something I use to populate a local table in my access App called "tblAccounts" with data from an SQLServer table called "Accounts" I've removed some bits here in the email editor so I hope it still works I also run a small function called "f_ SetSQLSVRConnection" to connect to the SQL Server - It's included here at the bottom - makes it easier than typing that crap all the time Hope this is useful See ya DD ~~~~~~~~~~~~~~~~~~~~~~~~~ Dim conn1 As New ADODB.Connection Dim conn2 As Object Dim rs1 As New ADODB.Recordset Dim rs2 As Object Dim selSQL1 As String Dim selSQL2 As String Dim delSQL1 As String 'get all account records from the SQL Server table "Accounts" selSQL1 = "select * from Accounts order By AccountNo" 'Get a recordset happening for the local Access table "tblAccounts" selSQL2 = "SELECT * from tblAccount" 'get a recordset ready to clear previous entries in our local temp table delSQL1 = "Delete * from tblAccount" conn1 = f_SetSQLSVRConnection 'All the Connection string stuff in this function conn1.Open rs1.Open selSQL1, conn1, adOpenStatic DoCmd.RunSQL delSQL1 ' Clear previous entries Set rs2 = CreateObject("ADODB.Recordset") Set conn2 = Application.CurrentProject.Connection rs2.Open selSQL2, conn2, 1, 3 Do Until rs1.EOF With rs2 .AddNew !AccountNo = rs1!AccountNo !CompanyName = rs1!CompanyName !DateCreated = rs1!DateCreated !DateCancelled = rs1!DateCancelled .Update End With rs1.MoveNext Loop End If rs1.Close conn1.Close Set rs1 = Nothing Set conn1 = Nothing ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Function f_SetSQLSVRConnection() On Error GoTo Err_ Dim strdB As String Dim strServerName As String Dim strConnect As String Dim strUserID As String Dim strPassword As String strdB = DLookup("[DatabaseName]", "tblClients", "ClientID = " & Forms!xfrmBeast!txtClientID) strServerName = DLookup("[DefaultServer]", "tblClients", "ClientID = " & Forms!xfrmBeast!txtClientID) strConnect = Application.CurrentProject.Connection strUserID = DLookup("[ActiveUserName]", "tblOptions_LOCAL") strPassword = DLookup("[ActivePassword]", "tblOptions_LOCAL") f_SetSQLSVRConnection = "Provider=SQLOLEDB.1;Persist Security Info=True;User ID=" & strUserID & ";Initial Catalog=" & strdB & ";Data Source= " & strServerName & ";Password=" & strPassword 'Debug.Print f_SetSQLSVRConnection Exit_: Exit Function Err_: DoCmd.Hourglass False MsgBox Err.Number & " " & Err.Description, vbCritical, "Error in f_SetSQLSVRConnection Routine" Resume Exit_ End Function ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~ Many thanks Darren - Active Billing -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Collins, Darryl Sent: Monday, 12 October 2009 1:55 PM To: Access Developers discussion and problem solving Subject: [AccessD] Insert Into 101 Hi Folks, I know I can do this INSERT INTO tblMyTable SELECT * FROM tblMyOtherTable Is there any way of using SQL to select a recordset and then using that RS in the insert statement? cnn.Open DbADOConStr Set rst = New ADODB.Recordset rst.CursorLocation = adUseClient rst.Open gstrSQL, cnn, adOpenForwardOnly, adLockReadOnly INSERT INTO tblMyTable SELECT * FROM " & rst I have a work-around for this already, but it involves looping and cloning recordsets and jumping thru other hoops. Frankly it seems very inelegant and inefficent (even though it is fast enough for my purposes). I am sure there must be a way of getting a recordset for the backend and just dumping the whole thing into a local table (assuming all the fields line up ofcourse). Cheers Darryl "This e-mail and any attachments to it (the "Communication") is, unless otherwise stated, confidential, may contain copyright material and is for the use only of the intended recipient. If you receive the Communication in error, please notify the sender immediately by return e-mail, delete the Communication and the return e-mail, and do not read, copy, retransmit or otherwise deal with it. Any views expressed in the Communication are those of the individual sender only, unless expressly stated to be those of Australia and New Zealand Banking Group Limited ABN 11 005 357 522, or any of its related entities including ANZ National Bank Limited (together "ANZ"). ANZ does not accept liability in connection with the integrity of or errors in the Communication, computer virus, data corruption, interference or delay arising from or in respect of the Communication." -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/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 e-mail and any attachments to it (the "Communication") is, unless otherwise stated, confidential, may contain copyright material and is for the use only of the intended recipient. If you receive the Communication in error, please notify the sender immediately by return e-mail, delete the Communication and the return e-mail, and do not read, copy, retransmit or otherwise deal with it. Any views expressed in the Communication are those of the individual sender only, unless expressly stated to be those of Australia and New Zealand Banking Group Limited ABN 11 005 357 522, or any of its related entities including ANZ National Bank Limited (together "ANZ"). ANZ does not accept liability in connection with the integrity of or errors in the Communication, computer virus, data corruption, interference or delay arising from or in respect of the Communication." From rockysmolin at bchacc.com Mon Oct 12 00:33:06 2009 From: rockysmolin at bchacc.com (Rocky Smolin) Date: Sun, 11 Oct 2009 22:33:06 -0700 Subject: [AccessD] Insert Into 101 In-Reply-To: <6DC4725FDCDD72428D6114F1B6CC6E81C79571@EXUAU020HWT110.oceania.corp.anz.com> References: <00c001ca4af9$07bd0260$05000100@denzilnote> <6DC4725FDCDD72428D6114F1B6CC6E81C79571@EXUAU020HWT110.oceania.corp.anz.com> Message-ID: <8E9D9199D5584D01A022BC568AE8E6B2@HAL9005> Darryl: I've had the problem myself - usually trying to copy a record or group of records with one or two field modified - like cloning a bill of materials or a purchase order detail. If there's a lot of fields, I'll set up a look and cycle through the fields. That avoids a bit of coding and the copy/paste from the design view of the table to avoid the typos. Rocky -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Collins, Darryl Sent: Sunday, October 11, 2009 10:30 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Insert Into 101 Hah! Thanks Darren, This is the process I currently have in place right now :) I have even written a function to feed the parameters into the function so I can use this code on just about anything. Yeah, it works fine and fast enough (I am usually only moving a few dozen records) but it seems to be awfully cumbersome and over engineered. I was hoping for something a bit slimer and sexier... But hey, if that is the only way I will stick with it. :) Cheers Darryl. -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Darren - Active Billing Sent: Monday, 12 October 2009 4:01 PM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Insert Into 101 Hi Daz I've just grabbed something I use to populate a local table in my access App called "tblAccounts" with data from an SQLServer table called "Accounts" I've removed some bits here in the email editor so I hope it still works I also run a small function called "f_ SetSQLSVRConnection" to connect to the SQL Server - It's included here at the bottom - makes it easier than typing that crap all the time Hope this is useful See ya DD ~~~~~~~~~~~~~~~~~~~~~~~~~ Dim conn1 As New ADODB.Connection Dim conn2 As Object Dim rs1 As New ADODB.Recordset Dim rs2 As Object Dim selSQL1 As String Dim selSQL2 As String Dim delSQL1 As String 'get all account records from the SQL Server table "Accounts" selSQL1 = "select * from Accounts order By AccountNo" 'Get a recordset happening for the local Access table "tblAccounts" selSQL2 = "SELECT * from tblAccount" 'get a recordset ready to clear previous entries in our local temp table delSQL1 = "Delete * from tblAccount" conn1 = f_SetSQLSVRConnection 'All the Connection string stuff in this function conn1.Open rs1.Open selSQL1, conn1, adOpenStatic DoCmd.RunSQL delSQL1 ' Clear previous entries Set rs2 = CreateObject("ADODB.Recordset") Set conn2 = Application.CurrentProject.Connection rs2.Open selSQL2, conn2, 1, 3 Do Until rs1.EOF With rs2 .AddNew !AccountNo = rs1!AccountNo !CompanyName = rs1!CompanyName !DateCreated = rs1!DateCreated !DateCancelled = rs1!DateCancelled .Update End With rs1.MoveNext Loop End If rs1.Close conn1.Close Set rs1 = Nothing Set conn1 = Nothing ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Function f_SetSQLSVRConnection() On Error GoTo Err_ Dim strdB As String Dim strServerName As String Dim strConnect As String Dim strUserID As String Dim strPassword As String strdB = DLookup("[DatabaseName]", "tblClients", "ClientID = " & Forms!xfrmBeast!txtClientID) strServerName = DLookup("[DefaultServer]", "tblClients", "ClientID = " & Forms!xfrmBeast!txtClientID) strConnect = Application.CurrentProject.Connection strUserID = DLookup("[ActiveUserName]", "tblOptions_LOCAL") strPassword = DLookup("[ActivePassword]", "tblOptions_LOCAL") f_SetSQLSVRConnection = "Provider=SQLOLEDB.1;Persist Security Info=True;User ID=" & strUserID & ";Initial Catalog=" & strdB & ";Data Source= " & strServerName & ";Password=" & strPassword 'Debug.Print f_SetSQLSVRConnection Exit_: Exit Function Err_: DoCmd.Hourglass False MsgBox Err.Number & " " & Err.Description, vbCritical, "Error in f_SetSQLSVRConnection Routine" Resume Exit_ End Function ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~ Many thanks Darren - Active Billing -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Collins, Darryl Sent: Monday, 12 October 2009 1:55 PM To: Access Developers discussion and problem solving Subject: [AccessD] Insert Into 101 Hi Folks, I know I can do this INSERT INTO tblMyTable SELECT * FROM tblMyOtherTable Is there any way of using SQL to select a recordset and then using that RS in the insert statement? cnn.Open DbADOConStr Set rst = New ADODB.Recordset rst.CursorLocation = adUseClient rst.Open gstrSQL, cnn, adOpenForwardOnly, adLockReadOnly INSERT INTO tblMyTable SELECT * FROM " & rst I have a work-around for this already, but it involves looping and cloning recordsets and jumping thru other hoops. Frankly it seems very inelegant and inefficent (even though it is fast enough for my purposes). I am sure there must be a way of getting a recordset for the backend and just dumping the whole thing into a local table (assuming all the fields line up ofcourse). Cheers Darryl "This e-mail and any attachments to it (the "Communication") is, unless otherwise stated, confidential, may contain copyright material and is for the use only of the intended recipient. If you receive the Communication in error, please notify the sender immediately by return e-mail, delete the Communication and the return e-mail, and do not read, copy, retransmit or otherwise deal with it. Any views expressed in the Communication are those of the individual sender only, unless expressly stated to be those of Australia and New Zealand Banking Group Limited ABN 11 005 357 522, or any of its related entities including ANZ National Bank Limited (together "ANZ"). ANZ does not accept liability in connection with the integrity of or errors in the Communication, computer virus, data corruption, interference or delay arising from or in respect of the Communication." -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/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 e-mail and any attachments to it (the "Communication") is, unless otherwise stated, confidential, may contain copyright material and is for the use only of the intended recipient. If you receive the Communication in error, please notify the sender immediately by return e-mail, delete the Communication and the return e-mail, and do not read, copy, retransmit or otherwise deal with it. Any views expressed in the Communication are those of the individual sender only, unless expressly stated to be those of Australia and New Zealand Banking Group Limited ABN 11 005 357 522, or any of its related entities including ANZ National Bank Limited (together "ANZ"). ANZ does not accept liability in connection with the integrity of or errors in the Communication, computer virus, data corruption, interference or delay arising from or in respect of the Communication." -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From darren at activebilling.com.au Mon Oct 12 00:56:18 2009 From: darren at activebilling.com.au (Darren - Active Billing) Date: Mon, 12 Oct 2009 16:56:18 +1100 Subject: [AccessD] Insert Into 101 In-Reply-To: <6DC4725FDCDD72428D6114F1B6CC6E81C79571@EXUAU020HWT110.oceania.corp.anz.com> References: <00c001ca4af9$07bd0260$05000100@denzilnote> <6DC4725FDCDD72428D6114F1B6CC6E81C79571@EXUAU020HWT110.oceania.corp.anz.com> Message-ID: <00d101ca4b00$b8fde290$05000100@denzilnote> Howdy Mmmm as for being "the only way" I have learned from this list there is (virtually) no such thing as "the only way" Someone, somewhere will have alternative/s :-) See ya Good luck -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Collins, Darryl Sent: Monday, 12 October 2009 4:30 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Insert Into 101 Hah! Thanks Darren, This is the process I currently have in place right now :) I have even written a function to feed the parameters into the function so I can use this code on just about anything. Yeah, it works fine and fast enough (I am usually only moving a few dozen records) but it seems to be awfully cumbersome and over engineered. I was hoping for something a bit slimer and sexier... But hey, if that is the only way I will stick with it. :) Cheers Darryl. -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Darren - Active Billing Sent: Monday, 12 October 2009 4:01 PM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Insert Into 101 Hi Daz I've just grabbed something I use to populate a local table in my access App called "tblAccounts" with data from an SQLServer table called "Accounts" I've removed some bits here in the email editor so I hope it still works I also run a small function called "f_ SetSQLSVRConnection" to connect to the SQL Server - It's included here at the bottom - makes it easier than typing that crap all the time Hope this is useful See ya DD ~~~~~~~~~~~~~~~~~~~~~~~~~ Dim conn1 As New ADODB.Connection Dim conn2 As Object Dim rs1 As New ADODB.Recordset Dim rs2 As Object Dim selSQL1 As String Dim selSQL2 As String Dim delSQL1 As String 'get all account records from the SQL Server table "Accounts" selSQL1 = "select * from Accounts order By AccountNo" 'Get a recordset happening for the local Access table "tblAccounts" selSQL2 = "SELECT * from tblAccount" 'get a recordset ready to clear previous entries in our local temp table delSQL1 = "Delete * from tblAccount" conn1 = f_SetSQLSVRConnection 'All the Connection string stuff in this function conn1.Open rs1.Open selSQL1, conn1, adOpenStatic DoCmd.RunSQL delSQL1 ' Clear previous entries Set rs2 = CreateObject("ADODB.Recordset") Set conn2 = Application.CurrentProject.Connection rs2.Open selSQL2, conn2, 1, 3 Do Until rs1.EOF With rs2 .AddNew !AccountNo = rs1!AccountNo !CompanyName = rs1!CompanyName !DateCreated = rs1!DateCreated !DateCancelled = rs1!DateCancelled .Update End With rs1.MoveNext Loop End If rs1.Close conn1.Close Set rs1 = Nothing Set conn1 = Nothing ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Function f_SetSQLSVRConnection() On Error GoTo Err_ Dim strdB As String Dim strServerName As String Dim strConnect As String Dim strUserID As String Dim strPassword As String strdB = DLookup("[DatabaseName]", "tblClients", "ClientID = " & Forms!xfrmBeast!txtClientID) strServerName = DLookup("[DefaultServer]", "tblClients", "ClientID = " & Forms!xfrmBeast!txtClientID) strConnect = Application.CurrentProject.Connection strUserID = DLookup("[ActiveUserName]", "tblOptions_LOCAL") strPassword = DLookup("[ActivePassword]", "tblOptions_LOCAL") f_SetSQLSVRConnection = "Provider=SQLOLEDB.1;Persist Security Info=True;User ID=" & strUserID & ";Initial Catalog=" & strdB & ";Data Source= " & strServerName & ";Password=" & strPassword 'Debug.Print f_SetSQLSVRConnection Exit_: Exit Function Err_: DoCmd.Hourglass False MsgBox Err.Number & " " & Err.Description, vbCritical, "Error in f_SetSQLSVRConnection Routine" Resume Exit_ End Function ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~ Many thanks Darren - Active Billing -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Collins, Darryl Sent: Monday, 12 October 2009 1:55 PM To: Access Developers discussion and problem solving Subject: [AccessD] Insert Into 101 Hi Folks, I know I can do this INSERT INTO tblMyTable SELECT * FROM tblMyOtherTable Is there any way of using SQL to select a recordset and then using that RS in the insert statement? cnn.Open DbADOConStr Set rst = New ADODB.Recordset rst.CursorLocation = adUseClient rst.Open gstrSQL, cnn, adOpenForwardOnly, adLockReadOnly INSERT INTO tblMyTable SELECT * FROM " & rst I have a work-around for this already, but it involves looping and cloning recordsets and jumping thru other hoops. Frankly it seems very inelegant and inefficent (even though it is fast enough for my purposes). I am sure there must be a way of getting a recordset for the backend and just dumping the whole thing into a local table (assuming all the fields line up ofcourse). Cheers Darryl "This e-mail and any attachments to it (the "Communication") is, unless otherwise stated, confidential, may contain copyright material and is for the use only of the intended recipient. If you receive the Communication in error, please notify the sender immediately by return e-mail, delete the Communication and the return e-mail, and do not read, copy, retransmit or otherwise deal with it. Any views expressed in the Communication are those of the individual sender only, unless expressly stated to be those of Australia and New Zealand Banking Group Limited ABN 11 005 357 522, or any of its related entities including ANZ National Bank Limited (together "ANZ"). ANZ does not accept liability in connection with the integrity of or errors in the Communication, computer virus, data corruption, interference or delay arising from or in respect of the Communication." -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/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 e-mail and any attachments to it (the "Communication") is, unless otherwise stated, confidential, may contain copyright material and is for the use only of the intended recipient. If you receive the Communication in error, please notify the sender immediately by return e-mail, delete the Communication and the return e-mail, and do not read, copy, retransmit or otherwise deal with it. Any views expressed in the Communication are those of the individual sender only, unless expressly stated to be those of Australia and New Zealand Banking Group Limited ABN 11 005 357 522, or any of its related entities including ANZ National Bank Limited (together "ANZ"). ANZ does not accept liability in connection with the integrity of or errors in the Communication, computer virus, data corruption, interference or delay arising from or in respect of the Communication." -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From Gustav at cactus.dk Mon Oct 12 02:29:37 2009 From: Gustav at cactus.dk (Gustav Brock) Date: Mon, 12 Oct 2009 09:29:37 +0200 Subject: [AccessD] Insert Into 101 Message-ID: Hi Darryl Looping and adding is the method - running multiple SQL executes is very slow. But replace ADO with DAO to speed it up. /gustav >>> Darryl.Collins at anz.com 12-10-2009 07:29 >>> Hah! Thanks Darren, This is the process I currently have in place right now :) I have even written a function to feed the parameters into the function so I can use this code on just about anything. Yeah, it works fine and fast enough (I am usually only moving a few dozen records) but it seems to be awfully cumbersome and over engineered. I was hoping for something a bit slimer and sexier... But hey, if that is the only way I will stick with it. :) Cheers Darryl. -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Darren - Active Billing Sent: Monday, 12 October 2009 4:01 PM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Insert Into 101 Hi Daz I've just grabbed something I use to populate a local table in my access App called "tblAccounts" with data from an SQLServer table called "Accounts" I've removed some bits here in the email editor so I hope it still works I also run a small function called "f_ SetSQLSVRConnection" to connect to the SQL Server - It's included here at the bottom - makes it easier than typing that crap all the time Hope this is useful See ya DD ~~~~~~~~~~~~~~~~~~~~~~~~~ Dim conn1 As New ADODB.Connection Dim conn2 As Object Dim rs1 As New ADODB.Recordset Dim rs2 As Object Dim selSQL1 As String Dim selSQL2 As String Dim delSQL1 As String 'get all account records from the SQL Server table "Accounts" selSQL1 = "select * from Accounts order By AccountNo" 'Get a recordset happening for the local Access table "tblAccounts" selSQL2 = "SELECT * from tblAccount" 'get a recordset ready to clear previous entries in our local temp table delSQL1 = "Delete * from tblAccount" conn1 = f_SetSQLSVRConnection 'All the Connection string stuff in this function conn1.Open rs1.Open selSQL1, conn1, adOpenStatic DoCmd.RunSQL delSQL1 ' Clear previous entries Set rs2 = CreateObject("ADODB.Recordset") Set conn2 = Application.CurrentProject.Connection rs2.Open selSQL2, conn2, 1, 3 Do Until rs1.EOF With rs2 .AddNew !AccountNo = rs1!AccountNo !CompanyName = rs1!CompanyName !DateCreated = rs1!DateCreated !DateCancelled = rs1!DateCancelled .Update End With rs1.MoveNext Loop End If rs1.Close conn1.Close Set rs1 = Nothing Set conn1 = Nothing From jimdettman at verizon.net Mon Oct 12 07:50:06 2009 From: jimdettman at verizon.net (Jim Dettman) Date: Mon, 12 Oct 2009 08:50:06 -0400 Subject: [AccessD] Insert Into 101 In-Reply-To: <6DC4725FDCDD72428D6114F1B6CC6E81C7956F@EXUAU020HWT110.oceania.corp.anz.com> References: <4dd71a0c0910111109r7dbe915frb6ed023d4e37ea53@mail.gmail.com> <6DC4725FDCDD72428D6114F1B6CC6E81C7956F@EXUAU020HWT110.oceania.corp.anz.com> Message-ID: <2DE7D3495C024508AF661840634501CE@XPS> Darryl, <> No, not with DAO or ADO I'm afraid. Jim. -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Collins, Darryl Sent: Sunday, October 11, 2009 10:55 PM To: Access Developers discussion and problem solving Subject: [AccessD] Insert Into 101 Hi Folks, I know I can do this INSERT INTO tblMyTable SELECT * FROM tblMyOtherTable Is there any way of using SQL to select a recordset and then using that RS in the insert statement? cnn.Open DbADOConStr Set rst = New ADODB.Recordset rst.CursorLocation = adUseClient rst.Open gstrSQL, cnn, adOpenForwardOnly, adLockReadOnly INSERT INTO tblMyTable SELECT * FROM " & rst I have a work-around for this already, but it involves looping and cloning recordsets and jumping thru other hoops. Frankly it seems very inelegant and inefficent (even though it is fast enough for my purposes). I am sure there must be a way of getting a recordset for the backend and just dumping the whole thing into a local table (assuming all the fields line up ofcourse). Cheers Darryl "This e-mail and any attachments to it (the "Communication") is, unless otherwise stated, confidential, may contain copyright material and is for the use only of the intended recipient. If you receive the Communication in error, please notify the sender immediately by return e-mail, delete the Communication and the return e-mail, and do not read, copy, retransmit or otherwise deal with it. Any views expressed in the Communication are those of the individual sender only, unless expressly stated to be those of Australia and New Zealand Banking Group Limited ABN 11 005 357 522, or any of its related entities including ANZ National Bank Limited (together "ANZ"). ANZ does not accept liability in connection with the integrity of or errors in the Communication, computer virus, data corruption, interference or delay arising from or in respect of the Communication." -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From jwcolby at colbyconsulting.com Mon Oct 12 08:39:38 2009 From: jwcolby at colbyconsulting.com (jwcolby) Date: Mon, 12 Oct 2009 09:39:38 -0400 Subject: [AccessD] Insert Into 101 In-Reply-To: <6DC4725FDCDD72428D6114F1B6CC6E81C7956F@EXUAU020HWT110.oceania.corp.anz.com> References: <6DC4725FDCDD72428D6114F1B6CC6E81C7956F@EXUAU020HWT110.oceania.corp.anz.com> Message-ID: <4AD3319A.2040100@colbyconsulting.com> I don't think so. The obvious question you will be hammered with is "why"?. John W. Colby www.ColbyConsulting.com Collins, Darryl wrote: > Hi Folks, > > I know I can do this > > INSERT INTO tblMyTable > SELECT * FROM tblMyOtherTable > > Is there any way of using SQL to select a recordset and then using that > RS in the insert statement? > > cnn.Open DbADOConStr > Set rst = New ADODB.Recordset > rst.CursorLocation = adUseClient > rst.Open gstrSQL, cnn, adOpenForwardOnly, adLockReadOnly > > INSERT INTO tblMyTable > SELECT * FROM " & rst > > I have a work-around for this already, but it involves looping and > cloning recordsets and jumping thru other hoops. Frankly it seems very > inelegant and inefficent (even though it is fast enough for my > purposes). I am sure there must be a way of getting a recordset for the > backend and just dumping the whole thing into a local table (assuming > all the fields line up ofcourse). > > Cheers > Darryl > > "This e-mail and any attachments to it (the "Communication") is, unless otherwise stated, confidential, may contain copyright material and is for the use only of the intended recipient. If you receive the Communication in error, please notify the sender immediately by return e-mail, delete the Communication and the return e-mail, and do not read, copy, retransmit or otherwise deal with it. Any views expressed in the Communication are those of the individual sender only, unless expressly stated to be those of Australia and New Zealand Banking Group Limited ABN 11 005 357 522, or any of its related entities including ANZ National Bank Limited (together "ANZ"). ANZ does not accept liability in connection with the integrity of or errors in the Communication, computer virus, data corruption, interference or delay arising from or in respect of the Communication." > From max.wanadoo at gmail.com Mon Oct 12 08:52:38 2009 From: max.wanadoo at gmail.com (Max Wanadoo) Date: Mon, 12 Oct 2009 14:52:38 +0100 Subject: [AccessD] Insert Into 101 In-Reply-To: <6DC4725FDCDD72428D6114F1B6CC6E81C7956F@EXUAU020HWT110.oceania.corp.anz.com> References: <4dd71a0c0910111109r7dbe915frb6ed023d4e37ea53@mail.gmail.com> <6DC4725FDCDD72428D6114F1B6CC6E81C7956F@EXUAU020HWT110.oceania.corp.anz.com> Message-ID: <4ad334b9.0707d00a.6786.6620@mx.google.com> Here is a couple of examples, not sure if I understood you correctly though: ' Append record to the temp audit table. Set db = DBEngine(0)(0) sSQL = "INSERT INTO " & sAudTmpTable & " ( audType, audDate, audUser ) " & _ "SELECT 'Delete' AS Expr1, Now() AS Expr2, NetworkUserName() AS Expr3, " & sTable & ".* " & _ "FROM " & sTable & " WHERE (" & sTable & "." & sKeyField & " = " & lngKeyValue & ");" db.Execute sSQL, dbFailOnError sql = "INSERT INTO [MCMSelectionSingleTemp] (FKPersonID,AddrCode,Myas) " & _ "SELECT QF_People.PersonID,QF_People.AddrCode, Myas" & _ " FROM QF_People WHERE (QF_People.PersonStatus='Active') AND QPersonID in (Select FKPersonID from mcmIncomeTransactions) ORDER BY QF_People.AddrCode" Max -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Collins, Darryl Sent: 12 October 2009 03:55 To: Access Developers discussion and problem solving Subject: [AccessD] Insert Into 101 Hi Folks, I know I can do this INSERT INTO tblMyTable SELECT * FROM tblMyOtherTable Is there any way of using SQL to select a recordset and then using that RS in the insert statement? cnn.Open DbADOConStr Set rst = New ADODB.Recordset rst.CursorLocation = adUseClient rst.Open gstrSQL, cnn, adOpenForwardOnly, adLockReadOnly INSERT INTO tblMyTable SELECT * FROM " & rst I have a work-around for this already, but it involves looping and cloning recordsets and jumping thru other hoops. Frankly it seems very inelegant and inefficent (even though it is fast enough for my purposes). I am sure there must be a way of getting a recordset for the backend and just dumping the whole thing into a local table (assuming all the fields line up ofcourse). Cheers Darryl "This e-mail and any attachments to it (the "Communication") is, unless otherwise stated, confidential, may contain copyright material and is for the use only of the intended recipient. If you receive the Communication in error, please notify the sender immediately by return e-mail, delete the Communication and the return e-mail, and do not read, copy, retransmit or otherwise deal with it. Any views expressed in the Communication are those of the individual sender only, unless expressly stated to be those of Australia and New Zealand Banking Group Limited ABN 11 005 357 522, or any of its related entities including ANZ National Bank Limited (together "ANZ"). ANZ does not accept liability in connection with the integrity of or errors in the Communication, computer virus, data corruption, interference or delay arising from or in respect of the Communication." -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From accessd at gfconsultants.com Mon Oct 12 09:54:48 2009 From: accessd at gfconsultants.com (Reuben Cummings) Date: Mon, 12 Oct 2009 10:54:48 -0400 Subject: [AccessD] Insert Into 101 In-Reply-To: <4AD3319A.2040100@colbyconsulting.com> Message-ID: <0E0AFBF42AB145429960E90B842A0593@reubennx9500> I have to disagree, John, as to asking why. I would love to find a way to use a recordset in this exact manner. I've run across several situations where this very thing would eliminate a lot of headaches. And, like Darryl, you either end up looping thru recordsets or making temp tables and using append queries. Reuben Cummings GFC, LLC 812.523.1017 > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby > Sent: Monday, October 12, 2009 9:40 AM > To: Access Developers discussion and problem solving > Subject: Re: [AccessD] Insert Into 101 > > > I don't think so. The obvious question you will be hammered > with is "why"?. > > John W. Colby > www.ColbyConsulting.com > > > Collins, Darryl wrote: > > Hi Folks, > > > > I know I can do this > > > > INSERT INTO tblMyTable > > SELECT * FROM tblMyOtherTable > > > > Is there any way of using SQL to select a recordset and > then using that > > RS in the insert statement? > > > > cnn.Open DbADOConStr > > Set rst = New ADODB.Recordset > > rst.CursorLocation = adUseClient > > rst.Open gstrSQL, cnn, adOpenForwardOnly, adLockReadOnly > > > > INSERT INTO tblMyTable > > SELECT * FROM " & rst > > > > I have a work-around for this already, but it involves looping and > > cloning recordsets and jumping thru other hoops. Frankly > it seems very > > inelegant and inefficent (even though it is fast enough for my > > purposes). I am sure there must be a way of getting a > recordset for the > > backend and just dumping the whole thing into a local table > (assuming > > all the fields line up ofcourse). > > > > Cheers > > Darryl > > > > "This e-mail and any attachments to it (the > "Communication") is, unless otherwise stated, confidential, > may contain copyright material and is for the use only of the > intended recipient. If you receive the Communication in > error, please notify the sender immediately by return e-mail, > delete the Communication and the return e-mail, and do not > read, copy, retransmit or otherwise deal with it. Any views > expressed in the Communication are those of the individual > sender only, unless expressly stated to be those of Australia > and New Zealand Banking Group Limited ABN 11 005 357 522, or > any of its related entities including ANZ National Bank > Limited (together "ANZ"). ANZ does not accept liability in > connection with the integrity of or errors in the > Communication, computer virus, data corruption, interference > or delay arising from or in respect of the Communication." > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > From max.wanadoo at gmail.com Mon Oct 12 09:59:47 2009 From: max.wanadoo at gmail.com (Max Wanadoo) Date: Mon, 12 Oct 2009 15:59:47 +0100 Subject: [AccessD] Insert Into 101 In-Reply-To: <0E0AFBF42AB145429960E90B842A0593@reubennx9500> References: <4AD3319A.2040100@colbyconsulting.com> <0E0AFBF42AB145429960E90B842A0593@reubennx9500> Message-ID: <4ad3446e.0437560a.3f04.2739@mx.google.com> I must be missing something here. I have posted two examples of what I *think* is being asked. I use this tons of times. I think that maybe I have got the wrong end of the question? Max -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Reuben Cummings Sent: 12 October 2009 15:55 To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Insert Into 101 I have to disagree, John, as to asking why. I would love to find a way to use a recordset in this exact manner. I've run across several situations where this very thing would eliminate a lot of headaches. And, like Darryl, you either end up looping thru recordsets or making temp tables and using append queries. Reuben Cummings GFC, LLC 812.523.1017 > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby > Sent: Monday, October 12, 2009 9:40 AM > To: Access Developers discussion and problem solving > Subject: Re: [AccessD] Insert Into 101 > > > I don't think so. The obvious question you will be hammered > with is "why"?. > > John W. Colby > www.ColbyConsulting.com > > > Collins, Darryl wrote: > > Hi Folks, > > > > I know I can do this > > > > INSERT INTO tblMyTable > > SELECT * FROM tblMyOtherTable > > > > Is there any way of using SQL to select a recordset and > then using that > > RS in the insert statement? > > > > cnn.Open DbADOConStr > > Set rst = New ADODB.Recordset > > rst.CursorLocation = adUseClient > > rst.Open gstrSQL, cnn, adOpenForwardOnly, adLockReadOnly > > > > INSERT INTO tblMyTable > > SELECT * FROM " & rst > > > > I have a work-around for this already, but it involves looping and > > cloning recordsets and jumping thru other hoops. Frankly > it seems very > > inelegant and inefficent (even though it is fast enough for my > > purposes). I am sure there must be a way of getting a > recordset for the > > backend and just dumping the whole thing into a local table > (assuming > > all the fields line up ofcourse). > > > > Cheers > > Darryl > > > > "This e-mail and any attachments to it (the > "Communication") is, unless otherwise stated, confidential, > may contain copyright material and is for the use only of the > intended recipient. If you receive the Communication in > error, please notify the sender immediately by return e-mail, > delete the Communication and the return e-mail, and do not > read, copy, retransmit or otherwise deal with it. Any views > expressed in the Communication are those of the individual > sender only, unless expressly stated to be those of Australia > and New Zealand Banking Group Limited ABN 11 005 357 522, or > any of its related entities including ANZ National Bank > Limited (together "ANZ"). ANZ does not accept liability in > connection with the integrity of or errors in the > Communication, computer virus, data corruption, interference > or delay arising from or in respect of the Communication." > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > 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 Oct 12 10:09:28 2009 From: Gustav at cactus.dk (Gustav Brock) Date: Mon, 12 Oct 2009 17:09:28 +0200 Subject: [AccessD] Insert Into 101 Message-ID: Hi Max Your example was for one record. Problem is passing a full recordset to SQL without some looping where you (_very_ slowly) run one SQL command for each loop. Not doable in any other way as far as I know. And as JC states: Why? A DAO loop is by far superior for this kind of transactions. /gustav >>> max.wanadoo at gmail.com 12-10-2009 16:59 >>> I must be missing something here. I have posted two examples of what I *think* is being asked. I use this tons of times. I think that maybe I have got the wrong end of the question? Max -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Reuben Cummings Sent: 12 October 2009 15:55 To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Insert Into 101 I have to disagree, John, as to asking why. I would love to find a way to use a recordset in this exact manner. I've run across several situations where this very thing would eliminate a lot of headaches. And, like Darryl, you either end up looping thru recordsets or making temp tables and using append queries. Reuben Cummings GFC, LLC 812.523.1017 > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby > Sent: Monday, October 12, 2009 9:40 AM > To: Access Developers discussion and problem solving > Subject: Re: [AccessD] Insert Into 101 > > > I don't think so. The obvious question you will be hammered > with is "why"?. > > John W. Colby > www.ColbyConsulting.com > > > Collins, Darryl wrote: > > Hi Folks, > > > > I know I can do this > > > > INSERT INTO tblMyTable > > SELECT * FROM tblMyOtherTable > > > > Is there any way of using SQL to select a recordset and then using that > > RS in the insert statement? > > > > cnn.Open DbADOConStr > > Set rst = New ADODB.Recordset > > rst.CursorLocation = adUseClient > > rst.Open gstrSQL, cnn, adOpenForwardOnly, adLockReadOnly > > > > INSERT INTO tblMyTable > > SELECT * FROM " & rst > > > > I have a work-around for this already, but it involves looping and > > cloning recordsets and jumping thru other hoops. Frankly it seems very > > inelegant and inefficent (even though it is fast enough for my > > purposes). I am sure there must be a way of getting a recordset for the > > backend and just dumping the whole thing into a local table (assuming > > all the fields line up ofcourse). > > > > Cheers > > Darryl From kismert at gmail.com Mon Oct 12 10:15:25 2009 From: kismert at gmail.com (Kenneth Ismert) Date: Mon, 12 Oct 2009 09:15:25 -0600 Subject: [AccessD] AccessD Digest, Vol 80, Issue 13 In-Reply-To: References: Message-ID: <7c7841600910120815l6b420754h9a0fdbefc9a6603c@mail.gmail.com> Rocky > Thanks. Although I'm a DAO guy not and ADO guy. Can it be done in DAO? > In case someone else hasn't given a sample, handling parameters in DAO is easy: Set Db = CurrentDB() Set Qdf = Db.QueryDefs("myQuery") With Qdf .Parameters("myParm") = "Value" Set Rs = .OpenRecordset() .Close End With I have found that parameter queries are slow to load, particularly the the first time. But, if you want 'independent' parameters, where you can select values for some, and have the rest not affect the query output, you still have to use the kind of optional expressions that I described in my earlier post. -Ken From max.wanadoo at gmail.com Mon Oct 12 10:22:41 2009 From: max.wanadoo at gmail.com (Max Wanadoo) Date: Mon, 12 Oct 2009 16:22:41 +0100 Subject: [AccessD] Insert Into 101 In-Reply-To: References: Message-ID: <4ad349cc.0508d00a.293d.ffffa49a@mx.google.com> No, not one record. As many as the select query pulls out. Ie: Sql = "Insert into mytable select * from myselection" Live example: sql = "INSERT INTO mcmGiving SELECT * FROM mcmGivingmports;" This puts ALL the records from the mcmGivingImports (selected with the *) into mcmGiving. I use it daily. I could equally have put a WHERE clause in there to limit the records returned. Max -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: 12 October 2009 16:09 To: accessd at databaseadvisors.com Subject: Re: [AccessD] Insert Into 101 Hi Max Your example was for one record. Problem is passing a full recordset to SQL without some looping where you (_very_ slowly) run one SQL command for each loop. Not doable in any other way as far as I know. And as JC states: Why? A DAO loop is by far superior for this kind of transactions. /gustav >>> max.wanadoo at gmail.com 12-10-2009 16:59 >>> I must be missing something here. I have posted two examples of what I *think* is being asked. I use this tons of times. I think that maybe I have got the wrong end of the question? Max -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Reuben Cummings Sent: 12 October 2009 15:55 To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Insert Into 101 I have to disagree, John, as to asking why. I would love to find a way to use a recordset in this exact manner. I've run across several situations where this very thing would eliminate a lot of headaches. And, like Darryl, you either end up looping thru recordsets or making temp tables and using append queries. Reuben Cummings GFC, LLC 812.523.1017 > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby > Sent: Monday, October 12, 2009 9:40 AM > To: Access Developers discussion and problem solving > Subject: Re: [AccessD] Insert Into 101 > > > I don't think so. The obvious question you will be hammered > with is "why"?. > > John W. Colby > www.ColbyConsulting.com > > > Collins, Darryl wrote: > > Hi Folks, > > > > I know I can do this > > > > INSERT INTO tblMyTable > > SELECT * FROM tblMyOtherTable > > > > Is there any way of using SQL to select a recordset and then using that > > RS in the insert statement? > > > > cnn.Open DbADOConStr > > Set rst = New ADODB.Recordset > > rst.CursorLocation = adUseClient > > rst.Open gstrSQL, cnn, adOpenForwardOnly, adLockReadOnly > > > > INSERT INTO tblMyTable > > SELECT * FROM " & rst > > > > I have a work-around for this already, but it involves looping and > > cloning recordsets and jumping thru other hoops. Frankly it seems very > > inelegant and inefficent (even though it is fast enough for my > > purposes). I am sure there must be a way of getting a recordset for the > > backend and just dumping the whole thing into a local table (assuming > > all the fields line up ofcourse). > > > > Cheers > > Darryl -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From accessd at gfconsultants.com Mon Oct 12 10:30:26 2009 From: accessd at gfconsultants.com (Reuben Cummings) Date: Mon, 12 Oct 2009 11:30:26 -0400 Subject: [AccessD] Insert Into 101 In-Reply-To: Message-ID: <518B90FC1A12496AB21976C08EFF65D7@reubennx9500> Why? Because we want to avoid looping... I have a recordset of X number of records. Would it be nice to just INSERT once rather than looping X number of times. I'm not sure, from my perspective, it's even about processing time. It's probably more a matter of principle for me. I just think it makes more sense - and I don't cope well with things that I can obviously see a better way, but can't find that way. Max, I hadn't seen your solution when I was responding... If you run a recordset that returns records could you then just turn around append that same sql to a "Insert" statement? Like... Strsql = "fake query" Rst.open strsql If not rst.eof then 'there are records so they need appended to table X docmd.runsql "insert into X (fA, fB, fC) " & strsql End if That is obviously a very rough example. I don't know if I've tried this in the past or not. Reuben Cummings GFC, LLC 812.523.1017 > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of > Gustav Brock > Sent: Monday, October 12, 2009 11:09 AM > To: accessd at databaseadvisors.com > Subject: Re: [AccessD] Insert Into 101 > > > Hi Max > > Your example was for one record. Problem is passing a full > recordset to SQL without some looping where you (_very_ > slowly) run one SQL command for each loop. Not doable in any > other way as far as I know. > > And as JC states: Why? A DAO loop is by far superior for this > kind of transactions. > > /gustav > > > >>> max.wanadoo at gmail.com 12-10-2009 16:59 >>> > I must be missing something here. I have posted two examples > of what I > *think* is being asked. I use this tons of times. I think > that maybe I > have got the wrong end of the question? > > Max > > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of > Reuben Cummings > Sent: 12 October 2009 15:55 > To: 'Access Developers discussion and problem solving' > Subject: Re: [AccessD] Insert Into 101 > > I have to disagree, John, as to asking why. I would love to > find a way to > use a recordset in this exact manner. I've run across > several situations > where this very thing would eliminate a lot of headaches. > And, like Darryl, > you either end up looping thru recordsets or making temp > tables and using > append queries. > > > Reuben Cummings > GFC, LLC > 812.523.1017 > > > > -----Original Message----- > > From: accessd-bounces at databaseadvisors.com > > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby > > Sent: Monday, October 12, 2009 9:40 AM > > To: Access Developers discussion and problem solving > > Subject: Re: [AccessD] Insert Into 101 > > > > > > I don't think so. The obvious question you will be hammered > > with is "why"?. > > > > John W. Colby > > www.ColbyConsulting.com > > > > > > Collins, Darryl wrote: > > > Hi Folks, > > > > > > I know I can do this > > > > > > INSERT INTO tblMyTable > > > SELECT * FROM tblMyOtherTable > > > > > > Is there any way of using SQL to select a recordset and > then using that > > > RS in the insert statement? > > > > > > cnn.Open DbADOConStr > > > Set rst = New ADODB.Recordset > > > rst.CursorLocation = adUseClient > > > rst.Open gstrSQL, cnn, adOpenForwardOnly, adLockReadOnly > > > > > > INSERT INTO tblMyTable > > > SELECT * FROM " & rst > > > > > > I have a work-around for this already, but it involves looping and > > > cloning recordsets and jumping thru other hoops. Frankly > it seems very > > > inelegant and inefficent (even though it is fast enough for my > > > purposes). I am sure there must be a way of getting a > recordset for the > > > backend and just dumping the whole thing into a local > table (assuming > > > all the fields line up ofcourse). > > > > > > Cheers > > > Darryl > > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > From DWUTKA at Marlow.com Mon Oct 12 09:59:53 2009 From: DWUTKA at Marlow.com (Drew Wutka) Date: Mon, 12 Oct 2009 09:59:53 -0500 Subject: [AccessD] Insert Into 101 In-Reply-To: <6DC4725FDCDD72428D6114F1B6CC6E81C7956F@EXUAU020HWT110.oceania.corp.anz.com> References: <4dd71a0c0910111109r7dbe915frb6ed023d4e37ea53@mail.gmail.com> <6DC4725FDCDD72428D6114F1B6CC6E81C7956F@EXUAU020HWT110.oceania.corp.anz.com> Message-ID: Yes and no. No, you can't directly put a recordset into a SQL Statement. A recordset is an object in code, a SQL Statement is a string of text, so it would be like writing a book, and trying to replace the word truck with a real live truck.... However, with you example below, it should be as simple as: "INSERT INTO tblMyTable " & gstrSQL The SQL of the recordset, which is what is going to define the recordset in the first place, can be put at the end of the INSERT INTO statement to append those records into the recipient table.... Drew -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Collins, Darryl Sent: Sunday, October 11, 2009 9:55 PM To: Access Developers discussion and problem solving Subject: [AccessD] Insert Into 101 Hi Folks, I know I can do this INSERT INTO tblMyTable SELECT * FROM tblMyOtherTable Is there any way of using SQL to select a recordset and then using that RS in the insert statement? cnn.Open DbADOConStr Set rst = New ADODB.Recordset rst.CursorLocation = adUseClient rst.Open gstrSQL, cnn, adOpenForwardOnly, adLockReadOnly INSERT INTO tblMyTable SELECT * FROM " & rst I have a work-around for this already, but it involves looping and cloning recordsets and jumping thru other hoops. Frankly it seems very inelegant and inefficent (even though it is fast enough for my purposes). I am sure there must be a way of getting a recordset for the backend and just dumping the whole thing into a local table (assuming all the fields line up ofcourse). Cheers Darryl "This e-mail and any attachments to it (the "Communication") is, unless otherwise stated, confidential, may contain copyright material and is for the use only of the intended recipient. If you receive the Communication in error, please notify the sender immediately by return e-mail, delete the Communication and the return e-mail, and do not read, copy, retransmit or otherwise deal with it. Any views expressed in the Communication are those of the individual sender only, unless expressly stated to be those of Australia and New Zealand Banking Group Limited ABN 11 005 357 522, or any of its related entities including ANZ National Bank Limited (together "ANZ"). ANZ does not accept liability in connection with the integrity of or errors in the Communication, computer virus, data corruption, interference or delay arising from or in respect of the Communication." -- 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 Gustav at cactus.dk Mon Oct 12 10:39:46 2009 From: Gustav at cactus.dk (Gustav Brock) Date: Mon, 12 Oct 2009 17:39:46 +0200 Subject: [AccessD] Insert Into 101 Message-ID: Hi Max Well, yes and no. Your "myselection" is a (temp) table, not a recordset. So no cigar. Or? /gustav >>> max.wanadoo at gmail.com 12-10-2009 17:22 >>> No, not one record. As many as the select query pulls out. Ie: Sql = "Insert into mytable select * from myselection" Live example: sql = "INSERT INTO mcmGiving SELECT * FROM mcmGivingmports;" This puts ALL the records from the mcmGivingImports (selected with the *) into mcmGiving. I use it daily. I could equally have put a WHERE clause in there to limit the records returned. Max -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: 12 October 2009 16:09 To: accessd at databaseadvisors.com Subject: Re: [AccessD] Insert Into 101 Hi Max Your example was for one record. Problem is passing a full recordset to SQL without some looping where you (_very_ slowly) run one SQL command for each loop. Not doable in any other way as far as I know. And as JC states: Why? A DAO loop is by far superior for this kind of transactions. /gustav >>> max.wanadoo at gmail.com 12-10-2009 16:59 >>> I must be missing something here. I have posted two examples of what I *think* is being asked. I use this tons of times. I think that maybe I have got the wrong end of the question? Max -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Reuben Cummings Sent: 12 October 2009 15:55 To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Insert Into 101 I have to disagree, John, as to asking why. I would love to find a way to use a recordset in this exact manner. I've run across several situations where this very thing would eliminate a lot of headaches. And, like Darryl, you either end up looping thru recordsets or making temp tables and using append queries. Reuben Cummings GFC, LLC 812.523.1017 > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby > Sent: Monday, October 12, 2009 9:40 AM > To: Access Developers discussion and problem solving > Subject: Re: [AccessD] Insert Into 101 > > > I don't think so. The obvious question you will be hammered > with is "why"?. > > John W. Colby > www.ColbyConsulting.com > > > Collins, Darryl wrote: > > Hi Folks, > > > > I know I can do this > > > > INSERT INTO tblMyTable > > SELECT * FROM tblMyOtherTable > > > > Is there any way of using SQL to select a recordset and then using that > > RS in the insert statement? > > > > cnn.Open DbADOConStr > > Set rst = New ADODB.Recordset > > rst.CursorLocation = adUseClient > > rst.Open gstrSQL, cnn, adOpenForwardOnly, adLockReadOnly > > > > INSERT INTO tblMyTable > > SELECT * FROM " & rst > > > > I have a work-around for this already, but it involves looping and > > cloning recordsets and jumping thru other hoops. Frankly it seems very > > inelegant and inefficent (even though it is fast enough for my > > purposes). I am sure there must be a way of getting a recordset for the > > backend and just dumping the whole thing into a local table (assuming > > all the fields line up ofcourse). > > > > Cheers > > Darryl From rockysmolin at bchacc.com Mon Oct 12 10:45:09 2009 From: rockysmolin at bchacc.com (Rocky Smolin) Date: Mon, 12 Oct 2009 08:45:09 -0700 Subject: [AccessD] AccessD Digest, Vol 80, Issue 13 In-Reply-To: <7c7841600910120815l6b420754h9a0fdbefc9a6603c@mail.gmail.com> References: <7c7841600910120815l6b420754h9a0fdbefc9a6603c@mail.gmail.com> Message-ID: <0D21A9A0D0784CFD977A7F34906AA317@HAL9005> Ken: I think that's what I'm looking for. In a query where you need multiple parameters, how do you identify the parameter? TIA Rocky -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Kenneth Ismert Sent: Monday, October 12, 2009 8:15 AM To: accessd at databaseadvisors.com Subject: Re: [AccessD] AccessD Digest, Vol 80, Issue 13 Rocky > Thanks. Although I'm a DAO guy not and ADO guy. Can it be done in DAO? > In case someone else hasn't given a sample, handling parameters in DAO is easy: Set Db = CurrentDB() Set Qdf = Db.QueryDefs("myQuery") With Qdf .Parameters("myParm") = "Value" Set Rs = .OpenRecordset() .Close End With I have found that parameter queries are slow to load, particularly the the first time. But, if you want 'independent' parameters, where you can select values for some, and have the rest not affect the query output, you still have to use the kind of optional expressions that I described in my earlier post. -Ken -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From cfoust at infostatsystems.com Mon Oct 12 10:48:31 2009 From: cfoust at infostatsystems.com (Charlotte Foust) Date: Mon, 12 Oct 2009 08:48:31 -0700 Subject: [AccessD] AccessD Digest, Vol 80, Issue 13 In-Reply-To: <0D21A9A0D0784CFD977A7F34906AA317@HAL9005> References: <7c7841600910120815l6b420754h9a0fdbefc9a6603c@mail.gmail.com> <0D21A9A0D0784CFD977A7F34906AA317@HAL9005> Message-ID: You can walk through the parameters collection. If you look back at the code I posted, it does that and when it finds a parameter you didn't include in the arguments, it pops up a dialog asking for the value. The "name" of the parameter is the prompt or unrecognized field name. Charlotte Foust -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Rocky Smolin Sent: Monday, October 12, 2009 8:45 AM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] AccessD Digest, Vol 80, Issue 13 Ken: I think that's what I'm looking for. In a query where you need multiple parameters, how do you identify the parameter? TIA Rocky -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Kenneth Ismert Sent: Monday, October 12, 2009 8:15 AM To: accessd at databaseadvisors.com Subject: Re: [AccessD] AccessD Digest, Vol 80, Issue 13 Rocky > Thanks. Although I'm a DAO guy not and ADO guy. Can it be done in DAO? > In case someone else hasn't given a sample, handling parameters in DAO is easy: Set Db = CurrentDB() Set Qdf = Db.QueryDefs("myQuery") With Qdf .Parameters("myParm") = "Value" Set Rs = .OpenRecordset() .Close End With I have found that parameter queries are slow to load, particularly the the first time. But, if you want 'independent' parameters, where you can select values for some, and have the rest not affect the query output, you still have to use the kind of optional expressions that I described in my earlier post. -Ken -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From max.wanadoo at gmail.com Mon Oct 12 11:06:46 2009 From: max.wanadoo at gmail.com (Max Wanadoo) Date: Mon, 12 Oct 2009 17:06:46 +0100 Subject: [AccessD] Insert Into 101 In-Reply-To: References: Message-ID: <4ad35423.0a1ad00a.4d66.ffffae54@mx.google.com> Maybe that was where I was confused. Anyway, just created a temp table Create Table _TestA (FirstName text, Surname Text, PersonID long) And a temp query _TestQ SELECT mcmPeople.FirstName, mcmPeople.Surname, mcmPeople.PersonID FROM mcmPeople WHERE (((mcmPeople.PersonID)<1000)); And appended records from the query into the table Sql = "insert into _TestA select * from _TestQ" All of that seemed to work ok, have I got it right now? Max -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: 12 October 2009 16:40 To: accessd at databaseadvisors.com Subject: Re: [AccessD] Insert Into 101 Hi Max Well, yes and no. Your "myselection" is a (temp) table, not a recordset. So no cigar. Or? /gustav >>> max.wanadoo at gmail.com 12-10-2009 17:22 >>> No, not one record. As many as the select query pulls out. Ie: Sql = "Insert into mytable select * from myselection" Live example: sql = "INSERT INTO mcmGiving SELECT * FROM mcmGivingmports;" This puts ALL the records from the mcmGivingImports (selected with the *) into mcmGiving. I use it daily. I could equally have put a WHERE clause in there to limit the records returned. Max -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: 12 October 2009 16:09 To: accessd at databaseadvisors.com Subject: Re: [AccessD] Insert Into 101 Hi Max Your example was for one record. Problem is passing a full recordset to SQL without some looping where you (_very_ slowly) run one SQL command for each loop. Not doable in any other way as far as I know. And as JC states: Why? A DAO loop is by far superior for this kind of transactions. /gustav >>> max.wanadoo at gmail.com 12-10-2009 16:59 >>> I must be missing something here. I have posted two examples of what I *think* is being asked. I use this tons of times. I think that maybe I have got the wrong end of the question? Max -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Reuben Cummings Sent: 12 October 2009 15:55 To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Insert Into 101 I have to disagree, John, as to asking why. I would love to find a way to use a recordset in this exact manner. I've run across several situations where this very thing would eliminate a lot of headaches. And, like Darryl, you either end up looping thru recordsets or making temp tables and using append queries. Reuben Cummings GFC, LLC 812.523.1017 > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby > Sent: Monday, October 12, 2009 9:40 AM > To: Access Developers discussion and problem solving > Subject: Re: [AccessD] Insert Into 101 > > > I don't think so. The obvious question you will be hammered > with is "why"?. > > John W. Colby > www.ColbyConsulting.com > > > Collins, Darryl wrote: > > Hi Folks, > > > > I know I can do this > > > > INSERT INTO tblMyTable > > SELECT * FROM tblMyOtherTable > > > > Is there any way of using SQL to select a recordset and then using that > > RS in the insert statement? > > > > cnn.Open DbADOConStr > > Set rst = New ADODB.Recordset > > rst.CursorLocation = adUseClient > > rst.Open gstrSQL, cnn, adOpenForwardOnly, adLockReadOnly > > > > INSERT INTO tblMyTable > > SELECT * FROM " & rst > > > > I have a work-around for this already, but it involves looping and > > cloning recordsets and jumping thru other hoops. Frankly it seems very > > inelegant and inefficent (even though it is fast enough for my > > purposes). I am sure there must be a way of getting a recordset for the > > backend and just dumping the whole thing into a local table (assuming > > all the fields line up ofcourse). > > > > Cheers > > Darryl -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From jwcolby at colbyconsulting.com Mon Oct 12 11:11:23 2009 From: jwcolby at colbyconsulting.com (jwcolby) Date: Mon, 12 Oct 2009 12:11:23 -0400 Subject: [AccessD] Insert Into 101 In-Reply-To: <518B90FC1A12496AB21976C08EFF65D7@reubennx9500> References: <518B90FC1A12496AB21976C08EFF65D7@reubennx9500> Message-ID: <4AD3552B.2010109@colbyconsulting.com> Yes but you use the SQL statement to pull the recordset into the recordset object. Use that same SQL statement as the select for a direct insert statement. What am I missing? John W. Colby www.ColbyConsulting.com Reuben Cummings wrote: > Why? > > Because we want to avoid looping... > I have a recordset of X number of records. Would it be nice to just INSERT > once rather than looping X number of times. > > I'm not sure, from my perspective, it's even about processing time. It's > probably more a matter of principle for me. I just think it makes more > sense - and I don't cope well with things that I can obviously see a better > way, but can't find that way. > > Max, I hadn't seen your solution when I was responding... > > If you run a recordset that returns records could you then just turn around > append that same sql to a "Insert" statement? > > Like... > > Strsql = "fake query" > Rst.open strsql > If not rst.eof then > 'there are records so they need appended to table X > docmd.runsql "insert into X (fA, fB, fC) " & strsql > End if > > That is obviously a very rough example. I don't know if I've tried this in > the past or not. > > Reuben Cummings > GFC, LLC > 812.523.1017 > > >> -----Original Message----- >> From: accessd-bounces at databaseadvisors.com >> [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of >> Gustav Brock >> Sent: Monday, October 12, 2009 11:09 AM >> To: accessd at databaseadvisors.com >> Subject: Re: [AccessD] Insert Into 101 >> >> >> Hi Max >> >> Your example was for one record. Problem is passing a full >> recordset to SQL without some looping where you (_very_ >> slowly) run one SQL command for each loop. Not doable in any >> other way as far as I know. >> >> And as JC states: Why? A DAO loop is by far superior for this >> kind of transactions. >> >> /gustav >> >> >>>>> max.wanadoo at gmail.com 12-10-2009 16:59 >>> >> I must be missing something here. I have posted two examples >> of what I >> *think* is being asked. I use this tons of times. I think >> that maybe I >> have got the wrong end of the question? >> >> Max >> >> >> -----Original Message----- >> From: accessd-bounces at databaseadvisors.com >> [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of >> Reuben Cummings >> Sent: 12 October 2009 15:55 >> To: 'Access Developers discussion and problem solving' >> Subject: Re: [AccessD] Insert Into 101 >> >> I have to disagree, John, as to asking why. I would love to >> find a way to >> use a recordset in this exact manner. I've run across >> several situations >> where this very thing would eliminate a lot of headaches. >> And, like Darryl, >> you either end up looping thru recordsets or making temp >> tables and using >> append queries. >> >> >> Reuben Cummings >> GFC, LLC >> 812.523.1017 >> >> >>> -----Original Message----- >>> From: accessd-bounces at databaseadvisors.com >>> [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby >>> Sent: Monday, October 12, 2009 9:40 AM >>> To: Access Developers discussion and problem solving >>> Subject: Re: [AccessD] Insert Into 101 >>> >>> >>> I don't think so. The obvious question you will be hammered >>> with is "why"?. >>> >>> John W. Colby >>> www.ColbyConsulting.com >>> >>> >>> Collins, Darryl wrote: >>>> Hi Folks, >>>> >>>> I know I can do this >>>> >>>> INSERT INTO tblMyTable >>>> SELECT * FROM tblMyOtherTable >>>> >>>> Is there any way of using SQL to select a recordset and >> then using that >>>> RS in the insert statement? >>>> >>>> cnn.Open DbADOConStr >>>> Set rst = New ADODB.Recordset >>>> rst.CursorLocation = adUseClient >>>> rst.Open gstrSQL, cnn, adOpenForwardOnly, adLockReadOnly >>>> >>>> INSERT INTO tblMyTable >>>> SELECT * FROM " & rst >>>> >>>> I have a work-around for this already, but it involves looping and >>>> cloning recordsets and jumping thru other hoops. Frankly >> it seems very >>>> inelegant and inefficent (even though it is fast enough for my >>>> purposes). I am sure there must be a way of getting a >> recordset for the >>>> backend and just dumping the whole thing into a local >> table (assuming >>>> all the fields line up ofcourse). >>>> >>>> Cheers >>>> Darryl >> >> >> -- >> AccessD mailing list >> AccessD at databaseadvisors.com >> http://databaseadvisors.com/mailman/listinfo/accessd >> Website: http://www.databaseadvisors.com >> > > > From max.wanadoo at gmail.com Mon Oct 12 11:39:46 2009 From: max.wanadoo at gmail.com (Max Wanadoo) Date: Mon, 12 Oct 2009 17:39:46 +0100 Subject: [AccessD] Insert Into 101 In-Reply-To: <4AD3552B.2010109@colbyconsulting.com> References: <518B90FC1A12496AB21976C08EFF65D7@reubennx9500> <4AD3552B.2010109@colbyconsulting.com> Message-ID: <4ad35bdf.1701d00a.47e3.ffffc82d@mx.google.com> As far as I understand the problem, this works ok for me. Max Sub AppendRecsFromQuery() Dim dbs As DAO.Database, rst As DAO.Recordset Dim sql As String, qdf As DAO.QueryDef Set dbs = CurrentDb sql = "Drop table _TestA" dbs.Execute (sql) sql = "Create Table _TestA (FirstName text, Surname Text, PersonID long)" dbs.Execute (sql) sql = "Drop Table _TestQ" dbs.Execute sql sql = "Select firstname,surname,PersonID from mcmPeople Where PersonID < 1000" Set qdf = dbs.CreateQueryDef("_TestQ", sql) Set rst = dbs.OpenRecordset(qdf.Name, dbOpenSnapshot) sql = "insert into _TestA " & qdf.sql dbs.Execute sql End Sub From accessd at gfconsultants.com Mon Oct 12 12:43:10 2009 From: accessd at gfconsultants.com (Reuben Cummings) Date: Mon, 12 Oct 2009 13:43:10 -0400 Subject: [AccessD] Insert Into 101 In-Reply-To: <4AD3552B.2010109@colbyconsulting.com> Message-ID: That's what I'm getting at in my child-like example, John. It just never occurred to me in the past. Reuben Cummings GFC, LLC 812.523.1017 > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby > Sent: Monday, October 12, 2009 12:11 PM > To: Access Developers discussion and problem solving > Subject: Re: [AccessD] Insert Into 101 > > > Yes but you use the SQL statement to pull the recordset into > the recordset object. Use that same > SQL statement as the select for a direct insert statement. > What am I missing? > > > John W. Colby > www.ColbyConsulting.com > > > Reuben Cummings wrote: > > Why? > > > > Because we want to avoid looping... > > I have a recordset of X number of records. Would it be > nice to just INSERT > > once rather than looping X number of times. > > > > I'm not sure, from my perspective, it's even about > processing time. It's > > probably more a matter of principle for me. I just think > it makes more > > sense - and I don't cope well with things that I can > obviously see a better > > way, but can't find that way. > > > > Max, I hadn't seen your solution when I was responding... > > > > If you run a recordset that returns records could you then > just turn around > > append that same sql to a "Insert" statement? > > > > Like... > > > > Strsql = "fake query" > > Rst.open strsql > > If not rst.eof then > > 'there are records so they need appended to table X > > docmd.runsql "insert into X (fA, fB, fC) " & strsql > > End if > > > > That is obviously a very rough example. I don't know if > I've tried this in > > the past or not. > > > > Reuben Cummings > > GFC, LLC > > 812.523.1017 > > > > > >> -----Original Message----- > >> From: accessd-bounces at databaseadvisors.com > >> [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of > >> Gustav Brock > >> Sent: Monday, October 12, 2009 11:09 AM > >> To: accessd at databaseadvisors.com > >> Subject: Re: [AccessD] Insert Into 101 > >> > >> > >> Hi Max > >> > >> Your example was for one record. Problem is passing a full > >> recordset to SQL without some looping where you (_very_ > >> slowly) run one SQL command for each loop. Not doable in any > >> other way as far as I know. > >> > >> And as JC states: Why? A DAO loop is by far superior for this > >> kind of transactions. > >> > >> /gustav > >> > >> > >>>>> max.wanadoo at gmail.com 12-10-2009 16:59 >>> > >> I must be missing something here. I have posted two examples > >> of what I > >> *think* is being asked. I use this tons of times. I think > >> that maybe I > >> have got the wrong end of the question? > >> > >> Max > >> > >> > >> -----Original Message----- > >> From: accessd-bounces at databaseadvisors.com > >> [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of > >> Reuben Cummings > >> Sent: 12 October 2009 15:55 > >> To: 'Access Developers discussion and problem solving' > >> Subject: Re: [AccessD] Insert Into 101 > >> > >> I have to disagree, John, as to asking why. I would love to > >> find a way to > >> use a recordset in this exact manner. I've run across > >> several situations > >> where this very thing would eliminate a lot of headaches. > >> And, like Darryl, > >> you either end up looping thru recordsets or making temp > >> tables and using > >> append queries. > >> > >> > >> Reuben Cummings > >> GFC, LLC > >> 812.523.1017 > >> > >> > >>> -----Original Message----- > >>> From: accessd-bounces at databaseadvisors.com > >>> [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby > >>> Sent: Monday, October 12, 2009 9:40 AM > >>> To: Access Developers discussion and problem solving > >>> Subject: Re: [AccessD] Insert Into 101 > >>> > >>> > >>> I don't think so. The obvious question you will be hammered > >>> with is "why"?. > >>> > >>> John W. Colby > >>> www.ColbyConsulting.com > >>> > >>> > >>> Collins, Darryl wrote: > >>>> Hi Folks, > >>>> > >>>> I know I can do this > >>>> > >>>> INSERT INTO tblMyTable > >>>> SELECT * FROM tblMyOtherTable > >>>> > >>>> Is there any way of using SQL to select a recordset and > >> then using that > >>>> RS in the insert statement? > >>>> > >>>> cnn.Open DbADOConStr > >>>> Set rst = New ADODB.Recordset > >>>> rst.CursorLocation = adUseClient > >>>> rst.Open gstrSQL, cnn, adOpenForwardOnly, adLockReadOnly > >>>> > >>>> INSERT INTO tblMyTable > >>>> SELECT * FROM " & rst > >>>> > >>>> I have a work-around for this already, but it involves > looping and > >>>> cloning recordsets and jumping thru other hoops. Frankly > >> it seems very > >>>> inelegant and inefficent (even though it is fast enough for my > >>>> purposes). I am sure there must be a way of getting a > >> recordset for the > >>>> backend and just dumping the whole thing into a local > >> table (assuming > >>>> all the fields line up ofcourse). > >>>> > >>>> Cheers > >>>> Darryl > >> > >> > >> -- > >> AccessD mailing list > >> AccessD at databaseadvisors.com > >> http://databaseadvisors.com/mailman/listinfo/accessd > >> 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 Oct 12 13:53:09 2009 From: jwcolby at colbyconsulting.com (jwcolby) Date: Mon, 12 Oct 2009 14:53:09 -0400 Subject: [AccessD] Insert Into 101 In-Reply-To: References: Message-ID: <4AD37B15.603@colbyconsulting.com> Ohhhh... ;) I understand child like, I spend most of my time there anymore. John W. Colby www.ColbyConsulting.com Reuben Cummings wrote: > That's what I'm getting at in my child-like example, John. It just never > occurred to me in the past. > > Reuben Cummings > GFC, LLC > 812.523.1017 > > >> -----Original Message----- >> From: accessd-bounces at databaseadvisors.com >> [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby >> Sent: Monday, October 12, 2009 12:11 PM >> To: Access Developers discussion and problem solving >> Subject: Re: [AccessD] Insert Into 101 >> >> >> Yes but you use the SQL statement to pull the recordset into >> the recordset object. Use that same >> SQL statement as the select for a direct insert statement. >> What am I missing? >> >> >> John W. Colby >> www.ColbyConsulting.com >> >> >> Reuben Cummings wrote: >>> Why? >>> >>> Because we want to avoid looping... >>> I have a recordset of X number of records. Would it be >> nice to just INSERT >>> once rather than looping X number of times. >>> >>> I'm not sure, from my perspective, it's even about >> processing time. It's >>> probably more a matter of principle for me. I just think >> it makes more >>> sense - and I don't cope well with things that I can >> obviously see a better >>> way, but can't find that way. >>> >>> Max, I hadn't seen your solution when I was responding... >>> >>> If you run a recordset that returns records could you then >> just turn around >>> append that same sql to a "Insert" statement? >>> >>> Like... >>> >>> Strsql = "fake query" >>> Rst.open strsql >>> If not rst.eof then >>> 'there are records so they need appended to table X >>> docmd.runsql "insert into X (fA, fB, fC) " & strsql >>> End if >>> >>> That is obviously a very rough example. I don't know if >> I've tried this in >>> the past or not. >>> >>> Reuben Cummings >>> GFC, LLC >>> 812.523.1017 >>> >>> >>>> -----Original Message----- >>>> From: accessd-bounces at databaseadvisors.com >>>> [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of >>>> Gustav Brock >>>> Sent: Monday, October 12, 2009 11:09 AM >>>> To: accessd at databaseadvisors.com >>>> Subject: Re: [AccessD] Insert Into 101 >>>> >>>> >>>> Hi Max >>>> >>>> Your example was for one record. Problem is passing a full >>>> recordset to SQL without some looping where you (_very_ >>>> slowly) run one SQL command for each loop. Not doable in any >>>> other way as far as I know. >>>> >>>> And as JC states: Why? A DAO loop is by far superior for this >>>> kind of transactions. >>>> >>>> /gustav >>>> >>>> >>>>>>> max.wanadoo at gmail.com 12-10-2009 16:59 >>> >>>> I must be missing something here. I have posted two examples >>>> of what I >>>> *think* is being asked. I use this tons of times. I think >>>> that maybe I >>>> have got the wrong end of the question? >>>> >>>> Max >>>> >>>> >>>> -----Original Message----- >>>> From: accessd-bounces at databaseadvisors.com >>>> [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of >>>> Reuben Cummings >>>> Sent: 12 October 2009 15:55 >>>> To: 'Access Developers discussion and problem solving' >>>> Subject: Re: [AccessD] Insert Into 101 >>>> >>>> I have to disagree, John, as to asking why. I would love to >>>> find a way to >>>> use a recordset in this exact manner. I've run across >>>> several situations >>>> where this very thing would eliminate a lot of headaches. >>>> And, like Darryl, >>>> you either end up looping thru recordsets or making temp >>>> tables and using >>>> append queries. >>>> >>>> >>>> Reuben Cummings >>>> GFC, LLC >>>> 812.523.1017 >>>> >>>> >>>>> -----Original Message----- >>>>> From: accessd-bounces at databaseadvisors.com >>>>> [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby >>>>> Sent: Monday, October 12, 2009 9:40 AM >>>>> To: Access Developers discussion and problem solving >>>>> Subject: Re: [AccessD] Insert Into 101 >>>>> >>>>> >>>>> I don't think so. The obvious question you will be hammered >>>>> with is "why"?. >>>>> >>>>> John W. Colby >>>>> www.ColbyConsulting.com >>>>> >>>>> >>>>> Collins, Darryl wrote: >>>>>> Hi Folks, >>>>>> >>>>>> I know I can do this >>>>>> >>>>>> INSERT INTO tblMyTable >>>>>> SELECT * FROM tblMyOtherTable >>>>>> >>>>>> Is there any way of using SQL to select a recordset and >>>> then using that >>>>>> RS in the insert statement? >>>>>> >>>>>> cnn.Open DbADOConStr >>>>>> Set rst = New ADODB.Recordset >>>>>> rst.CursorLocation = adUseClient >>>>>> rst.Open gstrSQL, cnn, adOpenForwardOnly, adLockReadOnly >>>>>> >>>>>> INSERT INTO tblMyTable >>>>>> SELECT * FROM " & rst >>>>>> >>>>>> I have a work-around for this already, but it involves >> looping and >>>>>> cloning recordsets and jumping thru other hoops. Frankly >>>> it seems very >>>>>> inelegant and inefficent (even though it is fast enough for my >>>>>> purposes). I am sure there must be a way of getting a >>>> recordset for the >>>>>> backend and just dumping the whole thing into a local >>>> table (assuming >>>>>> all the fields line up ofcourse). >>>>>> >>>>>> Cheers >>>>>> Darryl >>>> >>>> -- >>>> AccessD mailing list >>>> AccessD at databaseadvisors.com >>>> http://databaseadvisors.com/mailman/listinfo/accessd >>>> Website: http://www.databaseadvisors.com >>>> >>> >>> >> -- >> AccessD mailing list >> AccessD at databaseadvisors.com >> http://databaseadvisors.com/mailman/listinfo/accessd >> Website: http://www.databaseadvisors.com >> > > > From Darryl.Collins at anz.com Mon Oct 12 17:58:48 2009 From: Darryl.Collins at anz.com (Collins, Darryl) Date: Tue, 13 Oct 2009 09:58:48 +1100 Subject: [AccessD] Insert Into 101 In-Reply-To: <4AD3319A.2040100@colbyconsulting.com> Message-ID: <6DC4725FDCDD72428D6114F1B6CC6E81C79574@EXUAU020HWT110.oceania.corp.anz.com> Heh... Fair question really. I am pulling data into a local table from a database backend via ADO. I use a function that will automatically populate a form based on a recordset via ADO and wanted to create a report the same way, however I cannot just attached the RS to the report like you can a form (that surprised me too). So I though I would try to dump the RS into a table run the local report from the table. Turns out that is more complicated that I thought too. Found an example via google that I could mod to suit my own needs. This is the actual code I use, it works fine and fast enough, it just seemed awfully clunky. Hoping for something a bit sexier. '=========================================================== Public Sub UpdateLocalTable(strLocalTableName As String, gstrSQL As String, intNoOfFields) '===================================================================' ' ' ' This procedure opens a recordset and ' ' Writes the recordset to a local table ' ' ' '===================================================================' Dim cnn As New ADODB.Connection Dim rst As New ADODB.Recordset Dim DAO_DBLocal As DAO.Database Dim DAO_RSLocal As DAO.Recordset Dim intCount As Integer On Error GoTo ErrHandler Application.Echo False, "Loading the data into the Table..." ' Open the connection cnn.Open DbADOConStr Set rst = New ADODB.Recordset rst.CursorLocation = adUseClient rst.Open gstrSQL, cnn, adOpenForwardOnly, adLockReadOnly gstrSQL2 = "" gstrSQL2 = gstrSQL2 & "DELETE FROM " & strLocalTableName DoCmd.SetWarnings False On Error Resume Next DoCmd.RunSQL (gstrSQL2) On Error GoTo 0 gstrSQL2 = "" gstrSQL2 = gstrSQL2 & "SELECT * FROM " & strLocalTableName Set DAO_DBLocal = CurrentDb Set DAO_RSLocal = DAO_DBLocal.OpenRecordset(gstrSQL2) Do While Not rst.EOF DAO_RSLocal.AddNew For intCount = 0 To intNoOfFields DAO_RSLocal.Fields(intCount) = rst.Fields(intCount) Next intCount DAO_RSLocal.Update rst.MoveNext Loop DAO_RSLocal.Close Set DAO_RSLocal = Nothing DAO_DBLocal.Close Set DAO_DBLocal = Nothing '================================================= rst.Close cnn.Close ExitHere: On Error Resume Next Set cnn = Nothing Set rst = Nothing Application.Echo True Exit Sub ErrHandler: gstrErrMsg = "modSQLServer.RefreshSubForm: " gstrErrMsg = gstrErrMsg & Err.Number & " - " & Err.Description ErrHandle (gstrErrMsg) Resume ExitHere End Sub '======================================================================= == -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Tuesday, 13 October 2009 12:40 AM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Insert Into 101 I don't think so. The obvious question you will be hammered with is "why"?. John W. Colby www.ColbyConsulting.com Collins, Darryl wrote: > Hi Folks, > > I know I can do this > > INSERT INTO tblMyTable > SELECT * FROM tblMyOtherTable > > Is there any way of using SQL to select a recordset and then using > that RS in the insert statement? > > cnn.Open DbADOConStr > Set rst = New ADODB.Recordset > rst.CursorLocation = adUseClient > rst.Open gstrSQL, cnn, adOpenForwardOnly, adLockReadOnly > > INSERT INTO tblMyTable > SELECT * FROM " & rst > > I have a work-around for this already, but it involves looping and > cloning recordsets and jumping thru other hoops. Frankly it seems > very inelegant and inefficent (even though it is fast enough for my > purposes). I am sure there must be a way of getting a recordset for > the backend and just dumping the whole thing into a local table > (assuming all the fields line up ofcourse). > > Cheers > Darryl > > "This e-mail and any attachments to it (the "Communication") is, unless otherwise stated, confidential, may contain copyright material and is for the use only of the intended recipient. If you receive the Communication in error, please notify the sender immediately by return e-mail, delete the Communication and the return e-mail, and do not read, copy, retransmit or otherwise deal with it. Any views expressed in the Communication are those of the individual sender only, unless expressly stated to be those of Australia and New Zealand Banking Group Limited ABN 11 005 357 522, or any of its related entities including ANZ National Bank Limited (together "ANZ"). ANZ does not accept liability in connection with the integrity of or errors in the Communication, computer virus, data corruption, interference or delay arising from or in respect of the Communication." > -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com "This e-mail and any attachments to it (the "Communication") is, unless otherwise stated, confidential, may contain copyright material and is for the use only of the intended recipient. If you receive the Communication in error, please notify the sender immediately by return e-mail, delete the Communication and the return e-mail, and do not read, copy, retransmit or otherwise deal with it. Any views expressed in the Communication are those of the individual sender only, unless expressly stated to be those of Australia and New Zealand Banking Group Limited ABN 11 005 357 522, or any of its related entities including ANZ National Bank Limited (together "ANZ"). ANZ does not accept liability in connection with the integrity of or errors in the Communication, computer virus, data corruption, interference or delay arising from or in respect of the Communication." From jwcolby at colbyconsulting.com Mon Oct 12 19:12:09 2009 From: jwcolby at colbyconsulting.com (jwcolby) Date: Mon, 12 Oct 2009 20:12:09 -0400 Subject: [AccessD] Insert Into 101 In-Reply-To: <6DC4725FDCDD72428D6114F1B6CC6E81C79574@EXUAU020HWT110.oceania.corp.anz.com> References: <6DC4725FDCDD72428D6114F1B6CC6E81C79574@EXUAU020HWT110.oceania.corp.anz.com> Message-ID: <4AD3C5D9.90209@colbyconsulting.com> If this doesn't have to be dynamic (the fields are known) then SELECT * (or field list) FROM SQLServerTblX and use that select as the select in the append query INSERT INTO tblMyTblInAcess (MyFldList) SELECT * (or field list) FROM SQLServerTblX You have already decided to dump to a local table, just use a query directly. If you need to deal with field names dynamically then you are stuck building the field list in code. John W. Colby www.ColbyConsulting.com Collins, Darryl wrote: > > Heh... Fair question really. I am pulling data into a local table from a > database backend via ADO. I use a function that will automatically > populate a form based on a recordset via ADO and wanted to create a > report the same way, however I cannot just attached the RS to the > report like you can a form (that surprised me too). > > So I though I would try to dump the RS into a table run the local report > from the table. Turns out that is more complicated that I thought too. > Found an example via google that I could mod to suit my own needs. > > This is the actual code I use, it works fine and fast enough, it just > seemed awfully clunky. Hoping for something a bit sexier. > > '=========================================================== > > Public Sub UpdateLocalTable(strLocalTableName As String, gstrSQL As > String, intNoOfFields) > > '===================================================================' > ' ' > ' This procedure opens a recordset and ' > ' Writes the recordset to a local table ' > ' ' > '===================================================================' > > Dim cnn As New ADODB.Connection > Dim rst As New ADODB.Recordset > > Dim DAO_DBLocal As DAO.Database > Dim DAO_RSLocal As DAO.Recordset > > Dim intCount As Integer > > On Error GoTo ErrHandler > Application.Echo False, "Loading the data into the Table..." > > ' Open the connection > cnn.Open DbADOConStr > > Set rst = New ADODB.Recordset > rst.CursorLocation = adUseClient > rst.Open gstrSQL, cnn, adOpenForwardOnly, adLockReadOnly > > gstrSQL2 = "" > gstrSQL2 = gstrSQL2 & "DELETE FROM " & strLocalTableName > > DoCmd.SetWarnings False > On Error Resume Next > DoCmd.RunSQL (gstrSQL2) > On Error GoTo 0 > > gstrSQL2 = "" > gstrSQL2 = gstrSQL2 & "SELECT * FROM " & strLocalTableName > > Set DAO_DBLocal = CurrentDb > Set DAO_RSLocal = DAO_DBLocal.OpenRecordset(gstrSQL2) > > Do While Not rst.EOF > DAO_RSLocal.AddNew > For intCount = 0 To intNoOfFields > DAO_RSLocal.Fields(intCount) = rst.Fields(intCount) > Next intCount > DAO_RSLocal.Update > rst.MoveNext > Loop > > DAO_RSLocal.Close > Set DAO_RSLocal = Nothing > DAO_DBLocal.Close > Set DAO_DBLocal = Nothing > > '================================================= > > rst.Close > cnn.Close > > ExitHere: > On Error Resume Next > Set cnn = Nothing > Set rst = Nothing > Application.Echo True > Exit Sub > > ErrHandler: > gstrErrMsg = "modSQLServer.RefreshSubForm: " > gstrErrMsg = gstrErrMsg & Err.Number & " - " & Err.Description > > ErrHandle (gstrErrMsg) > Resume ExitHere > End Sub > > '======================================================================= > == > > > > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby > Sent: Tuesday, 13 October 2009 12:40 AM > To: Access Developers discussion and problem solving > Subject: Re: [AccessD] Insert Into 101 > > I don't think so. The obvious question you will be hammered with is > "why"?. > > John W. Colby > www.ColbyConsulting.com From darren at activebilling.com.au Tue Oct 13 05:55:45 2009 From: darren at activebilling.com.au (Darren - Active Billing) Date: Tue, 13 Oct 2009 21:55:45 +1100 Subject: [AccessD] Insert Into 101 For MAX In-Reply-To: <4ad35bdf.1701d00a.47e3.ffffc82d@mx.google.com> References: <518B90FC1A12496AB21976C08EFF65D7@reubennx9500><4AD3552B.2010109@colbyconsulting.com> <4ad35bdf.1701d00a.47e3.ffffc82d@mx.google.com> Message-ID: <013501ca4bf3$b87d5c80$05000100@denzilnote> Hi Max This looks promising - How would you get it to connect to SQL server on table X and then populate a local Access Table with all the records from table X? Many thanks Darren -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Max Wanadoo Sent: Tuesday, 13 October 2009 3:40 AM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Insert Into 101 As far as I understand the problem, this works ok for me. Max Sub AppendRecsFromQuery() Dim dbs As DAO.Database, rst As DAO.Recordset Dim sql As String, qdf As DAO.QueryDef Set dbs = CurrentDb sql = "Drop table _TestA" dbs.Execute (sql) sql = "Create Table _TestA (FirstName text, Surname Text, PersonID long)" dbs.Execute (sql) sql = "Drop Table _TestQ" dbs.Execute sql sql = "Select firstname,surname,PersonID from mcmPeople Where PersonID < 1000" Set qdf = dbs.CreateQueryDef("_TestQ", sql) Set rst = dbs.OpenRecordset(qdf.Name, dbOpenSnapshot) sql = "insert into _TestA " & qdf.sql dbs.Execute sql End Sub -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From stuart at lexacorp.com.pg Tue Oct 13 06:42:24 2009 From: stuart at lexacorp.com.pg (Stuart McLachlan) Date: Tue, 13 Oct 2009 21:42:24 +1000 Subject: [AccessD] Insert Into 101 For MAX In-Reply-To: <013501ca4bf3$b87d5c80$05000100@denzilnote> References: <518B90FC1A12496AB21976C08EFF65D7@reubennx9500>, <4ad35bdf.1701d00a.47e3.ffffc82d@mx.google.com>, <013501ca4bf3$b87d5c80$05000100@denzilnote> Message-ID: <4AD467A0.3937.A1BBC41@stuart.lexacorp.com.pg> You could use ODBC - link the SQL Server table, do the insert and then delete the link. This should do it (aircode so may need some tweaking): Local strODBCConn as string Local strSQL as string strODBCConn = "ODBC;Description=Test Connection;DRIVER=SQL Server;" & _ "SERVER=SQLServername;APP=Microsoft Data Access Components;" & _ "DATABASE=SQLDatabasename;Trusted_Connection=Yes" 'Create ODBC Link DoCmd.TransferDatabase acLink, "ODBC Database", strODBCConn, acTable, _ "tblX", "tblX", False 'Insert records strSQL = "Insert into tblLocalTable Select * from tblX" CurrentDb.Execute strSQL 'Delete ODBC Link DoCmd.DeleteObject acTable, "tblX" -- Stuart On 13 Oct 2009 at 21:55, Darren - Active Billing wrote: > Hi Max > > This looks promising - How would you get it to connect to SQL server on table X > and then populate a local Access Table with all the records from table X? > Many thanks > Darren > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Max Wanadoo > Sent: Tuesday, 13 October 2009 3:40 AM > To: 'Access Developers discussion and problem solving' > Subject: Re: [AccessD] Insert Into 101 > > As far as I understand the problem, this works ok for me. > > Max > > Sub AppendRecsFromQuery() > Dim dbs As DAO.Database, rst As DAO.Recordset > Dim sql As String, qdf As DAO.QueryDef > Set dbs = CurrentDb > sql = "Drop table _TestA" > dbs.Execute (sql) > > sql = "Create Table _TestA (FirstName text, Surname Text, PersonID long)" > dbs.Execute (sql) > > sql = "Drop Table _TestQ" > dbs.Execute sql > > sql = "Select firstname,surname,PersonID from mcmPeople Where PersonID < > 1000" > Set qdf = dbs.CreateQueryDef("_TestQ", sql) > Set rst = dbs.OpenRecordset(qdf.Name, dbOpenSnapshot) > sql = "insert into _TestA " & qdf.sql > dbs.Execute sql > > 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 From darren at activebilling.com.au Tue Oct 13 07:53:21 2009 From: darren at activebilling.com.au (Darren - Active Billing) Date: Tue, 13 Oct 2009 23:53:21 +1100 Subject: [AccessD] Insert Into 101 For MAX In-Reply-To: <4AD467A0.3937.A1BBC41@stuart.lexacorp.com.pg> References: <518B90FC1A12496AB21976C08EFF65D7@reubennx9500>, <4ad35bdf.1701d00a.47e3.ffffc82d@mx.google.com>, <013501ca4bf3$b87d5c80$05000100@denzilnote> <4AD467A0.3937.A1BBC41@stuart.lexacorp.com.pg> Message-ID: <013601ca4c04$260b5ee0$05000100@denzilnote> Stuart This is fantastic - never knew this could be done - pure gold and worked first go when I renamed the objects - amazing Darryl - you have to check this out Thanks again Stuart and thanks Max too DD -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Stuart McLachlan Sent: Tuesday, 13 October 2009 10:42 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Insert Into 101 For MAX You could use ODBC - link the SQL Server table, do the insert and then delete the link. This should do it (aircode so may need some tweaking): Local strODBCConn as string Local strSQL as string strODBCConn = "ODBC;Description=Test Connection;DRIVER=SQL Server;" & _ "SERVER=SQLServername;APP=Microsoft Data Access Components;" & _ "DATABASE=SQLDatabasename;Trusted_Connection=Yes" 'Create ODBC Link DoCmd.TransferDatabase acLink, "ODBC Database", strODBCConn, acTable, _ "tblX", "tblX", False 'Insert records strSQL = "Insert into tblLocalTable Select * from tblX" CurrentDb.Execute strSQL 'Delete ODBC Link DoCmd.DeleteObject acTable, "tblX" -- Stuart On 13 Oct 2009 at 21:55, Darren - Active Billing wrote: > Hi Max > > This looks promising - How would you get it to connect to SQL server on table X > and then populate a local Access Table with all the records from table X? > Many thanks > Darren > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Max Wanadoo > Sent: Tuesday, 13 October 2009 3:40 AM > To: 'Access Developers discussion and problem solving' > Subject: Re: [AccessD] Insert Into 101 > > As far as I understand the problem, this works ok for me. > > Max > > Sub AppendRecsFromQuery() > Dim dbs As DAO.Database, rst As DAO.Recordset > Dim sql As String, qdf As DAO.QueryDef > Set dbs = CurrentDb > sql = "Drop table _TestA" > dbs.Execute (sql) > > sql = "Create Table _TestA (FirstName text, Surname Text, PersonID long)" > dbs.Execute (sql) > > sql = "Drop Table _TestQ" > dbs.Execute sql > > sql = "Select firstname,surname,PersonID from mcmPeople Where PersonID < > 1000" > Set qdf = dbs.CreateQueryDef("_TestQ", sql) > Set rst = dbs.OpenRecordset(qdf.Name, dbOpenSnapshot) > sql = "insert into _TestA " & qdf.sql > dbs.Execute sql > > 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 -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From jwcolby at colbyconsulting.com Tue Oct 13 08:19:52 2009 From: jwcolby at colbyconsulting.com (jwcolby) Date: Tue, 13 Oct 2009 09:19:52 -0400 Subject: [AccessD] Insert Into 101 For MAX In-Reply-To: <013601ca4c04$260b5ee0$05000100@denzilnote> References: <518B90FC1A12496AB21976C08EFF65D7@reubennx9500>, <4ad35bdf.1701d00a.47e3.ffffc82d@mx.google.com>, <013501ca4bf3$b87d5c80$05000100@denzilnote> <4AD467A0.3937.A1BBC41@stuart.lexacorp.com.pg> <013601ca4c04$260b5ee0$05000100@denzilnote> Message-ID: <4AD47E78.4080109@colbyconsulting.com> Cool indeed Stuart. John W. Colby www.ColbyConsulting.com Darren - Active Billing wrote: > Stuart > > This is fantastic - never knew this could be done - pure gold and worked first > go when I renamed the objects - amazing > Darryl - you have to check this out > Thanks again Stuart and thanks Max too > > DD > > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Stuart McLachlan > Sent: Tuesday, 13 October 2009 10:42 PM > To: Access Developers discussion and problem solving > Subject: Re: [AccessD] Insert Into 101 For MAX > > You could use ODBC - link the SQL Server table, do the insert and then delete > the link. > > This should do it (aircode so may need some tweaking): > > Local strODBCConn as string > Local strSQL as string > > strODBCConn = "ODBC;Description=Test Connection;DRIVER=SQL Server;" & _ > "SERVER=SQLServername;APP=Microsoft Data Access Components;" & _ > "DATABASE=SQLDatabasename;Trusted_Connection=Yes" > > 'Create ODBC Link > DoCmd.TransferDatabase acLink, "ODBC Database", strODBCConn, acTable, _ > "tblX", "tblX", False > > 'Insert records > strSQL = "Insert into tblLocalTable Select * from tblX" > CurrentDb.Execute strSQL > > 'Delete ODBC Link > DoCmd.DeleteObject acTable, "tblX" > From rockysmolin at bchacc.com Tue Oct 13 10:52:05 2009 From: rockysmolin at bchacc.com (Rocky Smolin) Date: Tue, 13 Oct 2009 08:52:05 -0700 Subject: [AccessD] Back Up Your Backup Message-ID: Sidekick users distraught as personal data vanishes http://www3.signonsandiego.com/stories/2009/oct/13/sidekick-users-distraught-personal-data-vanishes/?uniontrib By Peter Svensson ASSOCIATED PRESS 2:00 a.m. October 13, 2009 NEW YORK ? Owners of Sidekick phones may have lost all the personal information they put on the device, including contact numbers, because of a failure of servers that remotely stored the data. The incident is a huge blow to the reputation of the Sidekick and is a reminder of the dangers of trusting a single provider to safeguard information. The phones are made by a Microsoft subsidiary and sold by T-Mobile USA, which said many Sidekick owners' information is ?almost certainly? gone. T-Mobile is offering customers $20 to refund the cost of one month of data usage on the phone. Microsoft spokeswoman Debbie Anderson said yesterday that there was a still a chance some of the lost user data could be restored from a backup system. Engineers were working on it in the Microsoft data center where the failure occurred, she said. The phones were troubled by a data outage a week ago. Service was intermittent last week, and then users started reporting that their Sidekicks were wiped of all personal information. ?This has been a terrible experience,? said Mary Boyle of Silver Spring, Md. She lost more than 500 contacts, 100 pictures, a to-do list and dozens of Web site passwords. On Saturday, T-Mobile and Microsoft warned customers not to restart their phones, remove the batteries or let the phones run down their batteries. Boyle said she did none of those things, yet her data disappeared anyway. Although the underlying data services were working again yesterday, T-Mobile was still advising customers not to reset their phones. T-Mobile also was listing all Sidekicks as ?out of stock? on its Web site. It's not clear how many customers have been affected or how many Sidekicks are in operation, though the figure could approach 1?million. The phone is popular among young urban customers. Users have appreciated its large QWERTY keyboard for text messaging, a feature now copied by mainstream phones. Microsoft bought Danger Inc., the maker of the Sidekick, last year in an attempt to revitalize its smart-phone software portfolio. The Sidekick's remote data storage feature was ahead of its time and served as a selling point for the device. It meant that if someone lost a phone, the contents could easily be downloaded to a new one. But the Sidekick didn't complement the remote storage with a convenient way to save data locally. Most newer phones, such as Apple's iPhone, are designed to back up a user's data when the device is connected to a PC. Increasingly, consumers and businesses are relying on ?cloud? services ? in which e-mail, word processing and other applications store their data in remote server farms. Providers such as Google back up the data, but as the Sidekick incident demonstrates, having a local backup can be essential. From Gustav at cactus.dk Tue Oct 13 11:10:32 2009 From: Gustav at cactus.dk (Gustav Brock) Date: Tue, 13 Oct 2009 18:10:32 +0200 Subject: [AccessD] Back Up Your Backup Message-ID: Hi Rocky The subject line should rather be: Don't rely on a single backup system. For critical data this is simple. One backup system only introduces a single point of failure. Thus, we recommend clients to have three, at least two, independent backup systems: 1. A local backup. Previously that would be a tape backup. Today typically a harddisk, internal or external. 2. Another local backup where the media frequently is brought off-site, typically an external harddisk brought to some other location with fast access. 3. A remote backup. This is so cheap to establish that every serious business should run this way. Still - and that is very strange to me - only very few clients run this way. /gustav >>> rockysmolin at bchacc.com 13-10-2009 17:52 >>> Sidekick users distraught as personal data vanishes http://www3.signonsandiego.com/stories/2009/oct/13/sidekick-users-distraught-personal-data-vanishes/?uniontrib From jwcolby at colbyconsulting.com Tue Oct 13 11:37:29 2009 From: jwcolby at colbyconsulting.com (jwcolby) Date: Tue, 13 Oct 2009 12:37:29 -0400 Subject: [AccessD] SPAM-LOW: Re: Back Up Your Backup In-Reply-To: References: Message-ID: <4AD4ACC9.7010803@colbyconsulting.com> The subject should be "how to lose your job". ;) > This is so cheap to establish that every serious business should run this way. Still - and that is very strange to me - only very few clients run this way. Because they see examples like MICROSOFT and T-MOBILE who only have a single copy of their data. John W. Colby www.ColbyConsulting.com Gustav Brock wrote: > Hi Rocky > > The subject line should rather be: Don't rely on a single backup system. > > For critical data this is simple. One backup system only introduces a single point of failure. Thus, we recommend clients to have three, at least two, independent backup systems: > > 1. A local backup. Previously that would be a tape backup. Today typically a harddisk, internal or external. > 2. Another local backup where the media frequently is brought off-site, typically an external harddisk brought to some other location with fast access. > 3. A remote backup. > > This is so cheap to establish that every serious business should run this way. Still - and that is very strange to me - only very few clients run this way. > > /gustav > > >>>> rockysmolin at bchacc.com 13-10-2009 17:52 >>> > > Sidekick users distraught as personal data vanishes > http://www3.signonsandiego.com/stories/2009/oct/13/sidekick-users-distraught-personal-data-vanishes/?uniontrib > > > From cfoust at infostatsystems.com Tue Oct 13 11:38:13 2009 From: cfoust at infostatsystems.com (Charlotte Foust) Date: Tue, 13 Oct 2009 09:38:13 -0700 Subject: [AccessD] Back Up Your Backup In-Reply-To: References: Message-ID: I use Carbomite backup on my laptop for critical files. My phone syncs with my laptop and the phone files are also backedup to carbomite. That's before any imaging or other physical backups. Dear Ann Landers, am I paranoid?? LOL Charlotte Foust -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: Tuesday, October 13, 2009 9:11 AM To: accessd at databaseadvisors.com Subject: Re: [AccessD] Back Up Your Backup Hi Rocky The subject line should rather be: Don't rely on a single backup system. For critical data this is simple. One backup system only introduces a single point of failure. Thus, we recommend clients to have three, at least two, independent backup systems: 1. A local backup. Previously that would be a tape backup. Today typically a harddisk, internal or external. 2. Another local backup where the media frequently is brought off-site, typically an external harddisk brought to some other location with fast access. 3. A remote backup. This is so cheap to establish that every serious business should run this way. Still - and that is very strange to me - only very few clients run this way. /gustav >>> rockysmolin at bchacc.com 13-10-2009 17:52 >>> Sidekick users distraught as personal data vanishes http://www3.signonsandiego.com/stories/2009/oct/13/sidekick-users-distra ught-personal-data-vanishes/?uniontrib From Gustav at cactus.dk Tue Oct 13 11:50:44 2009 From: Gustav at cactus.dk (Gustav Brock) Date: Tue, 13 Oct 2009 18:50:44 +0200 Subject: [AccessD] Back Up Your Backup Message-ID: Hi John You miss the point. Any backup system can fail, that's why you need two or more. Relying on one tape backup is just as stupid as relying on one remote backup. Besides, the MS/T-mobile case is not two but one example. Google have had troubles but - as far as I know - no data got lost. We use Amazon (My Secure Backup) which to date never have failed. The cost per month - for example for my workstation with all my personal data - is about USD 2.5. /gustav >>> jwcolby at colbyconsulting.com 13-10-2009 18:37 >>> The subject should be "how to lose your job". ;) > This is so cheap to establish that every serious business should run this way. Still - and that is very strange to me - only very few clients run this way. Because they see examples like MICROSOFT and T-MOBILE who only have a single copy of their data. John W. Colby www.ColbyConsulting.com Gustav Brock wrote: > Hi Rocky > > The subject line should rather be: Don't rely on a single backup system. > > For critical data this is simple. One backup system only introduces a single point of failure. Thus, we recommend clients to have three, at least two, independent backup systems: > > 1. A local backup. Previously that would be a tape backup. Today typically a harddisk, internal or external. > 2. Another local backup where the media frequently is brought off-site, typically an external harddisk brought to some other location with fast access. > 3. A remote backup. > > This is so cheap to establish that every serious business should run this way. Still - and that is very strange to me - only very few clients run this way. > > /gustav > > >>>> rockysmolin at bchacc.com 13-10-2009 17:52 >>> > > Sidekick users distraught as personal data vanishes > http://www3.signonsandiego.com/stories/2009/oct/13/sidekick-users-distraught-personal-data-vanishes/?uniontrib From rockysmolin at bchacc.com Tue Oct 13 12:26:42 2009 From: rockysmolin at bchacc.com (Rocky Smolin) Date: Tue, 13 Oct 2009 10:26:42 -0700 Subject: [AccessD] Back Up Your Backup In-Reply-To: References: Message-ID: <78171043E399484E88433970911DF652@HAL9005> I find it odd, or disturbing that Microsoft/T-Mobile could lose data and not have their own backup. The MS spokesmouth said "still a chance some of the lost user data could be restored from a backup system." Still some chance? Rocky -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: Tuesday, October 13, 2009 9:51 AM To: accessd at databaseadvisors.com Subject: Re: [AccessD] Back Up Your Backup Hi John You miss the point. Any backup system can fail, that's why you need two or more. Relying on one tape backup is just as stupid as relying on one remote backup. Besides, the MS/T-mobile case is not two but one example. Google have had troubles but - as far as I know - no data got lost. We use Amazon (My Secure Backup) which to date never have failed. The cost per month - for example for my workstation with all my personal data - is about USD 2.5. /gustav >>> jwcolby at colbyconsulting.com 13-10-2009 18:37 >>> The subject should be "how to lose your job". ;) > This is so cheap to establish that every serious business should run this way. Still - and that is very strange to me - only very few clients run this way. Because they see examples like MICROSOFT and T-MOBILE who only have a single copy of their data. John W. Colby www.ColbyConsulting.com Gustav Brock wrote: > Hi Rocky > > The subject line should rather be: Don't rely on a single backup system. > > For critical data this is simple. One backup system only introduces a single point of failure. Thus, we recommend clients to have three, at least two, independent backup systems: > > 1. A local backup. Previously that would be a tape backup. Today typically a harddisk, internal or external. > 2. Another local backup where the media frequently is brought off-site, typically an external harddisk brought to some other location with fast access. > 3. A remote backup. > > This is so cheap to establish that every serious business should run this way. Still - and that is very strange to me - only very few clients run this way. > > /gustav > > >>>> rockysmolin at bchacc.com 13-10-2009 17:52 >>> > > Sidekick users distraught as personal data vanishes > http://www3.signonsandiego.com/stories/2009/oct/13/sidekick-users-dist > raught-personal-data-vanishes/?uniontrib -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From Lambert.Heenan at chartisinsurance.com Tue Oct 13 12:55:40 2009 From: Lambert.Heenan at chartisinsurance.com (Heenan, Lambert) Date: Tue, 13 Oct 2009 13:55:40 -0400 Subject: [AccessD] Back Up Your Backup In-Reply-To: <78171043E399484E88433970911DF652@HAL9005> References: <78171043E399484E88433970911DF652@HAL9005> Message-ID: Hmm. How odd. Bing (MS) has a link to the story... http://www.theoaklandpress.com/articles/2009/10/13/business/doc4ad332c6abf3c150883552.txt But it comes up 'broken'. Google cache has the story though. MS covering it's trail? Lambert -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Rocky Smolin Sent: Tuesday, October 13, 2009 1:27 PM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Back Up Your Backup I find it odd, or disturbing that Microsoft/T-Mobile could lose data and not have their own backup. The MS spokesmouth said "still a chance some of the lost user data could be restored from a backup system." Still some chance? Rocky -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: Tuesday, October 13, 2009 9:51 AM To: accessd at databaseadvisors.com Subject: Re: [AccessD] Back Up Your Backup Hi John You miss the point. Any backup system can fail, that's why you need two or more. Relying on one tape backup is just as stupid as relying on one remote backup. Besides, the MS/T-mobile case is not two but one example. Google have had troubles but - as far as I know - no data got lost. We use Amazon (My Secure Backup) which to date never have failed. The cost per month - for example for my workstation with all my personal data - is about USD 2.5. /gustav >>> jwcolby at colbyconsulting.com 13-10-2009 18:37 >>> The subject should be "how to lose your job". ;) > This is so cheap to establish that every serious business should run this way. Still - and that is very strange to me - only very few clients run this way. Because they see examples like MICROSOFT and T-MOBILE who only have a single copy of their data. John W. Colby www.ColbyConsulting.com Gustav Brock wrote: > Hi Rocky > > The subject line should rather be: Don't rely on a single backup system. > > For critical data this is simple. One backup system only introduces a single point of failure. Thus, we recommend clients to have three, at least two, independent backup systems: > > 1. A local backup. Previously that would be a tape backup. Today > typically a harddisk, internal or external. > 2. Another local backup where the media frequently is brought > off-site, typically an external harddisk brought to some other location with fast access. > 3. A remote backup. > > This is so cheap to establish that every serious business should run > this way. Still - and that is very strange to me - only very few clients run this way. > > /gustav > > >>>> rockysmolin at bchacc.com 13-10-2009 17:52 >>> > > Sidekick users distraught as personal data vanishes > http://www3.signonsandiego.com/stories/2009/oct/13/sidekick-users-dist > raught-personal-data-vanishes/?uniontrib -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From Lambert.Heenan at chartisinsurance.com Tue Oct 13 12:58:39 2009 From: Lambert.Heenan at chartisinsurance.com (Heenan, Lambert) Date: Tue, 13 Oct 2009 13:58:39 -0400 Subject: [AccessD] Back Up Your Backup In-Reply-To: References: <78171043E399484E88433970911DF652@HAL9005> Message-ID: "MS covering its trail" -----Original Message----- From: Heenan, Lambert Sent: Tuesday, October 13, 2009 1:56 PM To: 'Access Developers discussion and problem solving' Subject: RE: [AccessD] Back Up Your Backup Hmm. How odd. Bing (MS) has a link to the story... http://www.theoaklandpress.com/articles/2009/10/13/business/doc4ad332c6abf3c150883552.txt But it comes up 'broken'. Google cache has the story though. MS covering it's trail? Lambert -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Rocky Smolin Sent: Tuesday, October 13, 2009 1:27 PM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Back Up Your Backup I find it odd, or disturbing that Microsoft/T-Mobile could lose data and not have their own backup. The MS spokesmouth said "still a chance some of the lost user data could be restored from a backup system." Still some chance? Rocky -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: Tuesday, October 13, 2009 9:51 AM To: accessd at databaseadvisors.com Subject: Re: [AccessD] Back Up Your Backup Hi John You miss the point. Any backup system can fail, that's why you need two or more. Relying on one tape backup is just as stupid as relying on one remote backup. Besides, the MS/T-mobile case is not two but one example. Google have had troubles but - as far as I know - no data got lost. We use Amazon (My Secure Backup) which to date never have failed. The cost per month - for example for my workstation with all my personal data - is about USD 2.5. /gustav >>> jwcolby at colbyconsulting.com 13-10-2009 18:37 >>> The subject should be "how to lose your job". ;) > This is so cheap to establish that every serious business should run this way. Still - and that is very strange to me - only very few clients run this way. Because they see examples like MICROSOFT and T-MOBILE who only have a single copy of their data. John W. Colby www.ColbyConsulting.com Gustav Brock wrote: > Hi Rocky > > The subject line should rather be: Don't rely on a single backup system. > > For critical data this is simple. One backup system only introduces a single point of failure. Thus, we recommend clients to have three, at least two, independent backup systems: > > 1. A local backup. Previously that would be a tape backup. Today > typically a harddisk, internal or external. > 2. Another local backup where the media frequently is brought > off-site, typically an external harddisk brought to some other location with fast access. > 3. A remote backup. > > This is so cheap to establish that every serious business should run > this way. Still - and that is very strange to me - only very few clients run this way. > > /gustav > > >>>> rockysmolin at bchacc.com 13-10-2009 17:52 >>> > > Sidekick users distraught as personal data vanishes > http://www3.signonsandiego.com/stories/2009/oct/13/sidekick-users-dist > raught-personal-data-vanishes/?uniontrib -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd 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 Oct 13 13:21:18 2009 From: jwcolby at colbyconsulting.com (jwcolby) Date: Tue, 13 Oct 2009 14:21:18 -0400 Subject: [AccessD] SPAM-LOW: Re: Back Up Your Backup In-Reply-To: References: Message-ID: <4AD4C51E.2000001@colbyconsulting.com> LOL, Gustav I certainly did not miss that point. John W. Colby www.ColbyConsulting.com Gustav Brock wrote: > Hi John > > You miss the point. Any backup system can fail, that's why you need two or more. Relying on one tape backup is just as stupid as relying on one remote backup. > Besides, the MS/T-mobile case is not two but one example. Google have had troubles but - as far as I know - no data got lost. > We use Amazon (My Secure Backup) which to date never have failed. The cost per month - for example for my workstation with all my personal data - is about USD 2.5. > > /gustav > > >>>> jwcolby at colbyconsulting.com 13-10-2009 18:37 >>> > The subject should be "how to lose your job". > > ;) > > > This is so cheap to establish that every serious business should run this way. Still - and that > is very strange to me - only very few clients run this way. > > Because they see examples like MICROSOFT and T-MOBILE who only have a single copy of their data. > > John W. Colby > www.ColbyConsulting.com > > > Gustav Brock wrote: >> Hi Rocky >> >> The subject line should rather be: Don't rely on a single backup system. >> >> For critical data this is simple. One backup system only introduces a single point of failure. Thus, we recommend clients to have three, at least two, independent backup systems: >> >> 1. A local backup. Previously that would be a tape backup. Today typically a harddisk, internal or external. >> 2. Another local backup where the media frequently is brought off-site, typically an external harddisk brought to some other location with fast access. >> 3. A remote backup. >> >> This is so cheap to establish that every serious business should run this way. Still - and that is very strange to me - only very few clients run this way. >> >> /gustav >> >> >>>>> rockysmolin at bchacc.com 13-10-2009 17:52 >>> >> Sidekick users distraught as personal data vanishes >> http://www3.signonsandiego.com/stories/2009/oct/13/sidekick-users-distraught-personal-data-vanishes/?uniontrib > > > From dbdoug at gmail.com Tue Oct 13 13:33:13 2009 From: dbdoug at gmail.com (Doug Steele) Date: Tue, 13 Oct 2009 11:33:13 -0700 Subject: [AccessD] Back Up Your Backup In-Reply-To: <78171043E399484E88433970911DF652@HAL9005> References: <78171043E399484E88433970911DF652@HAL9005> Message-ID: <4dd71a0c0910131133y57f995ccn1149586360541ce3@mail.gmail.com> Some theories about the Sidekick problem http://www.appleinsider.com/articles/09/10/12/microsofts_sidekick_pink_problems_blamed_on_dogfooding_and_sabotage.html Note that AppleInsider is hardly a neutral site! As far as my backups go, I am now using Dropbox which gives me backups of all my working files on the net (Amazon) and synchronizes them to all my (too many!) computers. And a Time Machine for other stuff. Doug Steele On Tue, Oct 13, 2009 at 10:26 AM, Rocky Smolin wrote: > I find it odd, or disturbing that Microsoft/T-Mobile could lose data and > not > have their own backup. > > The MS spokesmouth said "still a chance some of the lost user data could be > restored from a backup system." > > Still some chance? > > From jwcolby at colbyconsulting.com Tue Oct 13 14:06:45 2009 From: jwcolby at colbyconsulting.com (jwcolby) Date: Tue, 13 Oct 2009 15:06:45 -0400 Subject: [AccessD] Back Up Your Backup In-Reply-To: <4dd71a0c0910131133y57f995ccn1149586360541ce3@mail.gmail.com> References: <78171043E399484E88433970911DF652@HAL9005> <4dd71a0c0910131133y57f995ccn1149586360541ce3@mail.gmail.com> Message-ID: <4AD4CFC5.9000408@colbyconsulting.com> That was interesting. John W. Colby www.ColbyConsulting.com Doug Steele wrote: > Some theories about the Sidekick problem > > http://www.appleinsider.com/articles/09/10/12/microsofts_sidekick_pink_problems_blamed_on_dogfooding_and_sabotage.html > > Note that AppleInsider is hardly a neutral site! > > As far as my backups go, I am now using Dropbox which gives me backups of > all my working files on the net (Amazon) and synchronizes them to all my > (too many!) computers. And a Time Machine for other stuff. > > Doug Steele > > On Tue, Oct 13, 2009 at 10:26 AM, Rocky Smolin wrote: > >> I find it odd, or disturbing that Microsoft/T-Mobile could lose data and >> not >> have their own backup. >> >> The MS spokesmouth said "still a chance some of the lost user data could be >> restored from a backup system." >> >> Still some chance? >> >> From wdhindman at dejpolsystems.com Tue Oct 13 20:44:10 2009 From: wdhindman at dejpolsystems.com (William Hindman) Date: Tue, 13 Oct 2009 21:44:10 -0400 Subject: [AccessD] ...free Zone Alarm Pro download ...legit In-Reply-To: <4AD4CFC5.9000408@colbyconsulting.com> References: <78171043E399484E88433970911DF652@HAL9005><4dd71a0c0910131133y57f995ccn1149586360541ce3@mail.gmail.com> <4AD4CFC5.9000408@colbyconsulting.com> Message-ID: <84939CA54A7B4EAE94DD33AFD3DDE945@jislaptopdev> http://download.zonealarm.com/bin/free/sum/index-b.html?cid=W100020 6am 13 Oct to 6am 14 Oct pst one year license for up to 3 pcs William From Johncliviger at aol.com Wed Oct 14 05:05:35 2009 From: Johncliviger at aol.com (Johncliviger at aol.com) Date: Wed, 14 Oct 2009 06:05:35 EDT Subject: [AccessD] A momentary lapse of reason Message-ID: Good morning all Please forgive the title but Pink Floyd's cd is in front of me and I thought the title quite apt to my mental processes this morning. But... I have problem: I have 2 tables. One holds Parts Rejected and the other holds Parts Received. Each table has 2 common fields, SupplierID and AP (Accounting Period). In PartsRejects table I have total parts rejected by supplierID and AP. In PartsReceived I have total parts received by supplierID and AP. When I run a query linking these tables have missing rows in both. While this many appear to be the classical relationship of many-to-many, but is it? The PartsReceived table is imported to Access once each accounting period from accounts software. A question! I need a query to show All rows from both tabels, however when I use either a Left Join or Inner Join I get all rows from the left sided table but loose rows from the right side where there is no match or rows are absent on the Left sided table. Creating a Link or Junction table causes problems because I have to populate this table each accounting period. Anyone done this type of thing before? TIA johnc From Gustav at cactus.dk Wed Oct 14 05:30:32 2009 From: Gustav at cactus.dk (Gustav Brock) Date: Wed, 14 Oct 2009 12:30:32 +0200 Subject: [AccessD] A momentary lapse of reason Message-ID: Hi John Create a union query where you collect SupplierID and AP from both tables. Save this. Create a new query where you use the saved union query as source. Bring in the two tables and create outer joins to these from the union query. /gustav PS: Maybe I should dust off my Pink Floyd vinyl collection - and the cassette tape with Arnold Lane - if I only had a CC player that will run ... anyone having a service manual for Sony WM-D6 at hand? >>> Johncliviger at aol.com 14-10-2009 12:05 >>> Good morning all Please forgive the title but Pink Floyd's cd is in front of me and I thought the title quite apt to my mental processes this morning. But... I have problem: I have 2 tables. One holds Parts Rejected and the other holds Parts Received. Each table has 2 common fields, SupplierID and AP (Accounting Period). In PartsRejects table I have total parts rejected by supplierID and AP. In PartsReceived I have total parts received by supplierID and AP. When I run a query linking these tables have missing rows in both. While this many appear to be the classical relationship of many-to-many, but is it? The PartsReceived table is imported to Access once each accounting period from accounts software. A question! I need a query to show All rows from both tabels, however when I use either a Left Join or Inner Join I get all rows from the left sided table but loose rows from the right side where there is no match or rows are absent on the Left sided table. Creating a Link or Junction table causes problems because I have to populate this table each accounting period. Anyone done this type of thing before? TIA johnc From stuart at lexacorp.com.pg Wed Oct 14 05:37:31 2009 From: stuart at lexacorp.com.pg (Stuart McLachlan) Date: Wed, 14 Oct 2009 20:37:31 +1000 Subject: [AccessD] A momentary lapse of reason In-Reply-To: References: Message-ID: <4AD5A9EB.12996.F06B394@stuart.lexacorp.com.pg> You need a list of *all* suppliers and Accounting Periods which you can then Left Join the two tables to. You can do this with a UNION query on the two tables. Create a query: Select SupplierID,AP from PartsReceived UNION Select SupplierID,AP from PartsRejected; Save this query as qryAllSupplierAPs (By default, a UNION query selects DISTINCT so this will give you a unique list of all SupplierID/AP pairs) Then create a second query which left joins both tables to this query: SELECT qryAllSupplierAPs.AP, qryAllSupplierAPs.SupplierID, PartsReceived.Qty, PartsRejected.Qty FROM (qryAllSupplierAPs LEFT JOIN PartsReceived ON (qryAllSupplierAPs.AP = PartsReceived.AP) AND (qryAllSupplierAPs.SupplierID = PartsReceived.SupplierID)) LEFT JOIN PartsRejected ON (qryAllSupplierAPs.AP = PartsRejected.AP) AND (qryAllSupplierAPs.SupplierID = PartsRejected.SupplierID); On 14 Oct 2009 at 6:05, Johncliviger at aol.com wrote: > > Good morning all > Please forgive the title but Pink Floyd's cd is in front of me and I > thought the title quite apt to my mental processes this morning. But... > > > I have problem: I have 2 tables. One holds Parts Rejected and the other > holds Parts Received. Each table has 2 common fields, SupplierID and AP > (Accounting Period). In PartsRejects table I have total parts rejected by > supplierID and AP. In PartsReceived I have total parts received by supplierID > and AP. > When I run a query linking these tables have missing rows in both. While > this many appear to be the classical relationship of many-to-many, but is > it? The PartsReceived table is imported to Access once each accounting > period from accounts software. > A question! I need a query to show All rows from both tabels, however > when I use either a Left Join or Inner Join I get all rows from the left sided > table but loose rows from the right side where there is no match or rows > are absent on the Left sided table. > Creating a Link or Junction table causes problems because I have to > populate this table each accounting period. > Anyone done this type of thing before? > TIA > johnc > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com From Johncliviger at aol.com Wed Oct 14 05:45:19 2009 From: Johncliviger at aol.com (Johncliviger at aol.com) Date: Wed, 14 Oct 2009 06:45:19 EDT Subject: [AccessD] A momentary lapse of reason Message-ID: Hi Stuart and Gustav Stuart I'm just looking at union queries I shall pursue them further. Thank you for the response. Guatav Your email refused to open. Kind regards johnc From dkalsow at yahoo.com Wed Oct 14 06:51:26 2009 From: dkalsow at yahoo.com (Dale Kalsow) Date: Wed, 14 Oct 2009 04:51:26 -0700 (PDT) Subject: [AccessD] Documentation In-Reply-To: <003601ca46b8$86614990$ed5fa27a@personald6374f> Message-ID: <137634.1065.qm@web50410.mail.re2.yahoo.com> Does anyone have a favoriate program that they are using to create end user on line documentation in access? ? thanks! ? Dale --- On Tue, 10/6/09, A.D.Tejpal wrote: From: A.D.Tejpal Subject: Re: [AccessD] Invalid Password To: "Access Developers discussion and problem solving" Date: Tuesday, October 6, 2009, 2:08 PM Rocky, ? ? That too can be handled as part of the same automated process. Let the form for changing BE password be available only in the master FE handled by an authorized person. This FE can have a table T_FePaths holding the full paths of all other front ends in its field named FePath. ? ? Additional subroutine named P_ExportLinkedTablesToAllFrontEnds() in VBA module of master FE as given below, would export the freshly linked tables to all other front ends. Revised code in click event of the command button would be as follows: ' Code in form's module '========================== Private Sub CmdSetNewPwd_Click() ? ? If Len(Me.TxtPwdNew) > 0 And _ ? ? ? ? ? ? ? ? ? ? Me.TxtPwdNewConfirm = _ ? ? ? ? ? ? ? ? ? ? Me.TxtPwdNew Then ? ? ? ? P_ChangeBePwdAndRelink Me.TxtPwdNew ? ? ? ? ? ? ? ? P_ExportLinkedTablesToAllFrontEnds ? ? Else ? ? ? ? MsgBox "Discrepancy in entries" ? ? End If End Sub '========================== ? ? Note: ? ? (a) Using True as second argument in OpenDatabase method in subroutine named P_ChangeBePwdAndRelink() as given in my earlier post ensures that the back end db is handled in exclusive mode while changing the password. ? ? (b) TransferDatabase method has the advantage that while implementing export action, if an object with the given name already exists in the target db, it gets replaced by the exported one silently, without any warning message. ? ? (c) Moreover, TransferDatabase action is remarkably faster than the combination of actions represented by OpenDatabase > DeleteTable > CopyTable methods. Best wishes, A.D. Tejpal ------------ ' Code in general or form's module '============================== Sub P_ExportLinkedTablesToAllFrontEnds() On Error GoTo ErrTrap ? ? Dim db As DAO.Database ? ? Dim rst1 As DAO.Recordset ? ? Dim rst2 As DAO.Recordset ? ? Dim Qst As String, Tnm As String ? ? ? ? Set db = DBEngine(0)(0) ? ? ? ? ' Paths of all front ends other than the master FE ? ? ' (Table T_FePaths has paths of all FE's in field FePath) ? ? Qst = "SELECT FePath FROM T_FePaths;" ? ? Set rst1 = db.OpenRecordset(Qst) ? ? ? ? ' Names of all linked tables in master FE ? ? Qst = "SELECT Name FROM MSysObjects " & _ ? ? ? ? ? ? " WHERE Type = 6;" ? ? Set rst2 = db.OpenRecordset(Qst) ? ? ? ? ' Copy all linked tables from master FE to ? ? ' all other FE's ? ? Do Until rst1.EOF ? ? ? ? rst2.MoveFirst ? ? ? ? Do Until rst2.EOF ? ? ? ? ? ? ' Copy linked table from master FE ? ? ? ? ? ? ' to other FE ? ? ? ? ? ? Tnm = rst2.Fields(0) ? ? ? ? ? ? DoCmd.TransferDatabase acExport, _ ? ? ? ? ? ? ? ? ? ? "Microsoft Access", rst1.Fields(0), _ ? ? ? ? ? ? ? ? ? ? acTable, Tnm, Tnm ? ? ? ? ? ? ? ? ? ? ? ? rst2.MoveNext ? ? ? ? Loop ? ? ? ? rst1.MoveNext ? ? Loop ? ? ' Note: ? ? '???TransferDatabase method has the advantage ? ? '???that while implementing export action, if an ? ? '???object with given name, already exists in the ? ? '???target db, it gets replaced by the exported one, ? ? '???without any warning message. ? ? '???Moreover, TransferDatabase action is remarkably ? ? '???faster than the combination of actions represented by ? ? '???OpenDatabase > DeleteTable > CopyTable methods. ? ? ExitPoint: ? ? On Error Resume Next ? ? rst1.Close ? ? rst2.Close ? ? Set rst1 = Nothing ? ? Set rst2 = Nothing ? ? Set db = Nothing ? ? On Error GoTo 0 ? ? Exit Sub ? ? ? ? ErrTrap: ? ? MsgBox Err.Number & " - " & Err.DESCRIPTION ? ? Resume ExitPoint End Sub '===================================== ? ----- Original Message ----- ? From: Rocky Smolin ? To: 'Access Developers discussion and problem solving' ? Sent: Tuesday, October 06, 2009 22:24 ? Subject: Re: [AccessD] Invalid Password ? Well, there's a potential procedural problem.? Each user has their own copy ? of the FE.? So the head guy should change the password and then, after ? relinking HIS FE, distribute that FE to the other users.? I think. ? R ? -----Original Message----- ? From: accessd-bounces at databaseadvisors.com ? [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Drew Wutka ? Sent: Tuesday, October 06, 2009 8:57 AM ? To: Access Developers discussion and problem solving ? Subject: Re: [AccessD] Invalid Password ? Just saw it.? Looks like a good solution.? Just as an FYI, if multiple ? people go into this Front end, when the password changes, it will lock the ? users out when one person goes in.? (I'm about 90% certain, because this ? process will probably require exclusive access to the front ? end....) ? Drew ? -----Original Message----- ? From: accessd-bounces at databaseadvisors.com ? [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Rocky Smolin ? Sent: Tuesday, October 06, 2009 10:23 AM ? To: 'Access Developers discussion and problem solving' ? Subject: Re: [AccessD] Invalid Password ? Drew: ? Thanks for the reply.? Did you see A.D.'s solution.? I think that will work. ? They're using 2003 and actually the primary machine is still on A2K which ? causes reference problems.? He's on the IT list for an upgrade.? Has been ? for about 2 years.? ? R -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From hollisvj at pgdp.usec.com Wed Oct 14 07:44:15 2009 From: hollisvj at pgdp.usec.com (Hollis, Virginia) Date: Wed, 14 Oct 2009 07:44:15 -0500 Subject: [AccessD] Open Report from MainForm based on SubForm Message-ID: <703BDA18A87DFA4CB265A86F42E4178D08EE6FD9@c2k3exchange.pgdp.corp.usec.com> I have a command button on the main form that I want to open a report filtered to one record based on a value on the SubForm. frm_VehicleInspection (mainform) frm_VehicleInspectionSub (subform) rpt_VehicleInspection (report to open) VehicleInspectionID is the key to open the report. **************** On Error GoTo Err_cmdPrint_Click Dim stDocName As String Dim stLinkCriteria As String 'If IsNull(Forms!frm_VehicleInspection.frm_VehicleInspectionSub!VehicleID) Then ' MsgBox "You must must enter a record before printing.", vbExclamation + vbOKOnly, "Entry Required" ' Exit Sub 'End If ' vbresponse = acDataErrContinue ' DoCmd.RunCommand acCmdSaveRecord stDocName = "rpt_VehicleInspection" Forms![frm_VehicleInspection]![frm_VehicleInspectionSub].SetFocus This didn't work (it opens the report, but shows all the records on the report): 'DoCmd.OpenReport stDocName, acPreview, , "Forms![frm_VehicleInspection]![frm_VehicleInspectionSub].Form![VehicleI nspID]=" & Forms![frm_VehicleInspection]![frm_VehicleInspectionSub]![VehicleInspID] This didn't work: 'DoCmd.OpenReport stDocName, acPreview, , "Forms![frm_VehicleInspection]![frm_VehicleInspectionSub].Form![VehicleI nspID]=" & Me![VehicleInspID] This didn't work either: DoCmd.OpenReport stDocName, acPreview, , "Forms![frm_VehicleInspection]![frm_VehicleInspectionSub].Form![VehicleI nspID]=" & strDocName!VehicleInspID.[VehicleInspID] Exit_cmdPrint_Click: Exit Sub Err_cmdPrint_Click: MsgBox Err.Description Resume Exit_cmdPrint_Click End Sub Virginia From max.wanadoo at gmail.com Wed Oct 14 08:05:39 2009 From: max.wanadoo at gmail.com (Max Wanadoo) Date: Wed, 14 Oct 2009 14:05:39 +0100 Subject: [AccessD] Open Report from MainForm based on SubForm In-Reply-To: <703BDA18A87DFA4CB265A86F42E4178D08EE6FD9@c2k3exchange.pgdp.corp.usec.com> References: <703BDA18A87DFA4CB265A86F42E4178D08EE6FD9@c2k3exchange.pgdp.corp.usec.com> Message-ID: The syntax you want is:- DoCmd.OpenReport "MyRpt", acViewPreview, , "VehicleInspID=" & "Forms![frm_VehicleInspection]![frm_VehicleInspectionSub].Form![VehicleInspID]=" & me![VehicleInspID] Virginia, make SURE that your have the correct NAME of the sub form. Often people think they know what it is called but it isnt called that at all. Check the data AND "Other" Tab in the properties. I have a sub form where the DataSource = "MCM_PeoplePopNAD" But I call the form (Under the Other Tab in the properties) "PeoplePopSub2" Max On 14/10/2009, Hollis, Virginia wrote: > I have a command button on the main form that I want to open a report > filtered to one record based on a value on the SubForm. > > > > frm_VehicleInspection (mainform) > > frm_VehicleInspectionSub (subform) > > rpt_VehicleInspection (report to open) > > VehicleInspectionID is the key to open the report. > > > > **************** > > On Error GoTo Err_cmdPrint_Click > > > > Dim stDocName As String > > Dim stLinkCriteria As String > > > > 'If > IsNull(Forms!frm_VehicleInspection.frm_VehicleInspectionSub!VehicleID) > Then > > ' MsgBox "You must must enter a record before printing.", > vbExclamation + vbOKOnly, "Entry Required" > > ' Exit Sub > > 'End If > > ' vbresponse = acDataErrContinue > > ' DoCmd.RunCommand acCmdSaveRecord > > stDocName = "rpt_VehicleInspection" > > > > Forms![frm_VehicleInspection]![frm_VehicleInspectionSub].SetFocus > > > > This didn't work (it opens the report, but shows all the records on the > report): 'DoCmd.OpenReport stDocName, acPreview, , > "Forms![frm_VehicleInspection]![frm_VehicleInspectionSub].Form![VehicleI > nspID]=" & > > Forms![frm_VehicleInspection]![frm_VehicleInspectionSub]![VehicleInspID] > > > > This didn't work: 'DoCmd.OpenReport stDocName, acPreview, , > "Forms![frm_VehicleInspection]![frm_VehicleInspectionSub].Form![VehicleI > nspID]=" & Me![VehicleInspID] > > > > This didn't work either: DoCmd.OpenReport stDocName, acPreview, , > "Forms![frm_VehicleInspection]![frm_VehicleInspectionSub].Form![VehicleI > nspID]=" & strDocName!VehicleInspID.[VehicleInspID] > > > > Exit_cmdPrint_Click: > > Exit Sub > > > > Err_cmdPrint_Click: > > MsgBox Err.Description > > Resume Exit_cmdPrint_Click > > End Sub > > > > Virginia > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > From hollisvj at pgdp.usec.com Wed Oct 14 08:24:22 2009 From: hollisvj at pgdp.usec.com (Hollis, Virginia) Date: Wed, 14 Oct 2009 08:24:22 -0500 Subject: [AccessD] Open Report from MainForm based on SubForm Message-ID: <703BDA18A87DFA4CB265A86F42E4178D08EE7021@c2k3exchange.pgdp.corp.usec.com> I checked and the subform is named correctly (frm_VehicleInspectionSub). The first part of the code sets the focus to the subform & this works. With your example I get - "Can't find field VehicleInspID referred to in your expression". I checked the names & the control sources and they all show VehicleInspID; ******** The syntax you want is:- DoCmd.OpenReport "MyRpt", acViewPreview, , "VehicleInspID=" & "Forms![frm_VehicleInspection]![frm_VehicleInspectionSub].Form![VehicleI nspID]=" & me![VehicleInspID] Virginia, make SURE that your have the correct NAME of the sub form. Often people think they know what it is called but it isnt called that at all. Check the data AND "Other" Tab in the properties. I have a sub form where the DataSource = "MCM_PeoplePopNAD" But I call the form (Under the Other Tab in the properties) "PeoplePopSub2" Max ********* I have a command button on the main form that I want to open a report filtered to one record based on a value on the SubForm. frm_VehicleInspection (mainform) frm_VehicleInspectionSub (subform) rpt_VehicleInspection (report to open) VehicleInspID is the key to open the report. **************** On Error GoTo Err_cmdPrint_Click Dim stDocName As String Dim stLinkCriteria As String 'If IsNull(Forms!frm_VehicleInspection.frm_VehicleInspectionSub!VehicleID) Then ' MsgBox "You must must enter a record before printing.", vbExclamation + vbOKOnly, "Entry Required" ' Exit Sub 'End If ' vbresponse = acDataErrContinue ' DoCmd.RunCommand acCmdSaveRecord stDocName = "rpt_VehicleInspection" Forms![frm_VehicleInspection]![frm_VehicleInspectionSub].SetFocus This didn't work (it opens the report, but shows all the records on the report): 'DoCmd.OpenReport stDocName, acPreview, , "Forms![frm_VehicleInspection]![frm_VehicleInspectionSub].Form![VehicleI nspID]=" & Forms![frm_VehicleInspection]![frm_VehicleInspectionSub]![VehicleInspID] This didn't work: 'DoCmd.OpenReport stDocName, acPreview, , "Forms![frm_VehicleInspection]![frm_VehicleInspectionSub].Form![VehicleI nspID]=" & Me![VehicleInspID] This didn't work either: DoCmd.OpenReport stDocName, acPreview, , "Forms![frm_VehicleInspection]![frm_VehicleInspectionSub].Form![VehicleI nspID]=" & strDocName!VehicleInspID.[VehicleInspID] Exit_cmdPrint_Click: Exit Sub Err_cmdPrint_Click: MsgBox Err.Description Resume Exit_cmdPrint_Click End Sub Virginia From max.wanadoo at gmail.com Wed Oct 14 08:49:18 2009 From: max.wanadoo at gmail.com (Max Wanadoo) Date: Wed, 14 Oct 2009 14:49:18 +0100 Subject: [AccessD] Open Report from MainForm based on SubForm In-Reply-To: <703BDA18A87DFA4CB265A86F42E4178D08EE7021@c2k3exchange.pgdp.corp.usec.com> References: <703BDA18A87DFA4CB265A86F42E4178D08EE7021@c2k3exchange.pgdp.corp.usec.com> Message-ID: you have to put in YOUR OWN names/values. I do not know what you call it. I was showing the syntax and format. max On 14/10/2009, Hollis, Virginia wrote: > I checked and the subform is named correctly (frm_VehicleInspectionSub). > The first part of the code sets the focus to the subform & this works. > > > > With your example I get - "Can't find field VehicleInspID referred to in > your expression". I checked the names & the control sources and they all > show VehicleInspID; > > ******** > > The syntax you want is:- > > DoCmd.OpenReport "MyRpt", acViewPreview, , "VehicleInspID=" & > "Forms![frm_VehicleInspection]![frm_VehicleInspectionSub].Form![VehicleI > nspID]=" > & me![VehicleInspID] > > Virginia, make SURE that your have the correct NAME of the sub form. > Often people think they know what it is called but it isnt called that > at all. Check the data AND "Other" Tab in the properties. > > I have a sub form where the DataSource = "MCM_PeoplePopNAD" But I call > the form (Under the Other Tab in the properties) "PeoplePopSub2" > > Max > > ********* > I have a command button on the main form that I want to open a report > filtered to one record based on a value on the SubForm. > > frm_VehicleInspection (mainform) > frm_VehicleInspectionSub (subform) > rpt_VehicleInspection (report to open) > VehicleInspID is the key to open the report. > > > > **************** > > On Error GoTo Err_cmdPrint_Click > Dim stDocName As String > Dim stLinkCriteria As String > 'If > IsNull(Forms!frm_VehicleInspection.frm_VehicleInspectionSub!VehicleID) > Then > ' MsgBox "You must must enter a record before printing.", > vbExclamation + vbOKOnly, "Entry Required" > > ' Exit Sub > 'End If > ' vbresponse = acDataErrContinue > ' DoCmd.RunCommand acCmdSaveRecord > > stDocName = "rpt_VehicleInspection" > > Forms![frm_VehicleInspection]![frm_VehicleInspectionSub].SetFocus > > This didn't work (it opens the report, but shows all the records on the > report): 'DoCmd.OpenReport stDocName, acPreview, , > > "Forms![frm_VehicleInspection]![frm_VehicleInspectionSub].Form![VehicleI > nspID]=" & > > > Forms![frm_VehicleInspection]![frm_VehicleInspectionSub]![VehicleInspID] > > This didn't work: 'DoCmd.OpenReport stDocName, acPreview, , > > "Forms![frm_VehicleInspection]![frm_VehicleInspectionSub].Form![VehicleI > nspID]=" & Me![VehicleInspID] > > This didn't work either: DoCmd.OpenReport stDocName, acPreview, , > > "Forms![frm_VehicleInspection]![frm_VehicleInspectionSub].Form![VehicleI > nspID]=" & strDocName!VehicleInspID.[VehicleInspID] > > > Exit_cmdPrint_Click: > Exit Sub > > Err_cmdPrint_Click: > > MsgBox Err.Description > > Resume Exit_cmdPrint_Click > > End Sub > > Virginia > > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > From hollisvj at pgdp.usec.com Wed Oct 14 08:54:56 2009 From: hollisvj at pgdp.usec.com (Hollis, Virginia) Date: Wed, 14 Oct 2009 08:54:56 -0500 Subject: [AccessD] Open Report from MainForm based on SubForm Message-ID: <703BDA18A87DFA4CB265A86F42E4178D08EE704B@c2k3exchange.pgdp.corp.usec.com> You have it all named correctly. I changed "MyRpt" is all I had to change. ********** you have to put in YOUR OWN names/values. I do not know what you call it. I was showing the syntax and format. max Subject: [AccessD] Open Report from MainForm based on SubForm I checked and the subform is named correctly (frm_VehicleInspectionSub). The first part of the code sets the focus to the subform & this works. With your example I get - "Can't find field VehicleInspID referred to in your expression". I checked the names & the control sources and they all show VehicleInspID; ******** The syntax you want is:- DoCmd.OpenReport "MyRpt", acViewPreview, , "VehicleInspID=" & "Forms![frm_VehicleInspection]![frm_VehicleInspectionSub].Form![VehicleI nspID]=" & me![VehicleInspID] Virginia, make SURE that your have the correct NAME of the sub form. Often people think they know what it is called but it isnt called that at all. Check the data AND "Other" Tab in the properties. I have a sub form where the DataSource = "MCM_PeoplePopNAD" But I call the form (Under the Other Tab in the properties) "PeoplePopSub2" Max ********* I have a command button on the main form that I want to open a report filtered to one record based on a value on the SubForm. frm_VehicleInspection (mainform) frm_VehicleInspectionSub (subform) rpt_VehicleInspection (report to open) VehicleInspID is the key to open the report. **************** On Error GoTo Err_cmdPrint_Click Dim stDocName As String Dim stLinkCriteria As String 'If IsNull(Forms!frm_VehicleInspection.frm_VehicleInspectionSub!VehicleID) Then ' MsgBox "You must must enter a record before printing.", vbExclamation + vbOKOnly, "Entry Required" ' Exit Sub 'End If ' vbresponse = acDataErrContinue ' DoCmd.RunCommand acCmdSaveRecord stDocName = "rpt_VehicleInspection" Forms![frm_VehicleInspection]![frm_VehicleInspectionSub].SetFocus This didn't work (it opens the report, but shows all the records on the report): 'DoCmd.OpenReport stDocName, acPreview, , "Forms![frm_VehicleInspection]![frm_VehicleInspectionSub].Form![VehicleI nspID]=" & Forms![frm_VehicleInspection]![frm_VehicleInspectionSub]![VehicleInspID] This didn't work: 'DoCmd.OpenReport stDocName, acPreview, , "Forms![frm_VehicleInspection]![frm_VehicleInspectionSub].Form![VehicleI nspID]=" & Me![VehicleInspID] This didn't work either: DoCmd.OpenReport stDocName, acPreview, , "Forms![frm_VehicleInspection]![frm_VehicleInspectionSub].Form![VehicleI nspID]=" & strDocName!VehicleInspID.[VehicleInspID] Exit_cmdPrint_Click: Exit Sub Err_cmdPrint_Click: MsgBox Err.Description Resume Exit_cmdPrint_Click End Sub Virginia From Lambert.Heenan at chartisinsurance.com Wed Oct 14 08:59:25 2009 From: Lambert.Heenan at chartisinsurance.com (Heenan, Lambert) Date: Wed, 14 Oct 2009 09:59:25 -0400 Subject: [AccessD] Open Report from MainForm based on SubForm In-Reply-To: <703BDA18A87DFA4CB265A86F42E4178D08EE7021@c2k3exchange.pgdp.corp.usec.com> References: <703BDA18A87DFA4CB265A86F42E4178D08EE7021@c2k3exchange.pgdp.corp.usec.com> Message-ID: Virginia, What Max was trying to convey to you is that in the syntax for referencing a subform and its controls uses the name of the control on the main form which contains the sub form. So while you will undoubtedly have a form object showing in the database window, visible in the forms tab, with the name "frm_VehicleInspectionSub", the *control* on the main form in which the sub form is displayed may in fact have a different name. It is that containing control's name that you need to use. The expression... Forms![frm_VehicleInspection]![frm_VehicleInspectionSub].Form![VehicleInspID] ... Translates to something like "there is a form called "frm_VehicleInspection" which has a sub-form control on it called "frm_VehicleInspectionSub". That control has a form in it (who's name we need not know) that in turn has a control on it called VehicleInspID: return the value of VehicleInspID." HTH Lambert -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Hollis, Virginia Sent: Wednesday, October 14, 2009 9:24 AM To: accessd at databaseadvisors.com Subject: [AccessD] Open Report from MainForm based on SubForm I checked and the subform is named correctly (frm_VehicleInspectionSub). The first part of the code sets the focus to the subform & this works. With your example I get - "Can't find field VehicleInspID referred to in your expression". I checked the names & the control sources and they all show VehicleInspID; ******** The syntax you want is:- DoCmd.OpenReport "MyRpt", acViewPreview, , "VehicleInspID=" & "Forms![frm_VehicleInspection]![frm_VehicleInspectionSub].Form![VehicleI nspID]=" & me![VehicleInspID] Virginia, make SURE that your have the correct NAME of the sub form. Often people think they know what it is called but it isnt called that at all. Check the data AND "Other" Tab in the properties. I have a sub form where the DataSource = "MCM_PeoplePopNAD" But I call the form (Under the Other Tab in the properties) "PeoplePopSub2" Max ********* I have a command button on the main form that I want to open a report filtered to one record based on a value on the SubForm. frm_VehicleInspection (mainform) frm_VehicleInspectionSub (subform) rpt_VehicleInspection (report to open) VehicleInspID is the key to open the report. **************** On Error GoTo Err_cmdPrint_Click Dim stDocName As String Dim stLinkCriteria As String 'If IsNull(Forms!frm_VehicleInspection.frm_VehicleInspectionSub!VehicleID) Then ' MsgBox "You must must enter a record before printing.", vbExclamation + vbOKOnly, "Entry Required" ' Exit Sub 'End If ' vbresponse = acDataErrContinue ' DoCmd.RunCommand acCmdSaveRecord stDocName = "rpt_VehicleInspection" Forms![frm_VehicleInspection]![frm_VehicleInspectionSub].SetFocus This didn't work (it opens the report, but shows all the records on the report): 'DoCmd.OpenReport stDocName, acPreview, , "Forms![frm_VehicleInspection]![frm_VehicleInspectionSub].Form![VehicleI nspID]=" & Forms![frm_VehicleInspection]![frm_VehicleInspectionSub]![VehicleInspID] This didn't work: 'DoCmd.OpenReport stDocName, acPreview, , "Forms![frm_VehicleInspection]![frm_VehicleInspectionSub].Form![VehicleI nspID]=" & Me![VehicleInspID] This didn't work either: DoCmd.OpenReport stDocName, acPreview, , "Forms![frm_VehicleInspection]![frm_VehicleInspectionSub].Form![VehicleI nspID]=" & strDocName!VehicleInspID.[VehicleInspID] Exit_cmdPrint_Click: Exit Sub Err_cmdPrint_Click: MsgBox Err.Description Resume Exit_cmdPrint_Click End Sub Virginia -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From max.wanadoo at gmail.com Wed Oct 14 09:00:16 2009 From: max.wanadoo at gmail.com (Max Wanadoo) Date: Wed, 14 Oct 2009 15:00:16 +0100 Subject: [AccessD] Open Report from MainForm based on SubForm In-Reply-To: <703BDA18A87DFA4CB265A86F42E4178D08EE704B@c2k3exchange.pgdp.corp.usec.com> References: <703BDA18A87DFA4CB265A86F42E4178D08EE704B@c2k3exchange.pgdp.corp.usec.com> Message-ID: >>I checked the names & the control sources and they all show VehicleInspID; What is this field called in the data source of the report you are opening? It needs to match that. It might be FKxyzID in the Form but be called xyzID in the Report. They need to match. What is the error that is coming up.? max On 14/10/2009, Hollis, Virginia wrote: > You have it all named correctly. I changed "MyRpt" is all I had to > change. > > ********** > > you have to put in YOUR OWN names/values. I do not know what you call > > it. I was showing the syntax and format. > > > > max > > > > Subject: [AccessD] Open Report from MainForm based on SubForm > > > > I checked and the subform is named correctly (frm_VehicleInspectionSub). > The first part of the code sets the focus to the subform & this works. > > > > With your example I get - "Can't find field VehicleInspID referred to in > your expression". I checked the names & the control sources and they all > show VehicleInspID; > > ******** > > The syntax you want is:- > > DoCmd.OpenReport "MyRpt", acViewPreview, , "VehicleInspID=" & > "Forms![frm_VehicleInspection]![frm_VehicleInspectionSub].Form![VehicleI > nspID]=" > & me![VehicleInspID] > > Virginia, make SURE that your have the correct NAME of the sub form. > Often people think they know what it is called but it isnt called that > at all. Check the data AND "Other" Tab in the properties. > > I have a sub form where the DataSource = "MCM_PeoplePopNAD" But I call > the form (Under the Other Tab in the properties) "PeoplePopSub2" > > Max > > ********* > I have a command button on the main form that I want to open a report > filtered to one record based on a value on the SubForm. > > frm_VehicleInspection (mainform) > frm_VehicleInspectionSub (subform) > rpt_VehicleInspection (report to open) > VehicleInspID is the key to open the report. > > > > **************** > > On Error GoTo Err_cmdPrint_Click > Dim stDocName As String > Dim stLinkCriteria As String > 'If > IsNull(Forms!frm_VehicleInspection.frm_VehicleInspectionSub!VehicleID) > Then > ' MsgBox "You must must enter a record before printing.", > vbExclamation + vbOKOnly, "Entry Required" > > ' Exit Sub > 'End If > ' vbresponse = acDataErrContinue > ' DoCmd.RunCommand acCmdSaveRecord > > stDocName = "rpt_VehicleInspection" > > Forms![frm_VehicleInspection]![frm_VehicleInspectionSub].SetFocus > > This didn't work (it opens the report, but shows all the records on the > report): 'DoCmd.OpenReport stDocName, acPreview, , > > "Forms![frm_VehicleInspection]![frm_VehicleInspectionSub].Form![VehicleI > nspID]=" & > > > Forms![frm_VehicleInspection]![frm_VehicleInspectionSub]![VehicleInspID] > > This didn't work: 'DoCmd.OpenReport stDocName, acPreview, , > > "Forms![frm_VehicleInspection]![frm_VehicleInspectionSub].Form![VehicleI > nspID]=" & Me![VehicleInspID] > > This didn't work either: DoCmd.OpenReport stDocName, acPreview, , > > "Forms![frm_VehicleInspection]![frm_VehicleInspectionSub].Form![VehicleI > nspID]=" & strDocName!VehicleInspID.[VehicleInspID] > > > Exit_cmdPrint_Click: > Exit Sub > > Err_cmdPrint_Click: > > MsgBox Err.Description > > Resume Exit_cmdPrint_Click > > End Sub > > Virginia > > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > From max.wanadoo at gmail.com Wed Oct 14 09:45:12 2009 From: max.wanadoo at gmail.com (Max Wanadoo) Date: Wed, 14 Oct 2009 15:45:12 +0100 Subject: [AccessD] Open Report from MainForm based on SubForm In-Reply-To: References: <703BDA18A87DFA4CB265A86F42E4178D08EE7021@c2k3exchange.pgdp.corp.usec.com> Message-ID: how you doing, Virginia. Solved? Max On 14/10/2009, Heenan, Lambert wrote: > Virginia, > > What Max was trying to convey to you is that in the syntax for referencing a > subform and its controls uses the name of the control on the main form which > contains the sub form. > > So while you will undoubtedly have a form object showing in the database > window, visible in the forms tab, with the name "frm_VehicleInspectionSub", > the *control* on the main form in which the sub form is displayed may in > fact have a different name. It is that containing control's name that you > need to use. > > The expression... > > Forms![frm_VehicleInspection]![frm_VehicleInspectionSub].Form![VehicleInspID] > > ... Translates to something like "there is a form called > "frm_VehicleInspection" which has a sub-form control on it called > "frm_VehicleInspectionSub". That control has a form in it (who's name we > need not know) that in turn has a control on it called VehicleInspID: return > the value of VehicleInspID." > > HTH > > Lambert > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Hollis, Virginia > Sent: Wednesday, October 14, 2009 9:24 AM > To: accessd at databaseadvisors.com > Subject: [AccessD] Open Report from MainForm based on SubForm > > I checked and the subform is named correctly (frm_VehicleInspectionSub). > The first part of the code sets the focus to the subform & this works. > > > > With your example I get - "Can't find field VehicleInspID referred to in > your expression". I checked the names & the control sources and they all > show VehicleInspID; > > ******** > > The syntax you want is:- > > DoCmd.OpenReport "MyRpt", acViewPreview, , "VehicleInspID=" & > "Forms![frm_VehicleInspection]![frm_VehicleInspectionSub].Form![VehicleI > nspID]=" > & me![VehicleInspID] > > Virginia, make SURE that your have the correct NAME of the sub form. > Often people think they know what it is called but it isnt called that at > all. Check the data AND "Other" Tab in the properties. > > I have a sub form where the DataSource = "MCM_PeoplePopNAD" But I call the > form (Under the Other Tab in the properties) "PeoplePopSub2" > > Max > > ********* > I have a command button on the main form that I want to open a report > filtered to one record based on a value on the SubForm. > > frm_VehicleInspection (mainform) > frm_VehicleInspectionSub (subform) > rpt_VehicleInspection (report to open) > VehicleInspID is the key to open the report. > > > > **************** > > On Error GoTo Err_cmdPrint_Click > Dim stDocName As String > Dim stLinkCriteria As String > 'If > IsNull(Forms!frm_VehicleInspection.frm_VehicleInspectionSub!VehicleID) > Then > ' MsgBox "You must must enter a record before printing.", > vbExclamation + vbOKOnly, "Entry Required" > > ' Exit Sub > 'End If > ' vbresponse = acDataErrContinue > ' DoCmd.RunCommand acCmdSaveRecord > > stDocName = "rpt_VehicleInspection" > > Forms![frm_VehicleInspection]![frm_VehicleInspectionSub].SetFocus > > This didn't work (it opens the report, but shows all the records on the > report): 'DoCmd.OpenReport stDocName, acPreview, , > > "Forms![frm_VehicleInspection]![frm_VehicleInspectionSub].Form![VehicleI > nspID]=" & > > > Forms![frm_VehicleInspection]![frm_VehicleInspectionSub]![VehicleInspID] > > This didn't work: 'DoCmd.OpenReport stDocName, acPreview, , > > "Forms![frm_VehicleInspection]![frm_VehicleInspectionSub].Form![VehicleI > nspID]=" & Me![VehicleInspID] > > This didn't work either: DoCmd.OpenReport stDocName, acPreview, , > > "Forms![frm_VehicleInspection]![frm_VehicleInspectionSub].Form![VehicleI > nspID]=" & strDocName!VehicleInspID.[VehicleInspID] > > > Exit_cmdPrint_Click: > Exit Sub > > Err_cmdPrint_Click: > > MsgBox Err.Description > > Resume Exit_cmdPrint_Click > > End Sub > > Virginia > > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > From hollisvj at pgdp.usec.com Wed Oct 14 09:57:47 2009 From: hollisvj at pgdp.usec.com (Hollis, Virginia) Date: Wed, 14 Oct 2009 09:57:47 -0500 Subject: [AccessD] Open Report from MainForm based on SubForm Message-ID: <703BDA18A87DFA4CB265A86F42E4178D08EE709C@c2k3exchange.pgdp.corp.usec.com> * Form: frm_VehicleInspection * Subform: frm_VehicleInspectionSub * Report: rpt_VehicleInspection * Textbox on subform: Control source- VehicleInspID * Name of textbox on subform: VehicleInspID * Textbox on Report: Control source- VehicleInspID * Name of textbox on Report: VehicleInspID Error: Microsoft Access can't find the field VehicleInspID referred to in your expression. stDocName = "rpt_VehicleInspection" Forms![frm_VehicleInspection]![frm_VehicleInspectionSub].SetFocus DoCmd.OpenReport stDocName, acViewPreview, , "VehicleInspID=" & "Forms![frm_VehicleInspection]![frm_VehicleInspectionSub].Form![VehicleI nspID]=" & Me![VehicleInspID] ***** What is this field called in the data source of the report you are opening? It needs to match that. It might be FKxyzID in the Form but be called xyzID in the Report. They need to match. What is the error that is coming up.? max You have it all named correctly. I changed "MyRpt" is all I had to change. ********** you have to put in YOUR OWN names/values. I do not know what you call it. I was showing the syntax and format. max Subject: [AccessD] Open Report from MainForm based on SubForm I checked and the subform is named correctly (frm_VehicleInspectionSub). The first part of the code sets the focus to the subform & this works. With your example I get - "Can't find field VehicleInspID referred to in your expression". I checked the names & the control sources and they all show VehicleInspID; ******** The syntax you want is:- DoCmd.OpenReport "MyRpt", acViewPreview, , "VehicleInspID=" & "Forms![frm_VehicleInspection]![frm_VehicleInspectionSub].Form![VehicleI nspID]=" & me![VehicleInspID] Virginia, make SURE that your have the correct NAME of the sub form. Often people think they know what it is called but it isnt called that at all. Check the data AND "Other" Tab in the properties. I have a sub form where the DataSource = "MCM_PeoplePopNAD" But I call the form (Under the Other Tab in the properties) "PeoplePopSub2" Max From cfoust at infostatsystems.com Wed Oct 14 10:12:21 2009 From: cfoust at infostatsystems.com (Charlotte Foust) Date: Wed, 14 Oct 2009 08:12:21 -0700 Subject: [AccessD] Open Report from MainForm based on SubForm In-Reply-To: <703BDA18A87DFA4CB265A86F42E4178D08EE709C@c2k3exchange.pgdp.corp.usec.com> References: <703BDA18A87DFA4CB265A86F42E4178D08EE709C@c2k3exchange.pgdp.corp.usec.com> Message-ID: You could make life easier by giving controls a different name from the field they're bound to. That would also reduce the incidence of this kind of error. Name your textbox txtVehicleInspID on the form and change the code appropriately. See whether that produces an error. You can get this kind of thing when Access can't figure out WHICH VehicleInspID you're referring to. The fact that it says "Can't find field VehicleInspID" says that it's looking for a field when it should be looking for a control. Charlotte Foust -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Hollis, Virginia Sent: Wednesday, October 14, 2009 7:58 AM To: accessd at databaseadvisors.com Subject: Re: [AccessD] Open Report from MainForm based on SubForm * Form: frm_VehicleInspection * Subform: frm_VehicleInspectionSub * Report: rpt_VehicleInspection * Textbox on subform: Control source- VehicleInspID * Name of textbox on subform: VehicleInspID * Textbox on Report: Control source- VehicleInspID * Name of textbox on Report: VehicleInspID Error: Microsoft Access can't find the field VehicleInspID referred to in your expression. stDocName = "rpt_VehicleInspection" Forms![frm_VehicleInspection]![frm_VehicleInspectionSub].SetFocus DoCmd.OpenReport stDocName, acViewPreview, , "VehicleInspID=" & "Forms![frm_VehicleInspection]![frm_VehicleInspectionSub].Form![VehicleI nspID]=" & Me![VehicleInspID] ***** What is this field called in the data source of the report you are opening? It needs to match that. It might be FKxyzID in the Form but be called xyzID in the Report. They need to match. What is the error that is coming up.? max You have it all named correctly. I changed "MyRpt" is all I had to change. ********** you have to put in YOUR OWN names/values. I do not know what you call it. I was showing the syntax and format. max Subject: [AccessD] Open Report from MainForm based on SubForm I checked and the subform is named correctly (frm_VehicleInspectionSub). The first part of the code sets the focus to the subform & this works. With your example I get - "Can't find field VehicleInspID referred to in your expression". I checked the names & the control sources and they all show VehicleInspID; ******** The syntax you want is:- DoCmd.OpenReport "MyRpt", acViewPreview, , "VehicleInspID=" & "Forms![frm_VehicleInspection]![frm_VehicleInspectionSub].Form![VehicleI nspID]=" & me![VehicleInspID] Virginia, make SURE that your have the correct NAME of the sub form. Often people think they know what it is called but it isnt called that at all. Check the data AND "Other" Tab in the properties. I have a sub form where the DataSource = "MCM_PeoplePopNAD" But I call the form (Under the Other Tab in the properties) "PeoplePopSub2" Max -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From hollisvj at pgdp.usec.com Wed Oct 14 10:38:34 2009 From: hollisvj at pgdp.usec.com (Hollis, Virginia) Date: Wed, 14 Oct 2009 10:38:34 -0500 Subject: [AccessD] Open Report from MainForm based on SubForm Message-ID: <703BDA18A87DFA4CB265A86F42E4178D08EE70F2@c2k3exchange.pgdp.corp.usec.com> Ok, I changed the control on the subform to txtVehicleInspID. But I am not sure which one to change in the code. I tried it in all the different VehicleInspID's changed them to txtVehicleInspID but I still got an error. I wasn't sure which one was the name of the txtVehicleInspID now. DoCmd.OpenReport stDocName, acViewPreview, , "VehicleInspID=" & "Forms![frm_VehicleInspection]![frm_VehicleInspectionSub].Form![VehicleI nspID]=" & Me![VehicleInspID] ********** You could make life easier by giving controls a different name from the field they're bound to. That would also reduce the incidence of this kind of error. Name your textbox txtVehicleInspID on the form and change the code appropriately. See whether that produces an error. You can get this kind of thing when Access can't figure out WHICH VehicleInspID you're referring to. The fact that it says "Can't find field VehicleInspID" says that it's looking for a field when it should be looking for a control. Charlotte Foust -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com ] On Behalf Of Hollis, Virginia Sent: Wednesday, October 14, 2009 7:58 AM To: accessd at databaseadvisors.com Subject: Re: [AccessD] Open Report from MainForm based on SubForm * Form: frm_VehicleInspection * Subform: frm_VehicleInspectionSub * Report: rpt_VehicleInspection * Textbox on subform: Control source- VehicleInspID * Name of textbox on subform: VehicleInspID * Textbox on Report: Control source- VehicleInspID * Name of textbox on Report: VehicleInspID Error: Microsoft Access can't find the field VehicleInspID referred to in your expression. stDocName = "rpt_VehicleInspection" Forms![frm_VehicleInspection]![frm_VehicleInspectionSub].SetFocus DoCmd.OpenReport stDocName, acViewPreview, , "VehicleInspID=" & "Forms![frm_VehicleInspection]![frm_VehicleInspectionSub].Form![VehicleI nspID]=" & Me![VehicleInspID] From max.wanadoo at gmail.com Wed Oct 14 10:55:58 2009 From: max.wanadoo at gmail.com (Max Wanadoo) Date: Wed, 14 Oct 2009 16:55:58 +0100 Subject: [AccessD] Open Report from MainForm based on SubForm In-Reply-To: <703BDA18A87DFA4CB265A86F42E4178D08EE70F2@c2k3exchange.pgdp.corp.usec.com> References: <703BDA18A87DFA4CB265A86F42E4178D08EE70F2@c2k3exchange.pgdp.corp.usec.com> Message-ID: <4ad5f4a9.0aaa660a.2046.0e02@mx.google.com> DoCmd.OpenReport stDocName, acViewPreview, , "VehicleInspID=" & "Forms![frm_VehicleInspection]![frm_VehicleInspectionSub].Form![VehicleI nspID] Max -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Hollis, Virginia Sent: 14 October 2009 16:39 To: accessd at databaseadvisors.com Subject: [AccessD] Open Report from MainForm based on SubForm Ok, I changed the control on the subform to txtVehicleInspID. But I am not sure which one to change in the code. I tried it in all the different VehicleInspID's changed them to txtVehicleInspID but I still got an error. I wasn't sure which one was the name of the txtVehicleInspID now. DoCmd.OpenReport stDocName, acViewPreview, , "VehicleInspID=" & "Forms![frm_VehicleInspection]![frm_VehicleInspectionSub].Form![VehicleI nspID]=" & Me![VehicleInspID] ********** You could make life easier by giving controls a different name from the field they're bound to. That would also reduce the incidence of this kind of error. Name your textbox txtVehicleInspID on the form and change the code appropriately. See whether that produces an error. You can get this kind of thing when Access can't figure out WHICH VehicleInspID you're referring to. The fact that it says "Can't find field VehicleInspID" says that it's looking for a field when it should be looking for a control. Charlotte Foust -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com ] On Behalf Of Hollis, Virginia Sent: Wednesday, October 14, 2009 7:58 AM To: accessd at databaseadvisors.com Subject: Re: [AccessD] Open Report from MainForm based on SubForm * Form: frm_VehicleInspection * Subform: frm_VehicleInspectionSub * Report: rpt_VehicleInspection * Textbox on subform: Control source- VehicleInspID * Name of textbox on subform: VehicleInspID * Textbox on Report: Control source- VehicleInspID * Name of textbox on Report: VehicleInspID Error: Microsoft Access can't find the field VehicleInspID referred to in your expression. stDocName = "rpt_VehicleInspection" Forms![frm_VehicleInspection]![frm_VehicleInspectionSub].SetFocus DoCmd.OpenReport stDocName, acViewPreview, , "VehicleInspID=" & "Forms![frm_VehicleInspection]![frm_VehicleInspectionSub].Form![VehicleI nspID]=" & Me![VehicleInspID] -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From hollisvj at pgdp.usec.com Wed Oct 14 11:06:32 2009 From: hollisvj at pgdp.usec.com (Hollis, Virginia) Date: Wed, 14 Oct 2009 11:06:32 -0500 Subject: [AccessD] Open Report from MainForm based on SubForm Message-ID: <703BDA18A87DFA4CB265A86F42E4178D08EE7115@c2k3exchange.pgdp.corp.usec.com> Tada!!! Thank you so much. I spent a full week on this one part. Now I am behind on getting this out. I hate subforms. It has also been 6 years since I worked in Access & am 'very' rusty (yes, I use to be on AccessD regularly about since it started). I use to do it all the time but changed jobs. But you know how things come back to haunt you. Thanks again. DoCmd.OpenReport stDocName, acViewPreview, , "VehicleInspID=" & "Forms![frm_VehicleInspection]![frm_VehicleInspectionSub].Form![VehicleI nspID] Max From max.wanadoo at gmail.com Wed Oct 14 11:12:49 2009 From: max.wanadoo at gmail.com (Max Wanadoo) Date: Wed, 14 Oct 2009 17:12:49 +0100 Subject: [AccessD] Open Report from MainForm based on SubForm In-Reply-To: <703BDA18A87DFA4CB265A86F42E4178D08EE7115@c2k3exchange.pgdp.corp.usec.com> References: <703BDA18A87DFA4CB265A86F42E4178D08EE7115@c2k3exchange.pgdp.corp.usec.com> Message-ID: <4ad5f8a1.170d660a.1a73.164b@mx.google.com> Great. You could also do this...If you are clicking a button on the Main form and the control is on a sub form called "txtVehicleInspID" and the control holding the value is called VehicleInspID then DoCmd.OpenReport stDocName, acViewPreview, , "VehicleInspID=" & Me!txtVehicleInspID.form![VehicleInspID] Should do it. Pity you didn't ask a week ago I recognise your name.. Max -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Hollis, Virginia Sent: 14 October 2009 17:07 To: accessd at databaseadvisors.com Subject: [AccessD] Open Report from MainForm based on SubForm Tada!!! Thank you so much. I spent a full week on this one part. Now I am behind on getting this out. I hate subforms. It has also been 6 years since I worked in Access & am 'very' rusty (yes, I use to be on AccessD regularly about since it started). I use to do it all the time but changed jobs. But you know how things come back to haunt you. Thanks again. DoCmd.OpenReport stDocName, acViewPreview, , "VehicleInspID=" & "Forms![frm_VehicleInspection]![frm_VehicleInspectionSub].Form![VehicleI nspID] Max -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From Johncliviger at aol.com Thu Oct 15 06:25:23 2009 From: Johncliviger at aol.com (Johncliviger at aol.com) Date: Thu, 15 Oct 2009 07:25:23 EDT Subject: [AccessD] A momentary lapse of reason: Part II Message-ID: Hi Guys Following on from my recent post the Union query works. That is it returns 24498 rows. The problem is the tbl_PPMSupplier contains 23320 rows and tbl_Rejection has 100 rows. I expected the result view to have total of the 2 tables eg 23420 rows. the Union Q is returning 1078 rows more that expected. Any suggesstions? TIA johnc SELECT Distinctrow tbl_PPMSupplier.AP_No, tbl_PPMSupplier.SupplierID, tbl_PPMSupplier.GRQ FROM tbl_PPMSupplier WHERE ((tbl_PPMSupplier.AP_No) Between "2009-ap04" And "2009-ap09") order by tbl_PPMSupplier.AP_No UNION ALL SELECT tbl_Rejection.AP,tbl_Rejection.SupplierID, tbl_Rejection.QuantityAtFault FROM tbl_Rejection; From Gustav at cactus.dk Thu Oct 15 07:49:22 2009 From: Gustav at cactus.dk (Gustav Brock) Date: Thu, 15 Oct 2009 14:49:22 +0200 Subject: [AccessD] A momentary lapse of reason: Part II Message-ID: Hi John Try this: SELECT tbl_PPMSupplier.AP_No, tbl_PPMSupplier.SupplierID, tbl_PPMSupplier.GRQ FROM tbl_PPMSupplier WHERE (tbl_PPMSupplier.AP_No Between "2009-ap04" And "2009-ap09") order by tbl_PPMSupplier.AP_No UNION SELECT tbl_Rejection.AP, tbl_Rejection.SupplierID, tbl_Rejection.QuantityAtFault FROM tbl_Rejection; /gustav >>> Johncliviger at aol.com 15-10-2009 13:25 >>> Hi Guys Following on from my recent post the Union query works. That is it returns 24498 rows. The problem is the tbl_PPMSupplier contains 23320 rows and tbl_Rejection has 100 rows. I expected the result view to have total of the 2 tables eg 23420 rows. the Union Q is returning 1078 rows more that expected. Any suggesstions? TIA johnc SELECT Distinctrow tbl_PPMSupplier.AP_No, tbl_PPMSupplier.SupplierID, tbl_PPMSupplier.GRQ FROM tbl_PPMSupplier WHERE ((tbl_PPMSupplier.AP_No) Between "2009-ap04" And "2009-ap09") order by tbl_PPMSupplier.AP_No UNION ALL SELECT tbl_Rejection.AP,tbl_Rejection.SupplierID, tbl_Rejection.QuantityAtFault FROM tbl_Rejection; From Johncliviger at aol.com Thu Oct 15 09:14:49 2009 From: Johncliviger at aol.com (Johncliviger at aol.com) Date: Thu, 15 Oct 2009 10:14:49 EDT Subject: [AccessD] A momentary lapse of reason: Part II Message-ID: Hi Gustav Thank you for comments. Your changes reduced the row count to 5093. I'm unhappy with some of the data so I'm going back to basics. I should have 23420 rows in the union q. 23320 in the tbl_PPMSupplier and 100 in tbl_Rejection. Time to leave it alone for a bit. Thanks Johnc From Gustav at cactus.dk Thu Oct 15 09:26:36 2009 From: Gustav at cactus.dk (Gustav Brock) Date: Thu, 15 Oct 2009 16:26:36 +0200 Subject: [AccessD] A momentary lapse of reason: Part II Message-ID: Hi John Well, then try with UNION ALL - this _will_ return all records if you remove your filter (which by the way does look weird and dubious): SELECT tbl_PPMSupplier.AP_No, tbl_PPMSupplier.SupplierID, tbl_PPMSupplier.GRQ FROM tbl_PPMSupplier WHERE (tbl_PPMSupplier.AP_No Between "2009-ap04" And "2009-ap09") order by tbl_PPMSupplier.AP_No UNION ALL SELECT tbl_Rejection.AP, tbl_Rejection.SupplierID, tbl_Rejection.QuantityAtFault FROM tbl_Rejection; /gustav >>> Johncliviger at aol.com 15-10-2009 16:14 >>> Hi Gustav Thank you for comments. Your changes reduced the row count to 5093. I'm unhappy with some of the data so I'm going back to basics. I should have 23420 rows in the union q. 23320 in the tbl_PPMSupplier and 100 in tbl_Rejection. Time to leave it alone for a bit. Thanks Johnc From jwcolby at colbyconsulting.com Thu Oct 15 10:30:09 2009 From: jwcolby at colbyconsulting.com (jwcolby) Date: Thu, 15 Oct 2009 11:30:09 -0400 Subject: [AccessD] A momentary lapse of reason: Part II In-Reply-To: References: Message-ID: <4AD74001.1070700@colbyconsulting.com> But doesn't the union dedupe (DISTINCT) while it is at it? Thus if he has duplicate information in the two tables he would end up with less than the total of both tables. John W. Colby www.ColbyConsulting.com Gustav Brock wrote: > Hi John > > Well, then try with UNION ALL - this _will_ return all records if you remove your filter (which by the way does look weird and dubious): > > SELECT > tbl_PPMSupplier.AP_No, > tbl_PPMSupplier.SupplierID, > tbl_PPMSupplier.GRQ > FROM > tbl_PPMSupplier > WHERE > (tbl_PPMSupplier.AP_No Between "2009-ap04" And "2009-ap09") > order by > tbl_PPMSupplier.AP_No > UNION ALL > SELECT > tbl_Rejection.AP, > tbl_Rejection.SupplierID, > tbl_Rejection.QuantityAtFault > FROM > tbl_Rejection; > > /gustav > > >>>> Johncliviger at aol.com 15-10-2009 16:14 >>> > Hi Gustav > > Thank you for comments. Your changes reduced the row count to 5093. I'm > unhappy with some of the data so I'm going back to basics. I should have > 23420 rows in the union q. 23320 in the tbl_PPMSupplier and 100 in > tbl_Rejection. > > Time to leave it alone for a bit. > > Thanks > > Johnc > > From Gustav at cactus.dk Thu Oct 15 10:48:14 2009 From: Gustav at cactus.dk (Gustav Brock) Date: Thu, 15 Oct 2009 17:48:14 +0200 Subject: [AccessD] A momentary lapse of reason: Part II Message-ID: Hi John Exactly, without ALL, but if ALL is included it returns - well - all records. I think the filter is the culprit - try to imagine how much Between "2009-ap04" And "2009-ap09" excludes? Any other month in fact. /gustav >>> jwcolby at colbyconsulting.com 15-10-2009 17:30 >>> But doesn't the union dedupe (DISTINCT) while it is at it? Thus if he has duplicate information in the two tables he would end up with less than the total of both tables. John W. Colby www.ColbyConsulting.com Gustav Brock wrote: > Hi John > > Well, then try with UNION ALL - this _will_ return all records if you remove your filter (which by the way does look weird and dubious): From Johncliviger at aol.com Thu Oct 15 15:28:02 2009 From: Johncliviger at aol.com (Johncliviger at aol.com) Date: Thu, 15 Oct 2009 16:28:02 EDT Subject: [AccessD] A momentary lapse of reason: Part II Message-ID: Hi John C and Gustav I've had a feeling that the Between filter may be causing problems, but I'm stuck with "xxxx-AP99" text format. But I'm unsure wether I'm barking up the right tree. Can I re-state what I'm trying do. It will help me I hope. I've got a table in a db that records faults on components. It records SupplierID, AP (Accounting Period) and QtyAtFault (Quantity at Fault) in table tbl_Rejection. In addition each month I import (from SAP) into Access a list of all components received, eg, SupplierID, AP and QtyReceived and dump them in a table(tbl_PPMSupplier). >From this I need to calculate a monthly and 6 monthly rolling part-per-million calculation by supplier and by AP. Simple I thought. Create a group by query with a Sum on the QtyAtFault. Do the same for the imported table except with Sum on the Components Received. Then pull the 2 queries together with a join on the SupplierID and AP. This is where the fan and brown stuff collide. The problem is that I can have missing rows on either side on the join and where there are missing rows it takes out the other side. So I thought that a union Q would come to the rescue. I'm have me doubts. Maybe I should open the hood on VBA! Anyway It's 21:30 here, my brain hurts and off for a pint of Copper Dragon... Well maybe more than one! Thanks for your patience john cliviger From stuart at lexacorp.com.pg Thu Oct 15 16:02:44 2009 From: stuart at lexacorp.com.pg (Stuart McLachlan) Date: Fri, 16 Oct 2009 07:02:44 +1000 Subject: [AccessD] A momentary lapse of reason: Part II In-Reply-To: References: Message-ID: <4AD78DF4.2914.3E535D3@stuart.lexacorp.com.pg> John, Take a look again at my and Gustav's original replies. You are trying to this in one pass. You need to do it in two stages. 1. Use a Union query (without All) to get a list of all SupplierIDs and AP_Nos in both tables. Do NOTt include quantities in this query. 2. Left join both tables onto the Union query to get the quantities involved. The way you are combining rows including quantities will *always* give you either more or less than the desired rows depending on whether or not you are using the ALL qualifier. -- Stuart On 15 Oct 2009 at 7:25, Johncliviger at aol.com wrote: > > Hi Guys > Following on from my recent post the Union query works. That is it returns > 24498 rows. The problem is the tbl_PPMSupplier contains 23320 rows and > tbl_Rejection has 100 rows. I expected the result view to have total of the 2 > tables eg 23420 rows. the Union Q is returning 1078 rows more that > expected. Any suggesstions? > TIA > johnc > SELECT Distinctrow tbl_PPMSupplier.AP_No, tbl_PPMSupplier.SupplierID, > tbl_PPMSupplier.GRQ > FROM tbl_PPMSupplier > WHERE ((tbl_PPMSupplier.AP_No) Between "2009-ap04" And "2009-ap09") > order by tbl_PPMSupplier.AP_No > UNION ALL SELECT tbl_Rejection.AP,tbl_Rejection.SupplierID, > tbl_Rejection.QuantityAtFault > FROM tbl_Rejection; > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com From Gustav at cactus.dk Thu Oct 15 16:17:36 2009 From: Gustav at cactus.dk (Gustav Brock) Date: Thu, 15 Oct 2009 23:17:36 +0200 Subject: [AccessD] A momentary lapse of reason: Part II Message-ID: Hi Stuart Of course, thanks for bringing it on track again. I lost that part. John, careful now with those Copper Dragons! /gustav >>> stuart at lexacorp.com.pg 15-10-2009 23:02 >>> John, Take a look again at my and Gustav's original replies. From jwcolby at colbyconsulting.com Thu Oct 15 17:19:15 2009 From: jwcolby at colbyconsulting.com (jwcolby) Date: Thu, 15 Oct 2009 18:19:15 -0400 Subject: [AccessD] A momentary lapse of reason: Part II In-Reply-To: References: Message-ID: <4AD79FE3.3070407@colbyconsulting.com> John, One thing to do is simply build a temp table and append each query into that table. Doing this would allow you to see the resulting records from each query that you wanted to union. check that each query returns the records you expect, and if not find out why not. Look at the total in the temp table. See if the results are what you expect, and if not discover why not. Go back to the union and see if the results match what is in the temp table, if not discover why. Breaking the problem down like this might allow you to discover where your expectations are not being met, and maybe even why your expectations are not being met. John W. Colby www.ColbyConsulting.com Johncliviger at aol.com wrote: > Hi John C and Gustav > > I've had a feeling that the Between filter may be causing problems, but I'm > stuck with "xxxx-AP99" text format. But I'm unsure wether I'm barking up > the right tree. Can I re-state what I'm trying do. It will help me I hope. > I've got a table in a db that records faults on components. It records > SupplierID, AP (Accounting Period) and QtyAtFault (Quantity at Fault) in table > tbl_Rejection. In addition each month I import (from SAP) into Access a > list of all components received, eg, SupplierID, AP and QtyReceived and dump > them in a table(tbl_PPMSupplier). > >>From this I need to calculate a monthly and 6 monthly rolling > part-per-million calculation by supplier and by AP. > > Simple I thought. Create a group by query with a Sum on the QtyAtFault. Do > the same for the imported table except with Sum on the Components Received. > Then pull the 2 queries together with a join on the SupplierID and AP. > This is where the fan and brown stuff collide. The problem is that I can have > missing rows on either side on the join and where there are missing rows > it takes out the other side. > > So I thought that a union Q would come to the rescue. I'm have me doubts. > Maybe I should open the hood on VBA! > > Anyway It's 21:30 here, my brain hurts and off for a pint of Copper > Dragon... Well maybe more than one! > > Thanks for your patience > > john cliviger > > > From dwaters at usinternet.com Thu Oct 15 17:56:00 2009 From: dwaters at usinternet.com (Dan Waters) Date: Thu, 15 Oct 2009 17:56:00 -0500 Subject: [AccessD] Access FE --> VB: Conversion/Rewrite Time? Message-ID: I know some of you have done this!? Do you have any general rules of thumb on how long the conversion or rewriting took you? Thanks! Dan From jwcolby at colbyconsulting.com Thu Oct 15 22:05:27 2009 From: jwcolby at colbyconsulting.com (jwcolby) Date: Thu, 15 Oct 2009 23:05:27 -0400 Subject: [AccessD] Access FE --> VB: Conversion/Rewrite Time? In-Reply-To: References: Message-ID: <4AD7E2F7.5060406@colbyconsulting.com> Conversion from what to what? John W. Colby www.ColbyConsulting.com Dan Waters wrote: > I know some of you have done this! Do you have any general rules of thumb > on how long the conversion or rewriting took you? > > Thanks! > Dan > > > > From stuart at lexacorp.com.pg Thu Oct 15 22:24:20 2009 From: stuart at lexacorp.com.pg (Stuart McLachlan) Date: Fri, 16 Oct 2009 13:24:20 +1000 Subject: [AccessD] Access FE --> VB: Conversion/Rewrite Time? In-Reply-To: <4AD7E2F7.5060406@colbyconsulting.com> References: , <4AD7E2F7.5060406@colbyconsulting.com> Message-ID: <4AD7E764.3044.54293C1@stuart.lexacorp.com.pg> As per the Subject? Access FE --> VB -- Stuart On 15 Oct 2009 at 23:05, jwcolby wrote: > Conversion from what to what? > > John W. Colby > www.ColbyConsulting.com > > > Dan Waters wrote: > > I know some of you have done this! Do you have any general rules of thumb > > on how long the conversion or rewriting took you? > > > > Thanks! > > Dan > > > > > > > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com From jwcolby at colbyconsulting.com Thu Oct 15 22:55:13 2009 From: jwcolby at colbyconsulting.com (jwcolby) Date: Thu, 15 Oct 2009 23:55:13 -0400 Subject: [AccessD] Access FE --> VB: Conversion/Rewrite Time? In-Reply-To: <4AD7E764.3044.54293C1@stuart.lexacorp.com.pg> References: , <4AD7E2F7.5060406@colbyconsulting.com> <4AD7E764.3044.54293C1@stuart.lexacorp.com.pg> Message-ID: <4AD7EEA1.7030405@colbyconsulting.com> vb6? vb.net? two different animals. John W. Colby www.ColbyConsulting.com Stuart McLachlan wrote: > As per the Subject? Access FE --> VB > From darren at activebilling.com.au Fri Oct 16 01:31:59 2009 From: darren at activebilling.com.au (Darren - Active Billing) Date: Fri, 16 Oct 2009 17:31:59 +1100 Subject: [AccessD] Insert Into 101 For MAX In-Reply-To: <4AD467A0.3937.A1BBC41@stuart.lexacorp.com.pg> References: <518B90FC1A12496AB21976C08EFF65D7@reubennx9500>, <4ad35bdf.1701d00a.47e3.ffffc82d@mx.google.com>, <013501ca4bf3$b87d5c80$05000100@denzilnote> <4AD467A0.3937.A1BBC41@stuart.lexacorp.com.pg> Message-ID: <00fa01ca4e2a$5efef2c0$05000100@denzilnote> Hi Stuart I have started to use this method for table to table 'links/import How would I go about doing this where I would like to use a query on the SQL Server Side instead of a table on the SQL Server side EG this is what I'd like to do - but of course an SQL statement is not an object that the transferSpreadsheet routine can find Dim selSQL as string selSQL = "Select *, aa.SomeOtherFieldFromSomeOtherTable as SomeField from Account join SomeOtherTable aa on a.AccountNo = aa.AccountNo" DoCmd.TransferDatabase acLink, "ODBC Database", strODBCConn, acTable, selSQL, "tblAccount", False Thanks -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Stuart McLachlan Sent: Tuesday, 13 October 2009 10:42 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Insert Into 101 For MAX You could use ODBC - link the SQL Server table, do the insert and then delete the link. This should do it (aircode so may need some tweaking): Local strODBCConn as string Local strSQL as string strODBCConn = "ODBC;Description=Test Connection;DRIVER=SQL Server;" & _ "SERVER=SQLServername;APP=Microsoft Data Access Components;" & _ "DATABASE=SQLDatabasename;Trusted_Connection=Yes" 'Create ODBC Link DoCmd.TransferDatabase acLink, "ODBC Database", strODBCConn, acTable, _ "tblX", "tblX", False 'Insert records strSQL = "Insert into tblLocalTable Select * from tblX" CurrentDb.Execute strSQL 'Delete ODBC Link DoCmd.DeleteObject acTable, "tblX" -- Stuart On 13 Oct 2009 at 21:55, Darren - Active Billing wrote: > Hi Max > > This looks promising - How would you get it to connect to SQL server on table X > and then populate a local Access Table with all the records from table X? > Many thanks > Darren > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Max Wanadoo > Sent: Tuesday, 13 October 2009 3:40 AM > To: 'Access Developers discussion and problem solving' > Subject: Re: [AccessD] Insert Into 101 > > As far as I understand the problem, this works ok for me. > > Max > > Sub AppendRecsFromQuery() > Dim dbs As DAO.Database, rst As DAO.Recordset > Dim sql As String, qdf As DAO.QueryDef > Set dbs = CurrentDb > sql = "Drop table _TestA" > dbs.Execute (sql) > > sql = "Create Table _TestA (FirstName text, Surname Text, PersonID long)" > dbs.Execute (sql) > > sql = "Drop Table _TestQ" > dbs.Execute sql > > sql = "Select firstname,surname,PersonID from mcmPeople Where PersonID < > 1000" > Set qdf = dbs.CreateQueryDef("_TestQ", sql) > Set rst = dbs.OpenRecordset(qdf.Name, dbOpenSnapshot) > sql = "insert into _TestA " & qdf.sql > dbs.Execute sql > > 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 -- 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 Oct 16 02:01:33 2009 From: stuart at lexacorp.com.pg (Stuart McLachlan) Date: Fri, 16 Oct 2009 17:01:33 +1000 Subject: [AccessD] Insert Into 101 For MAX In-Reply-To: <00fa01ca4e2a$5efef2c0$05000100@denzilnote> References: <518B90FC1A12496AB21976C08EFF65D7@reubennx9500>, <4AD467A0.3937.A1BBC41@stuart.lexacorp.com.pg>, <00fa01ca4e2a$5efef2c0$05000100@denzilnote> Message-ID: <4AD81A4D.20540.4AD1F@stuart.lexacorp.com.pg> You need to create a View in SQL Server based on the query. You can then link to the view just like you do with a table. -- Stuart On 16 Oct 2009 at 17:31, Darren - Active Billing wrote: > Hi Stuart > > I have started to use this method for table to table 'links/import > > How would I go about doing this where I would like to use a query on the SQL > Server Side instead of a table on the SQL Server side > > EG this is what I'd like to do - but of course an SQL statement is not an object > that the transferSpreadsheet routine can find > > Dim selSQL as string > selSQL = "Select *, aa.SomeOtherFieldFromSomeOtherTable as SomeField from > Account join SomeOtherTable aa on a.AccountNo = aa.AccountNo" > > DoCmd.TransferDatabase acLink, "ODBC Database", strODBCConn, acTable, selSQL, > "tblAccount", False > > Thanks > > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Stuart McLachlan > Sent: Tuesday, 13 October 2009 10:42 PM > To: Access Developers discussion and problem solving > Subject: Re: [AccessD] Insert Into 101 For MAX > > You could use ODBC - link the SQL Server table, do the insert and then delete > the link. > > This should do it (aircode so may need some tweaking): > > Local strODBCConn as string > Local strSQL as string > > strODBCConn = "ODBC;Description=Test Connection;DRIVER=SQL Server;" & _ > "SERVER=SQLServername;APP=Microsoft Data Access Components;" & _ > "DATABASE=SQLDatabasename;Trusted_Connection=Yes" > > 'Create ODBC Link > DoCmd.TransferDatabase acLink, "ODBC Database", strODBCConn, acTable, _ > "tblX", "tblX", False > > 'Insert records > strSQL = "Insert into tblLocalTable Select * from tblX" > CurrentDb.Execute strSQL > > 'Delete ODBC Link > DoCmd.DeleteObject acTable, "tblX" > > -- > Stuart > > > On 13 Oct 2009 at 21:55, Darren - Active Billing wrote: > > > Hi Max > > > > This looks promising - How would you get it to connect to SQL server on table > X > > and then populate a local Access Table with all the records from table X? > > Many thanks > > Darren > > -----Original Message----- > > From: accessd-bounces at databaseadvisors.com > > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Max Wanadoo > > Sent: Tuesday, 13 October 2009 3:40 AM > > To: 'Access Developers discussion and problem solving' > > Subject: Re: [AccessD] Insert Into 101 > > > > As far as I understand the problem, this works ok for me. > > > > Max > > > > Sub AppendRecsFromQuery() > > Dim dbs As DAO.Database, rst As DAO.Recordset > > Dim sql As String, qdf As DAO.QueryDef > > Set dbs = CurrentDb > > sql = "Drop table _TestA" > > dbs.Execute (sql) > > > > sql = "Create Table _TestA (FirstName text, Surname Text, PersonID long)" > > dbs.Execute (sql) > > > > sql = "Drop Table _TestQ" > > dbs.Execute sql > > > > sql = "Select firstname,surname,PersonID from mcmPeople Where PersonID < > > 1000" > > Set qdf = dbs.CreateQueryDef("_TestQ", sql) > > Set rst = dbs.OpenRecordset(qdf.Name, dbOpenSnapshot) > > sql = "insert into _TestA " & qdf.sql > > dbs.Execute sql > > > > 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 > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com From darren at activebilling.com.au Fri Oct 16 02:28:07 2009 From: darren at activebilling.com.au (Darren - Active Billing) Date: Fri, 16 Oct 2009 18:28:07 +1100 Subject: [AccessD] Insert Into 101 For MAX In-Reply-To: <4AD81A4D.20540.4AD1F@stuart.lexacorp.com.pg> References: <518B90FC1A12496AB21976C08EFF65D7@reubennx9500>, <4AD467A0.3937.A1BBC41@stuart.lexacorp.com.pg>, <00fa01ca4e2a$5efef2c0$05000100@denzilnote> <4AD81A4D.20540.4AD1F@stuart.lexacorp.com.pg> Message-ID: <00fb01ca4e32$362eab80$05000100@denzilnote> Howdy Thanks - that's what I thought I am not really at liberty to create stuff in the SQLSVR dB's - they aren't mine - I was hoping to be able to do it all within access Many thanks Darren -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Stuart McLachlan Sent: Friday, 16 October 2009 6:02 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Insert Into 101 For MAX You need to create a View in SQL Server based on the query. You can then link to the view just like you do with a table. -- Stuart On 16 Oct 2009 at 17:31, Darren - Active Billing wrote: > Hi Stuart > > I have started to use this method for table to table 'links/import > > How would I go about doing this where I would like to use a query on the SQL > Server Side instead of a table on the SQL Server side > > EG this is what I'd like to do - but of course an SQL statement is not an object > that the transferSpreadsheet routine can find > > Dim selSQL as string > selSQL = "Select *, aa.SomeOtherFieldFromSomeOtherTable as SomeField from > Account join SomeOtherTable aa on a.AccountNo = aa.AccountNo" > > DoCmd.TransferDatabase acLink, "ODBC Database", strODBCConn, acTable, selSQL, > "tblAccount", False > > Thanks > > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Stuart McLachlan > Sent: Tuesday, 13 October 2009 10:42 PM > To: Access Developers discussion and problem solving > Subject: Re: [AccessD] Insert Into 101 For MAX > > You could use ODBC - link the SQL Server table, do the insert and then delete > the link. > > This should do it (aircode so may need some tweaking): > > Local strODBCConn as string > Local strSQL as string > > strODBCConn = "ODBC;Description=Test Connection;DRIVER=SQL Server;" & _ > "SERVER=SQLServername;APP=Microsoft Data Access Components;" & _ > "DATABASE=SQLDatabasename;Trusted_Connection=Yes" > > 'Create ODBC Link > DoCmd.TransferDatabase acLink, "ODBC Database", strODBCConn, acTable, _ > "tblX", "tblX", False > > 'Insert records > strSQL = "Insert into tblLocalTable Select * from tblX" > CurrentDb.Execute strSQL > > 'Delete ODBC Link > DoCmd.DeleteObject acTable, "tblX" > > -- > Stuart > > > On 13 Oct 2009 at 21:55, Darren - Active Billing wrote: > > > Hi Max > > > > This looks promising - How would you get it to connect to SQL server on table > X > > and then populate a local Access Table with all the records from table X? > > Many thanks > > Darren > > -----Original Message----- > > From: accessd-bounces at databaseadvisors.com > > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Max Wanadoo > > Sent: Tuesday, 13 October 2009 3:40 AM > > To: 'Access Developers discussion and problem solving' > > Subject: Re: [AccessD] Insert Into 101 > > > > As far as I understand the problem, this works ok for me. > > > > Max > > > > Sub AppendRecsFromQuery() > > Dim dbs As DAO.Database, rst As DAO.Recordset > > Dim sql As String, qdf As DAO.QueryDef > > Set dbs = CurrentDb > > sql = "Drop table _TestA" > > dbs.Execute (sql) > > > > sql = "Create Table _TestA (FirstName text, Surname Text, PersonID long)" > > dbs.Execute (sql) > > > > sql = "Drop Table _TestQ" > > dbs.Execute sql > > > > sql = "Select firstname,surname,PersonID from mcmPeople Where PersonID < > > 1000" > > Set qdf = dbs.CreateQueryDef("_TestQ", sql) > > Set rst = dbs.OpenRecordset(qdf.Name, dbOpenSnapshot) > > sql = "insert into _TestA " & qdf.sql > > dbs.Execute sql > > > > 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 > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/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 marklbreen at gmail.com Fri Oct 16 03:01:42 2009 From: marklbreen at gmail.com (Mark Breen) Date: Fri, 16 Oct 2009 09:01:42 +0100 Subject: [AccessD] Access FE --> VB: Conversion/Rewrite Time? In-Reply-To: References: Message-ID: Hello Dan, On one project I worked on, there was two options, 1) Convert - Cost about one hour 2) re-write - Cost about ?500,000 and it took ten people 18 months to complete. They went with option 2. Mark 2009/10/15 Dan Waters > I know some of you have done this! Do you have any general rules of thumb > on how long the conversion or rewriting took you? > > Thanks! > Dan > > > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > From jwcolby at colbyconsulting.com Fri Oct 16 06:45:45 2009 From: jwcolby at colbyconsulting.com (jwcolby) Date: Fri, 16 Oct 2009 07:45:45 -0400 Subject: [AccessD] Access FE --> VB: Conversion/Rewrite Time? In-Reply-To: References: Message-ID: <4AD85CE9.50507@colbyconsulting.com> I hope you were the general contractor on this and made a lot of money! ;) John W. Colby www.ColbyConsulting.com Mark Breen wrote: > Hello Dan, > On one project I worked on, there was two options, > > 1) Convert - Cost about one hour > 2) re-write - Cost about ?500,000 and it took ten people 18 months to > complete. > > They went with option 2. > > Mark > > > 2009/10/15 Dan Waters > >> I know some of you have done this! Do you have any general rules of thumb >> on how long the conversion or rewriting took you? >> >> Thanks! >> Dan >> >> >> >> >> -- >> AccessD mailing list >> AccessD at databaseadvisors.com >> http://databaseadvisors.com/mailman/listinfo/accessd >> Website: http://www.databaseadvisors.com >> From dwaters at usinternet.com Fri Oct 16 08:28:53 2009 From: dwaters at usinternet.com (Dan Waters) Date: Fri, 16 Oct 2009 08:28:53 -0500 Subject: [AccessD] Access FE --> VB: Conversion/Rewrite Time? In-Reply-To: References: Message-ID: <4DEF8C9FBDA8477C9289187ECBD28CBD@danwaters> Hi Mark, Can you elaborate? What was it that would have taken just one hour? This must have been a large access database to begin with. Thanks! Dan -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Mark Breen Sent: Friday, October 16, 2009 3:02 AM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Access FE --> VB: Conversion/Rewrite Time? Hello Dan, On one project I worked on, there was two options, 1) Convert - Cost about one hour 2) re-write - Cost about ?500,000 and it took ten people 18 months to complete. They went with option 2. Mark 2009/10/15 Dan Waters > I know some of you have done this! Do you have any general rules of thumb > on how long the conversion or rewriting took you? > > Thanks! > Dan > > > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From marksimms at verizon.net Fri Oct 16 09:55:45 2009 From: marksimms at verizon.net (Mark Simms) Date: Fri, 16 Oct 2009 10:55:45 -0400 Subject: [AccessD] Access FE --> VB: Conversion/Rewrite Time? In-Reply-To: References: Message-ID: <008401ca4e70$bdfa4680$0501a8c0@MSIMMSWS> > They went with option 2 Why ? What was the logic (if any) behind the decision ? Was this SQL Server with VB.NET or ASP.NET or ??? > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Mark Breen > Sent: Friday, October 16, 2009 4:02 AM > To: Access Developers discussion and problem solving > Subject: Re: [AccessD] Access FE --> VB: Conversion/Rewrite Time? > > Hello Dan, > On one project I worked on, there was two options, > > 1) Convert - Cost about one hour > 2) re-write - Cost about ?500,000 and it took ten people 18 > months to complete. > > They went with option 2. > > Mark > > > 2009/10/15 Dan Waters > > > I know some of you have done this! Do you have any general > rules of > > thumb on how long the conversion or rewriting took you? > > > > Thanks! > > Dan > > > > > > > > > > -- > > AccessD mailing list > > AccessD at databaseadvisors.com > > http://databaseadvisors.com/mailman/listinfo/accessd > > Website: http://www.databaseadvisors.com > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > From cfoust at infostatsystems.com Fri Oct 16 10:53:56 2009 From: cfoust at infostatsystems.com (Charlotte Foust) Date: Fri, 16 Oct 2009 08:53:56 -0700 Subject: [AccessD] Access FE --> VB: Conversion/Rewrite Time? In-Reply-To: <008401ca4e70$bdfa4680$0501a8c0@MSIMMSWS> References: <008401ca4e70$bdfa4680$0501a8c0@MSIMMSWS> Message-ID: Define conversion. How could you convert an Access FE to a VB FE *without* rewriting it?? Charlotte Foust -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Mark Simms Sent: Friday, October 16, 2009 7:56 AM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Access FE --> VB: Conversion/Rewrite Time? > They went with option 2 Why ? What was the logic (if any) behind the decision ? Was this SQL Server with VB.NET or ASP.NET or ??? > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Mark Breen > Sent: Friday, October 16, 2009 4:02 AM > To: Access Developers discussion and problem solving > Subject: Re: [AccessD] Access FE --> VB: Conversion/Rewrite Time? > > Hello Dan, > On one project I worked on, there was two options, > > 1) Convert - Cost about one hour > 2) re-write - Cost about ?500,000 and it took ten people 18 months to > complete. > > They went with option 2. > > Mark > From Johncliviger at aol.com Fri Oct 16 12:18:04 2009 From: Johncliviger at aol.com (Johncliviger at aol.com) Date: Fri, 16 Oct 2009 13:18:04 EDT Subject: [AccessD] A momentary lapse of reason: Part II Message-ID: Hi Guys Just returned to the office. Thank you all for the feedback, I'll give another shot this weekend. Gustav the Copper Dragons went down a treat. I think I shall try some more. Kind Regards john cliviger From davidmcafee at gmail.com Fri Oct 16 12:21:04 2009 From: davidmcafee at gmail.com (David McAfee) Date: Fri, 16 Oct 2009 10:21:04 -0700 Subject: [AccessD] Access FE --> VB: Conversion/Rewrite Time? In-Reply-To: References: <008401ca4e70$bdfa4680$0501a8c0@MSIMMSWS> Message-ID: <8786a4c00910161021h7ad0b724j8b4480a042ffdd0d@mail.gmail.com> Exactly what I was thinking! I don't think I'd trust a conversion program on most of my forms. On Fri, Oct 16, 2009 at 8:53 AM, Charlotte Foust wrote: > Define conversion. ?How could you convert an Access FE to a VB FE > *without* rewriting it?? >Just be aware that conversion tools do splendidly if what they're converting is fairly straight-forward objects and code. They fall in a heap over complex subforms and subreports. > Charlotte Foust > From marklbreen at gmail.com Fri Oct 16 15:56:44 2009 From: marklbreen at gmail.com (Mark Breen) Date: Fri, 16 Oct 2009 21:56:44 +0100 Subject: [AccessD] Access FE --> VB: Conversion/Rewrite Time? In-Reply-To: <4DEF8C9FBDA8477C9289187ECBD28CBD@danwaters> References: <4DEF8C9FBDA8477C9289187ECBD28CBD@danwaters> Message-ID: Hello Dan, The project I refer to was a VB6 project. For all intents and purposes though, it could have been an Access project. At the time there was a 'wizard' afair supplied by MS that converted VB6 to VS2003. It is this wizard that I refer to when I mention one hour. However, for all but the marketing dept in MS, the wizard was absolutely useless, and as we all know here, there is no comparison between VB6 and VS2003/5/8/10. In our case, the decision was taken to re-architect the application entirely, and to use a virtual team based on three continents, and to appoint senior manages on all three continents to be responsible and have an influence on the final outcome. Most people will not admit how much it really cost to redevelop, but it was enormous. Three or four years later, there is no additional business functionality. The project that I speak of reminds me so much of a book that Shamil mentioned here last April named "Dreaming in Code". That book is one that every programmer should be made read. And every customer also. [ Mark Simms asked Why ? What was the logic (if any) behind the decision ? Was this SQL Server with VB.NET or ASP.NET or ??? ] The original application was a VB6 app, the new app is a multi-threaded, multi-layer, system with multiple databases, windows services, web and winform, and as much OOP stuff as you can shake a stick at. And requirements from many people that then up-ed and left the company. I have to stop writing now as I feel my frustration rising :) In summary though, I would suggest upgrade if you wish, but do not let it take on a life of its own. What is your ROI ? Best of luck with it, Mark 2009/10/16 Dan Waters > Hi Mark, > > Can you elaborate? What was it that would have taken just one hour? This > must have been a large access database to begin with. > > Thanks! > Dan > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com [mailto: > accessd-bounces at databaseadvisors.com] On Behalf Of Mark Breen > Sent: Friday, October 16, 2009 3:02 AM > To: Access Developers discussion and problem solving > Subject: Re: [AccessD] Access FE --> VB: Conversion/Rewrite Time? > > Hello Dan, > On one project I worked on, there was two options, > > 1) Convert - Cost about one hour > 2) re-write - Cost about ?500,000 and it took ten people 18 months to > complete. > > They went with option 2. > > Mark > > > 2009/10/15 Dan Waters > > > I know some of you have done this! Do you have any general rules of > thumb > > on how long the conversion or rewriting took you? > > > > Thanks! > > Dan > > > > > > > > > > -- > > AccessD mailing list > > AccessD at databaseadvisors.com > > http://databaseadvisors.com/mailman/listinfo/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 marksimms at verizon.net Fri Oct 16 21:51:07 2009 From: marksimms at verizon.net (Mark Simms) Date: Fri, 16 Oct 2009 22:51:07 -0400 Subject: [AccessD] Access FE --> VB: Conversion/Rewrite Time? In-Reply-To: References: <4DEF8C9FBDA8477C9289187ECBD28CBD@danwaters> Message-ID: <002501ca4ed4$ad6dadc0$0501a8c0@MSIMMSWS> > 2) re-write - Cost about ?500,000 and it took ten people 18 months to > complete. Got it....and interesting.... If all 10 people were only 50% utilized, the average hourly rate was only about $54/hr. So it would APPEAR the client got a "bargain". However, given NO NEW FUNCTIONALITY was included for the $800,000+ dollar outlay, I would say it was a stupid waste of money. I wonder how it was justified ? From dwaters at usinternet.com Sat Oct 17 09:40:39 2009 From: dwaters at usinternet.com (Dan Waters) Date: Sat, 17 Oct 2009 09:40:39 -0500 Subject: [AccessD] Access FE --> VB: Conversion/Rewrite Time? In-Reply-To: References: <4DEF8C9FBDA8477C9289187ECBD28CBD@danwaters> Message-ID: Hi Mark, What I'm working on is my system, modified for one of my customers. They are willing to pay me, but definitely not at the full amount it would be. So, my ROI is just getting up the learning curve of a new VB.Net developer. Since I've been programming Access for > 10 years, it definitely doable. Once my customer has a VB/SQL Server app, then it can be used by their sister companies as well, which leads to more work for me, and good stuff for them! Thanks! Dan -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Mark Breen Sent: Friday, October 16, 2009 3:57 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Access FE --> VB: Conversion/Rewrite Time? Hello Dan, The project I refer to was a VB6 project. For all intents and purposes though, it could have been an Access project. At the time there was a 'wizard' afair supplied by MS that converted VB6 to VS2003. It is this wizard that I refer to when I mention one hour. However, for all but the marketing dept in MS, the wizard was absolutely useless, and as we all know here, there is no comparison between VB6 and VS2003/5/8/10. In our case, the decision was taken to re-architect the application entirely, and to use a virtual team based on three continents, and to appoint senior manages on all three continents to be responsible and have an influence on the final outcome. Most people will not admit how much it really cost to redevelop, but it was enormous. Three or four years later, there is no additional business functionality. The project that I speak of reminds me so much of a book that Shamil mentioned here last April named "Dreaming in Code". That book is one that every programmer should be made read. And every customer also. [ Mark Simms asked Why ? What was the logic (if any) behind the decision ? Was this SQL Server with VB.NET or ASP.NET or ??? ] The original application was a VB6 app, the new app is a multi-threaded, multi-layer, system with multiple databases, windows services, web and winform, and as much OOP stuff as you can shake a stick at. And requirements from many people that then up-ed and left the company. I have to stop writing now as I feel my frustration rising :) In summary though, I would suggest upgrade if you wish, but do not let it take on a life of its own. What is your ROI ? Best of luck with it, Mark 2009/10/16 Dan Waters > Hi Mark, > > Can you elaborate? What was it that would have taken just one hour? This > must have been a large access database to begin with. > > Thanks! > Dan > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com [mailto: > accessd-bounces at databaseadvisors.com] On Behalf Of Mark Breen > Sent: Friday, October 16, 2009 3:02 AM > To: Access Developers discussion and problem solving > Subject: Re: [AccessD] Access FE --> VB: Conversion/Rewrite Time? > > Hello Dan, > On one project I worked on, there was two options, > > 1) Convert - Cost about one hour > 2) re-write - Cost about ?500,000 and it took ten people 18 months to > complete. > > They went with option 2. > > Mark > > > 2009/10/15 Dan Waters > > > I know some of you have done this! Do you have any general rules of > thumb > > on how long the conversion or rewriting took you? > > > > Thanks! > > Dan > > > > > > > > > > -- > > AccessD mailing list > > AccessD at databaseadvisors.com > > http://databaseadvisors.com/mailman/listinfo/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 Sat Oct 17 15:32:05 2009 From: jwcolby at colbyconsulting.com (jwcolby) Date: Sat, 17 Oct 2009 16:32:05 -0400 Subject: [AccessD] Access FE --> VB: Conversion/Rewrite Time? In-Reply-To: References: <4DEF8C9FBDA8477C9289187ECBD28CBD@danwaters> Message-ID: <4ADA29C5.8090504@colbyconsulting.com> Dan, This is the perfect opportunity to learn .Net. Having someone pay any part of the bill is good and having an application that you will be actively maintaining keeps your hands in the environment. John W. Colby www.ColbyConsulting.com Dan Waters wrote: > Hi Mark, > > What I'm working on is my system, modified for one of my customers. They are willing to pay me, but definitely not at the full amount it would be. So, my ROI is just getting up the learning curve of a new VB.Net developer. Since I've been programming Access for > 10 years, it definitely doable. > > Once my customer has a VB/SQL Server app, then it can be used by their sister companies as well, which leads to more work for me, and good stuff for them! > > Thanks! > Dan > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Mark Breen > Sent: Friday, October 16, 2009 3:57 PM > To: Access Developers discussion and problem solving > Subject: Re: [AccessD] Access FE --> VB: Conversion/Rewrite Time? > > Hello Dan, > The project I refer to was a VB6 project. For all intents and purposes > though, it could have been an Access project. > > At the time there was a 'wizard' afair supplied by MS that converted VB6 to > VS2003. It is this wizard that I refer to when I mention one hour. > > However, for all but the marketing dept in MS, the wizard was absolutely > useless, and as we all know here, there is no comparison between VB6 and > VS2003/5/8/10. > > In our case, the decision was taken to re-architect the application > entirely, and to use a virtual team based on three continents, and to > appoint senior manages on all three continents to be responsible and have an > influence on the final outcome. Most people will not admit how much it > really cost to redevelop, but it was enormous. Three or four years later, > there is no additional business functionality. > > The project that I speak of reminds me so much of a book that Shamil > mentioned here last April named "Dreaming in Code". That book is one that > every programmer should be made read. And every customer also. > > [ Mark Simms asked > > Why ? > What was the logic (if any) behind the decision ? > Was this SQL Server with VB.NET or ASP.NET or > ??? > > ] > > > The original application was a VB6 app, the new app is a multi-threaded, > multi-layer, system with multiple databases, windows services, web and > winform, and as much OOP stuff as you can shake a stick at. And > requirements from many people that then up-ed and left the company. > > I have to stop writing now as I feel my frustration rising :) > > In summary though, I would suggest upgrade if you wish, but do not let it > take on a life of its own. What is your ROI ? > > > Best of luck with it, > > Mark > > > > 2009/10/16 Dan Waters > >> Hi Mark, >> >> Can you elaborate? What was it that would have taken just one hour? This >> must have been a large access database to begin with. >> >> Thanks! >> Dan >> >> -----Original Message----- >> From: accessd-bounces at databaseadvisors.com [mailto: >> accessd-bounces at databaseadvisors.com] On Behalf Of Mark Breen >> Sent: Friday, October 16, 2009 3:02 AM >> To: Access Developers discussion and problem solving >> Subject: Re: [AccessD] Access FE --> VB: Conversion/Rewrite Time? >> >> Hello Dan, >> On one project I worked on, there was two options, >> >> 1) Convert - Cost about one hour >> 2) re-write - Cost about ?500,000 and it took ten people 18 months to >> complete. >> >> They went with option 2. >> >> Mark >> >> >> 2009/10/15 Dan Waters >> >>> I know some of you have done this! Do you have any general rules of >> thumb >>> on how long the conversion or rewriting took you? >>> >>> Thanks! >>> Dan >>> >>> >>> >>> >>> -- >>> AccessD mailing list >>> AccessD at databaseadvisors.com >>> http://databaseadvisors.com/mailman/listinfo/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 Sat Oct 17 16:39:26 2009 From: stuart at lexacorp.com.pg (Stuart McLachlan) Date: Sun, 18 Oct 2009 07:39:26 +1000 Subject: [AccessD] Access FE --> VB: Conversion/Rewrite Time? In-Reply-To: <4ADA29C5.8090504@colbyconsulting.com> References: , , <4ADA29C5.8090504@colbyconsulting.com> Message-ID: <4ADA398E.15764.5EF53C9@stuart.lexacorp.com.pg> Not to mention the fact that working on a real life application that you already know the mechanics of is by far the best way to learn a new language. -- Stuart On 17 Oct 2009 at 16:32, jwcolby wrote: > Dan, > > This is the perfect opportunity to learn .Net. Having someone pay any part of the bill is good and > having an application that you will be actively maintaining keeps your hands in the environment. > > John W. Colby > www.ColbyConsulting.com From cjlabs at worldnet.att.net Sat Oct 17 16:57:48 2009 From: cjlabs at worldnet.att.net (Carolyn Johnson) Date: Sat, 17 Oct 2009 16:57:48 -0500 Subject: [AccessD] Database advisors website References: , , <4ADA29C5.8090504@colbyconsulting.com> <4ADA398E.15764.5EF53C9@stuart.lexacorp.com.pg> Message-ID: <911D3628EF9E4A3AA429E201E512BFD0@Dell> Does anyone know what's going on with the Database Advisors website? I've tried to go there over the past few days and it seems to be down. Thanks Carolyn Johnson St Louis, MO From stuart at lexacorp.com.pg Sat Oct 17 17:22:23 2009 From: stuart at lexacorp.com.pg (Stuart McLachlan) Date: Sun, 18 Oct 2009 08:22:23 +1000 Subject: [AccessD] Database advisors website In-Reply-To: <911D3628EF9E4A3AA429E201E512BFD0@Dell> References: , <911D3628EF9E4A3AA429E201E512BFD0@Dell> Message-ID: <4ADA439F.27826.616A4E5@stuart.lexacorp.com.pg> It's fine for me. Check out http://downforeveryoneorjustme.com/databaseadvisors.com A handy tool to tell if a site is down, or whether it is your route to it that is having problems. -- Stuart On 17 Oct 2009 at 16:57, Carolyn Johnson wrote: > Does anyone know what's going on with the Database Advisors website? I've tried to go there over the past few days and it seems to be down. > > Thanks > > Carolyn Johnson > St Louis, MO > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com From cjlabs at worldnet.att.net Sat Oct 17 17:48:21 2009 From: cjlabs at worldnet.att.net (Carolyn Johnson) Date: Sat, 17 Oct 2009 17:48:21 -0500 Subject: [AccessD] Database advisors website References: , <911D3628EF9E4A3AA429E201E512BFD0@Dell> <4ADA439F.27826.616A4E5@stuart.lexacorp.com.pg> Message-ID: <3B17E18013EE4E95B99B66776ADC8701@Dell> http://databaseadvisors.com is up If you click on one of the links on http://databaseadvisors.com it's down and http://www.databaseadvisors.com is down Carolyn Johnson ----- Original Message ----- From: Stuart McLachlan To: Access Developers discussion and problem solving Sent: Saturday, October 17, 2009 5:22 PM Subject: Re: [AccessD] Database advisors website It's fine for me. Check out http://downforeveryoneorjustme.com/databaseadvisors.com A handy tool to tell if a site is down, or whether it is your route to it that is having problems. -- Stuart On 17 Oct 2009 at 16:57, Carolyn Johnson wrote: > Does anyone know what's going on with the Database Advisors website? I've tried to go there over the past few days and it seems to be down. > > Thanks > > Carolyn Johnson > St Louis, MO > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From drawbridgej at sympatico.ca Sat Oct 17 17:55:19 2009 From: drawbridgej at sympatico.ca (Jack and Pat) Date: Sat, 17 Oct 2009 18:55:19 -0400 Subject: [AccessD] Database advisors website In-Reply-To: <3B17E18013EE4E95B99B66776ADC8701@Dell> References: , <911D3628EF9E4A3AA429E201E512BFD0@Dell><4ADA439F.27826.616A4E5@stuart.lexacorp.com.pg> <3B17E18013EE4E95B99B66776ADC8701@Dell> Message-ID: I agree Carolyn, I can get the home page, but all links are either very sllloooow or just not working. jack -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Carolyn Johnson Sent: Saturday, October 17, 2009 6:48 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Database advisors website http://databaseadvisors.com is up If you click on one of the links on http://databaseadvisors.com it's down and http://www.databaseadvisors.com is down Carolyn Johnson ----- Original Message ----- From: Stuart McLachlan To: Access Developers discussion and problem solving Sent: Saturday, October 17, 2009 5:22 PM Subject: Re: [AccessD] Database advisors website It's fine for me. Check out http://downforeveryoneorjustme.com/databaseadvisors.com A handy tool to tell if a site is down, or whether it is your route to it that is having problems. -- Stuart On 17 Oct 2009 at 16:57, Carolyn Johnson wrote: > Does anyone know what's going on with the Database Advisors website? I've tried to go there over the past few days and it seems to be down. > > Thanks > > Carolyn Johnson > St Louis, MO > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/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 Sat Oct 17 18:04:30 2009 From: stuart at lexacorp.com.pg (Stuart McLachlan) Date: Sun, 18 Oct 2009 09:04:30 +1000 Subject: [AccessD] Database advisors website In-Reply-To: <3B17E18013EE4E95B99B66776ADC8701@Dell> References: , <3B17E18013EE4E95B99B66776ADC8701@Dell> Message-ID: <4ADA4D7E.10818.63D34E5@stuart.lexacorp.com.pg> You're right! http://databaseadvisors.com is up but http://www.databaseadvisors is down. Since most of the menu links on the first URL point to .asp files on the second URL, they don't work. About the only link that does work is the Listinfo link which points to a folder on the first URL. -- Stuart On 17 Oct 2009 at 17:48, Carolyn Johnson wrote: > http://databaseadvisors.com is up > > If you click on one of the links on http://databaseadvisors.com it's down and > > http://www.databaseadvisors.com is down > > > Carolyn Johnson > > > ----- Original Message ----- > From: Stuart McLachlan > To: Access Developers discussion and problem solving > Sent: Saturday, October 17, 2009 5:22 PM > Subject: Re: [AccessD] Database advisors website > > > It's fine for me. > > Check out > > http://downforeveryoneorjustme.com/databaseadvisors.com > > A handy tool to tell if a site is down, or whether it is your route to it that is having problems. > > -- > Stuart > > On 17 Oct 2009 at 16:57, Carolyn Johnson wrote: > > > Does anyone know what's going on with the Database Advisors website? I've tried to go there over the past few days and it seems to be down. > > > > Thanks > > > > Carolyn Johnson > > St Louis, MO > > -- > > AccessD mailing list > > AccessD at databaseadvisors.com > > http://databaseadvisors.com/mailman/listinfo/accessd > > Website: http://www.databaseadvisors.com > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com From rockysmolin at bchacc.com Sat Oct 17 18:09:13 2009 From: rockysmolin at bchacc.com (Rocky Smolin) Date: Sat, 17 Oct 2009 16:09:13 -0700 Subject: [AccessD] Database advisors website In-Reply-To: <3B17E18013EE4E95B99B66776ADC8701@Dell> References: , <911D3628EF9E4A3AA429E201E512BFD0@Dell><4ADA439F.27826.616A4E5@stuart.lexacorp.com.pg> <3B17E18013EE4E95B99B66776ADC8701@Dell> Message-ID: Down for me as well. Rocky -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Carolyn Johnson Sent: Saturday, October 17, 2009 3:48 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Database advisors website http://databaseadvisors.com is up If you click on one of the links on http://databaseadvisors.com it's down and http://www.databaseadvisors.com is down Carolyn Johnson ----- Original Message ----- From: Stuart McLachlan To: Access Developers discussion and problem solving Sent: Saturday, October 17, 2009 5:22 PM Subject: Re: [AccessD] Database advisors website It's fine for me. Check out http://downforeveryoneorjustme.com/databaseadvisors.com A handy tool to tell if a site is down, or whether it is your route to it that is having problems. -- Stuart On 17 Oct 2009 at 16:57, Carolyn Johnson wrote: > Does anyone know what's going on with the Database Advisors website? I've tried to go there over the past few days and it seems to be down. > > Thanks > > Carolyn Johnson > St Louis, MO > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/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 Darryl.Collins at anz.com Sun Oct 18 17:45:12 2009 From: Darryl.Collins at anz.com (Collins, Darryl) Date: Mon, 19 Oct 2009 09:45:12 +1100 Subject: [AccessD] Insert Into 101 For MAX In-Reply-To: <00fb01ca4e32$362eab80$05000100@denzilnote> Message-ID: <6DC4725FDCDD72428D6114F1B6CC6E81C7959F@EXUAU020HWT110.oceania.corp.anz.com> Darren, Depending of your permissons you could create the View in SQL Server from Access using code, grab what you want from the view and then drop the view in SQL Server. Not sure if that approach is acceptable for you or not. Cheers Darryl -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Darren - Active Billing Sent: Friday, 16 October 2009 6:28 PM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Insert Into 101 For MAX Howdy Thanks - that's what I thought I am not really at liberty to create stuff in the SQLSVR dB's - they aren't mine - I was hoping to be able to do it all within access Many thanks Darren -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Stuart McLachlan Sent: Friday, 16 October 2009 6:02 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Insert Into 101 For MAX You need to create a View in SQL Server based on the query. You can then link to the view just like you do with a table. -- Stuart On 16 Oct 2009 at 17:31, Darren - Active Billing wrote: > Hi Stuart > > I have started to use this method for table to table 'links/import > > How would I go about doing this where I would like to use a query on > the SQL Server Side instead of a table on the SQL Server side > > EG this is what I'd like to do - but of course an SQL statement is not > an object > that the transferSpreadsheet routine can find > > Dim selSQL as string > selSQL = "Select *, aa.SomeOtherFieldFromSomeOtherTable as SomeField > from Account join SomeOtherTable aa on a.AccountNo = aa.AccountNo" > > DoCmd.TransferDatabase acLink, "ODBC Database", strODBCConn, acTable, > selSQL, "tblAccount", False > > Thanks > > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Stuart > McLachlan > Sent: Tuesday, 13 October 2009 10:42 PM > To: Access Developers discussion and problem solving > Subject: Re: [AccessD] Insert Into 101 For MAX > > You could use ODBC - link the SQL Server table, do the insert and then > delete the link. > > This should do it (aircode so may need some tweaking): > > Local strODBCConn as string > Local strSQL as string > > strODBCConn = "ODBC;Description=Test Connection;DRIVER=SQL Server;" & _ > "SERVER=SQLServername;APP=Microsoft Data Access Components;" & _ > "DATABASE=SQLDatabasename;Trusted_Connection=Yes" > > 'Create ODBC Link > DoCmd.TransferDatabase acLink, "ODBC Database", strODBCConn, acTable, _ > "tblX", "tblX", False > > 'Insert records > strSQL = "Insert into tblLocalTable Select * from tblX" > CurrentDb.Execute strSQL > > 'Delete ODBC Link > DoCmd.DeleteObject acTable, "tblX" > > -- > Stuart > > > On 13 Oct 2009 at 21:55, Darren - Active Billing wrote: > > > Hi Max > > > > This looks promising - How would you get it to connect to SQL server > > on table > X > > and then populate a local Access Table with all the records from table X? > > Many thanks > > Darren > > -----Original Message----- > > From: accessd-bounces at databaseadvisors.com > > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Max > > Wanadoo > > Sent: Tuesday, 13 October 2009 3:40 AM > > To: 'Access Developers discussion and problem solving' > > Subject: Re: [AccessD] Insert Into 101 > > > > As far as I understand the problem, this works ok for me. > > > > Max > > > > Sub AppendRecsFromQuery() > > Dim dbs As DAO.Database, rst As DAO.Recordset > > Dim sql As String, qdf As DAO.QueryDef > > Set dbs = CurrentDb > > sql = "Drop table _TestA" > > dbs.Execute (sql) > > > > sql = "Create Table _TestA (FirstName text, Surname Text, PersonID long)" > > dbs.Execute (sql) > > > > sql = "Drop Table _TestQ" > > dbs.Execute sql > > > > sql = "Select firstname,surname,PersonID from mcmPeople Where > > PersonID < 1000" > > Set qdf = dbs.CreateQueryDef("_TestQ", sql) > > Set rst = dbs.OpenRecordset(qdf.Name, dbOpenSnapshot) > > sql = "insert into _TestA " & qdf.sql > > dbs.Execute sql > > > > 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 > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com "This e-mail and any attachments to it (the "Communication") is, unless otherwise stated, confidential, may contain copyright material and is for the use only of the intended recipient. If you receive the Communication in error, please notify the sender immediately by return e-mail, delete the Communication and the return e-mail, and do not read, copy, retransmit or otherwise deal with it. Any views expressed in the Communication are those of the individual sender only, unless expressly stated to be those of Australia and New Zealand Banking Group Limited ABN 11 005 357 522, or any of its related entities including ANZ National Bank Limited (together "ANZ"). ANZ does not accept liability in connection with the integrity of or errors in the Communication, computer virus, data corruption, interference or delay arising from or in respect of the Communication." From jwcolby at colbyconsulting.com Mon Oct 19 16:45:44 2009 From: jwcolby at colbyconsulting.com (jwcolby) Date: Mon, 19 Oct 2009 17:45:44 -0400 Subject: [AccessD] test Message-ID: <4ADCDE08.4050901@colbyconsulting.com> Is there anybody out there... -- John W. Colby www.ColbyConsulting.com From cfoust at infostatsystems.com Mon Oct 19 16:54:18 2009 From: cfoust at infostatsystems.com (Charlotte Foust) Date: Mon, 19 Oct 2009 14:54:18 -0700 Subject: [AccessD] test In-Reply-To: <4ADCDE08.4050901@colbyconsulting.com> References: <4ADCDE08.4050901@colbyconsulting.com> Message-ID: No, John. Or maybe it's just that those who are here aren't ALL here! LOL Charlotte -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Monday, October 19, 2009 2:46 PM To: Access Developers discussion and problem solving Subject: [AccessD] test Is there anybody out there... -- 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 garykjos at gmail.com Mon Oct 19 17:22:17 2009 From: garykjos at gmail.com (Gary Kjos) Date: Mon, 19 Oct 2009 17:22:17 -0500 Subject: [AccessD] test In-Reply-To: <4ADCDE08.4050901@colbyconsulting.com> References: <4ADCDE08.4050901@colbyconsulting.com> Message-ID: HI JOHN! Gary On Mon, Oct 19, 2009 at 4:45 PM, jwcolby wrote: > Is there anybody out there... > > -- > John W. Colby > www.ColbyConsulting.com > -- > 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 newsgrps at dalyn.co.nz Mon Oct 19 17:40:27 2009 From: newsgrps at dalyn.co.nz (David Emerson) Date: Tue, 20 Oct 2009 11:40:27 +1300 Subject: [AccessD] test In-Reply-To: <4ADCDE08.4050901@colbyconsulting.com> References: <4ADCDE08.4050901@colbyconsulting.com> Message-ID: <20091019223907.JOL23486.mta01.xtra.co.nz@Dalyn.dalyn.co.nz> Hello, hello, hello. Is there anybody in there? At 20/10/2009, you wrote: >Is there anybody out there... > >-- >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 Darryl.Collins at anz.com Mon Oct 19 17:40:46 2009 From: Darryl.Collins at anz.com (Collins, Darryl) Date: Tue, 20 Oct 2009 09:40:46 +1100 Subject: [AccessD] test In-Reply-To: <4ADCDE08.4050901@colbyconsulting.com> Message-ID: <6DC4725FDCDD72428D6114F1B6CC6E8101688B40@EXUAU020HWT110.oceania.corp.anz.com> Heh... Don't know about the rest of you, but I am definitely in a "lights are on, no-one's home" frame of mind this morning.... ;) -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Tuesday, 20 October 2009 8:46 AM To: Access Developers discussion and problem solving Subject: [AccessD] test Is there anybody out there... -- John W. Colby www.ColbyConsulting.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com "This e-mail and any attachments to it (the "Communication") is, unless otherwise stated, confidential, may contain copyright material and is for the use only of the intended recipient. If you receive the Communication in error, please notify the sender immediately by return e-mail, delete the Communication and the return e-mail, and do not read, copy, retransmit or otherwise deal with it. Any views expressed in the Communication are those of the individual sender only, unless expressly stated to be those of Australia and New Zealand Banking Group Limited ABN 11 005 357 522, or any of its related entities including ANZ National Bank Limited (together "ANZ"). ANZ does not accept liability in connection with the integrity of or errors in the Communication, computer virus, data corruption, interference or delay arising from or in respect of the Communication." From wdhindman at dejpolsystems.com Mon Oct 19 18:24:47 2009 From: wdhindman at dejpolsystems.com (William Hindman) Date: Mon, 19 Oct 2009 19:24:47 -0400 Subject: [AccessD] test In-Reply-To: <4ADCDE08.4050901@colbyconsulting.com> References: <4ADCDE08.4050901@colbyconsulting.com> Message-ID: <2016DCF1D3E14FFB94756F747819EED3@jislaptopdev> ...just you :) William -------------------------------------------------- From: "jwcolby" Sent: Monday, October 19, 2009 5:45 PM To: "Access Developers discussion and problem solving" Subject: [AccessD] test > Is there anybody out there... > > -- > 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 john at winhaven.net Tue Oct 20 12:36:30 2009 From: john at winhaven.net (John Bartow) Date: Tue, 20 Oct 2009 12:36:30 -0500 Subject: [AccessD] Database advisors website In-Reply-To: <911D3628EF9E4A3AA429E201E512BFD0@Dell> References: , , <4ADA29C5.8090504@colbyconsulting.com> <4ADA398E.15764.5EF53C9@stuart.lexacorp.com.pg> <911D3628EF9E4A3AA429E201E512BFD0@Dell> Message-ID: <02d501ca51ab$dc758ff0$9560afd0$@net> Hi All, Thanks to Keith, Bryan and Jim for tracking potential problems and finally finding and correcting the problem at hand - extremely poor communication from our web host! This fire is out for the time being. To prevent future fires we will be moving our website to a new host and new technologies. There should be some exciting changes in the near future. Thanks for your patience, John Bartow, President Database Advisors, Inc. Email: mailto:president at databaseadvisors.com Website: http://www.databaseadvisors.com From davidmcafee at gmail.com Tue Oct 20 13:29:12 2009 From: davidmcafee at gmail.com (David McAfee) Date: Tue, 20 Oct 2009 11:29:12 -0700 Subject: [AccessD] Cards.dll Message-ID: <8786a4c00910201129m1ddf24a1s90e74cc0961beda9@mail.gmail.com> Has anybody ever referenced/used cards.dll? I was playing around with making a card game in VB.net or C#, but kind of wanted to play around with it in Access first. Thanks, David From Chester_Kaup at kindermorgan.com Wed Oct 21 08:04:59 2009 From: Chester_Kaup at kindermorgan.com (Kaup, Chester) Date: Wed, 21 Oct 2009 08:04:59 -0500 Subject: [AccessD] Need Query Help Message-ID: <0B2BF8524B73A248A2F1B81BA751ED3C190D5431BD@houex1.kindermorgan.com> I have a table with 4 fields PID, SDate, Chase_Start_Date and SDate_2. I need to extract records based on the following criteria. 1. Sdate < 1/1/2005 2. Don't include record with SDate <1/1/2005 if Chase_Start_Date < 1/1/2005 3. Do include record if SDate <1/1/2005 and SDate_2 is < 1/1/2005 The Chase_Start_Date and SDate_2 fields may be blank or just the Sdate_2 field if the Chase_Start_Date field has data. I have been working on this for a while and thought I had it with the following SQL statement but no. Time for another set of eyes to look at it. SELECT SDate, Chase_Start_Date, SDate_2 FROM Constants WHERE (((SDate)<#1/1/2005#) AND ((Chase_Start_Date) Is Null)) OR (((SDate)<#1/1/2005#) AND ((SDate_2)<#1/1/2005#)); Thanks. Chester Kaup Engineering Technician Kinder Morgan CO2 Company, LLP Office (432) 688-3797 FAX (432) 688-3799 ? No trees were killed in the sending of this message. However a large number of electrons were terribly inconvenienced. From Gustav at cactus.dk Wed Oct 21 08:26:58 2009 From: Gustav at cactus.dk (Gustav Brock) Date: Wed, 21 Oct 2009 15:26:58 +0200 Subject: [AccessD] Need Query Help Message-ID: Hi Chester 2. Don't include record with SDate <1/1/2005 if Chase_Start_Date < 1/1/2005 3. Do include record if SDate <1/1/2005 and SDate_2 is < 1/1/2005 are contradicting. What if Chase_Start_Date < 1/1/2005 and SDate_2 is < 1/1/2005? /gustav >>> Chester_Kaup at kindermorgan.com 21-10-2009 15:04 >>> I have a table with 4 fields PID, SDate, Chase_Start_Date and SDate_2. I need to extract records based on the following criteria. 1. Sdate < 1/1/2005 2. Don't include record with SDate <1/1/2005 if Chase_Start_Date < 1/1/2005 3. Do include record if SDate <1/1/2005 and SDate_2 is < 1/1/2005 The Chase_Start_Date and SDate_2 fields may be blank or just the Sdate_2 field if the Chase_Start_Date field has data. I have been working on this for a while and thought I had it with the following SQL statement but no. Time for another set of eyes to look at it. SELECT SDate, Chase_Start_Date, SDate_2 FROM Constants WHERE (((SDate)<#1/1/2005#) AND ((Chase_Start_Date) Is Null)) OR (((SDate)<#1/1/2005#) AND ((SDate_2)<#1/1/2005#)); Thanks. Chester Kaup Engineering Technician Kinder Morgan CO2 Company, LLP Office (432) 688-3797 FAX (432) 688-3799 From Chester_Kaup at kindermorgan.com Wed Oct 21 08:53:33 2009 From: Chester_Kaup at kindermorgan.com (Kaup, Chester) Date: Wed, 21 Oct 2009 08:53:33 -0500 Subject: [AccessD] Need Query Help In-Reply-To: References: Message-ID: <0B2BF8524B73A248A2F1B81BA751ED3C190D5431F9@houex1.kindermorgan.com> What if Chase_Start_Date < 1/1/2005 and SDate_2 is < 1/1/2005? Count the record if Sdate <1/1/2005 Examples Good Records PID SDate Chase_Start_Date SDate_2 PAT 77-2 01-Feb-03 PAT 117-1 01-May-98 01-Oct-02 01-Feb-04 Bad Record PAT 118-5 01-Jan-96 01-Oct-02 PAT 173-3 01-Oct-99 01-Apr-04 01-Mar-08 -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: Wednesday, October 21, 2009 8:27 AM To: accessd at databaseadvisors.com Subject: Re: [AccessD] Need Query Help Hi Chester 2. Don't include record with SDate <1/1/2005 if Chase_Start_Date < 1/1/2005 3. Do include record if SDate <1/1/2005 and SDate_2 is < 1/1/2005 are contradicting. What if Chase_Start_Date < 1/1/2005 and SDate_2 is < 1/1/2005? /gustav >>> Chester_Kaup at kindermorgan.com 21-10-2009 15:04 >>> I have a table with 4 fields PID, SDate, Chase_Start_Date and SDate_2. I need to extract records based on the following criteria. 1. Sdate < 1/1/2005 2. Don't include record with SDate <1/1/2005 if Chase_Start_Date < 1/1/2005 3. Do include record if SDate <1/1/2005 and SDate_2 is < 1/1/2005 The Chase_Start_Date and SDate_2 fields may be blank or just the Sdate_2 field if the Chase_Start_Date field has data. I have been working on this for a while and thought I had it with the following SQL statement but no. Time for another set of eyes to look at it. SELECT SDate, Chase_Start_Date, SDate_2 FROM Constants WHERE (((SDate)<#1/1/2005#) AND ((Chase_Start_Date) Is Null)) OR (((SDate)<#1/1/2005#) AND ((SDate_2)<#1/1/2005#)); Thanks. Chester Kaup Engineering Technician Kinder Morgan CO2 Company, LLP Office (432) 688-3797 FAX (432) 688-3799 -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From drawbridgej at sympatico.ca Wed Oct 21 09:21:13 2009 From: drawbridgej at sympatico.ca (Jack and Pat) Date: Wed, 21 Oct 2009 10:21:13 -0400 Subject: [AccessD] Need Query Help In-Reply-To: <0B2BF8524B73A248A2F1B81BA751ED3C190D5431F9@houex1.kindermorgan.com> References: <0B2BF8524B73A248A2F1B81BA751ED3C190D5431F9@houex1.kindermorgan.com> Message-ID: <421FF6A86C1D444388FD2B8D4E9626CD@AMDXP> Chester, I think this works: SELECT Constants.SDate, Constants.Chase_Start_Date, Constants.SDate_2 FROM Constants WHERE [SDate]<#1/1/2005# AND [SDate_2]<#1/1/2005# AND [Chase_Start_date]<#1/1/2005# OR ( [Chase_Start_Date] Is Null AND [SDate_2] Is Null); Works on the test records . Jack -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Kaup, Chester Sent: Wednesday, October 21, 2009 9:54 AM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Need Query Help What if Chase_Start_Date < 1/1/2005 and SDate_2 is < 1/1/2005? Count the record if Sdate <1/1/2005 Examples Good Records PID SDate Chase_Start_Date SDate_2 PAT 77-2 01-Feb-03 PAT 117-1 01-May-98 01-Oct-02 01-Feb-04 Bad Record PAT 118-5 01-Jan-96 01-Oct-02 PAT 173-3 01-Oct-99 01-Apr-04 01-Mar-08 -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: Wednesday, October 21, 2009 8:27 AM To: accessd at databaseadvisors.com Subject: Re: [AccessD] Need Query Help Hi Chester 2. Don't include record with SDate <1/1/2005 if Chase_Start_Date < 1/1/2005 3. Do include record if SDate <1/1/2005 and SDate_2 is < 1/1/2005 are contradicting. What if Chase_Start_Date < 1/1/2005 and SDate_2 is < 1/1/2005? /gustav >>> Chester_Kaup at kindermorgan.com 21-10-2009 15:04 >>> I have a table with 4 fields PID, SDate, Chase_Start_Date and SDate_2. I need to extract records based on the following criteria. 1. Sdate < 1/1/2005 2. Don't include record with SDate <1/1/2005 if Chase_Start_Date < 1/1/2005 3. Do include record if SDate <1/1/2005 and SDate_2 is < 1/1/2005 The Chase_Start_Date and SDate_2 fields may be blank or just the Sdate_2 field if the Chase_Start_Date field has data. I have been working on this for a while and thought I had it with the following SQL statement but no. Time for another set of eyes to look at it. SELECT SDate, Chase_Start_Date, SDate_2 FROM Constants WHERE (((SDate)<#1/1/2005#) AND ((Chase_Start_Date) Is Null)) OR (((SDate)<#1/1/2005#) AND ((SDate_2)<#1/1/2005#)); Thanks. Chester Kaup Engineering Technician Kinder Morgan CO2 Company, LLP Office (432) 688-3797 FAX (432) 688-3799 -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From cjlabs at worldnet.att.net Wed Oct 21 11:28:23 2009 From: cjlabs at worldnet.att.net (Carolyn Johnson) Date: Wed, 21 Oct 2009 11:28:23 -0500 Subject: [AccessD] Declare function question Message-ID: <6B9DF382894D4D2AAAF2928EF229A493@Dell> I have code to send an email via Outlook Express. It uses the following function. Declare Function MAPISendMail _ Lib "c:\program files\outlook express\msoe.dll" Alias _ "MAPISendEmailOE" ( _ ByVal Session As Long, _ ByVal UIParam As Long, _ message As MAPIMessage, _ ByVal Flags As Long, _ ByVal Reserved As Long) As Long Since Outlook Express is not part of Vista, I need to also have a similar function for Windows Mail with the corresponding dll: Declare Function MAPISendMail _ Lib "c:\Windows\System\mapi32.dll" ( _ ByVal Session As Long, _ ByVal UIParam As Long, _ message As MAPIMessage, _ ByVal Flags As Long, _ ByVal Reserved As Long) As Long I tried to rename the first one to MAPISendMailOE and then choose the function to call based on the operating system (determined when the database is first opened). When I rename the function, I get the error "Can't find DLL entry point MAPISendEmailOE in c:\program files\outlook express\msoe.dll" on the WinXP computer. Same type of problem if I rename the Vista version. How do I have both functions available and call the appropriate one for the specific computer? Thanks Carolyn Johnson St Louis, MO From cjlabs at worldnet.att.net Wed Oct 21 11:33:31 2009 From: cjlabs at worldnet.att.net (Carolyn Johnson) Date: Wed, 21 Oct 2009 11:33:31 -0500 Subject: [AccessD] Declare function question -- correction References: <6B9DF382894D4D2AAAF2928EF229A493@Dell> Message-ID: Sorry -- the original MAPISendEmail does not have the Alias included. I was playing around with getting it to work and added that. Carolyn Johnson ----- Original Message ----- From: Carolyn Johnson To: Access Developers Sent: Wednesday, October 21, 2009 11:28 AM Subject: [AccessD] Declare function question I have code to send an email via Outlook Express. It uses the following function. Declare Function MAPISendMail _ Lib "c:\program files\outlook express\msoe.dll" Alias _ "MAPISendEmailOE" ( _ ByVal Session As Long, _ ByVal UIParam As Long, _ message As MAPIMessage, _ ByVal Flags As Long, _ ByVal Reserved As Long) As Long Since Outlook Express is not part of Vista, I need to also have a similar function for Windows Mail with the corresponding dll: Declare Function MAPISendMail _ Lib "c:\Windows\System\mapi32.dll" ( _ ByVal Session As Long, _ ByVal UIParam As Long, _ message As MAPIMessage, _ ByVal Flags As Long, _ ByVal Reserved As Long) As Long I tried to rename the first one to MAPISendMailOE and then choose the function to call based on the operating system (determined when the database is first opened). When I rename the function, I get the error "Can't find DLL entry point MAPISendEmailOE in c:\program files\outlook express\msoe.dll" on the WinXP computer. Same type of problem if I rename the Vista version. How do I have both functions available and call the appropriate one for the specific computer? Thanks Carolyn Johnson St Louis, MO -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From dkalsow at yahoo.com Wed Oct 21 12:26:05 2009 From: dkalsow at yahoo.com (Dale Kalsow) Date: Wed, 21 Oct 2009 10:26:05 -0700 (PDT) Subject: [AccessD] Form that has focus In-Reply-To: <8786a4c00910201129m1ddf24a1s90e74cc0961beda9@mail.gmail.com> Message-ID: <924849.98536.qm@web50401.mail.re2.yahoo.com> Does anyone know how to reference what form has focus?? I have created a ribbon and want to know what form has focus when on click on a button in the ribbon.? Since I am clicking on the ribbon me.name does not appear to work. ? Thanks! ? Dale From Lambert.Heenan at chartisinsurance.com Wed Oct 21 12:57:54 2009 From: Lambert.Heenan at chartisinsurance.com (Heenan, Lambert) Date: Wed, 21 Oct 2009 13:57:54 -0400 Subject: [AccessD] Form that has focus In-Reply-To: <924849.98536.qm@web50401.mail.re2.yahoo.com> References: <8786a4c00910201129m1ddf24a1s90e74cc0961beda9@mail.gmail.com> <924849.98536.qm@web50401.mail.re2.yahoo.com> Message-ID: Well in pre-Access 2007 land it is... Screen.ActiveForm.Name Lambert -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Dale Kalsow Sent: Wednesday, October 21, 2009 1:26 PM To: Access Developers discussion and problem solving Subject: [AccessD] Form that has focus Does anyone know how to reference what form has focus?? I have created a ribbon and want to know what form has focus when on click on a button in the ribbon.? Since I am clicking on the ribbon me.name does not appear to work. ? Thanks! ? Dale -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From robert at servicexp.com Wed Oct 21 13:17:12 2009 From: robert at servicexp.com (Robert) Date: Wed, 21 Oct 2009 14:17:12 -0400 Subject: [AccessD] All-In-One Date format Function: In-Reply-To: References: <8786a4c00910201129m1ddf24a1s90e74cc0961beda9@mail.gmail.com> <924849.98536.qm@web50401.mail.re2.yahoo.com> Message-ID: <000601ca527a$b6984280$23c8c780$@com> Hoooooowdy, Before re-inventing the wheel here, does anyone have or know of a function that can handle "free form" date formatting. I'm looking for a function that can parse any input and then format is correctly. Example of user inputs: 0909 09/21/09 09-21-09 092109 92109 9212009 etc. I don't want to use any formatting / Masking settings at the field or table level. I would like the user to enter it the way they want to (to the most degree possible)... WBR Robert From davidmcafee at gmail.com Wed Oct 21 13:43:38 2009 From: davidmcafee at gmail.com (David McAfee) Date: Wed, 21 Oct 2009 11:43:38 -0700 Subject: [AccessD] All-In-One Date format Function: In-Reply-To: <000601ca527a$b6984280$23c8c780$@com> References: <8786a4c00910201129m1ddf24a1s90e74cc0961beda9@mail.gmail.com> <924849.98536.qm@web50401.mail.re2.yahoo.com> <000601ca527a$b6984280$23c8c780$@com> Message-ID: <8786a4c00910211143s102eem35127d98402cef9f@mail.gmail.com> Why not set masking at the input/form level? You might be able to do something for these 09/21/09 09-21-09 092109 92109 9212009 But what date are you going to pick for 0909? 09/01/09 or 09/30/09 ? On Wed, Oct 21, 2009 at 11:17 AM, Robert wrote: > Hoooooowdy, > ?Before re-inventing the wheel here, does anyone have or know of a function > that can handle "free form" date formatting. I'm looking for a function that > can parse any input and then format is correctly. > > Example of user inputs: > > 0909 > 09/21/09 > 09-21-09 > 092109 > 92109 > 9212009 > > etc. > > I don't want to use any formatting / Masking settings at the field or table > level. I would like the user to enter it the way they want to (to the most > degree possible)... > > WBR > Robert > > > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > From Lambert.Heenan at chartisinsurance.com Wed Oct 21 13:48:33 2009 From: Lambert.Heenan at chartisinsurance.com (Heenan, Lambert) Date: Wed, 21 Oct 2009 14:48:33 -0400 Subject: [AccessD] All-In-One Date format Function: In-Reply-To: <000601ca527a$b6984280$23c8c780$@com> References: <8786a4c00910201129m1ddf24a1s90e74cc0961beda9@mail.gmail.com> <924849.98536.qm@web50401.mail.re2.yahoo.com> <000601ca527a$b6984280$23c8c780$@com> Message-ID: Robert, If you would like to remain sane they I suggest you step away from the problem. "I would like the user to enter it the way they want to" is just not a good idea. What if your company hires a Brit who wants to enter 10/1/09 - meaning January 10th 2009? Or a Japanese who enters 10/01/09 but means January 9th 2010? To me, the simplest solution to managing date input is to not permit freeform entry, but rather to pop up a small calendar form any time a Date field is clicked on. As for a routine to convert existing freeform dates? I don't think you can beat Cdate([YourData]) Cdate can handle just about anything that looks like a date and if it's unambiguous will give you a real date back. It will of course assume mm/dd/yyyy when the input data is not clear. Just another reason NOT to allow freeform date entry. Feed it really weird input like 92109 and you will get back 3/7/2152, because that date is 92,109 days after 12/30/1899 - the basis of Access dates. Doing any better than this is going to require various assumptions to be coded regarding what comes first a month a day or a year. Why have the problem to deal with? Use a calendar form. Lambert -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Robert Sent: Wednesday, October 21, 2009 2:17 PM To: 'Access Developers discussion and problem solving' Subject: [AccessD] All-In-One Date format Function: Hoooooowdy, Before re-inventing the wheel here, does anyone have or know of a function that can handle "free form" date formatting. I'm looking for a function that can parse any input and then format is correctly. Example of user inputs: 0909 09/21/09 09-21-09 092109 92109 9212009 etc. I don't want to use any formatting / Masking settings at the field or table level. I would like the user to enter it the way they want to (to the most degree possible)... WBR Robert -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From robert at servicexp.com Wed Oct 21 13:51:40 2009 From: robert at servicexp.com (Robert) Date: Wed, 21 Oct 2009 14:51:40 -0400 Subject: [AccessD] All-In-One Date format Function: In-Reply-To: <8786a4c00910211143s102eem35127d98402cef9f@mail.gmail.com> References: <8786a4c00910201129m1ddf24a1s90e74cc0961beda9@mail.gmail.com> <924849.98536.qm@web50401.mail.re2.yahoo.com> <000601ca527a$b6984280$23c8c780$@com> <8786a4c00910211143s102eem35127d98402cef9f@mail.gmail.com> Message-ID: <000a01ca527f$8809d370$981d7a50$@com> For the 0909, I would insert the last day of the month for the day.. Would be used for CC Expiry format... I was trying to avoid using any masking... I want to grab the data in the before update event and fix it up or return error. WBR Robert -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of David McAfee Sent: Wednesday, October 21, 2009 2:44 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] All-In-One Date format Function: Why not set masking at the input/form level? You might be able to do something for these 09/21/09 09-21-09 092109 92109 9212009 But what date are you going to pick for 0909? 09/01/09 or 09/30/09 ? On Wed, Oct 21, 2009 at 11:17 AM, Robert wrote: > Hoooooowdy, > ?Before re-inventing the wheel here, does anyone have or know of a function > that can handle "free form" date formatting. I'm looking for a function that > can parse any input and then format is correctly. > > Example of user inputs: > > 0909 > 09/21/09 > 09-21-09 > 092109 > 92109 > 9212009 > > etc. > > I don't want to use any formatting / Masking settings at the field or table > level. I would like the user to enter it the way they want to (to the most > degree possible)... > > WBR > Robert > > > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From Lambert.Heenan at chartisinsurance.com Wed Oct 21 14:06:35 2009 From: Lambert.Heenan at chartisinsurance.com (Heenan, Lambert) Date: Wed, 21 Oct 2009 15:06:35 -0400 Subject: [AccessD] All-In-One Date format Function: In-Reply-To: <000a01ca527f$8809d370$981d7a50$@com> References: <8786a4c00910201129m1ddf24a1s90e74cc0961beda9@mail.gmail.com> <924849.98536.qm@web50401.mail.re2.yahoo.com> <000601ca527a$b6984280$23c8c780$@com> <8786a4c00910211143s102eem35127d98402cef9f@mail.gmail.com> <000a01ca527f$8809d370$981d7a50$@com> Message-ID: "Use a calendar form" :-) Lambert -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Robert Sent: Wednesday, October 21, 2009 2:52 PM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] All-In-One Date format Function: For the 0909, I would insert the last day of the month for the day.. Would be used for CC Expiry format... I was trying to avoid using any masking... I want to grab the data in the before update event and fix it up or return error. WBR Robert From robert at servicexp.com Wed Oct 21 14:18:03 2009 From: robert at servicexp.com (Robert) Date: Wed, 21 Oct 2009 15:18:03 -0400 Subject: [AccessD] All-In-One Date format Function: In-Reply-To: References: <8786a4c00910201129m1ddf24a1s90e74cc0961beda9@mail.gmail.com> <924849.98536.qm@web50401.mail.re2.yahoo.com> <000601ca527a$b6984280$23c8c780$@com> Message-ID: <000b01ca5283$3751c6a0$a5f553e0$@com> Thanks for the reply Lambert, The great thing is, I don't have to worry about in what order the date is entered. Currently all dates are entered in "09/21/09" format. The request is "we would like to minimum keystrokes (see below) and have the users enter the date as 0909 for CC and 092109 for all other date fields. (I want to parse the date and format it correctly to protect against 909 or 32109.. etc entries... The owner want the fastest possible key entry to his employees. Reaching for a mouse is not an option here..;-) Even if I did have to worry about the date order, I should be able to format the end entry to the system formatting very easily right?, it's the parsing that's the challenge.. :-) Thanks Again WBR Robert -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Heenan, Lambert Sent: Wednesday, October 21, 2009 2:49 PM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] All-In-One Date format Function: Robert, If you would like to remain sane they I suggest you step away from the problem. "I would like the user to enter it the way they want to" is just not a good idea. What if your company hires a Brit who wants to enter 10/1/09 - meaning January 10th 2009? Or a Japanese who enters 10/01/09 but means January 9th 2010? To me, the simplest solution to managing date input is to not permit freeform entry, but rather to pop up a small calendar form any time a Date field is clicked on. As for a routine to convert existing freeform dates? I don't think you can beat Cdate([YourData]) Cdate can handle just about anything that looks like a date and if it's unambiguous will give you a real date back. It will of course assume mm/dd/yyyy when the input data is not clear. Just another reason NOT to allow freeform date entry. Feed it really weird input like 92109 and you will get back 3/7/2152, because that date is 92,109 days after 12/30/1899 - the basis of Access dates. Doing any better than this is going to require various assumptions to be coded regarding what comes first a month a day or a year. Why have the problem to deal with? Use a calendar form. Lambert -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Robert Sent: Wednesday, October 21, 2009 2:17 PM To: 'Access Developers discussion and problem solving' Subject: [AccessD] All-In-One Date format Function: Hoooooowdy, Before re-inventing the wheel here, does anyone have or know of a function that can handle "free form" date formatting. I'm looking for a function that can parse any input and then format is correctly. Example of user inputs: 0909 09/21/09 09-21-09 092109 92109 9212009 etc. I don't want to use any formatting / Masking settings at the field or table level. I would like the user to enter it the way they want to (to the most degree possible)... WBR Robert -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From doug at starntech.com Wed Oct 21 14:42:39 2009 From: doug at starntech.com (Doug Barnes) Date: Wed, 21 Oct 2009 15:42:39 -0400 Subject: [AccessD] All-In-One Date format Function: In-Reply-To: <000b01ca5283$3751c6a0$a5f553e0$@com> Message-ID: What if you just entered the day "21" and re-format that to currentMonth/21/currentYear? Douglas Barnes Starn Technical Services P.O. Box 1172 1057 French Street Meadville, PA 16335 P: 814.724.1045 F: 814.337.3460 -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com]On Behalf Of Robert Sent: Wednesday, October 21, 2009 3:18 PM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] All-In-One Date format Function: Thanks for the reply Lambert, The great thing is, I don't have to worry about in what order the date is entered. Currently all dates are entered in "09/21/09" format. The request is "we would like to minimum keystrokes (see below) and have the users enter the date as 0909 for CC and 092109 for all other date fields. (I want to parse the date and format it correctly to protect against 909 or 32109.. etc entries... The owner want the fastest possible key entry to his employees. Reaching for a mouse is not an option here..;-) Even if I did have to worry about the date order, I should be able to format the end entry to the system formatting very easily right?, it's the parsing that's the challenge.. :-) Thanks Again WBR Robert -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Heenan, Lambert Sent: Wednesday, October 21, 2009 2:49 PM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] All-In-One Date format Function: Robert, If you would like to remain sane they I suggest you step away from the problem. "I would like the user to enter it the way they want to" is just not a good idea. What if your company hires a Brit who wants to enter 10/1/09 - meaning January 10th 2009? Or a Japanese who enters 10/01/09 but means January 9th 2010? To me, the simplest solution to managing date input is to not permit freeform entry, but rather to pop up a small calendar form any time a Date field is clicked on. As for a routine to convert existing freeform dates? I don't think you can beat Cdate([YourData]) Cdate can handle just about anything that looks like a date and if it's unambiguous will give you a real date back. It will of course assume mm/dd/yyyy when the input data is not clear. Just another reason NOT to allow freeform date entry. Feed it really weird input like 92109 and you will get back 3/7/2152, because that date is 92,109 days after 12/30/1899 - the basis of Access dates. Doing any better than this is going to require various assumptions to be coded regarding what comes first a month a day or a year. Why have the problem to deal with? Use a calendar form. Lambert -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Robert Sent: Wednesday, October 21, 2009 2:17 PM To: 'Access Developers discussion and problem solving' Subject: [AccessD] All-In-One Date format Function: Hoooooowdy, Before re-inventing the wheel here, does anyone have or know of a function that can handle "free form" date formatting. I'm looking for a function that can parse any input and then format is correctly. Example of user inputs: 0909 09/21/09 09-21-09 092109 92109 9212009 etc. I don't want to use any formatting / Masking settings at the field or table level. I would like the user to enter it the way they want to (to the most degree possible)... WBR Robert -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From robert at servicexp.com Wed Oct 21 14:52:42 2009 From: robert at servicexp.com (Robert) Date: Wed, 21 Oct 2009 15:52:42 -0400 Subject: [AccessD] All-In-One Date format Function: In-Reply-To: References: <000b01ca5283$3751c6a0$a5f553e0$@com> Message-ID: <001701ca5288$0dfa7c70$29ef7550$@com> Interesting approach...... Although that would certainly work for date entries inside the current month / year, it would fail for anything else... Thinking about CC Expiry dates, and transactions completed in a different month / year then processed. There are some areas that would certainly work though.. Thanks WBR Robert -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Doug Barnes Sent: Wednesday, October 21, 2009 3:43 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] All-In-One Date format Function: What if you just entered the day "21" and re-format that to currentMonth/21/currentYear? Douglas Barnes Starn Technical Services P.O. Box 1172 1057 French Street Meadville, PA 16335 P: 814.724.1045 F: 814.337.3460 -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com]On Behalf Of Robert Sent: Wednesday, October 21, 2009 3:18 PM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] All-In-One Date format Function: Thanks for the reply Lambert, The great thing is, I don't have to worry about in what order the date is entered. Currently all dates are entered in "09/21/09" format. The request is "we would like to minimum keystrokes (see below) and have the users enter the date as 0909 for CC and 092109 for all other date fields. (I want to parse the date and format it correctly to protect against 909 or 32109.. etc entries... The owner want the fastest possible key entry to his employees. Reaching for a mouse is not an option here..;-) Even if I did have to worry about the date order, I should be able to format the end entry to the system formatting very easily right?, it's the parsing that's the challenge.. :-) Thanks Again WBR Robert -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Heenan, Lambert Sent: Wednesday, October 21, 2009 2:49 PM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] All-In-One Date format Function: Robert, If you would like to remain sane they I suggest you step away from the problem. "I would like the user to enter it the way they want to" is just not a good idea. What if your company hires a Brit who wants to enter 10/1/09 - meaning January 10th 2009? Or a Japanese who enters 10/01/09 but means January 9th 2010? To me, the simplest solution to managing date input is to not permit freeform entry, but rather to pop up a small calendar form any time a Date field is clicked on. As for a routine to convert existing freeform dates? I don't think you can beat Cdate([YourData]) Cdate can handle just about anything that looks like a date and if it's unambiguous will give you a real date back. It will of course assume mm/dd/yyyy when the input data is not clear. Just another reason NOT to allow freeform date entry. Feed it really weird input like 92109 and you will get back 3/7/2152, because that date is 92,109 days after 12/30/1899 - the basis of Access dates. Doing any better than this is going to require various assumptions to be coded regarding what comes first a month a day or a year. Why have the problem to deal with? Use a calendar form. Lambert -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Robert Sent: Wednesday, October 21, 2009 2:17 PM To: 'Access Developers discussion and problem solving' Subject: [AccessD] All-In-One Date format Function: Hoooooowdy, Before re-inventing the wheel here, does anyone have or know of a function that can handle "free form" date formatting. I'm looking for a function that can parse any input and then format is correctly. Example of user inputs: 0909 09/21/09 09-21-09 092109 92109 9212009 etc. I don't want to use any formatting / Masking settings at the field or table level. I would like the user to enter it the way they want to (to the most degree possible)... WBR Robert -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/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 davidmcafee at gmail.com Wed Oct 21 15:03:22 2009 From: davidmcafee at gmail.com (David McAfee) Date: Wed, 21 Oct 2009 13:03:22 -0700 Subject: [AccessD] All-In-One Date format Function: In-Reply-To: <000b01ca5283$3751c6a0$a5f553e0$@com> References: <8786a4c00910201129m1ddf24a1s90e74cc0961beda9@mail.gmail.com> <924849.98536.qm@web50401.mail.re2.yahoo.com> <000601ca527a$b6984280$23c8c780$@com> <000b01ca5283$3751c6a0$a5f553e0$@com> Message-ID: <8786a4c00910211303s586d396am637a48a94af5ceb7@mail.gmail.com> I also agree that a calander control is best, with an input mask 2nd best. Now, with that out of the way, I'd recommend either a 4 or 5 digit field. Make an entry such as 9/09 be entered as 0909 or as 09/09, still very fast once they are used to it (using the numeric keypad). Also enable the autocomplete. I did this for a lotto entry screen I made. you can enter all of the 6 numbers (12 digits) really quickly. David On Wed, Oct 21, 2009 at 12:18 PM, Robert wrote: > Thanks for the reply Lambert, > ?The great thing is, I don't have to worry about in what order the date is > entered. Currently all dates are entered in "09/21/09" format. The request > is "we would like to minimum keystrokes (see below) and have the users enter > the date as 0909 for CC and 092109 for all other date fields. ?(I want to > parse the date and format it correctly to protect against 909 or 32109.. etc > entries... > > ?The owner want the fastest possible key entry to his employees. Reaching > for a mouse is not an option here..;-) > > Even if I did have to worry about the date order, I should be able to format > the end entry to the system formatting very easily right?, it's the parsing > that's the challenge.. :-) > > Thanks Again > > WBR > Robert > > > > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Heenan, Lambert > Sent: Wednesday, October 21, 2009 2:49 PM > To: 'Access Developers discussion and problem solving' > Subject: Re: [AccessD] All-In-One Date format Function: > > Robert, > > If you would like to remain sane they I suggest you step away from the > problem. "I would like the user to enter it the way they want to" is just > not a good idea. What if your company hires a Brit who wants to enter > 10/1/09 - meaning January 10th 2009? Or a Japanese who enters 10/01/09 but > means January 9th 2010? > > To me, the simplest solution to managing date input is to not permit > freeform entry, but rather to pop up a small calendar form any time a Date > field is clicked on. > > As for a routine to convert existing freeform dates? I don't think you can > beat Cdate([YourData]) > > Cdate can handle just about anything that looks like a date and if it's > unambiguous will give you a real date back. It will of course assume > mm/dd/yyyy when the input data is not clear. Just another reason NOT to > allow freeform date entry. Feed it really weird input like 92109 and you > will get back 3/7/2152, because that date is 92,109 days after 12/30/1899 - > the basis of Access dates. > > Doing any better than this is going to require various assumptions to be > coded regarding what comes first a month a day or a year. Why have the > problem to deal with? Use a calendar form. > > Lambert > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Robert > Sent: Wednesday, October 21, 2009 2:17 PM > To: 'Access Developers discussion and problem solving' > Subject: [AccessD] All-In-One Date format Function: > > Hoooooowdy, > ?Before re-inventing the wheel here, does anyone have or know of a function > that can handle "free form" date formatting. I'm looking for a function that > can parse any input and then format is correctly. > > Example of user inputs: > > 0909 > 09/21/09 > 09-21-09 > 092109 > 92109 > 9212009 > > etc. > > I don't want to use any formatting / Masking settings at the field or table > level. I would like the user to enter it the way they want to (to the most > degree possible)... > > WBR > Robert > From DWUTKA at Marlow.com Wed Oct 21 15:33:50 2009 From: DWUTKA at Marlow.com (Drew Wutka) Date: Wed, 21 Oct 2009 15:33:50 -0500 Subject: [AccessD] Declare function question -- correction In-Reply-To: References: <6B9DF382894D4D2AAAF2928EF229A493@Dell> Message-ID: The problem is that Alias is what is in the .dll, not what you call it. So it should be Declare Function MAPISendMailOE lib... ALIAS MAPISendMail .... Drew -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Carolyn Johnson Sent: Wednesday, October 21, 2009 11:34 AM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Declare function question -- correction Sorry -- the original MAPISendEmail does not have the Alias included. I was playing around with getting it to work and added that. Carolyn Johnson ----- Original Message ----- From: Carolyn Johnson To: Access Developers Sent: Wednesday, October 21, 2009 11:28 AM Subject: [AccessD] Declare function question I have code to send an email via Outlook Express. It uses the following function. Declare Function MAPISendMail _ Lib "c:\program files\outlook express\msoe.dll" Alias _ "MAPISendEmailOE" ( _ ByVal Session As Long, _ ByVal UIParam As Long, _ message As MAPIMessage, _ ByVal Flags As Long, _ ByVal Reserved As Long) As Long Since Outlook Express is not part of Vista, I need to also have a similar function for Windows Mail with the corresponding dll: Declare Function MAPISendMail _ Lib "c:\Windows\System\mapi32.dll" ( _ ByVal Session As Long, _ ByVal UIParam As Long, _ message As MAPIMessage, _ ByVal Flags As Long, _ ByVal Reserved As Long) As Long I tried to rename the first one to MAPISendMailOE and then choose the function to call based on the operating system (determined when the database is first opened). When I rename the function, I get the error "Can't find DLL entry point MAPISendEmailOE in c:\program files\outlook express\msoe.dll" on the WinXP computer. Same type of problem if I rename the Vista version. How do I have both functions available and call the appropriate one for the specific computer? Thanks Carolyn Johnson St Louis, MO -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/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 Gustav at cactus.dk Wed Oct 21 15:43:55 2009 From: Gustav at cactus.dk (Gustav Brock) Date: Wed, 21 Oct 2009 22:43:55 +0200 Subject: [AccessD] All-In-One Date format Function: Message-ID: Hi Robert Here's a method as a starter: Public Function DateParse(ByVal strInput As String) As Date Dim strDate As String Dim datDate As Date If IsDate(strInput) Then strDate = strInput End If If Len(strDate) = 0 Then strDate = Format(strInput, "00/00/00") If Not IsDate(strDate) Then strDate = vbNullString End If End If If Len(strDate) = 0 Then strDate = Format(strInput, "00/00") If Not IsDate(strDate) Then strDate = vbNullString End If End If If Len(strDate) = 0 Then strDate = Format(strInput, "0/0") If Not IsDate(strDate) Then strDate = vbNullString End If End If If Len(strDate) = 0 Then datDate = Date Else datDate = CDate(strDate) End If DateParse = datDate End Function /gustav >>> robert at servicexp.com 21-10-2009 21:18 >>> Thanks for the reply Lambert, The great thing is, I don't have to worry about in what order the date is entered. Currently all dates are entered in "09/21/09" format. The request is "we would like to minimum keystrokes (see below) and have the users enter the date as 0909 for CC and 092109 for all other date fields. (I want to parse the date and format it correctly to protect against 909 or 32109.. etc entries... The owner want the fastest possible key entry to his employees. Reaching for a mouse is not an option here..;-) Even if I did have to worry about the date order, I should be able to format the end entry to the system formatting very easily right?, it's the parsing that's the challenge.. :-) Thanks Again WBR Robert From stuart at lexacorp.com.pg Wed Oct 21 16:20:10 2009 From: stuart at lexacorp.com.pg (Stuart McLachlan) Date: Thu, 22 Oct 2009 07:20:10 +1000 Subject: [AccessD] All-In-One Date format Function: In-Reply-To: References: <8786a4c00910201129m1ddf24a1s90e74cc0961beda9@mail.gmail.com>, <000601ca527a$b6984280$23c8c780$@com>, Message-ID: <4ADF7B0A.24610.1226C2FF@stuart.lexacorp.com.pg> That depends on your "regional settings". On my machine: ? format(cdate("01/02/03"),"d mmm yyyy") 1 Feb 2003 On 21 Oct 2009 at 14:48, Heenan, Lambert wrote: > Cdate can handle just about anything that looks like a date and if > it's unambiguous will give you a real date back. It will of course > assume mm/dd/yyyy when the input data is not clear. From shamil at smsconsulting.spb.ru Wed Oct 21 17:47:14 2009 From: shamil at smsconsulting.spb.ru (Shamil Salakhetdinov) Date: Thu, 22 Oct 2009 02:47:14 +0400 Subject: [AccessD] All-In-One Date format Function: In-Reply-To: <000601ca527a$b6984280$23c8c780$@com> References: <8786a4c00910201129m1ddf24a1s90e74cc0961beda9@mail.gmail.com> <924849.98536.qm@web50401.mail.re2.yahoo.com> <000601ca527a$b6984280$23c8c780$@com> Message-ID: <001201ca52a0$7130f7c0$5392e740$@spb.ru> Hi Robert, Just a quick & dirty code snippet - it's C# but simulates VBA as close as possible: using System; using VBA = Microsoft.VisualBasic.Strings; namespace TestConsole.App { public class DateConvertor { public static DateTime Convert(string dateStr) { string temp = dateStr; string monthStr; string dayStr; string yearStr; DateTime retValue = DateTime.MinValue; if (VBA.Left(temp, 1) == "1" || VBA.Left(temp, 1) == "0") { // two digits monthNum monthStr = VBA.Left(temp, 2); temp = VBA.Mid(temp, 3); } else { // one digits monthNum monthStr = VBA.Left(temp, 1); temp = VBA.Mid(temp, 2); } if (VBA.Len(temp) < 2) throw new ApplicationException("Invalid date format: " + dateStr); else if (VBA.Len(temp) == 2) { temp = "00" + temp; } else if ( (VBA.Left(temp, 1) == "/") || (VBA.Left(temp, 1) == "-") ) { temp = VBA.Mid(temp, 2); } dayStr = VBA.Left(temp, 2); temp = VBA.Mid(temp, 3); if ( (VBA.Left(temp, 1) == "/") || (VBA.Left(temp, 1) == "-") ) temp = VBA.Mid(temp, 2); if (VBA.Len(temp) == 1) temp = "200" + temp; else if (VBA.Len(temp) == 2) temp = "20" + temp; yearStr = temp; retValue = (dayStr != "00") ? Microsoft.VisualBasic.DateAndTime.DateSerial( Int32.Parse(yearStr), Int32.Parse(monthStr), Int32.Parse(dayStr)) : Microsoft.VisualBasic.DateAndTime.DateSerial( Int32.Parse(yearStr), Int32.Parse(monthStr) + 1, 0); return retValue; } public static string[] TestDates { get { return new string[] { "909", "0909", "09/21/09", "09-21-09", "092109", "92109", "9212009" }; } } public static void Test() { Console.WriteLine("// Test Output:"); Console.WriteLine("// ------------"); foreach (string date in TestDates) { Console.WriteLine("// {0} => {1:MM/dd/yyyy}", date, Convert(date)); } // Test Output: // ------------ // 909 => 09/30/2009 // 0909 => 09/30/2009 // 09/21/09 => 09/21/2009 // 09-21-09 => 09/21/2009 // 092109 => 09/21/2009 // 92109 => 09/21/2009 // 9212009 => 09/21/2009 } } } HTH. -- Shamil -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Robert Sent: Wednesday, October 21, 2009 10:17 PM To: 'Access Developers discussion and problem solving' Subject: [AccessD] All-In-One Date format Function: Hoooooowdy, Before re-inventing the wheel here, does anyone have or know of a function that can handle "free form" date formatting. I'm looking for a function that can parse any input and then format is correctly. Example of user inputs: 0909 09/21/09 09-21-09 092109 92109 9212009 etc. I don't want to use any formatting / Masking settings at the field or table level. I would like the user to enter it the way they want to (to the most degree possible)... WBR Robert <<< snip >>> From cjlabs at worldnet.att.net Wed Oct 21 19:11:26 2009 From: cjlabs at worldnet.att.net (Carolyn Johnson) Date: Wed, 21 Oct 2009 19:11:26 -0500 Subject: [AccessD] Declare function question -- correction References: <6B9DF382894D4D2AAAF2928EF229A493@Dell> Message-ID: <532F7FFF17DD4E72B81003B85DF89768@Dell> Thanks. I had tried that, but screwed it up in the Alias by renaming the function by mistake -- mapisendEmail instead of mapisendmail Your post got me straightened out, and I understand the syntax better. The joy of Vista. Thanks again, Carolyn Johnson ----- Original Message ----- From: Drew Wutka To: Access Developers discussion and problem solving Sent: Wednesday, October 21, 2009 3:33 PM Subject: Re: [AccessD] Declare function question -- correction The problem is that Alias is what is in the .dll, not what you call it. So it should be Declare Function MAPISendMailOE lib... ALIAS MAPISendMail .... Drew -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Carolyn Johnson Sent: Wednesday, October 21, 2009 11:34 AM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Declare function question -- correction Sorry -- the original MAPISendEmail does not have the Alias included. I was playing around with getting it to work and added that. Carolyn Johnson ----- Original Message ----- From: Carolyn Johnson To: Access Developers Sent: Wednesday, October 21, 2009 11:28 AM Subject: [AccessD] Declare function question I have code to send an email via Outlook Express. It uses the following function. Declare Function MAPISendMail _ Lib "c:\program files\outlook express\msoe.dll" Alias _ "MAPISendEmailOE" ( _ ByVal Session As Long, _ ByVal UIParam As Long, _ message As MAPIMessage, _ ByVal Flags As Long, _ ByVal Reserved As Long) As Long Since Outlook Express is not part of Vista, I need to also have a similar function for Windows Mail with the corresponding dll: Declare Function MAPISendMail _ Lib "c:\Windows\System\mapi32.dll" ( _ ByVal Session As Long, _ ByVal UIParam As Long, _ message As MAPIMessage, _ ByVal Flags As Long, _ ByVal Reserved As Long) As Long I tried to rename the first one to MAPISendMailOE and then choose the function to call based on the operating system (determined when the database is first opened). When I rename the function, I get the error "Can't find DLL entry point MAPISendEmailOE in c:\program files\outlook express\msoe.dll" on the WinXP computer. Same type of problem if I rename the Vista version. How do I have both functions available and call the appropriate one for the specific computer? Thanks Carolyn Johnson St Louis, MO -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/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. -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From dkalsow at yahoo.com Wed Oct 21 20:37:46 2009 From: dkalsow at yahoo.com (Dale Kalsow) Date: Wed, 21 Oct 2009 18:37:46 -0700 (PDT) Subject: [AccessD] Form that has focus In-Reply-To: Message-ID: <810707.34556.qm@web50402.mail.re2.yahoo.com> That works! ? Thanks so much. ? Dale --- On Wed, 10/21/09, Heenan, Lambert wrote: From: Heenan, Lambert Subject: Re: [AccessD] Form that has focus To: "'Access Developers discussion and problem solving'" Date: Wednesday, October 21, 2009, 12:57 PM Well in pre-Access 2007 land it is... Screen.ActiveForm.Name Lambert -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Dale Kalsow Sent: Wednesday, October 21, 2009 1:26 PM To: Access Developers discussion and problem solving Subject: [AccessD] Form that has focus Does anyone know how to reference what form has focus?? I have created a ribbon and want to know what form has focus when on click on a button in the ribbon.? Since I am clicking on the ribbon me.name does not appear to work. ? Thanks! ? Dale ? ? ? -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd 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 Thu Oct 22 00:46:53 2009 From: adtp at airtelmail.in (A.D.Tejpal) Date: Thu, 22 Oct 2009 11:16:53 +0530 Subject: [AccessD] Need Query Help References: <0B2BF8524B73A248A2F1B81BA751ED3C190D5431F9@houex1.kindermorgan.com> Message-ID: <009001ca52db$31107cc0$1a85a37a@personald6374f> Chester, Apparently, the criteria could be rephrased as follows: (a) Include all records where SDate < #1/1/2005# and SDate_2 is Null or < #1/1/2005#, irrespective of the value held by Chase_Start_Date. (b) Also include records where SDate < #1/1/2005# and Chase_Start_Date is Null or >= #1/1/2005# You might like to try out the sample query given below over a larger data set and verify whether the results are in line with those sought by you. Best wishes, A.D. Tejpal ------------ Sample Query =============================== SELECT Constants.* FROM Constants WHERE (SDate < #1/1/2005# And Nz(SDate_2, #1/1/2005#) < #1/1/2005#) Or (SDate < #1/1/2005# And Nz(Chase_Start_Date, #1/1/2005#) >= #1/1/2005#); =============================== ----- Original Message ----- From: Kaup, Chester To: Access Developers discussion and problem solving Sent: Wednesday, October 21, 2009 19:23 Subject: Re: [AccessD] Need Query Help What if Chase_Start_Date < 1/1/2005 and SDate_2 is < 1/1/2005? Count the record if Sdate <1/1/2005 Examples Good Records PID SDate Chase_Start_Date SDate_2 PAT 77-2 01-Feb-03 PAT 117-1 01-May-98 01-Oct-02 01-Feb-04 Bad Record PAT 118-5 01-Jan-96 01-Oct-02 PAT 173-3 01-Oct-99 01-Apr-04 01-Mar-08 -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: Wednesday, October 21, 2009 8:27 AM To: accessd at databaseadvisors.com Subject: Re: [AccessD] Need Query Help Hi Chester 2. Don't include record with SDate <1/1/2005 if Chase_Start_Date < 1/1/2005 3. Do include record if SDate <1/1/2005 and SDate_2 is < 1/1/2005 are contradicting. What if Chase_Start_Date < 1/1/2005 and SDate_2 is < 1/1/2005? /gustav >>> Chester_Kaup at kindermorgan.com 21-10-2009 15:04 >>> I have a table with 4 fields PID, SDate, Chase_Start_Date and SDate_2. I need to extract records based on the following criteria. 1. Sdate < 1/1/2005 2. Don't include record with SDate <1/1/2005 if Chase_Start_Date < 1/1/2005 3. Do include record if SDate <1/1/2005 and SDate_2 is < 1/1/2005 The Chase_Start_Date and SDate_2 fields may be blank or just the Sdate_2 field if the Chase_Start_Date field has data. I have been working on this for a while and thought I had it with the following SQL statement but no. Time for another set of eyes to look at it. SELECT SDate, Chase_Start_Date, SDate_2 FROM Constants WHERE (((SDate)<#1/1/2005#) AND ((Chase_Start_Date) Is Null)) OR (((SDate)<#1/1/2005#) AND ((SDate_2)<#1/1/2005#)); Thanks. Chester Kaup Engineering Technician Kinder Morgan CO2 Company, LLP Office (432) 688-3797 FAX (432) 688-3799 From max.wanadoo at gmail.com Thu Oct 22 02:00:42 2009 From: max.wanadoo at gmail.com (Max Wanadoo) Date: Thu, 22 Oct 2009 08:00:42 +0100 Subject: [AccessD] All-In-One Date format Function: In-Reply-To: <001201ca52a0$7130f7c0$5392e740$@spb.ru> References: <8786a4c00910201129m1ddf24a1s90e74cc0961beda9@mail.gmail.com> <924849.98536.qm@web50401.mail.re2.yahoo.com> <000601ca527a$b6984280$23c8c780$@com> <001201ca52a0$7130f7c0$5392e740$@spb.ru> Message-ID: <4ae00326.16125e0a.7f19.ffff88a2@mx.google.com> What about? 1. 9 - month 9 same year 2. 99 - month 9 year 2009. 3. 999 - day 9, month 9, year 2009 Have you put these through the code and see what they come out with? Max -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Shamil Salakhetdinov Sent: 21 October 2009 23:47 To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] All-In-One Date format Function: Hi Robert, Just a quick & dirty code snippet - it's C# but simulates VBA as close as possible: using System; using VBA = Microsoft.VisualBasic.Strings; namespace TestConsole.App { public class DateConvertor { public static DateTime Convert(string dateStr) { string temp = dateStr; string monthStr; string dayStr; string yearStr; DateTime retValue = DateTime.MinValue; if (VBA.Left(temp, 1) == "1" || VBA.Left(temp, 1) == "0") { // two digits monthNum monthStr = VBA.Left(temp, 2); temp = VBA.Mid(temp, 3); } else { // one digits monthNum monthStr = VBA.Left(temp, 1); temp = VBA.Mid(temp, 2); } if (VBA.Len(temp) < 2) throw new ApplicationException("Invalid date format: " + dateStr); else if (VBA.Len(temp) == 2) { temp = "00" + temp; } else if ( (VBA.Left(temp, 1) == "/") || (VBA.Left(temp, 1) == "-") ) { temp = VBA.Mid(temp, 2); } dayStr = VBA.Left(temp, 2); temp = VBA.Mid(temp, 3); if ( (VBA.Left(temp, 1) == "/") || (VBA.Left(temp, 1) == "-") ) temp = VBA.Mid(temp, 2); if (VBA.Len(temp) == 1) temp = "200" + temp; else if (VBA.Len(temp) == 2) temp = "20" + temp; yearStr = temp; retValue = (dayStr != "00") ? Microsoft.VisualBasic.DateAndTime.DateSerial( Int32.Parse(yearStr), Int32.Parse(monthStr), Int32.Parse(dayStr)) : Microsoft.VisualBasic.DateAndTime.DateSerial( Int32.Parse(yearStr), Int32.Parse(monthStr) + 1, 0); return retValue; } public static string[] TestDates { get { return new string[] { "909", "0909", "09/21/09", "09-21-09", "092109", "92109", "9212009" }; } } public static void Test() { Console.WriteLine("// Test Output:"); Console.WriteLine("// ------------"); foreach (string date in TestDates) { Console.WriteLine("// {0} => {1:MM/dd/yyyy}", date, Convert(date)); } // Test Output: // ------------ // 909 => 09/30/2009 // 0909 => 09/30/2009 // 09/21/09 => 09/21/2009 // 09-21-09 => 09/21/2009 // 092109 => 09/21/2009 // 92109 => 09/21/2009 // 9212009 => 09/21/2009 } } } HTH. -- Shamil -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Robert Sent: Wednesday, October 21, 2009 10:17 PM To: 'Access Developers discussion and problem solving' Subject: [AccessD] All-In-One Date format Function: Hoooooowdy, Before re-inventing the wheel here, does anyone have or know of a function that can handle "free form" date formatting. I'm looking for a function that can parse any input and then format is correctly. Example of user inputs: 0909 09/21/09 09-21-09 092109 92109 9212009 etc. I don't want to use any formatting / Masking settings at the field or table level. I would like the user to enter it the way they want to (to the most degree possible)... WBR Robert <<< snip >>> -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From shamil at smsconsulting.spb.ru Thu Oct 22 04:58:26 2009 From: shamil at smsconsulting.spb.ru (Shamil Salakhetdinov) Date: Thu, 22 Oct 2009 13:58:26 +0400 Subject: [AccessD] All-In-One Date format Function: In-Reply-To: <4ae00326.16125e0a.7f19.ffff88a2@mx.google.com> References: <8786a4c00910201129m1ddf24a1s90e74cc0961beda9@mail.gmail.com> <924849.98536.qm@web50401.mail.re2.yahoo.com> <000601ca527a$b6984280$23c8c780$@com> <001201ca52a0$7130f7c0$5392e740$@spb.ru> <4ae00326.16125e0a.7f19.ffff88a2@mx.google.com> Message-ID: <001001ca52fe$347da220$9d78e660$@spb.ru> Hi Max, No, I didn't. Did I note that was a "quick & dirty" code snippet, didn't I? (Somebody might even find it too "dirty"...) Please feel free to make fixes to cover your test cases as well as null or empty or excessively long input string as well as ... Your turn. Thank you. -- Shamil -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Max Wanadoo Sent: Thursday, October 22, 2009 11:01 AM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] All-In-One Date format Function: What about? 1. 9 - month 9 same year 2. 99 - month 9 year 2009. 3. 999 - day 9, month 9, year 2009 Have you put these through the code and see what they come out with? Max -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Shamil Salakhetdinov Sent: 21 October 2009 23:47 To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] All-In-One Date format Function: Hi Robert, Just a quick & dirty code snippet - it's C# but simulates VBA as close as possible: using System; using VBA = Microsoft.VisualBasic.Strings; namespace TestConsole.App { public class DateConvertor { public static DateTime Convert(string dateStr) { string temp = dateStr; string monthStr; string dayStr; string yearStr; DateTime retValue = DateTime.MinValue; if (VBA.Left(temp, 1) == "1" || VBA.Left(temp, 1) == "0") { // two digits monthNum monthStr = VBA.Left(temp, 2); temp = VBA.Mid(temp, 3); } else { // one digits monthNum monthStr = VBA.Left(temp, 1); temp = VBA.Mid(temp, 2); } if (VBA.Len(temp) < 2) throw new ApplicationException("Invalid date format: " + dateStr); else if (VBA.Len(temp) == 2) { temp = "00" + temp; } else if ( (VBA.Left(temp, 1) == "/") || (VBA.Left(temp, 1) == "-") ) { temp = VBA.Mid(temp, 2); } dayStr = VBA.Left(temp, 2); temp = VBA.Mid(temp, 3); if ( (VBA.Left(temp, 1) == "/") || (VBA.Left(temp, 1) == "-") ) temp = VBA.Mid(temp, 2); if (VBA.Len(temp) == 1) temp = "200" + temp; else if (VBA.Len(temp) == 2) temp = "20" + temp; yearStr = temp; retValue = (dayStr != "00") ? Microsoft.VisualBasic.DateAndTime.DateSerial( Int32.Parse(yearStr), Int32.Parse(monthStr), Int32.Parse(dayStr)) : Microsoft.VisualBasic.DateAndTime.DateSerial( Int32.Parse(yearStr), Int32.Parse(monthStr) + 1, 0); return retValue; } public static string[] TestDates { get { return new string[] { "909", "0909", "09/21/09", "09-21-09", "092109", "92109", "9212009" }; } } public static void Test() { Console.WriteLine("// Test Output:"); Console.WriteLine("// ------------"); foreach (string date in TestDates) { Console.WriteLine("// {0} => {1:MM/dd/yyyy}", date, Convert(date)); } // Test Output: // ------------ // 909 => 09/30/2009 // 0909 => 09/30/2009 // 09/21/09 => 09/21/2009 // 09-21-09 => 09/21/2009 // 092109 => 09/21/2009 // 92109 => 09/21/2009 // 9212009 => 09/21/2009 } } } HTH. -- Shamil -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Robert Sent: Wednesday, October 21, 2009 10:17 PM To: 'Access Developers discussion and problem solving' Subject: [AccessD] All-In-One Date format Function: Hoooooowdy, Before re-inventing the wheel here, does anyone have or know of a function that can handle "free form" date formatting. I'm looking for a function that can parse any input and then format is correctly. Example of user inputs: 0909 09/21/09 09-21-09 092109 92109 9212009 etc. I don't want to use any formatting / Masking settings at the field or table level. I would like the user to enter it the way they want to (to the most degree possible)... WBR Robert <<< snip >>> From Chester_Kaup at kindermorgan.com Thu Oct 22 07:37:39 2009 From: Chester_Kaup at kindermorgan.com (Kaup, Chester) Date: Thu, 22 Oct 2009 07:37:39 -0500 Subject: [AccessD] Need Query Help In-Reply-To: <009001ca52db$31107cc0$1a85a37a@personald6374f> References: <0B2BF8524B73A248A2F1B81BA751ED3C190D5431F9@houex1.kindermorgan.com> <009001ca52db$31107cc0$1a85a37a@personald6374f> Message-ID: <0B2BF8524B73A248A2F1B81BA751ED3C190D5433A7@houex1.kindermorgan.com> I don't believe statement a) will work correctly because it would include the following record that should not be counted if I understand your logic correctly PID SDate Chase_Start_Date SDate_2 PAT 118-5 01-Jan-96 01-Oct-02 Basically SDate is the start date, Chase_Start_Date is the turned off date and SDate_2 is the restart date. What am trying to get to is a list of the PID's that are active as of 12/31/2004. Thanks for your assistance. -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of A.D.Tejpal Sent: Thursday, October 22, 2009 12:47 AM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Need Query Help Chester, Apparently, the criteria could be rephrased as follows: (a) Include all records where SDate < #1/1/2005# and SDate_2 is Null or < #1/1/2005#, irrespective of the value held by Chase_Start_Date. (b) Also include records where SDate < #1/1/2005# and Chase_Start_Date is Null or >= #1/1/2005# You might like to try out the sample query given below over a larger data set and verify whether the results are in line with those sought by you. Best wishes, A.D. Tejpal ------------ Sample Query =============================== SELECT Constants.* FROM Constants WHERE (SDate < #1/1/2005# And Nz(SDate_2, #1/1/2005#) < #1/1/2005#) Or (SDate < #1/1/2005# And Nz(Chase_Start_Date, #1/1/2005#) >= #1/1/2005#); =============================== ----- Original Message ----- From: Kaup, Chester To: Access Developers discussion and problem solving Sent: Wednesday, October 21, 2009 19:23 Subject: Re: [AccessD] Need Query Help What if Chase_Start_Date < 1/1/2005 and SDate_2 is < 1/1/2005? Count the record if Sdate <1/1/2005 Examples Good Records PID SDate Chase_Start_Date SDate_2 PAT 77-2 01-Feb-03 PAT 117-1 01-May-98 01-Oct-02 01-Feb-04 Bad Record PAT 118-5 01-Jan-96 01-Oct-02 PAT 173-3 01-Oct-99 01-Apr-04 01-Mar-08 -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: Wednesday, October 21, 2009 8:27 AM To: accessd at databaseadvisors.com Subject: Re: [AccessD] Need Query Help Hi Chester 2. Don't include record with SDate <1/1/2005 if Chase_Start_Date < 1/1/2005 3. Do include record if SDate <1/1/2005 and SDate_2 is < 1/1/2005 are contradicting. What if Chase_Start_Date < 1/1/2005 and SDate_2 is < 1/1/2005? /gustav >>> Chester_Kaup at kindermorgan.com 21-10-2009 15:04 >>> I have a table with 4 fields PID, SDate, Chase_Start_Date and SDate_2. I need to extract records based on the following criteria. 1. Sdate < 1/1/2005 2. Don't include record with SDate <1/1/2005 if Chase_Start_Date < 1/1/2005 3. Do include record if SDate <1/1/2005 and SDate_2 is < 1/1/2005 The Chase_Start_Date and SDate_2 fields may be blank or just the Sdate_2 field if the Chase_Start_Date field has data. I have been working on this for a while and thought I had it with the following SQL statement but no. Time for another set of eyes to look at it. SELECT SDate, Chase_Start_Date, SDate_2 FROM Constants WHERE (((SDate)<#1/1/2005#) AND ((Chase_Start_Date) Is Null)) OR (((SDate)<#1/1/2005#) AND ((SDate_2)<#1/1/2005#)); Thanks. Chester Kaup Engineering Technician Kinder Morgan CO2 Company, LLP Office (432) 688-3797 FAX (432) 688-3799 -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From robert at servicexp.com Thu Oct 22 07:46:22 2009 From: robert at servicexp.com (Robert) Date: Thu, 22 Oct 2009 08:46:22 -0400 Subject: [AccessD] All-In-One Date format Function: In-Reply-To: <001001ca52fe$347da220$9d78e660$@spb.ru> References: <8786a4c00910201129m1ddf24a1s90e74cc0961beda9@mail.gmail.com> <924849.98536.qm@web50401.mail.re2.yahoo.com> <000601ca527a$b6984280$23c8c780$@com> <001201ca52a0$7130f7c0$5392e740$@spb.ru> <4ae00326.16125e0a.7f19.ffff88a2@mx.google.com> <001001ca52fe$347da220$9d78e660$@spb.ru> Message-ID: <001201ca5315$a9b54bd0$fd1fe370$@com> Shamil, Thank you very much for your "dirty code", yours "Looks" much cleaner then my first run at it.. I will work with it.. This is what I came up with.. First Rev. still need to clean it up.... Public Function FormatCCDate(dCCDate As String) As String Dim dLastDay As Date Dim dDate As String Dim sFirstPart As String Dim sSecondPart As String Dim sThirdPart As String Dim dFinalDate As Date Dim lStr As Long On Error GoTo HandleErr If Nz(dCCDate, "") <> "" Then dDate = dCCDate 'Strips everything but the numbers dDate = varNumericPart(dDate) Select Case Len(dDate) Case 3 '909 entries would format to 09 31 09 31 would automaticly be entered sFirstPart = 0 & Left(dDate, 1) sThirdPart = Right(dDate, 2) sSecondPart = Mid(DateSerial(Year(CDate(sFirstPart & 1 & sThirdPart)), Month(dDate) + 1, 0), 3, 2) dFinalDate = Format(sFirstPart & "/" & sSecondPart & "/" & sThirdPart, "Short Date") Case 4 '0909 entries would format to 09 31 09 31 would automaticly be entered sFirstPart = Left(dDate, 2) sThirdPart = Right(dDate, 2) sSecondPart = Mid(DateSerial(Year(CDate(sFirstPart & 1 & sThirdPart)), Month(dDate) + 1, 0), 3, 2) dFinalDate = Format(sFirstPart & "/" & sSecondPart & "/" & sThirdPart, "Short Date") Case 5 '92109 entries would format to 09 21 09 sFirstPart = 0 & Left(dDate, 1) sThirdPart = Right(dDate, 2) sSecondPart = Mid(dDate, 2, 2) dFinalDate = Format(sFirstPart & "/" & sSecondPart & "/" & sThirdPart, "Short Date") Case 6 '092109 entries would format to 09 21 09 sFirstPart = Left(dDate, 2) sThirdPart = Right(dDate, 2) sSecondPart = Mid(dDate, 3, 2) dFinalDate = Format(sFirstPart & "/" & sSecondPart & "/" & sThirdPart, "Short Date") Case 7 '9212009 entries would format to 09 21 2009 sFirstPart = 0 & Left(dDate, 1) sThirdPart = Right(dDate, 4) sSecondPart = Mid(dDate, 2, 2) dFinalDate = Format(sFirstPart & "/" & sSecondPart & "/" & sThirdPart, "Short Date") Case 8 '09212009 entries would format to 09 21 2009 sFirstPart = Left(dDate, 2) sThirdPart = Right(dDate, 4) sSecondPart = Mid(dDate, 3, 2) dFinalDate = Format(sFirstPart & "/" & sSecondPart & "/" & sThirdPart, "Short Date") Case Else dFinalDate = Empty End Select If dFinalDate = "12:00:00 AM" Then MsgBox " Sorry, Could not determine date formatting. Please enter a valid date ", , "Problem Box" Else FormatCCDate = dFinalDate End If End If ExitHere: On Error Resume Next Exit Function HandleErr: Select Case Err.Number Case Else 'MsgBox Err.BuildError("basServiceOrder:FormatCCDate"), vbCritical, "Un-Expected Error" MsgBox "There has been an error in Procedure: basServiceOrder:FormatCCDate " & vbCrLf & _ "Error Number: " & Err.Number & vbCrLf & "Error Description: " & Err.Description & " On Line: " & Erl() & vbCrLf & _ " Please Contact " & "The SoftwareVendor" & " for more help regarding this error. ", vbCritical, "Un-Expected Error" Call ErrorRecordSystem(Err.Number, Err.Description & " On Line: " & Erl(), Now, "Un-Expected Error In Proc; " & "basServiceOrder:FormatCCDate", CurrentUser, Err) Resume ExitHere End Select End Function -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Shamil Salakhetdinov Sent: Thursday, October 22, 2009 5:58 AM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] All-In-One Date format Function: Hi Max, No, I didn't. Did I note that was a "quick & dirty" code snippet, didn't I? (Somebody might even find it too "dirty"...) Please feel free to make fixes to cover your test cases as well as null or empty or excessively long input string as well as ... Your turn. Thank you. -- Shamil -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Max Wanadoo Sent: Thursday, October 22, 2009 11:01 AM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] All-In-One Date format Function: What about? 1. 9 - month 9 same year 2. 99 - month 9 year 2009. 3. 999 - day 9, month 9, year 2009 Have you put these through the code and see what they come out with? Max -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Shamil Salakhetdinov Sent: 21 October 2009 23:47 To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] All-In-One Date format Function: Hi Robert, Just a quick & dirty code snippet - it's C# but simulates VBA as close as possible: using System; using VBA = Microsoft.VisualBasic.Strings; namespace TestConsole.App { public class DateConvertor { public static DateTime Convert(string dateStr) { string temp = dateStr; string monthStr; string dayStr; string yearStr; DateTime retValue = DateTime.MinValue; if (VBA.Left(temp, 1) == "1" || VBA.Left(temp, 1) == "0") { // two digits monthNum monthStr = VBA.Left(temp, 2); temp = VBA.Mid(temp, 3); } else { // one digits monthNum monthStr = VBA.Left(temp, 1); temp = VBA.Mid(temp, 2); } if (VBA.Len(temp) < 2) throw new ApplicationException("Invalid date format: " + dateStr); else if (VBA.Len(temp) == 2) { temp = "00" + temp; } else if ( (VBA.Left(temp, 1) == "/") || (VBA.Left(temp, 1) == "-") ) { temp = VBA.Mid(temp, 2); } dayStr = VBA.Left(temp, 2); temp = VBA.Mid(temp, 3); if ( (VBA.Left(temp, 1) == "/") || (VBA.Left(temp, 1) == "-") ) temp = VBA.Mid(temp, 2); if (VBA.Len(temp) == 1) temp = "200" + temp; else if (VBA.Len(temp) == 2) temp = "20" + temp; yearStr = temp; retValue = (dayStr != "00") ? Microsoft.VisualBasic.DateAndTime.DateSerial( Int32.Parse(yearStr), Int32.Parse(monthStr), Int32.Parse(dayStr)) : Microsoft.VisualBasic.DateAndTime.DateSerial( Int32.Parse(yearStr), Int32.Parse(monthStr) + 1, 0); return retValue; } public static string[] TestDates { get { return new string[] { "909", "0909", "09/21/09", "09-21-09", "092109", "92109", "9212009" }; } } public static void Test() { Console.WriteLine("// Test Output:"); Console.WriteLine("// ------------"); foreach (string date in TestDates) { Console.WriteLine("// {0} => {1:MM/dd/yyyy}", date, Convert(date)); } // Test Output: // ------------ // 909 => 09/30/2009 // 0909 => 09/30/2009 // 09/21/09 => 09/21/2009 // 09-21-09 => 09/21/2009 // 092109 => 09/21/2009 // 92109 => 09/21/2009 // 9212009 => 09/21/2009 } } } HTH. -- Shamil -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Robert Sent: Wednesday, October 21, 2009 10:17 PM To: 'Access Developers discussion and problem solving' Subject: [AccessD] All-In-One Date format Function: Hoooooowdy, Before re-inventing the wheel here, does anyone have or know of a function that can handle "free form" date formatting. I'm looking for a function that can parse any input and then format is correctly. Example of user inputs: 0909 09/21/09 09-21-09 092109 92109 9212009 etc. I don't want to use any formatting / Masking settings at the field or table level. I would like the user to enter it the way they want to (to the most degree possible)... WBR Robert <<< snip >>> -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From Chester_Kaup at kindermorgan.com Thu Oct 22 08:03:05 2009 From: Chester_Kaup at kindermorgan.com (Kaup, Chester) Date: Thu, 22 Oct 2009 08:03:05 -0500 Subject: [AccessD] Need Query Help In-Reply-To: <421FF6A86C1D444388FD2B8D4E9626CD@AMDXP> References: <0B2BF8524B73A248A2F1B81BA751ED3C190D5431F9@houex1.kindermorgan.com> <421FF6A86C1D444388FD2B8D4E9626CD@AMDXP> Message-ID: <0B2BF8524B73A248A2F1B81BA751ED3C190D5433B0@houex1.kindermorgan.com> This works good on the sample data however I forgot to include examples of a couple of other record types that are considered bad. PID SDate Chase_Start_Date SDate_2 PAT 104-1 PAT 26-6 4/1/2009 Thanks. -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Jack and Pat Sent: Wednesday, October 21, 2009 9:21 AM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Need Query Help Chester, I think this works: SELECT Constants.SDate, Constants.Chase_Start_Date, Constants.SDate_2 FROM Constants WHERE [SDate]<#1/1/2005# AND [SDate_2]<#1/1/2005# AND [Chase_Start_date]<#1/1/2005# OR ( [Chase_Start_Date] Is Null AND [SDate_2] Is Null); Works on the test records . Jack -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Kaup, Chester Sent: Wednesday, October 21, 2009 9:54 AM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Need Query Help What if Chase_Start_Date < 1/1/2005 and SDate_2 is < 1/1/2005? Count the record if Sdate <1/1/2005 Examples Good Records PID SDate Chase_Start_Date SDate_2 PAT 77-2 01-Feb-03 PAT 117-1 01-May-98 01-Oct-02 01-Feb-04 Bad Record PAT 118-5 01-Jan-96 01-Oct-02 PAT 173-3 01-Oct-99 01-Apr-04 01-Mar-08 -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: Wednesday, October 21, 2009 8:27 AM To: accessd at databaseadvisors.com Subject: Re: [AccessD] Need Query Help Hi Chester 2. Don't include record with SDate <1/1/2005 if Chase_Start_Date < 1/1/2005 3. Do include record if SDate <1/1/2005 and SDate_2 is < 1/1/2005 are contradicting. What if Chase_Start_Date < 1/1/2005 and SDate_2 is < 1/1/2005? /gustav >>> Chester_Kaup at kindermorgan.com 21-10-2009 15:04 >>> I have a table with 4 fields PID, SDate, Chase_Start_Date and SDate_2. I need to extract records based on the following criteria. 1. Sdate < 1/1/2005 2. Don't include record with SDate <1/1/2005 if Chase_Start_Date < 1/1/2005 3. Do include record if SDate <1/1/2005 and SDate_2 is < 1/1/2005 The Chase_Start_Date and SDate_2 fields may be blank or just the Sdate_2 field if the Chase_Start_Date field has data. I have been working on this for a while and thought I had it with the following SQL statement but no. Time for another set of eyes to look at it. SELECT SDate, Chase_Start_Date, SDate_2 FROM Constants WHERE (((SDate)<#1/1/2005#) AND ((Chase_Start_Date) Is Null)) OR (((SDate)<#1/1/2005#) AND ((SDate_2)<#1/1/2005#)); Thanks. Chester Kaup Engineering Technician Kinder Morgan CO2 Company, LLP Office (432) 688-3797 FAX (432) 688-3799 -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/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 dkalsow at yahoo.com Thu Oct 22 09:58:45 2009 From: dkalsow at yahoo.com (Dale Kalsow) Date: Thu, 22 Oct 2009 07:58:45 -0700 (PDT) Subject: [AccessD] Form that has focus In-Reply-To: Message-ID: <480037.29589.qm@web50412.mail.re2.yahoo.com> So Is there a way to do the same thing with an report? --- On Wed, 10/21/09, Heenan, Lambert wrote: From: Heenan, Lambert Subject: Re: [AccessD] Form that has focus To: "'Access Developers discussion and problem solving'" Date: Wednesday, October 21, 2009, 12:57 PM Well in pre-Access 2007 land it is... Screen.ActiveForm.Name Lambert -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Dale Kalsow Sent: Wednesday, October 21, 2009 1:26 PM To: Access Developers discussion and problem solving Subject: [AccessD] Form that has focus Does anyone know how to reference what form has focus?? I have created a ribbon and want to know what form has focus when on click on a button in the ribbon.? Since I am clicking on the ribbon me.name does not appear to work. ? Thanks! ? Dale ? ? ? -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From Lambert.Heenan at chartisinsurance.com Thu Oct 22 10:32:19 2009 From: Lambert.Heenan at chartisinsurance.com (Heenan, Lambert) Date: Thu, 22 Oct 2009 11:32:19 -0400 Subject: [AccessD] Form that has focus In-Reply-To: <480037.29589.qm@web50412.mail.re2.yahoo.com> References: <480037.29589.qm@web50412.mail.re2.yahoo.com> Message-ID: A quick delve into the immediate window reveals that there is indeed an 'ActiveReport' method for the Screen object. The way you can do this is go to the immediate window, type screen. (got to include the period) and then hit Control+Space: you will see all the methods/members of the Screen object. Lambert -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Dale Kalsow Sent: Thursday, October 22, 2009 10:59 AM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Form that has focus So Is there a way to do the same thing with an report? --- On Wed, 10/21/09, Heenan, Lambert wrote: From: Heenan, Lambert Subject: Re: [AccessD] Form that has focus To: "'Access Developers discussion and problem solving'" Date: Wednesday, October 21, 2009, 12:57 PM Well in pre-Access 2007 land it is... Screen.ActiveForm.Name Lambert -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Dale Kalsow Sent: Wednesday, October 21, 2009 1:26 PM To: Access Developers discussion and problem solving Subject: [AccessD] Form that has focus Does anyone know how to reference what form has focus?? I have created a ribbon and want to know what form has focus when on click on a button in the ribbon.? Since I am clicking on the ribbon me.name does not appear to work. ? Thanks! ? Dale ? ? ? -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/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 shamil at smsconsulting.spb.ru Thu Oct 22 11:12:46 2009 From: shamil at smsconsulting.spb.ru (Shamil Salakhetdinov) Date: Thu, 22 Oct 2009 20:12:46 +0400 Subject: [AccessD] All-In-One Date format Function: In-Reply-To: <001201ca5315$a9b54bd0$fd1fe370$@com> References: <8786a4c00910201129m1ddf24a1s90e74cc0961beda9@mail.gmail.com> <924849.98536.qm@web50401.mail.re2.yahoo.com> <000601ca527a$b6984280$23c8c780$@com> <001201ca52a0$7130f7c0$5392e740$@spb.ru> <4ae00326.16125e0a.7f19.ffff88a2@mx.google.com> <001001ca52fe$347da220$9d78e660$@spb.ru> <001201ca5315$a9b54bd0$fd1fe370$@com> Message-ID: <000001ca5332$7f6cfe00$7e46fa00$@spb.ru> Hi Robert -- I'd suppose that removing delimiters could produce incorrect output, e.g. 1-12-9 without delimiters would be 1129 - is the latter: a) January 12, 2009 or b) November 2, 2009 or c) November 29, 2009 ? -- Shamil -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Robert Sent: Thursday, October 22, 2009 4:46 PM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] All-In-One Date format Function: Shamil, Thank you very much for your "dirty code", yours "Looks" much cleaner then my first run at it.. I will work with it.. This is what I came up with.. First Rev. still need to clean it up.... Public Function FormatCCDate(dCCDate As String) As String Dim dLastDay As Date Dim dDate As String Dim sFirstPart As String Dim sSecondPart As String Dim sThirdPart As String Dim dFinalDate As Date Dim lStr As Long On Error GoTo HandleErr If Nz(dCCDate, "") <> "" Then dDate = dCCDate 'Strips everything but the numbers dDate = varNumericPart(dDate) Select Case Len(dDate) Case 3 '909 entries would format to 09 31 09 31 would automaticly be entered sFirstPart = 0 & Left(dDate, 1) sThirdPart = Right(dDate, 2) sSecondPart = Mid(DateSerial(Year(CDate(sFirstPart & 1 & sThirdPart)), Month(dDate) + 1, 0), 3, 2) dFinalDate = Format(sFirstPart & "/" & sSecondPart & "/" & sThirdPart, "Short Date") Case 4 '0909 entries would format to 09 31 09 31 would automaticly be entered sFirstPart = Left(dDate, 2) sThirdPart = Right(dDate, 2) sSecondPart = Mid(DateSerial(Year(CDate(sFirstPart & 1 & sThirdPart)), Month(dDate) + 1, 0), 3, 2) dFinalDate = Format(sFirstPart & "/" & sSecondPart & "/" & sThirdPart, "Short Date") Case 5 '92109 entries would format to 09 21 09 sFirstPart = 0 & Left(dDate, 1) sThirdPart = Right(dDate, 2) sSecondPart = Mid(dDate, 2, 2) dFinalDate = Format(sFirstPart & "/" & sSecondPart & "/" & sThirdPart, "Short Date") Case 6 '092109 entries would format to 09 21 09 sFirstPart = Left(dDate, 2) sThirdPart = Right(dDate, 2) sSecondPart = Mid(dDate, 3, 2) dFinalDate = Format(sFirstPart & "/" & sSecondPart & "/" & sThirdPart, "Short Date") Case 7 '9212009 entries would format to 09 21 2009 sFirstPart = 0 & Left(dDate, 1) sThirdPart = Right(dDate, 4) sSecondPart = Mid(dDate, 2, 2) dFinalDate = Format(sFirstPart & "/" & sSecondPart & "/" & sThirdPart, "Short Date") Case 8 '09212009 entries would format to 09 21 2009 sFirstPart = Left(dDate, 2) sThirdPart = Right(dDate, 4) sSecondPart = Mid(dDate, 3, 2) dFinalDate = Format(sFirstPart & "/" & sSecondPart & "/" & sThirdPart, "Short Date") Case Else dFinalDate = Empty End Select If dFinalDate = "12:00:00 AM" Then MsgBox " Sorry, Could not determine date formatting. Please enter a valid date ", , "Problem Box" Else FormatCCDate = dFinalDate End If End If ExitHere: On Error Resume Next Exit Function HandleErr: Select Case Err.Number Case Else 'MsgBox Err.BuildError("basServiceOrder:FormatCCDate"), vbCritical, "Un-Expected Error" MsgBox "There has been an error in Procedure: basServiceOrder:FormatCCDate " & vbCrLf & _ "Error Number: " & Err.Number & vbCrLf & "Error Description: " & Err.Description & " On Line: " & Erl() & vbCrLf & _ " Please Contact " & "The SoftwareVendor" & " for more help regarding this error. ", vbCritical, "Un-Expected Error" Call ErrorRecordSystem(Err.Number, Err.Description & " On Line: " & Erl(), Now, "Un-Expected Error In Proc; " & "basServiceOrder:FormatCCDate", CurrentUser, Err) Resume ExitHere End Select End Function <<< snip >>> __________ Information from ESET NOD32 Antivirus, version of virus signature database 4533 (20091022) __________ The message was checked by ESET NOD32 Antivirus. http://www.esetnod32.ru From dkalsow at yahoo.com Thu Oct 22 11:31:55 2009 From: dkalsow at yahoo.com (Dale Kalsow) Date: Thu, 22 Oct 2009 09:31:55 -0700 (PDT) Subject: [AccessD] Form that has focus In-Reply-To: Message-ID: <215686.63104.qm@web50404.mail.re2.yahoo.com> Thanks again! --- On Thu, 10/22/09, Heenan, Lambert wrote: From: Heenan, Lambert Subject: Re: [AccessD] Form that has focus To: "'Access Developers discussion and problem solving'" Date: Thursday, October 22, 2009, 10:32 AM A quick delve into the immediate window reveals that there is indeed an 'ActiveReport' method for the Screen object. The way you can do this is go to the immediate window, type screen.? (got to include the period) and then hit Control+Space: you will see all the methods/members of the Screen object. Lambert -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Dale Kalsow Sent: Thursday, October 22, 2009 10:59 AM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Form that has focus So Is there a way to do the same thing with an report? --- On Wed, 10/21/09, Heenan, Lambert wrote: From: Heenan, Lambert Subject: Re: [AccessD] Form that has focus To: "'Access Developers discussion and problem solving'" Date: Wednesday, October 21, 2009, 12:57 PM Well in pre-Access 2007 land it is... Screen.ActiveForm.Name Lambert -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Dale Kalsow Sent: Wednesday, October 21, 2009 1:26 PM To: Access Developers discussion and problem solving Subject: [AccessD] Form that has focus Does anyone know how to reference what form has focus?? I have created a ribbon and want to know what form has focus when on click on a button in the ribbon.? Since I am clicking on the ribbon me.name does not appear to work. ? Thanks! ? Dale ? ? ? -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/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 adtp at airtelmail.in Thu Oct 22 14:07:38 2009 From: adtp at airtelmail.in (A.D.Tejpal) Date: Fri, 23 Oct 2009 00:37:38 +0530 Subject: [AccessD] Need Query Help References: <0B2BF8524B73A248A2F1B81BA751ED3C190D5431F9@houex1.kindermorgan.com><009001ca52db$31107cc0$1a85a37a@personald6374f> <0B2BF8524B73A248A2F1B81BA751ED3C190D5433A7@houex1.kindermorgan.com> Message-ID: <006b01ca534b$38f03780$9c5fa27a@personald6374f> Chester, Considering further clarifications from your end, the sample query has been revised suitably as given below. You might like to actually try it out over diverse type of data and verify whether the results are in line with those sought by you. Best wishes, A.D. Tejpal ------------ Sample query ===================================== SELECT Constants.* FROM Constants WHERE SDate < #1/1/2005# And ((SDate_2 Is Null And Chase_Start_Date Is Null) Or (SDate_2 Is Null And Chase_Start_Date >= #1/1/2005#) Or (SDate_2 < #1/1/2005# And (Chase_Start_Date Is Null Or Chase_Start_Date < SDate_2 Or Chase_Start_Date >= #1/1/2005#))); ===================================== ----- Original Message ----- From: Kaup, Chester To: Access Developers discussion and problem solving Sent: Thursday, October 22, 2009 18:07 Subject: Re: [AccessD] Need Query Help I don't believe statement a) will work correctly because it would include the following record that should not be counted if I understand your logic correctly PID SDate Chase_Start_Date SDate_2 PAT 118-5 01-Jan-96 01-Oct-02 Basically SDate is the start date, Chase_Start_Date is the turned off date and SDate_2 is the restart date. What am trying to get to is a list of the PID's that are active as of 12/31/2004. Thanks for your assistance. -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of A.D.Tejpal Sent: Thursday, October 22, 2009 12:47 AM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Need Query Help Chester, Apparently, the criteria could be rephrased as follows: (a) Include all records where SDate < #1/1/2005# and SDate_2 is Null or < #1/1/2005#, irrespective of the value held by Chase_Start_Date. (b) Also include records where SDate < #1/1/2005# and Chase_Start_Date is Null or >= #1/1/2005# You might like to try out the sample query given below over a larger data set and verify whether the results are in line with those sought by you. Best wishes, A.D. Tejpal ------------ Sample Query =============================== SELECT Constants.* FROM Constants WHERE (SDate < #1/1/2005# And Nz(SDate_2, #1/1/2005#) < #1/1/2005#) Or (SDate < #1/1/2005# And Nz(Chase_Start_Date, #1/1/2005#) >= #1/1/2005#); =============================== ----- Original Message ----- From: Kaup, Chester To: Access Developers discussion and problem solving Sent: Wednesday, October 21, 2009 19:23 Subject: Re: [AccessD] Need Query Help What if Chase_Start_Date < 1/1/2005 and SDate_2 is < 1/1/2005? Count the record if Sdate <1/1/2005 Examples Good Records PID SDate Chase_Start_Date SDate_2 PAT 77-2 01-Feb-03 PAT 117-1 01-May-98 01-Oct-02 01-Feb-04 Bad Record PAT 118-5 01-Jan-96 01-Oct-02 PAT 173-3 01-Oct-99 01-Apr-04 01-Mar-08 -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: Wednesday, October 21, 2009 8:27 AM To: accessd at databaseadvisors.com Subject: Re: [AccessD] Need Query Help Hi Chester 2. Don't include record with SDate <1/1/2005 if Chase_Start_Date < 1/1/2005 3. Do include record if SDate <1/1/2005 and SDate_2 is < 1/1/2005 are contradicting. What if Chase_Start_Date < 1/1/2005 and SDate_2 is < 1/1/2005? /gustav >>> Chester_Kaup at kindermorgan.com 21-10-2009 15:04 >>> I have a table with 4 fields PID, SDate, Chase_Start_Date and SDate_2. I need to extract records based on the following criteria. 1. Sdate < 1/1/2005 2. Don't include record with SDate <1/1/2005 if Chase_Start_Date < 1/1/2005 3. Do include record if SDate <1/1/2005 and SDate_2 is < 1/1/2005 The Chase_Start_Date and SDate_2 fields may be blank or just the Sdate_2 field if the Chase_Start_Date field has data. I have been working on this for a while and thought I had it with the following SQL statement but no. Time for another set of eyes to look at it. SELECT SDate, Chase_Start_Date, SDate_2 FROM Constants WHERE (((SDate)<#1/1/2005#) AND ((Chase_Start_Date) Is Null)) OR (((SDate)<#1/1/2005#) AND ((SDate_2)<#1/1/2005#)); Thanks. Chester Kaup From iggy at nanaimo.ark.com Fri Oct 23 06:49:43 2009 From: iggy at nanaimo.ark.com (Tony Septav) Date: Fri, 23 Oct 2009 04:49:43 -0700 Subject: [AccessD] Form Controls Message-ID: <4AE19857.4030909@nanaimo.ark.com> Hey All Is there a simply way to loop through the controls on a form based on their tab order? Thanks Tony From drawbridgej at sympatico.ca Fri Oct 23 08:02:19 2009 From: drawbridgej at sympatico.ca (Jack and Pat) Date: Fri, 23 Oct 2009 09:02:19 -0400 Subject: [AccessD] Form Controls In-Reply-To: <4AE19857.4030909@nanaimo.ark.com> References: <4AE19857.4030909@nanaimo.ark.com> Message-ID: <96DE5896A26D4085A3F9517CA9C88674@AMDXP> Tony, I found this from Allen Browne: 2/16/2006 4:10:25 PM Re: accessing controls by tab index You could loop through the form's Controls collection, identify those that have a TaxIndex (Labels don't, for instance), and load an array based on the TabIndex of each one: Function LoopControls(frm As Form) Dim ctl As Control Dim strControl() As String Dim i As Integer Dim iMax As Integer ReDim strControl(0 To frm.Controls.Count - 1) For Each ctl In frm.Controls If HasProperty(ctl, "TabIndex") Then i = ctl.TabIndex strControl(i) = ctl.Name If i > iMax Then iMax = i End If End If Next For i = 0 To iMax Debug.Print i, strControl(i) Next End Function Public Function HasProperty(obj As Object, strPropName As String) As Boolean 'Purpose: Return true if the object has the property. Dim varDummy As Variant On Error Resume Next varDummy = obj.Properties(strPropName) HasProperty = (Err.Number = 0) End Function Looping seems to be in tab order anyway. You might want to examine the TabStop property as well. -- Allen Browne - Microsoft MVP. Perth, Western Australia. Tips for Access users - http://allenbrowne.com/tips.html -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Tony Septav Sent: Friday, October 23, 2009 7:50 AM To: Access Developers discussion and problem solving Subject: [AccessD] Form Controls Hey All Is there a simply way to loop through the controls on a form based on their tab order? Thanks Tony -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From iggy at nanaimo.ark.com Fri Oct 23 10:24:01 2009 From: iggy at nanaimo.ark.com (Tony Septav) Date: Fri, 23 Oct 2009 08:24:01 -0700 Subject: [AccessD] Form Controls In-Reply-To: <96DE5896A26D4085A3F9517CA9C88674@AMDXP> References: <4AE19857.4030909@nanaimo.ark.com> <96DE5896A26D4085A3F9517CA9C88674@AMDXP> Message-ID: <4AE1CA91.9090107@nanaimo.ark.com> Hey Jack and Pat I thought the controls would follow the tab order when looping through, but not on the form I am working with. The code is not exactly what I was looking for but it gives me a good starting point to do some modifying. Thanks kindly for the help. Jack and Pat wrote: >Tony, > >I found this from Allen Browne: > >2/16/2006 4:10:25 PM Re: accessing controls by tab index > >You could loop through the form's Controls collection, identify those that > >have a TaxIndex (Labels don't, for instance), and load an array based on the > > >TabIndex of each one: > >Function LoopControls(frm As Form) > >Dim ctl As Control > >Dim strControl() As String > >Dim i As Integer > >Dim iMax As Integer > >ReDim strControl(0 To frm.Controls.Count - 1) > >For Each ctl In frm.Controls > >If HasProperty(ctl, "TabIndex") Then > >i = ctl.TabIndex > >strControl(i) = ctl.Name > >If i > iMax Then > >iMax = i > >End If > >End If > >Next > >For i = 0 To iMax > >Debug.Print i, strControl(i) > >Next > >End Function > >Public Function HasProperty(obj As Object, strPropName As String) As Boolean > > >'Purpose: Return true if the object has the property. > >Dim varDummy As Variant > >On Error Resume Next > >varDummy = obj.Properties(strPropName) > >HasProperty = (Err.Number = 0) > >End Function > >Looping seems to be in tab order anyway. > >You might want to examine the TabStop property as well. > >-- > >Allen Browne - Microsoft MVP. Perth, Western Australia. > >Tips for Access users - http://allenbrowne.com/tips.html > > >-----Original Message----- >From: accessd-bounces at databaseadvisors.com >[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Tony Septav >Sent: Friday, October 23, 2009 7:50 AM >To: Access Developers discussion and problem solving >Subject: [AccessD] Form Controls > >Hey All >Is there a simply way to loop through the controls on a form based on >their tab order? > >Thanks >Tony > > From cfoust at infostatsystems.com Fri Oct 23 10:36:30 2009 From: cfoust at infostatsystems.com (Charlotte Foust) Date: Fri, 23 Oct 2009 08:36:30 -0700 Subject: [AccessD] Form Controls In-Reply-To: <4AE1CA91.9090107@nanaimo.ark.com> References: <4AE19857.4030909@nanaimo.ark.com><96DE5896A26D4085A3F9517CA9C88674@AMDXP> <4AE1CA91.9090107@nanaimo.ark.com> Message-ID: If you're talking about in design view, the controls follow the order in which they were added, not the tab index, which can be changed. Charlotte Foust -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Tony Septav Sent: Friday, October 23, 2009 8:24 AM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Form Controls Hey Jack and Pat I thought the controls would follow the tab order when looping through, but not on the form I am working with. The code is not exactly what I was looking for but it gives me a good starting point to do some modifying. Thanks kindly for the help. Jack and Pat wrote: >Tony, > >I found this from Allen Browne: > >2/16/2006 4:10:25 PM Re: accessing controls by tab index > >You could loop through the form's Controls collection, identify those >that > >have a TaxIndex (Labels don't, for instance), and load an array based >on the > > >TabIndex of each one: > >Function LoopControls(frm As Form) > >Dim ctl As Control > >Dim strControl() As String > >Dim i As Integer > >Dim iMax As Integer > >ReDim strControl(0 To frm.Controls.Count - 1) > >For Each ctl In frm.Controls > >If HasProperty(ctl, "TabIndex") Then > >i = ctl.TabIndex > >strControl(i) = ctl.Name > >If i > iMax Then > >iMax = i > >End If > >End If > >Next > >For i = 0 To iMax > >Debug.Print i, strControl(i) > >Next > >End Function > >Public Function HasProperty(obj As Object, strPropName As String) As >Boolean > > >'Purpose: Return true if the object has the property. > >Dim varDummy As Variant > >On Error Resume Next > >varDummy = obj.Properties(strPropName) > >HasProperty = (Err.Number = 0) > >End Function > >Looping seems to be in tab order anyway. > >You might want to examine the TabStop property as well. > >-- > >Allen Browne - Microsoft MVP. Perth, Western Australia. > >Tips for Access users - http://allenbrowne.com/tips.html > > >-----Original Message----- >From: accessd-bounces at databaseadvisors.com >[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Tony Septav >Sent: Friday, October 23, 2009 7:50 AM >To: Access Developers discussion and problem solving >Subject: [AccessD] Form Controls > >Hey All >Is there a simply way to loop through the controls on a form based on >their tab order? > >Thanks >Tony > > -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From max.wanadoo at gmail.com Fri Oct 23 11:04:19 2009 From: max.wanadoo at gmail.com (Max Wanadoo) Date: Fri, 23 Oct 2009 17:04:19 +0100 Subject: [AccessD] Form Controls In-Reply-To: References: <4AE19857.4030909@nanaimo.ark.com><96DE5896A26D4085A3F9517CA9C88674@AMDXP> <4AE1CA91.9090107@nanaimo.ark.com> Message-ID: <4ae1d416.170d660a.45e3.fffff000@mx.google.com> All you need to is make the array a 2-dimensional one and store the index value as well as the name and then sort that on the index value and then iterate through it. Max -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Charlotte Foust Sent: 23 October 2009 16:37 To: Access Developers discussion and problem solving Subject: Re: [AccessD] Form Controls If you're talking about in design view, the controls follow the order in which they were added, not the tab index, which can be changed. Charlotte Foust -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Tony Septav Sent: Friday, October 23, 2009 8:24 AM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Form Controls Hey Jack and Pat I thought the controls would follow the tab order when looping through, but not on the form I am working with. The code is not exactly what I was looking for but it gives me a good starting point to do some modifying. Thanks kindly for the help. Jack and Pat wrote: >Tony, > >I found this from Allen Browne: > >2/16/2006 4:10:25 PM Re: accessing controls by tab index > >You could loop through the form's Controls collection, identify those >that > >have a TaxIndex (Labels don't, for instance), and load an array based >on the > > >TabIndex of each one: > >Function LoopControls(frm As Form) > >Dim ctl As Control > >Dim strControl() As String > >Dim i As Integer > >Dim iMax As Integer > >ReDim strControl(0 To frm.Controls.Count - 1) > >For Each ctl In frm.Controls > >If HasProperty(ctl, "TabIndex") Then > >i = ctl.TabIndex > >strControl(i) = ctl.Name > >If i > iMax Then > >iMax = i > >End If > >End If > >Next > >For i = 0 To iMax > >Debug.Print i, strControl(i) > >Next > >End Function > >Public Function HasProperty(obj As Object, strPropName As String) As >Boolean > > >'Purpose: Return true if the object has the property. > >Dim varDummy As Variant > >On Error Resume Next > >varDummy = obj.Properties(strPropName) > >HasProperty = (Err.Number = 0) > >End Function > >Looping seems to be in tab order anyway. > >You might want to examine the TabStop property as well. > >-- > >Allen Browne - Microsoft MVP. Perth, Western Australia. > >Tips for Access users - http://allenbrowne.com/tips.html > > >-----Original Message----- >From: accessd-bounces at databaseadvisors.com >[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Tony Septav >Sent: Friday, October 23, 2009 7:50 AM >To: Access Developers discussion and problem solving >Subject: [AccessD] Form Controls > >Hey All >Is there a simply way to loop through the controls on a form based on >their tab order? > >Thanks >Tony > > -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From iggy at nanaimo.ark.com Fri Oct 23 11:08:32 2009 From: iggy at nanaimo.ark.com (Tony Septav) Date: Fri, 23 Oct 2009 09:08:32 -0700 Subject: [AccessD] Form Controls In-Reply-To: References: <4AE19857.4030909@nanaimo.ark.com><96DE5896A26D4085A3F9517CA9C88674@AMDXP> <4AE1CA91.9090107@nanaimo.ark.com> Message-ID: <4AE1D500.3000903@nanaimo.ark.com> Hey Charlotte Thanks I gathered as much, did some testing by running the loop on the inherited forms I have and the control order that came up (independent of the view) was definitely not the tab order that was set for that form. Charlotte Foust wrote: >If you're talking about in design view, the controls follow the order in >which they were added, not the tab index, which can be changed. > >Charlotte Foust > >-----Original Message----- >From: accessd-bounces at databaseadvisors.com >[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Tony Septav >Sent: Friday, October 23, 2009 8:24 AM >To: Access Developers discussion and problem solving >Subject: Re: [AccessD] Form Controls > >Hey Jack and Pat >I thought the controls would follow the tab order when looping through, >but not on the form I am working with. The code is not exactly what I >was looking for but it gives me a good starting point to do some >modifying. > >Thanks kindly for the help. > > >Jack and Pat wrote: > > > >>Tony, >> >>I found this from Allen Browne: >> >>2/16/2006 4:10:25 PM Re: accessing controls by tab index >> >>You could loop through the form's Controls collection, identify those >>that >> >>have a TaxIndex (Labels don't, for instance), and load an array based >>on the >> >> >>TabIndex of each one: >> >>Function LoopControls(frm As Form) >> >>Dim ctl As Control >> >>Dim strControl() As String >> >>Dim i As Integer >> >>Dim iMax As Integer >> >>ReDim strControl(0 To frm.Controls.Count - 1) >> >>For Each ctl In frm.Controls >> >>If HasProperty(ctl, "TabIndex") Then >> >>i = ctl.TabIndex >> >>strControl(i) = ctl.Name >> >>If i > iMax Then >> >>iMax = i >> >>End If >> >>End If >> >>Next >> >>For i = 0 To iMax >> >>Debug.Print i, strControl(i) >> >>Next >> >>End Function >> >>Public Function HasProperty(obj As Object, strPropName As String) As >>Boolean >> >> >>'Purpose: Return true if the object has the property. >> >>Dim varDummy As Variant >> >>On Error Resume Next >> >>varDummy = obj.Properties(strPropName) >> >>HasProperty = (Err.Number = 0) >> >>End Function >> >>Looping seems to be in tab order anyway. >> >>You might want to examine the TabStop property as well. >> >>-- >> >>Allen Browne - Microsoft MVP. Perth, Western Australia. >> >>Tips for Access users - http://allenbrowne.com/tips.html >> >> >>-----Original Message----- >>From: accessd-bounces at databaseadvisors.com >>[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Tony Septav >>Sent: Friday, October 23, 2009 7:50 AM >>To: Access Developers discussion and problem solving >>Subject: [AccessD] Form Controls >> >>Hey All >>Is there a simply way to loop through the controls on a form based on >>their tab order? >> >>Thanks >>Tony >> >> >> >> > > > From jwcolby at colbyconsulting.com Fri Oct 23 11:10:43 2009 From: jwcolby at colbyconsulting.com (jwcolby) Date: Fri, 23 Oct 2009 12:10:43 -0400 Subject: [AccessD] Form Controls In-Reply-To: <4AE1CA91.9090107@nanaimo.ark.com> References: <4AE19857.4030909@nanaimo.ark.com> <96DE5896A26D4085A3F9517CA9C88674@AMDXP> <4AE1CA91.9090107@nanaimo.ark.com> Message-ID: <4AE1D583.7010508@colbyconsulting.com> If it were me I would use a collection. Put the control itself into the collection, keyed on the cstr(Ctl.tabIndex). dim MyCol as collection set myCol = new collection dim ctl as control for each ctl in me.Controls mcol.add ctl, cstr(ctl.TabIndex) next ctl You can then use a for next loop to pull them back out in order of tabindex... dim ctl as control for I = 0 to col.Count-1 set ctl = col(cstr(I)) 'examine the control here next I A collection allows you to place anything into them (which includes pointers to controls). It also allows you to use a KEY which essentially allows you to retrieve them by that key. The key has to be a string however which is why we use cstr(ctl.tabindex). So you place them in the collection keyed on the tab index. Now the for next simply starts at 0 and works up, retrieving the controls one by one. Since you start at 0, you retrieve the control at tabindex 0, and work up. Pretty simple really. This is aircode of course, but it should be close. John W. Colby www.ColbyConsulting.com Tony Septav wrote: > Hey Jack and Pat > I thought the controls would follow the tab order when looping through, > but not on the form I am working with. The code is not exactly what I > was looking for but it gives me a good starting point to do some modifying. > > Thanks kindly for the help. From cfoust at infostatsystems.com Fri Oct 23 11:33:02 2009 From: cfoust at infostatsystems.com (Charlotte Foust) Date: Fri, 23 Oct 2009 09:33:02 -0700 Subject: [AccessD] Form Controls In-Reply-To: <4AE1D583.7010508@colbyconsulting.com> References: <4AE19857.4030909@nanaimo.ark.com> <96DE5896A26D4085A3F9517CA9C88674@AMDXP><4AE1CA91.9090107@nanaimo.ark.com> <4AE1D583.7010508@colbyconsulting.com> Message-ID: That's pretty much what I've done in the past, too, John. A collection allows you to actually work with the object rather than just with its name or index number. Charlotte Foust -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Friday, October 23, 2009 9:11 AM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Form Controls If it were me I would use a collection. Put the control itself into the collection, keyed on the cstr(Ctl.tabIndex). dim MyCol as collection set myCol = new collection dim ctl as control for each ctl in me.Controls mcol.add ctl, cstr(ctl.TabIndex) next ctl You can then use a for next loop to pull them back out in order of tabindex... dim ctl as control for I = 0 to col.Count-1 set ctl = col(cstr(I)) 'examine the control here next I A collection allows you to place anything into them (which includes pointers to controls). It also allows you to use a KEY which essentially allows you to retrieve them by that key. The key has to be a string however which is why we use cstr(ctl.tabindex). So you place them in the collection keyed on the tab index. Now the for next simply starts at 0 and works up, retrieving the controls one by one. Since you start at 0, you retrieve the control at tabindex 0, and work up. Pretty simple really. This is aircode of course, but it should be close. John W. Colby www.ColbyConsulting.com Tony Septav wrote: > Hey Jack and Pat > I thought the controls would follow the tab order when looping > through, but not on the form I am working with. The code is not > exactly what I was looking for but it gives me a good starting point to do some modifying. > > Thanks kindly for the help. -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From max.wanadoo at gmail.com Fri Oct 23 11:47:42 2009 From: max.wanadoo at gmail.com (Max Wanadoo) Date: Fri, 23 Oct 2009 17:47:42 +0100 Subject: [AccessD] Form Controls In-Reply-To: <4AE1D583.7010508@colbyconsulting.com> References: <4AE19857.4030909@nanaimo.ark.com> <96DE5896A26D4085A3F9517CA9C88674@AMDXP> <4AE1CA91.9090107@nanaimo.ark.com> <4AE1D583.7010508@colbyconsulting.com> Message-ID: <4ae1de3f.1c07d00a.443f.ffffaff5@mx.google.com> Cool. Good solution. Max -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: 23 October 2009 17:11 To: Access Developers discussion and problem solving Subject: Re: [AccessD] Form Controls If it were me I would use a collection. Put the control itself into the collection, keyed on the cstr(Ctl.tabIndex). dim MyCol as collection set myCol = new collection dim ctl as control for each ctl in me.Controls mcol.add ctl, cstr(ctl.TabIndex) next ctl You can then use a for next loop to pull them back out in order of tabindex... dim ctl as control for I = 0 to col.Count-1 set ctl = col(cstr(I)) 'examine the control here next I A collection allows you to place anything into them (which includes pointers to controls). It also allows you to use a KEY which essentially allows you to retrieve them by that key. The key has to be a string however which is why we use cstr(ctl.tabindex). So you place them in the collection keyed on the tab index. Now the for next simply starts at 0 and works up, retrieving the controls one by one. Since you start at 0, you retrieve the control at tabindex 0, and work up. Pretty simple really. This is aircode of course, but it should be close. John W. Colby www.ColbyConsulting.com Tony Septav wrote: > Hey Jack and Pat > I thought the controls would follow the tab order when looping through, > but not on the form I am working with. The code is not exactly what I > was looking for but it gives me a good starting point to do some modifying. > > Thanks kindly for the help. -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From jwcolby at colbyconsulting.com Fri Oct 23 13:43:58 2009 From: jwcolby at colbyconsulting.com (jwcolby) Date: Fri, 23 Oct 2009 14:43:58 -0400 Subject: [AccessD] Form Controls In-Reply-To: <4ae1de3f.1c07d00a.443f.ffffaff5@mx.google.com> References: <4AE19857.4030909@nanaimo.ark.com> <96DE5896A26D4085A3F9517CA9C88674@AMDXP> <4AE1CA91.9090107@nanaimo.ark.com> <4AE1D583.7010508@colbyconsulting.com> <4ae1de3f.1c07d00a.443f.ffffaff5@mx.google.com> Message-ID: <4AE1F96E.4010408@colbyconsulting.com> > Cool. Good solution. LOL. Collections and classes. The basics of Access. John W. Colby www.ColbyConsulting.com Max Wanadoo wrote: > Cool. Good solution. > > Max > > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby > Sent: 23 October 2009 17:11 > To: Access Developers discussion and problem solving > Subject: Re: [AccessD] Form Controls > > If it were me I would use a collection. Put the control itself into the > collection, keyed on the > cstr(Ctl.tabIndex). > > dim MyCol as collection > set myCol = new collection > > dim ctl as control > > for each ctl in me.Controls > mcol.add ctl, cstr(ctl.TabIndex) > next ctl > > You can then use a for next loop to pull them back out in order of > tabindex... > > dim ctl as control > > for I = 0 to col.Count-1 > set ctl = col(cstr(I)) > 'examine the control here > next I > > A collection allows you to place anything into them (which includes pointers > to controls). It also > allows you to use a KEY which essentially allows you to retrieve them by > that key. The key has to > be a string however which is why we use cstr(ctl.tabindex). So you place > them in the collection > keyed on the tab index. Now the for next simply starts at 0 and works up, > retrieving the controls > one by one. Since you start at 0, you retrieve the control at tabindex 0, > and work up. > > Pretty simple really. This is aircode of course, but it should be close. > > John W. Colby > www.ColbyConsulting.com > > > Tony Septav wrote: >> Hey Jack and Pat >> I thought the controls would follow the tab order when looping through, >> but not on the form I am working with. The code is not exactly what I >> was looking for but it gives me a good starting point to do some > modifying. >> Thanks kindly for the help. > From kismert at gmail.com Fri Oct 23 18:52:09 2009 From: kismert at gmail.com (Kenneth Ismert) Date: Fri, 23 Oct 2009 18:52:09 -0500 Subject: [AccessD] Form Controls Message-ID: <7c7841600910231652w3fac6a26rd376d003c1d09fc3@mail.gmail.com> Hey, all: Charlotte Foust: > If you're talking about in design view, the controls follow the > order in which they were added, not the tab index, which > can be changed. That is right initially, but the rendering order determines the Controls collection order. Using the Bring to Front and Send to Back buttons in form design view changes the control order. This is how Access handles control overlap without a z-index property: controls later in the collection render on top of those before. I'm pretty sure of this. Tab indexes, on the other hand, get re-used by section and tab page. This means that if your form has header, footer and detail sections, as well as a tab control with three pages, you could have 6 controls with a tab index of 1: one for each section and tab page. This means that any looping through controls by tab index has to be recursive. You must go by section, then any tab pages in that section. Of course, this complicates adding controls to a collection keyed by tab index. The straightforward way will work only for the simplest case: only a detail section with no tab pages. Otherwise, you will get duplicate tab indexes, and your item add won't work the way you expect. -Ken From jwcolby at colbyconsulting.com Fri Oct 23 19:48:58 2009 From: jwcolby at colbyconsulting.com (jwcolby) Date: Fri, 23 Oct 2009 20:48:58 -0400 Subject: [AccessD] Form Controls In-Reply-To: <7c7841600910231652w3fac6a26rd376d003c1d09fc3@mail.gmail.com> References: <7c7841600910231652w3fac6a26rd376d003c1d09fc3@mail.gmail.com> Message-ID: <4AE24EFA.7070708@colbyconsulting.com> Well, the tab order only works for the section that the focus is in anyway, so have three collections, one for each section. John W. Colby www.ColbyConsulting.com Kenneth Ismert wrote: > Hey, all: > > Charlotte Foust: >> If you're talking about in design view, the controls follow the >> order in which they were added, not the tab index, which >> can be changed. > > That is right initially, but the rendering order determines the Controls > collection order. Using the Bring to Front and Send to Back buttons in form > design view changes the control order. This is how Access handles control > overlap without a z-index property: controls later in the collection render > on top of those before. I'm pretty sure of this. > > Tab indexes, on the other hand, get re-used by section and tab page. This > means that if your form has header, footer and detail sections, as well as > a tab control with three pages, you could have 6 controls with a tab index > of 1: one for each section and tab page. > > This means that any looping through controls by tab index has to be > recursive. You must go by section, then any tab pages in that section. > > Of course, this complicates adding controls to a collection keyed by tab > index. The straightforward way will work only for the simplest case: only a > detail section with no tab pages. Otherwise, you will get duplicate tab > indexes, and your item add won't work the way you expect. > > -Ken From iggy at nanaimo.ark.com Sat Oct 24 08:38:10 2009 From: iggy at nanaimo.ark.com (Tony Septav) Date: Sat, 24 Oct 2009 06:38:10 -0700 Subject: [AccessD] Form Controls In-Reply-To: <4AE24EFA.7070708@colbyconsulting.com> References: <7c7841600910231652w3fac6a26rd376d003c1d09fc3@mail.gmail.com> <4AE24EFA.7070708@colbyconsulting.com> Message-ID: <4AE30342.50303@nanaimo.ark.com> Hey All Pretty cool I must say. Used a combination of John's code and HELP. Ran into a error message problem, because I am not totally competent in using collections didn't quite understand what was causing it Finally figured out I had to insert the HasProperty Function, Jack and Pat provided.. Now just have to incorporate the ctl.Tag into the code and "I am good to go". This may sound like a pretty dumb question, but in the HELP example it stated "This example only works with host applications that support classes." How do you go about determining if this is true? Thanks to All. jwcolby wrote: >Well, the tab order only works for the section that the focus is in anyway, so have three >collections, one for each section. > >John W. Colby >www.ColbyConsulting.com > > >Kenneth Ismert wrote: > > >>Hey, all: >> >>Charlotte Foust: >> >> >>>If you're talking about in design view, the controls follow the >>>order in which they were added, not the tab index, which >>>can be changed. >>> >>> >>That is right initially, but the rendering order determines the Controls >>collection order. Using the Bring to Front and Send to Back buttons in form >>design view changes the control order. This is how Access handles control >>overlap without a z-index property: controls later in the collection render >>on top of those before. I'm pretty sure of this. >> >>Tab indexes, on the other hand, get re-used by section and tab page. This >>means that if your form has header, footer and detail sections, as well as >>a tab control with three pages, you could have 6 controls with a tab index >>of 1: one for each section and tab page. >> >>This means that any looping through controls by tab index has to be >>recursive. You must go by section, then any tab pages in that section. >> >>Of course, this complicates adding controls to a collection keyed by tab >>index. The straightforward way will work only for the simplest case: only a >>detail section with no tab pages. Otherwise, you will get duplicate tab >>indexes, and your item add won't work the way you expect. >> >>-Ken >> >> From jwcolby at colbyconsulting.com Sat Oct 24 11:31:28 2009 From: jwcolby at colbyconsulting.com (jwcolby) Date: Sat, 24 Oct 2009 12:31:28 -0400 Subject: [AccessD] Form Controls In-Reply-To: <4AE30342.50303@nanaimo.ark.com> References: <7c7841600910231652w3fac6a26rd376d003c1d09fc3@mail.gmail.com> <4AE24EFA.7070708@colbyconsulting.com> <4AE30342.50303@nanaimo.ark.com> Message-ID: <4AE32BE0.1040008@colbyconsulting.com> Not knowing what the code was it is tough to figure out the help comment. I am guessing that the code used a class somehow. Collections are part of VBA (Access' visual basic language). Classes are NOT required to use collections in Access. Glad you got it working. Collections are way cool for this kind of stuff. John W. Colby www.ColbyConsulting.com Tony Septav wrote: > Hey All > Pretty cool I must say. > Used a combination of John's code and HELP. > Ran into a error message problem, because I am not totally competent in > using collections didn't quite understand what was causing it > Finally figured out I had to insert the HasProperty Function, Jack and > Pat provided.. > Now just have to incorporate the ctl.Tag into the code and "I am good to > go". > > This may sound like a pretty dumb question, but in the HELP example it > stated "This example only works with host applications that support > classes." How do you go about determining if this is true? > > Thanks to All. > > > jwcolby wrote: > >> Well, the tab order only works for the section that the focus is in anyway, so have three >> collections, one for each section. >> >> John W. Colby >> www.ColbyConsulting.com >> >> >> Kenneth Ismert wrote: >> >> >>> Hey, all: >>> >>> Charlotte Foust: >>> >>> >>>> If you're talking about in design view, the controls follow the >>>> order in which they were added, not the tab index, which >>>> can be changed. >>>> >>>> >>> That is right initially, but the rendering order determines the Controls >>> collection order. Using the Bring to Front and Send to Back buttons in form >>> design view changes the control order. This is how Access handles control >>> overlap without a z-index property: controls later in the collection render >>> on top of those before. I'm pretty sure of this. >>> >>> Tab indexes, on the other hand, get re-used by section and tab page. This >>> means that if your form has header, footer and detail sections, as well as >>> a tab control with three pages, you could have 6 controls with a tab index >>> of 1: one for each section and tab page. >>> >>> This means that any looping through controls by tab index has to be >>> recursive. You must go by section, then any tab pages in that section. >>> >>> Of course, this complicates adding controls to a collection keyed by tab >>> index. The straightforward way will work only for the simplest case: only a >>> detail section with no tab pages. Otherwise, you will get duplicate tab >>> indexes, and your item add won't work the way you expect. >>> >>> -Ken >>> >>> > From rockysmolin at bchacc.com Sun Oct 25 10:53:19 2009 From: rockysmolin at bchacc.com (Rocky Smolin) Date: Sun, 25 Oct 2009 08:53:19 -0700 Subject: [AccessD] Office Key Message-ID: <337061D9901D419188041ACF59A8E66B@HAL9005> Dear List(s): My son Max's HD in his Dell LT crapped out about a month ago. Dell replaced the drive. Of course, he had no backups. I told him to send the drive to me to see if I could recover some of the irreplaceable files. Which I was able to do. When I bought him this system I also got him Office 2007. OF course, he can't find the original install disk, but he got a copy from someone which is working but in a few days it's going to stop working because it's not registered. So my question is - is the key stored in the registry somewhere? If so, and I could find it on the old HD, I could email it to him, he could register the copy he's using. MTIA, Rocky Smolin Beach Access Software 858-259-4334 www.e-z-mrp.com www.bchacc.com From tinanfields at torchlake.com Sun Oct 25 11:27:16 2009 From: tinanfields at torchlake.com (Tina Norris Fields) Date: Sun, 25 Oct 2009 12:27:16 -0400 Subject: [AccessD] Office Key In-Reply-To: <337061D9901D419188041ACF59A8E66B@HAL9005> References: <337061D9901D419188041ACF59A8E66B@HAL9005> Message-ID: <4AE47C64.10505@torchlake.com> Hi Rocky, I found this that may help http://support.microsoft.com/kb/895456 Following the steps I got to my own Office 2003 Product ID. I'm sending you, off-list, an image of that window. Hope this helps, T Rocky Smolin wrote: > Dear List(s): > > My son Max's HD in his Dell LT crapped out about a month ago. Dell replaced > the drive. Of course, he had no backups. I told him to send the drive to > me to see if I could recover some of the irreplaceable files. Which I was > able to do. > > When I bought him this system I also got him Office 2007. OF course, he > can't find the original install disk, but he got a copy from someone which > is working but in a few days it's going to stop working because it's not > registered. > > So my question is - is the key stored in the registry somewhere? If so, and > I could find it on the old HD, I could email it to him, he could register > the copy he's using. > > MTIA, > > > > Rocky Smolin > > Beach Access Software > > 858-259-4334 > > www.e-z-mrp.com > > www.bchacc.com > > > > > > > From shamil at smsconsulting.spb.ru Sun Oct 25 11:34:03 2009 From: shamil at smsconsulting.spb.ru (Shamil Salakhetdinov) Date: Sun, 25 Oct 2009 19:34:03 +0300 Subject: [AccessD] Office Key In-Reply-To: <337061D9901D419188041ACF59A8E66B@HAL9005> References: <337061D9901D419188041ACF59A8E66B@HAL9005> Message-ID: <000c01ca5590$f7cb7c40$e76274c0$@spb.ru> Hi Rocky -- FYI: I didn't find my Office 2007 key in System Registry. --Shamil -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Rocky Smolin Sent: Sunday, October 25, 2009 6:53 PM To: 'Access Developers discussion and problem solving'; List Subject: [AccessD] Office Key Dear List(s): My son Max's HD in his Dell LT crapped out about a month ago. Dell replaced the drive. Of course, he had no backups. I told him to send the drive to me to see if I could recover some of the irreplaceable files. Which I was able to do. When I bought him this system I also got him Office 2007. OF course, he can't find the original install disk, but he got a copy from someone which is working but in a few days it's going to stop working because it's not registered. So my question is - is the key stored in the registry somewhere? If so, and I could find it on the old HD, I could email it to him, he could register the copy he's using. MTIA, Rocky Smolin Beach Access Software 858-259-4334 www.e-z-mrp.com www.bchacc.com __________ Information from ESET NOD32 Antivirus, version of virus signature database 4540 (20091025) __________ The message was checked by ESET NOD32 Antivirus. http://www.esetnod32.ru From rockysmolin at bchacc.com Sun Oct 25 11:41:12 2009 From: rockysmolin at bchacc.com (Rocky Smolin) Date: Sun, 25 Oct 2009 09:41:12 -0700 Subject: [AccessD] Office Key In-Reply-To: <4AE47C64.10505@torchlake.com> References: <337061D9901D419188041ACF59A8E66B@HAL9005> <4AE47C64.10505@torchlake.com> Message-ID: Tina: Thanks for the lead. I've got a cable that hooks up the old LT drive as an external. All I have to do is figure out how to browse a registry that's on another drive. Rocky -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Tina Norris Fields Sent: Sunday, October 25, 2009 9:27 AM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Office Key Hi Rocky, I found this that may help http://support.microsoft.com/kb/895456 Following the steps I got to my own Office 2003 Product ID. I'm sending you, off-list, an image of that window. Hope this helps, T Rocky Smolin wrote: > Dear List(s): > > My son Max's HD in his Dell LT crapped out about a month ago. Dell > replaced the drive. Of course, he had no backups. I told him to send > the drive to me to see if I could recover some of the irreplaceable > files. Which I was able to do. > > When I bought him this system I also got him Office 2007. OF course, > he can't find the original install disk, but he got a copy from > someone which is working but in a few days it's going to stop working > because it's not registered. > > So my question is - is the key stored in the registry somewhere? If > so, and I could find it on the old HD, I could email it to him, he > could register the copy he's using. > > MTIA, > > > > Rocky Smolin > > Beach Access Software > > 858-259-4334 > > www.e-z-mrp.com > > www.bchacc.com > > > > > > > -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From rockysmolin at bchacc.com Sun Oct 25 11:59:49 2009 From: rockysmolin at bchacc.com (Rocky Smolin) Date: Sun, 25 Oct 2009 09:59:49 -0700 Subject: [AccessD] Office Key In-Reply-To: <4AE47C64.10505@torchlake.com> References: <337061D9901D419188041ACF59A8E66B@HAL9005> <4AE47C64.10505@torchlake.com> Message-ID: Tina: That's the Product ID but not the key that's on the yellow sticker on the back of the CD sleeve. That's what he'll need and it looks like Microsoft is not storing that in the registry. Which makes sense I guess from a licensing standpoint. Rocky -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Tina Norris Fields Sent: Sunday, October 25, 2009 9:27 AM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Office Key Hi Rocky, I found this that may help http://support.microsoft.com/kb/895456 Following the steps I got to my own Office 2003 Product ID. I'm sending you, off-list, an image of that window. Hope this helps, T Rocky Smolin wrote: > Dear List(s): > > My son Max's HD in his Dell LT crapped out about a month ago. Dell > replaced the drive. Of course, he had no backups. I told him to send > the drive to me to see if I could recover some of the irreplaceable > files. Which I was able to do. > > When I bought him this system I also got him Office 2007. OF course, > he can't find the original install disk, but he got a copy from > someone which is working but in a few days it's going to stop working > because it's not registered. > > So my question is - is the key stored in the registry somewhere? If > so, and I could find it on the old HD, I could email it to him, he > could register the copy he's using. > > MTIA, > > > > Rocky Smolin > > Beach Access Software > > 858-259-4334 > > www.e-z-mrp.com > > www.bchacc.com > > > > > > > -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From fuller.artful at gmail.com Sun Oct 25 15:39:07 2009 From: fuller.artful at gmail.com (Arthur Fuller) Date: Sun, 25 Oct 2009 16:39:07 -0400 Subject: [AccessD] Access 2007 Question Message-ID: <29f585dd0910251339u735bd228vb5548bc729c0d6dc@mail.gmail.com> I have downloaded and built all the Access 2007 template apps. Every single one of them does its magic with macros not with VBA. This begs some questions: 1. Does this indicate that developers are no longer welcome in the Access community? How are we to read this, when even Northwind has been translated to macros from VBA code? 2. Is there a wizard that converts a macro to VBA code? Or should I just cut and paste the macro in question to the code window and then attempt to translate it to VBA code? 3. Should we Access developers regard this as the definitive signal to move to Visual Studio or some other dev platform? (Just about the only thing that keeps me on Windows is Access; take away that and you may as well call me an Ubuntu boy.) Arthur From ralphb at cwgsy.net Sun Oct 25 17:17:08 2009 From: ralphb at cwgsy.net (Ralph Bryce) Date: Sun, 25 Oct 2009 23:17:08 +0100 Subject: [AccessD] Office Key In-Reply-To: References: <337061D9901D419188041ACF59A8E66B@HAL9005> <4AE47C64.10505@torchlake.com> Message-ID: <200910252215123.SM04696@IBMT43p.cwgsy.net> >Hi Rocky Have you tried this free program? http://www.magicaljellybean.com/keyfinder/ It retrieves the actual license key HTH Ralph Bryce >Rocky Smolin wrote: > > Dear List(s): > > > > My son Max's HD in his Dell LT crapped out about a month ago. Dell > > replaced the drive. Of course, he had no backups. I told him to send > > the drive to me to see if I could recover some of the irreplaceable > > files. Which I was able to do. > > > > When I bought him this system I also got him Office 2007. OF course, > > he can't find the original install disk, but he got a copy from > > someone which is working but in a few days it's going to stop working > > because it's not registered. > > > > So my question is - is the key stored in the registry somewhere? If > > so, and I could find it on the old HD, I could email it to him, he > > could register the copy he's using. > > > > MTIA, > > > > > > > > Rocky Smolin > > > > Beach Access Software > > > > 858-259-4334 > > > > www.e-z-mrp.com > > > > www.bchacc.com > > > > > > > > > > > > > > >-- >AccessD mailing list >AccessD at databaseadvisors.com >http://databaseadvisors.com/mailman/listinfo/accessd >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 Sun Oct 25 17:53:07 2009 From: rockysmolin at bchacc.com (Rocky Smolin) Date: Sun, 25 Oct 2009 15:53:07 -0700 Subject: [AccessD] Office Key In-Reply-To: <200910252215123.SM04696@IBMT43p.cwgsy.net> References: <337061D9901D419188041ACF59A8E66B@HAL9005><4AE47C64.10505@torchlake.com> <200910252215123.SM04696@IBMT43p.cwgsy.net> Message-ID: <8748D4D958044FD5BA8EE2349503672B@HAL9005> That's my ace in the hole in case the key I got doesn't work. Rocky -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Ralph Bryce Sent: Sunday, October 25, 2009 3:17 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Office Key >Hi Rocky Have you tried this free program? http://www.magicaljellybean.com/ keyfinder/ It retrieves the actual license key HTH Ralph Bryce >Rocky Smolin wrote: > > Dear List(s): > > > > My son Max's HD in his Dell LT crapped out about a month ago. Dell > > replaced the drive. Of course, he had no backups. I told him to > > send the drive to me to see if I could recover some of the > > irreplaceable files. Which I was able to do. > > > > When I bought him this system I also got him Office 2007. OF > > course, he can't find the original install disk, but he got a copy > > from someone which is working but in a few days it's going to stop > > working because it's not registered. > > > > So my question is - is the key stored in the registry somewhere? If > > so, and I could find it on the old HD, I could email it to him, he > > could register the copy he's using. > > > > MTIA, > > > > > > > > Rocky Smolin > > > > Beach Access Software > > > > 858-259-4334 > > > > www.e-z-mrp.com > > > > www.bchacc.com > > > > > > > > > > > > > > >-- >AccessD mailing list >AccessD at databaseadvisors.com >http://databaseadvisors.com/mailman/listinfo/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 Darryl.Collins at anz.com Sun Oct 25 21:32:20 2009 From: Darryl.Collins at anz.com (Collins, Darryl) Date: Mon, 26 Oct 2009 13:32:20 +1100 Subject: [AccessD] Access 2007 Question In-Reply-To: <29f585dd0910251339u735bd228vb5548bc729c0d6dc@mail.gmail.com> Message-ID: <6DC4725FDCDD72428D6114F1B6CC6E8101688B7A@EXUAU020HWT110.oceania.corp.anz.com> I have no hard evidence, but I get the feeling microsoft would love VBA to die off. Sadly for Msoft, most of the world's financial institutions (for better or worse) are powered largely by Excel and VBA. And not many of them are too keen on having to rebuild all those lovely VBA based apps they have had singing along nicely now for years and years. As for Access 2007, it seems to be largely dead as a development platform and seemed to be designed for 'power users' rather than a dev platform or base. I really didn't enjoy using it and found it very unpolished - maybe there are other who love it, but I haven't heard much chatter leaning in that direction. Maybe 2010 will be better and more friendly to the dev community? Not hopeful. Given the power and flexibility of SQL Server Express and Visual Studio/ASP.Net I am not sure it would even be worth focussing on Access moving fwd. Just my thoughts. Darryl. -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Arthur Fuller Sent: Monday, 26 October 2009 7:39 AM To: Access Developers discussion and problem solving Subject: [AccessD] Access 2007 Question I have downloaded and built all the Access 2007 template apps. Every single one of them does its magic with macros not with VBA. This begs some questions: 1. Does this indicate that developers are no longer welcome in the Access community? How are we to read this, when even Northwind has been translated to macros from VBA code? 2. Is there a wizard that converts a macro to VBA code? Or should I just cut and paste the macro in question to the code window and then attempt to translate it to VBA code? 3. Should we Access developers regard this as the definitive signal to move to Visual Studio or some other dev platform? (Just about the only thing that keeps me on Windows is Access; take away that and you may as well call me an Ubuntu boy.) Arthur -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com "This e-mail and any attachments to it (the "Communication") is, unless otherwise stated, confidential, may contain copyright material and is for the use only of the intended recipient. If you receive the Communication in error, please notify the sender immediately by return e-mail, delete the Communication and the return e-mail, and do not read, copy, retransmit or otherwise deal with it. Any views expressed in the Communication are those of the individual sender only, unless expressly stated to be those of Australia and New Zealand Banking Group Limited ABN 11 005 357 522, or any of its related entities including ANZ National Bank Limited (together "ANZ"). ANZ does not accept liability in connection with the integrity of or errors in the Communication, computer virus, data corruption, interference or delay arising from or in respect of the Communication." From marklbreen at gmail.com Mon Oct 26 01:58:45 2009 From: marklbreen at gmail.com (Mark Breen) Date: Mon, 26 Oct 2009 06:58:45 +0000 Subject: [AccessD] Office Key In-Reply-To: <8748D4D958044FD5BA8EE2349503672B@HAL9005> References: <337061D9901D419188041ACF59A8E66B@HAL9005> <4AE47C64.10505@torchlake.com> <200910252215123.SM04696@IBMT43p.cwgsy.net> <8748D4D958044FD5BA8EE2349503672B@HAL9005> Message-ID: Hello Rocky, One additional suggestion to Jim's is to switch instead to Google Docs and Spreadsheets. It might possibly do most of what Max needs, and it has the added benefit that it is always backed up. I mentioned to Caitlin last night, that when I first met Max he was around her age (10.9), I was a little shocked when you mentioned that he would send it to you, IOW, he is no longer 12 and living at home. Thanks, Mark 2009/10/25 Rocky Smolin > That's my ace in the hole in case the key I got doesn't work. > > Rocky > > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Ralph Bryce > Sent: Sunday, October 25, 2009 3:17 PM > To: Access Developers discussion and problem solving > Subject: Re: [AccessD] Office Key > > > >Hi Rocky > > Have you tried this free program? > > > http://www.magicaljellybean.com/ > keyfinder/ > > > It retrieves the actual license key > > HTH > > Ralph Bryce > > > >Rocky Smolin wrote: > > > Dear List(s): > > > > > > My son Max's HD in his Dell LT crapped out about a month ago. Dell > > > replaced the drive. Of course, he had no backups. I told him to > > > send the drive to me to see if I could recover some of the > > > irreplaceable files. Which I was able to do. > > > > > > When I bought him this system I also got him Office 2007. OF > > > course, he can't find the original install disk, but he got a copy > > > from someone which is working but in a few days it's going to stop > > > working because it's not registered. > > > > > > So my question is - is the key stored in the registry somewhere? If > > > so, and I could find it on the old HD, I could email it to him, he > > > could register the copy he's using. > > > > > > MTIA, > > > > > > > > > > > > Rocky Smolin > > > > > > Beach Access Software > > > > > > 858-259-4334 > > > > > > www.e-z-mrp.com > > > > > > www.bchacc.com > > > > > > > > > > > > > > > > > > > > > > >-- > >AccessD mailing list > >AccessD at databaseadvisors.com > >http://databaseadvisors.com/mailman/listinfo/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 marklbreen at gmail.com Mon Oct 26 02:16:28 2009 From: marklbreen at gmail.com (Mark Breen) Date: Mon, 26 Oct 2009 07:16:28 +0000 Subject: [AccessD] I want one In-Reply-To: <4a27f35f.1c185e0a.403c.fffff5e0@mx.google.com> References: <4A2731C5.50207@colbyconsulting.com> <29f585dd0906040529g3380a4cj315cf7bea4a29b6f@mail.gmail.com> <4A27C260.9070403@colbyconsulting.com> <781809D0CBCA4D4C8599423EC952DF75AE6B9F@ntovmail02.ad.otto.de> <01d101c9e52e$d9aefcf0$8d0cf6d0$@net> <4a27f35f.1c185e0a.403c.fffff5e0@mx.google.com> Message-ID: Hello Max, I want to thank you for your suggestion to to try the HDMI cable instead of the VGA. It works a treat, with the added bonus that the Audio travels with the HDMI cable so I do not have to plug the audio from the laptop into the sound system separately. However, I noticed last night that I I can only get a decent view by selecting either 1900 x 1200 or else 1200 x 720. 1200 x 768 or 1200 x 800 or most of the other choices, including 800 x 600 do not render correctly on the TV. They display 800 x 600, but only utilise about 60% of the available screen space, so IOW, it is all bunced up and now much bigger than a standard monitor. So last night I viewed email and some DotNetNuke forums through 1200 x 720, I guess it was OK, but I wish the TV could do what most monitors do, which is stretch the display according to what the PC outputs. Thanks anyway for the super reminder about HDMI, Mark 2009/6/4 Max Wanadoo > Save your money. I paid ?800 sterling for a 50inch Plasma Samsung TV and I > just plug the HDMI cable in from my PC/Laptop and I have a 50inch display. > > Toggle back and forth between that and the TV with the remote. > > Now that is cool.... > > Max > > > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of John Bartow > Sent: 04 June 2009 17:10 > To: 'Access Developers discussion and problem solving' > Subject: Re: [AccessD] I want one > > Cool. I think I'll get two. > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Garraway, Alun > Sent: Thursday, June 04, 2009 10:52 AM > To: Access Developers discussion and problem solving > Subject: Re: [AccessD] I want one > > And a TFT to suit...... > > > http://www.necdisplay.com/NewTechnologies/CurvedDisplay/downloads/Curved%20D > LP%20Brochure_0409.pdf > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > 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 Oct 26 06:47:23 2009 From: jwcolby at colbyconsulting.com (jwcolby) Date: Mon, 26 Oct 2009 07:47:23 -0400 Subject: [AccessD] Access 2007 Question In-Reply-To: <29f585dd0910251339u735bd228vb5548bc729c0d6dc@mail.gmail.com> References: <29f585dd0910251339u735bd228vb5548bc729c0d6dc@mail.gmail.com> Message-ID: <4AE58C4B.7030002@colbyconsulting.com> Hey Ubunto boy... ;) John W. Colby www.ColbyConsulting.com Arthur Fuller wrote: > I have downloaded and built all the Access 2007 template apps. Every single > one of them does its magic with macros not with VBA. This begs some > questions: > > 1. Does this indicate that developers are no longer welcome in the Access > community? How are we to read this, when even Northwind has been translated > to macros from VBA code? > > 2. Is there a wizard that converts a macro to VBA code? Or should I just cut > and paste the macro in question to the code window and then attempt to > translate it to VBA code? > > 3. Should we Access developers regard this as the definitive signal to move > to Visual Studio or some other dev platform? (Just about the only thing that > keeps me on Windows is Access; take away that and you may as well call me an > Ubuntu boy.) > > Arthur From Lambert.Heenan at chartisinsurance.com Mon Oct 26 08:09:27 2009 From: Lambert.Heenan at chartisinsurance.com (Heenan, Lambert) Date: Mon, 26 Oct 2009 09:09:27 -0400 Subject: [AccessD] Access 2007 Question In-Reply-To: <29f585dd0910251339u735bd228vb5548bc729c0d6dc@mail.gmail.com> References: <29f585dd0910251339u735bd228vb5548bc729c0d6dc@mail.gmail.com> Message-ID: Don't have Access 2007, but is prior versions you can select a macro, and then on the Tools/Macro menu there is a 'Convert Macros to Visual Basic' option. Lambert -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Arthur Fuller Sent: Sunday, October 25, 2009 4:39 PM To: Access Developers discussion and problem solving Subject: [AccessD] Access 2007 Question I have downloaded and built all the Access 2007 template apps. Every single one of them does its magic with macros not with VBA. This begs some questions: 1. Does this indicate that developers are no longer welcome in the Access community? How are we to read this, when even Northwind has been translated to macros from VBA code? 2. Is there a wizard that converts a macro to VBA code? Or should I just cut and paste the macro in question to the code window and then attempt to translate it to VBA code? 3. Should we Access developers regard this as the definitive signal to move to Visual Studio or some other dev platform? (Just about the only thing that keeps me on Windows is Access; take away that and you may as well call me an Ubuntu boy.) Arthur -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From jimdettman at verizon.net Mon Oct 26 08:35:42 2009 From: jimdettman at verizon.net (Jim Dettman) Date: Mon, 26 Oct 2009 09:35:42 -0400 Subject: [AccessD] Access 2007 Question In-Reply-To: <29f585dd0910251339u735bd228vb5548bc729c0d6dc@mail.gmail.com> References: <29f585dd0910251339u735bd228vb5548bc729c0d6dc@mail.gmail.com> Message-ID: <46DA0A672DC042DD9885A9F9A354135B@XPS> Arthur, <<3. Should we Access developers regard this as the definitive signal to move to Visual Studio or some other dev platform? (Just about the only thing that keeps me on Windows is Access; take away that and you may as well call me an Ubuntu boy.)>> Like John said, "Hey Ubuntu boy..." Really, Microsoft has been focused on VS and .Net as *the* development platform. Anything else just gets in the way. Personally I believe the beefing up of Macro's in 2007 is the lead in to ultimately discontinuing VBA. It's not quite clear to me how they plan to pull that off with companies like Autodesk relying on it so heavily, but that seems to be the plan (small disclaimer - I haven't been in the AutoCAD world in a while - things may have already changed). Access always has been marketed as an end-user tool and it now appears they are pushing even more heavily in that direction. Also consider that almost every new feature is geared to the end user rather then developers and developer type features have been taken out (user level security, replication, etc). And look how many developers have already shunned 2007. Heck how many don't even have it loaded on their systems? Seems pretty obvious to me that the writing is on the wall. FWIW, Jim. -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Arthur Fuller Sent: Sunday, October 25, 2009 4:39 PM To: Access Developers discussion and problem solving Subject: [AccessD] Access 2007 Question I have downloaded and built all the Access 2007 template apps. Every single one of them does its magic with macros not with VBA. This begs some questions: 1. Does this indicate that developers are no longer welcome in the Access community? How are we to read this, when even Northwind has been translated to macros from VBA code? 2. Is there a wizard that converts a macro to VBA code? Or should I just cut and paste the macro in question to the code window and then attempt to translate it to VBA code? 3. Should we Access developers regard this as the definitive signal to move to Visual Studio or some other dev platform? (Just about the only thing that keeps me on Windows is Access; take away that and you may as well call me an Ubuntu boy.) Arthur -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From rockysmolin at bchacc.com Mon Oct 26 08:42:28 2009 From: rockysmolin at bchacc.com (Rocky Smolin) Date: Mon, 26 Oct 2009 06:42:28 -0700 Subject: [AccessD] Office Key In-Reply-To: References: <337061D9901D419188041ACF59A8E66B@HAL9005><4AE47C64.10505@torchlake.com><200910252215123.SM04696@IBMT43p.cwgsy.net><8748D4D958044FD5BA8EE2349503672B@HAL9005> Message-ID: <2B9D15FEFE554B2097B98265065A383C@HAL9005> LOL - no he's 19 - a sophomore at Northwestern double majoring in Journalism and Psych, living in a frat house, has a steady girlfriend. His brother is 13 so I get to be Dad for a few more years. Stay tuned, amigo. It gets crazy. Rocky -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Mark Breen Sent: Sunday, October 25, 2009 11:59 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Office Key Hello Rocky, One additional suggestion to Jim's is to switch instead to Google Docs and Spreadsheets. It might possibly do most of what Max needs, and it has the added benefit that it is always backed up. I mentioned to Caitlin last night, that when I first met Max he was around her age (10.9), I was a little shocked when you mentioned that he would send it to you, IOW, he is no longer 12 and living at home. Thanks, Mark 2009/10/25 Rocky Smolin > That's my ace in the hole in case the key I got doesn't work. > > Rocky > > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Ralph Bryce > Sent: Sunday, October 25, 2009 3:17 PM > To: Access Developers discussion and problem solving > Subject: Re: [AccessD] Office Key > > > >Hi Rocky > > Have you tried this free program? > > > http://www.magicaljellybean.com/ > keyfinder/ > > > It retrieves the actual license key > > HTH > > Ralph Bryce > > > >Rocky Smolin wrote: > > > Dear List(s): > > > > > > My son Max's HD in his Dell LT crapped out about a month ago. Dell > > > replaced the drive. Of course, he had no backups. I told him to > > > send the drive to me to see if I could recover some of the > > > irreplaceable files. Which I was able to do. > > > > > > When I bought him this system I also got him Office 2007. OF > > > course, he can't find the original install disk, but he got a copy > > > from someone which is working but in a few days it's going to stop > > > working because it's not registered. > > > > > > So my question is - is the key stored in the registry somewhere? > > > If so, and I could find it on the old HD, I could email it to him, > > > he could register the copy he's using. > > > > > > MTIA, > > > > > > > > > > > > Rocky Smolin > > > > > > Beach Access Software > > > > > > 858-259-4334 > > > > > > www.e-z-mrp.com > > > > > > www.bchacc.com > > > > > > > > > > > > > > > > > > > > > > >-- > >AccessD mailing list > >AccessD at databaseadvisors.com > >http://databaseadvisors.com/mailman/listinfo/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 adtp at airtelmail.in Mon Oct 26 09:01:41 2009 From: adtp at airtelmail.in (A.D.Tejpal) Date: Mon, 26 Oct 2009 19:31:41 +0530 Subject: [AccessD] Form Controls References: <7c7841600910231652w3fac6a26rd376d003c1d09fc3@mail.gmail.com> <4AE24EFA.7070708@colbyconsulting.com> Message-ID: <004c01ca5645$7bd24370$8d60a27a@personald6374f> Run time handling of form controls in the order of tab index. ======================================== Use of a collection as suggested by J.C., appears to be the optimum approach, provided the point raised by Ken is addressed suitably. A form having three tab controls each with 4 pages, would need 15 collections as each form section or tab control page has its own set of tab indices for controls located therein. There could be an interesting way to handle this requirement conveniently by adoption of a single collection where each of its elements is itself a collection, permitting a generic subroutine to handle unlimited number of tab control pages apart from the three form sections (detail, header & footer) For convenient retrieval, one of the elements of this master collection could be a collection of object pointers to all sections and pages actually having tab indexed controls, thus serving as table of contents for primary containers. Sample code in form's module, demonstrating this approach, is given below. The collection at form level gets built up on loading the form. Thereafter, desired information can be retrieved from anywhere in the db, via either of the two public subroutines, named P_ListAllControlsByTabIndex() or P_ListControlsByTabIndexInSection() respectively. Some sample statements are given below (fm is an object pointer to the form in question): ' Sample statements for listing as per tab index '================================= ' List all controls on all form sections as well as ' all pages of all tab controls as per tab index fm.P_ListAllControlsByTabIndex ' List all controls on Detail section as per tab index fm.P_ListControlsByTabIndexInSection _ fm, fm.Section(0) ' List all controls on first page of given tab control ' as per tab index fm.P_ListControlsByTabIndexInSection _ fm, fm.MyTabControl.Pages(0) '================================= Best wishes, A.D. Tejpal ------------ ' Code in form's module '=============================== ' Declarations section ' It is a collection of collections Private colCt As Collection '----------------------------------------------- Private Sub Form_Close() Set colCt = Nothing End Sub '----------------------------------------------- Private Sub Form_Load() P_BuildControlColWholeForm Me End Sub '----------------------------------------------- Public Sub P_BuildControlColWholeForm( _ fm As Access.Form) Dim Cnt As Long ' Initialize form level global collection ' It is a collection of collections Set colCt = New Collection ' Add a new collection element to above ' collection so as to serve as table of contents ' for all sections / pages holding independent ' set of tab indices for controls located there. colCt.Add New Collection, "TOC" ' While handling the form sections one by one, ' all pages of all tab controls located on the ' given section also get covered by recursive ' calls to P_BuildControlColForSection() For Cnt = 0 To 2 P_BuildControlColForSection _ Me, Me.Section(Cnt) Next ' Note (Section Values): ' 0 (acDetail) for detail ' 1 (acHeader) for header ' 2 (acFooter) for footer End Sub '----------------------------------------------- Private Sub P_BuildControlColForSection( _ fm As Access.Form, sc As Object) On Error Resume Next ' Builds a temp collection of controls keyed ' as per tab index and adds this collection to ' form level global collection colCt. ' sc represents either a form section or tab ' control page Dim ct As Access.Control Dim pg As Access.Page Dim colTemp As Collection Dim Idx As Long, SKey As String Dim Cnt As Long ' Initialize temp collection of controls for this ' section or page (passed as argument sc) Set colTemp = New Collection Cnt = 0 For Each ct In sc.Controls Err.Clear Idx = ct.TabIndex If Err.Number = 0 Then If sc.Parent Is fm Then ' sc is a form section. Cycle through ' all controls on this section ' (When the argument to this subroutine ' is a form section, all controls belonging ' to tab control pages are to be ignored as ' there is independent set of tab indices ' for each tab page). If ct.Parent Is fm Then ' It is a control directly on the form Cnt = Cnt + 1 colTemp.Add ct, CStr(Idx) ' If it is a tab control, add the controls on ' each of its pages as collection elements ' in the main collection by recursive calls ' to this procedure. If ct.ControlType = acTabCtl Then For Each pg In ct.Pages P_BuildControlColForSection fm, pg Next End If End If Else ' sc is a tab control page Cnt = Cnt + 1 colTemp.Add ct, CStr(Idx) End If End If Next If Cnt > 0 Then ' If it is a form section, the key is made up ' of section name. ' If it is a page, the key is made up of a ' combination of tab control & page names. If sc.Parent Is fm Then ' sc is a form section SKey = sc.Name Else ' sc is a page of tab control SKey = sc.Parent.Name & ":" & sc.Name End If ' Add the freshly built temp collection as an ' element in form level global collection colCt colCt.Add colTemp, SKey ' Add this section or page to TOC collection ' element (which is part of colCt collection) colCt("TOC").Add sc, _ CStr(colCt("TOC").Count + 1) End If ' Note: ' The parent for controls on tab control page is ' the relevant page. For all others it is the form. ' Section property for all controls on a given ' section is identical, (irrespective of the fact ' whether the control is located directly on the ' form or on a tab control page). Set ct = Nothing Set pg = Nothing Set colTemp = Nothing On Error GoTo 0 End Sub '----------------------------------------------- Public Sub P_ListAllControlsByTabIndex() Dim obj As Object For Each obj In colCt("TOC") P_ListControlsByTabIndexInSection Me, obj Next Set obj = Nothing End Sub '----------------------------------------------- Public Sub P_ListControlsByTabIndexInSection( _ fm As Access.Form, sc As Object) On Error Resume Next ' Lists all controls located on form section or ' tab control page sc in the order of tab index. ' sc is an object pointer to the form section or ' tab control page. Dim Cnt As Long, Tot As Long Dim Hdg As String, SKey As String If sc.Parent Is fm Then ' sc is a form section. The key for sub-collection ' is made up of section name. SKey = sc.Name Tot = colCt(SKey).Count Hdg = "Section: " & SKey & _ ": Tot Tab Indexed Controls = " & Tot Else ' sc is a page of tab control The key for sub- ' collection is made up of a combination of tab ' control & page names. SKey = sc.Parent.Name & ":" & sc.Name Tot = colCt(SKey).Count Hdg = "Page: " & SKey & _ ": Tot Tab Indexed Controls = " & Tot End If If Err.Number = 0 And Tot > 0 Then Debug.Print Hdg For Cnt = 0 To Tot - 1 Debug.Print colCt(SKey)(CStr(Cnt)).Name Next Else Debug.Print "No tab indexed controls " & _ "found in " & SKey End If On Error GoTo 0 End Sub '=============================== ----- Original Message ----- From: jwcolby To: Access Developers discussion and problem solving Sent: Saturday, October 24, 2009 06:18 Subject: Re: [AccessD] Form Controls Well, the tab order only works for the section that the focus is in anyway, so have three collections, one for each section. John W. Colby www.ColbyConsulting.com ===================================== Kenneth Ismert wrote: > Hey, all: > > Charlotte Foust: >> If you're talking about in design view, the controls follow the >> order in which they were added, not the tab index, which >> can be changed. > > That is right initially, but the rendering order determines the Controls > collection order. Using the Bring to Front and Send to Back buttons in > form > design view changes the control order. This is how Access handles control > overlap without a z-index property: controls later in the collection > render > on top of those before. I'm pretty sure of this. > > Tab indexes, on the other hand, get re-used by section and tab page. This > means that if your form has header, footer and detail sections, as well > as > a tab control with three pages, you could have 6 controls with a tab index > of 1: one for each section and tab page. > > This means that any looping through controls by tab index has to be > recursive. You must go by section, then any tab pages in that section. > > Of course, this complicates adding controls to a collection keyed by tab > index. The straightforward way will work only for the simplest case: only > a > detail section with no tab pages. Otherwise, you will get duplicate tab > indexes, and your item add won't work the way you expect. > > -Ken From robert at servicexp.com Mon Oct 26 09:18:11 2009 From: robert at servicexp.com (Robert) Date: Mon, 26 Oct 2009 10:18:11 -0400 Subject: [AccessD] Access 2007 Question In-Reply-To: <46DA0A672DC042DD9885A9F9A354135B@XPS> References: <29f585dd0910251339u735bd228vb5548bc729c0d6dc@mail.gmail.com> <46DA0A672DC042DD9885A9F9A354135B@XPS> Message-ID: <000c01ca5647$281964a0$784c2de0$@com> While all of my development work is in A2007 (.mdb;.mde), I do see the "writing on the wall". Access, as a dev. tool is, I think pretty much dead. Access 2010 (or whatever they are calling it) pretty much puts the last nail in the coffin.... WBR Robert -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Jim Dettman Sent: Monday, October 26, 2009 9:36 AM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Access 2007 Question Arthur, <<3. Should we Access developers regard this as the definitive signal to move to Visual Studio or some other dev platform? (Just about the only thing that keeps me on Windows is Access; take away that and you may as well call me an Ubuntu boy.)>> Like John said, "Hey Ubuntu boy..." Really, Microsoft has been focused on VS and .Net as *the* development platform. Anything else just gets in the way. Personally I believe the beefing up of Macro's in 2007 is the lead in to ultimately discontinuing VBA. It's not quite clear to me how they plan to pull that off with companies like Autodesk relying on it so heavily, but that seems to be the plan (small disclaimer - I haven't been in the AutoCAD world in a while - things may have already changed). Access always has been marketed as an end-user tool and it now appears they are pushing even more heavily in that direction. Also consider that almost every new feature is geared to the end user rather then developers and developer type features have been taken out (user level security, replication, etc). And look how many developers have already shunned 2007. Heck how many don't even have it loaded on their systems? Seems pretty obvious to me that the writing is on the wall. FWIW, Jim. -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Arthur Fuller Sent: Sunday, October 25, 2009 4:39 PM To: Access Developers discussion and problem solving Subject: [AccessD] Access 2007 Question I have downloaded and built all the Access 2007 template apps. Every single one of them does its magic with macros not with VBA. This begs some questions: 1. Does this indicate that developers are no longer welcome in the Access community? How are we to read this, when even Northwind has been translated to macros from VBA code? 2. Is there a wizard that converts a macro to VBA code? Or should I just cut and paste the macro in question to the code window and then attempt to translate it to VBA code? 3. Should we Access developers regard this as the definitive signal to move to Visual Studio or some other dev platform? (Just about the only thing that keeps me on Windows is Access; take away that and you may as well call me an Ubuntu boy.) 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 iggy at nanaimo.ark.com Mon Oct 26 07:01:28 2009 From: iggy at nanaimo.ark.com (Tony Septav) Date: Mon, 26 Oct 2009 04:01:28 -0800 Subject: [AccessD] Form Controls Message-ID: <4AE58F98.4080207@nanaimo.ark.com> Hey All Looked at A. D. Teipal's code. I think I have been "asleep at the wheel", I haven't dealt with collections, don't ask me why not. Pretty cool stuff and it just all pasted me by, but......... not anymore. From cfoust at infostatsystems.com Mon Oct 26 11:22:03 2009 From: cfoust at infostatsystems.com (Charlotte Foust) Date: Mon, 26 Oct 2009 09:22:03 -0700 Subject: [AccessD] Access 2007 Question In-Reply-To: <29f585dd0910251339u735bd228vb5548bc729c0d6dc@mail.gmail.com> References: <29f585dd0910251339u735bd228vb5548bc729c0d6dc@mail.gmail.com> Message-ID: Access certainly used to have a wizard for converting macros to code, but it didn't do a very good job, since it created obsolete code in the process. Charlotte Foust -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Arthur Fuller Sent: Sunday, October 25, 2009 1:39 PM To: Access Developers discussion and problem solving Subject: [AccessD] Access 2007 Question I have downloaded and built all the Access 2007 template apps. Every single one of them does its magic with macros not with VBA. This begs some questions: 1. Does this indicate that developers are no longer welcome in the Access community? How are we to read this, when even Northwind has been translated to macros from VBA code? 2. Is there a wizard that converts a macro to VBA code? Or should I just cut and paste the macro in question to the code window and then attempt to translate it to VBA code? 3. Should we Access developers regard this as the definitive signal to move to Visual Studio or some other dev platform? (Just about the only thing that keeps me on Windows is Access; take away that and you may as well call me an Ubuntu boy.) Arthur -- From mwp.reid at qub.ac.uk Mon Oct 26 11:35:37 2009 From: mwp.reid at qub.ac.uk (Martin Reid) Date: Mon, 26 Oct 2009 16:35:37 +0000 Subject: [AccessD] Access 2007 Question In-Reply-To: References: <29f585dd0910251339u735bd228vb5548bc729c0d6dc@mail.gmail.com>, Message-ID: <631CF83223105545BF43EFB52CB0829502AE126BB5@EX2K7-VIRT-2.ads.qub.ac.uk> This gives you a good idea of where macros are going http://blogs.msdn.com/access/archive/2009/07/28/meet-the-access-2010-macro-designer.aspx Martin Martin WP Reid Information Services The Library at Queen's Tel : 02890976174 Email : mwp.reid at qub.ac.uk ________________________________________ From: accessd-bounces at databaseadvisors.com [accessd-bounces at databaseadvisors.com] On Behalf Of Charlotte Foust [cfoust at infostatsystems.com] Sent: 26 October 2009 16:22 To: Access Developers discussion and problem solving Subject: Re: [AccessD] Access 2007 Question Access certainly used to have a wizard for converting macros to code, but it didn't do a very good job, since it created obsolete code in the process. Charlotte Foust -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Arthur Fuller Sent: Sunday, October 25, 2009 1:39 PM To: Access Developers discussion and problem solving Subject: [AccessD] Access 2007 Question I have downloaded and built all the Access 2007 template apps. Every single one of them does its magic with macros not with VBA. This begs some questions: 1. Does this indicate that developers are no longer welcome in the Access community? How are we to read this, when even Northwind has been translated to macros from VBA code? 2. Is there a wizard that converts a macro to VBA code? Or should I just cut and paste the macro in question to the code window and then attempt to translate it to VBA code? 3. Should we Access developers regard this as the definitive signal to move to Visual Studio or some other dev platform? (Just about the only thing that keeps me on Windows is Access; take away that and you may as well call me an Ubuntu boy.) Arthur -- -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From Gustav at cactus.dk Mon Oct 26 11:55:30 2009 From: Gustav at cactus.dk (Gustav Brock) Date: Mon, 26 Oct 2009 17:55:30 +0100 Subject: [AccessD] Access 2007 Question Message-ID: Hi Martin Ouch, it certainly does. Looks like Access is approaching FileMaker. I'm out. /gustav >>> mwp.reid at qub.ac.uk 26-10-2009 17:35 >>> This gives you a good idea of where macros are going http://blogs.msdn.com/access/archive/2009/07/28/meet-the-access-2010-macro-designer.aspx Martin Martin WP Reid Information Services The Library at Queen's Tel : 02890976174 Email : mwp.reid at qub.ac.uk ________________________________________ From: accessd-bounces at databaseadvisors.com [accessd-bounces at databaseadvisors.com] On Behalf Of Charlotte Foust [cfoust at infostatsystems.com] Sent: 26 October 2009 16:22 To: Access Developers discussion and problem solving Subject: Re: [AccessD] Access 2007 Question Access certainly used to have a wizard for converting macros to code, but it didn't do a very good job, since it created obsolete code in the process. Charlotte Foust -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Arthur Fuller Sent: Sunday, October 25, 2009 1:39 PM To: Access Developers discussion and problem solving Subject: [AccessD] Access 2007 Question I have downloaded and built all the Access 2007 template apps. Every single one of them does its magic with macros not with VBA. This begs some questions: 1. Does this indicate that developers are no longer welcome in the Access community? How are we to read this, when even Northwind has been translated to macros from VBA code? 2. Is there a wizard that converts a macro to VBA code? Or should I just cut and paste the macro in question to the code window and then attempt to translate it to VBA code? 3. Should we Access developers regard this as the definitive signal to move to Visual Studio or some other dev platform? (Just about the only thing that keeps me on Windows is Access; take away that and you may as well call me an Ubuntu boy.) Arthur From rockysmolin at bchacc.com Mon Oct 26 12:00:32 2009 From: rockysmolin at bchacc.com (Rocky Smolin) Date: Mon, 26 Oct 2009 10:00:32 -0700 Subject: [AccessD] Access 2007 Question In-Reply-To: <631CF83223105545BF43EFB52CB0829502AE126BB5@EX2K7-VIRT-2.ads.qub.ac.uk> References: <29f585dd0910251339u735bd228vb5548bc729c0d6dc@mail.gmail.com>, <631CF83223105545BF43EFB52CB0829502AE126BB5@EX2K7-VIRT-2.ads.qub.ac.uk> Message-ID: In general, why is there a preference for VBA over macros? I can see where VBA might have more flexibility but for repetitive cookie cutter tasks aren't macros quite effective? Rocky -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Martin Reid Sent: Monday, October 26, 2009 9:36 AM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Access 2007 Question This gives you a good idea of where macros are going http://blogs.msdn.com/access/archive/2009/07/28/meet-the-access-2010-macro-d esigner.aspx Martin Martin WP Reid Information Services The Library at Queen's Tel : 02890976174 Email : mwp.reid at qub.ac.uk ________________________________________ From: accessd-bounces at databaseadvisors.com [accessd-bounces at databaseadvisors.com] On Behalf Of Charlotte Foust [cfoust at infostatsystems.com] Sent: 26 October 2009 16:22 To: Access Developers discussion and problem solving Subject: Re: [AccessD] Access 2007 Question Access certainly used to have a wizard for converting macros to code, but it didn't do a very good job, since it created obsolete code in the process. Charlotte Foust -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Arthur Fuller Sent: Sunday, October 25, 2009 1:39 PM To: Access Developers discussion and problem solving Subject: [AccessD] Access 2007 Question I have downloaded and built all the Access 2007 template apps. Every single one of them does its magic with macros not with VBA. This begs some questions: 1. Does this indicate that developers are no longer welcome in the Access community? How are we to read this, when even Northwind has been translated to macros from VBA code? 2. Is there a wizard that converts a macro to VBA code? Or should I just cut and paste the macro in question to the code window and then attempt to translate it to VBA code? 3. Should we Access developers regard this as the definitive signal to move to Visual Studio or some other dev platform? (Just about the only thing that keeps me on Windows is Access; take away that and you may as well call me an Ubuntu boy.) 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 davidmcafee at gmail.com Mon Oct 26 12:19:53 2009 From: davidmcafee at gmail.com (David McAfee) Date: Mon, 26 Oct 2009 10:19:53 -0700 Subject: [AccessD] Access 2007 Question In-Reply-To: References: <29f585dd0910251339u735bd228vb5548bc729c0d6dc@mail.gmail.com> <631CF83223105545BF43EFB52CB0829502AE126BB5@EX2K7-VIRT-2.ads.qub.ac.uk> Message-ID: <8786a4c00910261019v5bc68447j25b8462031d94660@mail.gmail.com> Error handling? On Mon, Oct 26, 2009 at 10:00 AM, Rocky Smolin wrote: > In general, why is there a preference for VBA over macros? ?I can see where > VBA might have more flexibility but for repetitive cookie cutter tasks > aren't macros quite effective? > > Rocky From Johncliviger at aol.com Mon Oct 26 12:24:48 2009 From: Johncliviger at aol.com (Johncliviger at aol.com) Date: Mon, 26 Oct 2009 13:24:48 EDT Subject: [AccessD] Office Key Message-ID: Hi Rocky Try Belare's Analysis at _http://www.belarc.com/free_download.html_ (http://www.belarc.com/free_download.html) Its lists both 2002 and 2007 product keys on one of my pcs john cliviger From jwcolby at colbyconsulting.com Mon Oct 26 12:26:07 2009 From: jwcolby at colbyconsulting.com (jwcolby) Date: Mon, 26 Oct 2009 13:26:07 -0400 Subject: [AccessD] Form Controls - Class implementation In-Reply-To: <004c01ca5645$7bd24370$8d60a27a@personald6374f> References: <7c7841600910231652w3fac6a26rd376d003c1d09fc3@mail.gmail.com> <4AE24EFA.7070708@colbyconsulting.com> <004c01ca5645$7bd24370$8d60a27a@personald6374f> Message-ID: <4AE5DBAF.1010002@colbyconsulting.com> A.D wrote: > There could be an interesting way to handle this requirement conveniently by adoption of a single collection where each of its elements is itself a collection, Ick!!! Can you say CLASSES? I used to use collections of collections, and while they do work it gets UGLY VERY QUICKLY! OK A.D, you have thrown down the gauntlet. ;) Here is a class implementation. Two classes - this is the first: clsCtlSorted - the collection of controls in sorted order for some object (section or tab page) Option Compare Database Option Explicit Private mstrObjName As String Private mcolCtlsSorted As Collection Private Sub Class_Initialize() Set mcolCtlsSorted = New Collection End Sub Private Sub Class_Terminate() Set mcolCtlsSorted = Nothing End Sub ' 'Pass in any collection of controls to be stored in sorted order ' Function mInit(lstrObjName As String, colControls As Object, blnIsSection As Boolean) If blnIsSection Then mStoreSectionCtls lstrObjName, colControls Else mStoreNonSectionCtls lstrObjName, colControls End If End Function ' 'Tests for and stores section controls not on tabs ' Private Function mStoreSectionCtls(lstrObjName As String, colControls As Object) Dim ctl As Control 'Dim a ctl object to use in the ofr each loop Dim intTabIndex As Integer 'Dim a variable to use to generate an error if the control does NOT have a tabindex property Dim ctlParent As Control 'Dim a variable to test whether the parent is a control mstrObjName = lstrObjName For Each ctl In colControls 'For each iterator to grab controls from collection On Error Resume Next intTabIndex = ctl.TabIndex 'Test for the TabIndex property If Err = 0 Then 'If no error then process control (store in the collection) Set ctlParent = ctl.Parent If Err = 0 Then Else mcolCtlsSorted.Add ctl, CStr(ctl.TabIndex) Err.Clear End If Else Err.Clear End If Next ctl End Function ' 'Tests for and stores controls not directly on the section (on a tab) ' Private Function mStoreNonSectionCtls(lstrObjName As String, colControls As Object) Dim ctl As Control 'Dim a ctl object to use in the ofr each loop Dim intTabIndex As Integer 'Dim a variable to use to generate an error if the control does NOT have a tabindex property Dim ctlParent As Control 'Dim a variable to test whether the parent is a control mstrObjName = lstrObjName For Each ctl In colControls 'For each iterator to grab controls from collection On Error Resume Next intTabIndex = ctl.TabIndex 'Test for the TabIndex property If Err = 0 Then 'If no error then process control (store in the collection) Set ctlParent = ctl.Parent If Err = 0 Then mcolCtlsSorted.Add ctl, CStr(ctl.TabIndex) Else Err.Clear End If Else Err.Clear End If Next ctl End Function Property Get pObjName() As String pObjName = mstrObjName End Property ' 'Iterate the collection of controls getting each control name 'and appending it to a string ' Property Get pCtlNames() As String Dim ctl As Control Dim strCtlNames As String strCtlNames = pObjName & ":: " & vbCrLf For Each ctl In mcolCtlsSorted strCtlNames = strCtlNames & vbTab & ctl.Name Next ctl pCtlNames = strCtlNames End Property ' 'Return the collection of controls in sorted order (keyed on TabIndex) ' Property Get pCtlsSorted() As Collection Set pCtlsSorted = mcolCtlsSorted End Property John W. Colby www.ColbyConsulting.com A.D.Tejpal wrote: > Run time handling of form controls in the order of tab index. > ======================================== > > Use of a collection as suggested by J.C., appears to be the optimum > approach, provided the point raised by Ken is addressed suitably. A form > having three tab controls each with 4 pages, would need 15 collections as > each form section or tab control page has its own set of tab indices for > controls located therein. > > There could be an interesting way to handle this requirement > conveniently by adoption of a single collection where each of its elements > is itself a collection, permitting a generic subroutine to handle unlimited > number of tab control pages apart from the three form sections (detail, > header & footer) From jwcolby at colbyconsulting.com Mon Oct 26 12:29:02 2009 From: jwcolby at colbyconsulting.com (jwcolby) Date: Mon, 26 Oct 2009 13:29:02 -0400 Subject: [AccessD] Form Controls - Class implementation In-Reply-To: <004c01ca5645$7bd24370$8d60a27a@personald6374f> References: <7c7841600910231652w3fac6a26rd376d003c1d09fc3@mail.gmail.com> <4AE24EFA.7070708@colbyconsulting.com> <004c01ca5645$7bd24370$8d60a27a@personald6374f> Message-ID: <4AE5DC5E.6050401@colbyconsulting.com> Second class - the supervisor: Option Compare Database Option Explicit Private colClsCtlsSorted As Collection Private Sub Class_Initialize() Set colClsCtlsSorted = New Collection End Sub Private Sub Class_Terminate() Set colClsCtlsSorted = Nothing End Sub Function mInit(frm As Form) mScanFormForSections frm End Function ' 'Returns a string of all controls and what object they belong to ' Property Get pCtlNames() As String Dim lclsCtlsSorted As clsCtlsSorted Dim strCtlNames As String For Each lclsCtlsSorted In colClsCtlsSorted strCtlNames = strCtlNames & lclsCtlsSorted.pCtlNames() & vbCrLf Next lclsCtlsSorted pCtlNames = strCtlNames Debug.Print strCtlNames End Property ' 'The class factory creates an instance of clsCtlsSorted, 'passing in the name of the object in the form 'that contained the controls collection ' 'After the class is instantiated and initialized, 'the instance is stored in colClsCtlsSorted 'keyed on the name of the object that contained the controls collection ' Private Function mClassFactory(lstrObjName As String, colControls As Object, blnIsSection As Boolean) Dim lclsCtlsSorted As clsCtlsSorted Set lclsCtlsSorted = New clsCtlsSorted lclsCtlsSorted.mInit lstrObjName, colControls, blnIsSection colClsCtlsSorted.Add lclsCtlsSorted, lstrObjName End Function ' 'Return the entire collection of all instances of clsCtlSorted ' Property Get colClsControlsSorted() As Collection Set colClsControlsSorted = colClsCtlsSorted End Property ' 'Return a clsCtlSorted instance for a specific object (tab, form section etc) ' 'strObjName is the name of the tab page, control section etc. ' Function cControlsSorted(strObjName As String) As clsCtlsSorted On Error Resume Next Set cControlsSorted = colClsCtlsSorted(strObjName) End Function ' 'Finds every section of a form 'Having found any valid section, it creates an 'instance of clsCtlsSorted for that section ' '--------------------------------------------------------------------------------------- ' Procedure : mScanFormForSections ' Author : jwcolby ' Date : 10/26/2009 ' Purpose : '--------------------------------------------------------------------------------------- ' Function mScanFormForSections(frm As Form) Dim sec As Section Dim intSection As Integer On Error GoTo Err_mScanFormForSections On Error Resume Next For intSection = 0 To 4 'There are only 5 sections in a form Set sec = frm.Section(intSection) 'Test to see if the section exists If Err = 0 Then 'The section exists so On Error GoTo Err_mScanFormForSections mClassFactory sec.Name, sec.Controls(), True 'Get an instance of lclsCtlsSorted mScanSectionForControls sec 'Now scan the section for tab controls Else Err.Clear End If Next intSection Exit_mScanFormForSections: On Error Resume Next Exit Function Err_mScanFormForSections: Select Case Err Case 0 '.insert Errors you wish to ignore here Resume Next Case Else '.All other errors will trap Beep MsgBox Err.Number & ":" & Err.Description Resume Exit_mScanFormForSections End Select Resume 0 '.FOR TROUBLESHOOTING End Function ' 'Sections can contain tabs 'which contain pages which contain controls ' Function mScanSectionForControls(sec As Section) Dim ctl As Control For Each ctl In sec.Controls 'Iterate the section's contyrol collection If ctl.ControlType = acTabCtl Then 'Look for tab controls mScanTabForPages ctl 'Look for pages of the tab control End If Next ctl End Function ' 'Find all pages of a tab control ' Function mScanTabForPages(ctlTab As Control) Dim pg As page For Each pg In ctlTab.Pages 'Iterate the page collection mClassFactory ctlTab.Name & "." & pg.Name, pg.Controls, False 'Get an instance of lclsCtlsSorted for the page Next pg End Function John W. Colby www.ColbyConsulting.com A.D.Tejpal wrote: > Run time handling of form controls in the order of tab index. > ======================================== > > Use of a collection as suggested by J.C., appears to be the optimum > approach, provided the point raised by Ken is addressed suitably. A form > having three tab controls each with 4 pages, would need 15 collections as > each form section or tab control page has its own set of tab indices for > controls located therein. > > There could be an interesting way to handle this requirement > conveniently by adoption of a single collection where each of its elements > is itself a collection, permitting a generic subroutine to handle unlimited > number of tab control pages apart from the three form sections (detail, > header & footer) From jwcolby at colbyconsulting.com Mon Oct 26 12:30:05 2009 From: jwcolby at colbyconsulting.com (jwcolby) Date: Mon, 26 Oct 2009 13:30:05 -0400 Subject: [AccessD] Form Controls - Class implementation In-Reply-To: <004c01ca5645$7bd24370$8d60a27a@personald6374f> References: <7c7841600910231652w3fac6a26rd376d003c1d09fc3@mail.gmail.com> <4AE24EFA.7070708@colbyconsulting.com> <004c01ca5645$7bd24370$8d60a27a@personald6374f> Message-ID: <4AE5DC9D.2020803@colbyconsulting.com> The form code: Option Compare Database Option Explicit Public fclsCtlSortSupervisor As clsCtlSortSupervisor Private Sub Form_Open(Cancel As Integer) Set fclsCtlSortSupervisor = New clsCtlSortSupervisor fclsCtlSortSupervisor.mInit Me MsgBox fclsCtlSortSupervisor.pCtlNames() End Sub Private Sub Form_Close() Set fclsCtlSortSupervisor = Nothing End Sub John W. Colby www.ColbyConsulting.com A.D.Tejpal wrote: > Run time handling of form controls in the order of tab index. > ======================================== > > Use of a collection as suggested by J.C., appears to be the optimum > approach, provided the point raised by Ken is addressed suitably. A form > having three tab controls each with 4 pages, would need 15 collections as > each form section or tab control page has its own set of tab indices for > controls located therein. > > There could be an interesting way to handle this requirement > conveniently by adoption of a single collection where each of its elements > is itself a collection, permitting a generic subroutine to handle unlimited > number of tab control pages apart from the three form sections (detail, > header & footer) From jwcolby at colbyconsulting.com Mon Oct 26 12:51:59 2009 From: jwcolby at colbyconsulting.com (jwcolby) Date: Mon, 26 Oct 2009 13:51:59 -0400 Subject: [AccessD] Form Controls - Class implementation In-Reply-To: <004c01ca5645$7bd24370$8d60a27a@personald6374f> References: <7c7841600910231652w3fac6a26rd376d003c1d09fc3@mail.gmail.com> <4AE24EFA.7070708@colbyconsulting.com> <004c01ca5645$7bd24370$8d60a27a@personald6374f> Message-ID: <4AE5E1BF.8090403@colbyconsulting.com> I have sent three emails with the code for the same thing using a pair of classes. Data and code encapsulation!!! IMHO breaking this into classes makes the coding much clearer. Now you can see that anything in clsCtlsSorted has to do with the controls in a given object (section or tab page). clsCtlsSorted (almost) doesn't care what the object is that it is storing controls for. It simply takes an object that has a controls collection and iterates the controls collection, storing the controls found. clsCtlSortSupervisor is the supervisor class. It is responsible for finding sections and tab controls, and instantiating clsCtlsSorted once for each form section and each tab control. Each instance of clsCtlsSorted is stored in a collection, keyed on the name of the object (section name or tabname.Pagename. clsCtlsSorted is responsible for storing the controls in a collection sorted on cstr(TabIndex) of each control. clsCtlsSorted is responsible for discovering whether the controls are directly on the form or in a tab and storing only the correct controls, IOW not store controls which are on a tab in a clsCtlsSorted instance for a section, and not store controls in a section in a clsCtlsSorted instance for a tab. Each class has properties and methods for its specific job. Each has a collection. Each can return the entire collection. clsCtlSortSupervisor can return the class instance for any given object by name. Each class can be modified to perform other tasks or processes as needed, or can be passed in to other classes to perform processing on the collection of controls that it contains. Each class can return a string of the names of the objects stored in its collection. the following is the string of all controls on a test form (which have a TabIndex property). Detail:: TabCtl22 Check35 Check37 Check39 Check41 Check43 TabCtl22.Page23:: Check12 Check14 Check16 Check18 Check20 Frame45 TabCtl22.Page24:: Text66 FormHeader:: Combo4 Combo6 FormFooter:: Command0 Command1 PageHeaderSection:: Text8 Text10 PageFooterSection:: Command2 Command3 John W. Colby www.ColbyConsulting.com A.D.Tejpal wrote: > Run time handling of form controls in the order of tab index. > ======================================== > > Use of a collection as suggested by J.C., appears to be the optimum > approach, provided the point raised by Ken is addressed suitably. A form > having three tab controls each with 4 pages, would need 15 collections as > each form section or tab control page has its own set of tab indices for > controls located therein. > > There could be an interesting way to handle this requirement > conveniently by adoption of a single collection where each of its elements > is itself a collection, permitting a generic subroutine to handle unlimited > number of tab control pages apart from the three form sections (detail, > header & footer) From rockysmolin at bchacc.com Mon Oct 26 12:57:08 2009 From: rockysmolin at bchacc.com (Rocky Smolin) Date: Mon, 26 Oct 2009 10:57:08 -0700 Subject: [AccessD] Access 2007 Question In-Reply-To: <8786a4c00910261019v5bc68447j25b8462031d94660@mail.gmail.com> References: <29f585dd0910251339u735bd228vb5548bc729c0d6dc@mail.gmail.com><631CF83223105545BF43EFB52CB0829502AE126BB5@EX2K7-VIRT-2.ads.qub.ac.uk> <8786a4c00910261019v5bc68447j25b8462031d94660@mail.gmail.com> Message-ID: <4625EBF8B4DF457D97D337ED3E59DE6C@HAL9005> The link Martin provided showed error handling in the macro. R -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of David McAfee Sent: Monday, October 26, 2009 10:20 AM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Access 2007 Question Error handling? On Mon, Oct 26, 2009 at 10:00 AM, Rocky Smolin wrote: > In general, why is there a preference for VBA over macros? ?I can see > where VBA might have more flexibility but for repetitive cookie cutter > tasks aren't macros quite effective? > > Rocky -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From rockysmolin at bchacc.com Mon Oct 26 13:01:00 2009 From: rockysmolin at bchacc.com (Rocky Smolin) Date: Mon, 26 Oct 2009 11:01:00 -0700 Subject: [AccessD] Office Key In-Reply-To: References: Message-ID: Thanks John. That looks promising. Do you know if I can tell it to look in a registry on a different drive (I'm assuming it's looking for the key in the registry. Could it be in the Office folder?) Rocky -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Johncliviger at aol.com Sent: Monday, October 26, 2009 10:25 AM To: accessd at databaseadvisors.com Subject: Re: [AccessD] Office Key Hi Rocky Try Belare's Analysis at _http://www.belarc.com/free_download.html_ (http://www.belarc.com/free_download.html) Its lists both 2002 and 2007 product keys on one of my pcs john cliviger -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From cfoust at infostatsystems.com Mon Oct 26 13:00:01 2009 From: cfoust at infostatsystems.com (Charlotte Foust) Date: Mon, 26 Oct 2009 11:00:01 -0700 Subject: [AccessD] Access 2007 Question In-Reply-To: References: <29f585dd0910251339u735bd228vb5548bc729c0d6dc@mail.gmail.com>, <631CF83223105545BF43EFB52CB0829502AE126BB5@EX2K7-VIRT-2.ads.qub.ac.uk> Message-ID: I, personally, was writing something like those macros thirty years ago for my calculator. Doesn't really appeal for Access. Charlotte Foust -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Rocky Smolin Sent: Monday, October 26, 2009 10:01 AM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Access 2007 Question In general, why is there a preference for VBA over macros? I can see where VBA might have more flexibility but for repetitive cookie cutter tasks aren't macros quite effective? Rocky -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Martin Reid Sent: Monday, October 26, 2009 9:36 AM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Access 2007 Question This gives you a good idea of where macros are going http://blogs.msdn.com/access/archive/2009/07/28/meet-the-access-2010-mac ro-d esigner.aspx Martin Martin WP Reid Information Services The Library at Queen's Tel : 02890976174 Email : mwp.reid at qub.ac.uk ________________________________________ From: accessd-bounces at databaseadvisors.com [accessd-bounces at databaseadvisors.com] On Behalf Of Charlotte Foust [cfoust at infostatsystems.com] Sent: 26 October 2009 16:22 To: Access Developers discussion and problem solving Subject: Re: [AccessD] Access 2007 Question Access certainly used to have a wizard for converting macros to code, but it didn't do a very good job, since it created obsolete code in the process. Charlotte Foust -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Arthur Fuller Sent: Sunday, October 25, 2009 1:39 PM To: Access Developers discussion and problem solving Subject: [AccessD] Access 2007 Question I have downloaded and built all the Access 2007 template apps. Every single one of them does its magic with macros not with VBA. This begs some questions: 1. Does this indicate that developers are no longer welcome in the Access community? How are we to read this, when even Northwind has been translated to macros from VBA code? 2. Is there a wizard that converts a macro to VBA code? Or should I just cut and paste the macro in question to the code window and then attempt to translate it to VBA code? 3. Should we Access developers regard this as the definitive signal to move to Visual Studio or some other dev platform? (Just about the only thing that keeps me on Windows is Access; take away that and you may as well call me an Ubuntu boy.) 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 -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From cfoust at infostatsystems.com Mon Oct 26 13:00:31 2009 From: cfoust at infostatsystems.com (Charlotte Foust) Date: Mon, 26 Oct 2009 11:00:31 -0700 Subject: [AccessD] Access 2007 Question In-Reply-To: <8786a4c00910261019v5bc68447j25b8462031d94660@mail.gmail.com> References: <29f585dd0910251339u735bd228vb5548bc729c0d6dc@mail.gmail.com><631CF83223105545BF43EFB52CB0829502AE126BB5@EX2K7-VIRT-2.ads.qub.ac.uk> <8786a4c00910261019v5bc68447j25b8462031d94660@mail.gmail.com> Message-ID: It will be there, I believe, in 2010. Charlotte Foust -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of David McAfee Sent: Monday, October 26, 2009 10:20 AM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Access 2007 Question Error handling? On Mon, Oct 26, 2009 at 10:00 AM, Rocky Smolin wrote: > In general, why is there a preference for VBA over macros? ?I can see > where VBA might have more flexibility but for repetitive cookie cutter > tasks aren't macros quite effective? > > Rocky -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From rockysmolin at bchacc.com Mon Oct 26 13:18:29 2009 From: rockysmolin at bchacc.com (Rocky Smolin) Date: Mon, 26 Oct 2009 11:18:29 -0700 Subject: [AccessD] Access 2007 Question In-Reply-To: References: <29f585dd0910251339u735bd228vb5548bc729c0d6dc@mail.gmail.com>, <631CF83223105545BF43EFB52CB0829502AE126BB5@EX2K7-VIRT-2.ads.qub.ac.uk> Message-ID: Well, aside from being 'old school', functionally, what are their drawbacks? R -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Charlotte Foust Sent: Monday, October 26, 2009 11:00 AM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Access 2007 Question I, personally, was writing something like those macros thirty years ago for my calculator. Doesn't really appeal for Access. Charlotte Foust -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Rocky Smolin Sent: Monday, October 26, 2009 10:01 AM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Access 2007 Question In general, why is there a preference for VBA over macros? I can see where VBA might have more flexibility but for repetitive cookie cutter tasks aren't macros quite effective? Rocky -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Martin Reid Sent: Monday, October 26, 2009 9:36 AM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Access 2007 Question This gives you a good idea of where macros are going http://blogs.msdn.com/access/archive/2009/07/28/meet-the-access-2010-mac ro-d esigner.aspx Martin Martin WP Reid Information Services The Library at Queen's Tel : 02890976174 Email : mwp.reid at qub.ac.uk ________________________________________ From: accessd-bounces at databaseadvisors.com [accessd-bounces at databaseadvisors.com] On Behalf Of Charlotte Foust [cfoust at infostatsystems.com] Sent: 26 October 2009 16:22 To: Access Developers discussion and problem solving Subject: Re: [AccessD] Access 2007 Question Access certainly used to have a wizard for converting macros to code, but it didn't do a very good job, since it created obsolete code in the process. Charlotte Foust -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Arthur Fuller Sent: Sunday, October 25, 2009 1:39 PM To: Access Developers discussion and problem solving Subject: [AccessD] Access 2007 Question I have downloaded and built all the Access 2007 template apps. Every single one of them does its magic with macros not with VBA. This begs some questions: 1. Does this indicate that developers are no longer welcome in the Access community? How are we to read this, when even Northwind has been translated to macros from VBA code? 2. Is there a wizard that converts a macro to VBA code? Or should I just cut and paste the macro in question to the code window and then attempt to translate it to VBA code? 3. Should we Access developers regard this as the definitive signal to move to Visual Studio or some other dev platform? (Just about the only thing that keeps me on Windows is Access; take away that and you may as well call me an Ubuntu boy.) 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 -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From cfoust at infostatsystems.com Mon Oct 26 13:30:19 2009 From: cfoust at infostatsystems.com (Charlotte Foust) Date: Mon, 26 Oct 2009 11:30:19 -0700 Subject: [AccessD] Access 2007 Question In-Reply-To: References: <29f585dd0910251339u735bd228vb5548bc729c0d6dc@mail.gmail.com>, <631CF83223105545BF43EFB52CB0829502AE126BB5@EX2K7-VIRT-2.ads.qub.ac.uk> Message-ID: Limited flexibility. Apparently they're throwing in at least a degree of nesting, but I doubt that it will substitute adequately for VBA. Charlotte Foust -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Rocky Smolin Sent: Monday, October 26, 2009 11:18 AM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Access 2007 Question Well, aside from being 'old school', functionally, what are their drawbacks? R -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Charlotte Foust Sent: Monday, October 26, 2009 11:00 AM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Access 2007 Question I, personally, was writing something like those macros thirty years ago for my calculator. Doesn't really appeal for Access. Charlotte Foust -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Rocky Smolin Sent: Monday, October 26, 2009 10:01 AM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Access 2007 Question In general, why is there a preference for VBA over macros? I can see where VBA might have more flexibility but for repetitive cookie cutter tasks aren't macros quite effective? Rocky From max.wanadoo at gmail.com Mon Oct 26 13:32:45 2009 From: max.wanadoo at gmail.com (Max Wanadoo) Date: Mon, 26 Oct 2009 18:32:45 -0000 Subject: [AccessD] Access 2007 Question In-Reply-To: References: <29f585dd0910251339u735bd228vb5548bc729c0d6dc@mail.gmail.com>, <631CF83223105545BF43EFB52CB0829502AE126BB5@EX2K7-VIRT-2.ads.qub.ac.uk> Message-ID: <4ae5eb60.0305560a.33e7.5f38@mx.google.com> Apros pro Macros code, I have a free prog called Short-Keys and in there I build short common routines that previously I had to type over and over again. Now by pressing #x it magically appears already typed into my keyboard buffer and thus onto my screen. The # is my self-defined "invoke" key and the x denotes my keypress which relates to this particular invocation of a Short-Key. There is a limit in the free version but it is great for my needs. I was thinking of creating one for Max signature... Max -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Rocky Smolin Sent: 26 October 2009 18:18 To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Access 2007 Question Well, aside from being 'old school', functionally, what are their drawbacks? R -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Charlotte Foust Sent: Monday, October 26, 2009 11:00 AM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Access 2007 Question I, personally, was writing something like those macros thirty years ago for my calculator. Doesn't really appeal for Access. Charlotte Foust -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Rocky Smolin Sent: Monday, October 26, 2009 10:01 AM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Access 2007 Question In general, why is there a preference for VBA over macros? I can see where VBA might have more flexibility but for repetitive cookie cutter tasks aren't macros quite effective? Rocky -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Martin Reid Sent: Monday, October 26, 2009 9:36 AM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Access 2007 Question This gives you a good idea of where macros are going http://blogs.msdn.com/access/archive/2009/07/28/meet-the-access-2010-mac ro-d esigner.aspx Martin Martin WP Reid Information Services The Library at Queen's Tel : 02890976174 Email : mwp.reid at qub.ac.uk ________________________________________ From: accessd-bounces at databaseadvisors.com [accessd-bounces at databaseadvisors.com] On Behalf Of Charlotte Foust [cfoust at infostatsystems.com] Sent: 26 October 2009 16:22 To: Access Developers discussion and problem solving Subject: Re: [AccessD] Access 2007 Question Access certainly used to have a wizard for converting macros to code, but it didn't do a very good job, since it created obsolete code in the process. Charlotte Foust -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Arthur Fuller Sent: Sunday, October 25, 2009 1:39 PM To: Access Developers discussion and problem solving Subject: [AccessD] Access 2007 Question I have downloaded and built all the Access 2007 template apps. Every single one of them does its magic with macros not with VBA. This begs some questions: 1. Does this indicate that developers are no longer welcome in the Access community? How are we to read this, when even Northwind has been translated to macros from VBA code? 2. Is there a wizard that converts a macro to VBA code? Or should I just cut and paste the macro in question to the code window and then attempt to translate it to VBA code? 3. Should we Access developers regard this as the definitive signal to move to Visual Studio or some other dev platform? (Just about the only thing that keeps me on Windows is Access; take away that and you may as well call me an Ubuntu boy.) 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 -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From Gustav at cactus.dk Mon Oct 26 13:36:24 2009 From: Gustav at cactus.dk (Gustav Brock) Date: Mon, 26 Oct 2009 19:36:24 +0100 Subject: [AccessD] Access 2007 Question Message-ID: Hi Charlotte That nails it precisely! I recall many good hours with my HP25C and its 100 steps code (wasn't it like that?) - I loved that machine. Many years later you had "programmable" typewriters - great fun too. Not to mention the weird macro language of WordPerfect driven to extremes in the WP Macro Editor! But those were really closed circuits. After having fooled around with the macros of Access 1.x, Access Basic was like entering a wide open space with endless options. Later I've had much the same feeling with Visual Studio and C#. /gustav >>> cfoust at infostatsystems.com 26-10-2009 19:00 >>> I, personally, was writing something like those macros thirty years ago for my calculator. Doesn't really appeal for Access. Charlotte Foust From jwcolby at colbyconsulting.com Mon Oct 26 13:50:45 2009 From: jwcolby at colbyconsulting.com (jwcolby) Date: Mon, 26 Oct 2009 14:50:45 -0400 Subject: [AccessD] Access 2007 Question In-Reply-To: References: <29f585dd0910251339u735bd228vb5548bc729c0d6dc@mail.gmail.com>, <631CF83223105545BF43EFB52CB0829502AE126BB5@EX2K7-VIRT-2.ads.qub.ac.uk> Message-ID: <4AE5EF85.1060704@colbyconsulting.com> Typed variables, requiring variables to be dimmed prior to use, looping structures, case statements, returning values from functions, passing variables by value / reference, collections, classes, modules, libraries... Uhh... a real programming language? Obviously they don't call them Macros for nothing. I see this probably allowing power users to do more, make more of a mess that has to be cleaned up by the consultant hired to clean up messes. This means more consulting work, more hours of cleanup. John W. Colby www.ColbyConsulting.com Rocky Smolin wrote: > In general, why is there a preference for VBA over macros? I can see where > VBA might have more flexibility but for repetitive cookie cutter tasks > aren't macros quite effective? > > Rocky > > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Martin Reid > Sent: Monday, October 26, 2009 9:36 AM > To: Access Developers discussion and problem solving > Subject: Re: [AccessD] Access 2007 Question > > This gives you a good idea of where macros are going > > http://blogs.msdn.com/access/archive/2009/07/28/meet-the-access-2010-macro-d > esigner.aspx > > > Martin > > > Martin WP Reid > Information Services > The Library at Queen's > Tel : 02890976174 > Email : mwp.reid at qub.ac.uk > ________________________________________ > From: accessd-bounces at databaseadvisors.com > [accessd-bounces at databaseadvisors.com] On Behalf Of Charlotte Foust > [cfoust at infostatsystems.com] > Sent: 26 October 2009 16:22 > To: Access Developers discussion and problem solving > Subject: Re: [AccessD] Access 2007 Question > > Access certainly used to have a wizard for converting macros to code, but it > didn't do a very good job, since it created obsolete code in the process. > > Charlotte Foust > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Arthur Fuller > Sent: Sunday, October 25, 2009 1:39 PM > To: Access Developers discussion and problem solving > Subject: [AccessD] Access 2007 Question > > I have downloaded and built all the Access 2007 template apps. Every single > one of them does its magic with macros not with VBA. This begs some > questions: > > 1. Does this indicate that developers are no longer welcome in the Access > community? How are we to read this, when even Northwind has been translated > to macros from VBA code? > > 2. Is there a wizard that converts a macro to VBA code? Or should I just cut > and paste the macro in question to the code window and then attempt to > translate it to VBA code? > > 3. Should we Access developers regard this as the definitive signal to move > to Visual Studio or some other dev platform? (Just about the only thing that > keeps me on Windows is Access; take away that and you may as well call me an > Ubuntu boy.) > > 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 kismert at gmail.com Mon Oct 26 14:03:39 2009 From: kismert at gmail.com (Kenneth Ismert) Date: Mon, 26 Oct 2009 14:03:39 -0500 Subject: [AccessD] Form Controls - Class implementation Message-ID: <7c7841600910261203v41b85435q874ab3189722e24f@mail.gmail.com> Just read through the code. Very cool. It's surprising how much work it takes to get a complete answer to a seemingly trivial Access problem like "I want to see all my controls in tab order". -Ken From miscellany at mvps.org Mon Oct 26 14:20:46 2009 From: miscellany at mvps.org (Steve Schapel) Date: Tue, 27 Oct 2009 08:20:46 +1300 Subject: [AccessD] Access 2007 Question In-Reply-To: <29f585dd0910251339u735bd228vb5548bc729c0d6dc@mail.gmail.com> References: <29f585dd0910251339u735bd228vb5548bc729c0d6dc@mail.gmail.com> Message-ID: <12BAC542C3884C06B8BB6D81F95158F9@stevePC> Arthur, It's really quite logical. Every day in Access newsgroups and forums, you can see someone ask "can I put my Access application on the web". If Microsoft didn't step in to fill this need, someone else would. And the Access team, with the premier RAD database programme already in their hands, had a big head start. So they stepped up to the plate, as the saying goes, and this, as you no doubt know, has been a major thrust of the work on Access 2010. Now, when an Access 2010 application is published to the web, it gets converted to stuff like HTML and Javascript and SharePoint workflows. How you going to do that with VBA? Macros, based on XML, is going to work - VBA is not. Simple as that. So it seems to me that the enhancements to macros in Access is primarily related to the move towards web applications. If you want to build applications that can run in a browser, then you will have to change your thinking, and change the way you do stuff, including learn how to use macros. But here's the *absolutely critical* point to remember... This is *additional*. Nothing is being removed or replaced. If you don't have a use for this new stuff, then you don't have to use it. Desktop database solutions are not going away in a hurry. VBA continues to be enhanced too, and VBA is not going away any time soon. You will still be able to build good database applications using Access, just like you have always done. The current emphasis for the Access team's development efforts is just that... the current emphasis. That does not mean it will stay that way. And the significant improvements in the macro functionality should *not* be taken to mean anything about any writing on any wall anywhere. Regards Steve -------------------------------------------------- From: "Arthur Fuller" Sent: Monday, October 26, 2009 9:39 AM To: "Access Developers discussion and problem solving" Subject: [AccessD] Access 2007 Question > I have downloaded and built all the Access 2007 template apps. Every > single > one of them does its magic with macros not with VBA. This begs some > questions: > > 1. Does this indicate that developers are no longer welcome in the Access > community? How are we to read this, when even Northwind has been > translated > to macros from VBA code? > > 2. Is there a wizard that converts a macro to VBA code? Or should I just > cut > and paste the macro in question to the code window and then attempt to > translate it to VBA code? > > 3. Should we Access developers regard this as the definitive signal to > move > to Visual Studio or some other dev platform? (Just about the only thing > that > keeps me on Windows is Access; take away that and you may as well call me > an > Ubuntu boy.) > From jwcolby at colbyconsulting.com Mon Oct 26 14:28:34 2009 From: jwcolby at colbyconsulting.com (jwcolby) Date: Mon, 26 Oct 2009 15:28:34 -0400 Subject: [AccessD] SPAM-LOW: Re: Form Controls - Class implementation In-Reply-To: <7c7841600910261203v41b85435q874ab3189722e24f@mail.gmail.com> References: <7c7841600910261203v41b85435q874ab3189722e24f@mail.gmail.com> Message-ID: <4AE5F862.10501@colbyconsulting.com> It does indeed get deep in a hurry. The nice thing about a class implementation is that you can see the answer in VBA English. The code works BTW. Going in I thought I was going to be able to pass the control collections as simple collection types but not so. I had to pass the control collections as objects, then use the objects as collections. I would love to know what type the control collections are. Most likely below the covers they are a strongly typed collection (of controls) but because they are at heart a collection all of the methods and properties are there once the object is passed in. The implementation does allow me to concentrate on objects that contain collections of controls rather than on the controls themselves. John W. Colby www.ColbyConsulting.com Kenneth Ismert wrote: > Just read through the code. Very cool. > > It's surprising how much work it takes to get a complete answer to a > seemingly trivial Access problem like "I want to see all my controls in tab > order". > > -Ken From mwp.reid at qub.ac.uk Mon Oct 26 14:44:36 2009 From: mwp.reid at qub.ac.uk (Martin Reid) Date: Mon, 26 Oct 2009 19:44:36 +0000 Subject: [AccessD] Access 2007 Question In-Reply-To: <12BAC542C3884C06B8BB6D81F95158F9@stevePC> References: <29f585dd0910251339u735bd228vb5548bc729c0d6dc@mail.gmail.com>, <12BAC542C3884C06B8BB6D81F95158F9@stevePC> Message-ID: <631CF83223105545BF43EFB52CB0829502AE126BB8@EX2K7-VIRT-2.ads.qub.ac.uk> But don't forget that without SharePoint you will not be putting anything on the web. In my view the whole focus of MS has moved away form the desktop towards the Internet. Over time the desktop will not be relevant as everything will be browser based. That's the route we are following using the web for as much as possible in our case based around SharePoint. The problem for developers is that they have stretched Access way beyond what MS had intended and again in my opinion MS owes them for that,. Without the Access developer community building real application with Access it would still be an also ran program. Developers see a product they love with problems and duff code etc from version 1 never fixed but which has new bells and wishes added to it all the time by MS and in turn they think they are being ignored. MS is aiming Access at SharePoint and a move away from the file based database. Will VBA disappear I do not think so and from anything I have heard it will be around for some time. Just think of taking something Rocky, JC, AD, William, Shamil et al have written and running it through a MS wizard for the web? You will get nothing approaching the functionality of the original database. I have used most of these tools and nothing beats a good programmer and on every occasion when it comes to something that actually is required to solve a business function or problem wizards and auto code generators just don't relace the JCs or Shamils of this world. For developers the issue is not whats been added but what has not been fixed that helps them build applications they need to meet the needs of their clients. The fact I can take Northwind and save it to SharePoint is neither here nor there. In every Access program I have been involved in (and thats about them all) the requirements of developers to fix issues already in the program have never been met. Yeah we got the Ribbon, the web and a lot of other stuff but basic flaws have been ignored. What I have done is to continually put this to them that they need to fix the outstanding issues and then move on. The developer community have done nothing but good for MS and their products. Martin From rockysmolin at bchacc.com Mon Oct 26 14:49:32 2009 From: rockysmolin at bchacc.com (Rocky Smolin) Date: Mon, 26 Oct 2009 12:49:32 -0700 Subject: [AccessD] Access 2007 Question In-Reply-To: <4AE5EF85.1060704@colbyconsulting.com> References: <29f585dd0910251339u735bd228vb5548bc729c0d6dc@mail.gmail.com>, <631CF83223105545BF43EFB52CB0829502AE126BB5@EX2K7-VIRT-2.ads.qub.ac.uk> <4AE5EF85.1060704@colbyconsulting.com> Message-ID: So...we should be pro macro then? Programmers Full Employment Act of 2009? R -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Monday, October 26, 2009 11:51 AM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Access 2007 Question Typed variables, requiring variables to be dimmed prior to use, looping structures, case statements, returning values from functions, passing variables by value / reference, collections, classes, modules, libraries... Uhh... a real programming language? Obviously they don't call them Macros for nothing. I see this probably allowing power users to do more, make more of a mess that has to be cleaned up by the consultant hired to clean up messes. This means more consulting work, more hours of cleanup. John W. Colby www.ColbyConsulting.com Rocky Smolin wrote: > In general, why is there a preference for VBA over macros? I can see > where VBA might have more flexibility but for repetitive cookie cutter > tasks aren't macros quite effective? > > Rocky > > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Martin Reid > Sent: Monday, October 26, 2009 9:36 AM > To: Access Developers discussion and problem solving > Subject: Re: [AccessD] Access 2007 Question > > This gives you a good idea of where macros are going > > http://blogs.msdn.com/access/archive/2009/07/28/meet-the-access-2010-m > acro-d > esigner.aspx > > > Martin > > > Martin WP Reid > Information Services > The Library at Queen's > Tel : 02890976174 > Email : mwp.reid at qub.ac.uk > ________________________________________ > From: accessd-bounces at databaseadvisors.com > [accessd-bounces at databaseadvisors.com] On Behalf Of Charlotte Foust > [cfoust at infostatsystems.com] > Sent: 26 October 2009 16:22 > To: Access Developers discussion and problem solving > Subject: Re: [AccessD] Access 2007 Question > > Access certainly used to have a wizard for converting macros to code, > but it didn't do a very good job, since it created obsolete code in the process. > > Charlotte Foust > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Arthur > Fuller > Sent: Sunday, October 25, 2009 1:39 PM > To: Access Developers discussion and problem solving > Subject: [AccessD] Access 2007 Question > > I have downloaded and built all the Access 2007 template apps. Every > single one of them does its magic with macros not with VBA. This begs > some > questions: > > 1. Does this indicate that developers are no longer welcome in the > Access community? How are we to read this, when even Northwind has > been translated to macros from VBA code? > > 2. Is there a wizard that converts a macro to VBA code? Or should I > just cut and paste the macro in question to the code window and then > attempt to translate it to VBA code? > > 3. Should we Access developers regard this as the definitive signal to > move to Visual Studio or some other dev platform? (Just about the only > thing that keeps me on Windows is Access; take away that and you may > as well call me an Ubuntu boy.) > > 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 > -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From Johncliviger at aol.com Mon Oct 26 14:58:32 2009 From: Johncliviger at aol.com (Johncliviger at aol.com) Date: Mon, 26 Oct 2009 15:58:32 EDT Subject: [AccessD] Office Key Message-ID: Rocky On the rather old version I have it looks at the C: drive. I can't see any drive selection so I guess you stuck with C: but....never say never. Sorry I can't more help john cliviger From jimdettman at verizon.net Mon Oct 26 15:11:50 2009 From: jimdettman at verizon.net (Jim Dettman) Date: Mon, 26 Oct 2009 16:11:50 -0400 Subject: [AccessD] Access 2007 Question In-Reply-To: References: <29f585dd0910251339u735bd228vb5548bc729c0d6dc@mail.gmail.com>, <631CF83223105545BF43EFB52CB0829502AE126BB5@EX2K7-VIRT-2.ads.qub.ac.uk> Message-ID: <78255AE478A34CDFA11551CFEC0AAE63@XPS> Error handling, the ability to call the windows API, etc. Overall flexibility in coding. Jim. -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Rocky Smolin Sent: Monday, October 26, 2009 1:01 PM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Access 2007 Question In general, why is there a preference for VBA over macros? I can see where VBA might have more flexibility but for repetitive cookie cutter tasks aren't macros quite effective? Rocky -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Martin Reid Sent: Monday, October 26, 2009 9:36 AM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Access 2007 Question This gives you a good idea of where macros are going http://blogs.msdn.com/access/archive/2009/07/28/meet-the-access-2010-macro-d esigner.aspx Martin Martin WP Reid Information Services The Library at Queen's Tel : 02890976174 Email : mwp.reid at qub.ac.uk ________________________________________ From: accessd-bounces at databaseadvisors.com [accessd-bounces at databaseadvisors.com] On Behalf Of Charlotte Foust [cfoust at infostatsystems.com] Sent: 26 October 2009 16:22 To: Access Developers discussion and problem solving Subject: Re: [AccessD] Access 2007 Question Access certainly used to have a wizard for converting macros to code, but it didn't do a very good job, since it created obsolete code in the process. Charlotte Foust -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Arthur Fuller Sent: Sunday, October 25, 2009 1:39 PM To: Access Developers discussion and problem solving Subject: [AccessD] Access 2007 Question I have downloaded and built all the Access 2007 template apps. Every single one of them does its magic with macros not with VBA. This begs some questions: 1. Does this indicate that developers are no longer welcome in the Access community? How are we to read this, when even Northwind has been translated to macros from VBA code? 2. Is there a wizard that converts a macro to VBA code? Or should I just cut and paste the macro in question to the code window and then attempt to translate it to VBA code? 3. Should we Access developers regard this as the definitive signal to move to Visual Studio or some other dev platform? (Just about the only thing that keeps me on Windows is Access; take away that and you may as well call me an Ubuntu boy.) 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 -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From iggy at nanaimo.ark.com Mon Oct 26 14:38:55 2009 From: iggy at nanaimo.ark.com (Tony Septav) Date: Mon, 26 Oct 2009 11:38:55 -0800 Subject: [AccessD] Access2007 Question Message-ID: <4AE5FACF.9030009@nanaimo.ark.com> Hey All You guys/gals are scaring me again. I don't understand this continuous discussion of the demise of Access. If you can produce a sound stable application, it really does not matter what platform you develop it in. The client is the final determining factor, if they are happy then you are happy. I still have a couple of applications out there running under Access97, they work and the client is happy. I updated to Access 2003 on the advise from this list, and avoided Access2007. And interesting enough, in the last couple of weeks I have been bashed by the Oracle developers who have said again "Oh you are using that toy, Access". My come back was " Okay give me a project and let us take the gloves off and see who produces the best project", no takers. On the other end "Yes I may be falling behind", but it is only marketing that is dictating what is the new flavour of the week. If you do your job and you do it well, who cares what marketing tells you. Everyday I see so much extraordinary work done by the individuals on this list and I am constatntly amazed. Why is everyone so willing to throw in the towel. From jwcolby at colbyconsulting.com Mon Oct 26 15:22:34 2009 From: jwcolby at colbyconsulting.com (jwcolby) Date: Mon, 26 Oct 2009 16:22:34 -0400 Subject: [AccessD] Access 2007 Question In-Reply-To: References: <29f585dd0910251339u735bd228vb5548bc729c0d6dc@mail.gmail.com>, <631CF83223105545BF43EFB52CB0829502AE126BB5@EX2K7-VIRT-2.ads.qub.ac.uk> <4AE5EF85.1060704@colbyconsulting.com> Message-ID: <4AE6050A.8040601@colbyconsulting.com> > So...we should be pro macro then? Programmers Full Employment Act of 2009? ;) John W. Colby www.ColbyConsulting.com Rocky Smolin wrote: > So...we should be pro macro then? Programmers Full Employment Act of 2009? > > R > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby > Sent: Monday, October 26, 2009 11:51 AM > To: Access Developers discussion and problem solving > Subject: Re: [AccessD] Access 2007 Question > > Typed variables, requiring variables to be dimmed prior to use, looping > structures, case statements, returning values from functions, passing > variables by value / reference, collections, classes, modules, libraries... > > Uhh... a real programming language? Obviously they don't call them Macros > for nothing. > > I see this probably allowing power users to do more, make more of a mess > that has to be cleaned up by the consultant hired to clean up messes. This > means more consulting work, more hours of cleanup. > > John W. Colby > www.ColbyConsulting.com From rockysmolin at bchacc.com Mon Oct 26 15:25:09 2009 From: rockysmolin at bchacc.com (Rocky Smolin) Date: Mon, 26 Oct 2009 13:25:09 -0700 Subject: [AccessD] Access2007 Question In-Reply-To: <4AE5FACF.9030009@nanaimo.ark.com> References: <4AE5FACF.9030009@nanaimo.ark.com> Message-ID: I agree. I don't need to be a web developer. I only need enough Access development to keep me busy. Of course, I'm 60. If I was looking at another 20-30 years of development I'd probably be taking .Net courses. And it doesn't take that much Access development to keep one guy busy. I'm praying I can ride Access right down to retirement. :) Rocky -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Tony Septav Sent: Monday, October 26, 2009 12:39 PM To: Access Developers discussion and problem solving Subject: [AccessD] Access2007 Question Hey All You guys/gals are scaring me again. I don't understand this continuous discussion of the demise of Access. If you can produce a sound stable application, it really does not matter what platform you develop it in. The client is the final determining factor, if they are happy then you are happy. I still have a couple of applications out there running under Access97, they work and the client is happy. I updated to Access 2003 on the advise from this list, and avoided Access2007. And interesting enough, in the last couple of weeks I have been bashed by the Oracle developers who have said again "Oh you are using that toy, Access". My come back was " Okay give me a project and let us take the gloves off and see who produces the best project", no takers. On the other end "Yes I may be falling behind", but it is only marketing that is dictating what is the new flavour of the week. If you do your job and you do it well, who cares what marketing tells you. Everyday I see so much extraordinary work done by the individuals on this list and I am constatntly amazed. Why is everyone so willing to throw in the towel. -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From rockysmolin at bchacc.com Mon Oct 26 15:25:56 2009 From: rockysmolin at bchacc.com (Rocky Smolin) Date: Mon, 26 Oct 2009 13:25:56 -0700 Subject: [AccessD] Access 2007 Question In-Reply-To: <78255AE478A34CDFA11551CFEC0AAE63@XPS> References: <29f585dd0910251339u735bd228vb5548bc729c0d6dc@mail.gmail.com>, <631CF83223105545BF43EFB52CB0829502AE126BB5@EX2K7-VIRT-2.ads.qub.ac.uk> <78255AE478A34CDFA11551CFEC0AAE63@XPS> Message-ID: <9EE33A7F47284029B018709059376470@HAL9005> All good reasons. So now I'm wondering if there isn't a place for both - that if you're adept at writing those macros if they wouldn't be quicker for the things that you CAN do with macros than generating code. Rocky -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Jim Dettman Sent: Monday, October 26, 2009 1:12 PM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Access 2007 Question Error handling, the ability to call the windows API, etc. Overall flexibility in coding. Jim. -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Rocky Smolin Sent: Monday, October 26, 2009 1:01 PM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Access 2007 Question In general, why is there a preference for VBA over macros? I can see where VBA might have more flexibility but for repetitive cookie cutter tasks aren't macros quite effective? Rocky -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Martin Reid Sent: Monday, October 26, 2009 9:36 AM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Access 2007 Question This gives you a good idea of where macros are going http://blogs.msdn.com/access/archive/2009/07/28/meet-the-access-2010-macro-d esigner.aspx Martin Martin WP Reid Information Services The Library at Queen's Tel : 02890976174 Email : mwp.reid at qub.ac.uk ________________________________________ From: accessd-bounces at databaseadvisors.com [accessd-bounces at databaseadvisors.com] On Behalf Of Charlotte Foust [cfoust at infostatsystems.com] Sent: 26 October 2009 16:22 To: Access Developers discussion and problem solving Subject: Re: [AccessD] Access 2007 Question Access certainly used to have a wizard for converting macros to code, but it didn't do a very good job, since it created obsolete code in the process. Charlotte Foust -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Arthur Fuller Sent: Sunday, October 25, 2009 1:39 PM To: Access Developers discussion and problem solving Subject: [AccessD] Access 2007 Question I have downloaded and built all the Access 2007 template apps. Every single one of them does its magic with macros not with VBA. This begs some questions: 1. Does this indicate that developers are no longer welcome in the Access community? How are we to read this, when even Northwind has been translated to macros from VBA code? 2. Is there a wizard that converts a macro to VBA code? Or should I just cut and paste the macro in question to the code window and then attempt to translate it to VBA code? 3. Should we Access developers regard this as the definitive signal to move to Visual Studio or some other dev platform? (Just about the only thing that keeps me on Windows is Access; take away that and you may as well call me an Ubuntu boy.) 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 -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From davidmcafee at gmail.com Mon Oct 26 15:29:18 2009 From: davidmcafee at gmail.com (David McAfee) Date: Mon, 26 Oct 2009 13:29:18 -0700 Subject: [AccessD] Access2007 Question In-Reply-To: <4AE5FACF.9030009@nanaimo.ark.com> References: <4AE5FACF.9030009@nanaimo.ark.com> Message-ID: <8786a4c00910261329k6052af3ci775f82d7b88196ca@mail.gmail.com> I'm just afraid of M$ one day putting out an "update" (or OS) that kills our beloved A97 (or 2K-2K3) I worked on a project at work using cdb (compact database) files on pocket PCs, one version update later and the files weren't supported anymore. We had to switch to SDFs (SQLCE), and completely redesign our app. Now mind you, I do like the SDF/SQLCE version much better, but I hate when M$ just kills a program/app that could still function fine. On Mon, Oct 26, 2009 at 12:38 PM, Tony Septav wrote: > Hey All > You guys/gals are scaring me again. > I don't ?understand this continuous discussion of the demise of Access. > If you can produce a sound stable application, it really does not matter > what platform you develop it in. ?The client is the final determining > factor, if they are happy then you are happy. ?I still have a couple of > applications out there running under Access97, they work and the client > is happy. > I updated to Access 2003 on the advise from this list, and avoided > Access2007. > And interesting enough, ?in the last couple of weeks I have been bashed > by the Oracle developers who have said again "Oh you are using that > toy, ?Access". ?My come back was " Okay give me a project and let us > take the gloves off and see who produces the best project", no takers. > On the other end "Yes I may be falling behind", but it is only marketing > that is dictating what ?is the new flavour of the week. ?If you do your > job and you do it well, who cares what marketing tells you. > > Everyday I see so much extraordinary work done by the individuals on > this list and I am constatntly amazed. ?Why is everyone so willing to > throw in the towel. > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > From dwaters at usinternet.com Mon Oct 26 15:31:13 2009 From: dwaters at usinternet.com (Dan Waters) Date: Mon, 26 Oct 2009 15:31:13 -0500 Subject: [AccessD] Who Can Write a VB6 DLL? - For Access Drag and Drop Message-ID: <77A49F07970D4DD3ACA24E14039946CB@danwaters> Hello! I have some code from a forum that I believe may allow dragging a file to an Access for so that the file's full path can be captured by the form. If this can be done, then a file can be very easily 'attached' to an Access database. The code comes from here: http://bytes.com/topic/access/answers/197392-drag-drop The code was originally written by Felix Lima (MS Support Engineer), and posted by Stephen Lebans. I first tried putting this code into an mdb, but the database froze because the code that was waiting for a Windows Message ran continuously. So, I want to ask if someone can take this code and put it into a DLL file like Felix says it should be. I've put it all into a small Access file that I can send to you. If this works, I'll post a 'how to' in DB Advisors. Thanks! Dan From jimdettman at verizon.net Mon Oct 26 15:47:40 2009 From: jimdettman at verizon.net (Jim Dettman) Date: Mon, 26 Oct 2009 16:47:40 -0400 Subject: [AccessD] Access2007 Question In-Reply-To: <4AE5FACF.9030009@nanaimo.ark.com> References: <4AE5FACF.9030009@nanaimo.ark.com> Message-ID: <1C685D1F63244640A1E57408612D5F55@XPS> Tony, <> That's true, but what also works into that is the type of application that you need to develop. It's not the demise of Access; Access will be a round a good long time I'm sure. What may die off is VBA (Visual Basic for Applications). The problem with that is that you as a developer are limited in what you can do with Access *if* that were to come about. Certainly you still would be able to turn out apps with Access if that indeed did happen. But things like calling the windows API, using collections, etc would get thrown out the window. That's not to say that macro's won't be enhanced further as we have already seen (error handling and an editor was added), but using macro's alone would severely restrict the types of apps that you could produce. It may be that both will exist for a long time to come, but my objection is that as a true development tool, little improvement is being made and we are going backwards in several ways. For example, how many releases has it been now that: 1. Access can't easily use all 3rd party controls because it never fully implemented the iDispatch interface (version 2.0) 2. VBA has problems with breakpoints - i.e. code will stop where you had a breakpoint and then removed it (Access 95) 3. The VBA compiled project gets corrupt - /decompile is needed to bail you out (Access 95) 4. References break easily (Access 95) And the list goes on. These are all things that should have been fixed long ago or improved, yet here we are in 2008 and instead of those fixes, we get more end user functionality. That's why it's hard to stay positive about Access from a development standpoint. Jim -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Tony Septav Sent: Monday, October 26, 2009 3:39 PM To: Access Developers discussion and problem solving Subject: [AccessD] Access2007 Question Hey All You guys/gals are scaring me again. I don't understand this continuous discussion of the demise of Access. If you can produce a sound stable application, it really does not matter what platform you develop it in. The client is the final determining factor, if they are happy then you are happy. I still have a couple of applications out there running under Access97, they work and the client is happy. I updated to Access 2003 on the advise from this list, and avoided Access2007. And interesting enough, in the last couple of weeks I have been bashed by the Oracle developers who have said again "Oh you are using that toy, Access". My come back was " Okay give me a project and let us take the gloves off and see who produces the best project", no takers. On the other end "Yes I may be falling behind", but it is only marketing that is dictating what is the new flavour of the week. If you do your job and you do it well, who cares what marketing tells you. Everyday I see so much extraordinary work done by the individuals on this list and I am constatntly amazed. Why is everyone so willing to throw in the towel. -- 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 Oct 26 15:48:39 2009 From: stuart at lexacorp.com.pg (Stuart McLachlan) Date: Tue, 27 Oct 2009 06:48:39 +1000 Subject: [AccessD] Access2007 Question In-Reply-To: References: <4AE5FACF.9030009@nanaimo.ark.com>, Message-ID: <4AE60B27.13896.2BC9B6D6@stuart.lexacorp.com.pg> I'm 60 too and I AM looking at another 20-30 years of development - maybe 40 . -- Stuart On 26 Oct 2009 at 13:25, Rocky Smolin wrote: > I agree. I don't need to be a web developer. I only need enough Access > development to keep me busy. Of course, I'm 60. If I was looking at another > 20-30 years of development I'd probably be taking .Net courses. And it > doesn't take that much Access development to keep one guy busy. > > I'm praying I can ride Access right down to retirement. :) > From cfoust at infostatsystems.com Mon Oct 26 15:47:53 2009 From: cfoust at infostatsystems.com (Charlotte Foust) Date: Mon, 26 Oct 2009 13:47:53 -0700 Subject: [AccessD] Access 2007 Question In-Reply-To: <9EE33A7F47284029B018709059376470@HAL9005> References: <29f585dd0910251339u735bd228vb5548bc729c0d6dc@mail.gmail.com>, <631CF83223105545BF43EFB52CB0829502AE126BB5@EX2K7-VIRT-2.ads.qub.ac.uk><78255AE478A34CDFA11551CFEC0AAE63@XPS> <9EE33A7F47284029B018709059376470@HAL9005> Message-ID: I was VERY good at writing macros when they were all we had. They were never quicker than code, just slapdash quick. Charlotte Foust -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Rocky Smolin Sent: Monday, October 26, 2009 1:26 PM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Access 2007 Question All good reasons. So now I'm wondering if there isn't a place for both - that if you're adept at writing those macros if they wouldn't be quicker for the things that you CAN do with macros than generating code. Rocky From marksimms at verizon.net Mon Oct 26 15:57:56 2009 From: marksimms at verizon.net (Mark Simms) Date: Mon, 26 Oct 2009 16:57:56 -0400 Subject: [AccessD] Access 2007 Question In-Reply-To: <12BAC542C3884C06B8BB6D81F95158F9@stevePC> References: <29f585dd0910251339u735bd228vb5548bc729c0d6dc@mail.gmail.com> <12BAC542C3884C06B8BB6D81F95158F9@stevePC> Message-ID: <00db01ca567e$fe8b4ad0$0501a8c0@MSIMMSWS> > Now, when an Access 2010 application is published to the web, > it gets converted to stuff like HTML and Javascript and > SharePoint workflows. How you going to do that with VBA? > Macros, based on XML, is going to work - VBA is not. Simple as that. Steve - I don't quite understand the above. Why can't they translate much of the VBA by creating a Javascript library of functions and objects and then create a translator to convert the VBA code to Javascript ? They were able to translate VB6 to VB.NET, so why not VBA to Javascript and/or their new highly touted XAML ? I think an Access 2010 app ported to the 'net stripped of VBA will be mostly useless. From jwcolby at colbyconsulting.com Mon Oct 26 16:04:51 2009 From: jwcolby at colbyconsulting.com (jwcolby) Date: Mon, 26 Oct 2009 17:04:51 -0400 Subject: [AccessD] SPAM-LOW: Access2007 Question In-Reply-To: <4AE5FACF.9030009@nanaimo.ark.com> References: <4AE5FACF.9030009@nanaimo.ark.com> Message-ID: <4AE60EF3.4090804@colbyconsulting.com> I wouldn't exactly say throw in the towel. I continue to do Access work, though I do it in Access 2003, not 2007. If I ever get a client that dictates 2007 then I will go there but how many years later, no such client. I do expect it eventually though. In the meantime I am learning C#.Net. C# is much more powerful in many ways, and if future jobs allow me to choose between C# and Access 2007 (or beyond) you better believe I will use C# rather than Access. I am a programmer at heart. I love what a computer can do with code. I am a database analyst second. In terms of PROGRAMMING capabilities, Access is in fact a "toy LANGUAGE" compared to the .Net environment. C#.Net and VBA for Access are simply not in the same league, and the .Net capability keeps expanding whereas Access gives us... pretty toolbars and macros. Many apps need a database, however IMHO NO app REQUIRES Access. Simple apps MIGHT be faster to develop in Access, I will not know until I am fluent in C#. I have done enough complex application development to know that Access applications can reach a point where expanding it further gets ugly. We shall see where this thing leads us. As I mentioned in another email, I fully expect to be doing this stuff for at LEAST another 15 years maybe more. I intend to be C# capable should that be a better choice. John W. Colby www.ColbyConsulting.com Tony Septav wrote: > Hey All > You guys/gals are scaring me again. > I don't understand this continuous discussion of the demise of Access. > If you can produce a sound stable application, it really does not matter > what platform you develop it in. The client is the final determining > factor, if they are happy then you are happy. I still have a couple of > applications out there running under Access97, they work and the client > is happy. > I updated to Access 2003 on the advise from this list, and avoided > Access2007. > And interesting enough, in the last couple of weeks I have been bashed > by the Oracle developers who have said again "Oh you are using that > toy, Access". My come back was " Okay give me a project and let us > take the gloves off and see who produces the best project", no takers. > On the other end "Yes I may be falling behind", but it is only marketing > that is dictating what is the new flavour of the week. If you do your > job and you do it well, who cares what marketing tells you. > > Everyday I see so much extraordinary work done by the individuals on > this list and I am constatntly amazed. Why is everyone so willing to > throw in the towel. > From jwcolby at colbyconsulting.com Mon Oct 26 16:07:03 2009 From: jwcolby at colbyconsulting.com (jwcolby) Date: Mon, 26 Oct 2009 17:07:03 -0400 Subject: [AccessD] Access2007 Question In-Reply-To: <4AE60B27.13896.2BC9B6D6@stuart.lexacorp.com.pg> References: <4AE5FACF.9030009@nanaimo.ark.com>, <4AE60B27.13896.2BC9B6D6@stuart.lexacorp.com.pg> Message-ID: <4AE60F77.5070208@colbyconsulting.com> > I'm 60 too and I AM looking at another 20-30 years of development - maybe 40 . I LIKE a man who faces reality head on! John W. Colby www.ColbyConsulting.com Stuart McLachlan wrote: > I'm 60 too and I AM looking at another 20-30 years of development - maybe 40 . > From stuart at lexacorp.com.pg Mon Oct 26 16:15:11 2009 From: stuart at lexacorp.com.pg (Stuart McLachlan) Date: Tue, 27 Oct 2009 07:15:11 +1000 Subject: [AccessD] SPAM-LOW: Access2007 Question In-Reply-To: <4AE60EF3.4090804@colbyconsulting.com> References: <4AE5FACF.9030009@nanaimo.ark.com>, <4AE60EF3.4090804@colbyconsulting.com> Message-ID: <4AE6115F.5431.2BE2014E@stuart.lexacorp.com.pg> I've got one client that has gone to 2007. I'm still using 2003 to develop their applications. Once ready for deployment, I drop the end product into a VM running 2007, convert and test. So far no problems. -- Stuart On 26 Oct 2009 at 17:04, jwcolby wrote: > I wouldn't exactly say throw in the towel. I continue to do Access work, though I do it in Access > 2003, not 2007. If I ever get a client that dictates 2007 then I will go there but how many years > later, no such client. I do expect it eventually though. > From dwaters at usinternet.com Mon Oct 26 16:16:42 2009 From: dwaters at usinternet.com (Dan Waters) Date: Mon, 26 Oct 2009 16:16:42 -0500 Subject: [AccessD] Access2007 Question In-Reply-To: <1C685D1F63244640A1E57408612D5F55@XPS> References: <4AE5FACF.9030009@nanaimo.ark.com> <1C685D1F63244640A1E57408612D5F55@XPS> Message-ID: <435E985E7B2A49C2A9784D9F97A5AFAC@danwaters> MS announced a while back that they were ceasing to license VBA to any more companies. I suspect they are working on a transition path from VBA to VB.Net. If they require a rewrite from scratch for every VBA project in use, too many companies would ask, "Hmmm. What's out there beside MS?". Probably not a question that MS wants people asking. Dan -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Jim Dettman Sent: Monday, October 26, 2009 3:48 PM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Access2007 Question Tony, <> That's true, but what also works into that is the type of application that you need to develop. It's not the demise of Access; Access will be a round a good long time I'm sure. What may die off is VBA (Visual Basic for Applications). The problem with that is that you as a developer are limited in what you can do with Access *if* that were to come about. Certainly you still would be able to turn out apps with Access if that indeed did happen. But things like calling the windows API, using collections, etc would get thrown out the window. That's not to say that macro's won't be enhanced further as we have already seen (error handling and an editor was added), but using macro's alone would severely restrict the types of apps that you could produce. It may be that both will exist for a long time to come, but my objection is that as a true development tool, little improvement is being made and we are going backwards in several ways. For example, how many releases has it been now that: 1. Access can't easily use all 3rd party controls because it never fully implemented the iDispatch interface (version 2.0) 2. VBA has problems with breakpoints - i.e. code will stop where you had a breakpoint and then removed it (Access 95) 3. The VBA compiled project gets corrupt - /decompile is needed to bail you out (Access 95) 4. References break easily (Access 95) And the list goes on. These are all things that should have been fixed long ago or improved, yet here we are in 2008 and instead of those fixes, we get more end user functionality. That's why it's hard to stay positive about Access from a development standpoint. Jim -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Tony Septav Sent: Monday, October 26, 2009 3:39 PM To: Access Developers discussion and problem solving Subject: [AccessD] Access2007 Question Hey All You guys/gals are scaring me again. I don't understand this continuous discussion of the demise of Access. If you can produce a sound stable application, it really does not matter what platform you develop it in. The client is the final determining factor, if they are happy then you are happy. I still have a couple of applications out there running under Access97, they work and the client is happy. I updated to Access 2003 on the advise from this list, and avoided Access2007. And interesting enough, in the last couple of weeks I have been bashed by the Oracle developers who have said again "Oh you are using that toy, Access". My come back was " Okay give me a project and let us take the gloves off and see who produces the best project", no takers. On the other end "Yes I may be falling behind", but it is only marketing that is dictating what is the new flavour of the week. If you do your job and you do it well, who cares what marketing tells you. Everyday I see so much extraordinary work done by the individuals on this list and I am constatntly amazed. Why is everyone so willing to throw in the towel. -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd 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 Oct 26 16:20:21 2009 From: jwcolby at colbyconsulting.com (jwcolby) Date: Mon, 26 Oct 2009 17:20:21 -0400 Subject: [AccessD] SPAM-LOW: Access2007 Question In-Reply-To: <4AE6115F.5431.2BE2014E@stuart.lexacorp.com.pg> References: <4AE5FACF.9030009@nanaimo.ark.com>, <4AE60EF3.4090804@colbyconsulting.com> <4AE6115F.5431.2BE2014E@stuart.lexacorp.com.pg> Message-ID: <4AE61295.6000402@colbyconsulting.com> Yes, and I have Office 2007 running on a VM. I will do any dev there should it drop in my lap. John W. Colby www.ColbyConsulting.com Stuart McLachlan wrote: > I've got one client that has gone to 2007. I'm still using 2003 to develop their applications. > Once ready for deployment, I drop the end product into a VM running 2007, convert and > test. So far no problems. > From iggy at nanaimo.ark.com Mon Oct 26 16:20:34 2009 From: iggy at nanaimo.ark.com (Tony Septav) Date: Mon, 26 Oct 2009 13:20:34 -0800 Subject: [AccessD] Access2007 Question In-Reply-To: <1C685D1F63244640A1E57408612D5F55@XPS> References: <4AE5FACF.9030009@nanaimo.ark.com> <1C685D1F63244640A1E57408612D5F55@XPS> Message-ID: <4AE612A2.4070601@nanaimo.ark.com> Hey Jim That's true, but what also works into that is the type of application that you need to develop. --------------------------------- Other than dealing with the Fortune 500 companies (which are out of my league). I have not to date had any complaints. But my objection is that as a true development tool, little improvement is being made and we are going backwards in several ways. -------------------------------------------- Yes I too, as a developer have complained that MS is letting a "cash cow" lie. They have totally given up on the developer. But again with Access (version whatever) I will use the tools I have available to develop my project (currently Access 2003). I may be a dinosaur slowly fading into the background, but I will not give up. But things like calling the windows API, using collections, etc would get thrown out the window. -------------- This is where this group truly amazes me, they always find ways to work around it. Jim this is not a critique of your comments, just one those "If I could be an Oscar Meyer Weiner" moments. Jim Dettman wrote: >Tony, > ><what platform you develop it in. >> > > That's true, but what also works into that is the type of application >that you need to develop. > > It's not the demise of Access; Access will be a round a good long time >I'm sure. What may die off is VBA (Visual Basic for Applications). > > The problem with that is that you as a developer are limited in what you >can do with Access *if* that were to come about. Certainly you still would >be able to turn out apps with Access if that indeed did happen. But things >like calling the windows API, using collections, etc would get thrown out >the window. That's not to say that macro's won't be enhanced further as we >have already seen (error handling and an editor was added), but using >macro's alone would severely restrict the types of apps that you could >produce. > > It may be that both will exist for a long time to come, but my objection >is that as a true development tool, little improvement is being made and we >are going backwards in several ways. > > For example, how many releases has it been now that: > >1. Access can't easily use all 3rd party controls because it never fully >implemented the iDispatch interface (version 2.0) >2. VBA has problems with breakpoints - i.e. code will stop where you had a >breakpoint and then removed it (Access 95) >3. The VBA compiled project gets corrupt - /decompile is needed to bail you >out (Access 95) >4. References break easily (Access 95) > > And the list goes on. These are all things that should have been fixed >long ago or improved, yet here we are in 2008 and instead of those fixes, we >get more end user functionality. > > That's why it's hard to stay positive about Access from a development >standpoint. > >Jim > > > >-----Original Message----- >From: accessd-bounces at databaseadvisors.com >[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Tony Septav >Sent: Monday, October 26, 2009 3:39 PM >To: Access Developers discussion and problem solving >Subject: [AccessD] Access2007 Question > >Hey All >You guys/gals are scaring me again. >I don't understand this continuous discussion of the demise of Access. >If you can produce a sound stable application, it really does not matter >what platform you develop it in. The client is the final determining >factor, if they are happy then you are happy. I still have a couple of >applications out there running under Access97, they work and the client >is happy. >I updated to Access 2003 on the advise from this list, and avoided >Access2007. >And interesting enough, in the last couple of weeks I have been bashed >by the Oracle developers who have said again "Oh you are using that >toy, Access". My come back was " Okay give me a project and let us >take the gloves off and see who produces the best project", no takers. >On the other end "Yes I may be falling behind", but it is only marketing >that is dictating what is the new flavour of the week. If you do your >job and you do it well, who cares what marketing tells you. > >Everyday I see so much extraordinary work done by the individuals on >this list and I am constatntly amazed. Why is everyone so willing to >throw in the towel. > > > From drawbridgej at sympatico.ca Mon Oct 26 16:37:51 2009 From: drawbridgej at sympatico.ca (Jack and Pat) Date: Mon, 26 Oct 2009 17:37:51 -0400 Subject: [AccessD] ] Access 2007 Question - 2010 demo In-Reply-To: <00db01ca567e$fe8b4ad0$0501a8c0@MSIMMSWS> References: <29f585dd0910251339u735bd228vb5548bc729c0d6dc@mail.gmail.com><12BAC542C3884C06B8BB6D81F95158F9@stevePC> <00db01ca567e$fe8b4ad0$0501a8c0@MSIMMSWS> Message-ID: Max et al, I just found this site after reading thru some of the latest exchanges on Access 2007. http://channel9.msdn.com/shows/Access/Microsoft-Access-2010-Demo/ This is a 24 minute video, and a series of comments. Take a look at the comments from Brice IT...... -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Mark Simms Sent: Monday, October 26, 2009 4:58 PM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Access 2007 Question > Now, when an Access 2010 application is published to the web, > it gets converted to stuff like HTML and Javascript and > SharePoint workflows. How you going to do that with VBA? > Macros, based on XML, is going to work - VBA is not. Simple as that. Steve - I don't quite understand the above. Why can't they translate much of the VBA by creating a Javascript library of functions and objects and then create a translator to convert the VBA code to Javascript ? They were able to translate VB6 to VB.NET, so why not VBA to Javascript and/or their new highly touted XAML ? I think an Access 2010 app ported to the 'net stripped of VBA will be mostly useless. -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From Darryl.Collins at anz.com Mon Oct 26 16:57:40 2009 From: Darryl.Collins at anz.com (Collins, Darryl) Date: Tue, 27 Oct 2009 08:57:40 +1100 Subject: [AccessD] Access 2007 Question In-Reply-To: Message-ID: <6DC4725FDCDD72428D6114F1B6CC6E8101688B7F@EXUAU020HWT110.oceania.corp.anz.com> "used to have a wizard for converting macros to code, but it didn't do a very good job, since it created obsolete code in the process." Heh.. You want to see what a butcher job the macro recorder does in Excel. I mean what it writes does work, but boy it is ugly and tons of redunant code. Cheers Darryl. -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Charlotte Foust Sent: Tuesday, 27 October 2009 3:22 AM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Access 2007 Question Access certainly used to have a wizard for converting macros to code, but it didn't do a very good job, since it created obsolete code in the process. Charlotte Foust -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Arthur Fuller Sent: Sunday, October 25, 2009 1:39 PM To: Access Developers discussion and problem solving Subject: [AccessD] Access 2007 Question I have downloaded and built all the Access 2007 template apps. Every single one of them does its magic with macros not with VBA. This begs some questions: 1. Does this indicate that developers are no longer welcome in the Access community? How are we to read this, when even Northwind has been translated to macros from VBA code? 2. Is there a wizard that converts a macro to VBA code? Or should I just cut and paste the macro in question to the code window and then attempt to translate it to VBA code? 3. Should we Access developers regard this as the definitive signal to move to Visual Studio or some other dev platform? (Just about the only thing that keeps me on Windows is Access; take away that and you may as well call me an Ubuntu boy.) Arthur -- -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com "This e-mail and any attachments to it (the "Communication") is, unless otherwise stated, confidential, may contain copyright material and is for the use only of the intended recipient. If you receive the Communication in error, please notify the sender immediately by return e-mail, delete the Communication and the return e-mail, and do not read, copy, retransmit or otherwise deal with it. Any views expressed in the Communication are those of the individual sender only, unless expressly stated to be those of Australia and New Zealand Banking Group Limited ABN 11 005 357 522, or any of its related entities including ANZ National Bank Limited (together "ANZ"). ANZ does not accept liability in connection with the integrity of or errors in the Communication, computer virus, data corruption, interference or delay arising from or in respect of the Communication." From jwcolby at colbyconsulting.com Mon Oct 26 17:00:00 2009 From: jwcolby at colbyconsulting.com (jwcolby) Date: Mon, 26 Oct 2009 18:00:00 -0400 Subject: [AccessD] ] Access 2007 Question - 2010 demo In-Reply-To: References: <29f585dd0910251339u735bd228vb5548bc729c0d6dc@mail.gmail.com><12BAC542C3884C06B8BB6D81F95158F9@stevePC> <00db01ca567e$fe8b4ad0$0501a8c0@MSIMMSWS> Message-ID: <4AE61BE0.4030100@colbyconsulting.com> LOL. Brice IT is NOT my AKA. ;) John W. Colby www.ColbyConsulting.com Jack and Pat wrote: > Max et al, > > I just found this site after reading thru some of the latest exchanges on > Access 2007. > > http://channel9.msdn.com/shows/Access/Microsoft-Access-2010-Demo/ > > This is a 24 minute video, and a series of comments. > Take a look at the comments from Brice IT...... From Darryl.Collins at anz.com Mon Oct 26 17:08:56 2009 From: Darryl.Collins at anz.com (Collins, Darryl) Date: Tue, 27 Oct 2009 09:08:56 +1100 Subject: [AccessD] Access 2007 Question In-Reply-To: <00db01ca567e$fe8b4ad0$0501a8c0@MSIMMSWS> Message-ID: <6DC4725FDCDD72428D6114F1B6CC6E8101688B80@EXUAU020HWT110.oceania.corp.anz.com> "I think an Access 2010 app ported to the 'net stripped of VBA will be mostly useless" Hah! I think just about *any* MS Office product stripped of it's VBA would be mostly useless - I mean, why would you pay for a tarted up version of OO or similar? Having the ability to make the software sing and dance with VBA is where most the values lies IMHO. Cheers Darryl -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Mark Simms Sent: Tuesday, 27 October 2009 7:58 AM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Access 2007 Question > Now, when an Access 2010 application is published to the web, it gets > converted to stuff like HTML and Javascript and SharePoint workflows. > How you going to do that with VBA? > Macros, based on XML, is going to work - VBA is not. Simple as that. Steve - I don't quite understand the above. Why can't they translate much of the VBA by creating a Javascript library of functions and objects and then create a translator to convert the VBA code to Javascript ? They were able to translate VB6 to VB.NET, so why not VBA to Javascript and/or their new highly touted XAML ? I think an Access 2010 app ported to the 'net stripped of VBA will be mostly useless. "This e-mail and any attachments to it (the "Communication") is, unless otherwise stated, confidential, may contain copyright material and is for the use only of the intended recipient. If you receive the Communication in error, please notify the sender immediately by return e-mail, delete the Communication and the return e-mail, and do not read, copy, retransmit or otherwise deal with it. Any views expressed in the Communication are those of the individual sender only, unless expressly stated to be those of Australia and New Zealand Banking Group Limited ABN 11 005 357 522, or any of its related entities including ANZ National Bank Limited (together "ANZ"). ANZ does not accept liability in connection with the integrity of or errors in the Communication, computer virus, data corruption, interference or delay arising from or in respect of the Communication." From davidmcafee at gmail.com Mon Oct 26 17:28:06 2009 From: davidmcafee at gmail.com (David McAfee) Date: Mon, 26 Oct 2009 15:28:06 -0700 Subject: [AccessD] ] Access 2007 Question - 2010 demo In-Reply-To: References: <29f585dd0910251339u735bd228vb5548bc729c0d6dc@mail.gmail.com> <12BAC542C3884C06B8BB6D81F95158F9@stevePC> <00db01ca567e$fe8b4ad0$0501a8c0@MSIMMSWS> Message-ID: <8786a4c00910261528v7ca4f36dx4e6c76a947e68ad3@mail.gmail.com> I didn't watch the video, but I love Brice IT's comments :) On Mon, Oct 26, 2009 at 2:37 PM, Jack and Pat wrote: > Max et al, > > I just found this site after ?reading thru some of the latest exchanges on > Access 2007. > > http://channel9.msdn.com/shows/Access/Microsoft-Access-2010-Demo/ > > This is a 24 minute video, and a series of comments. > Take a look at the comments from Brice IT...... > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Mark Simms > Sent: Monday, October 26, 2009 4:58 PM > To: 'Access Developers discussion and problem solving' > Subject: Re: [AccessD] Access 2007 Question > >> Now, when an Access 2010 application is published to the web, >> it gets converted to stuff like HTML and Javascript and >> SharePoint workflows. ?How you going to do that with VBA? >> Macros, based on XML, is going to work - VBA is not. ?Simple as that. > > Steve - I don't quite understand the above. > Why can't they translate much of the VBA by creating a Javascript library of > functions and objects and then create a translator to convert the VBA code > to Javascript ? > They were able to translate VB6 to VB.NET, so why not VBA to Javascript > and/or their new highly touted XAML ? > > I think an Access 2010 app ported to the 'net stripped of VBA will be mostly > useless. > > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > From drawbridgej at sympatico.ca Mon Oct 26 18:09:00 2009 From: drawbridgej at sympatico.ca (Jack and Pat) Date: Mon, 26 Oct 2009 19:09:00 -0400 Subject: [AccessD] ] Access 2007 Question - 2010 demo In-Reply-To: <8786a4c00910261528v7ca4f36dx4e6c76a947e68ad3@mail.gmail.com> References: <29f585dd0910251339u735bd228vb5548bc729c0d6dc@mail.gmail.com><12BAC542C3884C06B8BB6D81F95158F9@stevePC><00db01ca567e$fe8b4ad0$0501a8c0@MSIMMSWS> <8786a4c00910261528v7ca4f36dx4e6c76a947e68ad3@mail.gmail.com> Message-ID: The video shows the general direction for Access; and Access and the web. It's interesting.. -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of David McAfee Sent: Monday, October 26, 2009 6:28 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] ] Access 2007 Question - 2010 demo I didn't watch the video, but I love Brice IT's comments :) On Mon, Oct 26, 2009 at 2:37 PM, Jack and Pat wrote: > Max et al, > > I just found this site after ?reading thru some of the latest exchanges on > Access 2007. > > http://channel9.msdn.com/shows/Access/Microsoft-Access-2010-Demo/ > > This is a 24 minute video, and a series of comments. > Take a look at the comments from Brice IT...... > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Mark Simms > Sent: Monday, October 26, 2009 4:58 PM > To: 'Access Developers discussion and problem solving' > Subject: Re: [AccessD] Access 2007 Question > >> Now, when an Access 2010 application is published to the web, >> it gets converted to stuff like HTML and Javascript and >> SharePoint workflows. ?How you going to do that with VBA? >> Macros, based on XML, is going to work - VBA is not. ?Simple as that. > > Steve - I don't quite understand the above. > Why can't they translate much of the VBA by creating a Javascript library of > functions and objects and then create a translator to convert the VBA code > to Javascript ? > They were able to translate VB6 to VB.NET, so why not VBA to Javascript > and/or their new highly touted XAML ? > > I think an Access 2010 app ported to the 'net stripped of VBA will be mostly > useless. > > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/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 Darryl.Collins at anz.com Mon Oct 26 18:12:56 2009 From: Darryl.Collins at anz.com (Collins, Darryl) Date: Tue, 27 Oct 2009 10:12:56 +1100 Subject: [AccessD] ] Access 2007 Question - 2010 demo In-Reply-To: Message-ID: <6DC4725FDCDD72428D6114F1B6CC6E8101688B84@EXUAU020HWT110.oceania.corp.anz.com> A most excellent rant. Heh... JC are you sure you and Brice don't do lunch? Although you both are correct IMHO.... :) "This e-mail and any attachments to it (the "Communication") is, unless otherwise stated, confidential, may contain copyright material and is for the use only of the intended recipient. If you receive the Communication in error, please notify the sender immediately by return e-mail, delete the Communication and the return e-mail, and do not read, copy, retransmit or otherwise deal with it. Any views expressed in the Communication are those of the individual sender only, unless expressly stated to be those of Australia and New Zealand Banking Group Limited ABN 11 005 357 522, or any of its related entities including ANZ National Bank Limited (together "ANZ"). ANZ does not accept liability in connection with the integrity of or errors in the Communication, computer virus, data corruption, interference or delay arising from or in respect of the Communication." From jwcolby at colbyconsulting.com Mon Oct 26 20:06:49 2009 From: jwcolby at colbyconsulting.com (jwcolby) Date: Mon, 26 Oct 2009 21:06:49 -0400 Subject: [AccessD] Form Controls - Class implementation In-Reply-To: <4AE5E1BF.8090403@colbyconsulting.com> References: <7c7841600910231652w3fac6a26rd376d003c1d09fc3@mail.gmail.com> <4AE24EFA.7070708@colbyconsulting.com> <004c01ca5645$7bd24370$8d60a27a@personald6374f> <4AE5E1BF.8090403@colbyconsulting.com> Message-ID: <4AE647A9.2010505@colbyconsulting.com> clsCtlSortSupervisor will find controls for each section and tab PAGE (I said TAB in the comments below). Sorry for the confusion. John W. Colby www.ColbyConsulting.com jwcolby wrote: > I have sent three emails with the code for the same thing using a pair of classes. Data and code > encapsulation!!! > > IMHO breaking this into classes makes the coding much clearer. Now you can see that anything in > clsCtlsSorted has to do with the controls in a given object (section or tab page). clsCtlsSorted > (almost) doesn't care what the object is that it is storing controls for. It simply takes an object > that has a controls collection and iterates the controls collection, storing the controls found. > > clsCtlSortSupervisor is the supervisor class. It is responsible for finding sections and tab > controls, and instantiating clsCtlsSorted once for each form section and each tab control. Each > instance of clsCtlsSorted is stored in a collection, keyed on the name of the object (section name > or tabname.Pagename. > > clsCtlsSorted is responsible for storing the controls in a collection sorted on cstr(TabIndex) of > each control. clsCtlsSorted is responsible for discovering whether the controls are directly on the > form or in a tab and storing only the correct controls, IOW not store controls which are on a tab in > a clsCtlsSorted instance for a section, and not store controls in a section in a clsCtlsSorted > instance for a tab. > > Each class has properties and methods for its specific job. Each has a collection. Each can return > the entire collection. clsCtlSortSupervisor can return the class instance for any given object by name. > > Each class can be modified to perform other tasks or processes as needed, or can be passed in to > other classes to perform processing on the collection of controls that it contains. > > Each class can return a string of the names of the objects stored in its collection. the following > is the string of all controls on a test form (which have a TabIndex property). > > Detail:: > TabCtl22 Check35 Check37 Check39 Check41 Check43 > TabCtl22.Page23:: > Check12 Check14 Check16 Check18 Check20 Frame45 > TabCtl22.Page24:: > Text66 > FormHeader:: > Combo4 Combo6 > FormFooter:: > Command0 Command1 > PageHeaderSection:: > Text8 Text10 > PageFooterSection:: > Command2 Command3 > > > > John W. Colby > www.ColbyConsulting.com > > > A.D.Tejpal wrote: >> Run time handling of form controls in the order of tab index. >> ======================================== >> >> Use of a collection as suggested by J.C., appears to be the optimum >> approach, provided the point raised by Ken is addressed suitably. A form >> having three tab controls each with 4 pages, would need 15 collections as >> each form section or tab control page has its own set of tab indices for >> controls located therein. >> >> There could be an interesting way to handle this requirement >> conveniently by adoption of a single collection where each of its elements >> is itself a collection, permitting a generic subroutine to handle unlimited >> number of tab control pages apart from the three form sections (detail, >> header & footer) > From marksimms at verizon.net Mon Oct 26 20:38:58 2009 From: marksimms at verizon.net (Mark Simms) Date: Mon, 26 Oct 2009 21:38:58 -0400 Subject: [AccessD] Access 2007 Question In-Reply-To: <6DC4725FDCDD72428D6114F1B6CC6E8101688B80@EXUAU020HWT110.oceania.corp.anz.com> References: <00db01ca567e$fe8b4ad0$0501a8c0@MSIMMSWS> <6DC4725FDCDD72428D6114F1B6CC6E8101688B80@EXUAU020HWT110.oceania.corp.anz.com> Message-ID: <003e01ca56a6$40e6ae20$0501a8c0@MSIMMSWS> > Having the ability to make the software sing and dance with > VBA is where most the values lies IMHO. Of course Darryl, and this is so OBVIOUS. Can you imagine the advantage we'd have if we could code in Access/VBA, and then press a button to DEPLOY to the 'net as a web app ? Suddenly, ASP.NET developers would go hungry. And this post has most likely not received much response from this group because many of these folks are on "NDA" with Access 2010. There have been many "previews" of Office 2010 on the 'net and other publications like eWeek, etc. I've read them all. However, NONE have even made a mention of Access 2010. Not one. That tells me MSFT is "up" to something with this release. I can see the missive from BG now: Anyone who squawks, gets "shot". From miscellany at mvps.org Tue Oct 27 00:40:07 2009 From: miscellany at mvps.org (Steve Schapel) Date: Tue, 27 Oct 2009 18:40:07 +1300 Subject: [AccessD] Access 2007 Question In-Reply-To: <00db01ca567e$fe8b4ad0$0501a8c0@MSIMMSWS> References: <29f585dd0910251339u735bd228vb5548bc729c0d6dc@mail.gmail.com> <12BAC542C3884C06B8BB6D81F95158F9@stevePC> <00db01ca567e$fe8b4ad0$0501a8c0@MSIMMSWS> Message-ID: <5C9D6C62904D4E99A6D676A8F1323CEF@stevePC> Hi Mark, -------------------------------------------------- From: "Mark Simms" Sent: Tuesday, October 27, 2009 9:57 AM > Steve - I don't quite understand the above. > Why can't they translate much of the VBA by creating a Javascript library > of > functions and objects and then create a translator to convert the VBA code > to Javascript ? > They were able to translate VB6 to VB.NET, so why not VBA to Javascript > and/or their new highly touted XAML ? I do not know whether it is theoretically technically possible or not, to do the kind of thing you suggest. However, it's a pretty certain guess that if it had been possible from a time/resources/practical point of view, "they" would have done so. > I think an Access 2010 app ported to the 'net stripped of VBA will be > mostly > useless. An application has to be compatible with the web, before it can be "ported". So nothing will get "stripped". It needs to be built from the outset as compatible - which means (among other mindset changes) macros. Regards Steve From max.wanadoo at gmail.com Tue Oct 27 02:29:13 2009 From: max.wanadoo at gmail.com (Max Wanadoo) Date: Tue, 27 Oct 2009 07:29:13 -0000 Subject: [AccessD] ] Access 2007 Question - 2010 demo In-Reply-To: References: <29f585dd0910251339u735bd228vb5548bc729c0d6dc@mail.gmail.com><12BAC542C3884C06B8BB6D81F95158F9@stevePC> <00db01ca567e$fe8b4ad0$0501a8c0@MSIMMSWS> Message-ID: <4ae6a150.0a1ad00a.7d3d.ffffedf1@mx.google.com> Indeed! Thanks Max -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Jack and Pat Sent: 26 October 2009 21:38 To: 'Access Developers discussion and problem solving' Subject: [AccessD] ] Access 2007 Question - 2010 demo Max et al, I just found this site after reading thru some of the latest exchanges on Access 2007. http://channel9.msdn.com/shows/Access/Microsoft-Access-2010-Demo/ This is a 24 minute video, and a series of comments. Take a look at the comments from Brice IT...... -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Mark Simms Sent: Monday, October 26, 2009 4:58 PM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Access 2007 Question > Now, when an Access 2010 application is published to the web, > it gets converted to stuff like HTML and Javascript and > SharePoint workflows. How you going to do that with VBA? > Macros, based on XML, is going to work - VBA is not. Simple as that. Steve - I don't quite understand the above. Why can't they translate much of the VBA by creating a Javascript library of functions and objects and then create a translator to convert the VBA code to Javascript ? They were able to translate VB6 to VB.NET, so why not VBA to Javascript and/or their new highly touted XAML ? I think an Access 2010 app ported to the 'net stripped of VBA will be mostly useless. -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From mwp.reid at qub.ac.uk Tue Oct 27 03:24:19 2009 From: mwp.reid at qub.ac.uk (Martin Reid) Date: Tue, 27 Oct 2009 08:24:19 +0000 Subject: [AccessD] Access 2007 Question In-Reply-To: <003e01ca56a6$40e6ae20$0501a8c0@MSIMMSWS> References: <00db01ca567e$fe8b4ad0$0501a8c0@MSIMMSWS> <6DC4725FDCDD72428D6114F1B6CC6E8101688B80@EXUAU020HWT110.oceania.corp.anz.com>, <003e01ca56a6$40e6ae20$0501a8c0@MSIMMSWS> Message-ID: <631CF83223105545BF43EFB52CB0829502AE126BB9@EX2K7-VIRT-2.ads.qub.ac.uk> Mark I am under an NDA but can tell you there is nothing underhand that I can see in this release of Access. A table is still a table, a relational database is still just that but there are additional tools and techniques if you require them. Overall because it meets the requirements the I have I like 2010 overall. Martin Martin WP Reid Information Services The Library at Queen's Tel : 02890976174 Email : mwp.reid at qub.ac.uk From Gustav at cactus.dk Tue Oct 27 06:38:34 2009 From: Gustav at cactus.dk (Gustav Brock) Date: Tue, 27 Oct 2009 12:38:34 +0100 Subject: [AccessD] MySQL 5.1 in the cloud for USD 0.11 per hour Message-ID: Hi all Now Amazon brings MySQL 5.1 forward at this entry level cost. The service is named: Amazon Relational Database Service (Amazon RDS) http://aws.amazon.com/rds/ Database storage goes from 5 GB to 1 TB. /gustav From jwcolby at colbyconsulting.com Tue Oct 27 06:45:51 2009 From: jwcolby at colbyconsulting.com (jwcolby) Date: Tue, 27 Oct 2009 07:45:51 -0400 Subject: [AccessD] Access 2007 Question In-Reply-To: <5C9D6C62904D4E99A6D676A8F1323CEF@stevePC> References: <29f585dd0910251339u735bd228vb5548bc729c0d6dc@mail.gmail.com> <12BAC542C3884C06B8BB6D81F95158F9@stevePC> <00db01ca567e$fe8b4ad0$0501a8c0@MSIMMSWS> <5C9D6C62904D4E99A6D676A8F1323CEF@stevePC> Message-ID: <4AE6DD6F.4040608@colbyconsulting.com> Steve, > It needs to be built from the outset as compatible - which means (among other mindset changes) macros. LOL. Tell that to .Net! John W. Colby www.ColbyConsulting.com Steve Schapel wrote: > Hi Mark, > > -------------------------------------------------- > From: "Mark Simms" > Sent: Tuesday, October 27, 2009 9:57 AM > >> Steve - I don't quite understand the above. >> Why can't they translate much of the VBA by creating a Javascript library >> of >> functions and objects and then create a translator to convert the VBA code >> to Javascript ? >> They were able to translate VB6 to VB.NET, so why not VBA to Javascript >> and/or their new highly touted XAML ? > > I do not know whether it is theoretically technically possible or not, to do > the kind of thing you suggest. However, it's a pretty certain guess that if > it had been possible from a time/resources/practical point of view, "they" > would have done so. > >> I think an Access 2010 app ported to the 'net stripped of VBA will be >> mostly >> useless. > > An application has to be compatible with the web, before it can be "ported". > So nothing will get "stripped". It needs to be built from the outset as > compatible - which means (among other mindset changes) macros. > > Regards > Steve > From drawbridgej at sympatico.ca Tue Oct 27 07:27:56 2009 From: drawbridgej at sympatico.ca (Jack and Pat) Date: Tue, 27 Oct 2009 08:27:56 -0400 Subject: [AccessD] ] Access 2007 Question - Did you watch the Access 2010 demo In-Reply-To: <4ae6a150.0a1ad00a.7d3d.ffffedf1@mx.google.com> References: <29f585dd0910251339u735bd228vb5548bc729c0d6dc@mail.gmail.com><12BAC542C3884C06B8BB6D81F95158F9@stevePC> <00db01ca567e$fe8b4ad0$0501a8c0@MSIMMSWS> <4ae6a150.0a1ad00a.7d3d.ffffedf1@mx.google.com> Message-ID: Just wondering if anyone watched the video http://channel9.msdn.com/shows/Access/Microsoft-Access-2010-Demo/ jack -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Max Wanadoo Sent: Tuesday, October 27, 2009 3:29 AM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] ] Access 2007 Question - 2010 demo Indeed! Thanks Max -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Jack and Pat Sent: 26 October 2009 21:38 To: 'Access Developers discussion and problem solving' Subject: [AccessD] ] Access 2007 Question - 2010 demo Max et al, I just found this site after reading thru some of the latest exchanges on Access 2007. http://channel9.msdn.com/shows/Access/Microsoft-Access-2010-Demo/ This is a 24 minute video, and a series of comments. Take a look at the comments from Brice IT...... -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Mark Simms Sent: Monday, October 26, 2009 4:58 PM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Access 2007 Question > Now, when an Access 2010 application is published to the web, > it gets converted to stuff like HTML and Javascript and > SharePoint workflows. How you going to do that with VBA? > Macros, based on XML, is going to work - VBA is not. Simple as that. Steve - I don't quite understand the above. Why can't they translate much of the VBA by creating a Javascript library of functions and objects and then create a translator to convert the VBA code to Javascript ? They were able to translate VB6 to VB.NET, so why not VBA to Javascript and/or their new highly touted XAML ? I think an Access 2010 app ported to the 'net stripped of VBA will be mostly useless. -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/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 Tue Oct 27 07:51:54 2009 From: jwcolby at colbyconsulting.com (jwcolby) Date: Tue, 27 Oct 2009 08:51:54 -0400 Subject: [AccessD] ] Access 2007 Question - Did you watch the Access 2010 demo In-Reply-To: References: <29f585dd0910251339u735bd228vb5548bc729c0d6dc@mail.gmail.com><12BAC542C3884C06B8BB6D81F95158F9@stevePC> <00db01ca567e$fe8b4ad0$0501a8c0@MSIMMSWS> <4ae6a150.0a1ad00a.7d3d.ffffedf1@mx.google.com> Message-ID: <4AE6ECEA.3030207@colbyconsulting.com> No. I'm waiting for someone else to spend their time and critique it. ;) John W. Colby www.ColbyConsulting.com Jack and Pat wrote: > Just wondering if anyone watched the video > http://channel9.msdn.com/shows/Access/Microsoft-Access-2010-Demo/ > > jack From jwcolby at colbyconsulting.com Tue Oct 27 07:58:49 2009 From: jwcolby at colbyconsulting.com (jwcolby) Date: Tue, 27 Oct 2009 08:58:49 -0400 Subject: [AccessD] Access 2007 / 2003 install shuffle Message-ID: <4AE6EE89.8030906@colbyconsulting.com> One of my clients uses 2007 (the database from hell guy) and wants me to send stuff to him in 2007 Excel. So I installed Office 2007 on that machine in its own directory. Office 2003 was already installed. I allowed 2007 to uninstall 2003 Outlook (I don't use outlook anymore anyway). So then I do the install shuffle. It was reasonably fast! As in 30 seconds to open 2007 after 2003. Six seconds to open 2003 after 2007. 3.0 GHZ Quad core AMD, 16 gig ram, Windows 2003 x64. I was expecting a couple of minutes. -- John W. Colby www.ColbyConsulting.com From hollisvj at pgdp.usec.com Tue Oct 27 09:09:52 2009 From: hollisvj at pgdp.usec.com (Hollis, Virginia) Date: Tue, 27 Oct 2009 09:09:52 -0500 Subject: [AccessD] Expiration Date Message-ID: <703BDA18A87DFA4CB265A86F42E4178D0902DE32@c2k3exchange.pgdp.corp.usec.com> I am trying to show the items that will expire in the next 30 days. If it has already expired I need to show that the item has expired. The below code I tried having a calculated field (txtExpireDays) that calculates the DateDiff to determine the number of days between the Early Expiration date & today's date. If the item is going to expire it shows a message that "Some items will expire in "number of" days." If the item's expiration date has passed (it is expired) then the DateEarlyExp field is red & it's label shows - "Expired". I placed this in the OnCurrent. The problem is (I think) if you hit a record with a Null DateEarlyExp it keeps the previous records calculations & shows that on the screen as you scroll through the records. Should the DateDiff calculation be somewhere in the with the code OnCurrent instead of a separate text box? Did I write this completely wrong (a better way to do this)? Text box on the form (hidden) 'DateEarlyExp.value = DateDiff('d',Date(),[DateEarlyExp]) If (txtExpireDays > 0 And txtExpireDays <= 31) Then Me.lblExpire.Visible = True Me.lblExpire.ForeColor = lngRed lblExpire.Caption = "Some items will expire in " & txtExpireDays & " days" ElseIf txtExpireDays < 1 Then Me.DateEarlyExp.ForeColor = lngRed EarlyExpLabel.ForeColor = lngRed EarlyExpLabel.Caption = "Item Expired:" Else lblExpire.Visible = False EarlyExpLabel.Caption = "Early expiration:" EarlyExpLabel.ForeColor = 8388608 Me.DateEarlyExp.ForeColor = lngBlack End If From hollisvj at pgdp.usec.com Tue Oct 27 09:16:02 2009 From: hollisvj at pgdp.usec.com (Hollis, Virginia) Date: Tue, 27 Oct 2009 09:16:02 -0500 Subject: [AccessD] Access 2007 / 2003 install shuffle Message-ID: <703BDA18A87DFA4CB265A86F42E4178D0902DE3E@c2k3exchange.pgdp.corp.usec.com> I run 2003 & 2007 on the same machine. The only thing I don't like it always uses 2007 as the default. When I ran 97 & 2003 on the same PC it depended on which one you used last. You can't run both Outlooks, you have to choose to uninstall it when you add 2007 (I prefer 2007 Outlook). Sometimes when I use 2003 & open something in 2007 it wants to run setup. It doesn't take long (sort of), but it gets annoying. This mostly seems to happen when I open Word. I used the default location when I installed. I noticed you installed 2007 in its own directly. Virginia One of my clients uses 2007 (the database from hell guy) and wants me to send stuff to him in 2007 Excel. So I installed Office 2007 on that machine in its own directory. Office 2003 was already installed. I allowed 2007 to uninstall 2003 Outlook (I don't use outlook anymore anyway). So then I do the install shuffle. It was reasonably fast! As in 30 seconds to open 2007 after 2003. Six seconds to open 2003 after 2007. 3.0 GHZ Quad core AMD, 16 gig ram, Windows 2003 x64. I was expecting a couple of minutes. -- John W. Colby www.ColbyConsulting.com From sturner at mseco.com Tue Oct 27 09:17:44 2009 From: sturner at mseco.com (Steve Turner) Date: Tue, 27 Oct 2009 09:17:44 -0500 Subject: [AccessD] ] Access 2007 Question - Did you watch the Access 2010 demo In-Reply-To: <4AE6ECEA.3030207@colbyconsulting.com> References: <29f585dd0910251339u735bd228vb5548bc729c0d6dc@mail.gmail.com><12BAC542C3884C06B8BB6D81F95158F9@stevePC> <00db01ca567e$fe8b4ad0$0501a8c0@MSIMMSWS> <4ae6a150.0a1ad00a.7d3d.ffffedf1@mx.google.com> <4AE6ECEA.3030207@colbyconsulting.com> Message-ID: <31B7F3CC8CC4454F87FCBEFF82B6189203379746@PE2850-03.mseco.com> Watched it. Being a neophyte programmer what they did in a few minutes is something else. It would take a long time for me to ever figure out how to do this otherwise. Adding a report to a web page form was nothing. Hope I get the chance to see if it is really that easy. Steve A. Turner -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Tuesday, October 27, 2009 7:52 AM To: Access Developers discussion and problem solving Subject: Re: [AccessD] ] Access 2007 Question - Did you watch the Access 2010 demo No. I'm waiting for someone else to spend their time and critique it. ;) John W. Colby www.ColbyConsulting.com Jack and Pat wrote: > Just wondering if anyone watched the video > http://channel9.msdn.com/shows/Access/Microsoft-Access-2010-Demo/ > > jack -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From rockysmolin at bchacc.com Tue Oct 27 09:25:20 2009 From: rockysmolin at bchacc.com (Rocky Smolin) Date: Tue, 27 Oct 2009 07:25:20 -0700 Subject: [AccessD] Access 2007 / 2003 install shuffle In-Reply-To: <4AE6EE89.8030906@colbyconsulting.com> References: <4AE6EE89.8030906@colbyconsulting.com> Message-ID: Would it be even faster in an VM? Rocky -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Tuesday, October 27, 2009 5:59 AM To: Access Developers discussion and problem solving Subject: [AccessD] Access 2007 / 2003 install shuffle One of my clients uses 2007 (the database from hell guy) and wants me to send stuff to him in 2007 Excel. So I installed Office 2007 on that machine in its own directory. Office 2003 was already installed. I allowed 2007 to uninstall 2003 Outlook (I don't use outlook anymore anyway). So then I do the install shuffle. It was reasonably fast! As in 30 seconds to open 2007 after 2003. Six seconds to open 2003 after 2007. 3.0 GHZ Quad core AMD, 16 gig ram, Windows 2003 x64. I was expecting a couple of minutes. -- 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 Oct 27 09:48:12 2009 From: jwcolby at colbyconsulting.com (jwcolby) Date: Tue, 27 Oct 2009 10:48:12 -0400 Subject: [AccessD] Access 2007 / 2003 install shuffle In-Reply-To: <703BDA18A87DFA4CB265A86F42E4178D0902DE3E@c2k3exchange.pgdp.corp.usec.com> References: <703BDA18A87DFA4CB265A86F42E4178D0902DE3E@c2k3exchange.pgdp.corp.usec.com> Message-ID: <4AE7082C.8080206@colbyconsulting.com> I always install each version in it's own directory - just an old habit. I use the quicklaunch toolbar a lot so I will put a shortcut to the 2003 version (if I use that mostly) as well as a shortcut to the 2003 version with the /Decompile switch. If I ever get to the point where I actually use 2007 I will likely put a shortcut to that as well. The icon is different so it would be easy to visually determine the difference. I don't use Access 2007 at all (yet) so under normal circumstances it would always be at the 2003 version. That said, I will be using the 2007 version of Excel for this specific client - this machine is in fact a SQL Server created specifically for that client. I haven't tested whether using Excel 2007 will trigger ACCESS 2003 to reinstall itself, though it appears to be an OFFICE install so I suspect that it will. I use Access 2003 a LOT on this machine - ATM it supervises (runs) all of my stored procedures in SQL Server. Eventually I will be rewriting that Access "supervisor" code out in C#.Net. John W. Colby www.ColbyConsulting.com Hollis, Virginia wrote: > I run 2003 & 2007 on the same machine. The only thing I don't like it > always uses 2007 as the default. When I ran 97 & 2003 on the same PC it > depended on which one you used last. > > > > You can't run both Outlooks, you have to choose to uninstall it when you > add 2007 (I prefer 2007 Outlook). > > > > Sometimes when I use 2003 & open something in 2007 it wants to run > setup. It doesn't take long (sort of), but it gets annoying. This mostly > seems to happen when I open Word. > > > > I used the default location when I installed. I noticed you installed > 2007 in its own directly. > > > > Virginia > > > > > > One of my clients uses 2007 (the database from hell guy) and wants me to > send stuff to him in 2007 Excel. So I installed Office 2007 on that > machine in its own directory. Office 2003 was already installed. I > allowed 2007 to uninstall 2003 Outlook (I don't use outlook anymore > anyway). > > > > So then I do the install shuffle. It was reasonably fast! As in 30 > seconds to open 2007 after 2003. Six seconds to open 2003 after 2007. > > > > 3.0 GHZ Quad core AMD, 16 gig ram, Windows 2003 x64. > > > > I was expecting a couple of minutes. > > > From dbdoug at gmail.com Tue Oct 27 09:52:37 2009 From: dbdoug at gmail.com (Doug Steele) Date: Tue, 27 Oct 2009 07:52:37 -0700 Subject: [AccessD] Access 2007 / 2003 install shuffle In-Reply-To: References: <4AE6EE89.8030906@colbyconsulting.com> Message-ID: <4dd71a0c0910270752h102f60d3r460d5efcc84e3e60@mail.gmail.com> Yeah, I've never dared to install 2007 alongside 2003; I've always used a VM. For the couple of clients I have who use 2007, I originally started out developing their dbs in 2003 then converting to 2007 on the VM before I sent them to the client. I had to send two version to the clients, as they both have mixed setups - some machines running 2003, others 2007. The clients were getting bizarre intermittent errors on the 2007 machines, so after a while I tried sending them 2003 versions only. The number of errors didn't increase, and may even have gone down, so now I don't bother with 2007 versions at all. Doug Steele On Tue, Oct 27, 2009 at 7:25 AM, Rocky Smolin wrote: > Would it be even faster in an VM? > > Rocky > > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby > Sent: Tuesday, October 27, 2009 5:59 AM > To: Access Developers discussion and problem solving > Subject: [AccessD] Access 2007 / 2003 install shuffle > > One of my clients uses 2007 (the database from hell guy) and wants me to > send stuff to him in 2007 Excel. So I installed Office 2007 on that > machine > in its own directory. Office 2003 was already installed. I allowed 2007 > to > uninstall 2003 Outlook (I don't use outlook anymore anyway). > > > So then I do the install shuffle. It was reasonably fast! As in 30 > seconds > to open 2007 after 2003. Six seconds to open 2003 after 2007. > > 3.0 GHZ Quad core AMD, 16 gig ram, Windows 2003 x64. > > I was expecting a couple of minutes. > > -- > 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 Oct 27 09:55:16 2009 From: jwcolby at colbyconsulting.com (jwcolby) Date: Tue, 27 Oct 2009 10:55:16 -0400 Subject: [AccessD] SPAM-LOW: Re: Access 2007 / 2003 install shuffle In-Reply-To: References: <4AE6EE89.8030906@colbyconsulting.com> Message-ID: <4AE709D4.7020502@colbyconsulting.com> There are advantages to a VM, but in this specific case I need Excel 2007 available at all times. This machine is a SQL Server that I built specifically for this client who uses 2007. He uses Excel 2007, and loves it mostly because of the large spreadsheets it can create. Or something. At any rate, I need to be able to generate native 2007 spreadsheets for him. OTOH I also use Access 2003 to supervise some complex BCP output / input processes, processes which take as many as 5-10 stored procedures to accomplish (each way). So I use Access even more than I use Excel. I will NOT be going to Access 2007 for this stuff, it is just too confusing. So it is Access 2003 and Excel 2007. Sigh. John W. Colby www.ColbyConsulting.com Rocky Smolin wrote: > Would it be even faster in an VM? > > Rocky > > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby > Sent: Tuesday, October 27, 2009 5:59 AM > To: Access Developers discussion and problem solving > Subject: [AccessD] Access 2007 / 2003 install shuffle > > One of my clients uses 2007 (the database from hell guy) and wants me to > send stuff to him in 2007 Excel. So I installed Office 2007 on that machine > in its own directory. Office 2003 was already installed. I allowed 2007 to > uninstall 2003 Outlook (I don't use outlook anymore anyway). > > > So then I do the install shuffle. It was reasonably fast! As in 30 seconds > to open 2007 after 2003. Six seconds to open 2003 after 2007. > > 3.0 GHZ Quad core AMD, 16 gig ram, Windows 2003 x64. > > I was expecting a couple of minutes. > > -- > 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 rockysmolin at bchacc.com Tue Oct 27 10:54:45 2009 From: rockysmolin at bchacc.com (Rocky Smolin) Date: Tue, 27 Oct 2009 08:54:45 -0700 Subject: [AccessD] SPAM-LOW: Re: Access 2007 / 2003 install shuffle In-Reply-To: <4AE709D4.7020502@colbyconsulting.com> References: <4AE6EE89.8030906@colbyconsulting.com> <4AE709D4.7020502@colbyconsulting.com> Message-ID: When is 2010 due? If it is as improved as W7, that might be a solution to a lot of our problems. Rocky -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Tuesday, October 27, 2009 7:55 AM To: Access Developers discussion and problem solving Subject: Re: [AccessD] SPAM-LOW: Re: Access 2007 / 2003 install shuffle There are advantages to a VM, but in this specific case I need Excel 2007 available at all times. This machine is a SQL Server that I built specifically for this client who uses 2007. He uses Excel 2007, and loves it mostly because of the large spreadsheets it can create. Or something. At any rate, I need to be able to generate native 2007 spreadsheets for him. OTOH I also use Access 2003 to supervise some complex BCP output / input processes, processes which take as many as 5-10 stored procedures to accomplish (each way). So I use Access even more than I use Excel. I will NOT be going to Access 2007 for this stuff, it is just too confusing. So it is Access 2003 and Excel 2007. Sigh. John W. Colby www.ColbyConsulting.com Rocky Smolin wrote: > Would it be even faster in an VM? > > Rocky > > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby > Sent: Tuesday, October 27, 2009 5:59 AM > To: Access Developers discussion and problem solving > Subject: [AccessD] Access 2007 / 2003 install shuffle > > One of my clients uses 2007 (the database from hell guy) and wants me > to send stuff to him in 2007 Excel. So I installed Office 2007 on > that machine in its own directory. Office 2003 was already installed. > I allowed 2007 to uninstall 2003 Outlook (I don't use outlook anymore anyway). > > > So then I do the install shuffle. It was reasonably fast! As in 30 > seconds to open 2007 after 2003. Six seconds to open 2003 after 2007. > > 3.0 GHZ Quad core AMD, 16 gig ram, Windows 2003 x64. > > I was expecting a couple of minutes. > > -- > 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 Oct 27 11:19:54 2009 From: jwcolby at colbyconsulting.com (jwcolby) Date: Tue, 27 Oct 2009 12:19:54 -0400 Subject: [AccessD] SPAM-LOW: Re: Access 2007 / 2003 install shuffle In-Reply-To: References: <4AE6EE89.8030906@colbyconsulting.com> <4AE709D4.7020502@colbyconsulting.com> Message-ID: <4AE71DAA.90200@colbyconsulting.com> > When is 2010 due? If it is as improved as W7, that might be a solution to a lot of our problems. Rocky, Rocky, Rocky. Will you never learn? NEW stuff, not fixes for old problems. John W. Colby www.ColbyConsulting.com Rocky Smolin wrote: > When is 2010 due? If it is as improved as W7, that might be a solution to a > lot of our problems. > > Rocky From kismert at gmail.com Tue Oct 27 11:22:02 2009 From: kismert at gmail.com (Kenneth Ismert) Date: Tue, 27 Oct 2009 11:22:02 -0500 Subject: [AccessD] Access 2007 Question Message-ID: <7c7841600910270922y67c6d1dgba8e0168d461e404@mail.gmail.com> Hi, again. Some responses: For me, one of the biggest arguments for VBA over macros is searchability. You can't search macros or form and report properties. For large projects, having all of the dependencies and interactions in code is a huge advantage. Mark Simms: > Why can't they translate much of the VBA by creating a Javascript library > of > functions and objects and then create a translator to convert the VBA code > to Javascript ? > Emulating VBA in JavaScript is doable, but all VBA code in Access is intimately tied to the Access object library, as well as DAO, ADO, etc. It would be impractical to move such a huge amount of support functionality to JavaScript, and infeasible to use it directly via remote procedure calls against the real application on the other side of the internet. > I think an Access 2010 app ported to the 'net stripped of VBA will be > mostly > useless. > Certainly for all of us old-timers who have Access/VBA projects that we want to port. But for Access newbies, the ability to publish to the web through SharePoint will be quite a carrot. Most will be more than happy to forgo VBA to get that capability. John W. Colby: > > In the meantime I am learning C#.Net. C# is much more powerful in many > ways, and if future jobs allow me to choose between C# and Access 2007 (or > beyond) you better believe I will use C# rather than Access. > That's clearly where Microsoft wants everyone to go for serious development. But the 'programming priesthood' of .NET excludes the talented amateurs who could build a salable application with Access, but don't have a prayer of doing the same in Visual Studio. -Ken From rockysmolin at bchacc.com Tue Oct 27 11:28:29 2009 From: rockysmolin at bchacc.com (Rocky Smolin) Date: Tue, 27 Oct 2009 09:28:29 -0700 Subject: [AccessD] SPAM-LOW: Re: Access 2007 / 2003 install shuffle In-Reply-To: <4AE71DAA.90200@colbyconsulting.com> References: <4AE6EE89.8030906@colbyconsulting.com> <4AE709D4.7020502@colbyconsulting.com> <4AE71DAA.90200@colbyconsulting.com> Message-ID: Hope springs eternal... Everything I've read about W7 - and the little experience I've had with it on a test box - has been really good - way ahead of Vista. Maybe.... -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Tuesday, October 27, 2009 9:20 AM To: Access Developers discussion and problem solving Subject: Re: [AccessD] SPAM-LOW: Re: Access 2007 / 2003 install shuffle > When is 2010 due? If it is as improved as W7, that might be a solution to a lot of our problems. Rocky, Rocky, Rocky. Will you never learn? NEW stuff, not fixes for old problems. John W. Colby www.ColbyConsulting.com Rocky Smolin wrote: > When is 2010 due? If it is as improved as W7, that might be a > solution to a lot of our problems. > > Rocky -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From marksimms at verizon.net Tue Oct 27 11:48:20 2009 From: marksimms at verizon.net (Mark Simms) Date: Tue, 27 Oct 2009 12:48:20 -0400 Subject: [AccessD] SPAM-LOW: Re: Access 2007 / 2003 install shuffle In-Reply-To: References: <4AE6EE89.8030906@colbyconsulting.com> <4AE709D4.7020502@colbyconsulting.com> Message-ID: <010401ca5725$4aad7a90$0501a8c0@MSIMMSWS> > > When is 2010 due? If it is as improved as W7, that might be > a solution to a lot of our problems. > > Rocky > And not a problem to a lot of our solutions as AC 2007 was.... From davidmcafee at gmail.com Tue Oct 27 12:23:19 2009 From: davidmcafee at gmail.com (David McAfee) Date: Tue, 27 Oct 2009 10:23:19 -0700 Subject: [AccessD] Expiration Date In-Reply-To: <703BDA18A87DFA4CB265A86F42E4178D0902DE32@c2k3exchange.pgdp.corp.usec.com> References: <703BDA18A87DFA4CB265A86F42E4178D0902DE32@c2k3exchange.pgdp.corp.usec.com> Message-ID: <8786a4c00910271023y7257dd91qe868f5aa7f63ddd8@mail.gmail.com> I'd keep it in the OnCurrent event. Use NZ() and some future date 'DateEarlyExp.value = DateDiff('d',Date(),NZ([DateEarlyExp],DATE()+365)) On Tue, Oct 27, 2009 at 7:09 AM, Hollis, Virginia wrote: > I am trying to show the items that will expire in the next 30 days. If > it has already expired I need to show that the item has expired. > > > > The below code I tried having a calculated field (txtExpireDays) that > calculates the DateDiff to determine the number of days between the > Early Expiration date & today's date. > > > > If the item is going to expire it shows a message that "Some items will > expire in "number of" days." If the item's expiration date has passed > (it is expired) then the DateEarlyExp field is red & it's label shows - > "Expired". > > > > I placed this in the OnCurrent. ?The problem is (I think) if you hit a > record with a Null DateEarlyExp it keeps the previous records > calculations & shows that on the screen as you scroll through the > records. > > > > Should the DateDiff calculation be somewhere in the with the code > OnCurrent instead of a separate text box? Did I write this completely > wrong (a better way to do this)? > > > > > > Text box on the form (hidden) ? ?'DateEarlyExp.value = > DateDiff('d',Date(),[DateEarlyExp]) > > > > If (txtExpireDays > 0 And txtExpireDays <= 31) Then > > ? ?Me.lblExpire.Visible = True > > ? ?Me.lblExpire.ForeColor = lngRed > > ? ?lblExpire.Caption = "Some items will expire in " & txtExpireDays & " > days" > > ElseIf txtExpireDays < 1 Then > > ? ?Me.DateEarlyExp.ForeColor = lngRed > > ? ?EarlyExpLabel.ForeColor = lngRed > > ? ?EarlyExpLabel.Caption = "Item Expired:" > > Else > > ? ?lblExpire.Visible = False > > ? ?EarlyExpLabel.Caption = "Early expiration:" > > ? ?EarlyExpLabel.ForeColor = 8388608 > > ? ?Me.DateEarlyExp.ForeColor = lngBlack > > End If > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > From davidmcafee at gmail.com Tue Oct 27 12:26:04 2009 From: davidmcafee at gmail.com (David McAfee) Date: Tue, 27 Oct 2009 10:26:04 -0700 Subject: [AccessD] ] Access 2007 Question - Did you watch the Access 2010 demo In-Reply-To: References: <29f585dd0910251339u735bd228vb5548bc729c0d6dc@mail.gmail.com> <12BAC542C3884C06B8BB6D81F95158F9@stevePC> <00db01ca567e$fe8b4ad0$0501a8c0@MSIMMSWS> <4ae6a150.0a1ad00a.7d3d.ffffedf1@mx.google.com> Message-ID: <8786a4c00910271026w1bb2d542ib3519b2d4aee29de@mail.gmail.com> I finally watched it. No Opinion really. They didn't show me something that I cant already do (with code) or something that I'd want to do. Did they use tabs as a menu? On Tue, Oct 27, 2009 at 5:27 AM, Jack and Pat wrote: > Just wondering if anyone watched the video > http://channel9.msdn.com/shows/Access/Microsoft-Access-2010-Demo/ > > jack From miscellany at mvps.org Tue Oct 27 12:47:55 2009 From: miscellany at mvps.org (Steve Schapel) Date: Wed, 28 Oct 2009 06:47:55 +1300 Subject: [AccessD] ] Access 2007 Question - Did you watch the Access2010 demo In-Reply-To: <8786a4c00910271026w1bb2d542ib3519b2d4aee29de@mail.gmail.com> References: <29f585dd0910251339u735bd228vb5548bc729c0d6dc@mail.gmail.com> <12BAC542C3884C06B8BB6D81F95158F9@stevePC> <00db01ca567e$fe8b4ad0$0501a8c0@MSIMMSWS> <4ae6a150.0a1ad00a.7d3d.ffffedf1@mx.google.com> <8786a4c00910271026w1bb2d542ib3519b2d4aee29de@mail.gmail.com> Message-ID: <168F32E4636E4C15A4D2C578979364E3@stevePC> David, -------------------------------------------------- From: "David McAfee" Sent: Wednesday, October 28, 2009 6:26 AM > Did they use tabs as a menu? No, this is a new type of control coming with Access 2010, called a Navigation Control. Regards Steve From hollisvj at pgdp.usec.com Tue Oct 27 12:57:13 2009 From: hollisvj at pgdp.usec.com (Hollis, Virginia) Date: Tue, 27 Oct 2009 12:57:13 -0500 Subject: [AccessD] Expiration Date Message-ID: <703BDA18A87DFA4CB265A86F42E4178D0902DF58@c2k3exchange.pgdp.corp.usec.com> Still doesn't work correctly. If I hit a record that is Expired all the other records show Expired even if they aren't. Would it work better if I used a Select Case? Would that have something to do with it? ************** I'd keep it in the OnCurrent event. Use NZ() and some future date 'DateEarlyExp.value = DateDiff('d',Date(),NZ([DateEarlyExp],DATE()+365)) *************** On Tue, Oct 27, 2009 at 7:09 AM, Hollis, Virginia hollisvj at pgdp.usec.com > wrote: I am trying to show the items that will expire in the next 30 days. If it has already expired I need to show that the item has expired. The below code I tried having a calculated field (txtExpireDays) that calculates the DateDiff to determine the number of days between the Early Expiration date & today's date. If the item is going to expire it shows a message that "Some items will expire in "number of" days." If the item's expiration date has passed (it is expired) then the DateEarlyExp field is red & it's label shows - "Expired". I placed this in the OnCurrent. The problem is (I think) if you hit a record with a Null DateEarlyExp it keeps the previous records calculations & shows that on the screen as you scroll through the records. Should the DateDiff calculation be somewhere in the with the code OnCurrent instead of a separate text box? Did I write this completely wrong (a better way to do this)? Text box on the form (hidden) 'DateEarlyExp.value = DateDiff('d',Date(),[DateEarlyExp]) If (txtExpireDays > 0 And txtExpireDays <= 31) Then Me.lblExpire.Visible = True Me.lblExpire.ForeColor = lngRed lblExpire.Caption = "Some items will expire in " & txtExpireDays & " days" ElseIf txtExpireDays < 1 Then Me.DateEarlyExp.ForeColor = lngRed EarlyExpLabel.ForeColor = lngRed EarlyExpLabel.Caption = "Item Expired:" Else lblExpire.Visible = False EarlyExpLabel.Caption = "Early expiration:" EarlyExpLabel.ForeColor = 8388608 Me.DateEarlyExp.ForeColor = lngBlack End If From davidmcafee at gmail.com Tue Oct 27 13:11:04 2009 From: davidmcafee at gmail.com (David McAfee) Date: Tue, 27 Oct 2009 11:11:04 -0700 Subject: [AccessD] Expiration Date In-Reply-To: <703BDA18A87DFA4CB265A86F42E4178D0902DF58@c2k3exchange.pgdp.corp.usec.com> References: <703BDA18A87DFA4CB265A86F42E4178D0902DF58@c2k3exchange.pgdp.corp.usec.com> Message-ID: <8786a4c00910271111l1b687b22id0e9ed2015758ce0@mail.gmail.com> Is this on a continuous form? On Tue, Oct 27, 2009 at 10:57 AM, Hollis, Virginia wrote: > Still doesn't work correctly. If I hit a record that is Expired all the > other records show Expired even if they aren't. > > Would it work better if I used a Select Case? Would that have something > to do with it? > > ************** > > I'd keep it in the OnCurrent event. > > Use NZ() and some future date > > ?'DateEarlyExp.value = > DateDiff('d',Date(),NZ([DateEarlyExp],DATE()+365)) > > *************** > On Tue, Oct 27, 2009 at 7:09 AM, Hollis, Virginia > hollisvj at pgdp.usec.com > > wrote: > ?I am trying to show the items that will expire in the next 30 days. If > ?it has already expired I need to show that the item has expired. > > ?The below code I tried having a calculated field (txtExpireDays) that > ?calculates the DateDiff to determine the number of days between the > ?Early Expiration date & today's date. > > ?If the item is going to expire it shows a message that "Some items will > ?expire in "number of" days." If the item's expiration date has passed > ?(it is expired) then the DateEarlyExp field is red & it's label shows - > ?"Expired". > > ?I placed this in the OnCurrent. ?The problem is (I think) if you hit a > ?record with a Null DateEarlyExp it keeps the previous records > ?calculations & shows that on the screen as you scroll through the > ?records. > > ?Should the DateDiff calculation be somewhere in the with the code > ?OnCurrent instead of a separate text box? Did I write this completely > ?wrong (a better way to do this)? > > ?Text box on the form (hidden) ? ?'DateEarlyExp.value = > ?DateDiff('d',Date(),[DateEarlyExp]) > > ?If (txtExpireDays > 0 And txtExpireDays <= 31) Then > ? ?Me.lblExpire.Visible = True > ? ?Me.lblExpire.ForeColor = lngRed > ? ?lblExpire.Caption = "Some items will expire in " & txtExpireDays & " > ?days" > > ?ElseIf txtExpireDays < 1 Then > ? ?Me.DateEarlyExp.ForeColor = lngRed > ? ?EarlyExpLabel.ForeColor = lngRed > ? ?EarlyExpLabel.Caption = "Item Expired:" > > ?Else > ? ?lblExpire.Visible = False > ? ?EarlyExpLabel.Caption = "Early expiration:" > ? ?EarlyExpLabel.ForeColor = 8388608 > ? ?Me.DateEarlyExp.ForeColor = lngBlack > > ?End If > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > From hollisvj at pgdp.usec.com Tue Oct 27 13:24:14 2009 From: hollisvj at pgdp.usec.com (Hollis, Virginia) Date: Tue, 27 Oct 2009 13:24:14 -0500 Subject: [AccessD] Expiration Date Message-ID: <703BDA18A87DFA4CB265A86F42E4178D0902DF83@c2k3exchange.pgdp.corp.usec.com> No. It is a Single Form. *** Is this on a continuous form? *** On Tue, Oct 27, 2009 at 10:57 AM, Hollis, Virginia > wrote: > Still doesn't work correctly. If I hit a record that is Expired all the > other records show Expired even if they aren't. > > Would it work better if I used a Select Case? Would that have something > to do with it? > > ************** > > I'd keep it in the OnCurrent event. > > Use NZ() and some future date > > 'DateEarlyExp.value = > DateDiff('d',Date(),NZ([DateEarlyExp],DATE()+365)) From cfoust at infostatsystems.com Tue Oct 27 13:32:18 2009 From: cfoust at infostatsystems.com (Charlotte Foust) Date: Tue, 27 Oct 2009 11:32:18 -0700 Subject: [AccessD] Expiration Date In-Reply-To: <703BDA18A87DFA4CB265A86F42E4178D0902DF83@c2k3exchange.pgdp.corp.usec.com> References: <703BDA18A87DFA4CB265A86F42E4178D0902DF83@c2k3exchange.pgdp.corp.usec.com> Message-ID: If you mean you navigate to other records and they show that, then your expired label isn't being required properly, even if the date calculation may be. Charlotte Foust -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Hollis, Virginia Sent: Tuesday, October 27, 2009 11:24 AM To: accessd at databaseadvisors.com Subject: [AccessD] Expiration Date No. It is a Single Form. *** Is this on a continuous form? *** On Tue, Oct 27, 2009 at 10:57 AM, Hollis, Virginia > wrote: > Still doesn't work correctly. If I hit a record that is Expired all the > other records show Expired even if they aren't. > > Would it work better if I used a Select Case? Would that have something > to do with it? > > ************** > > I'd keep it in the OnCurrent event. > > Use NZ() and some future date > > 'DateEarlyExp.value = > DateDiff('d',Date(),NZ([DateEarlyExp],DATE()+365)) From hollisvj at pgdp.usec.com Tue Oct 27 13:52:11 2009 From: hollisvj at pgdp.usec.com (Hollis, Virginia) Date: Tue, 27 Oct 2009 13:52:11 -0500 Subject: [AccessD] Expiration Date Message-ID: <703BDA18A87DFA4CB265A86F42E4178D0902DFB7@c2k3exchange.pgdp.corp.usec.com> This is what happens: -Record 1 Expires 11/03/2009 (DateEarlyExp) -lblExpired shows "Some items will expire in 7 days" -Record 2 expires 10/27/2009 -EarlyExpLabel (label next to DateEarlyExp field) shows Red & "Item Expired" -lblExpired does not show -Record 3 expires 11/23/2009 -EarlyExpLabel is Red & shows "Item Expired" even though txtExpireDays shows 27 -lblExpired shows "Some items will expire in 27 days" It's all downhill after that. The fields & labels show & are red. There is a text field on the form: txtExpireDays that has as the control source: =DateDiff('d',Date(),NZ([DateEarlyExp],Date()+365)) If (txtExpireDays > 0 And txtExpireDays <= 31) Then Me.lblExpire.Visible = True Me.lblExpire.ForeColor = lngRed lblExpire.Caption = "Some items will expire in " & txtExpireDays & " days" ElseIf txtExpireDays < 1 Then Me.lblExpire.Visible = False Me.DateEarlyExp.ForeColor = lngRed Me.EarlyExpLabel.ForeColor = lngRed Me.EarlyExpLabel.Caption = "Item Expired:" Else Me.lblExpire.Visible = False Me.DateEarlyExp.ForeColor = lngBlack Me.EarlyExpLabel.ForeColor = 8388608 Me.EarlyExpLabel.Caption = "Early expiration:" End If *** If you mean you navigate to other records and they show that, then your expired label isn't being required properly, even if the date calculation may be. Charlotte Foust -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com ] On Behalf Of Hollis, Virginia Sent: Tuesday, October 27, 2009 11:24 AM To: accessd at databaseadvisors.com Subject: [AccessD] Expiration Date No. It is a Single Form. From jwcolby at colbyconsulting.com Tue Oct 27 13:53:23 2009 From: jwcolby at colbyconsulting.com (jwcolby) Date: Tue, 27 Oct 2009 14:53:23 -0400 Subject: [AccessD] Access 2007 Question In-Reply-To: <7c7841600910270922y67c6d1dgba8e0168d461e404@mail.gmail.com> References: <7c7841600910270922y67c6d1dgba8e0168d461e404@mail.gmail.com> Message-ID: <4AE741A3.7060706@colbyconsulting.com> > But the 'programming priesthood' of .NET excludes the talented amateurs Ooooohhh so I would be a priest? ;) In case you hadn't noticed I am one of the "talented amateurs". I jut refuse to allow the priests to exclude me. John W. Colby www.ColbyConsulting.com Kenneth Ismert wrote: > Hi, again. Some responses: > > For me, one of the biggest arguments for VBA over macros is searchability. > You can't search macros or form and report properties. For large projects, > having all of the dependencies and interactions in code is a huge advantage. > > Mark Simms: > >> Why can't they translate much of the VBA by creating a Javascript library >> of >> functions and objects and then create a translator to convert the VBA code >> to Javascript ? >> > > Emulating VBA in JavaScript is doable, but all VBA code in Access is > intimately tied to the Access object library, as well as DAO, ADO, etc. It > would be impractical to move such a huge amount of support functionality to > JavaScript, and infeasible to use it directly via remote procedure calls > against the real application on the other side of the internet. > > >> I think an Access 2010 app ported to the 'net stripped of VBA will be >> mostly >> useless. >> > > Certainly for all of us old-timers who have Access/VBA projects that we want > to port. But for Access newbies, the ability to publish to the web through > SharePoint will be quite a carrot. Most will be more than happy to forgo VBA > to get that capability. > > John W. Colby: >> In the meantime I am learning C#.Net. C# is much more powerful in many >> ways, and if future jobs allow me to choose between C# and Access 2007 (or >> beyond) you better believe I will use C# rather than Access. >> > > That's clearly where Microsoft wants everyone to go for serious development. > But the 'programming priesthood' of .NET excludes the talented amateurs who > could build a salable application with Access, but don't have a prayer of > doing the same in Visual Studio. > > -Ken From davidmcafee at gmail.com Tue Oct 27 13:55:23 2009 From: davidmcafee at gmail.com (David McAfee) Date: Tue, 27 Oct 2009 11:55:23 -0700 Subject: [AccessD] Expiration Date In-Reply-To: <703BDA18A87DFA4CB265A86F42E4178D0902DF83@c2k3exchange.pgdp.corp.usec.com> References: <703BDA18A87DFA4CB265A86F42E4178D0902DF83@c2k3exchange.pgdp.corp.usec.com> Message-ID: <8786a4c00910271155g5d3c84a2v2856e1fc6db822bb@mail.gmail.com> Virginia, I'm sending you a sample I made for you offline. On Tue, Oct 27, 2009 at 11:24 AM, Hollis, Virginia wrote: > No. It is a Single Form. > > > *** > Is this on a continuous form? > > *** > On Tue, Oct 27, 2009 at 10:57 AM, Hollis, Virginia > > wrote: >> Still doesn't work correctly. If I hit a record that is Expired all > the >> other records show Expired even if they aren't. >> >> Would it work better if I used a Select Case? Would that have > something >> to do with it? >> >> ************** >> >> I'd keep it in the OnCurrent event. >> >> Use NZ() and some future date >> >> ?'DateEarlyExp.value = >> DateDiff('d',Date(),NZ([DateEarlyExp],DATE()+365)) > > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > From jimdettman at verizon.net Tue Oct 27 14:31:14 2009 From: jimdettman at verizon.net (Jim Dettman) Date: Tue, 27 Oct 2009 15:31:14 -0400 Subject: [AccessD] ] Access 2007 Question - Did you watch the Access 2010 demo In-Reply-To: <8786a4c00910271026w1bb2d542ib3519b2d4aee29de@mail.gmail.com> References: <29f585dd0910251339u735bd228vb5548bc729c0d6dc@mail.gmail.com> <12BAC542C3884C06B8BB6D81F95158F9@stevePC> <00db01ca567e$fe8b4ad0$0501a8c0@MSIMMSWS> <4ae6a150.0a1ad00a.7d3d.ffffedf1@mx.google.com> <8786a4c00910271026w1bb2d542ib3519b2d4aee29de@mail.gmail.com> Message-ID: <57CEDDCC36DD448A9355C75980C17FBF@XPS> <> The data macros is the only thing that caught my attention. What I'd like to know though is how they actually implemented it. If I access a ace db with ODBC or ADO from another project (without Access), do the macros get honored? In other words are they at the engine level or just something within Access? Seems it would have to be the first, but then they've done the smoke and mirrors type thing before (multi-value fields). The other thing that caught my attention off the blog is that there will be no object model for the ribbon ever; yuck. Jim. -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of David McAfee Sent: Tuesday, October 27, 2009 1:26 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] ] Access 2007 Question - Did you watch the Access 2010 demo I finally watched it. No Opinion really. They didn't show me something that I cant already do (with code) or something that I'd want to do. Did they use tabs as a menu? On Tue, Oct 27, 2009 at 5:27 AM, Jack and Pat wrote: > Just wondering if anyone watched the video > http://channel9.msdn.com/shows/Access/Microsoft-Access-2010-Demo/ > > jack -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From adtp at airtelmail.in Tue Oct 27 14:39:29 2009 From: adtp at airtelmail.in (A.D.Tejpal) Date: Wed, 28 Oct 2009 01:09:29 +0530 Subject: [AccessD] SPAM-LOW: Re: Form Controls - Class implementation References: <7c7841600910261203v41b85435q874ab3189722e24f@mail.gmail.com> <4AE5F862.10501@colbyconsulting.com> Message-ID: <008401ca573d$81983d20$d95fa27a@personald6374f> JC, Thanks for providing a nice class based solution so promptly. Your well known command over classes deserves to be complimented. While conducting tests (Access 2003 desktop), it was found that listing of controls on form sections as displayed in the message box, is not always in keeping with the tab index. For example, if the tab index in form header is altered in design view and the form re-opened after saving, the results are not found consistent. It seems that while building the control collection in the class, greater reliability could be achieved by pouring the contents of a temporary class into the main one in the order of tab index. It would also appear that the extra round of iteration just for finding tab controls and their pages could be eliminated. Suggested modified versions incorporating the points outlined above are placed below, in the following sequence: (a) Class C_CtlsByTabIndex (b) Class C_CtlsByTabIndexMaster (c) Code in form's module Best wishes, A.D. Tejpal ------------ ' Class C_CtlsByTabIndex '============================= Option Compare Database Option Explicit ' form section or tab control page Private msc As Object ' Collection of controls sorted as per tab index. Private mcolCtls As Collection ' Comma separated list of tab controls on this section Private mTabCtList As String '------------------------------------------- Private Sub Class_Initialize() Set mcolCtls = New Collection End Sub '------------------------------------------- Private Sub Class_Terminate() Set mcolCtls = Nothing Set msc = Nothing End Sub '------------------------------------------- Sub P_Init(fm As Access.Form, sc As Object) Set msc = sc P_StoreControls fm, sc End Sub '------------------------------------------- Private Sub P_StoreControls( _ fm As Access.Form, sc As Object) On Error Resume Next ' Builds a temp collection of controls keyed ' as per tab index and transfers its contents ' to mcolCtls in the order of tab index. ' ' sc represents either a form section or tab ' control page Dim colTemp As Collection Dim ct As Access.Control Dim Idx As Long Dim Cnt As Long Set colTemp = New Collection mTabCtList = "" Cnt = 0 For Each ct In sc.Controls Err.Clear Idx = ct.TabIndex If Err.Number = 0 Then ' The control has tab index If sc.Parent Is fm Then ' sc is a form section. Cycle through ' all controls on this section ' (When the argument to this subroutine ' is a form section, all controls belonging ' to tab control pages are to be ignored as ' there is independent set of tab indices ' for each tab page). If ct.Parent Is fm Then ' It is a control directly on the form Cnt = Cnt + 1 colTemp.Add ct, CStr(Idx) End If ' If ct is a tab control, add its name to the ' comma separated list. (This way, we avoid ' an extra round of scanning in the master ' class just for finding the tab control pages) If ct.ControlType = acTabCtl Then mTabCtList = mTabCtList & "," & ct.Name End If Else ' sc is a tab control page - no need for any ' further check. Cnt = Cnt + 1 colTemp.Add ct, CStr(Idx) End If End If Next ' Remove leading comma from TabCtList If Len(mTabCtList) > 1 Then mTabCtList = Mid(mTabCtList, 2) End If ' Transfer the contents of temp collection to ' mcolCtls in the order of tab index If colTemp.Count > 0 Then For Cnt = 0 To colTemp.Count - 1 mcolCtls.Add colTemp(CStr(Cnt)), CStr(Cnt) Next End If ' Note: ' The parent for controls on tab control page is ' the relevant page. For all other controls, it is ' the form. ' ' Section property for all controls on a given ' section is identical, (irrespective of the fact ' whether the control is located directly on the ' form or on a tab control page). Set ct = Nothing Set colTemp = Nothing On Error GoTo 0 End Sub '------------------------------------------- Property Get prp_TabControlList() As String prp_TabControlList = mTabCtList End Property '------------------------------------------- Property Get prp_SecPageName() As String prp_SecPageName = msc.Name End Property '------------------------------------------- Property Get prp_ControlByTabIndex(TbIndex _ As Long) As Access.Control ' Returns specific control having given tab index Set prp_ControlByTabIndex = mcolCtls(CStr(TbIndex)) End Property '------------------------------------------- Property Get prp_CtlNamesSortedByTbIndex() As String ' Iterate the collection of controls getting each ' control name and appending it to a string Dim ct As Access.Control Dim Txt As String Txt = msc.Name & " (Tot tab indexed controls = " & _ mcolCtls.Count & ") : " & vbCrLf For Each ct In mcolCtls Txt = Txt & vbTab & ct.Name Next prp_CtlNamesSortedByTbIndex = Txt Set ct = Nothing End Property '------------------------------------------- Property Get prp_ControlsByTabIndex() As Collection ' Return the collection of controls sorted by tab index ' (and keyed on TabIndex) Set prp_ControlsByTabIndex = mcolCtls End Property '------------------------------------------- Property Get prp_TabIndexedControlsCount() As Long ' Return the count of tab indexed controls on ' this section or page prp_TabIndexedControlsCount = mcolCtls.Count End Property '============================= ' Class C_CtlsByTabIndexMaster '============================= Option Compare Database Option Explicit ' Collection of class objects, each representing ' a collection of controls sorted as per tab index. Private mcolC_CtlsByTabIndex As Collection '------------------------------------------- Private Sub Class_Initialize() Set mcolC_CtlsByTabIndex = New Collection End Sub '------------------------------------------- Private Sub Class_Terminate() Set mcolC_CtlsByTabIndex = Nothing End Sub '------------------------------------------- Function P_Init(fm As Access.Form) P_BuidClassCollection fm End Function '------------------------------------------- Sub P_BuidClassCollection(fm As Access.Form) On Error Resume Next Dim cObj As C_CtlsByTabIndex Dim pg As Access.Page Dim Cnt As Long, Ctr As Long Dim Rtv As Variant ' Max possible 5 sections in a form (0 - acDetail, ' 1 - acHeader, 2 - acFooter, 3 - acPageHeader, ' 4 - acPageFooter) ' Note - On a form, PageHeader & PageFooter ' come into play only if the form is printed. For Cnt = 0 To 4 Err.Clear If Not IsError(fm.Section(Cnt).Controls.Count _ > 0) Then ' The section exists. Add an instance of class ' C_CtlsByTabIndex for this section to ' collection mcolC_CtlsByTabIndex Set cObj = New C_CtlsByTabIndex cObj.P_Init fm, fm.Section(Cnt) mcolC_CtlsByTabIndex.Add cObj, _ fm.Section(Cnt).Name ' Take similar action for tab control pages ' - if any - on this section. ' ' Get list of tab control names on this section Rtv = cObj.prp_TabControlList If Len(Rtv) > 0 Then ' Build array of tab control names Rtv = Split(Rtv, ",") For Ctr = 0 To UBound(Rtv) ' Add an instance of class ' C_CtlsByTabIndex for each page to ' collection mcolC_CtlsByTabIndex For Each pg In fm(Rtv(Ctr)).Pages Set cObj = New C_CtlsByTabIndex cObj.P_Init fm, pg mcolC_CtlsByTabIndex.Add cObj, _ pg.Name Next Next End If End If Next Set pg = Nothing Set cObj = Nothing On Error GoTo 0 End Sub '------------------------------------------- Property Get prp_CtlNamesSortedByTbIndex() As String ' Returns a list of all controls on various sections ' and pages in the order of tab index Dim cObj As C_CtlsByTabIndex Dim Txt As String For Each cObj In mcolC_CtlsByTabIndex Txt = Txt & IIf(Len(Txt) > 0, vbCrLf, "") & _ cObj.prp_CtlNamesSortedByTbIndex Next prp_CtlNamesSortedByTbIndex = Txt ' Debug.Print Txt Set cObj = Nothing End Property '------------------------------------------- Property Get prp_colC_CtlsByTabIndex() As Collection ' Return the entire collection of all instances of ' C_CtlsByTabIndex Set prp_colC_CtlsByTabIndex = _ mcolC_CtlsByTabIndex End Property '------------------------------------------- Function Fn_ObjC_CtlsByTabIndex(SecOrPgName As String) _ As C_CtlsByTabIndex ' Return an instance of class C_CtlsByTabIndex for a ' specific form section or tab page. ' SecOrPgName is the name of the form section or ' tab page On Error Resume Next Set Fn_ObjC_CtlsByTabIndex = _ mcolC_CtlsByTabIndex(SecOrPgName) End Function '============================= ' Code in form's module '============================= Option Compare Database Option Explicit ' Declarations section Public fc As C_CtlsByTabIndexMaster '------------------------------------------- Private Sub Form_Open(Cancel As Integer) Set fc = New C_CtlsByTabIndexMaster fc.P_Init Me MsgBox fc.prp_CtlNamesSortedByTbIndex End Sub '------------------------------------------- Private Sub Form_Close() Set fc = Nothing End Sub '================================== ----- Original Message ----- From: jwcolby To: Access Developers discussion and problem solving Sent: Tuesday, October 27, 2009 00:58 Subject: Re: [AccessD] SPAM-LOW: Re: Form Controls - Class implementation It does indeed get deep in a hurry. The nice thing about a class implementation is that you can see the answer in VBA English. The code works BTW. Going in I thought I was going to be able to pass the control collections as simple collection types but not so. I had to pass the control collections as objects, then use the objects as collections. I would love to know what type the control collections are. Most likely below the covers they are a strongly typed collection (of controls) but because they are at heart a collection all of the methods and properties are there once the object is passed in. The implementation does allow me to concentrate on objects that contain collections of controls rather than on the controls themselves. John W. Colby www.ColbyConsulting.com Kenneth Ismert wrote: > Just read through the code. Very cool. > > It's surprising how much work it takes to get a complete answer to a > seemingly trivial Access problem like "I want to see all my controls in > tab > order". > > -Ken From miscellany at mvps.org Tue Oct 27 15:00:03 2009 From: miscellany at mvps.org (Steve Schapel) Date: Wed, 28 Oct 2009 09:00:03 +1300 Subject: [AccessD] Access 2007 Question In-Reply-To: <4AE6DD6F.4040608@colbyconsulting.com> References: <29f585dd0910251339u735bd228vb5548bc729c0d6dc@mail.gmail.com> <12BAC542C3884C06B8BB6D81F95158F9@stevePC> <00db01ca567e$fe8b4ad0$0501a8c0@MSIMMSWS> <5C9D6C62904D4E99A6D676A8F1323CEF@stevePC> <4AE6DD6F.4040608@colbyconsulting.com> Message-ID: <53E369D57473433DB5DBD6CD8C7E593E@stevePC> Hi John, I know there are other ways to do stuff. Sorry, my comment was exclusively within the context of Access 2010 web apps. Regards Steve -------------------------------------------------- From: "jwcolby" Sent: Wednesday, October 28, 2009 12:45 AM > Steve, > > > It needs to be built from the outset as compatible - which means (among > > other mindset changes) > macros. > > LOL. Tell that to .Net! > From shamil at smsconsulting.spb.ru Tue Oct 27 15:22:07 2009 From: shamil at smsconsulting.spb.ru (Shamil Salakhetdinov) Date: Tue, 27 Oct 2009 23:22:07 +0300 Subject: [AccessD] SPAM-LOW: Re: Form Controls - Class implementation In-Reply-To: <008401ca573d$81983d20$d95fa27a@personald6374f> References: <7c7841600910261203v41b85435q874ab3189722e24f@mail.gmail.com> <4AE5F862.10501@colbyconsulting.com> <008401ca573d$81983d20$d95fa27a@personald6374f> Message-ID: <009101ca5743$291dbac0$7b593040$@spb.ru> Guys, Recursion could help to make the coding cleaner and more generic, couldn't it? Does your current version of code support stacked tab controls, tab controls within subforms, ...? Thank you. --Shamil -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of A.D.Tejpal Sent: Tuesday, October 27, 2009 10:39 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] SPAM-LOW: Re: Form Controls - Class implementation JC, Thanks for providing a nice class based solution so promptly. Your well known command over classes deserves to be complimented. While conducting tests (Access 2003 desktop), it was found that listing of controls on form sections as displayed in the message box, is not always in keeping with the tab index. For example, if the tab index in form header is altered in design view and the form re-opened after saving, the results are not found consistent. It seems that while building the control collection in the class, greater reliability could be achieved by pouring the contents of a temporary class into the main one in the order of tab index. It would also appear that the extra round of iteration just for finding tab controls and their pages could be eliminated. Suggested modified versions incorporating the points outlined above are placed below, in the following sequence: (a) Class C_CtlsByTabIndex (b) Class C_CtlsByTabIndexMaster (c) Code in form's module Best wishes, A.D. Tejpal ------------ <<< snip >> __________ Information from ESET NOD32 Antivirus, version of virus signature database 4549 (20091027) __________ The message was checked by ESET NOD32 Antivirus. http://www.esetnod32.ru From jwcolby at colbyconsulting.com Tue Oct 27 15:52:02 2009 From: jwcolby at colbyconsulting.com (jwcolby) Date: Tue, 27 Oct 2009 16:52:02 -0400 Subject: [AccessD] SPAM-LOW: Re: Form Controls - Class implementation In-Reply-To: <009101ca5743$291dbac0$7b593040$@spb.ru> References: <7c7841600910261203v41b85435q874ab3189722e24f@mail.gmail.com> <4AE5F862.10501@colbyconsulting.com> <008401ca573d$81983d20$d95fa27a@personald6374f> <009101ca5743$291dbac0$7b593040$@spb.ru> Message-ID: <4AE75D72.3010003@colbyconsulting.com> Shamil, Tabs cannot directly contain other tabs, so recursion looking for tab controls on tab controls is not necessary. And no, I made no effort to drill down into tabs on subforms. However, with a class implementation, all you need to do is instantiate the supervisor class in then OnOpen of ANY form and it will automatically find and catalog the controls on the form. If the form is a subform then it will have it's own class that could be polled if needed. I made the class variable public so that it could be manipulated from outside of the form. John W. Colby www.ColbyConsulting.com Shamil Salakhetdinov wrote: > Guys, > > Recursion could help to make the coding cleaner and more generic, couldn't > it? > Does your current version of code support stacked tab controls, tab controls > within subforms, ...? > > Thank you. > > --Shamil > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of A.D.Tejpal > Sent: Tuesday, October 27, 2009 10:39 PM > To: Access Developers discussion and problem solving > Subject: Re: [AccessD] SPAM-LOW: Re: Form Controls - Class implementation > > JC, > > Thanks for providing a nice class based solution so promptly. Your well > known command over classes deserves to be complimented. > > While conducting tests (Access 2003 desktop), it was found that listing > of controls on form sections as displayed in the message box, is not always > in keeping with the tab index. For example, if the tab index in form header > is altered in design view and the form re-opened after saving, the results > are not found consistent. > > It seems that while building the control collection in the class, > greater reliability could be achieved by pouring the contents of a temporary > > class into the main one in the order of tab index. > > It would also appear that the extra round of iteration just for finding > tab controls and their pages could be eliminated. > > Suggested modified versions incorporating the points outlined above are > placed below, in the following sequence: > > (a) Class C_CtlsByTabIndex > (b) Class C_CtlsByTabIndexMaster > (c) Code in form's module > > Best wishes, > A.D. Tejpal > ------------ > > <<< snip >> > > > __________ Information from ESET NOD32 Antivirus, version of virus signature > database 4549 (20091027) __________ > > The message was checked by ESET NOD32 Antivirus. > > http://www.esetnod32.ru > > From jwcolby at colbyconsulting.com Tue Oct 27 15:54:18 2009 From: jwcolby at colbyconsulting.com (jwcolby) Date: Tue, 27 Oct 2009 16:54:18 -0400 Subject: [AccessD] Access 2007 Question In-Reply-To: <53E369D57473433DB5DBD6CD8C7E593E@stevePC> References: <29f585dd0910251339u735bd228vb5548bc729c0d6dc@mail.gmail.com> <12BAC542C3884C06B8BB6D81F95158F9@stevePC> <00db01ca567e$fe8b4ad0$0501a8c0@MSIMMSWS> <5C9D6C62904D4E99A6D676A8F1323CEF@stevePC> <4AE6DD6F.4040608@colbyconsulting.com> <53E369D57473433DB5DBD6CD8C7E593E@stevePC> Message-ID: <4AE75DFA.1000401@colbyconsulting.com> I understand Steve. And my comment was to point out that the Access design team determines the requirements, in the same way that the .Net design team does. John W. Colby www.ColbyConsulting.com Steve Schapel wrote: > Hi John, > > I know there are other ways to do stuff. Sorry, my comment was exclusively > within the context of Access 2010 web apps. > > Regards > Steve > > > -------------------------------------------------- > From: "jwcolby" > Sent: Wednesday, October 28, 2009 12:45 AM > >> Steve, >> >>> It needs to be built from the outset as compatible - which means (among >>> other mindset changes) >> macros. >> >> LOL. Tell that to .Net! >> > > From miscellany at mvps.org Tue Oct 27 16:40:44 2009 From: miscellany at mvps.org (Steve Schapel) Date: Wed, 28 Oct 2009 10:40:44 +1300 Subject: [AccessD] Access 2007 Question In-Reply-To: <4AE75DFA.1000401@colbyconsulting.com> References: <29f585dd0910251339u735bd228vb5548bc729c0d6dc@mail.gmail.com> <12BAC542C3884C06B8BB6D81F95158F9@stevePC> <00db01ca567e$fe8b4ad0$0501a8c0@MSIMMSWS> <5C9D6C62904D4E99A6D676A8F1323CEF@stevePC> <4AE6DD6F.4040608@colbyconsulting.com> <53E369D57473433DB5DBD6CD8C7E593E@stevePC> <4AE75DFA.1000401@colbyconsulting.com> Message-ID: Too true, Sir. Too true. Regards Steve -------------------------------------------------- From: "jwcolby" Sent: Wednesday, October 28, 2009 9:54 AM > I understand Steve. And my comment was to point out that the Access > design team determines the > requirements, in the same way that the .Net design team does. > > John W. Colby > www.ColbyConsulting.com > > > Steve Schapel wrote: >> Hi John, >> >> I know there are other ways to do stuff. Sorry, my comment was >> exclusively >> within the context of Access 2010 web apps. >> >> Regards >> Steve >> >> >> -------------------------------------------------- >> From: "jwcolby" >> Sent: Wednesday, October 28, 2009 12:45 AM >> >>> Steve, >>> >>>> It needs to be built from the outset as compatible - which means >>>> (among >>>> other mindset changes) >>> macros. >>> >>> LOL. Tell that to .Net! From shamil at smsconsulting.spb.ru Tue Oct 27 17:05:18 2009 From: shamil at smsconsulting.spb.ru (Shamil Salakhetdinov) Date: Wed, 28 Oct 2009 01:05:18 +0300 Subject: [AccessD] SPAM-LOW: Re: Form Controls - Class implementation In-Reply-To: <4AE75D72.3010003@colbyconsulting.com> References: <7c7841600910261203v41b85435q874ab3189722e24f@mail.gmail.com> <4AE5F862.10501@colbyconsulting.com> <008401ca573d$81983d20$d95fa27a@personald6374f> <009101ca5743$291dbac0$7b593040$@spb.ru> <4AE75D72.3010003@colbyconsulting.com> Message-ID: <00a401ca5751$92fca9c0$b8f5fd40$@spb.ru> OK, sorry mixed MS Access Tab controls with VB6 SSTab and C#/VB.NET Tab controls - I programmed a VB6/VB.net add-in in the past, which worked with all the three host IDEs - and the latter two Tab controls can be stacked - that "past memory" caused my current confusion... Thank you. -- Shamil -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Tuesday, October 27, 2009 11:52 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] SPAM-LOW: Re: Form Controls - Class implementation Shamil, Tabs cannot directly contain other tabs, so recursion looking for tab controls on tab controls is not necessary. And no, I made no effort to drill down into tabs on subforms. However, with a class implementation, all you need to do is instantiate the supervisor class in then OnOpen of ANY form and it will automatically find and catalog the controls on the form. If the form is a subform then it will have it's own class that could be polled if needed. I made the class variable public so that it could be manipulated from outside of the form. John W. Colby www.ColbyConsulting.com Shamil Salakhetdinov wrote: > Guys, > > Recursion could help to make the coding cleaner and more generic, couldn't > it? > Does your current version of code support stacked tab controls, tab controls > within subforms, ...? > > Thank you. > > --Shamil > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of A.D.Tejpal > Sent: Tuesday, October 27, 2009 10:39 PM > To: Access Developers discussion and problem solving > Subject: Re: [AccessD] SPAM-LOW: Re: Form Controls - Class implementation > > JC, > > Thanks for providing a nice class based solution so promptly. Your well > known command over classes deserves to be complimented. > > While conducting tests (Access 2003 desktop), it was found that listing > of controls on form sections as displayed in the message box, is not always > in keeping with the tab index. For example, if the tab index in form header > is altered in design view and the form re-opened after saving, the results > are not found consistent. > > It seems that while building the control collection in the class, > greater reliability could be achieved by pouring the contents of a temporary > > class into the main one in the order of tab index. > > It would also appear that the extra round of iteration just for finding > tab controls and their pages could be eliminated. > > Suggested modified versions incorporating the points outlined above are > placed below, in the following sequence: > > (a) Class C_CtlsByTabIndex > (b) Class C_CtlsByTabIndexMaster > (c) Code in form's module > > Best wishes, > A.D. Tejpal > ------------ > > <<< snip >> > > > __________ Information from ESET NOD32 Antivirus, version of virus signature > database 4549 (20091027) __________ > > The message was checked by ESET NOD32 Antivirus. > > http://www.esetnod32.ru > > -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com __________ Information from ESET NOD32 Antivirus, version of virus signature database 4549 (20091027) __________ The message was checked by ESET NOD32 Antivirus. http://www.esetnod32.ru __________ Information from ESET NOD32 Antivirus, version of virus signature database 4549 (20091027) __________ The message was checked by ESET NOD32 Antivirus. http://www.esetnod32.ru From kismert at gmail.com Tue Oct 27 19:41:05 2009 From: kismert at gmail.com (Kenneth Ismert) Date: Tue, 27 Oct 2009 19:41:05 -0500 Subject: [AccessD] Access 2010 Macro Question Message-ID: <7c7841600910271741j5af2cbe2s8324f1a53a7830ca@mail.gmail.com> Can A2010 macros take and return parameters from form events? For instance, could I set Cancel in the event Form_Open(Cancel) with a macro? -Ken From jwcolby at colbyconsulting.com Tue Oct 27 19:50:44 2009 From: jwcolby at colbyconsulting.com (jwcolby) Date: Tue, 27 Oct 2009 20:50:44 -0400 Subject: [AccessD] SPAM-LOW: Re: Form Controls - Class implementation In-Reply-To: <008401ca573d$81983d20$d95fa27a@personald6374f> References: <7c7841600910261203v41b85435q874ab3189722e24f@mail.gmail.com> <4AE5F862.10501@colbyconsulting.com> <008401ca573d$81983d20$d95fa27a@personald6374f> Message-ID: <4AE79564.1050601@colbyconsulting.com> A.D. I will address the issue of "double scanning" in the next email. The problem with the code displaying the controls in incorrect order was simply that I didn't index in to the collection as was discussed previously - using cstr(ctl.TabIndex). Thanks for pointing that out. Your method of "pouring" them into the final collection works great though, and then they are already in the final collection in sorted order. In my version, the controls are not in the collection sorted, they are in the collection in the order encountered and have to be retrieved in sorted order. So I will sort them using your method then pull them out sorted just by iterating the collection. To sort them as you are doing: ' 'Sorts the controls in mcolCtlsSorted into sorted order ' Function mSortControls() Dim ctl As Control Dim intIndex As Integer Dim col As Collection With mcolCtlsSorted If .Count Then 'Check that there are controls in mcolCtlsSorted Set col = New Collection For intIndex = 0 To .Count - 1 'Iterate through mcolCtlsSorted col.Add .Item(CStr(intIndex)) 'Copying the controls into the temp collection Next intIndex End If End With ' 'If there are any controls in the temp collection then 'set the main collection to the temp collection If col.Count Then Set mcolCtlsSorted = col End If End Function ' 'Iterate the collection of controls getting each control name 'and appending it to a string ' Property Get pCtlNames() As String Dim ctl As Control Dim strCtlNames As String For Each ctl In mcolCtlsSorted strCtlNames = strCtlNames & vbTab & ctl.Name Next ctl pCtlNames = strCtlNames End Property John W. Colby www.ColbyConsulting.com A.D.Tejpal wrote: > JC, > > Thanks for providing a nice class based solution so promptly. Your well > known command over classes deserves to be complimented. > > While conducting tests (Access 2003 desktop), it was found that listing > of controls on form sections as displayed in the message box, is not always > in keeping with the tab index. For example, if the tab index in form header > is altered in design view and the form re-opened after saving, the results > are not found consistent. > > It seems that while building the control collection in the class, > greater reliability could be achieved by pouring the contents of a temporary > class into the main one in the order of tab index. > > It would also appear that the extra round of iteration just for finding > tab controls and their pages could be eliminated. > > Suggested modified versions incorporating the points outlined above are > placed below, in the following sequence: > > (a) Class C_CtlsByTabIndex > (b) Class C_CtlsByTabIndexMaster > (c) Code in form's module > > Best wishes, > A.D. Tejpal > ------------ From jwcolby at colbyconsulting.com Tue Oct 27 20:30:10 2009 From: jwcolby at colbyconsulting.com (jwcolby) Date: Tue, 27 Oct 2009 21:30:10 -0400 Subject: [AccessD] SPAM-LOW: Re: Form Controls - Class implementation In-Reply-To: <008401ca573d$81983d20$d95fa27a@personald6374f> References: <7c7841600910261203v41b85435q874ab3189722e24f@mail.gmail.com> <4AE5F862.10501@colbyconsulting.com> <008401ca573d$81983d20$d95fa27a@personald6374f> Message-ID: <4AE79EA2.3080105@colbyconsulting.com> A.D., Let me first say that I probably wouldn't make the effort to prevent the extra control collection iterations because it causes code (concept) complexity out of proportion with the problem it solves. The code that scans the control collections is so fast that it doesn't make sense to add that complexity. That said, if I were going to try and prevent the extra control collection iterations I would attack it from a different angle. Classes should reflect the objects they represent. I chose initially to simply make the clsControlSort represent simply sorted collections of controls. I put the collection iteration code in that class on the "code close to the objects manipulated" concept. As you point out, that does cause the same set of controls to be "found" two times IF on a tab, since it will be found in the section iteration and in the tab iteration. In the end, I don't really care, the code is fast enough that the extra complexity just isn't worthwhile to fix the "problem" (IMHO). Should I attempt to do the "single iteration of the control collection" thing I would probably change the clsCtlsSorted to simply have a collection to sorted controls in and a property to get /set controls into the collection. Perhaps a "sort the collection" method as well. Now the iterator up in the supervisor class would "discover" the parent (as yours does) but I would instantiate clsCtlsSorted for each object. One for each section, and one for each tab page encountered. Now as a control's parent is discovered, the method to store the control in the correct clsCtlsSorted would be called and the control placed in thhe correct clsCtlsSorted. Basically the form's controls collection would be iterated and each and every control examined and placed in the correct clsCtlsSorted instance. Certainly doable. John W. Colby www.ColbyConsulting.com A.D.Tejpal wrote: > JC, > > Thanks for providing a nice class based solution so promptly. Your well > known command over classes deserves to be complimented. > > While conducting tests (Access 2003 desktop), it was found that listing > of controls on form sections as displayed in the message box, is not always > in keeping with the tab index. For example, if the tab index in form header > is altered in design view and the form re-opened after saving, the results > are not found consistent. > > It seems that while building the control collection in the class, > greater reliability could be achieved by pouring the contents of a temporary > class into the main one in the order of tab index. > > It would also appear that the extra round of iteration just for finding > tab controls and their pages could be eliminated. > > Suggested modified versions incorporating the points outlined above are > placed below, in the following sequence: > > (a) Class C_CtlsByTabIndex > (b) Class C_CtlsByTabIndexMaster > (c) Code in form's module > > Best wishes, > A.D. Tejpal > ------------ > > ' Class C_CtlsByTabIndex > '============================= > Option Compare Database > Option Explicit > > ' form section or tab control page > Private msc As Object > ' Collection of controls sorted as per tab index. > Private mcolCtls As Collection > ' Comma separated list of tab controls on this section > Private mTabCtList As String > '------------------------------------------- > > Private Sub Class_Initialize() > Set mcolCtls = New Collection > End Sub > '------------------------------------------- > > Private Sub Class_Terminate() > Set mcolCtls = Nothing > Set msc = Nothing > End Sub > '------------------------------------------- > > Sub P_Init(fm As Access.Form, sc As Object) > Set msc = sc > P_StoreControls fm, sc > End Sub > '------------------------------------------- > > Private Sub P_StoreControls( _ > fm As Access.Form, sc As Object) > On Error Resume Next > ' Builds a temp collection of controls keyed > ' as per tab index and transfers its contents > ' to mcolCtls in the order of tab index. > ' > ' sc represents either a form section or tab > ' control page > Dim colTemp As Collection > Dim ct As Access.Control > Dim Idx As Long > Dim Cnt As Long > > Set colTemp = New Collection > mTabCtList = "" > Cnt = 0 > For Each ct In sc.Controls > Err.Clear > Idx = ct.TabIndex > If Err.Number = 0 Then > ' The control has tab index > If sc.Parent Is fm Then > ' sc is a form section. Cycle through > ' all controls on this section > ' (When the argument to this subroutine > ' is a form section, all controls belonging > ' to tab control pages are to be ignored as > ' there is independent set of tab indices > ' for each tab page). > If ct.Parent Is fm Then > ' It is a control directly on the form > Cnt = Cnt + 1 > colTemp.Add ct, CStr(Idx) > End If > > ' If ct is a tab control, add its name to the > ' comma separated list. (This way, we avoid > ' an extra round of scanning in the master > ' class just for finding the tab control pages) > If ct.ControlType = acTabCtl Then > mTabCtList = mTabCtList & "," & ct.Name > End If > Else > ' sc is a tab control page - no need for any > ' further check. > Cnt = Cnt + 1 > colTemp.Add ct, CStr(Idx) > End If > End If > Next > > ' Remove leading comma from TabCtList > If Len(mTabCtList) > 1 Then > mTabCtList = Mid(mTabCtList, 2) > End If > > ' Transfer the contents of temp collection to > ' mcolCtls in the order of tab index > If colTemp.Count > 0 Then > For Cnt = 0 To colTemp.Count - 1 > mcolCtls.Add colTemp(CStr(Cnt)), CStr(Cnt) > Next > End If > > ' Note: > ' The parent for controls on tab control page is > ' the relevant page. For all other controls, it is > ' the form. > ' > ' Section property for all controls on a given > ' section is identical, (irrespective of the fact > ' whether the control is located directly on the > ' form or on a tab control page). > > Set ct = Nothing > Set colTemp = Nothing > On Error GoTo 0 > End Sub > '------------------------------------------- > > Property Get prp_TabControlList() As String > prp_TabControlList = mTabCtList > End Property > '------------------------------------------- > > Property Get prp_SecPageName() As String > prp_SecPageName = msc.Name > End Property > '------------------------------------------- > > Property Get prp_ControlByTabIndex(TbIndex _ > As Long) As Access.Control > ' Returns specific control having given tab index > Set prp_ControlByTabIndex = mcolCtls(CStr(TbIndex)) > End Property > '------------------------------------------- > > Property Get prp_CtlNamesSortedByTbIndex() As String > ' Iterate the collection of controls getting each > ' control name and appending it to a string > Dim ct As Access.Control > Dim Txt As String > > Txt = msc.Name & " (Tot tab indexed controls = " & _ > mcolCtls.Count & ") : " & vbCrLf > For Each ct In mcolCtls > Txt = Txt & vbTab & ct.Name > Next > > prp_CtlNamesSortedByTbIndex = Txt > > Set ct = Nothing > End Property > '------------------------------------------- > > Property Get prp_ControlsByTabIndex() As Collection > ' Return the collection of controls sorted by tab index > ' (and keyed on TabIndex) > Set prp_ControlsByTabIndex = mcolCtls > End Property > '------------------------------------------- > > Property Get prp_TabIndexedControlsCount() As Long > ' Return the count of tab indexed controls on > ' this section or page > prp_TabIndexedControlsCount = mcolCtls.Count > End Property > '============================= > > ' Class C_CtlsByTabIndexMaster > '============================= > Option Compare Database > Option Explicit > > ' Collection of class objects, each representing > ' a collection of controls sorted as per tab index. > Private mcolC_CtlsByTabIndex As Collection > '------------------------------------------- > > Private Sub Class_Initialize() > Set mcolC_CtlsByTabIndex = New Collection > End Sub > '------------------------------------------- > > Private Sub Class_Terminate() > Set mcolC_CtlsByTabIndex = Nothing > End Sub > '------------------------------------------- > > Function P_Init(fm As Access.Form) > P_BuidClassCollection fm > End Function > '------------------------------------------- > > Sub P_BuidClassCollection(fm As Access.Form) > On Error Resume Next > Dim cObj As C_CtlsByTabIndex > Dim pg As Access.Page > Dim Cnt As Long, Ctr As Long > Dim Rtv As Variant > > ' Max possible 5 sections in a form (0 - acDetail, > ' 1 - acHeader, 2 - acFooter, 3 - acPageHeader, > ' 4 - acPageFooter) > ' Note - On a form, PageHeader & PageFooter > ' come into play only if the form is printed. > For Cnt = 0 To 4 > Err.Clear > If Not IsError(fm.Section(Cnt).Controls.Count _ > > 0) Then > ' The section exists. Add an instance of class > ' C_CtlsByTabIndex for this section to > ' collection mcolC_CtlsByTabIndex > Set cObj = New C_CtlsByTabIndex > cObj.P_Init fm, fm.Section(Cnt) > mcolC_CtlsByTabIndex.Add cObj, _ > fm.Section(Cnt).Name > > ' Take similar action for tab control pages > ' - if any - on this section. > ' > ' Get list of tab control names on this section > Rtv = cObj.prp_TabControlList > If Len(Rtv) > 0 Then > ' Build array of tab control names > Rtv = Split(Rtv, ",") > For Ctr = 0 To UBound(Rtv) > ' Add an instance of class > ' C_CtlsByTabIndex for each page to > ' collection mcolC_CtlsByTabIndex > For Each pg In fm(Rtv(Ctr)).Pages > Set cObj = New C_CtlsByTabIndex > cObj.P_Init fm, pg > mcolC_CtlsByTabIndex.Add cObj, _ > pg.Name > Next > Next > End If > End If > Next > > Set pg = Nothing > Set cObj = Nothing > > On Error GoTo 0 > End Sub > '------------------------------------------- > > Property Get prp_CtlNamesSortedByTbIndex() As String > ' Returns a list of all controls on various sections > ' and pages in the order of tab index > Dim cObj As C_CtlsByTabIndex > Dim Txt As String > > For Each cObj In mcolC_CtlsByTabIndex > Txt = Txt & IIf(Len(Txt) > 0, vbCrLf, "") & _ > cObj.prp_CtlNamesSortedByTbIndex > Next > prp_CtlNamesSortedByTbIndex = Txt > > ' Debug.Print Txt > > Set cObj = Nothing > End Property > '------------------------------------------- > > Property Get prp_colC_CtlsByTabIndex() As Collection > ' Return the entire collection of all instances of > ' C_CtlsByTabIndex > Set prp_colC_CtlsByTabIndex = _ > mcolC_CtlsByTabIndex > End Property > '------------------------------------------- > > Function Fn_ObjC_CtlsByTabIndex(SecOrPgName As String) _ > As C_CtlsByTabIndex > ' Return an instance of class C_CtlsByTabIndex for a > ' specific form section or tab page. > ' SecOrPgName is the name of the form section or > ' tab page > On Error Resume Next > Set Fn_ObjC_CtlsByTabIndex = _ > mcolC_CtlsByTabIndex(SecOrPgName) > End Function > '============================= > > ' Code in form's module > '============================= > Option Compare Database > Option Explicit > > ' Declarations section > Public fc As C_CtlsByTabIndexMaster > '------------------------------------------- > > Private Sub Form_Open(Cancel As Integer) > Set fc = New C_CtlsByTabIndexMaster > fc.P_Init Me > MsgBox fc.prp_CtlNamesSortedByTbIndex > End Sub > '------------------------------------------- > > Private Sub Form_Close() > Set fc = Nothing > End Sub > '================================== > > > ----- Original Message ----- > From: jwcolby > To: Access Developers discussion and problem solving > Sent: Tuesday, October 27, 2009 00:58 > Subject: Re: [AccessD] SPAM-LOW: Re: Form Controls - Class implementation > > > It does indeed get deep in a hurry. The nice thing about a class > implementation is that you can see > the answer in VBA English. > > The code works BTW. > > Going in I thought I was going to be able to pass the control collections as > simple collection types > but not so. I had to pass the control collections as objects, then use the > objects as collections. > I would love to know what type the control collections are. Most likely > below the covers they are > a strongly typed collection (of controls) but because they are at heart a > collection all of the > methods and properties are there once the object is passed in. > > The implementation does allow me to concentrate on objects that contain > collections of controls > rather than on the controls themselves. > > John W. Colby > www.ColbyConsulting.com > > > Kenneth Ismert wrote: >> Just read through the code. Very cool. >> >> It's surprising how much work it takes to get a complete answer to a >> seemingly trivial Access problem like "I want to see all my controls in >> tab >> order". >> >> -Ken > From jwcolby at colbyconsulting.com Tue Oct 27 21:34:49 2009 From: jwcolby at colbyconsulting.com (jwcolby) Date: Tue, 27 Oct 2009 22:34:49 -0400 Subject: [AccessD] Form Controls - Class implementation two - clsCtlsSorted2 In-Reply-To: <008401ca573d$81983d20$d95fa27a@personald6374f> References: <7c7841600910261203v41b85435q874ab3189722e24f@mail.gmail.com> <4AE5F862.10501@colbyconsulting.com> <008401ca573d$81983d20$d95fa27a@personald6374f> Message-ID: <4AE7ADC9.8000000@colbyconsulting.com> OK for the "scan the controls once" issue the classes end up looking much the same, with the scanning moved entirely out of the clsCtlsSorted. ' 'clsCtlsSorted2 ' Option Compare Database Option Explicit Private mstrObjName As String Private mcolCtlsSorted As Collection Private Sub Class_Initialize() Set mcolCtlsSorted = New Collection End Sub Private Sub Class_Terminate() Set mcolCtlsSorted = Nothing End Sub ' 'Pass in any collection of controls to be stored in sorted order ' Function mInit(lstrObjName As String) mstrObjName = lstrObjName End Function Property Get pObjName() As String pObjName = mstrObjName End Property ' 'Return the collection of controls in sorted order (keyed on TabIndex) ' Property Get pCtlsSorted() As Collection Set pCtlsSorted = mcolCtlsSorted End Property ' 'Iterate the collection of controls getting each control name 'and appending it to a string ' '--------------------------------------------------------------------------------------- ' Procedure : pCtlNames ' Author : jwcolby ' Date : 10/27/2009 ' Purpose : '--------------------------------------------------------------------------------------- ' Property Get pCtlNames() As String Dim ctl As Control Dim strCtlNames As String Dim intIndex As Integer On Error GoTo Err_pCtlNames strCtlNames = pObjName & ":: " & vbCrLf For Each ctl In mcolCtlsSorted strCtlNames = strCtlNames & vbTab & ctl.Name Next ctl pCtlNames = strCtlNames Exit_pCtlNames: On Error Resume Next Exit Property Err_pCtlNames: Select Case Err Case 0 '.insert Errors you wish to ignore here Resume Next Case Else '.All other errors will trap Beep MsgBox Err.Number & ":" & Err.Description Resume Exit_pCtlNames End Select Resume 0 '.FOR TROUBLESHOOTING End Property Function mAddCtl(ctl As Control) On Error Resume Next mcolCtlsSorted.Add ctl, CStr(ctl.TabIndex) End Function ' 'Sorts the controls in mcolCtlsSorted into sorted order ' '--------------------------------------------------------------------------------------- ' Procedure : mSortcontrols ' Author : jwcolby ' Date : 10/27/2009 ' Purpose : '--------------------------------------------------------------------------------------- ' Function mSortcontrols() Dim ctl As Control Dim intIndex As Integer Dim col As Collection On Error GoTo Err_mSortcontrols Set col = New Collection With mcolCtlsSorted If .Count Then 'Check that there are controls in mcolCtlsSorted For intIndex = 0 To .Count - 1 'Iterate through mcolCtlsSorted col.Add .Item(CStr(intIndex)) 'Copying the controls into the temp collection Next intIndex End If End With ' 'If there are any controls in the temp collection then 'set the main collection to the temp collection If col.Count Then Set mcolCtlsSorted = col End If Exit_mSortcontrols: On Error Resume Next Exit Function Err_mSortcontrols: Select Case Err Case 0 '.insert Errors you wish to ignore here Resume Next Case Else '.All other errors will trap Beep MsgBox Err.Number & ":" & Err.Description Resume Exit_mSortcontrols End Select Resume 0 '.FOR TROUBLESHOOTING End Function John W. Colby www.ColbyConsulting.com A.D.Tejpal wrote: > JC, > > Thanks for providing a nice class based solution so promptly. Your well > known command over classes deserves to be complimented. From jwcolby at colbyconsulting.com Tue Oct 27 21:39:06 2009 From: jwcolby at colbyconsulting.com (jwcolby) Date: Tue, 27 Oct 2009 22:39:06 -0400 Subject: [AccessD] Form Controls - Class implementation two - In-Reply-To: <008401ca573d$81983d20$d95fa27a@personald6374f> References: <7c7841600910261203v41b85435q874ab3189722e24f@mail.gmail.com> <4AE5F862.10501@colbyconsulting.com> <008401ca573d$81983d20$d95fa27a@personald6374f> Message-ID: <4AE7AECA.4030604@colbyconsulting.com> And the supervisor. Again very similar except that the entire control scanner is in this class now. that method is really the only tricky part. Where the control was not directly in the form I had to index into the colClsCtlsSorted using Ctl.Parent.Parent.name. The parent is the page and the parent.parent is the tab. ' 'clsCtlSortSupervisor2 ' Option Compare Database Option Explicit Private colClsCtlsSorted As Collection Private Sub Class_Initialize() Set colClsCtlsSorted = New Collection End Sub Private Sub Class_Terminate() Set colClsCtlsSorted = Nothing End Sub Function mInit(frm As Form) mScanFormForSections frm mSortcontrols End Function ' 'Return the entire collection of all instances of clsCtlSorted ' Property Get colClsControlsSorted() As Collection Set colClsControlsSorted = colClsCtlsSorted End Property ' 'Return a clsCtlSorted instance for a specific object (tab, form section etc) ' 'strObjName is the name of the tab page, control section etc. ' Function cControlsSorted(strObjName As String) As clsCtlsSorted On Error Resume Next Set cControlsSorted = colClsCtlsSorted(strObjName) End Function ' 'Returns a string of all controls and what object they belong to ' '--------------------------------------------------------------------------------------- ' Procedure : pCtlNames ' Author : jwcolby ' Date : 10/27/2009 ' Purpose : '--------------------------------------------------------------------------------------- ' Property Get pCtlNames() As String Dim lclsCtlsSorted As clsCtlsSorted2 Dim strCtlNames As String On Error GoTo Err_pCtlNames For Each lclsCtlsSorted In colClsCtlsSorted strCtlNames = strCtlNames & lclsCtlsSorted.pCtlNames() & vbCrLf Next lclsCtlsSorted pCtlNames = strCtlNames Debug.Print strCtlNames Exit_pCtlNames: On Error Resume Next Exit Property Err_pCtlNames: Select Case Err Case 0 '.insert Errors you wish to ignore here Resume Next Case Else '.All other errors will trap Beep MsgBox Err.Number & ":" & Err.Description Resume Exit_pCtlNames End Select Resume 0 '.FOR TROUBLESHOOTING End Property ' 'The class factory createa an instance of clsCtlsSorted, 'passing in the name of the object in the form 'that contained the controls collection ' 'After the class is instantiated and initialized, 'the instance is stored in colClsCtlsSorted 'keyed on the name of the object that contained the controls collection ' '--------------------------------------------------------------------------------------- ' Procedure : mClassFactory ' Author : jwcolby ' Date : 10/27/2009 ' Purpose : '--------------------------------------------------------------------------------------- ' Private Function mClassFactory(lstrObjName As String) Dim lclsCtlsSorted As clsCtlsSorted2 On Error GoTo Err_mClassFactory Set lclsCtlsSorted = New clsCtlsSorted2 lclsCtlsSorted.mInit lstrObjName colClsCtlsSorted.Add lclsCtlsSorted, lstrObjName Exit_mClassFactory: On Error Resume Next Exit Function Err_mClassFactory: Select Case Err Case 0 '.insert Errors you wish to ignore here Resume Next Case Else '.All other errors will trap Beep MsgBox Err.Number & ":" & Err.Description Resume Exit_mClassFactory End Select Resume 0 '.FOR TROUBLESHOOTING End Function ' 'Sections can contain tabs 'which contain pages which contain controls ' '--------------------------------------------------------------------------------------- ' Procedure : mScanSectionForControls ' Author : jwcolby ' Date : 10/27/2009 ' Purpose : '--------------------------------------------------------------------------------------- ' Function mScanSectionForControls(sec As Section) Dim ctl As Control Dim lclsSectionCtlsSorted As clsCtlsSorted2 ' Dim lclsTabPgCtlsSorted As clsCtlsSorted2 Dim intTabIndex As Integer 'Dim a variable to use to generate an error if the control does NOT have a tabindex property Dim ctlParent As Control 'Dim a variable to test whether the parent is a control On Error GoTo Err_mScanSectionForControls Set lclsSectionCtlsSorted = colClsCtlsSorted(sec.Name) 'Pull the instance for the section For Each ctl In sec.Controls 'Iterate the section's contyrol collection On Error Resume Next intTabIndex = ctl.TabIndex 'Test for the TabIndex property If Err = 0 Then 'If no error then process control (store in the collection) Debug.Print sec.Name & ":" & ctl.Name & "::" & ctl.Parent.Name If ctl.ControlType = acTabCtl Then 'Look for tab controls lclsSectionCtlsSorted.mAddCtl ctl 'Place this control in the sections class instance mScanTabForPages ctl Else Err.Clear Set ctlParent = ctl.Parent If Err = 0 Then 'this control is on another control so store in the right class instance On Error GoTo Err_mScanSectionForControls Set lclsTabPgCtlsSorted = colClsCtlsSorted(ctlParent.Parent.Name & "." & ctlParent.Name) lclsTabPgCtlsSorted.mAddCtl ctl Else On Error GoTo Err_mScanSectionForControls lclsSectionCtlsSorted.mAddCtl ctl 'this control is directly in the section so store in that instance Err.Clear End If End If Else Err.Clear End If Next ctl Exit_mScanSectionForControls: On Error Resume Next Exit Function Err_mScanSectionForControls: Select Case Err Case 0 '.insert Errors you wish to ignore here Resume Next ' Case 91 'Class not instantiated ' mClassFactory ctlParent.Parent.Name & "." & ctlParent.Name ' Resume 0 Case Else '.All other errors will trap Beep MsgBox Err.Number & ":" & Err.Description Resume Exit_mScanSectionForControls End Select Resume 0 '.FOR TROUBLESHOOTING End Function ' 'Find all pages of a tab control ' Function mScanTabForPages(ctlTab As Control) Dim pg As page For Each pg In ctlTab.Pages 'Iterate the page collection mClassFactory ctlTab.Name & "." & pg.Name 'Get an instance of lclsCtlsSorted for the page Next pg End Function ' 'Finds every section of a form 'Having found any valid section, it creates an 'instance of clsCtlsSorted for that section ' '--------------------------------------------------------------------------------------- ' Procedure : mScanFormForSections ' Author : jwcolby ' Date : 10/26/2009 ' Purpose : '--------------------------------------------------------------------------------------- ' Function mScanFormForSections(frm As Form) Dim sec As Section Dim intSection As Integer On Error GoTo Err_mScanFormForSections On Error Resume Next For intSection = 0 To 4 'There are only 5 sections in a form Set sec = frm.Section(intSection) 'Test to see if the section exists If Err = 0 Then 'The section exists so On Error GoTo Err_mScanFormForSections mClassFactory sec.Name 'Get an instance of lclsCtlsSorted mScanSectionForControls sec 'Now scan the section for tab controls Else Err.Clear End If Next intSection Exit_mScanFormForSections: On Error Resume Next Exit Function Err_mScanFormForSections: Select Case Err Case 0 '.insert Errors you wish to ignore here Resume Next Case Else '.All other errors will trap Beep MsgBox Err.Number & ":" & Err.Description Resume Exit_mScanFormForSections End Select Resume 0 '.FOR TROUBLESHOOTING End Function Function mSortcontrols() Dim lclsCtlsSorted As clsCtlsSorted2 For Each lclsCtlsSorted In colClsCtlsSorted lclsCtlsSorted.mSortcontrols Next lclsCtlsSorted End Function John W. Colby www.ColbyConsulting.com A.D.Tejpal wrote: > JC, > > Thanks for providing a nice class based solution so promptly. Your well > known command over classes deserves to be complimented. From Gustav at cactus.dk Wed Oct 28 03:48:50 2009 From: Gustav at cactus.dk (Gustav Brock) Date: Wed, 28 Oct 2009 09:48:50 +0100 Subject: [AccessD] Access 2007 Question - Did you watch the Access 2010 demo Message-ID: Hi Jack I watched it with the sound turned down. I was so focussed on the stupid hat the left guy was wearing that I forgot to release the mute button. And when the nice ever-smiling girl left, what more of interest could there be to discuss? No reason to touch the mute button. /gustav On Tue, Oct 27, 2009 at 5:27 AM, Jack and Pat wrote: > Just wondering if anyone watched the video > http://channel9.msdn.com/shows/Access/Microsoft-Access-2010-Demo/ > > jack From Gustav at cactus.dk Wed Oct 28 06:43:08 2009 From: Gustav at cactus.dk (Gustav Brock) Date: Wed, 28 Oct 2009 12:43:08 +0100 Subject: [AccessD] OT: Ares 1X Message-ID: Hi all This will take off in a short while. Countdown is currently on hold at -00:04:00. NASA live is here: http://www.nasa.gov/multimedia/nasatv/index.html /gustav From drawbridgej at sympatico.ca Wed Oct 28 07:20:36 2009 From: drawbridgej at sympatico.ca (Jack and Pat) Date: Wed, 28 Oct 2009 08:20:36 -0400 Subject: [AccessD] Access 2007 Question - Did you watch the Access 2010demo In-Reply-To: References: Message-ID: <431BF3D7040742ADA45069A51507A83E@AMDXP> Gustav, I guess that's the Microsoft way -----add a guy with a funny hat and have at least 1 pretty girl in the show --- and the viewer/potential customer won't focus on what's missing. jack -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: Wednesday, October 28, 2009 4:49 AM To: accessd at databaseadvisors.com Subject: Re: [AccessD] Access 2007 Question - Did you watch the Access 2010demo Hi Jack I watched it with the sound turned down. I was so focussed on the stupid hat the left guy was wearing that I forgot to release the mute button. And when the nice ever-smiling girl left, what more of interest could there be to discuss? No reason to touch the mute button. /gustav On Tue, Oct 27, 2009 at 5:27 AM, Jack and Pat wrote: > Just wondering if anyone watched the video > http://channel9.msdn.com/shows/Access/Microsoft-Access-2010-Demo/ > > jack -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From kismert at gmail.com Wed Oct 28 09:35:29 2009 From: kismert at gmail.com (Kenneth Ismert) Date: Wed, 28 Oct 2009 09:35:29 -0500 Subject: [AccessD] Access 2007 Question Message-ID: <7c7841600910280735j31dc6be2h9dee18a2ceb5736f@mail.gmail.com> Ken: >> But the 'programming priesthood' of .NET excludes the talented amateurs John W. Colby: > Ooooohhh so I would be a priest? ;) Nah ... I checked, and we can start you out at Cardinal ;) But seriously, the guy I work for now built his app in Access, and then built his company on that app -- if all that was available was Visual Studio, he never would have done it. There are plenty of people with enough specialized knowledge to make a data-driven application to suit some profitable niche. But, the number of people in that group who can, with no prior DB or programming knowledge, crack a book and build a C#/WinForms/ ADO.NET/SQL Server application is almost zero. The number of them who can get an open source CMS running on a LAMP stack is almost 100%. Microsoft has always ignored Access' suitability as a business-building tool for small entrepreneurs. It is positioning Access as Excel+ for large corporations. Downgrading VBA's role in Access threatens it's unique role in this respect. -Ken From fuller.artful at gmail.com Wed Oct 28 09:38:50 2009 From: fuller.artful at gmail.com (Arthur Fuller) Date: Wed, 28 Oct 2009 10:38:50 -0400 Subject: [AccessD] Access 2007 / 2003 install shuffle In-Reply-To: <4AE7082C.8080206@colbyconsulting.com> References: <703BDA18A87DFA4CB265A86F42E4178D0902DE3E@c2k3exchange.pgdp.corp.usec.com> <4AE7082C.8080206@colbyconsulting.com> Message-ID: <29f585dd0910280738u4838fe59o6bbc4f7458624842@mail.gmail.com> After much bitter experience trying to run 2003 and 2007 on one box, I eventually threw in the towel and now run each of them in its own VM (Sun VirtualBox is the VM manager I happened to select). Even installing 2003 and 2007 in separate directories didn't work, at least for me. Windows 64-bit and several VMs works very nicely. A. From fuller.artful at gmail.com Wed Oct 28 09:52:04 2009 From: fuller.artful at gmail.com (Arthur Fuller) Date: Wed, 28 Oct 2009 10:52:04 -0400 Subject: [AccessD] Access 2010 Macro Question In-Reply-To: <7c7841600910271741j5af2cbe2s8324f1a53a7830ca@mail.gmail.com> References: <7c7841600910271741j5af2cbe2s8324f1a53a7830ca@mail.gmail.com> Message-ID: <29f585dd0910280752v4026b37cn590d7c63b7e73c51@mail.gmail.com> No. On Tue, Oct 27, 2009 at 8:41 PM, Kenneth Ismert wrote: > Can A2010 macros take and return parameters from form events? > > For instance, could I set Cancel in the event Form_Open(Cancel) with a > macro? > > -Ken > From jwcolby at colbyconsulting.com Wed Oct 28 09:52:49 2009 From: jwcolby at colbyconsulting.com (jwcolby) Date: Wed, 28 Oct 2009 10:52:49 -0400 Subject: [AccessD] Access 2007 Question In-Reply-To: <7c7841600910280735j31dc6be2h9dee18a2ceb5736f@mail.gmail.com> References: <7c7841600910280735j31dc6be2h9dee18a2ceb5736f@mail.gmail.com> Message-ID: <4AE85AC1.30208@colbyconsulting.com> Ken, > Nah ... I checked, and we can start you out at Cardinal ;) I got news for you, no Amateur coming from VBA is going to start out in .Net as much more than alter boy. There is just too much there to learn. You are absolutely correct about "starting out on .Net", virtually no amateur would do that, or at least not quickly enough to maintain a head of steam. I certainly don't denigrate .Net because of that, its target audience is very different. But of course I get your point. I have to say though that I don't see the changes they have made to Access as threatening that market. The "amateur" will be just fine picking up 2007 and with the changes to the macros it might be even better for that niche. Assuming of course that VBA is available, lurking in the background for when the amateur runs out of steam and the professional has to step in. I think that Access has always been ignored in general, and that it is finally getting some attention, and hopefully some marketing attention as well. I have long maintained that MS is my own private marketing firm. They spend millions convincing Joe & Linda Store Owner that (s)he can build a database, and then I step in when (s)he realizes it isn't as simple as it first appears. John W. Colby www.ColbyConsulting.com Kenneth Ismert wrote: > Ken: >>> But the 'programming priesthood' of .NET excludes the talented amateurs > > John W. Colby: >> Ooooohhh so I would be a priest? ;) > > Nah ... I checked, and we can start you out at Cardinal ;) > > But seriously, the guy I work for now built his app in Access, and then > built his company on that app -- if all that was available was Visual > Studio, he never would have done it. There are plenty of people with enough > specialized knowledge to make a data-driven application to suit some > profitable niche. But, the number of people in that group who can, with no > prior DB or programming knowledge, crack a book and build a C#/WinForms/ > ADO.NET/SQL Server application is almost zero. > > The number of them who can get an open source CMS running on a LAMP stack is > almost 100%. > > Microsoft has always ignored Access' suitability as a business-building tool > for small entrepreneurs. It is positioning Access as Excel+ for large > corporations. Downgrading VBA's role in Access threatens it's unique role in > this respect. > > -Ken From jwcolby at colbyconsulting.com Wed Oct 28 09:55:15 2009 From: jwcolby at colbyconsulting.com (jwcolby) Date: Wed, 28 Oct 2009 10:55:15 -0400 Subject: [AccessD] Access 2007 / 2003 install shuffle In-Reply-To: <29f585dd0910280738u4838fe59o6bbc4f7458624842@mail.gmail.com> References: <703BDA18A87DFA4CB265A86F42E4178D0902DE3E@c2k3exchange.pgdp.corp.usec.com> <4AE7082C.8080206@colbyconsulting.com> <29f585dd0910280738u4838fe59o6bbc4f7458624842@mail.gmail.com> Message-ID: <4AE85B53.9020700@colbyconsulting.com> I haven't really used 2007 much at all, but it seems to start and run OK. And the switch back and forth between 2003 is OK. A tad slow in the 2007 direction but darned fast coming back to 2003. I have 2007 in a VM as well. John W. Colby www.ColbyConsulting.com Arthur Fuller wrote: > After much bitter experience trying to run 2003 and 2007 on one box, I > eventually threw in the towel and now run each of them in its own VM (Sun > VirtualBox is the VM manager I happened to select). Even installing 2003 and > 2007 in separate directories didn't work, at least for me. Windows 64-bit > and several VMs works very nicely. > > A. From jwcolby at colbyconsulting.com Wed Oct 28 09:57:08 2009 From: jwcolby at colbyconsulting.com (jwcolby) Date: Wed, 28 Oct 2009 10:57:08 -0400 Subject: [AccessD] Access 2007 Question In-Reply-To: <7c7841600910280735j31dc6be2h9dee18a2ceb5736f@mail.gmail.com> References: <7c7841600910280735j31dc6be2h9dee18a2ceb5736f@mail.gmail.com> Message-ID: <4AE85BC4.9040301@colbyconsulting.com> > But seriously, the guy I work for now built his app in Access One of my clients is the same situation. He knew a lot about overpayment recovery and managed to build a perfectly functional database to allow him to do that. John W. Colby www.ColbyConsulting.com Kenneth Ismert wrote: > Ken: >>> But the 'programming priesthood' of .NET excludes the talented amateurs > > John W. Colby: >> Ooooohhh so I would be a priest? ;) > > Nah ... I checked, and we can start you out at Cardinal ;) > > But seriously, the guy I work for now built his app in Access, and then > built his company on that app -- if all that was available was Visual > Studio, he never would have done it. There are plenty of people with enough > specialized knowledge to make a data-driven application to suit some > profitable niche. But, the number of people in that group who can, with no > prior DB or programming knowledge, crack a book and build a C#/WinForms/ > ADO.NET/SQL Server application is almost zero. > > The number of them who can get an open source CMS running on a LAMP stack is > almost 100%. > > Microsoft has always ignored Access' suitability as a business-building tool > for small entrepreneurs. It is positioning Access as Excel+ for large > corporations. Downgrading VBA's role in Access threatens it's unique role in > this respect. > > -Ken From max.wanadoo at gmail.com Wed Oct 28 09:58:56 2009 From: max.wanadoo at gmail.com (Max Wanadoo) Date: Wed, 28 Oct 2009 14:58:56 -0000 Subject: [AccessD] Access 2007 / 2003 install shuffle In-Reply-To: <29f585dd0910280738u4838fe59o6bbc4f7458624842@mail.gmail.com> References: <703BDA18A87DFA4CB265A86F42E4178D0902DE3E@c2k3exchange.pgdp.corp.usec.com> <4AE7082C.8080206@colbyconsulting.com> <29f585dd0910280738u4838fe59o6bbc4f7458624842@mail.gmail.com> Message-ID: <4ae85c45.25e2660a.5a94.1c0c@mx.google.com> Arthur, I installed Office 2003 first and nominated my own install directory (I just put 2003 in the offered path). Then rebooted etc. Then opened and used Access - all was ok. I then installed Office 2007 and installed to default path and told it to use the new Outlook (I had previously exported my stuff as a precaution). Then rebooted and use A2007- no problems. Then exited and opened A2003 no problems. Timings much in line with what JC posted. Max -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Arthur Fuller Sent: 28 October 2009 14:39 To: Access Developers discussion and problem solving Subject: Re: [AccessD] Access 2007 / 2003 install shuffle After much bitter experience trying to run 2003 and 2007 on one box, I eventually threw in the towel and now run each of them in its own VM (Sun VirtualBox is the VM manager I happened to select). Even installing 2003 and 2007 in separate directories didn't work, at least for me. Windows 64-bit and several VMs works very nicely. A. -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From max.wanadoo at gmail.com Wed Oct 28 10:00:05 2009 From: max.wanadoo at gmail.com (Max Wanadoo) Date: Wed, 28 Oct 2009 15:00:05 -0000 Subject: [AccessD] Access 2010 Macro Question In-Reply-To: <29f585dd0910280752v4026b37cn590d7c63b7e73c51@mail.gmail.com> References: <7c7841600910271741j5af2cbe2s8324f1a53a7830ca@mail.gmail.com> <29f585dd0910280752v4026b37cn590d7c63b7e73c51@mail.gmail.com> Message-ID: <4ae85c82.02e2660a.0b18.1eb0@mx.google.com> Please keep your replies brief. Max -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Arthur Fuller Sent: 28 October 2009 14:52 To: Access Developers discussion and problem solving Subject: Re: [AccessD] Access 2010 Macro Question No. On Tue, Oct 27, 2009 at 8:41 PM, Kenneth Ismert wrote: > Can A2010 macros take and return parameters from form events? > > For instance, could I set Cancel in the event Form_Open(Cancel) with a > macro? > > -Ken > -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From djkr at msn.com Wed Oct 28 10:02:17 2009 From: djkr at msn.com (DJK (John) Robinson) Date: Wed, 28 Oct 2009 15:02:17 -0000 Subject: [AccessD] Office Key In-Reply-To: <8748D4D958044FD5BA8EE2349503672B@HAL9005> Message-ID: Rocky In case you haven't tried Ralph's suggestion: do - it's brilliant! It works on Win7 too, though it doesn't say so. It retrieves keys for Windows, Office, Project and others. It certainly works on another PC's system disk attached to yours as a local disk, for instance in a USB-attached caddy. What it doesn't seem to do is to work across a network - which may just be a good thing! John -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Rocky Smolin Sent: 25 October 2009 22:53 To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Office Key That's my ace in the hole in case the key I got doesn't work. Rocky -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Ralph Bryce Sent: Sunday, October 25, 2009 3:17 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Office Key >Hi Rocky Have you tried this free program? http://www.magicaljellybean.com/ keyfinder/ It retrieves the actual license key HTH Ralph Bryce >Rocky Smolin wrote: > > Dear List(s): > > > > My son Max's HD in his Dell LT crapped out about a month ago. Dell > > replaced the drive. Of course, he had no backups. I told him to > > send the drive to me to see if I could recover some of the > > irreplaceable files. Which I was able to do. > > > > When I bought him this system I also got him Office 2007. OF > > course, he can't find the original install disk, but he got a copy > > from someone which is working but in a few days it's going to stop > > working because it's not registered. > > > > So my question is - is the key stored in the registry somewhere? If > > so, and I could find it on the old HD, I could email it to him, he > > could register the copy he's using. > > > > MTIA, > > > > > > > > Rocky Smolin > > > > Beach Access Software > > > > 858-259-4334 > > > > www.e-z-mrp.com > > > > www.bchacc.com > > > > > > > > > > > > > > >-- >AccessD mailing list >AccessD at databaseadvisors.com >http://databaseadvisors.com/mailman/listinfo/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 Wed Oct 28 10:19:32 2009 From: jwcolby at colbyconsulting.com (jwcolby) Date: Wed, 28 Oct 2009 11:19:32 -0400 Subject: [AccessD] Access 2010 Macro Question In-Reply-To: <4ae85c82.02e2660a.0b18.1eb0@mx.google.com> References: <7c7841600910271741j5af2cbe2s8324f1a53a7830ca@mail.gmail.com> <29f585dd0910280752v4026b37cn590d7c63b7e73c51@mail.gmail.com> <4ae85c82.02e2660a.0b18.1eb0@mx.google.com> Message-ID: <4AE86104.3040707@colbyconsulting.com> ROTFL. You too Max! Twitter for AccessD! John W. Colby www.ColbyConsulting.com Max Wanadoo wrote: > Please keep your replies brief. > > Max > > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Arthur Fuller > Sent: 28 October 2009 14:52 > To: Access Developers discussion and problem solving > Subject: Re: [AccessD] Access 2010 Macro Question > > No. > > On Tue, Oct 27, 2009 at 8:41 PM, Kenneth Ismert wrote: > >> Can A2010 macros take and return parameters from form events? >> >> For instance, could I set Cancel in the event Form_Open(Cancel) with a >> macro? >> >> -Ken >> From fuller.artful at gmail.com Wed Oct 28 11:20:03 2009 From: fuller.artful at gmail.com (Arthur Fuller) Date: Wed, 28 Oct 2009 12:20:03 -0400 Subject: [AccessD] Expiration Date In-Reply-To: <8786a4c00910271023y7257dd91qe868f5aa7f63ddd8@mail.gmail.com> References: <703BDA18A87DFA4CB265A86F42E4178D0902DE32@c2k3exchange.pgdp.corp.usec.com> <8786a4c00910271023y7257dd91qe868f5aa7f63ddd8@mail.gmail.com> Message-ID: <29f585dd0910280920m467bc76epcc7fb0d315e5d536@mail.gmail.com> With all respect to David, I would create a function and call it from OnCurrent rather than embed the logic therein. Different strokes for different folks, I guess. My approach is always to isolate functionality, not least because I might need to call the same code from somewhere else in the app. A. On Tue, Oct 27, 2009 at 1:23 PM, David McAfee wrote: > I'd keep it in the OnCurrent event. > > Use NZ() and some future date > > 'DateEarlyExp.value = DateDiff('d',Date(),NZ([DateEarlyExp],DATE()+365)) > > From davidmcafee at gmail.com Wed Oct 28 11:24:28 2009 From: davidmcafee at gmail.com (David McAfee) Date: Wed, 28 Oct 2009 09:24:28 -0700 Subject: [AccessD] Access 2007 Question - Did you watch the Access 2010 demo In-Reply-To: References: Message-ID: <8786a4c00910280924k10c39e95m91535166d64d6447@mail.gmail.com> And what's with his "sleeves"? Is it me or are people with arm full of tatoos not the person I'd show discussing my new computer software? I mean, its not like he's selling a new Harley or tatoo gun. Cover that stuff up! On Wed, Oct 28, 2009 at 1:48 AM, Gustav Brock wrote: > Hi Jack > > I watched it with the sound turned down. I was so focussed on the stupid hat the left guy was wearing that I forgot to release the mute button. > And when the nice ever-smiling girl left, what more of interest could there be to discuss? No reason to touch the mute button. > > /gustav > > On Tue, Oct 27, 2009 at 5:27 AM, Jack and Pat wrote: >> Just wondering if anyone watched the video >> http://channel9.msdn.com/shows/Access/Microsoft-Access-2010-Demo/ >> >> jack > > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > From davidmcafee at gmail.com Wed Oct 28 11:28:02 2009 From: davidmcafee at gmail.com (David McAfee) Date: Wed, 28 Oct 2009 09:28:02 -0700 Subject: [AccessD] Expiration Date In-Reply-To: <29f585dd0910280920m467bc76epcc7fb0d315e5d536@mail.gmail.com> References: <703BDA18A87DFA4CB265A86F42E4178D0902DE32@c2k3exchange.pgdp.corp.usec.com> <8786a4c00910271023y7257dd91qe868f5aa7f63ddd8@mail.gmail.com> <29f585dd0910280920m467bc76epcc7fb0d315e5d536@mail.gmail.com> Message-ID: <8786a4c00910280928g5ac24fe9x8b760d68cedd40f4@mail.gmail.com> I was going to suggest a function as well (thats what I would have done as well). I actually sent her an example using conditional formatting as I thought she was using continuous forms at first. On Wed, Oct 28, 2009 at 9:20 AM, Arthur Fuller wrote: > With all respect to David, I would create a function and call it from > OnCurrent rather than embed the logic therein. Different strokes for > different folks, I guess. My approach is always to isolate functionality, > not least because I might need to call the same code from somewhere else in > the app. > > A. > > On Tue, Oct 27, 2009 at 1:23 PM, David McAfee wrote: > >> I'd keep it in the OnCurrent event. >> >> Use NZ() and some future date >> >> ?'DateEarlyExp.value = ?DateDiff('d',Date(),NZ([DateEarlyExp],DATE()+365)) >> >> > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > From max.wanadoo at gmail.com Wed Oct 28 11:43:54 2009 From: max.wanadoo at gmail.com (Max Wanadoo) Date: Wed, 28 Oct 2009 16:43:54 -0000 Subject: [AccessD] Access 2007 Question - Did you watch the Access 2010 demo In-Reply-To: <8786a4c00910280924k10c39e95m91535166d64d6447@mail.gmail.com> References: <8786a4c00910280924k10c39e95m91535166d64d6447@mail.gmail.com> Message-ID: <4ae874df.02e2660a.0b18.60bd@mx.google.com> Was there a guy there as well? Max -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of David McAfee Sent: 28 October 2009 16:24 To: Access Developers discussion and problem solving Subject: Re: [AccessD] Access 2007 Question - Did you watch the Access 2010 demo And what's with his "sleeves"? Is it me or are people with arm full of tatoos not the person I'd show discussing my new computer software? I mean, its not like he's selling a new Harley or tatoo gun. Cover that stuff up! On Wed, Oct 28, 2009 at 1:48 AM, Gustav Brock wrote: > Hi Jack > > I watched it with the sound turned down. I was so focussed on the stupid hat the left guy was wearing that I forgot to release the mute button. > And when the nice ever-smiling girl left, what more of interest could there be to discuss? No reason to touch the mute button. > > /gustav > > On Tue, Oct 27, 2009 at 5:27 AM, Jack and Pat wrote: >> Just wondering if anyone watched the video >> http://channel9.msdn.com/shows/Access/Microsoft-Access-2010-Demo/ >> >> jack > > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From max.wanadoo at gmail.com Wed Oct 28 11:53:14 2009 From: max.wanadoo at gmail.com (Max Wanadoo) Date: Wed, 28 Oct 2009 16:53:14 -0000 Subject: [AccessD] Access 2010 Macro Question In-Reply-To: <4AE86104.3040707@colbyconsulting.com> References: <7c7841600910271741j5af2cbe2s8324f1a53a7830ca@mail.gmail.com> <29f585dd0910280752v4026b37cn590d7c63b7e73c51@mail.gmail.com> <4ae85c82.02e2660a.0b18.1eb0@mx.google.com> <4AE86104.3040707@colbyconsulting.com> Message-ID: <4ae87710.0baa660a.08f7.5afc@mx.google.com> ..hark who is calling the kettle black.. you write whole missives... Max -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: 28 October 2009 15:20 To: Access Developers discussion and problem solving Subject: Re: [AccessD] Access 2010 Macro Question ROTFL. You too Max! Twitter for AccessD! John W. Colby www.ColbyConsulting.com Max Wanadoo wrote: > Please keep your replies brief. > > Max > > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Arthur Fuller > Sent: 28 October 2009 14:52 > To: Access Developers discussion and problem solving > Subject: Re: [AccessD] Access 2010 Macro Question > > No. > > On Tue, Oct 27, 2009 at 8:41 PM, Kenneth Ismert wrote: > >> Can A2010 macros take and return parameters from form events? >> >> For instance, could I set Cancel in the event Form_Open(Cancel) with a >> macro? >> >> -Ken >> -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From davidmcafee at gmail.com Wed Oct 28 11:55:04 2009 From: davidmcafee at gmail.com (David McAfee) Date: Wed, 28 Oct 2009 09:55:04 -0700 Subject: [AccessD] Access 2007 Question - Did you watch the Access 2010 demo In-Reply-To: <4ae874df.02e2660a.0b18.60bd@mx.google.com> References: <8786a4c00910280924k10c39e95m91535166d64d6447@mail.gmail.com> <4ae874df.02e2660a.0b18.60bd@mx.google.com> Message-ID: <8786a4c00910280955p52492257u487c021e9d3181c5@mail.gmail.com> LMAO! On Wed, Oct 28, 2009 at 9:43 AM, Max Wanadoo wrote: > Was there a guy there as well? > > Max From max.wanadoo at gmail.com Wed Oct 28 12:38:17 2009 From: max.wanadoo at gmail.com (Max Wanadoo) Date: Wed, 28 Oct 2009 17:38:17 -0000 Subject: [AccessD] Access 2007 Question - Did you watch the Access 2010 demo In-Reply-To: <8786a4c00910280955p52492257u487c021e9d3181c5@mail.gmail.com> References: <8786a4c00910280924k10c39e95m91535166d64d6447@mail.gmail.com> <4ae874df.02e2660a.0b18.60bd@mx.google.com> <8786a4c00910280955p52492257u487c021e9d3181c5@mail.gmail.com> Message-ID: <4ae8819f.0aa1660a.454f.5fb1@mx.google.com> Well David, as you know, there are three kinds of people; those who can count and those who can't! Max -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of David McAfee Sent: 28 October 2009 16:55 To: Access Developers discussion and problem solving Subject: Re: [AccessD] Access 2007 Question - Did you watch the Access 2010 demo LMAO! On Wed, Oct 28, 2009 at 9:43 AM, Max Wanadoo wrote: > Was there a guy there as well? > > Max -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From kismert at gmail.com Wed Oct 28 13:40:42 2009 From: kismert at gmail.com (Kenneth Ismert) Date: Wed, 28 Oct 2009 13:40:42 -0500 Subject: [AccessD] Access 2010 Macro Question Message-ID: <7c7841600910281140r2f41aa4boca469fceb9804560@mail.gmail.com> Ken: >> Can A2010 macros take and return parameters from form events? Arthur Fuller: >No. Another critical edge for VBA. Seems simple to implement for macros, but I suspect they have been far too busy polishing the UI. -Ken From fuller.artful at gmail.com Wed Oct 28 15:43:43 2009 From: fuller.artful at gmail.com (Arthur Fuller) Date: Wed, 28 Oct 2009 16:43:43 -0400 Subject: [AccessD] Expiration Date In-Reply-To: <8786a4c00910271111l1b687b22id0e9ed2015758ce0@mail.gmail.com> References: <703BDA18A87DFA4CB265A86F42E4178D0902DF58@c2k3exchange.pgdp.corp.usec.com> <8786a4c00910271111l1b687b22id0e9ed2015758ce0@mail.gmail.com> Message-ID: <29f585dd0910281343i701611aeue138747d8ce4f503@mail.gmail.com> I think that the central problem here is the use of a calculated column rather than a real column. By using a real column, you could skip all the DateDiff() stuff etc. and instead just calculate any given row's value in the AfterUpdate event. After that, your color formatting becomes trivial. Just examine the possible values and color the cells appropriately. This is going to perform much more quickly than the run-time analysis of each visible row. And given that what you are storing is a date, it's not going to present much overhead. Just my $0.02. Arthur From Darryl.Collins at anz.com Wed Oct 28 17:42:05 2009 From: Darryl.Collins at anz.com (Collins, Darryl) Date: Thu, 29 Oct 2009 09:42:05 +1100 Subject: [AccessD] Access 2007 Question In-Reply-To: <4AE85AC1.30208@colbyconsulting.com> Message-ID: <6DC4725FDCDD72428D6114F1B6CC6E8101688B94@EXUAU020HWT110.oceania.corp.anz.com> "I have long maintained that MS is my own private marketing firm. They spend millions convincing Joe & Linda Store Owner that (s)he can build a database, and then I step in when (s)he realizes it isn't as simple as it first appears." Nice one and an excellent point. That is pretty much how I have managed to keep myself off the street. There things are usually much more complex than they seem when you are starting out. Cheers Darryl. "This e-mail and any attachments to it (the "Communication") is, unless otherwise stated, confidential, may contain copyright material and is for the use only of the intended recipient. If you receive the Communication in error, please notify the sender immediately by return e-mail, delete the Communication and the return e-mail, and do not read, copy, retransmit or otherwise deal with it. Any views expressed in the Communication are those of the individual sender only, unless expressly stated to be those of Australia and New Zealand Banking Group Limited ABN 11 005 357 522, or any of its related entities including ANZ National Bank Limited (together "ANZ"). ANZ does not accept liability in connection with the integrity of or errors in the Communication, computer virus, data corruption, interference or delay arising from or in respect of the Communication." From ssharkins at gmail.com Thu Oct 29 08:41:58 2009 From: ssharkins at gmail.com (Susan Harkins) Date: Thu, 29 Oct 2009 09:41:58 -0400 Subject: [AccessD] Bizarre request for old IMA article Message-ID: Years ago, I wrote a short article on an age-calculating expression for Inside Microsoft Access (The Cobb Group). Somewhere in a black hole I call a closet I have a copy of every journal, but I can't find the journal with this particular article. It may be in my daughter's basement and if that's the case... it's a casualty. :) If anyone has copies of IMA going back to say... 1993/1994/1995 -- there abouts, would you mind checking the index to see if you can find that article? I want the expression. I'd love to have the entire article, but I don't think that's going to happen. Eli Journals now owns all of that content and I'm not a subscriber, so I can't get into their online archives and it is so old that it might not be available online anyway. I don't need age-calculating expressions -- so sending me one won't really help. I need THAT particular expression. :) Susan H. From jimdettman at verizon.net Thu Oct 29 09:21:03 2009 From: jimdettman at verizon.net (Jim Dettman) Date: Thu, 29 Oct 2009 10:21:03 -0400 Subject: [AccessD] Bizarre request for old IMA article In-Reply-To: References: Message-ID: Wish I could help, but I just checked and I only have '99 - '04 Jim. -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Susan Harkins Sent: Thursday, October 29, 2009 9:42 AM To: AccessD at databaseadvisors.com Subject: [AccessD] Bizarre request for old IMA article Years ago, I wrote a short article on an age-calculating expression for Inside Microsoft Access (The Cobb Group). Somewhere in a black hole I call a closet I have a copy of every journal, but I can't find the journal with this particular article. It may be in my daughter's basement and if that's the case... it's a casualty. :) If anyone has copies of IMA going back to say... 1993/1994/1995 -- there abouts, would you mind checking the index to see if you can find that article? I want the expression. I'd love to have the entire article, but I don't think that's going to happen. Eli Journals now owns all of that content and I'm not a subscriber, so I can't get into their online archives and it is so old that it might not be available online anyway. I don't need age-calculating expressions -- so sending me one won't really help. I need THAT particular expression. :) Susan H. -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From john at winhaven.net Thu Oct 29 10:30:48 2009 From: john at winhaven.net (John Bartow) Date: Thu, 29 Oct 2009 10:30:48 -0500 Subject: [AccessD] Bizarre request for old IMA article In-Reply-To: References: Message-ID: <000001ca58ac$ca9bd570$5fd38050$@net> I used to get that when I worked for a former employer but left them all there. I'm sure they've recycled them all by now. Sorry, good luck! From Susan.Klos at fldoe.org Thu Oct 29 14:51:43 2009 From: Susan.Klos at fldoe.org (Klos, Susan) Date: Thu, 29 Oct 2009 15:51:43 -0400 Subject: [AccessD] AccessD Digest, Vol 80, Issue 39 In-Reply-To: References: Message-ID: <66D9CA142291D741B515207C09AA3BC3147C55@MAIL2.FLDOE.INT> Sorry, Susan, mine range from 1998 to 2003. Have you checked online? If you need further assistance feel free to contact me. ? Susan Klos Senior Database Analyst Florida Department of Education Evaluation and Reporting Office Phone: 850.245.0708 Fax: 850.245.0710 email: susan.klos at fldoe.org Message: 4 Date: Thu, 29 Oct 2009 09:41:58 -0400 From: "Susan Harkins" Subject: [AccessD] Bizarre request for old IMA article To: Message-ID: Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Years ago, I wrote a short article on an age-calculating expression for Inside Microsoft Access (The Cobb Group). Somewhere in a black hole I call a closet I have a copy of every journal, but I can't find the journal with this particular article. It may be in my daughter's basement and if that's the case... it's a casualty. :) If anyone has copies of IMA going back to say... 1993/1994/1995 -- there abouts, would you mind checking the index to see if you can find that article? I want the expression. I'd love to have the entire article, but I don't think that's going to happen. Eli Journals now owns all of that content and I'm not a subscriber, so I can't get into their online archives and it is so old that it might not be available online anyway. I don't need age-calculating expressions -- so sending me one won't really help. I need THAT particular expression. :) Susan H. ------------------------------ From ssharkins at gmail.com Fri Oct 30 09:32:52 2009 From: ssharkins at gmail.com (Susan Harkins) Date: Fri, 30 Oct 2009 10:32:52 -0400 Subject: [AccessD] AccessD Digest, Vol 80, Issue 39 References: <66D9CA142291D741B515207C09AA3BC3147C55@MAIL2.FLDOE.INT> Message-ID: <274064EB37244AE0BF74A3D181299762@SusanOne> It's a subscription-based site and I no longer subscribe. I've moved on to another tactic. :) Susan H. Sorry, Susan, mine range from 1998 to 2003. Have you checked online? From drawbridgej at sympatico.ca Fri Oct 30 16:50:11 2009 From: drawbridgej at sympatico.ca (Jack and Pat) Date: Fri, 30 Oct 2009 17:50:11 -0400 Subject: [AccessD] very quiet this Friday In-Reply-To: References: <29f585dd0910251339u735bd228vb5548bc729c0d6dc@mail.gmail.com><12BAC542C3884C06B8BB6D81F95158F9@stevePC> <00db01ca567e$fe8b4ad0$0501a8c0@MSIMMSWS><4ae6a150.0a1ad00a.7d3d.ffffedf1@mx.google.com> Message-ID: Haven't received anything all day???? From davidmcafee at gmail.com Fri Oct 30 17:07:32 2009 From: davidmcafee at gmail.com (David McAfee) Date: Fri, 30 Oct 2009 15:07:32 -0700 Subject: [AccessD] very quiet this Friday In-Reply-To: References: <29f585dd0910251339u735bd228vb5548bc729c0d6dc@mail.gmail.com> <12BAC542C3884C06B8BB6D81F95158F9@stevePC> <00db01ca567e$fe8b4ad0$0501a8c0@MSIMMSWS> <4ae6a150.0a1ad00a.7d3d.ffffedf1@mx.google.com> Message-ID: <8786a4c00910301507p50c5188y22596f974599f1ce@mail.gmail.com> If other companies are doing the same as ours, there are several potlucks going on and people are stuffing their faces. :) On Fri, Oct 30, 2009 at 2:50 PM, Jack and Pat wrote: > Haven't received anything all day???? > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > From cfoust at infostatsystems.com Fri Oct 30 17:05:28 2009 From: cfoust at infostatsystems.com (Charlotte Foust) Date: Fri, 30 Oct 2009 15:05:28 -0700 Subject: [AccessD] very quiet this Friday In-Reply-To: References: <29f585dd0910251339u735bd228vb5548bc729c0d6dc@mail.gmail.com><12BAC542C3884C06B8BB6D81F95158F9@stevePC> <00db01ca567e$fe8b4ad0$0501a8c0@MSIMMSWS><4ae6a150.0a1ad00a.7d3d.ffffedf1@mx.google.com> Message-ID: Maybe no one could come up with a good joke? Charlotte -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Jack and Pat Sent: Friday, October 30, 2009 2:50 PM To: 'Access Developers discussion and problem solving' Subject: [AccessD] very quiet this Friday Haven't received anything all day???? From stuart at lexacorp.com.pg Fri Oct 30 17:59:04 2009 From: stuart at lexacorp.com.pg (Stuart McLachlan) Date: Sat, 31 Oct 2009 08:59:04 +1000 Subject: [AccessD] very quiet this Friday In-Reply-To: References: <29f585dd0910251339u735bd228vb5548bc729c0d6dc@mail.gmail.com>, , Message-ID: <4AEB6FB8.2890.E0D1FAA@stuart.lexacorp.com.pg> All you 'merkins are probably too busy preparing to celebrate the christian Eve of All Saint's Day with a range of pagan antics. :-) -- Stuart On 30 Oct 2009 at 17:50, Jack and Pat wrote: > Haven't received anything all day???? > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com From cfoust at infostatsystems.com Fri Oct 30 18:26:19 2009 From: cfoust at infostatsystems.com (Charlotte Foust) Date: Fri, 30 Oct 2009 16:26:19 -0700 Subject: [AccessD] very quiet this Friday In-Reply-To: <4AEB6FB8.2890.E0D1FAA@stuart.lexacorp.com.pg> References: <29f585dd0910251339u735bd228vb5548bc729c0d6dc@mail.gmail.com>, , <4AEB6FB8.2890.E0D1FAA@stuart.lexacorp.com.pg> Message-ID: Let's be careful with that merkin business. Some of us know what it means. LOL Charlotte Foust -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Stuart McLachlan Sent: Friday, October 30, 2009 3:59 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] very quiet this Friday All you 'merkins are probably too busy preparing to celebrate the christian Eve of All Saint's Day with a range of pagan antics. :-) -- Stuart On 30 Oct 2009 at 17:50, Jack and Pat wrote: > Haven't received anything all day???? > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > 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 Fri Oct 30 18:30:33 2009 From: dbdoug at gmail.com (Doug Steele) Date: Fri, 30 Oct 2009 16:30:33 -0700 Subject: [AccessD] very quiet this Friday In-Reply-To: <4AEB6FB8.2890.E0D1FAA@stuart.lexacorp.com.pg> References: <29f585dd0910251339u735bd228vb5548bc729c0d6dc@mail.gmail.com> <4AEB6FB8.2890.E0D1FAA@stuart.lexacorp.com.pg> Message-ID: <4dd71a0c0910301630m5bf605daj19f1b0988e76bf9@mail.gmail.com> You want to be careful about calling someone a 'merkin' :) http://en.wikipedia.org/wiki/Merkin Doug On Fri, Oct 30, 2009 at 3:59 PM, Stuart McLachlan wrote: > All you 'merkins are probably too busy preparing to celebrate the christian > Eve of All Saint's > Day with a range of pagan antics. :-) > > -- > Stuart > > On 30 Oct 2009 at 17:50, Jack and Pat wrote: > > > Haven't received anything all day???? > > > > -- > > AccessD mailing list > > AccessD at databaseadvisors.com > > http://databaseadvisors.com/mailman/listinfo/accessd > > 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 Fri Oct 30 19:12:54 2009 From: jwcolby at colbyconsulting.com (jwcolby) Date: Fri, 30 Oct 2009 20:12:54 -0400 Subject: [AccessD] SPAM-LOW: Re: very quiet this Friday In-Reply-To: <4dd71a0c0910301630m5bf605daj19f1b0988e76bf9@mail.gmail.com> References: <29f585dd0910251339u735bd228vb5548bc729c0d6dc@mail.gmail.com> <4AEB6FB8.2890.E0D1FAA@stuart.lexacorp.com.pg> <4dd71a0c0910301630m5bf605daj19f1b0988e76bf9@mail.gmail.com> Message-ID: <4AEB8106.8000506@colbyconsulting.com> LOL, that is one of those pagan activities. ;) John W. Colby www.ColbyConsulting.com Doug Steele wrote: > You want to be careful about calling someone a 'merkin' :) > > http://en.wikipedia.org/wiki/Merkin > > Doug > > On Fri, Oct 30, 2009 at 3:59 PM, Stuart McLachlan wrote: > >> All you 'merkins are probably too busy preparing to celebrate the christian >> Eve of All Saint's >> Day with a range of pagan antics. :-) >> >> -- >> Stuart >> >> On 30 Oct 2009 at 17:50, Jack and Pat wrote: >> >>> Haven't received anything all day???? >>> >>> -- >>> AccessD mailing list >>> AccessD at databaseadvisors.com >>> http://databaseadvisors.com/mailman/listinfo/accessd >>> 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 Oct 31 09:13:38 2009 From: jwcolby at colbyconsulting.com (jwcolby) Date: Sat, 31 Oct 2009 10:13:38 -0400 Subject: [AccessD] MS Accounting discontinued Message-ID: <4AEC4612.7020500@colbyconsulting.com> http://blog.seattlepi.com/microsoft/archives/183698.asp That is a rather large application. I LOVE this: After evaluating the product over the past few years Microsoft determined that other Microsoft offerings such as free templates in the Office system used with Excel and the Dynamics product are able to meet our customers' needs. The Office Small Business web site has links to free templates for small businesses, such as invoices, expenses, time sheets, budgets and more and Microsoft's Small Business Center is also a great resource for small businesses. What a JOKE. Templates in Excel are the equivalent of an accounting program? It gives me GREAT CONFIDENCE in Microsoft when I see a statement like that. -- John W. Colby www.ColbyConsulting.com From rockysmolin at bchacc.com Sat Oct 31 09:32:10 2009 From: rockysmolin at bchacc.com (Rocky Smolin) Date: Sat, 31 Oct 2009 07:32:10 -0700 Subject: [AccessD] MS Accounting discontinued In-Reply-To: <4AEC4612.7020500@colbyconsulting.com> References: <4AEC4612.7020500@colbyconsulting.com> Message-ID: Translation: we couldn't sell enough of this turkey to cover the marketing literature. Rocky -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Saturday, October 31, 2009 7:14 AM To: Access Developers discussion and problem solving Subject: [AccessD] MS Accounting discontinued http://blog.seattlepi.com/microsoft/archives/183698.asp That is a rather large application. I LOVE this: After evaluating the product over the past few years Microsoft determined that other Microsoft offerings such as free templates in the Office system used with Excel and the Dynamics product are able to meet our customers' needs. The Office Small Business web site has links to free templates for small businesses, such as invoices, expenses, time sheets, budgets and more and Microsoft's Small Business Center is also a great resource for small businesses. What a JOKE. Templates in Excel are the equivalent of an accounting program? It gives me GREAT CONFIDENCE in Microsoft when I see a statement like that. -- 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 Oct 31 10:03:50 2009 From: jwcolby at colbyconsulting.com (jwcolby) Date: Sat, 31 Oct 2009 11:03:50 -0400 Subject: [AccessD] MS Accounting discontinued In-Reply-To: References: <4AEC4612.7020500@colbyconsulting.com> Message-ID: <4AEC51D6.5070605@colbyconsulting.com> Translation, we couldn't market it effectively. Have you ever used Quicken? Designed in DOS and endlessly ported / upgraded, it is a mess. But it is the leader for small business. One would logically think that ANYTHING that is real and modern could gain a toehold but it would require serious marketing effort. John W. Colby www.ColbyConsulting.com Rocky Smolin wrote: > Translation: we couldn't sell enough of this turkey to cover the marketing > literature. > > Rocky > > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby > Sent: Saturday, October 31, 2009 7:14 AM > To: Access Developers discussion and problem solving > Subject: [AccessD] MS Accounting discontinued > > http://blog.seattlepi.com/microsoft/archives/183698.asp > > That is a rather large application. I LOVE this: > > After evaluating the product over the past few years Microsoft determined > that other Microsoft offerings such as free templates in the Office system > used with Excel and the Dynamics product are able to meet our customers' > needs. The Office Small Business web site has links to free templates for > small businesses, such as invoices, expenses, time sheets, budgets and more > and Microsoft's Small Business Center is also a great resource for small > businesses. > > What a JOKE. Templates in Excel are the equivalent of an accounting > program? It gives me GREAT CONFIDENCE in Microsoft when I see a statement > like that. > > -- > 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 Gustav at cactus.dk Sat Oct 31 11:04:22 2009 From: Gustav at cactus.dk (Gustav Brock) Date: Sat, 31 Oct 2009 17:04:22 +0100 Subject: [AccessD] MS Accounting discontinued Message-ID: Hi John Or you could turn it around: If MS regards the features of Office Accounting to not surpass those of templates for Word and Excel, I would certainly cease the product at the soonest. But you are right. Who are those people writing such nonsense, and what do they think about the customers that have used the application for years? /gustav >>> jwcolby at colbyconsulting.com 31-10-2009 15:13 >>> http://blog.seattlepi.com/microsoft/archives/183698.asp That is a rather large application. I LOVE this: After evaluating the product over the past few years Microsoft determined that other Microsoft offerings such as free templates in the Office system used with Excel and the Dynamics product are able to meet our customers' needs. The Office Small Business web site has links to free templates for small businesses, such as invoices, expenses, time sheets, budgets and more and Microsoft's Small Business Center is also a great resource for small businesses. What a JOKE. Templates in Excel are the equivalent of an accounting program? It gives me GREAT CONFIDENCE in Microsoft when I see a statement like that. -- John W. Colby www.ColbyConsulting.com From john at winhaven.net Sat Oct 31 11:41:30 2009 From: john at winhaven.net (John Bartow) Date: Sat, 31 Oct 2009 11:41:30 -0500 Subject: [AccessD] MS Accounting discontinued In-Reply-To: <4AEC4612.7020500@colbyconsulting.com> References: <4AEC4612.7020500@colbyconsulting.com> Message-ID: <017701ca5a48$ffa18100$fee48300$@net> Thanks for posting this. I'm so fed up with the latest QuickBooks Pro "upgrade" that I had installed Office Accounting Pro and was going to try it out as a replacement. -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Saturday, October 31, 2009 9:14 AM To: Access Developers discussion and problem solving Subject: [AccessD] MS Accounting discontinued http://blog.seattlepi.com/microsoft/archives/183698.asp That is a rather large application. I LOVE this: After evaluating the product over the past few years Microsoft determined that other Microsoft offerings such as free templates in the Office system used with Excel and the Dynamics product are able to meet our customers' needs. The Office Small Business web site has links to free templates for small businesses, such as invoices, expenses, time sheets, budgets and more and Microsoft's Small Business Center is also a great resource for small businesses. What a JOKE. Templates in Excel are the equivalent of an accounting program? It gives me GREAT CONFIDENCE in Microsoft when I see a statement like that. -- 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 john at winhaven.net Sat Oct 31 11:41:30 2009 From: john at winhaven.net (John Bartow) Date: Sat, 31 Oct 2009 11:41:30 -0500 Subject: [AccessD] very quiet this Friday In-Reply-To: <4AEB6FB8.2890.E0D1FAA@stuart.lexacorp.com.pg> References: <29f585dd0910251339u735bd228vb5548bc729c0d6dc@mail.gmail.com>, , <4AEB6FB8.2890.E0D1FAA@stuart.lexacorp.com.pg> Message-ID: <017b01ca5a48$ffe45660$ffad0320$@net> No merkin involved but the rest is correct! -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Stuart McLachlan Sent: Friday, October 30, 2009 5:59 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] very quiet this Friday All you 'merkins are probably too busy preparing to celebrate the christian Eve of All Saint's Day with a range of pagan antics. :-) -- Stuart On 30 Oct 2009 at 17:50, Jack and Pat wrote: > Haven't received anything all day???? > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From iggy at nanaimo.ark.com Sat Oct 31 07:58:13 2009 From: iggy at nanaimo.ark.com (Tony Septav) Date: Sat, 31 Oct 2009 04:58:13 -0800 Subject: [AccessD] MS Accounting discontinued In-Reply-To: <4AEC4612.7020500@colbyconsulting.com> References: <4AEC4612.7020500@colbyconsulting.com> Message-ID: <4AEC3465.3000304@nanaimo.ark.com> Ah My Wee Creatures It is called (as I have said in the past), marketing, marketing, marketing. Very slick to the casual user. jwcolby wrote: >http://blog.seattlepi.com/microsoft/archives/183698.asp > >That is a rather large application. I LOVE this: > >After evaluating the product over the past few years Microsoft determined that other Microsoft >offerings such as free templates in the Office system used with Excel and the Dynamics product are >able to meet our customers' needs. The Office Small Business web site has links to free templates >for small businesses, such as invoices, expenses, time sheets, budgets and more and Microsoft's >Small Business Center is also a great resource for small businesses. > >What a JOKE. Templates in Excel are the equivalent of an accounting program? It gives me GREAT >CONFIDENCE in Microsoft when I see a statement like that. > > > From max.wanadoo at gmail.com Sat Oct 31 15:26:20 2009 From: max.wanadoo at gmail.com (Max Wanadoo) Date: Sat, 31 Oct 2009 20:26:20 -0000 Subject: [AccessD] MS Accounting discontinued In-Reply-To: <017701ca5a48$ffa18100$fee48300$@net> References: <4AEC4612.7020500@colbyconsulting.com> <017701ca5a48$ffa18100$fee48300$@net> Message-ID: <4aec9d77.0702d00a.22fb.fffff43c@mx.google.com> I have posted this before, but here goes again. I have been using Acemoney for about 10 years. It is simply fantastic. It does not do Invoices, but for the few I need, I use MS Templates. For everything else, it meets my needs perfectly. Support is outstanding and regular updates shows how it just keeps getting better and better. Download QIF etc files from your online bank and it auto updates. Same with shares etc. Multi-language etc. It just goes on and on... Give it a whirl. Single A/c version is free. Multi-A/c version is chargeable but very cheap. http://www.mechcad.net/products/acemoney/ Just had a quick look and there is a sale of at $30 USD. http://www.mechcad.net/products/acemoney/order.shtml Max -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of John Bartow Sent: 31 October 2009 16:42 To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] MS Accounting discontinued Thanks for posting this. I'm so fed up with the latest QuickBooks Pro "upgrade" that I had installed Office Accounting Pro and was going to try it out as a replacement. -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Saturday, October 31, 2009 9:14 AM To: Access Developers discussion and problem solving Subject: [AccessD] MS Accounting discontinued http://blog.seattlepi.com/microsoft/archives/183698.asp That is a rather large application. I LOVE this: After evaluating the product over the past few years Microsoft determined that other Microsoft offerings such as free templates in the Office system used with Excel and the Dynamics product are able to meet our customers' needs. The Office Small Business web site has links to free templates for small businesses, such as invoices, expenses, time sheets, budgets and more and Microsoft's Small Business Center is also a great resource for small businesses. What a JOKE. Templates in Excel are the equivalent of an accounting program? It gives me GREAT CONFIDENCE in Microsoft when I see a statement like that. -- 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 john at winhaven.net Sat Oct 31 15:34:03 2009 From: john at winhaven.net (John Bartow) Date: Sat, 31 Oct 2009 15:34:03 -0500 Subject: [AccessD] MS Accounting discontinued In-Reply-To: <4aec9d77.0702d00a.22fb.fffff43c@mx.google.com> References: <4AEC4612.7020500@colbyconsulting.com> <017701ca5a48$ffa18100$fee48300$@net> <4aec9d77.0702d00a.22fb.fffff43c@mx.google.com> Message-ID: <007601ca5a69$7c4df470$74e9dd50$@net> I use mine to manage my business. I do a lot of invoices which are generated from time recording, expense and purchased items per job. I also use it to do estimates, taxes, credit card and much more. Does Acemoney do that? -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Max Wanadoo Sent: Saturday, October 31, 2009 3:26 PM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] MS Accounting discontinued I have posted this before, but here goes again. I have been using Acemoney for about 10 years. It is simply fantastic. It does not do Invoices, but for the few I need, I use MS Templates. For everything else, it meets my needs perfectly. Support is outstanding and regular updates shows how it just keeps getting better and better. Download QIF etc files from your online bank and it auto updates. Same with shares etc. Multi-language etc. It just goes on and on... Give it a whirl. Single A/c version is free. Multi-A/c version is chargeable but very cheap. http://www.mechcad.net/products/acemoney/ Just had a quick look and there is a sale of at $30 USD. http://www.mechcad.net/products/acemoney/order.shtml Max -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of John Bartow Sent: 31 October 2009 16:42 To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] MS Accounting discontinued Thanks for posting this. I'm so fed up with the latest QuickBooks Pro "upgrade" that I had installed Office Accounting Pro and was going to try it out as a replacement. -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Saturday, October 31, 2009 9:14 AM To: Access Developers discussion and problem solving Subject: [AccessD] MS Accounting discontinued http://blog.seattlepi.com/microsoft/archives/183698.asp That is a rather large application. I LOVE this: After evaluating the product over the past few years Microsoft determined that other Microsoft offerings such as free templates in the Office system used with Excel and the Dynamics product are able to meet our customers' needs. The Office Small Business web site has links to free templates for small businesses, such as invoices, expenses, time sheets, budgets and more and Microsoft's Small Business Center is also a great resource for small businesses. What a JOKE. Templates in Excel are the equivalent of an accounting program? It gives me GREAT CONFIDENCE in Microsoft when I see a statement like that. -- 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 max.wanadoo at gmail.com Sat Oct 31 15:44:53 2009 From: max.wanadoo at gmail.com (Max Wanadoo) Date: Sat, 31 Oct 2009 20:44:53 -0000 Subject: [AccessD] MS Accounting discontinued In-Reply-To: <007601ca5a69$7c4df470$74e9dd50$@net> References: <4AEC4612.7020500@colbyconsulting.com> <017701ca5a48$ffa18100$fee48300$@net> <4aec9d77.0702d00a.22fb.fffff43c@mx.google.com> <007601ca5a69$7c4df470$74e9dd50$@net> Message-ID: <4aeca1cf.1818d00a.5f45.4cf8@mx.google.com> No idea. Check it out. If, for example, I was doing time recording and it was not handled in my accounts package then I would do that part in Access, export as a QIC/QIF and import it into Acemoney. Max -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of John Bartow Sent: 31 October 2009 20:34 To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] MS Accounting discontinued I use mine to manage my business. I do a lot of invoices which are generated from time recording, expense and purchased items per job. I also use it to do estimates, taxes, credit card and much more. Does Acemoney do that? -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Max Wanadoo Sent: Saturday, October 31, 2009 3:26 PM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] MS Accounting discontinued I have posted this before, but here goes again. I have been using Acemoney for about 10 years. It is simply fantastic. It does not do Invoices, but for the few I need, I use MS Templates. For everything else, it meets my needs perfectly. Support is outstanding and regular updates shows how it just keeps getting better and better. Download QIF etc files from your online bank and it auto updates. Same with shares etc. Multi-language etc. It just goes on and on... Give it a whirl. Single A/c version is free. Multi-A/c version is chargeable but very cheap. http://www.mechcad.net/products/acemoney/ Just had a quick look and there is a sale of at $30 USD. http://www.mechcad.net/products/acemoney/order.shtml Max -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of John Bartow Sent: 31 October 2009 16:42 To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] MS Accounting discontinued Thanks for posting this. I'm so fed up with the latest QuickBooks Pro "upgrade" that I had installed Office Accounting Pro and was going to try it out as a replacement. -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Saturday, October 31, 2009 9:14 AM To: Access Developers discussion and problem solving Subject: [AccessD] MS Accounting discontinued http://blog.seattlepi.com/microsoft/archives/183698.asp That is a rather large application. I LOVE this: After evaluating the product over the past few years Microsoft determined that other Microsoft offerings such as free templates in the Office system used with Excel and the Dynamics product are able to meet our customers' needs. The Office Small Business web site has links to free templates for small businesses, such as invoices, expenses, time sheets, budgets and more and Microsoft's Small Business Center is also a great resource for small businesses. What a JOKE. Templates in Excel are the equivalent of an accounting program? It gives me GREAT CONFIDENCE in Microsoft when I see a statement like that. -- 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 marksimms at verizon.net Sat Oct 31 17:11:16 2009 From: marksimms at verizon.net (Mark Simms) Date: Sat, 31 Oct 2009 18:11:16 -0400 Subject: [AccessD] MS Accounting discontinued In-Reply-To: <4aeca1cf.1818d00a.5f45.4cf8@mx.google.com> References: <4AEC4612.7020500@colbyconsulting.com> <017701ca5a48$ffa18100$fee48300$@net> <4aec9d77.0702d00a.22fb.fffff43c@mx.google.com> <007601ca5a69$7c4df470$74e9dd50$@net> <4aeca1cf.1818d00a.5f45.4cf8@mx.google.com> Message-ID: <009701ca5a77$110579a0$0501a8c0@MSIMMSWS> Did anyone attempt to build a generalized accounting system based on Access ? I am sure there were several niche-specific ones created. From jwcolby at colbyconsulting.com Sat Oct 31 17:29:04 2009 From: jwcolby at colbyconsulting.com (jwcolby) Date: Sat, 31 Oct 2009 18:29:04 -0400 Subject: [AccessD] MS Accounting discontinued In-Reply-To: <017701ca5a48$ffa18100$fee48300$@net> References: <4AEC4612.7020500@colbyconsulting.com> <017701ca5a48$ffa18100$fee48300$@net> Message-ID: <4AECBA30.8000203@colbyconsulting.com> And now there is no alternative to Quickbooks. Sigh. John W. Colby www.ColbyConsulting.com John Bartow wrote: > Thanks for posting this. I'm so fed up with the latest QuickBooks Pro > "upgrade" that I had installed Office Accounting Pro and was going to try it > out as a replacement. > > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby > Sent: Saturday, October 31, 2009 9:14 AM > To: Access Developers discussion and problem solving > Subject: [AccessD] MS Accounting discontinued > > http://blog.seattlepi.com/microsoft/archives/183698.asp > > That is a rather large application. I LOVE this: > > After evaluating the product over the past few years Microsoft determined > that other Microsoft > offerings such as free templates in the Office system used with Excel and > the Dynamics product are > able to meet our customers' needs. The Office Small Business web site has > links to free templates > for small businesses, such as invoices, expenses, time sheets, budgets and > more and Microsoft's > Small Business Center is also a great resource for small businesses. > > What a JOKE. Templates in Excel are the equivalent of an accounting > program? It gives me GREAT > CONFIDENCE in Microsoft when I see a statement like that. > From jwcolby at colbyconsulting.com Sat Oct 31 17:32:15 2009 From: jwcolby at colbyconsulting.com (jwcolby) Date: Sat, 31 Oct 2009 18:32:15 -0400 Subject: [AccessD] MS Accounting discontinued In-Reply-To: <009701ca5a77$110579a0$0501a8c0@MSIMMSWS> References: <4AEC4612.7020500@colbyconsulting.com> <017701ca5a48$ffa18100$fee48300$@net> <4aec9d77.0702d00a.22fb.fffff43c@mx.google.com> <007601ca5a69$7c4df470$74e9dd50$@net> <4aeca1cf.1818d00a.5f45.4cf8@mx.google.com> <009701ca5a77$110579a0$0501a8c0@MSIMMSWS> Message-ID: <4AECBAEF.9000500@colbyconsulting.com> There is "I! can! manage! my! business! (with this piece of junk access database)". I looked at and didn't know whether to laugh or cry. Now you can pay $1000 for the entry level version of that. Sigh. John W. Colby www.ColbyConsulting.com Mark Simms wrote: > Did anyone attempt to build a generalized accounting system based on Access > ? > I am sure there were several niche-specific ones created. > > > From max.wanadoo at gmail.com Sat Oct 31 17:39:20 2009 From: max.wanadoo at gmail.com (Max Wanadoo) Date: Sat, 31 Oct 2009 22:39:20 -0000 Subject: [AccessD] MS Accounting discontinued In-Reply-To: <4AECBA30.8000203@colbyconsulting.com> References: <4AEC4612.7020500@colbyconsulting.com> <017701ca5a48$ffa18100$fee48300$@net> <4AECBA30.8000203@colbyconsulting.com> Message-ID: <4aecbca1.0506d00a.191f.4da9@mx.google.com> Who says so? http://www.simplybooks.net/ written in Access. I bought a copy some years back. Max -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: 31 October 2009 22:29 To: Access Developers discussion and problem solving Subject: Re: [AccessD] MS Accounting discontinued And now there is no alternative to Quickbooks. Sigh. John W. Colby www.ColbyConsulting.com John Bartow wrote: > Thanks for posting this. I'm so fed up with the latest QuickBooks Pro > "upgrade" that I had installed Office Accounting Pro and was going to try it > out as a replacement. > > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby > Sent: Saturday, October 31, 2009 9:14 AM > To: Access Developers discussion and problem solving > Subject: [AccessD] MS Accounting discontinued > > http://blog.seattlepi.com/microsoft/archives/183698.asp > > That is a rather large application. I LOVE this: > > After evaluating the product over the past few years Microsoft determined > that other Microsoft > offerings such as free templates in the Office system used with Excel and > the Dynamics product are > able to meet our customers' needs. The Office Small Business web site has > links to free templates > for small businesses, such as invoices, expenses, time sheets, budgets and > more and Microsoft's > Small Business Center is also a great resource for small businesses. > > What a JOKE. Templates in Excel are the equivalent of an accounting > program? It gives me GREAT > CONFIDENCE in Microsoft when I see a statement like that. > -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From Gustav at cactus.dk Sat Oct 31 17:48:35 2009 From: Gustav at cactus.dk (Gustav Brock) Date: Sat, 31 Oct 2009 23:48:35 +0100 Subject: [AccessD] MS Accounting discontinued Message-ID: Hi Mark We did. A time billing and financial system highly specialized and targeted at advertising agencies, consultancy, and TV/movie production. But for the last five/seven years or so we have only done maintenance - the new version will be in .Net. It's not a boxed product. We only supply it as part of a turnkey solution - where we can establish full accounting for such clients in two days if needed. /gustav >>> marksimms at verizon.net 31-10-2009 23:11 >>> Did anyone attempt to build a generalized accounting system based on Access ? I am sure there were several niche-specific ones created. From john at winhaven.net Sat Oct 31 18:11:47 2009 From: john at winhaven.net (John Bartow) Date: Sat, 31 Oct 2009 18:11:47 -0500 Subject: [AccessD] MS Accounting discontinued In-Reply-To: <4AECBA30.8000203@colbyconsulting.com> References: <4AEC4612.7020500@colbyconsulting.com> <017701ca5a48$ffa18100$fee48300$@net> <4AECBA30.8000203@colbyconsulting.com> Message-ID: <009001ca5a7f$853dd990$8fb98cb0$@net> Peachtree Accounting is still around aren't they? -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Saturday, October 31, 2009 5:29 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] MS Accounting discontinued And now there is no alternative to Quickbooks. Sigh. John W. Colby www.ColbyConsulting.com John Bartow wrote: > Thanks for posting this. I'm so fed up with the latest QuickBooks Pro > "upgrade" that I had installed Office Accounting Pro and was going to try it > out as a replacement. > > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby > Sent: Saturday, October 31, 2009 9:14 AM > To: Access Developers discussion and problem solving > Subject: [AccessD] MS Accounting discontinued > > http://blog.seattlepi.com/microsoft/archives/183698.asp > > That is a rather large application. I LOVE this: > > After evaluating the product over the past few years Microsoft determined > that other Microsoft > offerings such as free templates in the Office system used with Excel and > the Dynamics product are > able to meet our customers' needs. The Office Small Business web site has > links to free templates > for small businesses, such as invoices, expenses, time sheets, budgets and > more and Microsoft's > Small Business Center is also a great resource for small businesses. > > What a JOKE. Templates in Excel are the equivalent of an accounting > program? It gives me GREAT > CONFIDENCE in Microsoft when I see a statement like that. > -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From dwaters at usinternet.com Sat Oct 31 22:31:41 2009 From: dwaters at usinternet.com (Dan Waters) Date: Sat, 31 Oct 2009 22:31:41 -0500 Subject: [AccessD] MS Accounting discontinued In-Reply-To: <009001ca5a7f$853dd990$8fb98cb0$@net> References: <4AEC4612.7020500@colbyconsulting.com> <017701ca5a48$ffa18100$fee48300$@net><4AECBA30.8000203@colbyconsulting.com> <009001ca5a7f$853dd990$8fb98cb0$@net> Message-ID: Yes - Peachtree is available in several versions. http://www.amazon.com/gp/bestsellers/software/283001/ref=pd_zg_hrsr_sw_1_4_l ast Dan -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of John Bartow Sent: Saturday, October 31, 2009 6:12 PM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] MS Accounting discontinued Peachtree Accounting is still around aren't they? -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Saturday, October 31, 2009 5:29 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] MS Accounting discontinued And now there is no alternative to Quickbooks. Sigh. John W. Colby www.ColbyConsulting.com John Bartow wrote: > Thanks for posting this. I'm so fed up with the latest QuickBooks Pro > "upgrade" that I had installed Office Accounting Pro and was going to > try it > out as a replacement. > > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby > Sent: Saturday, October 31, 2009 9:14 AM > To: Access Developers discussion and problem solving > Subject: [AccessD] MS Accounting discontinued > > http://blog.seattlepi.com/microsoft/archives/183698.asp > > That is a rather large application. I LOVE this: > > After evaluating the product over the past few years Microsoft > determined that other Microsoft offerings such as free templates in > the Office system used with Excel and the Dynamics product are able to > meet our customers' needs. The Office Small Business web site has > links to free templates for small businesses, such as invoices, > expenses, time sheets, budgets and more and Microsoft's Small Business > Center is also a great resource for small businesses. > > What a JOKE. Templates in Excel are the equivalent of an accounting > program? It gives me GREAT CONFIDENCE in Microsoft when I see a > statement like that. > -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From stuart at lexacorp.com.pg Sat Oct 31 23:35:56 2009 From: stuart at lexacorp.com.pg (Stuart McLachlan) Date: Sun, 01 Nov 2009 14:35:56 +1000 Subject: [AccessD] MS Accounting discontinued In-Reply-To: <4AECBA30.8000203@colbyconsulting.com> References: <4AEC4612.7020500@colbyconsulting.com>, <017701ca5a48$ffa18100$fee48300$@net>, <4AECBA30.8000203@colbyconsulting.com> Message-ID: <4AED102C.28345.1467E96F@stuart.lexacorp.com.pg> MYOB? It's by far the most popular small business accounting system in this part of the world - much more widely used than Quickbooks. -- Stuart On 31 Oct 2009 at 18:29, jwcolby wrote: > And now there is no alternative to Quickbooks. > > Sigh. > > John W. Colby > www.ColbyConsulting.com > > > John Bartow wrote: > > Thanks for posting this. I'm so fed up with the latest QuickBooks Pro > > "upgrade" that I had installed Office Accounting Pro and was going to try it > > out as a replacement. > > > > > > -----Original Message----- > > From: accessd-bounces at databaseadvisors.com > > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby > > Sent: Saturday, October 31, 2009 9:14 AM > > To: Access Developers discussion and problem solving > > Subject: [AccessD] MS Accounting discontinued > > > > http://blog.seattlepi.com/microsoft/archives/183698.asp > > > > That is a rather large application. I LOVE this: > > > > After evaluating the product over the past few years Microsoft determined > > that other Microsoft > > offerings such as free templates in the Office system used with Excel and > > the Dynamics product are > > able to meet our customers' needs. The Office Small Business web site has > > links to free templates > > for small businesses, such as invoices, expenses, time sheets, budgets and > > more and Microsoft's > > Small Business Center is also a great resource for small businesses. > > > > What a JOKE. Templates in Excel are the equivalent of an accounting > > program? It gives me GREAT > > CONFIDENCE in Microsoft when I see a statement like that. > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com