Results 1 to 4 of 4
  1. #1
    Newby is offline Advanced Beginner
    Windows 7 64bit Access 2007
    Join Date
    Nov 2012
    Posts
    60

    Protocol Q for vba

    I am try to embed a query into an Access code. I copied the sql statement of a query and pasted it into my code for a button in another form expecting it to run. No luck. See code below. Also, I notice code tables.Tablename.tablefieldname and Table!Tablename!Tablefieldname. what is the difference between using the "!" or "." as a separator?

    SELECT to_dos.ID, to_dos.Task, to_dos.[Task Desc], to_dos.Interval, to_dos.Day, to_dos.DOM, to_dos.Distribution, to_dos.Minutes, to_dos.DateCompleted, to_dos.[Report Type], to_dos.[Report Location], to_dos.[Source Link], to_dos.[Other Source], to_dos.[Destination Link], to_dos.[Other Destination], to_dos.[Documentation Tab], to_dos.Instructions
    FROM to_dos


    WHERE (((to_dos.Interval)=[forms].[f_RptgSched].[CBx_Interval]));

  2. #2
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,726
    There are many tutorials related to SQL and vba at Martin Green's site
    http://www.fontstuff.com/

    What is protocol Q??

    Google MsAccess dot vs bang

  3. #3
    Newby is offline Advanced Beginner
    Windows 7 64bit Access 2007
    Join Date
    Nov 2012
    Posts
    60
    The code does not work. Do you have an example of a sql query in vba. The reason I what it in code is that eventual I want to attached variables.

    newby

  4. #4
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,726

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

Similar Threads

  1. Replies: 1
    Last Post: 12-13-2012, 01:41 PM
  2. Remote Desktop Protocol
    By MaxwellAFB in forum Access
    Replies: 1
    Last Post: 02-10-2012, 12:10 AM

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