Results 1 to 3 of 3
  1. #1
    Star Lounger
    Join Date
    Apr 2001
    Posts
    94
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Autorefresh query on screen (97)

    I have records that include a field "unallocated", and a query which returns those "unallocated" records. I would like to design a screen where any "unallocated" records can be clicked on and updated. Upon completion I would like the screen to return to the query, now no longer showing the recently allocated record. I would just like some pointers as to where to look for relevent functions etc please, and I'll take it from there. If it's a real VBA problem, let me know and I'll abandon this fanciful idea!

    Many thanks.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Autorefresh query on screen (97)

    You can design a form based on your query that returns the "unallocated" records. The user can edit the records in this form.

    Put a command button on the form. We're going to write one simple line of VBA code for it.
    <UL><LI>Make sure that the command button is selected.
    <LI>Activate the Other tab of the Properties window.
    <LI>Enter cmdRequery in the Name box.
    Activate the Event tab.
    <LI>Click in the On Click box.
    <LI>Select [Event Procedure] from the dropdown list.
    <LI>Click the ... to the right of the dropdown arrow.
    <LI>You'll be taken to the Visual Basic Editor. An event procedure has already been created for you.
    <LI>Press the Tab key once, then type Me.Requery
    <LI>It should look like this:

    Private Sub cmdRequery_Click()
    Me.Requery
    End Sub

    <LI>Quit the Visual Basic Editor (Alt+F11)[/list]When you switch to form view, you can click the button to re-read the records, so that a record that has become allocated will not be displayed any more.

  3. #3
    Star Lounger
    Join Date
    Apr 2001
    Posts
    94
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Autorefresh query on screen (97)

    SUPERB!! Thank you so much.

    I love the lounge!!

Posting Permissions

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