Access07: Command button to update and rerun query's


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 6 of 6

Thread: Access07: Command button to update and rerun query's

  1. #1
    Join Date
    Jun 2008
    Posts
    3

    Access07: Command button to update and rerun query's

    Im a beginner and completely new to VBA (never used it before) so please bear with me on this one Ive posted this question on other boards and no one yet knows how to tackle this problem. On this site it gives the code to do something similar but once I had unzipped it, it still would not open. I have a database that currently holds 17 projects with more to come. For example here is one project:
    -tbl Projects (this table shows all projects and summery of progress)
    -I would like to insert the command button on the form for this table
    -tbl employees
    -tbl cornerstar tickets
    -tbl cornerstar invoices

    -qry union between CS invoice and tickets
    -reqry of the union to show subtotals and totals per month
    -qry for employee productivity

    -reports for all

    My question is I would like to avoid manually re doing all of the queries and reports for every single project when new information is given in tickets and invoices, is that possible? I also would like it to auto update the summary information in the main products tbl/form. I dont expect an immediate solution, I just dont know where to begin, what to look for, if I need to use SQL with VBA? So really any help and any advice would be great! Thank you

  2. #2
    Join Date
    Apr 2007
    Location
    Sterling Heights, Michigan
    Posts
    8,666
    I assume you have Access userforms all setup with the appropriate controls, right?
    I don't answer coding questions via PM or Email. Please post a thread in the appropriate forum section.
    Please use [Code]your code goes in here[/Code] tags when posting code.
    Before posting your question, did you look here?
    Got a question on Linux? Visit our Linux sister site.
    Modifications Required For VB6 Apps To Work On Vista

  3. #3
    Join Date
    Jun 2008
    Posts
    3
    Not so much...What I did read on the subject is that userforms are not recommended for Access b/c of load/unload statement, so they would jsut rather you use the Access forms which I do have created. And I take it the controls are the structure VBA is written in? Yep Im not new or anything.......

    On another note, I dont want to waste your time. I did finaly get a response back and they mentioned that it wouldnt be possible because I was breaking the 'rules of normalization'. I looked that up and it made sence because I would have at least 3 tables per project (end result 51 tables yikes!). So after thinking about it, I am going to change my format to 4 tables
    -Projects
    [project, start date, end date, Total bid amount, Current total, last updated]
    -Tickets
    [project, phase, date, ticket, employee, equipment, rate, description, hours, loads, price]
    -Invoices
    [project, phase, date, company, invoice, item, tons, Price]
    -Phase
    [project, phase, bid amount]

    I can figure out the sql on my own to run the querys. I would like for them to all be ran at the same time at the click of a button, or a click of a few buttons. Because if done manually, I would have to run 4 query's and reports for each project totalling 68 query's and or reports.

  4. #4
    Join Date
    Apr 2007
    Location
    Sterling Heights, Michigan
    Posts
    8,666
    So, do you consider this question to be resolved, or are they still issues that you would like to address on this?
    I don't answer coding questions via PM or Email. Please post a thread in the appropriate forum section.
    Please use [Code]your code goes in here[/Code] tags when posting code.
    Before posting your question, did you look here?
    Got a question on Linux? Visit our Linux sister site.
    Modifications Required For VB6 Apps To Work On Vista

  5. #5
    Join Date
    Jun 2008
    Posts
    3
    Sorry I should have been more clear. My questions are if the new format would make it possible for me to do this without breaking the rules of normalization? And How would I do the code to put the button in and the type of structure VBA is written in so I can combine it with sql? Thanks

  6. #6
    Join Date
    Apr 2007
    Location
    Sterling Heights, Michigan
    Posts
    8,666
    You don't have to compare it with SQL....you can use VBA AND SQL in the same program.

    If fact, that is what I would recommend.
    I don't answer coding questions via PM or Email. Please post a thread in the appropriate forum section.
    Please use [Code]your code goes in here[/Code] tags when posting code.
    Before posting your question, did you look here?
    Got a question on Linux? Visit our Linux sister site.
    Modifications Required For VB6 Apps To Work On Vista

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center