Results 1 to 3 of 3
  1. #1
    Silver Lounger
    Join Date
    Jan 2002
    Posts
    1,615
    Thanks
    0
    Thanked 1 Time in 1 Post

    Refreshing query without seeing it (2002)

    Hi,

    I thought I posted this a couple hours ago but I don't see it so I apologize if this is a repeat thread.

    I have a form that is bound to a query. The form is used to import records from an ecxcel file and then run various reports from the date. Fields [off_code] and [date_range] are on the form to provide the user with a visual reminder as to the office they are working in and the date range for the data (this comes from excel). They are disabled so the user does not manipulate them. My goal is to have the repopulate with the correct information each time a new version of the Excel spreadsheet is pulled in. This does not happen unless the form is closed and reopenned again. I tried adding me.off_code.requery and me.date_range. requery to the end of the code on the command button that pulls in the data but all that did was give an error message in [date_range} that said deleted (the old info is deleted when the new info is pulled in). Off_code didn't change I believe because that is attached to another table in the query that gives the text for the numeric code in [off_code].

    I was wondering if requerying the form itself would solve the problem and if so, is there a way to make the results of the query not pop up docmd.openquery.... is used.

    Thanks,
    Leesha

  2. #2
    Super Moderator
    Join Date
    Jun 2002
    Location
    Mt Macedon, Victoria, Australia
    Posts
    3,993
    Thanks
    1
    Thanked 45 Times in 44 Posts

    Re: Refreshing query without seeing it (2002)

    I am not sure that I completely understand the question, but I will have a go at an answer.

    You can requery the form using me.requery
    Regards
    John



  3. #3
    Silver Lounger
    Join Date
    Jan 2002
    Posts
    1,615
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Refreshing query without seeing it (2002)

    Hi!

    That is EXACTLY what I needed and was looking for. Thanks a bunch,
    Leesha

Posting Permissions

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