Display data in a listbox based on the input in a form? (1 Viewer)

mamradzelvy

Member
Local time
Today, 07:58
Joined
Apr 14, 2020
Messages
145
Hello, i'm new to Access and i'm trying to figure out how to make a listbox next to my form show only information based on the input on said form.
I got a table called "dbInventory" with "ID, InvName, InvQuantity, InvType" and a entry form matching these fields.
What i'm trying to achieve is to have the listbox start displaying search results based on the input.
(My ID collumn contains barcodes, not autonumbers)
So for instance, if i scan a barcode for an item i already put in the table some other time, i would like it to appear on the listbox right away.
How would one go about that?
I tried the listbox wizzard and selected the third option which states that the listbox will take information based on entries on the form (sorry my access is in Czech)
However, that just constantly shows all data in my table.

I apologize for grammar mistakes and i would welcome if anybody could at least help me find the right way to ask this question, as i struggle with it.
 

Ranman256

Well-known member
Local time
Today, 02:58
Joined
Apr 9, 2015
Messages
4,339
Normally the form would show all records in a continuous list form.
The unbound text box would get the barcode then display all the data based on the barcode.
The form query is based on the barcode box,
Select * from table where [barcode]=forms!fMyForm!txtBarcode
then the afterupdate event is: Me.requery

If you want to use a listbox, what data goes in the form?
 

mamradzelvy

Member
Local time
Today, 07:58
Joined
Apr 14, 2020
Messages
145
Normally the form would show all records in a continuous list form.
The unbound text box would get the barcode then display all the data based on the barcode.
The form query is based on the barcode box, then the afterupdate event is: Me.requery

If you want to use a listbox, what data goes in the form?

The form is a input form for the table "dbInventory" and its got text boxes for all collumns in it except date added.
I thought that list box would be the best looking choice, although my knowledge about it's properties is basically nonexistent at this point i'm afraid.
 

Users who are viewing this thread

Top Bottom