Results 1 to 7 of 7
  1. #1
    rankhornjp is offline Advanced Beginner
    Windows Vista Access 2007
    Join Date
    Jul 2011
    Posts
    46

    what does this mean: [classes]![cDate]

    Probably a stupid question, but.....

    Given: rScheduled is a field in the "Tests" table, "classes" is a seperate table and "cDate" is a field in the "classes" table.

    What does this mean in a query?
    rScheduled:[classes]![cDate]


    Thanks

  2. #2
    hertfordkc is offline 18 year novice
    Windows XP Access 2007
    Join Date
    Mar 2011
    Posts
    481

    Are there table relationships defined for these tables?

    Quote Originally Posted by rankhornjp View Post
    Probably a stupid question, but.....

    Given: rScheduled is a field in the "Tests" table, "classes" is a seperate table and "cDate" is a field in the "classes" table.
    What does this mean in a query?
    rScheduled:[classes]![cDate]
    Thanks
    -----------------------------------------------------------------------------------------------------------------------------
    Do all three tables appear in the query?
    The syntax which you quoted is normally used for creating a calculated value in a query. I would expect that the field rScheduled in table Tests is being set equal to field cDate in table classes. However, without considering the any defined relationships and the query itself, I can't guarantee that is what is really happening. Perhaps one of the other gurus on this forum can give you such a guarantee.

  3. #3
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    Presuming that's in design view, it's creating a new field called rScheduled using the cDate field from classes. If rScheduled is a field name in another table, it was likely a poor choice of names for the alias given the confusion that could result.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  4. #4
    rankhornjp is offline Advanced Beginner
    Windows Vista Access 2007
    Join Date
    Jul 2011
    Posts
    46
    Quote Originally Posted by pbaldy View Post
    Presuming that's in design view, it's creating a new field called rScheduled using the cDate field from classes. If rScheduled is a field name in another table, it was likely a poor choice of names for the alias given the confusion that could result.
    It is in design view, but it shows up in SQL as well.

    Are you saying that it is similar to "select classes.cdate AS rScheduled" ?

  5. #5
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    Not just similar. This:

    rScheduled:[classes]![cDate]

    is the design view equivalent of the SQL:

    classes.cdate AS rScheduled
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  6. #6
    rankhornjp is offline Advanced Beginner
    Windows Vista Access 2007
    Join Date
    Jul 2011
    Posts
    46
    awesome, thanks. I'm trying to teach myself but sometimes it gets confusing.

  7. #7
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    No problemo; it can be confusing.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. CDate in my append query
    By Steven.Allman in forum Queries
    Replies: 3
    Last Post: 04-11-2011, 01:00 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