Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Combo Box Question

Status
Not open for further replies.

Minuet

Technical User
Dec 18, 2002
48
CA
I work in a medical office and use Access to keep track of patient information. My main form is called Patient Info and containts two combo boxes, a name look-up and a chart-number look-up. This form contains detailed patient information. On this form I also have an "Appointment" button which, when clicked, pulls up a subform within a subform that lets me keep track of patients' past appointment dates. Both subforms are displayed on the same form: subform #1 displays basic patient info (name, DOB), and subform #2 is a form in which I can add an unlimited number of patient appointment dates. When I want to enter an appointment date for a particular patient, I first have to look up the patient in the main form, click the appointment button, then enter the appointment into the subform, and close the subform so I'm back to the main form. This gets very tedious as I have to enter appointment dates for many patients at a time. To make things easier, I would like to have a combo box on my subform so that I can enter an appointment date, and then look up another patient from the appointment subform. When I tried this, the combo box worked for only a short time, and eventually stopped displaying the patient information I was trying to look up. Does anyone know why my combo box starts working? (Sorry for the looong explanation! I hope it made sense!)
 
what is the code behind your combo box?
what do you mean exactly that it worked for a short time, and eventually didnt work? how long, what happened, etc.
 
I have since deleted the combo box I was using, but I used the combo box wizard to create it. It worked perfectly for a while, but after I had used it several times, it just stopped displaying the information. I would type in a chart number, like 00888, hit "enter," and the patient information would continue to display the same information and not change to the paitent I was looking up. Maybe it's just a glitch? I have deleted the box and re-created it many times, I ran the database repair tool several times, and nothing seems to help. It always stops working.
 
when you create the combo box, you have to choose in the Wizard:

Find a record on my form based on the value i selected in my combo box.

if you dont choose this, the correct code will not be written. you will know it is correct when you look in the OnChange property (or OnUPdate maybe) you can see the code that Access writes which moves to the record you want.
 
I tried creating another combo box again, and it just doesn't work. When I select a number from the list it shows me a blank form or it will show me the first record in the database. This is so frustrating . . .
 
Cancel my previous message. I tried it again, and now it's working.
 
Well, that didn't take long. When I look up a chart number using the combo box, it tells me there is no such record, when there IS. I can get to the record by going the usual route, first looking it up in the main form, then clicking my appointment button. I give up.
 
is your form opening to a specific record? you have to have it so it opens to all records. when the form opens, at the bottom is there only ONE record shown?

if you want you can compact your db, zip it and send to rowe147@hotmail.com and i will take a look. this should not be such a difficult thing, so i wonder if i am missing something. anyhow, if you want to send and there is sensitive info (SSN, medical info, etc) you can make a copy of the db and only send the problem parts.

g
 
I would be very grateful if you could take a look at my database! I will make a copy of it for you minus the patient information (I'll add some false information so you can test it), and send it over. Thanks SO much!
 
the problem:
the form was opened from another form, filter to show details of just one record. so when the user chooses a diff record ID from the combo box, the recordsetclone only has the one record to look thru. i added as the first line in the combo box's AfterUpdate property

me.filter = ""

this unfilters the form so the recordsetclone can move to the selected record.

g
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top