Results 1 to 7 of 7

Thread: Access querys

  1. #1
    Join Date
    May 2003
    Posts
    4

    Access querys

    OK
    Here's another stupid Access question.
    I have a query setup in Access 2000. I would like to have a form drive this query. Most of the query items are yes/no, so some check boxes in this form are all I'm looking for. I can't for the life of me figure out how to create a form and update the query from within that form.

    Any help would be appreciated.

  2. #2
    Join Date
    Jan 2003
    Location
    UK
    Posts
    277
    you need to set the record source property of the form to the query name.

    create the query first and use the form wizard to knock up a simple form that you can then modify to suit

  3. #3
    Join Date
    May 2003
    Posts
    4
    The record source is set to the query, but it still will not refresh the query
    like running the query from the design view will. I want to use a form to build the query so users can build them easier that doing it from the query iteself.

    Thanks

  4. #4
    Join Date
    Jan 2003
    Location
    UK
    Posts
    277
    have you tried..........


    [object.]Requery

    The Requery method has the following argument.

    Argument Description
    object A Form or Control object representing the form or control you want to update. Omit this argument to requery the source of data for the active object.

    or

    reassign the query to the forms record source property........

    Me.RecordSource = MyQueryName

  5. #5
    Join Date
    Jun 2003
    Location
    Bloomington, IN, USA
    Posts
    116
    try this:

    make a button, call it something like cmdUpdate or whatever.

    In its on_click event simply out in the following and take out any other commands with the exception of the error handeling code:
    me.requery

    That SHOULD referesh your form, and if it is linked to the query correctly, then it should bring up the new data....

    just a thought from the peanut gallery.

    brandon
    'only two things are infinite: the universe and human stupidity ... and im not positive about the first.'

  6. #6
    Join Date
    May 2003
    Posts
    4
    OK now I think i'm loosing my mind.
    Can you guys hold my hand through this?
    Starting from scratch... what kind of query does it need to be? when creating the form what do I need to do?
    when creating the requery in the event procedure, where to I put the requery?

    Days like today I wonder how I get my shoes tied.

  7. #7
    Join Date
    Jan 2003
    Location
    UK
    Posts
    277
    have a look at Requery in the help files. It has examples.

Posting Permissions

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