Results 1 to 2 of 2
  1. #1
    Join Date
    Jun 2003
    Posts
    1

    Lightbulb Unanswered: Access 2000 using macro and queries to update table

    I have created a macro that runs two queries
    Action:
    OpenQuery Query1
    OpenQuery Query2

    Query1
    [Table1]![Begin] <= [billing_date]
    [Table1]![End] >= [billing_date]

    Get [Table1]![Daily_Rate]

    Query2 Update Query
    [Table2]![billing_date] = [billing_date]

    Calc [Table2]![billling_amt] = [Table2]![Possible] * [Table1]![Daily_Rate]

    1. How do I carry over the [Table1]![Daily_Rate] for the calculation currently Query2 prompts me for Table1!Daily_Rate
    2. How do I turn off the message "You are about to run an update query that will modify the data in your table." for everyone that runs this query... Do I have to go into Tool/Options and uncheck that on each machine or is there a way to do it from the macro?
    3. How do I prevent the being prompted for the billing_date twice?

    Am I going about this all wrong ???

    Any help is greatly appreciated
    Jeff

  2. #2
    Join Date
    May 2003
    Location
    Dallas
    Posts
    817
    Provided Answers: 5
    The answer for almost all of this - is do not use macros

    In code to turn off the warnings use
    docmd.setwarnings false
    and whenn all the code has run

    docm.setwarnings true

    if one parameterized query is run and then anothe is run against it - you will get two prompts

    to get the rate join the two queries on a common field between the two and run bring the first two fields down in the grid and then run the calculation

Posting Permissions

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