Search:

Type: Posts; User: scheerer

Search: Search took 0.06 seconds.

  1. Replies
    7
    Views
    46,448

    Re: Connect to Access 2007 from Excel 2007 VBA

    Sorry, not sure how to work with db that is password protected. All of mine are open.

    But this is how I usually build connection strings if not sure of the format:
    Create a new txt file
    Then...
  2. Replies
    5
    Views
    858

    Re: Dynamic Array redim Issue

    You forgot some quotes in the middle. And you need the -1 inside the ). It should be:

    MsgBox "curr_rec: " & myArray(a_count) & "Prev_rec: " & myArray(a_count-1)
  3. Replies
    7
    Views
    46,448

    Re: Connect to Access 2007 from Excel 2007 VBA

    Thanks for your help. I've got it working now. I replaced the problem line with "IIf(IsNull(num1),0,num1)" and now it works.

    Not sure why the Nz function works in regular access query, and...
  4. Replies
    7
    Views
    46,448

    Re: Connect to Access 2007 from Excel 2007 VBA

    Sorry...It is working when I just add specific columns in the select and when I add a simple Where clause. The line in my where clause that is causing the problem is the following:

    AND Nz(num1,0)...
  5. Replies
    7
    Views
    46,448

    Re: Connect to Access 2007 from Excel 2007 VBA

    Yes it does work if I change it to "Select *". However, I am actually trying to do a much more complex query...I just put something simple in the example.
    If I do "SELECT * from Positions" it...
  6. Replies
    7
    Views
    46,448

    Connect to Access 2007 from Excel 2007 VBA

    Hello
    I am trying to set up VBA code in excel to query an access database and return the results in a recordset. I have the following code but it is giving me and error on the rs.Open line.

    ...
Results 1 to 6 of 6



Click Here to Expand Forum to Full Width