G
Guest
I have a 2 tables,
table 1 has a field named ProgArea
table 2 has field name ProgArea and RiskArea
I created a form named Risk
with 2 fields ProgramArea and riskArea
in Program afterudpate field I inserted the below.
Private Sub txtProgArea_AfterUpdate()
Dim strSQL As String
strSQL = "Select " & Me!txtProgArea
strSQL = strSQL & " from Program_Area"
Me!cboRiskArea.RowSourceType = "Table/Query"
Me!cboRiskArea.RowSource = strSQL
End Sub
The intent is to have RiskArea list onyl the values that equal the field
name ProgArea from table 1. Then the user would select the the risk area that
equals the program area.
When I select the Prgram ARea then Click on the Risk Area I get the below
error message
The record source 'Select Schedule from Program_Area'specified on this form
or report does not exist.
When I closed the form and look at the Prgram area field the value I
selected is there and when I select the risk area the correct values appear,
However, I changed the program area to another selection and click on risk
area I get the same error message.
I just want to restrict the user to select the correct values from table 2
that equa the value from table 1 program area.. I have search and test all
the links from this discussion group but I can't get it to work..
table 1 has a field named ProgArea
table 2 has field name ProgArea and RiskArea
I created a form named Risk
with 2 fields ProgramArea and riskArea
in Program afterudpate field I inserted the below.
Private Sub txtProgArea_AfterUpdate()
Dim strSQL As String
strSQL = "Select " & Me!txtProgArea
strSQL = strSQL & " from Program_Area"
Me!cboRiskArea.RowSourceType = "Table/Query"
Me!cboRiskArea.RowSource = strSQL
End Sub
The intent is to have RiskArea list onyl the values that equal the field
name ProgArea from table 1. Then the user would select the the risk area that
equals the program area.
When I select the Prgram ARea then Click on the Risk Area I get the below
error message
The record source 'Select Schedule from Program_Area'specified on this form
or report does not exist.
When I closed the form and look at the Prgram area field the value I
selected is there and when I select the risk area the correct values appear,
However, I changed the program area to another selection and click on risk
area I get the same error message.
I just want to restrict the user to select the correct values from table 2
that equa the value from table 1 program area.. I have search and test all
the links from this discussion group but I can't get it to work..