sql help please

D

davewex

Id love some help with this code.
What I'm trying to do is take the date and amount from a user's input
on a form and place it in a combo box on the form. I need to keep this
info seperate from other patients.

This code is bringing up the amount and date for every user in the
table, which I dont want...can anyone suggest some code?? I just want
the info for each seperate patient showing up in the combo box to keep
a record of their visits and the amount paid

SELECT [Tx Date] As tx
FROM [Patient Details]

UNION SELECT [amount due]
FROM [Patient Details]
ORDER BY tx;
 
J

John Spencer (MVP)

Perhaps something like:


SELECT [Tx Date] as TX, [Amount Due]
FROM [Patient Details]
WHERE [Patient ID] = [Forms]![YourFormName]![YourPatientID]
 
Top