Hi,
It's the Unbound combobox which is for the Patient name.
This is part of the code that I tried in the "AfterUpdate"
THis did not work.Code:Me.cmbPatient.SetFocus Me.cmbPatient = "" Me.cmbPatient.Requery
Charles
Hi,
It's the Unbound combobox which is for the Patient name.
This is part of the code that I tried in the "AfterUpdate"
THis did not work.Code:Me.cmbPatient.SetFocus Me.cmbPatient = "" Me.cmbPatient.Requery
Charles
You have that code in the Provider combobox AfterUpdate? That should work. What happens?
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
Hi,
The code is in the "Provider" AfterUpdate.
What happens is nothing.
However, when I click the dropdown for the combo "Patients" the listed names have a "Check Box" next to there name.
Is that normal?
The combo for the "Providers" do not have the checkbox.
Charles
If the dropdown has check boxes then the combobox is bound to a field set up as multi-value. I NEVER use multi-value fields.
Don't know what to tell you. SetFocus code works for me.
Have you step debugged (refer to link at bottom of my post)? Does the procedure run? Have you selected [Event Procedure] in the Provider combobox AfterUpdate event?
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
Hi,
I had the "Control Source" set to "Patient Name" when I remove it. All worked well.
Now on to populating the associated fields for the "Selected" Patient.
This would require populating the data with the "First" record for the selected Patient.
And then being able to go to the next record for the selected Patient.
Any suggestion on how ti do this will be fine my me.
Thanks June7
Charles
Don't understand. If you have a form display all records related to selected patient, edit whichever one you want.
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
Hi,
Currently I have the selection of the "Provider" populate the fields associated for the provider.
When I select the "Patient Name" I want the fields for the patient to be populated from the Record info for that patient.
This will be the "First" record for the selected patient. And if the data for the selected patient does not need updating I'll click the "Next" button to take me to the next record for the selected patient.
But one step at a time. I'm wanting to retrieve the first recored for the selected patient.
Charles
And what would be the 'first' record? The oldest or the latest?
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
It will be oldest.
And as mentioned my next step will be have a "Next" button to go to the next record for the selected patient.
I'll be stepping from the Oldest to the Newest.
Charles
Could set order as ASCEN date order then the oldest will list first.
Are the records displayed in subform in Datasheet view?
Last edited by June7; 09-03-2013 at 06:49 PM.
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
Hi,
I attached what I have so far. It does not have a "SubForm"
When you select the provider 14 it should populate the Green fields.(Note this is just for examples and will not be used later)
Now when you look at the "Patient" combo you will see a list of "Patients" when you select a Patient I want the very first record for that Patient in the table for PatientsRecord
to fill in the Form fields in Red.
Once the data is loaded I will then have the "Next" button to go to the next record for the selected Patient. And, too the command buttons should also give you the hint as to what I want to do.
If you look at my earlier post you will see what I trying to accomplish.
Thanks
Charles
The form is essentially the same as in the beginning of this thread and I must repeat it is not practical for data entry into multiple tables. I have also stated the most efficient and conventional approach is form/subform arrangement for data entry to associate patient with provider. You said in post 32 that you had form/subform - why is that not the case in this latest version you posted?
None of the controls on the form are bound to fields. It will require extensive VBA code to populate with data from table and to save data edits, if unbound form is the approach you want to use.
Last edited by June7; 09-04-2013 at 01:06 AM.
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
Hi,
I now have the Form/Subform. But, now having an issue populating the Providers combobox in the form PRData.
I was able to populate it in the previous attachment. What am I doing wrong?
Charles
Did you say earlier that a patient can have more than one provider? If that is true then the form/subform is not set up properly. Main form would be bound to Providers. Subform bound to tblPatientProvider (fields in tblPatientProvider should be for foreign key IDs). Combobox in subform to select patient. That's how to create records that associate patient with provider in many-to-many relationship.
If a patient can have only one provider then tblPatientProvider is not even needed and this form/subform should work with a few changes. No patient combobox is needed. Just textboxes to enter/edit patient name. The Master/Child links of subform container will synchronize the related records.
ProviderID is the primary key in Providers. This should be the foreign key in related table. The subform should link to main form on ProviderID.
Confirm nature of data relationship. Can a patient have more than one provider?
The provider combobox should not be bound to field because it should only be used to enter filter criteria. Use textbox to enter provider name for new provider record.
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
Hi,
The relation will be "Many to Many".
As for the "Bound" and "Unbound". In my limited knowledge I think I tried it both ways for the provider.
I set "Row Source" to "Provider" and Control to "Provider Name".
It only showed 1 Provider. Not a List.
Charles