Binding Data to a ListView (1 Viewer)

reb0101

Registered User.
Local time
Today, 20:13
Joined
Oct 29, 2006
Messages
27
hey all,
I'm back to banging my head against the wall on an entirely different issue, the elusive ListView.
Let me tell you what I have, and works, and what I'm hoping for, not working yet.
Shipping Database that seems to never be complete.

REGION TABLE:

REG_ID (PK Autonumber)
SELECT (YES/NO select)
REGION (Text)

COUNTRY TABLE:

CNTRY_ID (PK Autonumber)
SELECT (YES/NO select)
COUNTRY (Text)

There are other tables, PORT, CARRIER, etc but they don't matter now because if I can get it to work with REGION/COUNTRY it certainly won't work with others.
This is what i have and works, so far;

QRY_REG (query to REGION table) and is the record source for a continous_forms subform.
When a REGION is selected and it is refreshed, it filters the subform for COUNTRY right next to it just like a cascading combo box.
REGION check box is selected, COUNTRY checkbox is selected and then another query that on a button will append the selected values from both to SHIPMENTS table.
It will also clear the selected values.
This works but I want to be able to do this with a Listview (not Listbox).
I have spent several hours trying to get my head around the code to bind that Listview with data from both tables.
1 or 2 source files were found but one has so many bells and whistles I can barely even find the relevant SQL (it has buttons to change icons, colors, etc).
at least theoretically this should not be rocket science.
Binding 2 or 3 fields at most from one table.
One more thing and this is just an extra (stumbled upon it in the aforementioned code).
I would like to add one more SELECT box to the COUNTRY table.
This would be "INACTIVE" so that if it is selected the COUNTRY populated in the ListView would be in Red, or vbRed.
The ListView will not have to display this value, it can be set from another form.
Only need COUNTRY and the SELECT box for the ListView, same for REGION.
How hard would this be just to bind a table to a ListView?
 

Users who are viewing this thread

Top Bottom