Results 1 to 9 of 9
  1. #1
    New Lounger
    Join Date
    Oct 2002
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts

    automatic entry of data (Access 2000 SR1)

    I am a new user of Access and have setup my first database. It will be used to record data in a Vascular Lab. I need to record patient demographics, history, current problems and ultrasound testing that I perform. So far, so good. One thing, I have not been able to figure out how to do.

    I have a 2 column table containing, in the first column, numerical diagnosis codes; in the second column are the text descriptions of the codes. I know that, if necessary, I can combine the two into a single column listbox, but I'd rather enter the codes into one field of my form and the text descriptions into the next field.

    I have seen it done in a commercial product that when the code is entered into the form, the text automatically appears in the following field. I have the code field setup as a LOOKUP to reference the table I mentioned above, but I do not know how to get the text automatically entered into the second field in my form.

    Can anyone advise me regarding a way to do what I have described?

    Thank you.

  2. #2
    2 Star Lounger
    Join Date
    Apr 2001
    Location
    Wellington, New Zealand
    Posts
    173
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: automatic entry of data (Access 2000 SR1)

    Hi

    Probably the easiest thing to do is to create two controls.

    A combobox and a textbox.

    Create the combobox so that it contains two columns, 1 the code and 2 the description.

    Now...make sure the code is the column that is first in the combobox and make the second column (containing the description) a width of 0.

    Now set the textbox so that it is locked and disabled. Set the datasource of the textbox like so: =comboboxname.column(1)

    I will follow with an example.

    J

  3. #3
    2 Star Lounger
    Join Date
    Apr 2001
    Location
    Wellington, New Zealand
    Posts
    173
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: automatic entry of data (Access 2000 SR1)

    here is a basic example
    Attached Files Attached Files

  4. #4
    2 Star Lounger
    Join Date
    Apr 2001
    Location
    Wellington, New Zealand
    Posts
    173
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: automatic entry of data (Access 2000 SR1)

    You could also do it this way, if you didn't want to have to bother with combo boxes.
    Attached Files Attached Files

  5. #5
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: automatic entry of data (Access 2000 SR1)

    If you're populating a lookup table of codes and the equivalent description, the answer would be different than if you're trying to store a diagnosis code and its text description in another table as part of your patient demographics. It isn't clear from your question which one you're trying to do. If it's the latter, don't. The whole point of a relational database is that you enter data once and after that, you enter pointers to the data. So what you want to enter into the patient table is just the code, not the text that describes it.
    Charlotte

  6. #6
    New Lounger
    Join Date
    Oct 2002
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: automatic entry of data (Access 2000 SR1)

    Jayden,

    Thank you very much for you reply to my question. I grabbed the attachments and will give it a try today.

  7. #7
    New Lounger
    Join Date
    Oct 2002
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: automatic entry of data (Access 2000 SR1)

    Charlotte,
    Thank you very much for your reply to my question. I see your point. Actually it is the second option that I was trying to do. My database (my first attempt) is admittedly quite primitive. I still have a lot to do with it (queries, macros, reports, etc.), I am still learning. I actually have only three tables: patient demographics and history in one (too large, I know), ICD Codes in another and vascular studies performed in the third. I put a subform (studies) into my patient entry form. I originally wanted to put each section (demog, medical history, surgical history and studies) into it's own table, but I was having trouble figuring out the relationships and how to get it all together.

    I am uncertain how to accomplish what you suggest. I understand about pointing to data recorded elswhere, but I just don't know how to set it all up. I have worked through the MS Step by Step book tutorials and will look for another book soon. Have you any suggestions? Especially with info on designing a database from scratch and writng macors and VB to accomplish the db goals.

    Thanks again.

  8. #8
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: automatic entry of data (Access 2000 SR1)

    You and your users won't be looking at tables, you'll be looking at forms and reports and sometimes queries. On a form, you can simply put a combobox bound to the code field in your patient demographics table for its data source. If you use the wizard to build the combobox, have it use your ICD Codes table as the source and pick both columns but hide the first one (the code). That will give you a combobox that can be used to select the diagnosis description and the underlying code will automatically be entered in the table, while the diagnosis associated with that code will be displayed on the form.

    Get a copy of Access Database Design & Programming, by Steven Roman, if you can find it. It is a 240+ page reference that includes a good section on normalization, plus an excellent section on queries and another on programming. The second edition of the book was uipdated to include ADO, if I remember correctly, but either edition has the basic stuff you need to learn.
    Charlotte

  9. #9
    New Lounger
    Join Date
    Oct 2002
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: automatic entry of data (Access 2000 SR1)

    Thanks again. I think I understand now. And i will look for the book you recommended.

Posting Permissions

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