Results 1 to 2 of 2
  1. #1
    etejan is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Nov 2011
    Posts
    1

    Angry Annoying Autocorrection is breaking my form

    Hi,

    I have a form with two unbound date text boxes [StartDate] and [EndDate]. then I have a tab control with two queries that filter (or should filter) off these forms.

    On the query/subform I have the date field filtered by :
    Between Forms![Time Reporting tool]![StartDate] And Forms![Time Reporting tool]![EndDate]. OR thats what it SHOULD say.

    Access keeps autocorrecting it to Between
    [Forms]![Time Reporting tool]![StartDate] And [Forms]![Time Reporting tool]![EndDate]


    A subtle yet destructive difference. I keep getting prompted to enter the date instead of the query referring to the form. When I go to SQL view and correct it there I get the same thing happening: Access breaks my query again.

    How do I make it stop?

  2. #2
    boblarson is offline --------
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jun 2011
    Posts
    1,272
    Access is putting in the correct syntax. Yours is wrong. So, you need to make sure your CONTROL names on the form are

    StartDate
    and
    EndDate

    and there is no field bound to those controls named the same. If there is, change the control name to txtStartDate and txtEndDate and refer to the controls in the code.

    Also, you can get the exact code for it to ensure the right names are used and syntax used, by putting your cursor in the criteria, select the BUILDER wizard button and then navigate on there to the control and double click on it. See this here:
    http://www.btabdevelopment.com/ts/refer2sfrms
    for how to do it (the example is for subforms/subreports but the concept is the same).

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

Similar Threads

  1. How to disable this annoying auto arrange?
    By Yesideez in forum Forms
    Replies: 16
    Last Post: 10-25-2013, 12:13 AM
  2. Breaking the string into Text / Number
    By Amerigo in forum Queries
    Replies: 15
    Last Post: 05-20-2011, 03:29 PM
  3. Replies: 6
    Last Post: 02-08-2011, 09:22 PM
  4. annoying error! trust centre?
    By tom4038 in forum Import/Export Data
    Replies: 1
    Last Post: 09-23-2009, 11:26 AM
  5. Annoying Query issue
    By stevendavies in forum Queries
    Replies: 2
    Last Post: 05-08-2006, 02:35 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