B
Brian Snelling
Private Sub cbxProjectID_AfterUpdate()
Hi,
I'm trying to filter one combo box in a subform based on another in the
main form using Access97. I got this code from one of the helpful websites
and adapted it. When I make a change in combo box cbxProjectID I get run
time error 438 and debug takes me to the second last line (
Forms![frmDailyRecords]!fsubDailyRecordDetails.cbxBlock.RowSource =
sBlockSource
). Where am I going wrong?
Dim sBlockSource As String
sBlockSource = "SELECT [tblBlocks].[BlockID], [tblBlocks].[ProjectID],
[tblBlocks].[strProjectName] " & _
"FROM tblBlocks " & _
"WHERE [ProjectID] = " & Me.cbxProjectID.Value
Forms![frmDailyRecords]!fsubDailyRecordDetails.cbxBlock.RowSource =
sBlockSource
Forms![frmDailyRecords]!fsubDailyRecordDetails.cbxBlock.Requery
Thanks for any help.
Brian S.
Hi,
I'm trying to filter one combo box in a subform based on another in the
main form using Access97. I got this code from one of the helpful websites
and adapted it. When I make a change in combo box cbxProjectID I get run
time error 438 and debug takes me to the second last line (
Forms![frmDailyRecords]!fsubDailyRecordDetails.cbxBlock.RowSource =
sBlockSource
). Where am I going wrong?
Dim sBlockSource As String
sBlockSource = "SELECT [tblBlocks].[BlockID], [tblBlocks].[ProjectID],
[tblBlocks].[strProjectName] " & _
"FROM tblBlocks " & _
"WHERE [ProjectID] = " & Me.cbxProjectID.Value
Forms![frmDailyRecords]!fsubDailyRecordDetails.cbxBlock.RowSource =
sBlockSource
Forms![frmDailyRecords]!fsubDailyRecordDetails.cbxBlock.Requery
Thanks for any help.
Brian S.