Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2004

    Unhappy Unanswered: Linking criterias

    Hi there,

    I need some help on something.

    I have a main form with an MID and a text field, MText. By clicking on a command button I want it to open a separate form by the the criterias of MID and MText with OID and OText.

    This is what I have at the moment but it is coming up with Type Mismatch

    Dim stDocName as string
    Dim stLinkCriteria as string

    stDocName = "frmName"
    me![MText] = "Item 1"

    stLinkCriteria = "[MID]=" & me![OID] and "[OText]=" & "'" & me![MText] & "'"

    You will notice that I have MText to become a string of "Item 1". This is because I want to link the field name with the OText instead of the value.

    Any ideas would be appreciated.


  2. #2
    Join Date
    Jan 2004

    Multiple criterias

    Ok let me try and make it a little simplier.....

    I have just got this help from Access

    stLinkCriteria = "[MID] = " & me![OID] ' this one works

    stLinkCriteria = "[MText] = 'Text' ' this one also works

    but as soon as I do this:-

    stLinkCriteria = "[MID] = " & me![OID] and "[MText] = 'Text' (just joining them together because I need multiple criterias) it comes up with the following error:-

    "Type Mismatch"

    I'm sure it is so simple but just can't work it out.


Posting Permissions

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