Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. Kotaro24

    Moving cursor inside open TEXT file

    If you can't load the document into a table, and the text file is too big to load into memory, you could also use the Binary form of Line Input. You can then move anywhere in the file, but you will have to find end-of-line markers (vbCrLf) using instr(), etc. Something like this: Public...
  2. Kotaro24

    Save or saveas a back-up copy of working database

    It's possible, you just have to open another thread to do it. Here's one way: Dim strDOScmd As String strDOScmd = "COPY " & Chr(34) & CurrentDb.Name & Chr(34) & " " & Chr(34) & "C:\DESTINATION_PATH\Test.mdb" & Chr(34) Shell "C:\Windows\System32\Cmd.exe /C " & strDOScmd, vbHide ' Use...
  3. Kotaro24

    File copy (while .mdb is open

    I'd have bet money you were wrong saying that code doesn't work. Of course, you were correct! It won't let you do that. Drop the following code into a Module. It WILL work. Function BackMeUp() Dim SourceFile, DestinationFile Dim DB As Database Dim CHNL As Integer Set DB = Currentdb...
  4. Kotaro24

    Automating a MailMerge

    I use this code module, which is modified from a MS KB article. Hands-free. Option Compare Database Option Explicit 'Version 1.1(1) 'From Access '97 KB Article Q159328 'REQUIRES: LibCommonFunctions, LibFileFunctions, ' Reference to Microsoft Word 8.0 Object Library (MSWord8.olb) '...
  5. Kotaro24

    Easy question, hopefully?

    Public Function DisableAllControls(ByRef iForm As Form, Optional ByVal iExcludeControl As String) As Boolean Dim Ctl As Control On Error Resume Next For Each Ctl In iForm.Controls If Ctl.Name <> iExcludeControl Then Ctl.Enabled = False End If Next 'Ctl DoEvents End Function
  6. Kotaro24

    Help&amp; support wont work on xp, Need help with vdscript file!

    It should always be available in Windows 2000 Pro and Windows XP (unless the service has been disabled). It's loaded when you upgrade Internet Explorer to 5.5 or 6. If you are running Windows 95, you can download Windows Script Host 5.6 from the Microsoft Windows Script Technologies Web site...
  7. Kotaro24

    Auto-update an Access front-end..

    You could use the ShellExecute API call to avoid the batch file, but it's really no more efficient. 1) Old_App Startup sees a new version, copies it to local PC with a different name. 2) Old_App Uses Shell_Execute to run New_App, then immediately shuts down. 3) New_App looks at its own name...
  8. Kotaro24

    How can I set the FROM address in an Access email send?

    I've just finished researching this topic. Here's the links I came up with: '### SOURCES: www.freeaccess.de/downloaddetails.asp?id=19 'Example in MailDBNeu.mdb '### www.AllAPI.net 'API Descriptions for wsock32.dll '### www.granite.ab.ca/access/email.htm 'Tony...
  9. Kotaro24

    Help&amp; support wont work on xp, Need help with vdscript file!

    You should be able to paste this code into a text file, then rename the text file to have a .vbs extension, then double-click the file's icon to run it. If it worked, you'll get a message box saying &quot;This VB Script has repaired the damage done&quot;.
  10. Kotaro24

    Access to Word Merge Process

    I have a similar App. I checked to see if I have the same problem, and I probably do, but it doesn't show because I prompt for the printer before doing the mailmerge, and immediately print the merged document (the user doesn't have to do any editing of the merged document, so I can print it...
  11. Kotaro24

    Pausing a script

    I don't think you can trap a keystroke in VBScript (by definition, the only inputs you have to the script are MsgBox and InputBox. I assume you don't want a box to popup every minute saying &quot;Continue (Y/N)?&quot;). You could invoke a pause by reading from an object that has this feature...
  12. Kotaro24

    Maximizing a Window

    in your script, try objAccess.DoCmd.Maximize (for at least Access97).
  13. Kotaro24

    Displaying Project Version Number on a Form

    Somebody will probably beat me to it, but here's an example: Me.Caption = &quot;Version &quot; & App.Major & &quot;.&quot; & App.Minor & &quot;(&quot; & App.Revision & &quot;)&quot;
  14. Kotaro24

    access.report User Type not defined

    You probably need a reference set for Microsoft Access. Go into (and I'm guessing VB6 here) Project>References and choose 'Microsoft Access x.0 library' (x will be a number representing your current version of Access). Incidentally, both your PC and the PC(s) you run the program on will have to...
  15. Kotaro24

    VBS Script - Paste into Notepad

    Assuming you don't have MS-Word ;) Reading from the Clipboard: There's a clipboard object in Internet Explorer that should be usable. Something like: Set oHtml = CreateObject(&quot;htmlfile&quot;) sClipText = oHtml.ParentWindow.ClipboardData.GetData(&quot;text&quot;) WScript.Echo sClipText...
  16. Kotaro24

    Database Needs to be Repaired

    This happens for several reasons. The most common are those your help desk folks gave, i.e., somebody is not leaving MS-Access in a controlled manner. This includes flipping the power switch of your PC without exiting Access, and/or exiting a remote session (using Terminal Server or Citrix)...
  17. Kotaro24

    Text import

    Oh, and you'd need a line that says: rs!TempFileName = rs!TempFileName & Str under the comment 'Do your second line's data manipulation here
  18. Kotaro24

    Text import

    Assuming that there's always 2 lines, you would not perform an rs.Update after setting the first line's fields. Move the 'rs.Update' statement to just before the 'FirstLine=False' statement. (In other words, leave the new record un-updated until you've done a line input of the second line, and...
  19. Kotaro24

    Text import

    Definitely achievable. You code should look something like this: Dim CHNL As Integer Dim FirstLineRead as Boolean 'Read Input File, convert the data to an Access Table CHNL = FreeFile Open iPathAndFileName For Input As #CHNL Line Input #CHNL, str Do str=trim(str)...
  20. Kotaro24

    Set a reference programatically

    'Access.References' My bad. OK, to get a handle on that you'll have to use automation to open another copy of Access, something like: Dim AccApp As Access.Application Set AccApp = CreateObject(&quot;Access.Application.8&quot;) AccApp.OpenCurrentDatabase FilenameAndPath$ then you'll...

Part and Inventory Search

Back
Top