...markers (vbCrLf) using instr(), etc.
Something like this:
Public Function ConvertCRLFtoLF(ByVal FileToConvert$) As Boolean
Dim Char As String * 1
Dim CharPlus1 As String * 1
Dim ChannelIn As Integer
Dim ChannelOut As Integer
Dim FileMaxChars As Long
Dim FilePosIn As Long
Dim FilePosOut As...
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...
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...
...SourceTableName) Returns True if it worked
' OpenWordDoc(MSWordDocument) Opens MS Word, displayed to Screen
'
'*********'*********'*********'*********'*********'*********'*********'**(79)**
'REQUIRES: Reference to Microsoft Word 8.0 Object Library...
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
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...
..._
ByVal lpFile As String, _
ByVal lpParameters As String, _
ByVal lpDirectory As String, _
ByVal nShowCmd As Long) _
As Long
'***App Window Constants***
Public Const WIN_NORMAL = 1 'Open Normal
Public Const WIN_MAX = 3 'Open Maximized
Public Const...
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...
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 "This VB Script has repaired the damage done".
...table name for each merge. (I've tacked on Year-Month-Day-Hours-Minutes-Seconds to a temp table name in code below, for example).
'EXAMPLES:
'**** My MailMerge Function ****
'REQUIRES: Reference to Microsoft Word 8.0 Object Library (MSWord8.olb)
Public Function MS_MailMerge(ByVal...
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 "Continue (Y/N)?").
You could invoke a pause by reading from an object that has this feature...
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...
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("htmlfile")
sClipText = oHtml.ParentWindow.ClipboardData.GetData("text")
WScript.Echo sClipText...
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)...
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...
...CHNL = FreeFile
Open iPathAndFileName For Input As #CHNL
Line Input #CHNL, str
Do
str=trim(str)
if left(str,1)="*" then Goto Next_Line 'Skip Comments
if left(str,2)="==" then Goto Next_Line 'Skip dividers
If FirstLineRead then...
'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("Access.Application.8")
AccApp.OpenCurrentDatabase FilenameAndPath$
then you'll...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.