B
Bryan Hughes
Hello,
I have a case management form that after case manager selects the case file,
it populates the subform with client information in that case file.
When the user selects case file id from cbo I receive the following error:
Error No. 2580 ; The RecordSource 'SELECT CDID, CFID, CID, [FN] & Chr(32) &
[LN] AS Name,
COD, ARS, CSAPP, FAN, FL, FSP, FSTC FROM tblClient_Details . . .' specified
on this report or form does not exist.
After clicking okay the subform shows Name: errors
Here is the code on the cboCFID change event I am using:
Private Sub cboCFID_Change()
'Some Dim statements and othe code
.....
' Beginning of SQL statements for sub form
str3SQL = "SELECT DISTINCT CDID, COD, ARS, CSAPP, FAN, FL, FSP, FSTC FROM
tblFST;"
str4SQL = "SELECT CDID, CFID, CID, [FN] & Chr(32) & [LN] AS Name, CM, EMPID,
COD, ARS, CSAPP, FAN, FL, FSP, FSTC " & _
"FROM tblClient_Details INNER JOIN str3SQL ON
tblClient_Details.CDID = str3SQL.CDID " & _
"WHERE tblClient_Details.CFID='" & strCFID & "' " & _
"GROUP BY CDID, CFID, CID, [FN] & Chr(32) & [LN], COD, ARS,
CSAPP, FAN, FL, FSP, FSTC;"
Me.fsubFST_Case_File_Clients.Visible = True
Me.fsubFST_Case_File_Clients.Enabled = True
Me.fsubFST_Case_File_Clients.Locked = True
Me.fsubFST_Case_File_Clients.Form.RecordSource = str4SQL
Me.fsubFST_Case_File_Clients.Form.SetFocus
ErrorHandlerExit:
Exit Sub
ErrorHandler:
MsgBox "Error No: " & Err.Number & "; Description: " & Err.Description
Resume ErrorHandlerExit
End Sub
What am I doing wrong and how can I fix it?
Thank you
-Bryan
I have a case management form that after case manager selects the case file,
it populates the subform with client information in that case file.
When the user selects case file id from cbo I receive the following error:
Error No. 2580 ; The RecordSource 'SELECT CDID, CFID, CID, [FN] & Chr(32) &
[LN] AS Name,
COD, ARS, CSAPP, FAN, FL, FSP, FSTC FROM tblClient_Details . . .' specified
on this report or form does not exist.
After clicking okay the subform shows Name: errors
Here is the code on the cboCFID change event I am using:
Private Sub cboCFID_Change()
'Some Dim statements and othe code
.....
' Beginning of SQL statements for sub form
str3SQL = "SELECT DISTINCT CDID, COD, ARS, CSAPP, FAN, FL, FSP, FSTC FROM
tblFST;"
str4SQL = "SELECT CDID, CFID, CID, [FN] & Chr(32) & [LN] AS Name, CM, EMPID,
COD, ARS, CSAPP, FAN, FL, FSP, FSTC " & _
"FROM tblClient_Details INNER JOIN str3SQL ON
tblClient_Details.CDID = str3SQL.CDID " & _
"WHERE tblClient_Details.CFID='" & strCFID & "' " & _
"GROUP BY CDID, CFID, CID, [FN] & Chr(32) & [LN], COD, ARS,
CSAPP, FAN, FL, FSP, FSTC;"
Me.fsubFST_Case_File_Clients.Visible = True
Me.fsubFST_Case_File_Clients.Enabled = True
Me.fsubFST_Case_File_Clients.Locked = True
Me.fsubFST_Case_File_Clients.Form.RecordSource = str4SQL
Me.fsubFST_Case_File_Clients.Form.SetFocus
ErrorHandlerExit:
Exit Sub
ErrorHandler:
MsgBox "Error No: " & Err.Number & "; Description: " & Err.Description
Resume ErrorHandlerExit
End Sub
What am I doing wrong and how can I fix it?
Thank you
-Bryan