Results 1 to 3 of 3
  1. #1
    willmafingerdo is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Feb 2016
    Posts
    108

    Query is not pulling values from txt field on form when i click the button

    Hello,


    I have a button that runs a query and pulls the criteria form a date field and a dropdown menu field on my form and saves an excel spreadsheet. It will work fine then all of a sudden it will start pulling random values, or only pull like 1 field from the report instead of the full report.. If i go into the query itself and run it w/ the values selected on the form it works, but using the button seems to cause the issue. This is the code in my query to pull the data from the form.

    [Forms]![frm_WIGI_Search]![90_Day_WIGI_Date_Txt]
    [Forms]![frm_WIGI_Search]![90 Day WIGI AO_Code_Txt]

    I dont get any errors or anything, it just stops working.. any ideas please?

  2. #2
    Micron is offline Very Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    13,423
    If you're saying that with the form open and valid values entered, you run the query and it is fine, but if you THEN click to open the report (i.e. you don't close the form or do anything else) and it isn't fine, then perhaps the issue is in the button code. Maybe post that code - please use code tags (# on posting toolbar) with indentation in the code.
    Code also be something about the report and it's code if there is any (e.g. a filter being applied sometimes).
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  3. #3
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,550
    sometimes i get it to show if i convert it to string:
    Str([Forms]![frm_WIGI_Search]![90_Day_WIGI_Date_Txt])

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 6
    Last Post: 07-25-2019, 09:58 AM
  2. Replies: 14
    Last Post: 03-15-2018, 08:59 AM
  3. Replies: 4
    Last Post: 05-09-2017, 10:41 AM
  4. Replies: 2
    Last Post: 01-09-2017, 04:56 PM
  5. Replies: 2
    Last Post: 02-08-2014, 07:10 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums