I was looking at the samples on the site but could not find what I am looking for. I have a series of combo boxes and a list box set up as follows which are related, they populate the combo below them.:
cboCabinets:
RowSource:
SELECT tblCabinet.intCabinetID, tblCabinet.txtCabinetName, tblCabinet.txtCabinetLocation FROM tblCabinet;
After_Update:
Dim sDrawerLoadSource As String
sDrawerLoadSource = "SELECT [tblDrawer].[intDrawerID], [tblDrawer].[intCabinetID], [tblDrawer].[txtDrawerName] " & _
"FROM tblDrawer " & _
"WHERE [intCabinetID] = " & Me.cboCabinet.Value
Me.cboDrawer.RowSource = sDrawerLoadSource
Me.cboDrawer.Requery
cboDrawer:
RowSource:SELECT tblDrawer.intDrawerID, tblDrawer.intCabinetID, tblDrawer.txtDrawerName, tblDrawer.txtDrawerLocation FROM tblDrawer;
After_Update:
Dim sPriFoldersLoadSource As String
sPriFoldersLoadSource = "SELECT [tblPrimaryFolder].[intPriFolderID], [tblPrimaryFolder].[intDrawerID], [tblPrimaryFolder].[txtPriFolderName] " & _
"FROM tblPrimaryFolder " & _
"WHERE [intDrawerID] = " & Me.cboDrawer.Value
Me.cboPriFolders.RowSource = sPriFoldersLoadSource
Me.cboPriFolders.Requery
cboPriFolders
RowSource:SELECT tblPrimaryFolder.intPriFolderID, tblPrimaryFolder.intDrawerID, tblPrimaryFolder.txtPriFolderName, tblPrimaryFolder.txtPriFolderLocation FROM tblPrimaryFolder;
After_Update
This were I get lost. I am not sure how to write the connection code for the list box:
lstSubfolders
RpwSource: SELECT tblSubFolder.intSubFolderID, tblSubFolder.txtSubFolderName, tblSubFolder.intPriFolderID FROM tblSubFolder;
Now a Primary folder can have several subfolders which can be loaded into the list box. Hope youcan help.
Thank you
Art Lorenzini,
Sioux Falls, SD
Posted by: dbalorenzini@yahoo.com
Reply via web post | • | Reply to sender | • | Reply to group | • | Start a New Topic | • | Messages in this topic (1) |
Tidak ada komentar:
Posting Komentar