Converted macro doesn't work in runtime. 
Author Message
 Converted macro doesn't work in runtime.

Hi,
This is my second posting so I hope someone can answer this.
To use error handling I converted the following macros. In order to use the
following on the toolbar I create another macro that uses runcode. In the
following it is set to run the function import(). This works fine. However,
when I make a runtime version this no longer works. However, if I make a
form with a command button with the onclick event set to
(DoCmd.TransferText acImportDelim, "import", "clients", "c:\1.txt", false,
"") it works. Any clues as to why this happens are appreciated.

Example:
function import()
     DoCmd.TransferText acImportDelim, "import", "clients", "c:\1.txt",
False, ""
     end function

I have the same problem with a macro I lifted from Northwind DB.to use as a
lastname
filter. It looks like this:
Function Last_Name_Filter_Alpha_Buttons()
On Error GoTo Last_Name_Filter_Alpha_Buttons_Err

    With CodeContextObject
        ' Attached to AfterUpdate event of CompanyNameFilter option group.
        If (.LastNameFilters = 1) Then
            ' Filter for company names that start with A, , , ?, ?, or ?.
            DoCmd.ApplyFilter "", "[LastName] Like ""[A???]*"""
        End If
        If (.LastNameFilters = 2) Then
            ' B
            DoCmd.ApplyFilter "", "[lastName] Like ""B*"""
       ..........

Thanks. Much appreciated.
Alan Schwartz



Sun, 02 Jul 2000 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Converted macro doesn't work in runtime.

2. Code converted from macro doesn't work

3. Converting to Access 2002 Code doesn't work

4. Calendar doesn't work in runtime

5. Debugger doesn't work on Macros for Word in Office XP

6. Macro doesn't work in Word2000

7. try/catch a runtime error doesn't work

8. Screen.MousePointer = vbHourglass Doesn't work at Runtime

9. Showtips property doesn't seem to work during runtime

10. Screen.MousePointer = vbHourglass Doesn't work at Runtime

11. Macro doesn't work in Word2000

12. Screen.MousePointer = vbHourglass Doesn't work at Runtime

 

 
Powered by phpBB® Forum Software