Thanks, here goes...
----------------------------------------
Form:
=====
Name: frmSubModules
Data
----
Record Source: tblSubModules
Order By: tblSubModules.RecCntr
----------------------------------------
Combo Box 1:
============
Name: cbxMetaSchema
Format
------
Column Count: 1
Column Widths: 1"
Data
----
Row Source Type: Table/Query
Row Source: SQL
SELECT DISTINCT tblSubModules.MetaSchema
FROM tblSubModules;
Bound Column: 1
Limit To List: No
Event
-----
After Update:
Private Sub cbxMetaSchema_AfterUpdate()
On Error GoTo Err_cbxMetaSchema_AfterUpdate
Dim strSQL As String
strSQL = "Select distinct CatalogVers from
tblSubModules"
strSQL = strSQL & " where MetaSchema = " & Me!
cbxMetaSchema
Me!cbxCatVersion.RowSourceType = "Table/Query"
Me!cbxCatVersion.RowSource = strSQL
Exit_cbxMetaSchema_AfterUpdate:
Exit Sub
Err_cbxMetaSchema_AfterUpdate:
MsgBox Err.Description
Resume Exit_cbxMetaSchema_AfterUpdate
End Sub
----------------------------------------
Combo Box 2:
============
Name: cbxCatVersion
Format
------
Column Count: 2
Column Widths: 1";1"
Data
----
Row Source Type: Table/Query
Row Source: SQL
SELECT DISTINCT tblSubModules.CatalogVers,
tblSubModules.MetaSchema
FROM tblSubModules
WHERE (((tblSubModules.MetaSchema)=[cbxMetaSchema]));
Bound Column: 2
Limit To List: Yes
Event
-----
After Update:
Private Sub cbxCatVersion_AfterUpdate()
On Error GoTo Err_cbxCatVersion_AfterUpdate
' strSQL = "Select * from tblSubModules "
' strSQL = strSQL & "Where MetaSchema = " & Me!
cbxMetaSchema
' Forms!frmSubModules.RowSourceType = "Table/Query"
' Forms!frmSubModules.RowSource = strSQL
Exit_cbxCatVersion_AfterUpdate:
Exit Sub
Err_cbxCatVersion_AfterUpdate:
MsgBox Err.Description
Resume Exit_cbxCatVersion_AfterUpdate
End Sub
----------------------------------------
Command Button:
===============
Name: cmdRefresh
Event
-----
On Click: (What Access built when I used the wizard.)
Private Sub cmdRefresh_Click()
On Error GoTo Err_cmdRefresh_Click
DoCmd.DoMenuItem acFormBar, acRecordsMenu, 5, ,
acMenuVer70
Exit_cmdRefresh_Click:
Exit Sub
Err_cmdRefresh_Click:
MsgBox Err.Description
Resume Exit_cmdRefresh_Click
End Sub
----------------------------------------
-----Original Message-----
If it doesn't seem to work, post the details of the form's recordsource
query (SQL statement) and the combo boxes' names, and the code running on
the button that you click.
--
Ken Snell
<MS ACCESS MVP>
.