473,405 Members | 2,379 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

Updating a text field from a list box and then filtering the results in a report

Hi...

I really appreciate your help with my question, I am pulling my hair out on this. I have not been able to find an answer on the other posts.

I am using Access 2000. I have a form that has a list box that pulls a full list of medicines from a table. In the table I have two columns Medicine Name and Show When. I only show Medicine Name in the list box on the form. On the form I also have a text box (named Medicine), that is populated when a medicine name is selected from the list box. Each time a medicine is selected, it adds the name to the text box (Medicine), seperated by semicolons.

I am now trying to create a report that has the field Medicine (populated by the list box and seperated by semicolons) on it, but I only want to show the medicines that have a specific corresponding letter in the Show When field of the table.

I have two problems, how do I just pull out individual medicine names from the Medicine field (text box) and how do I only show ones with the correct corresponding letter?

I thought about having the list box populate another table with the medicines, and have a datasheet in a subform on the form, but I can't even begin to figure out how to do that.

Sorry for the long post from a frustrated newbie....and thanks so much for your help.
Aug 14 '07 #1
1 1496
Rabbit
12,516 Expert Mod 8TB
Your tables aren't normalized. They should be designed like:

tbl_Medicine
MedicineID; PK
MedicineName
ShowWhen

tbl_Patient
PatientID; PK
TreatmentDate; PK
PatientName
PatientAddress

tbl_PatientMedicine
PatientID; FK
TreatmentDate; FK
MedicineID; FK

And you'll have multiple records for each patient.
With the tables designed like this, the query becomes easy to make.
Aug 14 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

7
by: Rick Caborn | last post by:
Does anyone know of a way to execute sql code from a dynamically built text field? Before beginning, let me state that I know this db architecture is built solely for frustration and I hope to...
7
by: Foxster | last post by:
in access i have two tables (tblplayer, tblpoints) in tblplayer i have field totalpoint (number) in tlbpoints i have field pointgame (number) the two files are related via idplayer now i made a...
3
by: John young | last post by:
I have been looking for an answer to a problem and have found this group and hope you can assist . I have been re doing a data base I have made for a car club I am with and have been trying to...
5
by: Cro | last post by:
Hello Access Developers, I'd like to know if it is possible to perform a count in an expression that defines a control source. My report is based on a query. In my report, I want a text box to...
8
by: Mike MacSween | last post by:
tblCourses one to many to tblEvents. A course may have an intro workshop (a type of event), a mid course workshop, a final exam. Or any combination. Or something different in the future. At...
1
by: mstery | last post by:
I have a report generated via an ID selection made in a dropdown on a form. The report filters by an on click event in a preview report button on the form. Everything in the report, including...
5
by: Greg Teets | last post by:
I am running an Access report from VB via ADO. The report has a field that shows the date it was run. How can I return the data from this field to VB or have Access post it to a table when the...
14
by: el_sid | last post by:
Our developers have experienced a problem with updating Web References in Visual Studio.NET 2003. Normally, when a web service class (.asmx) is created, updating the Web Reference will...
2
by: philip260 | last post by:
Hello everyone. I have created a report that runs off a query. The query will return results that have different records for different people but will only have one (staff time) see query...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.