User Profile

Collapse

Profile Sidebar

Collapse
MarkBStewart
MarkBStewart
Last Activity: Jun 25 '12, 07:26 PM
Joined: May 9 '10
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Error 91 - Object variable or With block variable not set

    I am running a simple excel app within Access. I am opening a new workbook, adding data, formatting the sheet ect. It works quite well the first time I run it (click event). The next time it fails with "Error 91 - Object variable or With block variable not set". Here is the first part of the code and the location where it fails on the second try:

    Private Sub CalcPercent_Cli ck()

    DELCLARATIONS:
    ...
    See more | Go to post

  • Nevermind - figure it out. Need Filesystem.Kill per the following:

    FileSystem.Kill KillFile
    See more | Go to post

    Leave a comment:


  • Why am I getting "Invalid use of property" - Access VBA "Kill"

    I am tyring to fiigure outhow to use the Kill statement in VBA. My code is below. I am getting invalid use of propery" error

    Private Sub Kill_Click()
    Dim KillFile As String
    KillFile = "c:\KILL\temp.x ls"
    SetAttr KillFile, vbNormal
    Kill KillFile
    ' Kill ("c:\KILL\temp. xls") (Tried this as well)

    End Sub

    c:\KILL\temp.xl s exists....
    See more | Go to post

  • access report displays number from drop-down vs. text

    One thing I was doing inthe report is I was gruping on the "dropdown" control. Once I removed the grouping the content appeared as expected.

    Thx
    See more | Go to post

    Leave a comment:


  • access report displays number from drop-down vs. text

    Hi Pat

    My problem is not that I want the control to be invisible. I want the content of the dropdown to appear vs. the positional number.

    To make the control invisible I could set the visible property to "Not Visible". I need the content to display vs. the positional number. Does that make sense?

    Thx
    See more | Go to post

    Leave a comment:


  • Access Report Displays Number from Drop-down vs. Text

    I am producing a report in access. I have a field in a table that is a "Look-up Column". When I add the column to a report it prints out the line-item number vs. the text. For example if I have 3 items in the lookup:
    1 Entry 1
    2 Entry 2
    3 Entry 3

    The number 3 prints out vs. "Entry 3". How do I get the content of the column to print vs. the positional number?

    Thx
    See more | Go to post

  • I am concered about this approach as it is for Access 2000. I am running 2007. This appears to be just what I need, but likely too far down-level.
    See more | Go to post

    Leave a comment:


  • I want to spawn another version/copy of Access as If I manually double-clicked on the 2nd copy of Access. Does that make it clear? What other info can I provide? thank you for your help.
    See more | Go to post

    Leave a comment:


  • Thank you for your answer. Using the methods I am using can I access the tables and forms in the external copy of Access? Thx
    See more | Go to post

    Leave a comment:


  • How to make a newly opened DB (opened via VBA) visible

    I have worked through the open syntax to open a database from VBA, but the database does not appear to actually open. Here is the code:

    Dim MyConn As ADODB.Connectio n
    Dim MyRecordSet As ADODB.Recordset

    Set MyConn = New ADODB.Connectio n
    MyConn.Connecti onString = "Provider=Micro soft.ACE.OLEDB. 12.0; Data Source=c:\Tools \Test_DB.accdb; Persist Security Info=False;"

    MyConn.Open...
    See more | Go to post
    Last edited by MarkBStewart; May 26 '10, 04:55 PM. Reason: More detail added

  • Making the new DB Visible

    Thank you removing the ' worked. I think. How do I make the new DB visible?
    See more | Go to post

    Leave a comment:


  • Next Try VBA Open

    This is the code I have now, but I am getting a format error:

    Dim MyConn As ADODB.Connectio n
    Dim MyRecSet As ADODB.Recordset
    Dim strMake As String

    Set MyConn = New ADODB.Connectio n
    MyConn.Connecti onString = "Provider=Micro soft.ACE.OLEDB. 12.0; Data Source='c:\Tool s\Test_DB.accdb ;Persist Security Info=False;"

    MyConn.Open...
    See more | Go to post
    Last edited by MarkBStewart; May 26 '10, 01:48 PM. Reason: Spelling errors

    Leave a comment:


  • Is this what you mean?

    Is this is the proper code then:

    Dim MyConn As ADODB.Connectio n
    Dim MyRecSet As ADODB.Recordset
    Dim strMake As String

    Set MyConn = New ADODB.Connectio n
    MyConn.ConnStr = "Provider=Micro soft.ACE.OLEDB. 12.0;" _
    & " Data Source='c:\Tool s\Test_DB.accdb ;Persist Security Info=False;"

    MyConn.Open...
    See more | Go to post

    Leave a comment:


  • MarkBStewart
    started a topic How to open Access Database from VBA

    How to open Access Database from VBA

    I am getting an "invalid database format" error trying to open an Access database from Access VBA. Here is the code:

    Code:
      Dim MyConn As ADODB.Connection
        Dim MyRecSet As ADODB.Recordset
        Dim strMake As String
    
        Set MyConn = New ADODB.Connection
        MyConn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source='c:\Tools\Test_DB.accdb';"
        MyConn.Open
    ...
    See more | Go to post

  • No go. I am still getting "ActiveX Componenet Cannot Create Object" message. Any ideas? Should I somehow be refering to the worksheet object in the Selection statement?
    See more | Go to post

    Leave a comment:


  • How to fix object error when creating border in excel spreadsheet

    I am trying to create borders in an excel spreadsheet programaticaly using VBA. I am getting an object error on line 2 Selection.Borde rs(xlDiagonalDo wn...


    This is my code:

    Code:
     xlWS.Range("F2:J410").Select
        Selection.Borders(xlDiagonalDown).LineStyle = xlContinuous
        Selection.Borders(xlDiagonalUp).LineStyle = xlContinuous
        With Selection.Borders(xlEdgeLeft)
            .LineStyle
    ...
    See more | Go to post

  • MarkBStewart
    replied to SQL Update
    Thanks again. I am off and running.

    Mark...
    See more | Go to post

    Leave a comment:


  • MarkBStewart
    replied to SQL Update
    strReference = A.1.1.3 (for example).

    However, I did the following and it worked:

    MySQL = "UPDATE ParsingTable SET ParsingTable.Ti er1 = " & intTier1 & ", ParsingTable.Ti er2 = " & intTier2 & ", ParsingTable.Ti er3 = " & intTier3 & ", ParsingTable.Ti er4 = " & intTier4 & ", ParsingTable.Ti er5 = " & intTier5 & " WHERE ParsingTable.do c_label...
    See more | Go to post

    Leave a comment:


  • MarkBStewart
    replied to SQL Update
    First, thank you for the help.

    Second, for the variable strReference am I to assume that it also requires "& strReference &"?

    When I left it as in your example I still recieved a prompt for input. When I used the "& strReference &" format I am receiving a error indicating I have a problem with '.' '!' or '()". Not sure where to go from here. Can you help?

    Thx...
    See more | Go to post

    Leave a comment:


  • MarkBStewart
    started a topic SQL Update

    SQL Update

    I am attempting to update a table in Access/VBA using SQL. Here is the statement:

    MySQL = "UPDATE ParsingTable SET ParsingTable.[Tier1] = intTier1, ParsingTable.[Tier2] = intTier2, ParsingTable.[Tier3] = intTier3, ParsingTable.[Tier4] = intTier4, ParsingTable.[Tier5] = intTier5 WHERE (((ParsingTable .doc_label) = strReference)); "
    DoCmd.SetWarnin gs False
    DoCmd.RunSQL MySQL
    DoCmd.SetWarnin gs...
    See more | Go to post
No activity results to display
Show More
Working...