Results 1 to 4 of 4
  1. #1
    Join Date
    Sep 2004
    Posts
    63

    Question Unanswered: Where condition - Access can't find teh field etc

    Hello All,

    I hope someone can help on this one....

    I need to open a report with only one record.

    I can do this usually, but I think I have mucked this one up by using a subform.

    I am using the following to set the where condition:

    stWhere = "[SlipIDNo] = " & "'" & Me.[AchievementEntryFormSub]![SlipIDBox] & "'"

    Every time I include this, I get an error message sayng that Access can't find the field "|". So I can only assume that I have got it wrong on how to refer from the sub form.

    Could someone give me a nudge in the correct direction on this one please before I go totally nutz?!

    Thanks
    ChrisOfCatford

  2. #2
    Join Date
    Feb 2004
    Location
    Chicago, IL
    Posts
    1,312
    Assuming the name of your subform is spelled correctly, try this:

    stWhere = "[SlipIDNo] = " & "'" & Me.[AchievementEntryFormSub].Form![SlipIDBox] & "'"

    Also, is SlipIDNo a number? If so then you don't need the "'" around the Me.[AchievementEntryFormSub].Form![SlipIDBox]. Just put:

    stWhere = "[SlipIDNo] = " Me.[AchievementEntryFormSub].Form![SlipIDBox]

  3. #3
    Join Date
    Sep 2003
    Posts
    228
    I hate the syntax for referring to subforms... I am still confused by it.

  4. #4
    Join Date
    Sep 2004
    Posts
    63

    Talking

    Thanks a 1000 times. Who'd have thought a couple of quotes could have been such bother. It was the number thing after all.

    Thanks again,
    ChrisOfCatford

Posting Permissions

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