Microsoft Access - List of Data on a Form


On an Access form I want to have a list that is pulled from a query or table using SQL statement.
I am using the report to create an invoice so data will be pulled from the "Invoices" table and
the "Invoice Details" tables using the ID of the invoice.
So I want to use code to build a SQL statement eg "Select Description, Unit Price, Amount From [Invoice Details] Where InvoiceID = " & oID
How do I achieve this?
Murray BrownMicrosoft Cloud Azure/Excel Solution DeveloperAsked:
Who is Participating?
Gustav BrockConnect With a Mentor CIOCommented:
Use a ListBox control and apply your SQL as the RecordSource.
Ares KurkluSoftware EngineerCommented:
Where do you want to display the result of the query, you can display things in a form, report or you can simply use the Query wizard and put your query there and it will appear under the Queries list then you can click and run that.

What do you exactly want to do ?
Murray BrownMicrosoft Cloud Azure/Excel Solution DeveloperAuthor Commented:
All Courses

From novice to tech pro — start learning today.