Two errors need help - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Two errors need help

i get two different errors depending on which approach i take to display information from to different tables in my Access DB. The code is as follows:

'Populate SQL to get member info
SELECT tblPictures.Picture, tblPictures.ProfilePic, tblMembers.MemberID, tblMembers.Sex, tblMembers.City, tblMembers.State, tblMembers.Country, tblMembers.LoginName, tblMembers.Headline, tblMembers.Television, tblMembers.Orentation, tblMembers.Hobbies, tblMembers.HereFor, tblMembers.Music, tblMembers.Movies, tblMembers.Books, tblMembers.MaritalStatus, tblMembers.BodyType, tblMembers.Smoke, tblMembers.Drink, tblMembers.AboutMe, tblMembers.Occupation, tblMembers.Children, tblMembers.Religion, tblMembers.Ethnicity, tblMembers.GeneralInterest, tblMembers.Heros, tblMembers.LikeToMeet, tblMembers.Education FROM tblMembers INNER JOIN tblPictures ON tblMembers.MemberID = tblPictures.MemberID WHERE tblPictures.ProfilePic=True AND tblMembers.MemberID=[member ID in this case 2];"

oRS.open SQL, oConn, 3

'--- Populate vText - BEGIN ---
vText = "
"
vText = vText & ""
.
.
.

error when calling for the LoginName. I get ADODB.Recordset (0x800A0CC1) Item cannot be found in the collection corresponding to the requested name or ordinal. When calling for it as it is in the code above. However, if I were to take out the tblMembers part of it so its just LoginName I get this error: (0x80020009) Exception occurred. The querry works fine in the DB. IDK whats up with that. Any ideas?
" & oRS.fields("tblMembers.LoginName") & "

Comments

  • WEBMASTERWEBMASTER Posts: 549Member
    Perhaps the record set is empty after

    oRS.open SQL, oConn, 3 ????


    Make sure the oRS contains data by doing a

    if oRS.eof=false then

    : '--- Populate vText - BEGIN ---
    ...
    ...
    ...


    end if



    [blue][italic][b]/WEBMASTER[/b][/italic][/blue]

Sign In or Register to comment.