Results 1 to 6 of 6
  1. #1
    5 Star Lounger
    Join Date
    Mar 2001
    Posts
    989
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Requerying current record (2002)

    I'm working on a standalone database on a workstation. I have a button on a staff form which runs an Update Query to TRIM the names of the staff. After the query runs, I'm trying to use DoCmd.Requery to display the tidied-up version of the name for the current record, but it doesn't display the corrected version of the name unless I move to the next record and come back. Why doesn't this work and how can I correct? Thanks, Andy.

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

    Re: Requerying current record (2002)

    Try <code>Me.Refresh</code> instead.

  3. #3
    5 Star Lounger
    Join Date
    Mar 2001
    Posts
    989
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Requerying current record (2002)

    Me.Refresh doesn't work either I'm afraid.. The currently viewed record still shows the extra spaces..

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

    Re: Requerying current record (2002)

    If you wish, you can post a stripped down copy of your database. See <post#=401925>post 401925</post#> for instructions.

  5. #5
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Requerying current record (2002)

    If you have a button you're clicking, where is it located? I would think you would have to move off the active record to click the button, no? And try Me.Requery instead of DoCmd.Requery.
    Charlotte

  6. #6
    5 Star Lounger
    Join Date
    Mar 2001
    Posts
    989
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Requerying current record (2002)

    Oops, I was testing it by putting in extra spaces.. But of course the current record had not been saved (with the extra spaces).. Anyway, saving the record and then Me.Requery solves the problem. Thanks, Andy.

Posting Permissions

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