Results 1 to 4 of 4
  1. #1
    4 Star Lounger
    Join Date
    Oct 2003
    Location
    Guelph, Ontario, Canada
    Posts
    428
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Edited by HansV to remove CodeBox which caused the post to be extremely wide.

    Using Access 2000 format in Access 2003

    On a form, frmMembers based on tblMembers, I want to set up 2 option buttons. One to show current members...let's call it optAll. The other to show removed members...let's call it optRemoved.

    So for the OnClick event for the optAll button I try to enter

    SELECT tblMembers.MemberID, tblMembers.LastName, tblMembers.FirstName, tblMembers.MiddleName, tblMembers.PreferredName, tblMembers.Partner, tblMembers.DateOfBirth, tblMembers.WeddingAnniversary, tblMembers.Address, tblMembers.Address2, tblMembers.City, tblMembers.Province, tblMembers.PostalCode, tblMembers.HomePhone, tblMembers.HomeEmail, tblMembers.Notes, tblMembers.Occupation, tblMembers.BusinessAddress, tblMembers.BusinessPostalCode, tblMembers.BusinessCity, tblMembers.BusinessProvince, tblMembers.BusinessName, tblMembers.BusinessPhone, tblMembers.BusinessFax, tblMembers.BusinessEmail, tblMembers.Status, tblMembers.YearJoined, tblMembers.Sponsor, tblMembers.HowJoined, tblMembers.TransferFrom, tblMembers.YearsInFormerClub, tblMembers.TransferTo, tblMembers.TransferDate, tblMembers.ResignedDate, tblMembers.DeceasedDate, tblMembers.PerfectAttendance, tblMembers.HighestOffice, tblMembers.LegionofHonour, tblMembers.LegionOfHonourYear, tblMembers.LastPerfectAttendance, tblMembers.PerfTill, tblMembers.Updated, tblMembers.UseForEmail, tblMembers.MembershipID, tblMembers.LOADate, tblMembers.ReinstateDate
    FROM tblMembers;

    However, what I get is
    Me.Me.RecordSource = ""
    SELECT tblMembers.MemberID, tblMembers.LastName, tblMembers.FirstName, tblMembers.MiddleName, tblMembers.PreferredName, tblMembers.Partner, tblMembers.DateOfBirth, tblMembers.WeddingAnniversary, tblMembers.Address, tblMembers.Address2, tblMembers.City, tblMembers.Province, tblMembers.PostalCode, tblMembers.HomePhone, tblMembers.HomeEmail, tblMembers.Notes, tblMembers.Occupation, tblMembers.BusinessAddress, tblMembers.BusinessPostalCode, tblMembers.BusinessCity, tblMembers.BusinessProvince, tblMembers.BusinessName, tblMembers.BusinessPhone, tblMembers.BusinessFax, tblMembers.BusinessEmail, tblMembers.Status, tblMembers.YearJoined, tblMembers.Sponsor, tblMembers.HowJoined, tblMembers.TransferFrom, tblMembers.YearsInFormerClub, tblMembers.TransferTo, tblMembers.TransferDate, tblMembers.ResignedDate, tblMembers.DeceasedDate, tblMembers.PerfectAttendance, tblMembers.HighestOffice, tblMembers.LegionofHonour, tblMembers.LegionOfHonourYear, tblMembers.LastPerfectAttendance, tblMembers.PerfTill, tblMembers.Updated, tblMembers.UseForEmail, tblMembers.MembershipID, tblMembers.LOADate, tblMembers.ReinstateDate
    FROM tblMembers;"

    And it won't allow me to put anything in between the quotation marks. It also won't allow me to enter anything prior to the word "Select." It just beeps.

    I tried rebooting the computer. No difference.

    I'm puzzled.

    Tom

  2. #2
    Gold Lounger
    Join Date
    Feb 2001
    Location
    Sint Niklaas, Belgium
    Posts
    2,778
    Thanks
    0
    Thanked 0 Times in 0 Posts
    [quote name='THWatson' post='762315' date='27-Feb-09 21:04'][/quote]
    Your line is too long. You should not use such long lines.
    Split your line like this :
    Code:
    strSQL = "SELECT tblMembers.MemberID, tblMembers.LastName, tblMembers.FirstName, " & _
    			  "tblMembers.MiddleName, tblMembers.PreferredName, tblMembers.Partner, " & _ 
    			  ...
    Francois

  3. #3
    4 Star Lounger
    Join Date
    Oct 2003
    Location
    Guelph, Ontario, Canada
    Posts
    428
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks, Francois. I appreciate the reply.

    I finally figured that out.

    By the way, no e-mail reply came from you. I wonder if that part isn't working yet. I ticked the box to have a reply sent.

    Tom

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts
    [quote name='THWatson' post='762340' date='27-Feb-09 23:37']By the way, no e-mail reply came from you. I wonder if that part isn't working yet. I ticked the box to have a reply sent.[/quote]
    Take a look at My Threads

Posting Permissions

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