Results 1 to 9 of 9

Thread: Access Help?

  1. #1
    Senior Member
    Join Date
    Dec 2009
    Location
    MN
    Posts
    220

    Default Access Help?

    I am making a reporting database at work, and am having a hang up with one issue.

    I have a button that runs several macros; deleting, creating, and appending tables. It is the standard even, on click to run the macros in order. This is multi user report tool ,that will need to be updated, with the new data. I would like to add a line of code? that when the button is clicked to basically timestamp a text field to mark it as when it was updated.

    I was thinking coding something like:

    on.click "text field" = Now()

    The next issue i am having is updating my sales data into tables, The macros, create "master" lists for the customers, for products ordered and sold. I have the UPCs as the reference field, but I also have several customers, so its a 4 digit corp code, then a 12 digit UPC.

    I have sales data as column headers, IE current weeks sales, last weeks sales, 5 weeks ago, lifetime dollars, etc.

    I would like to update the table with any data that is not 0 or null. I would have to run several, queries to update all the customers, but I can import the data, and have several macros.

    I hope I am being clear enough, to get some help.


    Let me remind you I am 100% self taught, and not a programmer in any capacity, this is way out side of my skill.


    Thanks,

    Trany

  2. #2
    Senior Member
    Join Date
    Dec 2009
    Location
    MN
    Posts
    220

    Default

    OK, thanks for no help, but it took me 4 hours and I figured it out. Now in playing in the VBA stuff, if I mess something up its going to explode, and a small African nation will die.

    I need to be able to call the modified date of the Access object for some date arithmetic. I believe I can do this with an API command, but I am looking to be able to set a range, where I cannot update the field.

    I will also state that I work with people who will fuck this up on epic proportions if I don't create fail safes in the beginning.

    Thanks in advance,

    Trany

  3. #3
    Senior Member Naya's Avatar
    Join Date
    Dec 2009
    Location
    Minnesota
    Posts
    133

    Default

    You can't use a GetDate() function? I'm not big on VB, but I'm getting better with my SQL every week ...

  4. #4
    Senior Member
    Join Date
    Dec 2009
    Location
    MN
    Posts
    220

    Default

    I can, sort of. I want to call out for the last modified date, I don't think access really likes to referance its own files. So I might just write some code to export the file, and if its in range x-y then not update it. in and out with data.

  5. #5
    Senior Member Naya's Avatar
    Join Date
    Dec 2009
    Location
    Minnesota
    Posts
    133

    Default

    Access is kinda stupid that way; its not meant for large databases and isn't a very robust piece of software. Its nice for simple data storage and reporting back on that data, but forget trying to do something constructive with any of it.

    I'd export to Excel and see if you can write something in VB to pull a date range with a time stamp. I wish I could write some code to give you an example, but its been about a year since I was in a VB class and so I haven't used it since.

  6. #6
    Administrator Klaus's Avatar
    Join Date
    Dec 2009
    Location
    Minnesota
    Posts
    2,188

    Default

    Trany I asked Michelle last night and her brother Jim knows access and sql really well.

  7. #7
    Moderator
    Join Date
    Dec 2009
    Location
    Minnesota
    Posts
    75

    Default

    I can probably help you Trany. Find me online. I just had to write some queries in access this week that export to excel based on a start and end date you type in. I am sure I can figure out your timestamp stuff. As long as your data has a time or date field, we can have it export a range. I dont care whether it exports to another access table or excel.

  8. #8
    Senior Member
    Join Date
    Dec 2009
    Location
    MN
    Posts
    220

    Default

    I solved it it was a mapped network drive namming issue. Now I want to know if it is possible to bind Ctrl+P in access VBA.

  9. #9
    Senior Member
    Join Date
    Dec 2009
    Location
    MN
    Posts
    220

    Default VBA code help.

    I am trying to paste several ranges into a word doc from excel.

    here is a snipit of code:

    Code:
    Range("A71:D87").Select
        With Selection
              Selection.Copy
                    wrdDoc.Range.Paste
                    End With
      
        Range("A90:D106").Select
        With Selection
              Selection.Copy
                    wrdDoc.Range.Paste
                    End With
    It pastes to word but every range that is copied is pasted over the prior.

Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •