Results 1 to 2 of 2
  1. #1
    4 Star Lounger
    Join Date
    Feb 2001
    Location
    Louisville, Kentucky, USA
    Posts
    597
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Open A Form (Access 97)

    <img src=/S/frown.gif border=0 alt=frown width=15 height=15>
    Good Morning,

    A new dilema....

    I have a combo box:
    AP, UNT, EIN, NC, ADD etc for the values.

    In the AfterUpdate event I want to, depending on the selection of the user, open a form. If the user selects either "AP", "UNT" or "EIN", then I want a specific form, frmPhyChanges, to open, if the user selects NC then nothing should happen. I have the following code in the AfterUpdate event of cboLegend but I get a type mismatch error with the "If" line highlighted. Can someone please help me?

    Dim strLeg As String
    strLeg = txtBdLegend
    If strLeg = "UN / T" Or "AP" Or "EIN" Then
    DoCmd.OpenForm "frmPhyChanges", acNormal, "", "", , acNormal
    End If

    Thanks,
    Roberta Price <img src=/S/cheers.gif border=0 alt=cheers width=30 height=16>

  2. #2
    Gold Lounger
    Join Date
    Feb 2001
    Location
    Sint Niklaas, Belgium
    Posts
    2,778
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Open A Form (Access 97)

    Use
    If strLeg = "UN / T" Or strLeg = "AP" Or strLeg = "EIN" Then

Posting Permissions

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