Automate Access 2003 to input a standardised record.

Discussion in 'Access Macros' started by chrissfcs, May 17, 2010.

  1. chrissfcs

    chrissfcs Guest

    I have set up an enquiry database that holds enquiry data for a
    Library/Learning Centre. There are two or three standard type enquiries that
    I want to make quicker and easier for the user to input. I have tried using
    SetValue but this only works if you input some data in a field first and
    specify the data for the other fields. Is there a way that I can fully
    automate a record input from a button press.
     
    chrissfcs, May 17, 2010
    #1
    1. Advertisements

  2. Chris,

    Make an Update Query to add the data you want to a new record. You can use
    the OpenQuery action in a macro to run the update.
     
    Steve Schapel, May 17, 2010
    #2
    1. Advertisements

  3. chrissfcs

    chrissfcs Guest

    Thanks for this, I've been trying with Append Queries and managed to get a
    duplicate last record button from that, but I never thought of trying an
    update query. I'll try it. Thanks again.
     
    chrissfcs, May 18, 2010
    #3
  4. Chris,

    An Append Query will be applicable if you are creating the new record, with
    the data that you want automatically inserted. An Update Query will be
    applicable if you already have a new record created, and you want to write
    the automated data into it. I am not sure from your description which way
    this will go.
     
    Steve Schapel, May 18, 2010
    #4
  5. chrissfcs

    chrissfcs Guest

    Thanks Steve, it is the Append Query I needed. I have created what I need,
    but I do have another problem now. I'll explain:-

    The data is added to a new record, being a record of enquiries received.
    If you remember I successfully created a Duplicate Record button which I got
    from the wizard when I put the button on my form. That was working fine.

    The way I got the standard records to be added was by making another table
    with the standard records in, then making an Append Query for each record.
    Then I made a macro for each append query that added the record to the main
    enquiries table and gave a confirmation message before returning to the main
    form for another record entry.

    I tested my new buttons and they worked okay. BUT!.... My Duplicate Last
    Record button does not work now! I get an error messaga that reads,
    "Visual Basic for Applications (VBA) encountered a problem while attempting
    to access a property or method. The problem may be one of the following.
    Reference is missing or Expession misspelled."

    I'm nearly there - can you help me please?

    Chris.
     
    chrissfcs, May 21, 2010
    #5
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.