input form display problem.

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • russell.LRG@gmail.com

    input form display problem.

    Hello, I want to ask a question:

    I got 2 tables:

    Patients and Doctors,

    Patients table has 3 fields: Patient_ID, Patient_Name, Doctor_ID

    Doctors table has 2 fields:Doctor_I D, Doctor_Name

    Doctor_ID is the foreign key.

    I want to create a form to input new patient, in which the Doctor_Name
    can be listed in a pull-down list to let the user select. Could anyone
    tell me how can I do that?

    Thanks!!

  • russell.LRG@gmail.com

    #2
    Re: input form display problem.

    Thanks a lot !

    Hi Donald, I still want to ask, if I select the doctor name from the
    combobox, will the corresponding doctor id be saved into patient's
    table?

    Comment

    • Larry Linson

      #3
      Re: input form display problem.

      <russell.LRG@gm ail.comwrote
      Hi Donald, I still want to ask, if I select the doctor name from the
      combobox, will the corresponding doctor id be saved into patient's
      table?
      Set the ComboBox up with a RowSource containing DoctorID and DoctorName, and
      set DoctorID as the bound column, Doctor ID as the visible column, and
      you'll do exactly what you want.

      Larry Linson
      Microsoft Office Access MVP



      Comment

      • Bob Quintal

        #4
        Re: input form display problem.

        "Larry Linson" <bouncer@localh ost.notwrote in
        news:kLBDj.774$ Nr1.492@trnddc0 1:
        <russell.LRG@gm ail.comwrote
        >
        >Hi Donald, I still want to ask, if I select the doctor name from
        >the combobox, will the corresponding doctor id be saved into
        >patient's table?
        >
        Set the ComboBox up with a RowSource containing DoctorID and
        DoctorName, and set DoctorID as the bound column, Doctor ID as the
        visible column, and you'll do exactly what you want.
        >
        Larry Linson
        Microsoft Office Access MVP
        >
        I think you mean set Doctor Name as the visible column

        :-)

        --
        Bob Quintal

        PA is y I've altered my email address.

        --
        Posted via a free Usenet account from http://www.teranews.com

        Comment

        • Donald Calloway

          #5
          Re: input form display problem.

          Bob Quintal wrote:
          "Larry Linson" <bouncer@localh ost.notwrote in
          news:kLBDj.774$ Nr1.492@trnddc0 1:
          >
          ><russell.LRG@g mail.comwrote
          >>
          >>Hi Donald, I still want to ask, if I select the doctor name from
          >>the combobox, will the corresponding doctor id be saved into
          >>patient's table?
          >Set the ComboBox up with a RowSource containing DoctorID and
          >DoctorName, and set DoctorID as the bound column, Doctor ID as the
          >visible column, and you'll do exactly what you want.
          >>
          > Larry Linson
          > Microsoft Office Access MVP
          >>
          I think you mean set Doctor Name as the visible column
          >
          :-)
          >
          Mr. Linson is correct. I have several databases in use in my office
          which I've created where I do just this sort of thing. The user can see
          the Name portion of the lookup field in the record, and when selected,
          it's actually the ID of that corresponding Name field that gets written
          to the database. That makes sense because you can't expect the user to
          know the ID of each Doctor.

          Comment

          • Larry Linson

            #6
            Re: input form display problem.

            My bad -- fingers faster than brain, sometimes. :-)

            "Bob Quintal" <rquintal@sPAmp atico.cawrote in message
            news:Xns9A64BAB F22AE4BQuintal@ 66.150.105.47.. .
            "Larry Linson" <bouncer@localh ost.notwrote in
            news:kLBDj.774$ Nr1.492@trnddc0 1:
            >
            ><russell.LRG@g mail.comwrote
            >>
            >>Hi Donald, I still want to ask, if I select the doctor name from
            >>the combobox, will the corresponding doctor id be saved into
            >>patient's table?
            >>
            >Set the ComboBox up with a RowSource containing DoctorID and
            >DoctorName, and set DoctorID as the bound column, Doctor ID as the
            >visible column, and you'll do exactly what you want.
            >>
            > Larry Linson
            > Microsoft Office Access MVP
            >>
            I think you mean set Doctor Name as the visible column
            >
            :-)
            >
            --
            Bob Quintal
            >
            PA is y I've altered my email address.
            >
            --
            Posted via a free Usenet account from http://www.teranews.com
            >

            Comment

            • russell.LRG@gmail.com

              #7
              Re: input form display problem.

              Thanks a lot! Now the form works as I expect ^_^

              One more question , I cannot find visible column setting in the
              properties of combobox. Is it because I am using Access2003, which
              doesn't come with this property?

              Comment

              • Bob Quintal

                #8
                Re: input form display problem.

                "russell.LRG@gm ail.com" <russell.LRG@gm ail.comwrote in news:41d05cdd-
                5463-4062-8ac0-b0bacabdb6e4@x3 0g20...l egroups.com:
                Thanks a lot! Now the form works as I expect ^_^
                >
                One more question , I cannot find visible column setting in the
                properties of combobox. Is it because I am using Access2003, which
                doesn't come with this property?
                >
                In a combobox, you set the width of columns toi 0" to make them
                invisible. so if your columns are DoctorID and Doctorname, making the
                column widths 0";2" will hide the doctorID. Is that what you're asking?


                --
                Bob Quintal

                PA is y I've altered my email address.

                --
                Posted via a free Usenet account from http://www.teranews.com

                Comment

                Working...