STILL CANT SUS THE COMBO TO LIST BOX (1 Viewer)

theDBguy

I’m here to help
Staff member
Local time
Today, 04:30
Joined
Oct 29, 2018
Messages
21,358
Yes that looks interesting certainly a more pleasurable way to enter data
Okay, see if you can implement that into your database, and let us know if you get stuck. Good luck!
 

dubiousp

Member
Local time
Today, 11:30
Joined
Mar 6, 2020
Messages
86
Many thanks really strting to take shape and looks a lot better using that technique.. My medications table a part form ID and foreign key has two fields the drug name and its purpose.. I never want to select the purpose but do want it to show when I select a drug.. do I link this through a relationship, query or is there a setting
 

theDBguy

I’m here to help
Staff member
Local time
Today, 04:30
Joined
Oct 29, 2018
Messages
21,358
Many thanks really strting to take shape and looks a lot better using that technique.. My medications table a part form ID and foreign key has two fields the drug name and its purpose.. I never want to select the purpose but do want it to show when I select a drug.. do I link this through a relationship, query or is there a setting
Hi. If I remember correctly, the source table for the drug name does not have a purpose field, there's really no purpose to automatically show when a drug was chosen.
 

dubiousp

Member
Local time
Today, 11:30
Joined
Mar 6, 2020
Messages
86
Ok so could I ask would need a relationship or another link some how
 

theDBguy

I’m here to help
Staff member
Local time
Today, 04:30
Joined
Oct 29, 2018
Messages
21,358
Ok so could I ask would need a relationship or another link some how
If you want the purpose to be a dropdown, then you could create a separate table for it, just like how you did it with the meds table.
 

dubiousp

Member
Local time
Today, 11:30
Joined
Mar 6, 2020
Messages
86
The prime is the medication name,,, the pupose needs to match the prime

Purpose does not need to be selectable
 

theDBguy

I’m here to help
Staff member
Local time
Today, 04:30
Joined
Oct 29, 2018
Messages
21,358
The prime is the medication name,,, the pupose needs to match the prime

Purpose does not need to be selectable
Well then, sounds like you just need to add a purpose field in the meds table. However, I don't understand that. Can you provide some examples of meds and their purpose? Thanks.
 

dubiousp

Member
Local time
Today, 11:30
Joined
Mar 6, 2020
Messages
86
Yes certainly the medication selection is purley a record of what a patient is taking so that the clinician can handover to a hospital or recieving body to ensure there are no reactions

The prupose is purley advice for the clinician entering data, for example if the patient was taking penicilian the purpose would be antibiotic,, just used as an indicator
 

theDBguy

I’m here to help
Staff member
Local time
Today, 04:30
Joined
Oct 29, 2018
Messages
21,358
Yes certainly the medication selection is purley a record of what a patient is taking so that the clinician can handover to a hospital or recieving body to ensure there are no reactions

The prupose is purley advice for the clinician entering data, for example if the patient was taking penicilian the purpose would be antibiotic,, just used as an indicator
Okay, so, if the purpose is specific to a medication, then just add it to the meds table.
 

dubiousp

Member
Local time
Today, 11:30
Joined
Mar 6, 2020
Messages
86
Forgive me, I have have it in the table but does not appear with the drug when drug selected I'm assuming I need to link the fields somehow rather than using two separate combo boxes which sort of suggests the need to enter two values.
 

vhung

Member
Local time
Today, 04:30
Joined
Jul 8, 2020
Messages
235
The lookup list is is in one table called medication,

the lbdrugs list box is populated through a combo box that takes its data from the medication table.. My problem is linking the list box lbdrugs to a table where the selected records are held. Essentaiily a patient record

Me.lbdrugs.AddItem (Me.cgdrugadd.Column(1))
Me.lbdruginfo.AddItem (Me.cgdrugadd.Column(2))
very nice intention
>if you add fields to your patient record
field.drugname and field.druggroup

where
Me.[drugname] = (Me.cgdrugadd.Column(1))
Me.[druggroup] = (Me.cgdrugadd.Column(2))

>the medication table is your main look-up source
>guess would work too, like on unbound listbox, but this could be a textbox on specific field
 
Last edited:

dubiousp

Member
Local time
Today, 11:30
Joined
Mar 6, 2020
Messages
86
Thanks you are all amazing, building this for fun and a bit of education and so far learnt so much with all of your help

The calcualtions are next they could be interesting
 

vhung

Member
Local time
Today, 04:30
Joined
Jul 8, 2020
Messages
235
Thanks you are all amazing, building this for fun and a bit of education and so far learnt so much with all of your help

The calcualtions are next they could be interesting
good luck
>with your project, you can do it, all the way
 

craigachan

Registered User.
Local time
Today, 04:30
Joined
Nov 9, 2007
Messages
282
Don't know if you solved this one yet but here is what I would do.

One thing I have done is setup a separate tblPtMeds for patient meds. Patient meds change with time and you still need to keep track of what meds were taken and at what time. So a tblPtMeds can be used with fields, PtID, nDate, Meds,Comments. You can then store the patient meds for a certain date as a string in field Meds (Doxazosin 4mg #60 1 bid; Zpak x1 take 1qd) Then when you bring the patient up the next time, your record will find the most current record and then populate your listbox of meds from the string. On your next appointment You can then check with the patient if there are any medication changes, then make a new current record (add or remove meds by clicking from your cbobox or deleting from the list) to reflect the current meds taken by the patient which is saved to tblPtMeds as a new record. You can also use tblPtMeds to look up the history of that patients meds by scrolling thru that patient's med history.

Hope this helps.
 

Users who are viewing this thread

Top Bottom