Results 1 to 2 of 2
  1. #1
    3 Star Lounger
    Join Date
    Jan 2001
    Posts
    294
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Help Code Experts..

    When I run this I keep getting an a Run time error 3103 "Circular reference caused by alias "Date Assigned" in QUERY
    definition's select list."
    Can anyone figure out why I'm getting this? Thanks..

    Sub AppendVoucher()

    Dim WhereCriteria As String
    Dim AppendTable As String
    Dim strSQL As String


    AppendTable = Program & "Resolution"
    WhereCriteria = "([Voucher#] Is Not Null Or [Voucher#]<>'')AND ([Date Assigned] Is Not Null) AND ([First Name] Is Not Null Or [First Name]<>'') AND ([Last Name] Is Not Null Or [Last Name]<>'') AND ([Center] Is Not Null Or [Center] <>'') AND ([Reason] Is Not Null Or [Reason]<>'') AND ([Type] Is Not Null Or [Type]<>'') AND ([Test Date]Is Not Null Or [Test Date]<>'') AND ([Assigned By]Is Not Null Or [Assigned By]<>'') AND ([Date Modified]Is Not Null Or [Date Modified]<>'') AND ([Appt#]Is Not Null Or [Appt#]<>'')"

    DoCmd.SetWarnings False

    DoCmd.RunSQL "INSERT INTO " & Program & " SELECT " & AppendTable & ".[Voucher#],[DateAssigned],[First Name],[Last Name],[Center],[Reason],[Type],[Test Date],[Assigned By],[Date Modified],[Appt#] FROM " & AppendTable & " WHERE " & WhereCriteria


    DoCmd.SetWarnings True

    End Sub

  2. #2
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    USA
    Posts
    386
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Help Code Experts..

    Not sure if this is a typo or not, but in the "WhereCriteria" you have [Date Assigned](with a space), and in the "SELECT" section you have [DateAssigned](no space). This should be the same in both places.


    Hope this helps


    Richard Aheron
    raheron@hotmail.com
    [img]/w3timages/icons/grin.gif[/img]
    Richard

Posting Permissions

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