Not got a clue!

lynsey2

Registered User.
Local time
Today, 19:48
Joined
Jun 18, 2002
Messages
439
ok i thought a query would be best then changed my mind..I think im looking to use a lookup of some sort!?

the problem!(as simple as it may be)

have a form (search patient) when i choose the patient from the combo box(using Patient number) the rest of the details are shown e.g.name,dob etc -thats fine

i want to then be able to go into any of my prescription screens and have some form of lookup to get the patients details(so the doc can see that the patient he selected is the one he is doing a prescription 4)
the only time the patient details should change is when the doc goes back into Search Patient and selects another patient.....

i recon i should have a temporary table holding ONLY one record(the patient details of the selected Patient Number)

and look up the temp table!
but
A)dont know how to do it
B)dont even know if that would be the way to do it

sorry but has anyone got an idea for me:( :eek:
 
Or as an alternative, create a pop-up form with the details you want - treated as a subform - with parent/child linkage based on patient ID.
 
i have used the combo wizard!!
that works fine but the thing is i need to have the patients details in different forms...thats kinda what i wanted to do.

At the mo i have it so that the patient selected via the combo box in my Search Patient Form - their details are stored in a table(that only holds one record)

all i want to do now is
when i close search patient and open create Methadone script the patients details will be already in the create Methadone script form!

thought that if i did
=[Patient Store]![Patient Number]
the text box i have in Create methadone script would look up the Patient number from the Patient store tbl(thats the one record temp table)

Doesnt do this though!! Im stuck again!
 
try this

all i want to do now is
when i close search patient and open create Methadone script the patients details will be already in the create Methadone script form!

Dont close search patient, minimize it instead. On Load of the Methadone form put somepthing like

Me.YourTextField= Forms![SearchFormName].[PatientNumber]
HTH
 
Add the patient's table to the query used to populate the prescription form...i havent used a query to populate my prescription forms...i have just bound them to the table that the info needs to be in!
I am thinking that this is a bad thing??

how can i get around this problem?

The docs dont want to select a patient in each prescription form..just once at the start till they select another patient.

if populating the prescription forms is a better idea let me know!
:eek:
 
How do you mean?
a subform on the prescription form with the patient details?:confused:
 
No the main form contains the patient details, a subform for prescriptions, another for visits? If the main form isn't big enough for all the subforms then use a tabcntrol to display them. The entire patient records will then be available.
 
Thats a good idea but dont think it would work as i need a whole page for the prescription forms-there is a lot to them!
Unless...
Can i have a button that takes them to a subform?
NO! you cant can you?
oh im puzzled!

Any other ideas.. i thought this would be easy, maybe im just missing something!

is haveing an external table a good idea?
or

would it be best if i simply made them select a patient in each prescription form?
or

could i do a qry that when a patient is selected No temp table is made but it matches the patient number to one in the whole patient details table and COPIES it into the prescription form??


any help on this one would be v.much appreciated.
 
"i havent used a query to populate my prescription forms...i have just bound them to the table that the info needs to be in!
I am thinking that this is a bad thing??"

It's always better to use a query. You might want to make the query select everything in your table for now. But further down the line you will probably want to change the criteria thus having to create a query anyway. Then you'll have to hunt around for all the record sources and code that needs altering.

HTH

Rich
 
You can open a subform on its own, the form wizard will give you the option to have linked forms, the link will be the patientID, which presumablywill be the NI number. You can use DLookup to fill the patient details, or use a combo box to display them.
 
"Can i have a button that takes them to a subform?"

Yes, you can design a sub-form that starts life invisibly, then have a button to open the form. Link the patient ID number that the doctor selected on your main form to other records such as visits for that patient ID or scrips for that patient ID.

Using a subform is ok. Just read up on the idea of parent/child linking between the main and parent, 'cause that's what you want to do.

If you have a lot of things to list, consider that the subform might best be done as a continuous form that happens to LOOK like (but isn't) a datasheet view. Then allow the subform to include vertical scroll bars. You can put such a thing on a tab control and switch between scrip history and visit history.
 
I wish i had the knowlege to be able to do any of that stuff. I have tried and tried but just cant get this to work:( I am thinking if I cant get something this simple done then I should just give up.

i have text boxes in my perscription form
i have tried making their control sources something like what i have below (the one i have shown is for Patient Number.

=Forms![Search Patient]![Combo43]

the text boxes just say NAME??

Is there an easy solution to my problem or do i just give up?
All I want to do is select a patient then have their details available in other forms!

Sorry I am on my student work placement and dont think im doing too great but dont want to fail it!

Any help much appreciated
Lyns:o :eek:
 
You can only refer to the control on SearchPatient if it remains open while prescription opens
 
Ok guys I have done it!
the problem is I dont have a clue how!!???I just kept trying and changing code.
I had my stDocName = "Search Patient"

which i changed to

stDocName = "Methadone Script"

because i thought that i want the data to go into the methadone script and not back into search patient..
here is the code that works for the ART script...its pretty much the same for methadone script

Private Sub SPARTChoose_Click()
On Error GoTo Err_SPARTChoose_Click

Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "ARTScript"

stLinkCriteria = "[Patient Number]=" & Me![Combo43]
DoCmd.OpenForm stDocName, , , stLinkCriteria
DoCmd.Maximize


Exit_SPARTChoose_Click:
Exit Sub

Err_SPARTChoose_Click:
MsgBox Err.Description
Resume Exit_SPARTChoose_Click

End Sub

not hard i know but...well as you can see im not v.good at this yet! Feeling beter now hopefuly i can manage the rest ill give it my best shot.

Thanx for all your help and suggestions

Lynsey:)
 

Users who are viewing this thread

Back
Top Bottom