{"id":2332,"date":"2014-12-18T20:02:52","date_gmt":"2014-12-18T20:02:52","guid":{"rendered":"https:\/\/alt2.minisoft.com\/support\/?p=2332"},"modified":"2014-12-18T20:02:57","modified_gmt":"2014-12-18T20:02:57","slug":"using-msaccess-97-to-change-or-add-data-with-minisofts-odbc-driver","status":"publish","type":"post","link":"https:\/\/c002.minisoft.com\/support\/using-msaccess-97-to-change-or-add-data-with-minisofts-odbc-driver\/","title":{"rendered":"Using MSAccess 97 to Change or Add Data with Minisoft&#8217;s ODBC Driver"},"content":{"rendered":"<p>&nbsp;<\/p>\n<p>Using MSAccess 97<\/p>\n<p>1. Create an updateable DSN in the 32bit ODBC Administrator.<\/p>\n<p>2. Use an Open Mode that allows modification of the database.<\/p>\n<p>3. Use a Password that grants write access.<\/p>\n<p>4. Follow the instructions to create links in MSAccess.<\/p>\n<p>When you see the Select Unique Record Identifier dialog box, you MUST select a field or combination of fields that contain data that makes each record unique in the dataset.<\/p>\n<p>You can now create Update, Add, or Delete information in your Image Database.<\/p>\n<p>NOTES<\/p>\n<p>If you select Open or double clink on the dataset listed in the Tables, MSAccess will attempt to copy all of the data from the dataset to your PC. The intermediate file size is currently limited and may not store all of the dataset. If you receive a warning about the temp file size, please use a query to select a subset of your data.<br \/>\nYour changes in datasheet mode take effect when you leave the current record or when you Save Record (shift+enter).<br \/>\nMSAccess allows one level of Undo.<br \/>\nDecember 23, 1997 \/ Thomas Isaak \/ Minisoft AG<\/p>\n<p>Inserts an address from an Image database with ODBC.<br \/>\nSub InsertAddress()<\/p>\n<p>ActiveDocument.Save<\/p>\n<p>Dim CustomerNr, SQLString, SQLString1<\/p>\n<p>CustomerNr = InputBox(&#8220;Enter Customer Number&#8221;, &#8220;Insert Address&#8221;)<\/p>\n<p>If CustomerNr &lt;&gt; &#8220;&#8221; Then<\/p>\n<p>Set AdrDoc = Documents.Add<\/p>\n<p>SQLString = &#8220;SELECT CUSTOMERS.CUSTOMER_NAME, &#8220;&amp;_<br \/>\n&#8220;CUSTOMERS.ADDRESS1, CUSTOMERS.ADDRESS2,&#8221; &amp; _<br \/>\n&#8220;CUSTOMERS.CITY, CUSTOMERS.STATE, CUSTOMERS.COUNTRY &#8221;<\/p>\n<p>SQLString1 = &#8220;FROM TESTSAV3.CUSTOMERS CUSTOMERS &#8220;&amp;_<\/p>\n<p>&#8220;WHERE (CUSTOMERS.CUSTOMER_NUMBER='&#8221; &amp; CustomerNr &amp; &#8220;&#8216;)&#8221;<\/p>\n<p>AdrDoc.Range.InsertDatabase Format:=0, Style:=0, _<\/p>\n<p>LinkToSource:=False, _<\/p>\n<p>Connection:=&#8221;DSN=MSDB&#8221;, _<\/p>\n<p>SQLStatement:=SQLString, SQLStatement1:=SQLString1, _<\/p>\n<p>PasswordDocument:=&#8221;&#8221;, PasswordTemplate:=&#8221;&#8221;, _<br \/>\nWritePasswordDocument:=&#8221;&#8221;, WritePasswordTemplate:=&#8221;&#8221;, _<br \/>\nDataSource:=&#8221;&#8221;, From:=-1, To:=-1, _<br \/>\nIncludeFields:=False<\/p>\n<p>Set Table1 = AdrDoc.Tables(1)<\/p>\n<p>ReDim TabCells(Table1.Range.Cells.Count)<br \/>\ni = 1<br \/>\nFor Each TabCell In Table1.Range.Cells<br \/>\nSet CellRange = TabCell.Range<br \/>\nCellRange.MoveEnd Unit:=wdCharacter, Count:=-1<br \/>\nTabCells(i) = CellRange.Text<br \/>\ni = i + 1<br \/>\nNext TabCell<\/p>\n<p>AdrDoc.Close (wdDoNotSaveChanges)<\/p>\n<p>&#8216; Insert CUSTOMER_NAME<br \/>\nSelection.TypeParagraph<br \/>\nSelection.MoveUp Unit:=wdLine, Count:=1<br \/>\nSelection.Range.InsertBefore TabCells(1)<br \/>\nSelection.MoveDown Unit:=wdLine, Count:=1<\/p>\n<p>&#8216; Insert ADDRESS1<br \/>\nSelection.TypeParagraph<br \/>\nSelection.MoveUp Unit:=wdLine, Count:=1<br \/>\nSelection.Range.InsertBefore TabCells(2)<br \/>\nSelection.MoveDown Unit:=wdLine, Count:=1<\/p>\n<p>&#8216; Insert ADDRESS2<br \/>\nIf TabCells(3) &lt;&gt; &#8220;&#8221; Then<br \/>\nSelection.TypeParagraph<br \/>\nSelection.MoveUp Unit:=wdLine, Count:=1<br \/>\nSelection.Range.InsertBefore TabCells(3)<br \/>\nSelection.MoveDown Unit:=wdLine, Count:=1<br \/>\nEnd If<\/p>\n<p>&#8216; Insert CITY<br \/>\nSelection.TypeParagraph<br \/>\nSelection.MoveUp Unit:=wdLine, Count:=1<br \/>\nSelection.Range.InsertBefore TabCells(4)<br \/>\nSelection.MoveDown Unit:=wdLine, Count:=1<\/p>\n<p>&#8216; Insert STATE<br \/>\nSelection.TypeParagraph<br \/>\nSelection.MoveUp Unit:=wdLine, Count:=1<br \/>\nSelection.Range.InsertBefore TabCells(5)<br \/>\nSelection.MoveDown Unit:=wdLine, Count:=1<\/p>\n<p>&#8216; Insert COUNTRY<br \/>\nSelection.TypeParagraph<br \/>\nSelection.MoveUp Unit:=wdLine, Count:=1<br \/>\nSelection.Range.InsertBefore TabCells(6)<br \/>\nSelection.MoveDown Unit:=wdLine, Count:=1<\/p>\n<p>End If<\/p>\n<p>End Sub<\/p>\n","protected":false},"excerpt":{"rendered":"<p>&nbsp; Using MSAccess 97 1. Create an updateable DSN in the 32bit ODBC Administrator. 2. Use an Open Mode that allows modification of the database. 3. Use a Password that grants write access. 4. Follow the instructions to create links in MSAccess. When you see the Select Unique Record Identifier dialog box, you MUST select [&hellip;]<\/p>\n","protected":false},"author":75,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[54,63],"tags":[],"_links":{"self":[{"href":"https:\/\/c002.minisoft.com\/support\/wp-json\/wp\/v2\/posts\/2332"}],"collection":[{"href":"https:\/\/c002.minisoft.com\/support\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/c002.minisoft.com\/support\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/c002.minisoft.com\/support\/wp-json\/wp\/v2\/users\/75"}],"replies":[{"embeddable":true,"href":"https:\/\/c002.minisoft.com\/support\/wp-json\/wp\/v2\/comments?post=2332"}],"version-history":[{"count":1,"href":"https:\/\/c002.minisoft.com\/support\/wp-json\/wp\/v2\/posts\/2332\/revisions"}],"predecessor-version":[{"id":2333,"href":"https:\/\/c002.minisoft.com\/support\/wp-json\/wp\/v2\/posts\/2332\/revisions\/2333"}],"wp:attachment":[{"href":"https:\/\/c002.minisoft.com\/support\/wp-json\/wp\/v2\/media?parent=2332"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/c002.minisoft.com\/support\/wp-json\/wp\/v2\/categories?post=2332"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/c002.minisoft.com\/support\/wp-json\/wp\/v2\/tags?post=2332"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}